コード例 #1
0
        public ActionResult UpdateExportIndex(PaperDetailsExportModel expUpdateModel)
        {
            bool status = false;

            try
            {
                if (ModelState.IsValid)
                {
                    PapersServiceClient services = new PapersServiceClient();
                    status = services.UpdateExportData(expUpdateModel);
                    //return RedirectToAction("Index");
                }
            }
            catch (Exception e)
            {
                ModelState.AddModelError("error", "Something Went Wrong");
                status = false;
                throw e;
            }
            //return RedirectToAction("Index");
            //return View();
            return(new JsonResult {
                Data = new { status = status }
            });
        }
コード例 #2
0
        public JsonResult GetDeductionAmount(string strChassisNum)
        {
            dynamic amount = 0;

            try
            {
                if (ModelState.IsValid)
                {
                    PapersServiceClient service = new PapersServiceClient();
                    amount = service.GetDeductionAmount(strChassisNum);
                    //return Json(customers, JsonRequestBehavior.AllowGet);
                }
            }
            catch (Exception ex)
            {
                ModelState.AddModelError("error", "Something Went Wrong");
                amount = null;
                throw ex;
            }
            return(Json(amount, JsonRequestBehavior.AllowGet));
        }
コード例 #3
0
        public ActionResult GetAccountListData(string chassisNum)
        {
            dynamic accountList = 0;

            try
            {
                if (ModelState.IsValid)
                {
                    PapersServiceClient service = new PapersServiceClient();

                    accountList = service.GetAccountListData(chassisNum);
                }
            }
            catch (Exception ex)
            {
                ModelState.AddModelError("error", "Something Wrong");
                accountList = null;
                throw ex;
            }
            return(Json(accountList, JsonRequestBehavior.AllowGet));
        }
コード例 #4
0
        public JsonResult GetCustomerDetails(string prefix)
        {
            dynamic customers = 0;

            try
            {
                if (ModelState.IsValid)
                {
                    PapersServiceClient service = new PapersServiceClient();
                    customers = service.GetCustomerDetails(prefix);
                    //return Json(customers, JsonRequestBehavior.AllowGet);
                }
            }
            catch (Exception ex)
            {
                ModelState.AddModelError("error", "Something Went Wrong");
                customers = null;
                throw ex;
            }
            return(Json(customers, JsonRequestBehavior.AllowGet));
        }
コード例 #5
0
        public ActionResult GetImportData()
        {
            dynamic importData = 0;

            try
            {
                if (ModelState.IsValid)
                {
                    PapersServiceClient papersServiceClient = new PapersServiceClient();
                    importData = papersServiceClient.GetImportData();

                    //return Json(new { importData }, JsonRequestBehavior.AllowGet);
                }
            }

            catch (Exception e)
            {
                ModelState.AddModelError("error", "Something Wrong");
                importData = null;
                throw e;
            }
            return(Json(importData, JsonRequestBehavior.AllowGet));
        }
コード例 #6
0
        public JsonResult GetSalesVehicleByPapertype(int paperTypeID)
        {
            dynamic vehiclePaperByType = 0;

            try
            {
                if (ModelState.IsValid)
                {
                    PapersServiceClient papersServiceClient = new PapersServiceClient();
                    vehiclePaperByType = papersServiceClient.GetSalesVehicleByPapertype(paperTypeID);

                    //return Json(new { vehiclePaperByType }, JsonRequestBehavior.AllowGet);
                }
            }

            catch (Exception e)
            {
                ModelState.AddModelError("error", "Something Wrong");
                vehiclePaperByType = null;
                throw e;
            }
            return(Json(new { vehiclePaperByType }, JsonRequestBehavior.AllowGet));
        }
コード例 #7
0
        public ActionResult GetDepositListData(DateTime fromDate, DateTime toDate)
        {
            dynamic depositList = 0;

            try
            {
                if (ModelState.IsValid)
                {
                    PapersServiceClient service = new PapersServiceClient();

                    depositList = service.GetDepositListData(fromDate, toDate);
                }
            }
            catch (Exception ex)
            {
                ModelState.AddModelError("error", "Something Wrong");
                depositList = null;
                throw ex;
            }
            return(Json(depositList, JsonRequestBehavior.AllowGet));
            //return Json(null, JsonRequestBehavior.AllowGet);
            // return Json(listVehicles, JsonRequestBehavior.AllowGet);
        }
コード例 #8
0
        public ActionResult GetPartyAccountTransaction(int partyID, DateTime fromDate, DateTime toDate)
        {
            dynamic PartyAccountList = 0;

            try
            {
                if (ModelState.IsValid)
                {
                    PapersServiceClient service = new PapersServiceClient();

                    PartyAccountList = service.GetPartyAccountTransaction(partyID, fromDate, toDate);
                }
            }
            catch (Exception ex)
            {
                ModelState.AddModelError("error", "Something Wrong");
                PartyAccountList = null;
                throw ex;
            }
            return(Json(PartyAccountList, JsonRequestBehavior.AllowGet));
            //return Json(null, JsonRequestBehavior.AllowGet);
            // return Json(listVehicles, JsonRequestBehavior.AllowGet);
        }
コード例 #9
0
        public ActionResult DeleteExportPaperDetails(long id)
        {
            //int id = Convert.ToInt32(Helpers.CommonMethods.Decrypt(HttpUtility.UrlDecode(ID)));
            bool status = false;

            try
            {
                if (ModelState.IsValid)
                {
                    PapersServiceClient services = new PapersServiceClient();
                    status = services.DeleteExportPaperDetails(id);
                }
            }
            catch (Exception e)
            {
                ModelState.AddModelError("error", "Something Went Wrong!");
                status = false;
                throw e;
            }
            //return View("Index");
            return(new JsonResult {
                Data = new { status = status }
            });
        }