public void getTotal(LocationEquips locationEquips)
 {
     connection.open();
     command = new SqlCommand("select total from LocationEquips where locationID = '" + locationEquips.getLocationID() + "'", connection.getConnection());
     locationEquips.setTotal((double)command.ExecuteScalar());
     connection.close();
 }
Exemplo n.º 2
0
    public void update(double total, string locationName)
    {
        locationControl  = new LocationControl();
        locationEquips   = new LocationEquips();
        locationEquipsDB = new LocationEquipsDB();
        int ID = locationControl.getID(locationName);

        locationEquips.setLocationID(ID);
        locationEquips.setTotal(total);
        locationEquipsDB.updateTotal(locationEquips);
    }