Exemplo n.º 1
0
        public void AddHouse(clsHouse house)
        {
            DataRow myRow = clsGlobal.tbHouses.NewRow();

            myRow["HouseID"]           = house.House_id;
            myRow["Type"]              = house.Type;
            myRow["Localisation"]      = house.Localisation;
            myRow["Prix"]              = house.Price;
            myRow["NombreChambre"]     = house.Nb_rooms;
            myRow["NombreSalleDeBain"] = house.Nb_bathrooms;
            myRow["Description"]       = house.Description;
            myRow["AgentID"]           = house.Agent_id;
            clsGlobal.tbHouses.Rows.Add(myRow);
        }
Exemplo n.º 2
0
 public void EditHouse(clsHouse house)
 {
     foreach (DataRow myRow in clsGlobal.tbHouses.Rows)
     {
         if (myRow["HouseID"].ToString() == house.House_id.ToString())
         {
             myRow["Type"]              = house.Type;
             myRow["Localisation"]      = house.Localisation;
             myRow["Prix"]              = house.Price;
             myRow["NombreChambre"]     = house.Nb_rooms;
             myRow["NombreSalleDeBain"] = house.Nb_bathrooms;
             myRow["Description"]       = house.Description;
             myRow["AgentID"]           = house.Agent_id;
         }
     }
 }