Permalink
Browse files

working on save methods in classes

  • Loading branch information...
1 parent 8540190 commit 18f47c785beda7a2c8cdca54e2d06fa5b8b82b19 @KG5RDU KG5RDU committed May 14, 2012
@@ -27,7 +27,7 @@ public class Building
private string myGarageSF;
private string myBasementSF;
private string myDimensions;
- private int myPermitID;
+ private string myPermitID;
private Boolean myBasementBool;
private string myBuildingID;
private string myPorpsedUse;
@@ -130,7 +130,7 @@ public string dimensions
/// <summary>
/// Permit ID as set by User
/// </summary>
- public int permitId
+ public string permitId
{
get { return myPermitID; }
set { myPermitID = value; }
@@ -110,6 +110,7 @@
<DependentUpon>ContractorLookup.cs</DependentUpon>
</Compile>
<Compile Include="Parcel.cs" />
+ <Compile Include="Permit.cs" />
<Compile Include="PropertyAdd.cs">
<SubType>Form</SubType>
</Compile>
@@ -17,6 +17,8 @@ public partial class BuildingPermitTabs : Form
Building building = new Building();
Contact contact = new Contact();
+ Contact applicant = new Contact();
+ Contact GCContact = new Contact();
Contractor GC = new Contractor();
Contractor HVACsub = new Contractor();
Contractor ELETRICALsub = new Contractor();
@@ -26,6 +28,7 @@ public partial class BuildingPermitTabs : Form
Contractor IRRIGATIONsub = new Contractor();
Utilities utilities = new Utilities();
Parcel parcel = new Parcel();
+ Permit permit = new Permit();
@@ -1002,7 +1005,7 @@ private void btnSubmit_Click(object sender, EventArgs e)
this.building.heatedSF = txtHeatedSF.Text;
this.building.lrk = txtLRKNumber.Text;
this.building.numStories = txtNumStories.Text;
- this.building.permitId = Convert.ToInt16(txtPermitNumber.Text);
+ this.building.permitId = txtPermitNumber.Text;
this.building.porchSF = txtPorchSF.Text;
this.building.proposedUse = cmboProposedUse.Text;
this.building.totalSF = txtSquareFeet.Text;
@@ -1012,7 +1015,8 @@ private void btnSubmit_Click(object sender, EventArgs e)
this.contact.companyName = txtOwner.Text;
this.contact.firstPhone = txtOwnerPhone.Text;
this.contact.secondPhone = txtCell.Text;
-
+ this.contact.property = true;
+ this.contact.permitID = txtPermitNumber.Text;
this.contact.save(conStr);
@@ -1054,15 +1058,80 @@ private void btnSubmit_Click(object sender, EventArgs e)
this.utilities.save(conStr);
+ this.GC.companyName = txtContractorName.Text;
+ this.GC.firstPhone = txtContractorPhone.Text;
+ this.GC.license = txtContractorLiscence.Text;
+ this.GC.permitID = txtPermitNumber.Text;
+ this.GC.property = false;
this.GC.save(conStr);
+
+ this.GCContact.companyName = txtSiteManagerName.Text;
+ this.GCContact.firstPhone = txtSiteManagerPhone.Text;
+ this.GCContact.email = txtContractorEmail.Text;
+ this.GCContact.permitID = txtPermitNumber.Text;
+ this.GCContact.property = false;
+
+ this.GCContact.save(conStr);
+
+ this.ELETRICALsub.companyName = txtElectricalName.Text;
+ this.ELETRICALsub.firstPhone = txtElectricalPhone.Text;
+ this.ELETRICALsub.license = txtElectricalLisenceNumber.Text;
+ this.ELETRICALsub.property = false;
+
this.ELETRICALsub.save(conStr);
+
+ this.PLUMBINGsub.companyName = txtPlumbingName.Text;
+ this.PLUMBINGsub.firstPhone = txtPlumbingPhone.Text;
+ this.PLUMBINGsub.license = txtPlumbingLisenceNumber.Text;
+ this.PLUMBINGsub.property = false;
+
this.PLUMBINGsub.save(conStr);
+
+ this.MECHsub.companyName = txtMechanicalName.Text;
+ this.MECHsub.firstPhone = txtMechanicalPhone.Text;
+ this.MECHsub.license = txtMechanicalLisenceNumber.Text;
+ this.MECHsub.property = false;
+
this.MECHsub.save(conStr);
+
+ this.GASsub.companyName = txtGasName.Text;
+ this.GASsub.firstPhone = txtGasPhone.Text;
+ this.GASsub.license = txtGasLisenceNumber.Text;
+ this.GASsub.property = false;
+
this.GASsub.save(conStr);
+
+ this.IRRIGATIONsub.companyName = txtIrrigationName.Text;
+ this.IRRIGATIONsub.firstPhone = txtIrrigationPhone.Text;
+ this.IRRIGATIONsub.license = txtIrrigationLisenceNumber.Text;
+ this.IRRIGATIONsub.property = false;
+
this.IRRIGATIONsub.save(conStr);
+
+ this.applicant.companyName = txtApplicant.Text;
+ this.applicant.firstPhone = txtApplicant.Text;
+ this.applicant.secondPhone = txtCell.Text;
+ this.applicant.property = false;
+
+
+ this.applicant.save(conStr);
+
+ this.parcel.address = txtProperty.Text;
+ this.parcel.lotNum = txtLotNumber.Text;
+ this.parcel.lrk = txtLRKNumber.Text;
+ this.parcel.zoningDist = txtZoningDistrict.Text;
+
this.parcel.save(conStr);
+ this.permit.buildingID = this.building.buildingID;
+ this.permit.feeTotal = txtBalance.Text;
+ this.permit.notes = txtNotes.Text;
+ this.permit.parcelID = this.parcel.parcelID;
+ this.permit.permitDate = dtIssueDate.Value;
+
+ this.permit.save(conStr);
+
}
private void clearAllFieldsForPermitNum()
@@ -23,6 +23,14 @@ public class Contact
private Boolean myPropOwner;
private DateTime myLicenseExpDate;
+ private string myPermitID;
+
+ public string permitID
+ {
+ get { return myPermitID; }
+ set { myPermitID = value; }
+ }
+
public DateTime licenseExpDate
@@ -26,7 +26,7 @@ class Parcel
private string myZip;
private string myDeedBook;
private string myDeedPage;
- private int myLotNum;
+ private string myLotNum;
private string mySize;
private decimal myValue;
private string myZoningDist;
@@ -102,7 +102,7 @@ public string size
/// <summary>
/// Lot Number
/// </summary>
- public int lotNum
+ public string lotNum
{
get { return myLotNum; }
set { myLotNum = value; }
@@ -0,0 +1,84 @@
+/*
+ * Programmer: John Reasor
+ * Date: 5-14-2012
+ * Description: Class for Permit Information
+*/
+
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace BuildingPermit
+{
+ class Permit
+ {
+ private string myPermitID;
+ private DateTime mypermitDate;
+ private string myInspectorID;
+ private string myparcelID;
+ private string myFeeTotal;
+ private int myContactID;
+ private string myBuildingID;
+ private string myNotes;
+
+ public string notes
+ {
+ get { return myNotes; }
+ set { myNotes = value; }
+ }
+
+ public string buildingID
+ {
+ get { return myBuildingID; }
+ set { myBuildingID = value; }
+ }
+
+ public int contactID
+ {
+ get { return myContactID; }
+ set { myContactID = value; }
+ }
+
+ public string feeTotal
+ {
+ get { return myFeeTotal; }
+ set { myFeeTotal = value; }
+ }
+
+ public string parcelID
+ {
+ get { return myparcelID; }
+ set { myparcelID = value; }
+ }
+
+ public string inspectorID
+ {
+ get { return myInspectorID; }
+ set { myInspectorID = value; }
+ }
+
+
+ public DateTime permitDate
+ {
+ get { return mypermitDate; }
+ set { mypermitDate = value; }
+ }
+
+ public string permitID
+ {
+ get { return myPermitID; }
+ set { myPermitID = value; }
+ }
+
+ public void save(string conStr)
+ {
+
+ }
+ public void load(string conStr)
+ {
+
+ }
+ }
+}

0 comments on commit 18f47c7

Please sign in to comment.