public void Post([FromBody] RestaurantPOS_BillingInfoOnlineorder RestaurantPOS_BillingInfoOnlineorder) { if (ModelState.IsValid) { RestaurantPOS_BillingInfoOnlineorderRepository.Add(RestaurantPOS_BillingInfoOnlineorder); } }
public void Put(int id, [FromBody] RestaurantPOS_BillingInfoOnlineorder RestaurantPOS_BillingInfoOnlineor) { RestaurantPOS_BillingInfoOnlineor.Id = id; if (ModelState.IsValid) { RestaurantPOS_BillingInfoOnlineorderRepository.Update(RestaurantPOS_BillingInfoOnlineor); } }
public void Update(RestaurantPOS_BillingInfoOnlineorder RestaurantPOS_BillingInfoOnlineorder) { using (IDbConnection dbConnection = Connection) { string sQuery = "UPDATE RestaurantPOS_BillingInfoOnlineorder SET BillNo=@BillNo, BillDate=@BillDate, SubTotal=@SubTotal,TADiscountPer=@TADiscountPer,ParcelCharges=@ParcelCharges, GrandTotal=@GrandTotal, Cash=@Cash, Change=@Change, Operator=@Operator,PaymentMode=@PaymentMode,BillNote=@BillNote,ExchangeRate=@ExchangeRate,CurrencyCode=@CurrencyCode,DiscountReason=@DiscountReason,Member_ID=@Member_ID" + " WHERE Id = @Id"; dbConnection.Open(); dbConnection.Query(sQuery, RestaurantPOS_BillingInfoOnlineorder); } }
public void Add(RestaurantPOS_BillingInfoOnlineorder RestaurantPOS_BillingInfoOnlineorder) { using (IDbConnection dbConnection = Connection) { string sQuery = "INSERT INTO RestaurantPOS_BillingInfoOnlineorder( BillNo, BillDate, SubTotal,TADiscountPer,ParcelCharges, GrandTotal, Cash, Change, Operator,PaymentMode,BillNote,ExchangeRate,CurrencyCode,DiscountReason,Member_ID )" + " VALUES( @BillNo, @BillDate,@SubTotal, @TADiscountPer,@ParcelCharges, @GrandTotal, @Cash, @Change, @Operator,@PaymentMode,@BillNote,@ExchangeRate,@CurrencyCode,@DiscountReason,@Member_ID )"; dbConnection.Open(); dbConnection.Query(sQuery, RestaurantPOS_BillingInfoOnlineorder); } }