Ejemplo n.º 1
0
        public bool UpdateOnlySalesPayment(SalesPaymentModel salesPaymentModel)
        {
            bool status = true;

            SaleRepository repo = new SaleRepository();

            status = repo.UpdateOnlySalesPayment(ParserAddSalesPayment(salesPaymentModel));
            return(status);
        }
Ejemplo n.º 2
0
        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);
        }
Ejemplo n.º 3
0
        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} };
        }
Ejemplo n.º 4
0
        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);
        }