//-------------------------------------------------------------------------------------

        #region Partial Views

        //
        // GET: /Transporter/OutstandingReport
        public ActionResult OutstandingReport(PagingModel pm, CustomSearchModel csm, bool givecsm = false)
        {
            if (givecsm)
            {
                ViewBag.ViewName = "OutstandingPallets";

                return(PartialView("_OutstandingPalletsCustomSearch", new CustomSearchModel("OutstandingPallets")));
            }

            List <OutstandingPalletsModel> model = GetOutstandingPallets(pm, csm);

            PagingExtension paging = PagingExtension.Create(model, model.Count, pm.Skip, pm.Take, pm.Page);

            return(PartialView("_OutstandingReport", paging));
        }
        //
        // GET: /Transporter/PODManagement
        public ActionResult PODManagement(PagingModel pm, CustomSearchModel csm, bool givecsm = false)
        {
            if (givecsm)
            {
                ViewBag.ViewName = "PODManagement";

                return(PartialView("_PODManagementCustomSearch", new CustomSearchModel("PODManagement")));
            }

            using (ClientLoadService service = new ClientLoadService())
            {
                List <ClientLoadCustomModel> model = service.ListOutstandingShipments(pm, csm);

                int total = (model.Count < pm.Take && pm.Skip == 0) ? model.Count : service.Total1(pm, csm);

                PagingExtension paging = PagingExtension.Create(model, total, pm.Skip, pm.Take, pm.Page);

                return(PartialView("_PODManagement", paging));
            }
        }
示例#3
0
        //
        // GET: /Finance/Billing
        public ActionResult Billing(PagingModel pm, CustomSearchModel csm, bool givecsm = false)
        {
            using (PSPBillingService bservice = new PSPBillingService())
            {
                if (givecsm)
                {
                    ViewBag.ViewName = "Billing";

                    return(PartialView("_BillingCustomSearch", new CustomSearchModel("Billing")));
                }

                List <PSPBillingCustomModel> model = bservice.List1(pm, csm);

                int total = (model.Count < pm.Take && pm.Skip == 0) ? model.Count : bservice.Total1(pm, csm);

                PagingExtension paging = PagingExtension.Create(model, total, pm.Skip, pm.Take, pm.Page);

                return(PartialView("_Billing", paging));
            }
        }
        //
        // GET: /Transporter/MyNotifications
        public ActionResult MyNotifications(PagingModel pm, CustomSearchModel csm, bool givecsm = false)
        {
            if (givecsm)
            {
                ViewBag.ViewName = "Notifications";

                return(PartialView("_MyNotificationsCustomSearch", new CustomSearchModel("MyNotifications")));
            }

            using (BroadcastService service = new BroadcastService())
            {
                csm.IncludeUserBroadCasts = true;

                List <BroadcastCustomModel> model = service.List1(pm, csm);

                int total = (model.Count < pm.Take && pm.Skip == 0) ? model.Count : service.Total1(pm, csm);

                PagingExtension paging = PagingExtension.Create(model, total, pm.Skip, pm.Take, pm.Page);

                return(PartialView("_MyNotifications", paging));
            }
        }