Exemple #1
0
 private void AddProduct(int productID, int quantity, bool Update)
 {
     try
     {
         DataRow Item = this.Rows.Find(productID);
         Item["Quantity"] = quantity + (Update ? 0 : (int)Item["Quantity"]);
     }
     catch
     {
         String sql = "SELECT ID, Name,Product_Code, Image, Price_Sale," + quantity + " as Quantity_In FROM Product WHERE ID=@ID";
         FunctionLibrary.Fill(this, sql, "@ID", productID);
     }
 }