コード例 #1
0
 public void Post([FromBody] RestaurantPOS_BillingInfoHD RestaurantPOS_BillingInfoHD)
 {
     if (ModelState.IsValid)
     {
         RestaurantPOS_BillingInfoHDRepository.Add(RestaurantPOS_BillingInfoHD);
     }
 }
コード例 #2
0
        public void Put(int Id, [FromBody] RestaurantPOS_BillingInfoHD RestaurantPOS_BillingInfoHD)
        {
            RestaurantPOS_BillingInfoHD.Id = Id;

            if (ModelState.IsValid)
            {
                RestaurantPOS_BillingInfoHDRepository.Update(RestaurantPOS_BillingInfoHD);
            }
        }
 public void Update(RestaurantPOS_BillingInfoHD RestaurantPOS_BillingInfoHD)
 {
     using (IDbConnection dbConnection = Connection)
     {
         string sQuery = " UPDATE RestaurantPOS_BillingInfoHD SET  BillNo=@BillNo, BillDate=@BillDate,Operator=@Operator, HDDiscountPer=@HDDiscountPer,SubTotal=@SubTotal,HomeDeliveryCharges=@HomeDeliveryCharges, GrandTotal=@GrandTotal,CustomerName=@CustomerName, ContactNo=@ContactNo,Address=@Address ,Employee_ID=@Employee_ID, PaymentMode=@PaymentMode,BillNote=@BillNote,DiscountReason=@DiscountReason,Member_ID =@Member_ID"
                         + " WHERE ID = @ID";
         dbConnection.Open();
         dbConnection.Query(sQuery, RestaurantPOS_BillingInfoHD);
     }
 }
 public void Add(RestaurantPOS_BillingInfoHD RestaurantPOS_BillingInfoHD)
 {
     using (IDbConnection dbConnection = Connection)
     {
         string sQuery = "INSERT INTO  RestaurantPOS_BillingInfoHD(BillNo, BillDate, Operator, HDDiscountPer, SubTotal, HomeDeliveryCharges, GrandTotal, CustomerName, ContactNo, Address, Employee_ID, PaymentMode, BillNote, DiscountReason, Member_ID)"
                         + " VALUES( @BillNo, @BillDate,@Operator, @HDDiscountPer,@SubTotal,@HomeDeliveryCharges, @GrandTotal,@CustomerName, @ContactNo,@Address ,@Employee_ID, @PaymentMode,@BillNote,@DiscountReason,@Member_ID )";
         dbConnection.Open();
         dbConnection.Execute(sQuery, RestaurantPOS_BillingInfoHD);
     }
 }