Пример #1
0
        public ActionResult Index(int page = 1, int platform = 0)
        {
            LoadPlatform();

            Models.ViewModelAppVersion response_model = new Models.ViewModelAppVersion();
            response_model.page     = page;
            response_model.platform = platform;

            //获取每页大小的Cookie
            response_model.page_size = TypeHelper.ObjectToInt(WebHelper.GetCookie(WorkContext.PageKeyCookie), SiteKey.AdminDefaultPageSize);

            List <BLL.FilterSearch> filters = new List <BLL.FilterSearch>();

            if (platform != 0)
            {
                filters.Add(new BLL.FilterSearch("Platforms", platform.ToString(), BLL.FilterSearchContract.等于));
            }
            int total = 0;

            BLL.BaseBLL <Entity.AppVersion> bll  = new BLL.BaseBLL <Entity.AppVersion>();
            List <Entity.AppVersion>        list = bll.GetPagedList(page, response_model.page_size, ref total, filters, "AddTime desc");

            response_model.DataList   = list;
            response_model.total      = total;
            response_model.total_page = CalculatePage(total, response_model.page_size);
            return(View(response_model));
        }
Пример #2
0
        public ActionResult Index(int page = 1, string word = "")
        {
            word = WebHelper.UrlDecode(word);
            Models.ViewModelSysRoleList response_model = new Models.ViewModelSysRoleList();
            response_model.page = page;
            response_model.word = word;
            //获取每页大小的Cookie
            response_model.page_size = TypeHelper.ObjectToInt(WebHelper.GetCookie(WorkContext.PageKeyCookie), SiteKey.AdminDefaultPageSize);

            int total = 0;

            List <BLL.FilterSearch> filter = new List <BLL.FilterSearch>();

            if (!string.IsNullOrWhiteSpace(word))
            {
                filter.Add(new BLL.FilterSearch("RoleName", word, BLL.FilterSearchContract.like));
            }


            BLL.BaseBLL <Entity.SysRole> bll = new BLL.BaseBLL <Entity.SysRole>();
            var list = bll.GetPagedList(page, response_model.page_size, ref total, filter, "AddTime desc");

            response_model.DataList   = list;
            response_model.total      = total;
            response_model.total_page = CalculatePage(total, response_model.page_size);
            return(View(response_model));
        }
Пример #3
0
        public ActionResult Index(int page = 1, string word = "", int type = 0)
        {
            LoadType();

            word = WebHelper.UrlDecode(word);
            Models.ViewModelSysDbBack response_model = new Models.ViewModelSysDbBack();
            response_model.page = page;
            response_model.word = word;
            response_model.type = type;
            //获取每页大小的Cookie
            response_model.page_size = TypeHelper.ObjectToInt(WebHelper.GetCookie(WorkContext.PageKeyCookie), SiteKey.AdminDefaultPageSize);

            List <BLL.FilterSearch> filters = new List <BLL.FilterSearch>();

            if (type != 0)
            {
                filters.Add(new BLL.FilterSearch("BackType", type.ToString(), BLL.FilterSearchContract.等于));
            }
            if (!string.IsNullOrWhiteSpace(word))
            {
                filters.Add(new BLL.FilterSearch("DbName", word, BLL.FilterSearchContract.like));
                filters.Add(new BLL.FilterSearch("BackName", word, BLL.FilterSearchContract.like));
            }
            int total = 0;

            BLL.BaseBLL <Entity.SysDbBack> bll  = new BLL.BaseBLL <Entity.SysDbBack>();
            List <Entity.SysDbBack>        list = bll.GetPagedList(page, response_model.page_size, ref total, filters, "AddTime desc");

            response_model.DataList   = list;
            response_model.total      = total;
            response_model.total_page = CalculatePage(total, response_model.page_size);
            return(View(response_model));
        }
Пример #4
0
        public ActionResult LogMethod(int page = 1, int type = 0, string word = "")
        {
            List <SelectListItem> typeList = new List <SelectListItem>();

            typeList.Add(new SelectListItem()
            {
                Text = "所有日志", Value = "0"
            });
            foreach (var item in EnumHelper.BEnumToDictionary(typeof(Entity.SysLogMethodType)))
            {
                string text = EnumHelper.GetDescription <Entity.SysLogMethodType>((Entity.SysLogMethodType)item.Key);
                typeList.Add(new SelectListItem()
                {
                    Text = text, Value = item.Key.ToString()
                });
            }
            ViewData["LogMethod_Type"] = typeList;


            word = WebHelper.UrlDecode(word);
            Models.ViewModelLogMethod response_model = new Models.ViewModelLogMethod();
            response_model.page = page;
            response_model.word = word;
            //获取每页大小的Cookie
            response_model.page_size = TypeHelper.ObjectToInt(WebHelper.GetCookie("logmethodindex"), SiteKey.AdminDefaultPageSize);

            int total = 0;

            List <BLL.FilterSearch> filter = new List <BLL.FilterSearch>();

            if (type != 0)
            {
                filter.Add(new BLL.FilterSearch("Type", type.ToString(), BLL.FilterSearchContract.等于));
            }
            if (!string.IsNullOrWhiteSpace(word))
            {
                filter.Add(new BLL.FilterSearch("Detail", word, BLL.FilterSearchContract.like));
            }


            BLL.BaseBLL <Entity.SysLogMethod> bll = new BLL.BaseBLL <Entity.SysLogMethod>();
            var list = bll.GetPagedList(page, response_model.page_size, ref total, filter, "AddTime desc", "SysUser");

            response_model.DataList   = list;
            response_model.total      = total;
            response_model.total_page = CalculatePage(total, response_model.page_size);
            return(View(response_model));
        }