public int insertHouse(string houseToInsert) { clsDBconnection db = new clsDBconnection(); return(db.ExecNonQuery("insert into houses (code, aria, rooms, bathrooms, cityzone, address, price, description, " + "type, pic, status, datein, employee) values (" + houseToInsert + ")")); }
public int joinHouseToClient(int houseID, int clientID) { clsDBconnection db = new clsDBconnection(); return(db.ExecNonQuery("update houses set client = " + clientID + " where id = " + houseID)); }
public int deleteHouse(int houseID) { clsDBconnection db = new clsDBconnection(); return(db.ExecNonQuery("delete from houses where id = " + houseID)); }
public int updateHouse(int houseID, string houseToUpdate) { clsDBconnection db = new clsDBconnection(); return(db.ExecNonQuery("update houses set " + houseToUpdate + " where id = " + houseID)); }
public int insertMessage(string messageToInsert) { clsDBconnection db = new clsDBconnection(); return(db.ExecNonQuery("insert into messages (employee, message) values (" + messageToInsert + ")")); }
public int deleteMessage(int messageID) { clsDBconnection db = new clsDBconnection(); return(db.ExecNonQuery("delete from messages where id = " + messageID)); }
public int updateEmployee(int employeeID, string employeeToUpdate) { clsDBconnection db = new clsDBconnection(); return(db.ExecNonQuery("update employees set " + employeeToUpdate + " where id = " + employeeID)); }
public int deleteEmployee(int employeeID) { clsDBconnection db = new clsDBconnection(); return(db.ExecNonQuery("delete from employees where id = " + employeeID)); }
public int insertEmployee(string employeeToInsert) { clsDBconnection db = new clsDBconnection(); return(db.ExecNonQuery("insert into employees (code, fullname, gender, lang, cityzone, type, username, [password], pic) values (" + employeeToInsert + ")")); }
public int insertSale(string saleToInsert) { clsDBconnection db = new clsDBconnection(); return(db.ExecNonQuery("insert into sales (empcommision, lastprice, saledate, house, employee) values (" + saleToInsert + ")")); }
public int insertClient(string clientToInsert) { clsDBconnection db = new clsDBconnection(); return(db.ExecNonQuery("insert into clients (fullname, phone, email, type) values (" + clientToInsert + ")")); }
public int updateClient(int clientID, string clientToUpdate) { clsDBconnection db = new clsDBconnection(); return(db.ExecNonQuery("update clients set " + clientToUpdate + " where id = " + clientID)); }
public int deleteClient(int clientID) { clsDBconnection db = new clsDBconnection(); return(db.ExecNonQuery("delete from clients where id = " + clientID)); }