public double getDevicePrice(string name) { devicesStoreDB = new DevicesStoreDB(); devicesStore = new DevicesStore(); devicesStore.setName(name); devicesStoreDB.selectPrice(devicesStore); return(devicesStore.getPrice()); }
public void update(DevicesStore devicesStore) { connection.open(); command = new SqlCommand("update EquipsStore set name='" + devicesStore.getName() + "',price='" + devicesStore.getPrice() + "',quantity='" + devicesStore.getQuantity() + "' ,total='" + devicesStore.getTotal() + "' where ID='" + devicesStore.getID() + "'", connection.getConnection()); command.ExecuteNonQuery(); connection.close(); }
public void insert(DevicesStore devicesStore) { connection.open(); command = new SqlCommand("insert into EquipsStore values('" + devicesStore.getName() + "' , '" + devicesStore.getPrice() + "' , '" + devicesStore.getQuantity() + "','" + devicesStore.getTotal() + "')", connection.getConnection()); command.ExecuteNonQuery(); connection.close(); }