예제 #1
0
 protected override void OnLoadComplete(EventArgs e)
 {
     base.OnLoadComplete(e);
     try
     {
         if (!this.IsPostBack)
         {
             //加载保存的条件
             if (GridParmaList.Where(p => p.PageName == this.Request.Url.AbsolutePath && p.GridName == __ViewControlName).Count() > 0)
             {
                 GridParma thisGridParma = GridParmaList.First(p => p.PageName == this.Request.Url.AbsolutePath && p.GridName == __ViewControlName);
                 if (thisGridParma != null)
                 {
                     //2013-11-6 V3.0 修改
                     this.SetQueryCondition_FromGridParmaToControl(thisGridParma);
                 }
             }
             ReLoadData();
         }
     }
     catch (Exception ex)
     {
         this.AjaxAlert(ex);
     }
 }
        /// <summary>
        /// 重新查询,但页码等信息保留
        /// </summary>
        public void ReLoadData()
        {
            GridParma thisGridParma = GetNewGridParma();

            if (GridParmaList.Where(p => p.PageName == this.Request.Url.AbsolutePath && p.GridName == __ViewControlName).Count() > 0)
            {
                GridParma oldParma = GridParmaList.First(p => p.PageName == this.Request.Url.AbsolutePath && p.GridName == __ViewControlName);
                if (oldParma != null)
                {
                    oldParma.QueryParmaList = thisGridParma.QueryParmaList;
                }
            }
            else
            {
                AddGridParma(thisGridParma);
            }

            (this.divviewcontrolSB.FindControl("viewcontrolSB") as IUserControl).LoadData();
            InitAccordionAndParent(false);
        }