Skip to content

Commit

Permalink
working on save methods in classes
Browse files Browse the repository at this point in the history
  • Loading branch information
John Reasor authored and John Reasor committed May 14, 2012
1 parent 8540190 commit 18f47c7
Show file tree
Hide file tree
Showing 6 changed files with 168 additions and 6 deletions.
4 changes: 2 additions & 2 deletions BuildingPermit/BuildingPermit/Building.cs
Expand Up @@ -27,7 +27,7 @@ public class Building
private string myGarageSF; private string myGarageSF;
private string myBasementSF; private string myBasementSF;
private string myDimensions; private string myDimensions;
private int myPermitID; private string myPermitID;
private Boolean myBasementBool; private Boolean myBasementBool;
private string myBuildingID; private string myBuildingID;
private string myPorpsedUse; private string myPorpsedUse;
Expand Down Expand Up @@ -130,7 +130,7 @@ public string dimensions
/// <summary> /// <summary>
/// Permit ID as set by User /// Permit ID as set by User
/// </summary> /// </summary>
public int permitId public string permitId
{ {
get { return myPermitID; } get { return myPermitID; }
set { myPermitID = value; } set { myPermitID = value; }
Expand Down
1 change: 1 addition & 0 deletions BuildingPermit/BuildingPermit/BuildingPermit.csproj
Expand Up @@ -110,6 +110,7 @@
<DependentUpon>ContractorLookup.cs</DependentUpon> <DependentUpon>ContractorLookup.cs</DependentUpon>
</Compile> </Compile>
<Compile Include="Parcel.cs" /> <Compile Include="Parcel.cs" />
<Compile Include="Permit.cs" />
<Compile Include="PropertyAdd.cs"> <Compile Include="PropertyAdd.cs">
<SubType>Form</SubType> <SubType>Form</SubType>
</Compile> </Compile>
Expand Down
73 changes: 71 additions & 2 deletions BuildingPermit/BuildingPermit/BuildingPermitTabs.cs
Expand Up @@ -17,6 +17,8 @@ public partial class BuildingPermitTabs : Form


Building building = new Building(); Building building = new Building();
Contact contact = new Contact(); Contact contact = new Contact();
Contact applicant = new Contact();
Contact GCContact = new Contact();
Contractor GC = new Contractor(); Contractor GC = new Contractor();
Contractor HVACsub = new Contractor(); Contractor HVACsub = new Contractor();
Contractor ELETRICALsub = new Contractor(); Contractor ELETRICALsub = new Contractor();
Expand All @@ -26,6 +28,7 @@ public partial class BuildingPermitTabs : Form
Contractor IRRIGATIONsub = new Contractor(); Contractor IRRIGATIONsub = new Contractor();
Utilities utilities = new Utilities(); Utilities utilities = new Utilities();
Parcel parcel = new Parcel(); Parcel parcel = new Parcel();
Permit permit = new Permit();






Expand Down Expand Up @@ -1002,7 +1005,7 @@ private void btnSubmit_Click(object sender, EventArgs e)
this.building.heatedSF = txtHeatedSF.Text; this.building.heatedSF = txtHeatedSF.Text;
this.building.lrk = txtLRKNumber.Text; this.building.lrk = txtLRKNumber.Text;
this.building.numStories = txtNumStories.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.porchSF = txtPorchSF.Text;
this.building.proposedUse = cmboProposedUse.Text; this.building.proposedUse = cmboProposedUse.Text;
this.building.totalSF = txtSquareFeet.Text; this.building.totalSF = txtSquareFeet.Text;
Expand All @@ -1012,7 +1015,8 @@ private void btnSubmit_Click(object sender, EventArgs e)
this.contact.companyName = txtOwner.Text; this.contact.companyName = txtOwner.Text;
this.contact.firstPhone = txtOwnerPhone.Text; this.contact.firstPhone = txtOwnerPhone.Text;
this.contact.secondPhone = txtCell.Text; this.contact.secondPhone = txtCell.Text;

this.contact.property = true;
this.contact.permitID = txtPermitNumber.Text;


this.contact.save(conStr); this.contact.save(conStr);


Expand Down Expand Up @@ -1054,15 +1058,80 @@ private void btnSubmit_Click(object sender, EventArgs e)


this.utilities.save(conStr); 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.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.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.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.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.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.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.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() private void clearAllFieldsForPermitNum()
Expand Down
8 changes: 8 additions & 0 deletions BuildingPermit/BuildingPermit/Contact.cs
Expand Up @@ -23,6 +23,14 @@ public class Contact


private Boolean myPropOwner; private Boolean myPropOwner;
private DateTime myLicenseExpDate; private DateTime myLicenseExpDate;
private string myPermitID;

public string permitID
{
get { return myPermitID; }
set { myPermitID = value; }
}





public DateTime licenseExpDate public DateTime licenseExpDate
Expand Down
4 changes: 2 additions & 2 deletions BuildingPermit/BuildingPermit/Parcel.cs
Expand Up @@ -26,7 +26,7 @@ class Parcel
private string myZip; private string myZip;
private string myDeedBook; private string myDeedBook;
private string myDeedPage; private string myDeedPage;
private int myLotNum; private string myLotNum;
private string mySize; private string mySize;
private decimal myValue; private decimal myValue;
private string myZoningDist; private string myZoningDist;
Expand Down Expand Up @@ -102,7 +102,7 @@ public string size
/// <summary> /// <summary>
/// Lot Number /// Lot Number
/// </summary> /// </summary>
public int lotNum public string lotNum
{ {
get { return myLotNum; } get { return myLotNum; }
set { myLotNum = value; } set { myLotNum = value; }
Expand Down
84 changes: 84 additions & 0 deletions BuildingPermit/BuildingPermit/Permit.cs
@@ -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.