Пример #1
0
        public ActionResult Index(int?page, int?pageNo, int?flag, DateTime?FromDate, DateTime?ToDate, int?UserID, int?DistributorID, int?AgentId)
        {
            int currentPageIndex       = page.HasValue ? page.Value : 1;
            int defaultPageSize        = 50;
            AgentCLApprovedModel model = new AgentCLApprovedModel();
            var ts = (TravelSession)Session["TravelPortalSessionInfo"];

            if (FromDate == null)
            {
                model.FromDate = DateTime.Now.AddDays(-15);
            }
            else
            {
                model.FromDate = FromDate.Value;
            }
            if (ToDate == null)
            {
                model.ToDate = DateTime.Now;
            }
            else
            {
                model.ToDate = ToDate.Value;
            }



            model.UsersOption        = new SelectList(defaultProvider.GetUserList(), "AppUserId", "FullName");
            model.BranchOfficeOption = new SelectList(branchOfficeManagementProvider.GetAll(), "BranchOfficeId", "BranchOfficeName", model.BranchOfficeId);
            model.DistributorOption  = new SelectList(agentclaapprovedprovider.GetAllDistributorsByBranchOfficeId(model.BranchOfficeId ?? 0), "DistributorId", "DistributorName");
            model.AgentOption        = new SelectList(agentclaapprovedprovider.GetAgentsByDistributorId(model.DistributorID ?? 0), "AgentId", "AgentName", model.AgentId);
            model.AgentReceiptList   = agentReceiptsProvider.GetAgentCLApprovedList(FromDate != null ? FromDate.Value : model.FromDate, ToDate != null ? ToDate.Value : model.ToDate, model.UserID, model.DistributorID, model.AgentId).ToPagedList(currentPageIndex, defaultPageSize);
            return(View(model));
        }
Пример #2
0
        public ActionResult Index(int?pageNo, int?flag)
        {
            AgentCLApprovedModel model = new AgentCLApprovedModel();
            var ts = (TravelSession)Session["TravelPortalSessionInfo"];

            model.FromDate = DateTime.Now.AddDays(-15);
            model.ToDate   = DateTime.Now;

            model.UsersOption        = new SelectList(defaultProvider.GetUserList(), "AppUserId", "FullName");
            model.BranchOfficeOption = new SelectList(branchOfficeManagementProvider.GetAll(), "BranchOfficeId", "BranchOfficeName");
            model.DistributorOption  = new SelectList(agentCLApprovedProvider.GetAllDistributorsByBranchOfficeId(model.BranchOfficeId ?? 0), "DistributorId", "DistributorName");
            model.AgentOption        = new SelectList(agentCLApprovedProvider.GetAgentsByDistributorId(model.DistributorID ?? 0), "AgentId", "AgentName");

            model.AgentCLApprovedListExport = agentCLApprovedProvider.GetAgentCLApprovedList(model.FromDate, model.ToDate, model.UserID, model.DistributorID, model.AgentId);

            return(View(model));
        }