public void insert(LocationEquips locationEquips)
 {
     connection.open();
     command = new SqlCommand("insert into LocationEquips values('" + locationEquips.getTotal() + "' , '" + locationEquips.getLocationID() + "')", connection.getConnection());
     command.ExecuteNonQuery();
     connection.close();
 }
 public void updateTotal(LocationEquips locationEquips)
 {
     connection.open();
     command = new SqlCommand("update LocationEquips set total='" + locationEquips.getTotal() + "' where locationID='" + locationEquips.getLocationID() + "'", connection.getConnection());
     command.ExecuteNonQuery();
     connection.close();
 }
Beispiel #3
0
    public double getTotal(string locationName)
    {
        locationControl  = new LocationControl();
        locationEquips   = new LocationEquips();
        locationEquipsDB = new LocationEquipsDB();
        int ID = locationControl.getID(locationName);

        locationEquips.setLocationID(ID);
        locationEquipsDB.getTotal(locationEquips);
        return(locationEquips.getTotal());
    }