public HttpResponseMessage SavePaymentDetails(CollectionPaymentAgreementModel model) { using (CollectionsTier ct = new CollectionsTier()) { if (ct.InsertPaymentAgreement(model)) return this.Request.CreateResponse(HttpStatusCode.OK); else return this.Request.CreateResponse(HttpStatusCode.NotModified); } }
/// <summary> /// /// </summary> /// <param name="model"></param> /// <returns></returns> public bool InsertPaymentAgreement(CollectionPaymentAgreementModel model) { if (new DataAccess.DataAccess().ExecuteNonQuery("AVZ_COL_spInsUpdatePaymentAgreement", new { MerchantId = model.merchantId, ContractId = model.contractId, DateOfAgreement = model.dateOfAgreement, StartDate = model.startDate, EndDate = model.endDate, IntervalofDays = model.intervalofDays, InsertUserId=model.insertUserId })) return true; else return false; }