public ActionResult Index(int page = 1)
        {
            SysEnum.RepNormalType RepNormalType = SysEnum.Parse <SysEnum.RepNormalType>(Function.GetRequestString("RepNormalType"));
            var list = RepResearchNormalBLL.GetList(p => true);

            list = list.Where(a => a.TypeFlag == (int)RepNormalType);
            ViewBag.RepNormalType = RepNormalType;
            string   Name      = Function.GetRequestString("Name");
            DateTime DateBegin = Function.GetRequestDateTime("DateBegin");
            DateTime DateEnd   = Function.GetRequestDateTime("DateEnd");

            if (DateBegin > DicInfo.DateZone)
            {
                list = list.Where(a => DbFunctions.DiffDays(a.DateBegin, DateBegin) <= 0);
                ViewBag.TxtDateBegin = DateBegin.ToString("yyyy-MM-dd");
            }
            if (DateEnd > DicInfo.DateZone)
            {
                list = list.Where(a => DbFunctions.DiffDays(a.DateEnd, DateEnd) >= 0);
                ViewBag.TxtDateEnd = DateEnd.ToString("yyyy-MM-dd");
            }
            switch (RepNormalType)
            {
            case SysEnum.RepNormalType.集体调研:
                if (!PowerActionBLL.PowerCheck(PowerInfo.P_工作信息管理.PP常规.PPP集体调研.查看所有))
                {
                    list = list.Where(a => a.CreateUserID == CurrentUser.ID);
                }
                break;

            case SysEnum.RepNormalType.一加三:
                if (!PowerActionBLL.PowerCheck(PowerInfo.P_工作信息管理.PP常规.PPP一加三.查看所有))
                {
                    list = list.Where(a => a.CreateUserID == CurrentUser.ID);
                }
                break;

            case SysEnum.RepNormalType.蹲点:
                if (!PowerActionBLL.PowerCheck(PowerInfo.P_工作信息管理.PP常规.PPP蹲点.查看所有))
                {
                    list = list.Where(a => a.CreateUserID == CurrentUser.ID);
                }
                break;

            case SysEnum.RepNormalType.教研组织:
                if (!PowerActionBLL.PowerCheck(PowerInfo.P_工作信息管理.PP常规.PPP教研组织.查看所有))
                {
                    list = list.Where(a => a.CreateUserID == CurrentUser.ID);
                }
                break;

            default:
                break;
            }

            list = list.OrderByDescending(p => p.ID);
            IPagedList <RepResearchNormalInfo> result = list.ToPagedList(page, PageSize);

            return(View(result));
        }
 public ActionResult Create(SysEnum.RepNormalType RepNormalType)
 {
     ViewBag.listDepartment = DepartmentBLL.GetList(a => a.Enable).OrderBy(a => a.Name)
                              .Select(a => new SelectListItem()
     {
         Text = a.Name, Value = a.ID.ToString()
     }).ToList();
     ViewBag.RepNormalType = RepNormalType;
     return(View("Create" + (int)RepNormalType));
 }