示例#1
0
        /// <summary>
        /// 供应商获取关注列表
        /// cxb
        /// 2015-4-14
        /// </summary>
        /// <param name="param"></param>
        /// <returns></returns>
        public PageNavigate GetNorevPage(Hashtable param)
        {
            PageNavigate pn = new PageNavigate();

            pn.TotalCount = DAL.GetCount(typeof(Tb_Gys_Cgs_Check), param);
            if (pn.TotalCount > 0)
            {
                pn.Data = Tb_Gys_Cgs_CheckDAL.QueryPageOfSupplierAttention(typeof(Tb_Gys_Cgs_Check), param);
            }
            else
            {
                pn.Data = new List <Tb_Gys_Cgs_Check_Query>();
            }
            pn.Success = true;
            return(pn);
        }
示例#2
0
文件: OrderLogBLL.cs 项目: 17/YunPos
        /// <summary>
        /// 分页获取数据
        /// znt 2015-03-31
        /// </summary>
        public override PageNavigate GetPage(Hashtable param = null)
        {
            PageNavigate pn = new PageNavigate();

            pn.TotalCount = DAL.GetCount(typeof(Ts_Sale_Order_Log), param);
            if (pn.TotalCount > 0)
            {
                pn.Data = DAL.QueryPage <Ts_Sale_Order_Log>(typeof(Ts_Sale_Order_Log), param);
            }
            else
            {
                pn.Data = new List <Ts_Sale_Order_Log>();
            }
            pn.Success = true;
            return(pn);
        }
示例#3
0
文件: CustomerBLL.cs 项目: 17/YunPos
        /// <summary>
        /// 分页查询
        /// lxt
        /// 2015-02-26
        /// </summary>
        public override PageNavigate GetPage(Hashtable param = null)
        {
            PageNavigate pn = new PageNavigate();

            pn.TotalCount = DAL.QueryCount(typeof(Tb_Gys_Cgs), param);
            if (pn.TotalCount > 0)
            {
                pn.Data = DAL.QueryPage <Tb_Gys_Cgs_Query>(typeof(Tb_Gys_Cgs), param);
            }
            else
            {
                pn.Data = new List <Tb_Gys_Cgs_Query>();
            }
            pn.Success = true;
            return(pn);
        }
示例#4
0
        public override PageNavigate GetPage(Hashtable param = null)
        {
            PageNavigate pn = new PageNavigate();

            pn.TotalCount = Tb_SpDAL.QueryCountOfService(typeof(Tb_Sp), param);
            if (pn.TotalCount > 0)
            {
                pn.Data = Tb_SpDAL.QueryPageOfService(typeof(Tb_Sp), param);
            }
            else
            {
                pn.Data = new List <Tb_Sp_Query>();
            }
            pn.Success = true;
            return(pn);
        }
示例#5
0
文件: PageList.cs 项目: 17/YunPos
 public PageList(PageNavigate pn, int pageIndex, int pageSize)
 {
     this.ItemCount = pn.TotalCount;
     this.PageSize  = pageSize > 0 ? pageSize : 1;
     //this.PageIndex = pageIndex > 0 ? pageIndex : 1;
     this.PageIndex = pageIndex > -1 ? pageIndex : 0;        //YZQ TEST
     if (pn.Data != null && (pn.Data is IList <T> || pn.Data is List <T>))
     {
         this.list = (IList <T>)pn.Data;
     }
     else
     {
         this.list = new List <T>();
     }
     this.PageCount = (int)Math.Ceiling((double)(((double)pn.TotalCount) / ((double)pageSize)));
 }
示例#6
0
        public ActionResult List()
        {
            Hashtable param = base.GetParameters();

            try
            {
                int limit = 10000;// base.PageSizeFromCookie;
                param.Add("id_masteruser", id_user_master);
                ParamVessel pv = new ParamVessel();
                pv.Add("_search_", "0", HandleType.DefaultValue);
                pv.Add("id_masteruser", string.Empty, HandleType.ReturnMsg);
                pv.Add("s_parmname", "", HandleType.Remove, true);
                pv.Add("id_shop", String.Empty, HandleType.Remove);
                pv.Add("page", 0, HandleType.DefaultValue);
                pv.Add("pageSize", limit, HandleType.DefaultValue);
                pv.Add("sort", "sort_id asc", HandleType.DefaultValue);
                param = param.Trim(pv);
                int pageIndex = Convert.ToInt32(param["page"]);
                param.Add("limit", limit);
                param.Add("start", pageIndex * limit);
                var shopList = GetShop(Enums.ShopDataType.UserShop); //GetUserShop();
                if (shopList.Any() && !param.ContainsKey("id_shop"))
                {
                    var id_shop_list = (from sl in shopList select sl.id_shop).ToArray();
                    param.Add("id_shopList", id_shop_list);
                }
                ViewData["shoplist"] = shopList;
                PageNavigate pn = new PageNavigate();
                pn = BusinessFactory.Ts_Parm_Shop.GetPage(param);
                var plist = new PageList <Ts_Parm_ShopWithShopMc>(pn, pageIndex, limit);
                plist.PageIndex  = pageIndex;
                plist.PageSize   = limit;
                ViewData["List"] = plist;
            }
            catch (Exception ex)
            {
                return(HttpNotFound());
            }
            if (param["_search_"].ToString().Equals("1"))
            {
                return(PartialView("_List"));
            }
            else
            {
                return(View());
            }
        }
