Exemple #1
0
 public void Post([FromBody] RestaurantPOS_OrderedProductBillEB RestaurantPOS_BillingInfoTA)
 {
     if (ModelState.IsValid)
     {
         RestaurantPOS_OrderedProductBillEBRepository.Add(RestaurantPOS_BillingInfoTA);
     }
 }
Exemple #2
0
        public void Put(int OP_ID, [FromBody] RestaurantPOS_OrderedProductBillEB RestaurantPOS_BillingInfoTA)
        {
            RestaurantPOS_BillingInfoTA.OP_ID = OP_ID;

            if (ModelState.IsValid)
            {
                RestaurantPOS_OrderedProductBillEBRepository.Update(RestaurantPOS_BillingInfoTA);
            }
        }
 public void Update(RestaurantPOS_OrderedProductBillEB RestaurantPOS_OrderedProductBillEB)
 {
     using (IDbConnection dbConnection = Connection)
     {
         string sQuery = "UPDATE RestaurantPOS_OrderedProductBillEB SET  BillID=@BillID, Dish=@Dish, Rate=@Rate, Quantity=@Quantity, Amount=@Amount, VATPer=@VATPer, VATAmount=@VATAmount,STPer=@STPer,STAmount=@STAmount,SCPer=@SCPer,SCAmount=@SCAmount,DiscountPer=@DiscountPer,DiscountAmount=@DiscountAmount,TotalAmount=@TotalAmount,Notes=@Notes"
                         + " WHERE OP_ID = @OP_ID";
         dbConnection.Open();
         dbConnection.Query(sQuery, RestaurantPOS_OrderedProductBillEB);
     }
 }
 public void Add(RestaurantPOS_OrderedProductBillEB RestaurantPOS_OrderedProductBillEB)
 {
     using (IDbConnection dbConnection = Connection)
     {
         string sQuery = " INSERT INTO RestaurantPOS_OrderedProductBillEB(BillID, Dish, Rate, Quantity, Amount, VATPer, VATAmount,STPer,STAmount, SCPer, SCAmount, DiscountPer, DiscountAmount, TotalAmount, Notes )"
                         + " VALUES(@BillID, @Dish, @Rate, @Quantity, @Amount, @VATPer, @VATAmount,@STPer,@STAmount,@SCPer,@SCAmount,@DiscountPer,@DiscountAmount,@TotalAmount,@Notes   )";
         dbConnection.Open();
         dbConnection.Query(sQuery, RestaurantPOS_OrderedProductBillEB);
     }
 }