コード例 #1
0
ファイル: Propertys.cs プロジェクト: Darkfate/SEPA3
 public void addProperty(Address address, String[] details)
 {
     dc.ExecuteNonQuery("insert into Property(PropertyType, Cost, Available, AgentID) values ('" + details[0] + "', " + details[1] + ", 1, " + details[2] + ");");
     DataTable idResult =  dc.ExecuteQuery("select PropertyID from Property where AgentId = " + details[2] + " ORDER BY PropertyID DESC;");
     String id = idResult.Rows[0].ItemArray[0].ToString();
     dc.ExecuteNonQuery("insert into Address values (" + id + ", " + address.StreetNo() + ", '" + address.StreetName() + "', '" + address.Suburb() + "', " + address.PostCode() + ", '" + address.State() + "', '" + address.Country() + "');");
     refresh();
 }
コード例 #2
0
ファイル: Property.cs プロジェクト: Darkfate/SEPA3
 public Property(int propertyId, String propertyType, int cost, int available, int agentId, String streetNo, String streetName, String suburb, String postCode, String state, String country)
 {
     this.propertyId = propertyId;
     this.propertyType = propertyType;
     this.cost = cost;
     this.agentId = agentId;
     this.available = available;
     this.address = new Address(streetNo, streetName, suburb, postCode, state, country);
     this.assets = new Assets(propertyId);
 }
コード例 #3
0
ファイル: Menu.cs プロジェクト: Darkfate/SEPA3
 private void saveButton_Click(object sender, EventArgs e)
 {
     String streetNo = streetNoText.Text;
     String streetName = streetNameText.Text;
     String suburb = suburbText.Text;
     String postCode = postCodeText.Text;
     String state = stateText.Text;
     String country = countryText.Text;
     Address address = new Address(streetNo, streetName, suburb, postCode, state, country);
     String agentId = agentIdText.Text;
     String propertyType = propertyTypeText.Text;
     String cost = costText.Text;
     String[] details = {propertyType, cost, agentId };
     agency.addProperty(address, details);
     updateList();
     saveButton.Hide();
     cancelButton.Hide();
 }
コード例 #4
0
ファイル: Agency.cs プロジェクト: Darkfate/SEPA3
 public void addProperty(Address address, String[] propertyDetails)
 {
     propertys.addProperty(address, propertyDetails);
 }