Beispiel #1
0
        public ActionResult ShopEditor()
        {
            UserResBody currResBody = new UserResBody();

            foreach (UserResBody item in base._userResBody)
            {
                if (item.res_path.Equals("0,1,101,199,"))
                {
                    currResBody = item;
                    break;
                }
            }

            ViewData["currResBody"] = currResBody;//当前菜单
            string position = "";

            ViewData["pageTitle"] = base.FormatPageTile(currResBody, ref position);
            ViewData["position"]  = position;//页面位置

            int      shopid = DoRequest.GetQueryInt("shopid");
            ShopInfo shop   = null;

            if (shopid == 0)
            {
                shop = new ShopInfo();
            }
            else
            {
                shop = GetShopDetail.Do(shopid).Body;
            }
            ViewData["shop"] = shop;

            return(View());
        }
Beispiel #2
0
        public ActionResult List()
        {
            UserResBody currResBody = new UserResBody();

            foreach (UserResBody item in base._userResBody)
            {
                if (item.res_path.Equals("0,1,105,144,202,"))
                {
                    currResBody = item;
                    break;
                }
            }

            HasPermission(currResBody.res_id);

            ViewData["currResBody"] = currResBody;//当前菜单
            string position = "";

            ViewData["pageTitle"] = base.FormatPageTile(currResBody, ref position);
            ViewData["position"]  = position;//页面位置

            int    pagesize  = 30;
            int    posId     = DoRequest.GetQueryInt("posid", -1);
            int    pageindex = DoRequest.GetQueryInt("page", 1);
            string q         = DoRequest.GetQueryString("q");
            int    useplat   = DoRequest.GetQueryInt("useplat");

            int dataCount = 0;
            int pageCount = 0;
            List <RecommendPositionList> infoList = null;
            var resp = QueryRecommendPositionList.Do(pagesize, pageindex
                                                     , posId, useplat
                                                     , q
                                                     , ref dataCount, ref pageCount);

            if (resp == null || resp.Body == null)
            {
                infoList = new List <RecommendPositionList>();
            }
            else
            {
                infoList = resp.Body.recommend_list;
            }
            ViewData["infoList"] = infoList;

            System.Text.StringBuilder currPageUrl = new System.Text.StringBuilder();//拼接当前页面URL
            currPageUrl.Append("/mpolymeric/list?");
            currPageUrl.Append("&posid=" + posId);
            currPageUrl.Append("&q=" + q);
            currPageUrl.Append("&page=" + pageindex);
            currPageUrl.Append("&useplat=" + useplat);
            ViewData["currPageUrl"]    = currPageUrl;//当前页面的URL
            ViewData["pagesize"]       = pagesize;
            ViewData["pageindex"]      = pageindex;
            ViewData["dataCount"]      = dataCount;
            ViewData["pageIndexLink"]  = this.FormatPageIndex(dataCount, pagesize, pageindex, currPageUrl.ToString());
            ViewData["pageIndexLink2"] = this.FormatPageIndex(dataCount, pagesize, pageindex, currPageUrl.ToString());

            return(View());
        }
