public string toInsert() { StringBuilder list = new StringBuilder(); list.Append("'" + Code + "',"); list.Append(Aria.ToString() + ","); list.Append(Rooms.ToString() + ","); list.Append(Bathrooms.ToString() + ","); list.Append(((int)CityZone).ToString() + ","); list.Append("'" + Address.ToString() + "',"); list.Append(Price.ToString() + ","); list.Append("'" + Description.ToString() + "',"); list.Append(((int)Type).ToString() + ","); list.Append("'" + Pic.ToString() + "',"); list.Append(((int)Status).ToString() + ","); list.Append("'" + Datein.ToString() + "'"); return(list.ToString()); }
public string toUpdate() { StringBuilder list = new StringBuilder(); list.Append("code = '" + Code + "',"); list.Append("aria = " + Aria.ToString() + ","); list.Append("rooms = " + Rooms.ToString() + ","); list.Append("bathrooms = " + Bathrooms.ToString() + ","); list.Append("cityzone = " + ((int)CityZone).ToString() + ","); list.Append("address = '" + Address.ToString() + "',"); list.Append("price = " + Price.ToString() + ","); list.Append("description = '" + Description.ToString() + "',"); list.Append("type = " + ((int)Type).ToString() + ","); list.Append("pic = '" + Pic.ToString() + "',"); list.Append("status = " + ((int)Status).ToString() + ","); list.Append("datein = '" + Datein.ToString() + "'"); return(list.ToString()); }