string _GetAdviceCountByState(AdviceState adviceState)
        {
            CurrentQuery.State = Convert.ToInt32(adviceState);
            int n = AdviceHelper.QueryAdviceCountByAll(CurrentQuery);

            return(n.ToString());
        }
        /// <summary>
        /// 初始化页面信息
        /// </summary>
        void LoadAdvices()
        {
            AdviceUPager.PageIndex  = PageNumber;
            AdviceUPager.ItemCount  = AdviceHelper.QueryAdviceCountByAll(CurrentQuery);
            AdviceUPager.UrlFormat  = We7Helper.AddParamToUrl(Request.RawUrl.Replace("{", "{{").Replace("}", "}}"), Keys.QRYSTR_PAGEINDEX, "{0}");
            AdviceUPager.PrefixText = "共 " + AdviceUPager.MaxPages + "  页 ·   第 " + AdviceUPager.PageIndex + "  页 · ";

            List <Advice> list = new List <Advice>();

            list = AdviceHelper.GetAdviceByQuery(CurrentQuery, AdviceUPager.Begin - 1, AdviceUPager.Count);
            AdviceType adviceType = new AdviceType();

            foreach (Advice a in list)
            {
                if (a.MustHandle > 1)
                {
                    HasMustHandle = true;
                }
                if (a.TypeID != null && a.TypeID != "")
                {
                    adviceType = AdviceTypeHelper.GetAdviceType(a.TypeID);
                    if (adviceType != null)
                    {
                        a.TypeTitle = adviceType.Title;
                    }
                }
                if (a.UserID != null && a.UserID.Length > 0)
                {
                    a.Name = AccountHelper.GetAccount(a.UserID, new string[] { "LastName" }).LastName;
                }
                if (a.Name == null || a.Name == "")
                {
                    a.Name = "匿名用户";
                }
                a.TimeNote  = GetTimeNote(a.CreateDate);
                a.AlertNote = GetAlertNote(a.ToHandleTime, adviceType.RemindDays, a.MustHandle);
            }

            AdviceGridView.DataSource = list;
            AdviceGridView.DataBind();

            BuildStateLinks();//刷新状态统计栏
        }
        /// <summary>
        /// 初始化页面信息
        /// </summary>
        void LoadAdvices()
        {
            query = null;
            //CurrentQuery.State = (int)CurrentState;

            AdviceUPager.PageIndex  = PageNumber;
            AdviceUPager.ItemCount  = AdviceHelper.QueryAdviceCountByAll(CurrentQuery);
            AdviceUPager.UrlFormat  = We7Helper.AddParamToUrl(Request.RawUrl.Replace("{", "{{").Replace("}", "}}"), Keys.QRYSTR_PAGEINDEX, "{0}");
            AdviceUPager.PrefixText = "共 " + AdviceUPager.MaxPages + "  页 ·   第 " + AdviceUPager.PageIndex + "  页 · ";

            List <Advice> list = new List <Advice>();

            list = AdviceHelper.GetAdviceByQuery(CurrentQuery, AdviceUPager.Begin - 1, AdviceUPager.Count);
            AdviceType adviceType = new AdviceType();

            foreach (Advice a in list)
            {
                if (a.TypeID != null && a.TypeID != "")
                {
                    adviceType = AdviceTypeHelper.GetAdviceType(a.TypeID);
                    if (adviceType != null)
                    {
                        a.TypeTitle = adviceType.Title;
                    }
                }
                if (a.UserID != null && a.UserID.Length > 0)
                {
                    a.Name = AccountHelper.GetAccount(a.UserID, new string[] { "LoginName" }).LoginName;
                }
                if (a.Name == null || a.Name == "")
                {
                    a.Name = "匿名用户";
                }
            }
            AdviceGridView.DataSource = list;
            AdviceGridView.DataBind();
        }