示例#7
0
        public ActionResult GetPage(string obj)
        {
            PageNavigate pn = new PageNavigate();

            try
            {
                Hashtable   param = JSON.Deserialize <Hashtable>(obj);
                ParamVessel p     = new ParamVessel();
                p.Add("id_spfl", (long)0, HandleType.Remove);                                 //商品分类Id
                p.Add("id_cgs", (long)0, HandleType.Remove);                                  //客户Id
                p.Add("id_gys", GetLoginInfo <long>("id_supplier"), HandleType.DefaultValue); //客户Id
                p.Add("keyword", String.Empty, HandleType.Remove, true);                      //搜素关键字
                p.Add("pageIndex", 1, HandleType.DefaultValue);                               //当前页码
                p.Add("limit", 20, HandleType.DefaultValue);                                  //当前页码
                p.Add("sort", "gsp.rq_create", HandleType.DefaultValue);
                p.Add("dir", "desc", HandleType.DefaultValue);
                param = param.Trim(p);
                // param.Add("id_gys", GetLoginInfo<long>("id_supplier"));//供应商Id
                int pageIndex = Convert.ToInt32(param["pageIndex"]);
                if (pageIndex < 1)
                {
                    pageIndex = 1;
                }
                int limit = Convert.ToInt32(param["limit"]);
                if (limit < 1)
                {
                    limit = 20;
                }
                if (limit > 200)
                {
                    limit = 200;
                }
                param.Add("start", (pageIndex - 1) * limit);
                param.Add("flag_up", YesNoFlag.Yes);
                param.Add("baseurl", Request.Url.Scheme + "://" + Request.Url.Authority);
                pn = BusinessFactory.Goods.GetPageSkn(param);
            }
            catch (CySoftException ex)
            {
                throw ex;
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(Json(pn));
        }
示例#8
0
        /// <summary>
        /// 获取角色列表 分页
        /// </summary>
        /// <param name="param"></param>
        /// <returns></returns>
        public override PageNavigate GetPage(Hashtable param = null)
        {
            PageNavigate pn = new PageNavigate();

            pn.TotalCount = DAL.GetCount(typeof(Tb_Role), param);
            if (pn.TotalCount > 0)
            {
                var lst = DAL.QueryPage <Tb_Role_Query>(typeof(Tb_Role), param) ?? new List <Tb_Role_Query>();
                pn.Data = lst;
            }
            else
            {
                pn.Data = new List <Tb_Role_Query>();
            }
            pn.Success = true;
            return(pn);
        }
示例#9
0
        /// <summary>
        /// 分页查询客户列表
        /// lxt
        /// 2015-03-06
        /// </summary>

        public ActionResult GetPage(string obj)
        {
            PageNavigate pn = new PageNavigate();

            try
            {
                Hashtable   param = JSON.Deserialize <Hashtable>(obj);
                ParamVessel p     = new ParamVessel();
                p.Add("flag_actived", (byte)0, HandleType.Remove);       //是否开通
                p.Add("id_cgs_level", (long)0, HandleType.Remove);       //客户级别Id
                p.Add("keyword", String.Empty, HandleType.Remove, true); //搜素关键字
                p.Add("pageIndex", 1, HandleType.DefaultValue);          //当前页码
                p.Add("limit", 20, HandleType.DefaultValue);             //当前页码
                p.Add("sort", "db.rq_create", HandleType.DefaultValue);
                p.Add("dir", "desc", HandleType.DefaultValue);
                param = param.Trim(p);
                int pageIndex = Convert.ToInt32(param["pageIndex"]);
                if (pageIndex < 1)
                {
                    pageIndex = 1;
                }
                int limit = Convert.ToInt32(param["limit"]);
                if (limit < 1)
                {
                    limit = 20;
                }
                if (limit > 200)
                {
                    limit = 200;
                }
                param.Add("flag_stop", YesNoFlag.No);
                param.Add("start", (pageIndex - 1) * limit);
                param.Add("id_user_master_gys", GetLoginInfo <long>("id_user_master"));
                param.Add("not_stop", 1);
                pn = BusinessFactory.Customer.GetPage(param);
            }
            catch (CySoftException ex)
            {
                throw ex;
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(Json(pn));
        }
示例#10
0
        /// <summary>
        /// 获取分页结果集
        /// </summary>
        /// <param name="param"></param>
        /// <returns></returns>
        public PageList <Faq_Tree> GetPageData(Hashtable param)
        {
            int limit = 15;
            PageList <Faq_Tree> lst = new PageList <Faq_Tree>(limit);
            int pageIndex           = Convert.ToInt32(param["pageIndex"]);

            pageIndex = !(pageIndex > 0) ? 1 : pageIndex;
            PageNavigate pn = new PageNavigate();

            param.Add("limit", limit);
            param.Add("start", (pageIndex - 1) * limit);
            param.Add("sort", "id");
            param.Add("dir", "desc");
            pn  = BusinessFactory.Faq.QueryServicePage(param);
            lst = new PageList <Faq_Tree>(pn, pageIndex, limit);
            return(lst);
        }
示例#11
0
        public ActionResult List()
        {
            PageNavigate             pn    = new PageNavigate();
            int                      limit = base.PageSizeFromCookie;
            PageList <Tb_Role_Query> list  = new PageList <Tb_Role_Query>(limit);
            Hashtable                param = GetParameters();

            try
            {
                ParamVessel p = new ParamVessel();
                p.Add("s_role", String.Empty, HandleType.Remove, true);
                p.Add("companyname", String.Empty, HandleType.Remove, true);
                p.Add("rq_start_reg", DateTime.Now, HandleType.Remove); //排序
                p.Add("rq_end_reg", DateTime.Now, HandleType.Remove);   //排序
                p.Add("page", 0, HandleType.DefaultValue);              //当前页码
                p.Add("sort", "id", HandleType.DefaultValue);
                p.Add("dir", "asc", HandleType.DefaultValue);
                p.Add("_search_", "0", HandleType.DefaultValue);
                param = param.Trim(p);
                param.Add("id_masteruser", "0");

                int pageIndex = Convert.ToInt32(param["page"]);
                ViewData["pageindex"] = pageIndex;
                ViewData["sort"]      = param["sort"];
                ViewData["dir"]       = param["dir"];
                ViewData["limit"]     = limit;
                param.Add("start", pageIndex * limit);
                param.Add("limit", limit);
                pn   = BusinessFactory.RoleSetting.GetPage(param);
                list = new PageList <Tb_Role_Query>(pn, pageIndex, limit);
            }
            catch (CySoftException ex)
            {
                throw ex;
            }
            catch (Exception ex)
            {
                throw ex;
            }
            ViewData["List"] = list;
            if (param["_search_"] != null && param["_search_"].ToString() == "1")
            {
                return(PartialView("_List"));
            }
            return(View());
        }
示例#12
0
        /// <summary>
        /// 收款确认列表 cxb 2015-4-23
        /// </summary>
        /// <returns></returns>
        public ActionResult List()
        {
            BaseResult   br    = new BaseResult();
            PageNavigate pn    = new PageNavigate();
            int          limit = 10;
            PageList <Td_sale_pay_Query> list = new PageList <Td_sale_pay_Query>(limit);

            try
            {
                Hashtable   param = base.GetParameters();
                ParamVessel p     = new ParamVessel();
                p.Add("pageIndex", 1, HandleType.DefaultValue);//当前页码
                p.Add("start_rq_create", String.Empty, HandleType.Remove);
                p.Add("end_rq_create", String.Empty, HandleType.Remove);
                p.Add("searchValuebycgs", String.Empty, HandleType.Remove, true);
                param = param.Trim(p);

                int pageIndex = Convert.ToInt32(param["pageIndex"]);
                ViewData["pageIndex"] = pageIndex;
                param.Add("limit", limit);
                param.Add("start", (pageIndex - 1) * limit);
                param.Add("sort", "rq_create");
                param.Add("dir", "desc");
                param.Add("id_gys", GetLoginInfo <long>("id_supplier"));
                param["flag_state"]      = 1;
                param["not_flag_delete"] = 1;

                pn = BusinessFactory.Funds.GetPage(param);

                list = new PageList <Td_sale_pay_Query>(pn, pageIndex, limit);
            }
            catch (CySoftException ex)
            {
                throw ex;
            }
            catch (Exception ex)
            {
                throw ex;
            }
            if (Request.IsAjaxRequest())
            {
                return(PartialView("_ListControl", list));
            }
            return(View(list));
        }
示例#13
0
        public ActionResult AreaStatistic(string obj)
        {
            BaseResult           br    = new BaseResult();
            PageNavigate         pn    = new PageNavigate();
            int                  limit = 10;
            PageList <Td_Report> list  = new PageList <Td_Report>(limit);

            try
            {
                Hashtable   param = JSON.Deserialize <Hashtable>(obj);
                ParamVessel p     = new ParamVessel();
                p.Add("pageIndex", 1, HandleType.DefaultValue);//当前页码
                p.Add("checktype", String.Empty, HandleType.Remove);
                p.Add("start_rq_create", string.Empty, HandleType.Remove);
                p.Add("end_rq_create", string.Empty, HandleType.Remove);
                param           = param.Trim(p);
                param["id_gys"] = GetLoginInfo <long>("id_supplier");
                int pageIndex = Convert.ToInt32(param["pageIndex"]);
                param.Add("sort", "rq_create");
                param.Add("dir", "desc");
                if (param["checktype"] == null)
                {
                    param["checktype"] = 5;
                }
                if (param["limit"] != null)
                {
                    limit = int.Parse(param["limit"].ToString());
                }
                else
                {
                    param.Add("limit", limit);
                }
                param.Add("start", (pageIndex - 1) * limit);
                pn = BusinessFactory.Report.GetPage(param);
            }
            catch (CySoftException ex)
            {
                throw ex;
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(Json(pn));
        }
示例#14
0
        /// <summary>
        /// 分页查询
        /// tim
        /// 2015-09-29
        /// </summary>
        public override PageNavigate GetPage(Hashtable param = null)
        {
            PageNavigate pn = new PageNavigate();

            param.Add("flag_master", 1);
            pn.TotalCount = Tb_UserDAL.GetCount(classType, param);
            if (pn.TotalCount > 0)
            {
                var lst = Tb_UserDAL.PageUserMaster(classType, param) ?? new List <Tb_User_Master>();
                pn.Data = lst;
            }
            else
            {
                pn.Data = new List <Tb_User_Master>();
            }
            pn.Success = true;
            return(pn);
        }
示例#15
0
        public ActionResult List(string type = "")
        {
            Hashtable             param = base.GetParameters();
            int                   limit = 10;
            PageList <Info_Query> lst   = new PageList <Info_Query>(limit);
            //页码
            int pageIndex = param.ContainsKey("pageIndex") ? Convert.ToInt32(param["pageIndex"]) : 1;

            ViewData["pageIndex"] = pageIndex;
            param.Add("limit", limit);
            param.Add("start", (pageIndex - 1) * limit);
            string title = "";

            if (type == "yw")
            {
                title = "业务消息";
                param.Add("bm", "business");
            }
            if (type == "xt")
            {
                title = "系统公告";
                param.Add("bm", "system");
            }
            if (type == "sj")
            {
                title = "升级公告";
                param.Add("bm", "update");
            }


            param.Add("sort", "id");
            param.Add("dir", "desc");
            param.Add("id_user", GetLoginInfo <long>("id_user"));
            PageNavigate pn = BusinessFactory.Info.GetPage(param);

            lst           = new PageList <Info_Query>(pn, pageIndex, limit);
            ViewBag.title = title;
            ViewBag.type  = type;
            if (Request.IsAjaxRequest())
            {
                return(PartialView("_ListControl", lst));
            }
            return(View(lst));
        }
示例#16
0
        public ActionResult GetPicResult()
        {
            BaseResult br    = new BaseResult();
            Hashtable  param = GetParameters();
            bool       b     = false;

            if (param.Count == 0)
            {
                b = true;
            }
            ParamVessel p = new ParamVessel();

            p.Add("pageIndex", 1, HandleType.DefaultValue);
            param = param.Trim(p);
            int limit     = 5;
            int pageIndex = int.Parse(param["pageIndex"].ToString());
            PageList <Tb_User_Pic> lst = new PageList <Tb_User_Pic>(limit);
            PageNavigate           pn  = new PageNavigate();

            param.Add("id_master", GetLoginInfo <long>("id_user_master"));
            param.Add("start", (pageIndex - 1) * limit);
            param.Add("limit", limit);
            try
            {
                pn  = BusinessFactory.UserPic.GetPage(param);
                lst = new PageList <Tb_User_Pic>(pn, pageIndex, limit);
                ViewData["pageCount"] = lst.PageCount;
                if (b)
                {
                    return(PartialView("_PicDialogListControl", lst));
                }
                else
                {
                    br.Data    = lst;
                    br.Success = true;
                    return(Json(br));
                }
                //
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
示例#17
0
        public ActionResult List()
        {
            Hashtable param = base.GetParameters();

            try
            {
                int limit = base.PageSizeFromCookie;
                //param.Add("id_masteruser", id_user_master);
                ParamVessel pv = new ParamVessel();
                pv.Add("_search_", "0", HandleType.DefaultValue);
                //pv.Add("id_masteruser", string.Empty, HandleType.ReturnMsg);
                pv.Add("s_title", "", HandleType.Remove, true);
                pv.Add("page", 0, HandleType.DefaultValue);
                pv.Add("pageSize", limit, HandleType.DefaultValue);
                pv.Add("sort", "rq_create desc", HandleType.DefaultValue);
                param = param.Trim(pv);
                param.Add("flag_type", 1);
                param.Add("flag_delete", (int)Enums.FlagDelete.NoDelete);
                int pageIndex = Convert.ToInt32(param["page"]);
                param.Add("limit", limit);
                param.Add("start", pageIndex * limit);
                PageNavigate pn = new PageNavigate();
                pn = BusinessFactory.Ts_Notice.GetPage(param);

                var plist = new PageList <Ts_Notice_View>(pn, pageIndex, limit);
                plist.PageIndex         = pageIndex;
                plist.PageSize          = limit;
                ViewData["List"]        = plist;
                ViewData["sort"]        = param["sort"]; //排序规则需要返回前台
                ViewData["GetTypeName"] = new Func <string, string>(GetTypeName);
            }
            catch (Exception ex)
            {
                return(HttpNotFound());
            }
            if (param["_search_"].ToString().Equals("1"))
            {
                return(PartialView("_List"));
            }
            else
            {
                return(View());
            }
        }
示例#18
0
文件: ReportBLL.cs 项目: 17/YunPos
        /// <summary>
        /// 获取日期报表数据给图显示 cxb 2015-5-21
        /// </summary>
        /// <param name="param"></param>
        /// <returns></returns>
        public PageNavigate GetDataforImg(Hashtable param)
        {
            PageNavigate pn = new PageNavigate();

            if (param["checktype"] == null)
            {
                pn.Data = Td_Sale_Order_HeadDAL.QueryReportbyDateImg(typeof(Td_Sale_Order_Head), param);
            }
            else if (param["checktype"].ToString() == "1")
            {
                pn.Data = Td_Sale_Order_HeadDAL.QueryReportbyWeekImg(typeof(Td_Sale_Order_Head), param);
            }
            else if (param["checktype"].ToString() == "2" || param["checktype"].ToString() == "3")
            {
                pn.Data = Td_Sale_Order_HeadDAL.QueryReportbyMonthImg(typeof(Td_Sale_Order_Head), param);
            }
            pn.Success = true;
            return(pn);
        }
示例#19
0
        public ActionResult List()
        {
            Hashtable param = base.GetParameters();
            int       limit = base.PageSizeFromCookie;

            param.Add("id_masteruser", id_user_master);
            ParamVessel p = new ParamVessel();

            p.Add("_search_", "0", HandleType.DefaultValue);
            p.Add("id_masteruser", String.Empty, HandleType.ReturnMsg);
            p.Add("s_mc", "", HandleType.Remove, true);
            p.Add("page", 0, HandleType.DefaultValue);
            p.Add("pageSize", limit, HandleType.DefaultValue);
            p.Add("sort", "flag_type asc", HandleType.DefaultValue);
            param = param.Trim(p);
            param.Add("flag_delete", (int)Enums.FlagDelete.NoDelete);
            int.TryParse(param["pageSize"].ToString(), out limit);
            PageNavigate pn        = new PageNavigate();
            int          pageIndex = Convert.ToInt32(param["page"]);

            param.Add("limit", limit);
            param.Add("start", pageIndex * limit);
            pn = BusinessFactory.Tb_Pay.GetPage(param);

            var plist = new PageList <Tb_Pay>(pn, pageIndex, limit);

            plist.PageIndex  = pageIndex;
            plist.PageSize   = limit;
            ViewData["List"] = plist;
            List <Ts_Flag> flagTypeList = GetFlagTypeList();

            ViewData["flagTypeList"] = flagTypeList;
            ViewData["IsMasterShop"] = !string.IsNullOrEmpty("id_shop") && id_shop == id_shop_master;
            if (param["_search_"].ToString().Equals("1"))
            {
                return(PartialView("_List"));
            }
            else
            {
                return(View());
            }
        }
示例#20
0
        public ActionResult List(string obj)
        {
            PageNavigate pn = new PageNavigate();

            try
            {
                Hashtable   param = JSON.Deserialize <Hashtable>(obj) ?? new Hashtable();
                ParamVessel p     = new ParamVessel();
                p.Add("id_gys", String.Empty, HandleType.ReturnMsg);
                p.Add("pageIndex", 1, HandleType.DefaultValue);
                p.Add("limit", 20, HandleType.DefaultValue);
                p.Add("sort", "flag_default", HandleType.DefaultValue);
                p.Add("dir", "desc", HandleType.DefaultValue);
                param = param.Trim(p);

                int pageIndex = Convert.ToInt32(param["pageIndex"]);
                if (pageIndex < 1)
                {
                    pageIndex = 1;
                }
                int limit = Convert.ToInt32(param["limit"]);
                if (limit < 1)
                {
                    limit = 20;
                }
                if (limit > 200)
                {
                    limit = 200;
                }
                param.Add("start", (pageIndex - 1) * limit);
                pn = BusinessFactory.BankAccount.GetPage(param);
            }
            catch (CySoftException ex)
            {
                throw ex;
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(Json(pn));
        }
示例#21
0
        public ActionResult CheckList()
        {
            PageNavigate             pn    = new PageNavigate();
            int                      limit = 10;
            PageList <SpSkuPushData> list  = new PageList <SpSkuPushData>(limit);

            try
            {
                Hashtable   param = GetParameters();
                ParamVessel p     = new ParamVessel();
                p.Add("pageIndex", 1, HandleType.DefaultValue); //当前页码
                param = param.Trim(p);

                int pageIndex = Convert.ToInt32(param["pageIndex"]);

                ViewData["pageIndex"] = pageIndex;
                ViewData["limit"]     = limit;

                param.Add("limit", limit);
                param.Add("start", (pageIndex - 1) * limit);
                long id_gys = GetLoginInfo <long>("id_supplier");
                param.Add("id_gys", id_gys);

                ViewData["id_gys"] = id_gys;

                param.Add("falg_state", GoodsRecommendFlag.CheckPending);
                param.Add("sort", "rq_create");
                param.Add("dir", "desc");
                pn   = BusinessFactory.GoodsRecommend.GetPage(param);
                list = new PageList <SpSkuPushData>(pn, pageIndex, limit);
            }
            catch (CySoftException ex)
            {
                throw ex;
            }
            catch (Exception ex)
            {
                throw ex;
            }

            return(View(list));
        }
示例#22
0
        /// <summary>
        /// 收藏商品列表
        /// tim
        /// 2015-05-12
        /// </summary>
        /// <param name="param"></param>
        /// <returns></returns>
        public override PageNavigate GetPage(Hashtable param)
        {
            PageNavigate pn = new PageNavigate()
            {
                TotalCount = DAL.GetCount(typeof(Tb_Sp_Favorites), param)
            };

            if (pn.TotalCount > 0)
            {
                var list = DAL.QueryPage <Tb_Sp_Query>(typeof(Tb_Sp_Favorites), param).ToList();
                pn.Data = list;
            }
            else
            {
                pn.Data = new List <Tb_Sp_Query>();
            }

            pn.Success = true;
            return(pn);
        }
示例#23
0
        public ActionResult SearchSp()
        {
            Hashtable param = base.GetParameters();
            int       limit = base.PageSizeFromCookie;

            param.Add("id_masteruser", id_user_master);
            ParamVessel pv = new ParamVessel();

            pv.Add("_search_", "0", HandleType.DefaultValue);
            pv.Add("id_masteruser", string.Empty, HandleType.ReturnMsg);
            pv.Add("page", 0, HandleType.DefaultValue);
            pv.Add("pageSize", limit, HandleType.DefaultValue);
            pv.Add("sort", "rq_create desc", HandleType.DefaultValue);
            param = param.Trim(pv);
            param.Add("flag_delete", (int)Enums.FlagDelete.NoDelete);
            int pageIndex = Convert.ToInt32(param["page"]);

            param.Add("limit", limit);
            param.Add("start", pageIndex * limit);
            PageNavigate pn = new PageNavigate();

            param.Add("id_shop", id_shop);
            pn = BusinessFactory.Tb_Shopsp.GetPageList(param);

            var plist = new PageList <SelectSpModel>(pn, pageIndex, limit);

            plist.PageIndex  = pageIndex;
            plist.PageSize   = limit;
            ViewData["List"] = plist;
            ViewData["sort"] = param["sort"];       //排序规则需要返回前台
            ViewData["pn"]   = plist;

            if (param["_search_"].ToString().Equals("1"))
            {
                return(PartialView("_searchsp"));
            }
            else
            {
                return(View("SearchSp"));
            }
        }
示例#24
0
文件: InfoBLL.cs 项目: 17/YunPos
        /// <summary>
        /// 分页获取数据
        /// </summary>
        /// <param name="param"></param>
        /// <returns></returns>
        public override PageNavigate GetPage(Hashtable param = null)
        {
            PageNavigate       pn  = new PageNavigate();
            IList <Info_Query> lst = new List <Info_Query>();

            if (param.ContainsKey("bm"))
            {
                Info_Type info    = new Info_Type();
                string    id_user = param["id_user"].ToString();
                param.Remove("id_user");
                info = DAL.GetItem <Info_Type>(typeof(Info_Type), param);
                param["id_info_type"] = info.id;
                if (param["bm"].ToString() == "business")
                {
                    param["id_user_yw"] = id_user;
                }
                pn.TotalCount = DAL.GetCount(typeof(Info), param);
                if (pn.TotalCount > 0)
                {
                    lst = DAL.QueryPage <Info_Query>(typeof(Info), param);
                }
                param.Clear();
                param["id_user"] = id_user;
                foreach (Info_Query item in lst)
                {
                    param["id_info"]    = item.id;
                    param["flag_reade"] = 1;
                    item.reade          = DAL.GetCount(typeof(Info_User), param);
                }
            }
            else
            {
                pn.TotalCount = DAL.GetCount(typeof(Info), param);
                if (pn.TotalCount > 0)
                {
                    lst = DAL.QueryPage <Info_Query>(typeof(Info), param);
                }
            }
            pn.Data = lst;
            return(pn);
        }
示例#25
0
        public ActionResult List()
        {
            Hashtable param = base.GetParameters();

            try
            {
                int limit = base.PageSizeFromCookie;
                param.Add("id_masteruser", id_user_master);
                ParamVessel pv = new ParamVessel();
                pv.Add("_search_", "0", HandleType.DefaultValue);
                pv.Add("id_masteruser", string.Empty, HandleType.ReturnMsg);
                pv.Add("page", 0, HandleType.DefaultValue);
                pv.Add("pageSize", limit, HandleType.DefaultValue);
                pv.Add("sort", "sort_id asc", HandleType.DefaultValue);
                pv.Add("style", "", HandleType.Remove);
                param = param.Trim(pv);
                int pageIndex = Convert.ToInt32(param["page"]);
                param.Add("limit", limit);
                param.Add("start", pageIndex * limit);
                PageNavigate pn = new PageNavigate();
                pn = BusinessFactory.Tb_Promote_Sort.GetPage(param);
                var plist = new PageList <Tb_Promote_Sort>(pn, pageIndex, limit);
                plist.PageIndex  = pageIndex;
                plist.PageSize   = limit;
                ViewData["List"] = plist;
                ViewData["sort"] = param["sort"];       //排序规则需要返回前台
                ViewData["promote_sort_name"] = GetFlagList();
            }
            catch (Exception ex)
            {
                return(HttpNotFound());
            }
            if (param["_search_"].ToString().Equals("1"))
            {
                return(PartialView("_List"));
            }
            else
            {
                return(View());
            }
        }
示例#26
0
        public ActionResult List()
        {
            Hashtable param = base.GetParameters();

            try
            {
                int         limit = base.PageSizeFromCookie;
                ParamVessel p     = new ParamVessel();
                p.Add("_search_", "0", HandleType.DefaultValue);
                p.Add("s_mc", "", HandleType.DefaultValue, true);
                p.Add("page", 0, HandleType.DefaultValue);
                p.Add("pageSize", limit, HandleType.DefaultValue);
                param = param.Trim(p);
                int.TryParse(param["pageSize"].ToString(), out limit);
                PageNavigate pn        = new PageNavigate();
                int          pageIndex = Convert.ToInt32(param["page"]);
                param.Add("limit", limit);
                param.Add("start", pageIndex * limit);
                pn = BusinessFactory.Tb_Post_Function.GetPage(param);
                var plist = new PageList <Tb_Pos_Function>(pn, pageIndex, limit);
                plist.PageIndex  = pageIndex;
                plist.PageSize   = limit;
                ViewData["List"] = plist;
            }
            catch (Exception ex)
            {
                return(HttpNotFound());
            }
            ViewData["SelectListItems"] = GetSelectListItems();
            if (param["_search_"].ToString().Equals("1"))
            {
                return(PartialView("_List"));
            }
            else
            {
                return(View());
            }
        }
示例#27
0
        public override PageNavigate GetPage(Hashtable param)
        {
            PageNavigate pn = new PageNavigate()
            {
                TotalCount = DAL.QueryCount(typeof(Tb_Sp_Sku_Push), param)
            };

            if (pn.TotalCount > 0)
            {
                List <SpSkuPushData> list = DAL.QueryPage <SpSkuPushData>(typeof(Tb_Sp_Sku_Push), param).ToList();

                //param = new Hashtable();
                //foreach (var item in list)
                //{


                //    param.Add("id_sku", item.id);
                //    item.sp_expand_query = DAL.QueryList<Tb_Sp_Expand_Query>(typeof(Tb_Sp_Expand), param).ToList();

                //    //组合【尺码2:300,重量2:30kg,颜色2:黑色】
                //    foreach (var expand in item.sp_expand_query)
                //    {
                //        item.name_spec_zh += String.Format("{0}:{1},", expand.mc, expand.val);
                //    }
                //    param.Remove("id_sku");

                //}

                pn.Data = list;
            }
            else
            {
                pn.Data = new List <SpSkuPushData>();
            }

            pn.Success = true;
            return(pn);
        }
示例#28
0
        /// <summary>
        /// 列表
        /// znt 2015-04-24
        /// </summary>
        public ActionResult List()
        {
            PageNavigate pn                = new PageNavigate();
            int          limit             = 10;
            PageList <Tb_Gys_Account> list = new PageList <Tb_Gys_Account>(limit);

            try
            {
                Hashtable   param = base.GetParameters();
                ParamVessel p     = new ParamVessel();
                p.Add("id_gys", GetLoginInfo <long>("id_supplier"), HandleType.DefaultValue);
                p.Add("pageIndex", 1, HandleType.DefaultValue);
                param = param.Trim(p);

                int pageIndex = Convert.ToInt32(param["pageIndex"]);

                ViewData["pageIndex"] = pageIndex;
                ViewData["limit"]     = limit;

                param.Add("sort", "flag_default");
                param.Add("dir", "desc");
                param.Add("limit", limit);
                param.Add("start", (pageIndex - 1) * limit);
                pn   = BusinessFactory.BankAccount.GetPage(param);
                list = new PageList <Tb_Gys_Account>(pn, pageIndex, limit);
            }
            catch (CySoftException ex)
            {
                throw ex;
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(View(list));
        }
示例#29
0
        public ActionResult RoleList()
        {
            Hashtable param = base.GetParameters();
            int       limit = 10;

            param.Add("_id_masteruser", id_user_master);
            ParamVessel p = new ParamVessel();

            p.Add("_search_", "0", HandleType.DefaultValue);
            p.Add("_id_masteruser", String.Empty, HandleType.ReturnMsg);
            p.Add("s_role", "", HandleType.Remove, true);
            p.Add("page", 0, HandleType.DefaultValue);
            p.Add("pageSize", limit, HandleType.DefaultValue);
            param = param.Trim(p);
            param.Add("flag_master", 1);
            int.TryParse(param["pageSize"].ToString(), out limit);
            PageNavigate pn        = new PageNavigate();
            int          pageIndex = Convert.ToInt32(param["page"]);

            param.Add("limit", limit);
            param.Add("start", pageIndex * limit);
            pn = BusinessFactory.RoleSetting.GetPage(param);
            var plist = new PageList <Tb_Role_Query>(pn, pageIndex, limit);

            plist.PageIndex  = pageIndex;
            plist.PageSize   = limit;
            ViewData["List"] = plist;
            if (param["_search_"].ToString().Equals("1"))
            {
                return(PartialView("_RoleList"));
            }
            else
            {
                return(View());
            }
        }
示例#30
0
        public override PageNavigate GetPage(Hashtable param)
        {
            PageNavigate pn = new PageNavigate();
            BaseResult   br = new BaseResult();
            Hashtable    ht = new Hashtable();

            ht.Add("id_masteruser", param["id_masteruser"]);
            ht.Add("keyword", param["keyword"]);
            ht.Add("flag_delete", (byte)CySoft.Model.Enums.Enums.FlagDelete.NoDelete);
            if (param.ContainsKey("id_shop"))
            {
                ht.Add("id_shop", param["id_shop"]);
            }

            pn.TotalCount = DAL.GetCount(typeof(Tb_Shopsp_Qc_Md), ht);
            if (pn.TotalCount > 0)
            {
                var list = DAL.QueryPage <Tb_Shopsp_Qc_Md>(typeof(Tb_Shopsp_Qc_Md), param);
                pn.Data = list;
            }

            pn.Success = true;
            return(pn);
        }