public async Task <bool> StoreNewPaymentBillingAsync(int CustomerId, PaymentBilling PaymentBilling) { PaymentBilling.CustomerId = CustomerId; _context.PaymentBillings.Add(PaymentBilling); return((await _context.SaveChangesAsync()) > 0); }
public async Task <bool> DeletePaymentBilling(PaymentBilling PaymentBilling) { using (IDbConnection con = this.GetConnection()) { await con.ExecuteAsync(sql : "spCMPaymentBillingDelete", new { PaymentBilling.Id }, commandType : CommandType.StoredProcedure); } return(true); }
public async Task <bool> UpdatePaymentBillingAsync(int CustomerId, PaymentBilling PaymentBilling) { using (IDbConnection con = this.GetConnection()) { await con.ExecuteAsync(sql : "spCMPaymentBillingUpdate", new { PaymentBilling.Id, PaymentBilling.CustomerId, PaymentBilling.PrefferedMethod, PaymentBilling.Terms, PaymentBilling.OpeningBalance }, commandType : CommandType.StoredProcedure); } return(true); }
public async Task <bool> StoreNewPaymentBillingAsync(int CustomerId, PaymentBilling PaymentBilling) { using (IDbConnection con = this.GetConnection()) { var result = await con.QueryAsync <PaymentBilling>(sql : "spCMPaymentBillingInsert", new { PaymentBilling.CustomerId, PaymentBilling.PrefferedMethod, PaymentBilling.Terms, PaymentBilling.OpeningBalance }, commandType : CommandType.StoredProcedure); PaymentBilling.Id = result.FirstOrDefault().Id; } return(true); }
public async Task <bool> DeletePaymentBilling(PaymentBilling PaymentBilling) { _context.Remove(PaymentBilling); return((await _context.SaveChangesAsync()) > 0); }
public async Task <bool> UpdatePaymentBillingAsync(int CustomerId, PaymentBilling PaymentBilling) { PaymentBilling.CustomerId = CustomerId; return((await _context.SaveChangesAsync()) > 0); }