public ActionResult DelChkListMain(int PageNumber = 1, int RowsPerPage = 5)
        {
            int skip = (RowsPerPage * (PageNumber - 1));

            if (string.IsNullOrEmpty((string)Session["DealerCode"]))
            {
                return(RedirectToAction("Login", "Home"));
            }
            dealerCode = Session["DealerCode"].ToString();

            List <DeliveryCheckListVM> lstDelChkList = (List <DeliveryCheckListVM>)Session["DelChkList"];

            if (Session["DelChkList"] == null)
            {
                lstDelChkList = MasterMethods.Get_DelChkList(dealerCode);
            }

            var _dataList = new List <DeliveryCheckListVM>();

            _dataList = lstDelChkList.Skip(skip).Take(RowsPerPage).ToList();

            ViewBag.DelChkList = lstDelChkList;

            ViewBag.Pages      = lstDelChkList.Count / RowsPerPage + 1;
            ViewBag.PageNumber = PageNumber;
            ViewBag.Records    = RowsPerPage;

            return(View(_dataList));
        }
        // GET: Master
        public ActionResult MasterSetup()
        {
            if (string.IsNullOrEmpty((string)Session["DealerCode"]))
            {
                return(RedirectToAction("NewLogin", "Home"));
            }
            dealerCode = Session["DealerCode"].ToString();
            List <AccountVM> Get_AccDesc = new List <AccountVM>();

            Get_AccDesc         = MasterMethods.Get_AccDesc(dealerCode);
            ViewBag.Get_AccDesc = Get_AccDesc;
            return(View());
        }
        public JsonResult Select_LocationDetail()
        {
            string data   = "";
            bool   result = false;

            data = MasterMethods.Get_LocationDetail(Session["DealerCode"].ToString());

            if (!string.IsNullOrEmpty(data))
            {
                result = true;
            }

            return(Json(new { Success = result, Response = data }, JsonRequestBehavior.AllowGet));
        }
        public JsonResult Insert_AccountMapping(AccountTransactionVM objects)
        {
            bool result = false;

            string msg = "Failed to save record..";

            result = MasterMethods.Insert_AccountCOdeSetup(objects);

            if (result)
            {
                msg = "Successfully Added";
            }

            return(Json(new { Success = result, Message = msg }, JsonRequestBehavior.AllowGet));
        }
        public JsonResult Insert_Commision(CommisionVM objects)
        {
            bool result = false;

            string msg = "Failed to save record..";

            result = MasterMethods.Insert_Commision(objects, ref msg);

            if (result)
            {
                msg = "Successfully Added";
            }

            return(Json(new { Success = result, Message = msg }, JsonRequestBehavior.AllowGet));
        }
        public JsonResult Insert_DocumentType(DocumentCheckList objects)
        {
            bool result = false;

            string msg = "Failed to save record..";

            result = MasterMethods.Insert_DocumentType(objects);

            if (result)
            {
                msg = "Successfully Added";
            }

            return(Json(new { Success = result, Message = msg }, JsonRequestBehavior.AllowGet));
        }
        public JsonResult Delete_VehicleType(string table, string Column, string ColumnCode, string DealerCode)
        {
            bool result = false;

            string msg = "Failed to Delete record..";

            result = MasterMethods.Delete_VehicleType(table, Column, ColumnCode, DealerCode);

            if (result)
            {
                msg = "Successfully Deleted";
            }

            return(Json(new { Success = result, Message = msg }, JsonRequestBehavior.AllowGet));
        }