public void updateQuantityMinus(ClothesStore clothesStore)
 {
     connection.open();
     command = new SqlCommand("update ClothesStore set quantity=quantity-'" + clothesStore.getQuantity() + "' where name='" + clothesStore.getName() + "'", connection.getConnection());
     command.ExecuteNonQuery();
     connection.close();
 }
 public double getQuantity(string itemName)
 {
     clothesStore   = new ClothesStore();
     clothesStoreDB = new ClothesStoreDB();
     clothesStore.setName(itemName);
     clothesStoreDB.selectQuantity(clothesStore);
     return(clothesStore.getQuantity());
 }
 public bool checkItemQuantity(string itemName, double quantity)
 {
     clothesStore   = new ClothesStore();
     clothesStoreDB = new ClothesStoreDB();
     clothesStore.setName(itemName);
     clothesStoreDB.selectQuantity(clothesStore);
     if (quantity > clothesStore.getQuantity())
     {
         return(false);
     }
     else
     {
         return(true);
     }
 }
 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();
 }
 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();
 }