示例#1
0
        public void NewBuyerEstate(string buyerID, string estateType, string city, string hood,
                                   string roomFrom, string roomTo, string areaFrom, string areaTo, string floorFrom,
                                   string floorTo, string garden, string priceFrom, string priceTo)
        {
            string estateIDGen = GeneralMethods.generateID();

            con.Open();
            string str = "INSERT INTO BuyerEstates VALUES ('" + estateIDGen + "','" + buyerID + "',N'" + estateType + "',N'" + city
                         + "',N'" + hood + "','" + roomFrom + "','" + roomTo + "','" + areaFrom + "','" + areaTo
                         + "',N'" + floorFrom + "',N'" + floorTo + "',N'" + garden
                         + "','" + priceFrom + "',N'" + priceTo + "')";
            MySqlCommand comm = new MySqlCommand(str, con);

            comm.ExecuteNonQuery();
            con.Close();
        }
示例#2
0
        public void NewSellerEstate(string sellerID, string estateType, string price, string city, string hood, string street,
                                    string number, string numOfBedroom, string area, string floor, string stairs, string elavator,
                                    string numOfBalcony, string toilet, string shower, string storge, string parking, string garden,
                                    string renovate, string boyler, string bars, string pladelet)
        {
            string estateIDGen = GeneralMethods.generateID();

            con.Open();
            string str = "INSERT INTO SellerEstates VALUES ('" + estateIDGen + "',N'" + sellerID + "',N'" + estateType + "','" + price + "',N'" + city
                         + "',N'" + hood + "',N'" + street + "',N'" + number + "','" + numOfBedroom + "','" + area
                         + "',N'" + floor + "',N'" + stairs + "',N'" + elavator + "','" + numOfBalcony + "','" + toilet
                         + "','" + shower + "',N'" + storge + "',N'" + parking + "','" + garden + "',N'" + renovate
                         + "',N'" + boyler + "',N'" + bars + "',N'" + pladelet + "')";
            MySqlCommand comm = new MySqlCommand(str, con);

            comm.ExecuteNonQuery();
            con.Close();
        }