コード例 #1
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));
        }
コード例 #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;
            if (ts.UserTypeId == 6)
            {
                model.DistributorID = ts.LoginTypeId;
            }


            model.AgentCLApprovedListExport = agentCLApprovedProvider.GetAgentCLApprovedList(model.FromDate, model.ToDate, model.UserID, model.DistributorID, model.AgentId);
            model.UsersOption = new SelectList(agentCLApprovedProvider.GetDistributorUsers(model.DistributorID), "AppUserId", "FullName");
            model.AgentOption = new SelectList(agentCLApprovedProvider.GetAgentsByDistributorId(model.DistributorID ?? 0), "AgentId", "AgentName", model.AgentId);
            return(View(model));
        }