Beispiel #3
0
        public ActionResult List()
        {
            UserResBody currResBody = new UserResBody();

            foreach (UserResBody item in base._userResBody)
            {
                if (item.res_path.Equals("0,1,104,226,227,"))
                {
                    currResBody = item;
                    break;
                }
            }

            HasPermission(currResBody.res_id);
            ViewData["currResBody"] = currResBody;//当前菜单
            string position = "";

            ViewData["pageTitle"] = base.FormatPageTile(currResBody, ref position);
            ViewData["position"]  = position;//页面位置

            int pagesize  = DoRequest.GetQueryInt("size", 100);
            int pageindex = DoRequest.GetQueryInt("page", 1);
            int classid   = DoRequest.GetQueryInt("classid", -1);

            string q    = DoRequest.GetQueryString("q");
            string sKey = q;

            #region 文章列表
            int dataCount = 0;
            int pageCount = 0;
            List <ShortArticleInfo> _table = new List <ShortArticleInfo>();
            var res = QueryArticleList.Do(pagesize, pageindex
                                          , classid
                                          , sKey, ref dataCount, ref pageCount);
            if (res != null && res.Body != null && res.Body.article_list != null)
            {
                _table = res.Body.article_list;
            }
            ViewData["infoList"] = _table;                                           //文章列表

            System.Text.StringBuilder currPageUrl = new System.Text.StringBuilder(); //拼接当前页面URL
            currPageUrl.Append("/marticle/list?");
            currPageUrl.Append("&size=" + pagesize);
            currPageUrl.Append("&classid=" + classid);

            currPageUrl.Append("&q=" + DoRequest.UrlEncode(q));
            currPageUrl.Append("&page=" + pageindex);
            ViewData["currPageUrl"] = currPageUrl;//当前页面的URL
            ViewData["pagesize"]    = pagesize;
            ViewData["pageindex"]   = pageindex;
            ViewData["dataCount"]   = dataCount;

            ViewData["pageIndexLink"]  = this.FormatPageIndex(dataCount, pagesize, pageindex, currPageUrl.ToString());
            ViewData["pageIndexLink2"] = this.FormatPageIndex(dataCount, pagesize, pageindex, currPageUrl.ToString());
            #endregion

            return(View());
        }
        public ActionResult ShopList()
        {
            UserResBody currResBody = new UserResBody();

            foreach (UserResBody item in base._userResBody)
            {
                if (item.res_path.Equals("0,1,107,119,123,"))
                {
                    currResBody = item;
                    break;
                }
            }

            HasPermission(currResBody.res_id);

            ViewData["currResBody"] = currResBody;//当前菜单
            string position = "";

            ViewData["pageTitle"] = base.FormatPageTile(currResBody, ref position);
            ViewData["position"]  = position;//页面位置

            int    pagesize  = DoRequest.GetQueryInt("size", 60);
            int    pageindex = DoRequest.GetQueryInt("page", 1);
            string q         = DoRequest.GetQueryString("q");
            int    dataCount = 0;
            int    pageCount = 0;
            List <ShortShopInfo> infoList = null;
            var resp = QueryShopList.Do(pagesize, pageindex, q, ref dataCount, ref pageCount);

            if (resp == null || resp.Body == null || resp.Body.shop_list == null)
            {
                infoList = new List <ShortShopInfo>();
            }
            else
            {
                infoList = resp.Body.shop_list;
            }

            ViewData["infoList"] = infoList;                                         //数据列表

            System.Text.StringBuilder currPageUrl = new System.Text.StringBuilder(); //拼接当前页面URL
            currPageUrl.Append("/musers/shoplist?");
            currPageUrl.Append("&size=" + pagesize);
            currPageUrl.Append("&page=" + pageindex);
            currPageUrl.Append("&q=" + DoRequest.UrlEncode(q));
            ViewData["currPageUrl"] = currPageUrl;//当前页面的URL
            ViewData["pagesize"]    = pagesize;
            ViewData["pageindex"]   = pageindex;
            ViewData["dataCount"]   = dataCount;

            ViewData["pageIndexLink"]  = this.FormatPageIndex(dataCount, pagesize, pageindex, currPageUrl.ToString());
            ViewData["pageIndexLink2"] = this.FormatPageIndex(dataCount, pagesize, pageindex, currPageUrl.ToString());

            return(View());
        }
        public ActionResult TypeList()
        {
            UserResBody currResBody = new UserResBody();

            foreach (UserResBody item in base._userResBody)
            {
                if (item.res_path.Equals("0,1,611,612,613,"))
                {
                    currResBody = item;
                    break;
                }
            }
            HasPermission(currResBody.res_id);

            ViewData["currResBody"] = currResBody;//当前菜单
            string position = "";

            ViewData["pageTitle"] = base.FormatPageTile(currResBody, ref position);
            ViewData["position"]  = position;//页面位置
            int insurancetype = DoRequest.GetQueryInt("insurancetype", 0);
            int pagesize      = DoRequest.GetQueryInt("size", 4);
            int pageindex     = DoRequest.GetQueryInt("page", 1);

            //string q = DoRequest.GetQueryString("q");
            //string sKey = q;

            #region 商保列表
            int dataCount = 0;
            int pageCount = 0;
            List <InsurancetypeInfo> _table = new List <InsurancetypeInfo>();
            var res = QueryInsuranceTypeList.Do(pagesize, pageindex, insurancetype, ref dataCount, ref pageCount);
            if (res != null && res.Body != null && res.Body.insusertype_list != null)
            {
                _table = res.Body.insusertype_list;
            }
            ViewData["infoList"] = _table;                                           //商保用户类别列表

            System.Text.StringBuilder currPageUrl = new System.Text.StringBuilder(); //拼接当前页面URL
            currPageUrl.Append("/minsurance/Typelist?");
            currPageUrl.Append("insurance_id=" + insurancetype);
            currPageUrl.Append("&size=" + pagesize);
            currPageUrl.Append("&page=" + pageindex);
            ViewData["currPageUrl"] = currPageUrl;//当前页面的URL
            ViewData["pagesize"]    = pagesize;
            ViewData["pageindex"]   = pageindex;
            ViewData["dataCount"]   = dataCount;

            ViewData["pageIndexLink"]  = this.FormatPageIndex(dataCount, pagesize, pageindex, currPageUrl.ToString());
            ViewData["pageIndexLink2"] = this.FormatPageIndex(dataCount, pagesize, pageindex, currPageUrl.ToString());
            #endregion

            return(View());
        }
        public ActionResult Editor()
        {
            UserResBody currResBody = new UserResBody();

            foreach (UserResBody item in base._userResBody)
            {
                if (item.res_path.Equals("0,1,107,118,121,"))
                {
                    currResBody = item;
                    break;
                }
            }

            HasPermission(currResBody.res_id);

            ViewData["currResBody"] = currResBody;//当前菜单
            string position = "";

            ViewData["pageTitle"] = base.FormatPageTile(currResBody, ref position);
            ViewData["position"]  = position;//页面位置

            int      userid = DoRequest.GetQueryInt("uid");
            UserInfo user   = null;

            if (userid == 0)
            {
                user = new UserInfo();
            }
            else
            {
                user = new UserInfo();
                var resuser = GetUserDetail.Do(userid);
                if (resuser != null && resuser.Body != null)
                {
                    user = resuser.Body;
                }
            }
            ViewData["userinfo"] = user;

            return(View());
        }
