コード例 #1
0
 public void update(ClothesStore clothesStore)
 {
     connection.open();
     command = new SqlCommand("update ClothesStore set name='" + clothesStore.getName() + "',price='" + clothesStore.getPrice() + "',quantity='" + clothesStore.getQuantity() + "' ,total='" + clothesStore.getTotal() + "' where ID='" + clothesStore.getID() + "'", connection.getConnection());
     command.ExecuteNonQuery();
     connection.close();
 }
コード例 #2
0
 public void insert(ClothesStore clothesStore)
 {
     connection.open();
     command = new SqlCommand("insert into ClothesStore values('" + clothesStore.getName() + "' , '" + clothesStore.getPrice() + "' , '" + clothesStore.getQuantity() + "','" + clothesStore.getTotal() + "')", connection.getConnection());
     command.ExecuteNonQuery();
     connection.close();
 }