示例#1
0
 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
 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);
 }