Beispiel #7
0
        /*
         * public ActionResult Add()
         * {
         *  UserResBody currResBody = new UserResBody();
         *  foreach (UserResBody item in base._userResBody)
         *  {
         *      if (item.res_path.Equals("0,1,101,192,"))
         *      {
         *          currResBody = item;
         *          break;
         *      }
         *  }
         *
         *  ViewData["currResBody"] = currResBody;//当前菜单
         *  string position = "";
         *  ViewData["pageTitle"] = base.FormatPageTile(currResBody, ref position);
         *  ViewData["position"] = position;//页面位置
         *
         *  return View();
         * }
         * */
        #endregion

        #region Items
        public ActionResult Items()
        {
            UserResBody currResBody = new UserResBody();

            foreach (UserResBody item in base._userResBody)
            {
                if (item.res_path.Equals("0,1,105,144,202,"))
                {
                    currResBody = item;
                    break;
                }
            }

            HasPermission(currResBody.res_id);

            ViewData["currResBody"] = currResBody;//当前菜单
            string position = "";

            ViewData["pageTitle"] = base.FormatPageTile(currResBody, ref position);
            ViewData["position"]  = position;//页面位置

            int    posId = DoRequest.GetQueryInt("posid");
            string q     = DoRequest.GetQueryString("q");

            List <RecommendListInfo> infoList = null;
            var resp = GetRecommendItemByRpId.Do(posId);

            if (resp == null || resp.Body == null)
            {
                infoList = new List <RecommendListInfo>();
            }
            else
            {
                infoList = resp.Body.item_list;
            }

            ViewData["infoList"] = infoList;

            return(View());
        }
        public ActionResult UserList()
        {
            UserResBody currResBody = new UserResBody();

            foreach (UserResBody item in base._userResBody)
            {
                if (item.res_path.Equals("0,1,107,118,121,"))
                {
                    currResBody = item;
                    break;
                }
            }

            HasPermission(currResBody.res_id);

            ViewData["currResBody"] = currResBody;//当前菜单
            string position = "";

            ViewData["pageTitle"] = base.FormatPageTile(currResBody, ref position);
            ViewData["position"]  = position;//页面位置

            int                  pagesize  = DoRequest.GetQueryInt("size", 60);
            int                  pageindex = DoRequest.GetQueryInt("page", 1);
            string               q         = DoRequest.GetQueryString("q");
            int                  state     = DoRequest.GetQueryInt("state", -1);
            int                  usertype  = DoRequest.GetQueryInt("usertype", -1);
            DateTime             date      = DateTime.Now.AddYears(-3);
            DateTime             sDate     = DoRequest.GetQueryDate("sDate", date);
            DateTime             eDate     = DoRequest.GetQueryDate("eDate", DateTime.Now);
            int                  dataCount = 0;
            int                  pageCount = 0;
            List <ShortUserInfo> infoList  = new List <ShortUserInfo>();
            DoCache              cache     = new DoCache();
            string               cachekey  = "user-QueryUserListindex=" + pageindex + "state=" + state + "type=" + usertype + "sdate=" + sDate.ToString("yyyy-MM-dd") + "edate=" + eDate.ToString("yyyy-MM-dd") + "q=" + q;

            if (cache.GetCache(cachekey) == null)
            {
                var resp = QueryUserList.Do(pagesize, pageindex, state, usertype, sDate.ToString("yyyy-MM-dd 00:00:00"), eDate.ToString("yyyy-MM-dd 23:59:59"), q, ref dataCount, ref pageCount);
                if (resp != null && resp.Body != null && resp.Body.user_list != null)
                {
                    infoList = resp.Body.user_list;
                    cache.SetCache(cachekey, infoList, 300);
                    cache.SetCache("userdatacount", dataCount, 300);
                    if (infoList.Count == 0)
                    {
                        cache.RemoveCache(cachekey);
                    }
                }
            }
            else
            {
                infoList  = (List <ShortUserInfo>)cache.GetCache(cachekey);
                dataCount = (int)cache.GetCache("userdatacount");
            }

            ViewData["infoList"] = infoList;                                         //数据列表

            System.Text.StringBuilder currPageUrl = new System.Text.StringBuilder(); //拼接当前页面URL
            currPageUrl.Append("/musers/userlist?");
            currPageUrl.Append("&size=" + pagesize);
            currPageUrl.Append("&page=" + pageindex);
            currPageUrl.Append("&q=" + DoRequest.UrlEncode(q));
            currPageUrl.Append("&state=" + state);
            currPageUrl.Append("&usertype=" + usertype);
            currPageUrl.Append("&sdate=" + sDate.ToString("yyyy-MM-dd"));
            currPageUrl.Append("&edate=" + eDate.ToString("yyyy-MM-dd"));
            ViewData["currPageUrl"] = currPageUrl;//当前页面的URL
            ViewData["pagesize"]    = pagesize;
            ViewData["pageindex"]   = pageindex;
            ViewData["dataCount"]   = dataCount;

            ViewData["pageIndexLink"]  = this.FormatPageIndex(dataCount, pagesize, pageindex, currPageUrl.ToString());
            ViewData["pageIndexLink2"] = this.FormatPageIndex(dataCount, pagesize, pageindex, currPageUrl.ToString());

            return(View());
        }
