public void delete(LocationClothesContent locationClothesContent)
 {
     connection.open();
     command = new SqlCommand("delete from LocationClothesContent where name='" + locationClothesContent.getName() + "' and locationClothesID='" + locationClothesContent.getLocationClothesID() + "'", connection.getConnection());
     command.ExecuteNonQuery();
     connection.close();
 }
 public void insert(LocationClothesContent locationClothesContent)
 {
     connection.open();
     command = new SqlCommand("insert into LocationClothesContent values('" + locationClothesContent.getName() + "' , '" + locationClothesContent.getPrice() + "' , '" + locationClothesContent.getQuantity() + "' , '" + locationClothesContent.getTotal() + "' , '" + locationClothesContent.getLocationClothesID() + "')", connection.getConnection());
     command.ExecuteNonQuery();
     connection.close();
 }
    public bool checkIfExist(LocationClothesContent locationClothesContent)
    {
        connection.open();
        command = new SqlCommand("select count(*) from LocationClothesContent where name='" + locationClothesContent.getName() + "'", connection.getConnection());

        int count = (int)command.ExecuteScalar();

        connection.close();

        if (count > 0)
        {
            return(true); // exiting item.
        }
        else
        {
            return(false); // new item.
        }
    }
 public void updateItem(LocationClothesContent locationClothesContent)
 {
     connection.open();
     command = new SqlCommand("update LocationClothesContent set quantity='" + locationClothesContent.getQuantity() + "' , total='" + locationClothesContent.getTotal() + "' where name='" + locationClothesContent.getName() + "' and locationClothesID='" + locationClothesContent.getLocationClothesID() + "'", connection.getConnection());
     command.ExecuteNonQuery();
     connection.close();
 }