public bool UpdateOnlySalesPayment(SalesPaymentModel salesPaymentModel) { bool status = true; SaleRepository repo = new SaleRepository(); status = repo.UpdateOnlySalesPayment(ParserAddSalesPayment(salesPaymentModel)); return(status); }
private SalesPayment ParserAddSalesPayment(SalesPaymentModel mSalesPayment) { SalesPayment eSalesPayment = new SalesPayment(); if (mSalesPayment != null) { eSalesPayment.iPaymentID = mSalesPayment.iPaymentID; eSalesPayment.iSaleID = mSalesPayment.iSaleID; eSalesPayment.iCustomerID = mSalesPayment.iCustomerID; eSalesPayment.strPaymentDate = mSalesPayment.strPaymentDate; eSalesPayment.dmlPaidAmount = mSalesPayment.dmlPaidAmount; eSalesPayment.dmlPrevBalance = mSalesPayment.dmlPrevBalance; eSalesPayment.ysnPaymentStatus = mSalesPayment.ysnPaymentStatus; eSalesPayment.dtPaymentDate = mSalesPayment.dtPaymentDate; eSalesPayment.iSalesInvoiceID = mSalesPayment.iSalesInvoiceID; eSalesPayment.strSalesInvoiceNo = mSalesPayment.strSalesInvoiceNo; eSalesPayment.iPaymentReceiptNo = mSalesPayment.iPaymentReceiptNo; eSalesPayment.strPaymentReceiptNo = mSalesPayment.strPaymentReceiptNo; } return(eSalesPayment); }
public ActionResult UpdateOnlySalesPayment(SalesPaymentModel salesPayment) { bool status = false; try { if (ModelState.IsValid) { SaleServiceClient saleServiceClient = new SaleServiceClient(); status = saleServiceClient.UpdateOnlySalesPayment(salesPayment); } // return RedirectToAction("GetPurchaseList", "TPurchase"); } catch (Exception e) { ModelState.AddModelError("error", "Something Went Wrong"); status = false; throw e; } return(Json(new { status = true }, JsonRequestBehavior.AllowGet)); //return new JsonResult { Data = new { status = status ,purID=purchase.PurchaseID} }; }
public bool SaveSalesData(SaleModel sale, List <SalesVehicleModel> saleVehicles, SalesPaymentModel salesPaymentModel) { bool status = true; SaleRepository repo = new SaleRepository(); status = repo.SaveRepository(ParserAddSale(sale), ParserAddSalesVehicle(saleVehicles), ParserAddSalesPayment(salesPaymentModel)); return(status); }