Example #1
0
        protected void Pg_Init()
        {
            ArrayList fieldName  = new ArrayList();
            ArrayList fieldValue = new ArrayList();

            ArrayList selName  = new ArrayList();
            ArrayList selValue = new ArrayList();
            string    param    = string.Empty;

            if (CommonLibrary.CommOperate.GetStrFromRequestQueryString("keyword") != null && CommonLibrary.CommOperate.GetStrFromRequestQueryString("keyword") != "")
            {
                fieldName.Add("keyword");
                fieldValue.Add(CommonLibrary.CommOperate.GetStrFromRequestQueryString("keyword"));
                selName.Add("[and]BrandName");
                selValue.Add(CommonLibrary.CommOperate.GetStrFromRequestQueryString("keyword"));
            }

            int currentPage, pageSize, pageCount = 1, recordCount = 0;

            pageSize    = 15;
            recordCount = brandbll.GetBrandNum(fieldName, fieldValue);
            currentPage = tool.PageAndCount.GetCurrent(recordCount, pageSize);
            int startId = tool.PageAndCount.StartID(currentPage, pageSize);
            int endId   = tool.PageAndCount.EndID(currentPage, pageSize);

            GridView1.DataSource   = brandbll.GetBrand(selName, selValue, "  SortID asc,BrandID desc", startId, endId);
            GridView1.DataKeyNames = new String[] { "BrandID" };
            GridView1.DataBind();

            PagerClass.PageSet ps = new PagerClass.PageSet(currentPage, recordCount, pageSize, fieldName, fieldValue);
            L_page.Text = ps.GeneratePagers();
        }
Example #2
0
        protected void Pg_Init()
        {
            ArrayList fieldName  = new ArrayList();
            ArrayList fieldValue = new ArrayList();

            ArrayList selName  = new ArrayList();
            ArrayList selValue = new ArrayList();
            string    param    = string.Empty;

            int cid = 0;

            Int32.TryParse(CommonLibrary.CommOperate.GetStrFromRequestQueryString("cid"), out cid);

            if (CommonLibrary.CommOperate.GetStrFromRequestQueryString("keyword") != null && CommonLibrary.CommOperate.GetStrFromRequestQueryString("keyword") != "")
            {
                fieldName.Add("keyword");
                fieldValue.Add(CommonLibrary.CommOperate.GetStrFromRequestQueryString("keyword"));
                selName.Add("[and]InfoTitle");
                selValue.Add(CommonLibrary.CommOperate.GetStrFromRequestQueryString("keyword"));
            }

            if (cid != 0)
            {
                fieldName.Add("cid");
                fieldValue.Add(CommonLibrary.CommOperate.GetStrFromRequestQueryString("cid"));

                selName.Add("[and]InfoType");
                selValue.Add(CommonLibrary.CommOperate.GetStrFromRequestQueryString("cid"));
            }



            int currentPage, pageSize, pageCount = 1, recordCount = 0;

            pageSize    = 15;
            recordCount = infobll.GetInfoCountsByNode(cid, selName, selValue, 1);
            currentPage = tool.PageAndCount.GetCurrent(recordCount, pageSize);
            int startId = tool.PageAndCount.StartID(currentPage, pageSize);
            int endId   = tool.PageAndCount.EndID(currentPage, pageSize);

            GridView1.DataSource   = infobll.GetInfoByNode(cid, selName, selValue, 1, startId, endId);
            GridView1.DataKeyNames = new String[] { "InfoID" };
            GridView1.DataBind();

            PagerClass.PageSet ps = new PagerClass.PageSet(currentPage, recordCount, pageSize, fieldName, fieldValue);
            L_page.Text = ps.GeneratePagers();

            #region 类别树
            TNode     tnode   = new TNode();
            NodeBLL   nodebll = new NodeBLL();
            DataTable dt      = nodebll.GetAllNode();
            L_CateTree.Text = "<select  id='sel' name='sel'>";
            if (dt.Rows.Count > 0)
            {
                L_CateTree.Text += tool.NodeTree.GetNodeTree(dt, 0, 0);
            }
            L_CateTree.Text += "</Select>";

            #endregion
        }