Beispiel #9
0
        public ActionResult ImgRecycleList()
        {
            UserResBody currResBody = new UserResBody();

            foreach (UserResBody item in base._userResBody)
            {
                if (item.res_path.Equals("0,1,105,139,143,"))
                {
                    currResBody = item;
                    break;
                }
            }

            HasPermission(currResBody.res_id);

            ViewData["currResBody"] = currResBody;//当前菜单
            string position = "";

            ViewData["pageTitle"] = base.FormatPageTile(currResBody, ref position);
            ViewData["position"]  = position;//页面位置


            int size    = 60;
            int page    = DoRequest.GetQueryInt("page", 1);
            int classid = DoRequest.GetQueryInt("classid", 3);


            int dataCount = 0;
            int pageCount = 0;

            DateTime sDate = DoRequest.GetQueryDate("st", DateTime.Now.AddYears(-3));
            DateTime eDate = DoRequest.GetQueryDate("et", DateTime.Now);


            string q = DoRequest.GetQueryString("q");
            //bool isImage = true;
            List <SysFiles> infoList = new List <SysFiles>();
            var             res      = QuerySysFile.Do(size, page, classid, 0
                                                       , sDate.ToString()
                                                       , eDate.ToString()
                                                       , q
                                                       , ref dataCount, ref pageCount);

            if (res != null && res.Body != null && res.Body.file_list != null)
            {
                infoList = res.Body.file_list;
            }

            ViewData["infoList"] = infoList;

            #region 分页链接
            System.Text.StringBuilder currPageUrl = new System.Text.StringBuilder();//拼接当前页面URL
            currPageUrl.Append("/mspace/imgrecycleList");
            currPageUrl.Append("?classid=" + classid);
            currPageUrl.Append("&st=" + sDate);
            currPageUrl.Append("&et=" + eDate);
            currPageUrl.Append("&page=" + page);
            currPageUrl.Append("&q=" + DoRequest.UrlEncode(q));
            ViewData["currPageUrl"] = currPageUrl;//当前页面的URL
            ViewData["pagesize"]    = size;
            ViewData["pageindex"]   = page;
            ViewData["dataCount"]   = dataCount;

            ViewData["pageIndexLink"]  = this.FormatPageIndex(dataCount, size, page, currPageUrl.ToString());
            ViewData["pageIndexLink2"] = this.FormatPageIndex(dataCount, size, page, currPageUrl.ToString());
            #endregion

            return(View());
        }