コード例 #1
0
 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();
 }
コード例 #2
0
 public void selectID(LocationEquips locationEquips)
 {
     connection.open();
     command = new SqlCommand("select ID from LocationEquips where locationID='" + locationEquips.getLocationID() + "'", connection.getConnection());
     locationEquips.setID((int)command.ExecuteScalar());
     connection.close();
 }
コード例 #3
0
 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();
 }
コード例 #4
0
 public void insert(LocationEquips locationEquips)
 {
     connection.open();
     command = new SqlCommand("insert into LocationEquips values('" + locationEquips.getTotal() + "' , '" + locationEquips.getLocationID() + "')", connection.getConnection());
     command.ExecuteNonQuery();
     connection.close();
 }