コード例 #1
0
        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));
        }
コード例 #2
0
        // 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());
        }
コード例 #3
0
        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));
        }
コード例 #4
0
        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));
        }
コード例 #5
0
        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));
        }
コード例 #6
0
        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));
        }
コード例 #7
0
        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));
        }