Example #3
0
        protected void Pg_Init()
        {
            ArrayList fieldName  = new ArrayList();
            ArrayList fieldValue = new ArrayList();

            ArrayList selName  = new ArrayList();
            ArrayList selValue = new ArrayList();
            string    param    = string.Empty;
            int       cid      = 0;

            if (CommonLibrary.CommOperate.GetStrFromRequestQueryString("pid") != null && CommonLibrary.CommOperate.GetStrFromRequestQueryString("pid") != "")
            {
                fieldName.Add("pid");
                fieldValue.Add(CommonLibrary.CommOperate.GetStrFromRequestQueryString("pid"));
                selName.Add("ParentID");
                cid = 0;
                Int32.TryParse(CommonLibrary.CommOperate.GetStrFromRequestQueryString("pid"), out cid);

                selValue.Add(cid);
            }
            else if (CommonLibrary.CommOperate.GetStrFromRequestQueryString("keyword") != null && CommonLibrary.CommOperate.GetStrFromRequestQueryString("keyword") != "")
            {
                fieldName.Add("keyword");
                fieldValue.Add(CommonLibrary.CommOperate.GetStrFromRequestQueryString("keyword"));
                selName.Add("NodeName");
                selValue.Add(CommonLibrary.CommOperate.GetStrFromRequestQueryString("keyword"));
            }
            else
            {
                fieldName  = null;
                fieldValue = null;
                selName.Add("ParentID");
                selValue.Add(0);
            }

            int currentPage, pageSize, pageCount = 1, recordCount = 0;

            pageSize = 15;

            recordCount = nodebll.GetNodeCounts(selName, selValue);

            currentPage = tool.PageAndCount.GetCurrent(recordCount, pageSize);
            int startId = tool.PageAndCount.StartID(currentPage, pageSize);
            int endId   = tool.PageAndCount.EndID(currentPage, pageSize);

            GridView1.DataSource   = nodebll.GetNodeByCondition(selName, selValue, "  SortID asc,NodeId desc", startId, endId);
            GridView1.DataKeyNames = new String[] { "NodeId" };
            GridView1.DataBind();

            TBLL.NodeBLL NodeOperate = new NodeBLL();
            lbl_CurrentNode.Text = NodeTree.GetNodePath(NodeOperate.GetNode(cid).NodePath);
            PagerClass.PageSet ps = new PagerClass.PageSet(currentPage, recordCount, pageSize, fieldName, fieldValue);
            L_page.Text = ps.GeneratePagers();
        }
Example #4
0
        protected void Pg_Init()
        {
            ArrayList fieldName  = new ArrayList();
            ArrayList fieldValue = new ArrayList();

            ArrayList selName  = new ArrayList();
            ArrayList selValue = new ArrayList();
            string    param    = string.Empty;

            if (CommonLibrary.CommOperate.GetStrFromRequestQueryString("keyword") != null && CommonLibrary.CommOperate.GetStrFromRequestQueryString("keyword") != "")
            {
                fieldName.Add("keyword");
                fieldValue.Add(CommonLibrary.CommOperate.GetStrFromRequestQueryString("keyword"));
                selName.Add("[and]ShopTitle");
                selValue.Add(CommonLibrary.CommOperate.GetStrFromRequestQueryString("keyword"));
            }
            if (CommonLibrary.CommOperate.GetStrFromRequestQueryString("provinceid") != null && CommonLibrary.CommOperate.GetStrFromRequestQueryString("provinceid") != "")
            {
                fieldName.Add("provinceid");
                fieldValue.Add(CommonLibrary.CommOperate.GetStrFromRequestQueryString("provinceid"));
                selName.Add("[and]ShopProvince");
                selValue.Add(CommonLibrary.CommOperate.GetStrFromRequestQueryString("provinceid"));
            }
            if (CommonLibrary.CommOperate.GetStrFromRequestQueryString("cityid") != null && CommonLibrary.CommOperate.GetStrFromRequestQueryString("cityid") != "")
            {
                fieldName.Add("cityid");
                fieldValue.Add(CommonLibrary.CommOperate.GetStrFromRequestQueryString("cityid"));
                selName.Add("[and]ShopCity");
                selValue.Add(CommonLibrary.CommOperate.GetStrFromRequestQueryString("cityid"));
            }
            if (CommonLibrary.CommOperate.GetStrFromRequestQueryString("areaid") != null && CommonLibrary.CommOperate.GetStrFromRequestQueryString("areaid") != "")
            {
                fieldName.Add("areaid");
                fieldValue.Add(CommonLibrary.CommOperate.GetStrFromRequestQueryString("areaid"));
                selName.Add("[and]ShopArea");
                selValue.Add(CommonLibrary.CommOperate.GetStrFromRequestQueryString("areaid"));
            }

            int currentPage, pageSize, pageCount = 1, recordCount = 0;

            pageSize    = 15;
            recordCount = shopbll.GetShopCounts(selName, selValue);
            currentPage = tool.PageAndCount.GetCurrent(recordCount, pageSize);
            int startId = tool.PageAndCount.StartID(currentPage, pageSize);
            int endId   = tool.PageAndCount.EndID(currentPage, pageSize);

            GridView1.DataSource   = shopbll.GetNodeByCondition(selName, selValue, "  SortID asc,ShopID desc", startId, endId);
            GridView1.DataKeyNames = new String[] { "ShopID" };
            GridView1.DataBind();

            PagerClass.PageSet ps = new PagerClass.PageSet(currentPage, recordCount, pageSize, fieldName, fieldValue);
            L_page.Text = ps.GeneratePagers();
        }
Example #5
0
        protected void Pg_Init()
        {
            ArrayList selName  = new ArrayList();
            ArrayList selValue = new ArrayList();

            int currentPage, pageSize, pageCount = 1, recordCount = 0;

            pageSize    = 15;
            recordCount = adminbll.GetAdminNum(null, null);
            currentPage = tool.PageAndCount.GetCurrent(recordCount, pageSize);
            int startId = tool.PageAndCount.StartID(currentPage, pageSize);
            int endId   = tool.PageAndCount.EndID(currentPage, pageSize);

            GridView1.DataSource   = adminbll.GetAdminByCondition(null, null, startId, endId);
            GridView1.DataKeyNames = new String[] { "Admin_ID" };
            GridView1.DataBind();

            PagerClass.PageSet ps = new PagerClass.PageSet(currentPage, recordCount, pageSize, selName, selValue);
            L_page.Text = ps.GeneratePagers();
        }