Exemplo n.º 1
0
        /// <summary>
        /// 获取留言对象列表
        /// </summary>
        private void GetList()
        {
            //检查PageIndex参数
            string tempIndex = Tools.GetQueryString("p");

            if (tempIndex == "")
            {
                tempIndex = "1";
            }
            if (Tools.IsPositiveInt(tempIndex))
            {
                PageIndex = Convert.ToInt32(tempIndex);

                LInfoList = new BLL.Leaveword.Leaveword().GetList(PageIndex, PageSize, out RecordTotal);
                MyPageBar = new PageBar(PageIndex, PageSize, RecordTotal, PageNumTotal, "p");

                if (RecordTotal > 0)
                {
                    if (PageIndex > MyPageBar.PageTotal)
                    {
                        ShowWindow(4, "系统提示", "分页参数错误,点击 \\\"确定\\\" 按钮返回", null, true);
                    }
                    else
                    {
                        PageBarHtml = MyPageBar.GetHTML();
                    }
                }
            }
            else
            {
                ShowWindow(4, "系统提示", "分页参数错误,点击 \\\"确定\\\" 按钮返回", null, true);
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// 获取产品对象列表
        /// </summary>
        private void GetList()
        {
            //检查PageIndex参数
            string tempIndex = Tools.GetQueryString("p");

            if (tempIndex == "")
            {
                tempIndex = "1";
            }
            if (Tools.IsPositiveInt(tempIndex))
            {
                PageIndex = Convert.ToInt32(tempIndex);

                try
                {
                    CategoryID = Convert.ToInt32(Tools.GetQueryString("categoryid"));
                    string CategoryIDList = BPC.GetChildCategoryIDListByID(Convert.ToInt32(CategoryID));
                    PInfoList = BPP.GetListByCategory(PageIndex, PageSize, out RecordTotal, CategoryIDList);
                }
                catch
                {
                    PInfoList = BPP.GetList(PageIndex, PageSize, out RecordTotal);
                }

                MyPageBar = new PageBar(PageIndex, PageSize, RecordTotal, PageNumTotal, "p");

                if (RecordTotal > 0)
                {
                    if (PageIndex > MyPageBar.PageTotal)
                    {
                        ShowWindow(4, "系统提示", "分页参数错误,点击 \\\"确定\\\" 按钮返回", null, true);
                    }
                    else
                    {
                        PageBarHtml = MyPageBar.GetHTML();
                    }
                }
            }
            else
            {
                ShowWindow(4, "系统提示", "分页参数错误,点击 \\\"确定\\\" 按钮返回", null, true);
            }
        }