예제 #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);
     }
 }
예제 #2
0
        private void InitGrid()
        {
            //加载视图数据
            GridParma thisGridParma = null;

            //IEnumerable<GridParma> thisGridParmaList;

            thisGridParma = GridParmaList.FirstOrDefault(p => p.PageName == this.Request.Url.AbsolutePath && p.GridName == "viewcontrol5D");
            if (thisGridParma == null)
            {
                thisGridParma = new GridParma()
                {
                    PageName = this.Request.Url.AbsolutePath, GridName = "viewcontrol5D", QueryParmaList = new List <QueryParma>(),
                };
                GridParmaList.Add(thisGridParma);
            }
            QueryParma viewcontrol5DQueryParma = thisGridParma.QueryParmaList.FirstOrDefault(p => p.QueryField.FieldName == "Role_ID");

            if (viewcontrol5DQueryParma == null)
            {
                viewcontrol5DQueryParma = new QueryParma()
                {
                    QueryField = new QueryField()
                    {
                        FieldName = "Role_ID",
                    },
                    CompareTypeEnum = CompareTypeEnum.Equal,
                    Value           = __Id,
                };
                thisGridParma.QueryParmaList.Add(viewcontrol5DQueryParma);
            }
            thisGridParma.PageIndex       = 0;
            viewcontrol5DQueryParma.Value = __Id;
            viewcontrol5D.InitData();
        }
예제 #3
0
        /// <summary>
        /// 2013-11-6 V3.0 修改
        /// </summary>
        private void AddGridParma(GridParma thisGridParma)
        {
            GridParma CopyGridParma;


            GridParmaList.RemoveAll(p => p.PageName == this.Request.Url.AbsolutePath && p.GridName == "ctrl_deptquery_view");
            CopyGridParma = new GridParma()
            {
                GridName       = "ctrl_deptquery_view",
                PageIndex      = thisGridParma.PageIndex,
                PageName       = thisGridParma.PageName,
                PageSize       = thisGridParma.PageSize,
                QueryParmaList = thisGridParma.QueryParmaList,
                SortFieldName  = thisGridParma.SortFieldName,
                SortDirection  = thisGridParma.SortDirection,
            };
            GridParmaList.Add(CopyGridParma);


            GridParmaList.RemoveAll(p => p.PageName == this.Request.Url.AbsolutePath && p.GridName == "ViewControlC2");
            CopyGridParma = new GridParma()
            {
                GridName       = "ViewControlC2",
                PageIndex      = thisGridParma.PageIndex,
                PageName       = thisGridParma.PageName,
                PageSize       = thisGridParma.PageSize,
                QueryParmaList = thisGridParma.QueryParmaList,
                SortFieldName  = thisGridParma.SortFieldName,
                SortDirection  = thisGridParma.SortDirection,
            };
            GridParmaList.Add(CopyGridParma);


            GridParmaList.RemoveAll(p => p.PageName == this.Request.Url.AbsolutePath && p.GridName == "viewcontrol46");
            CopyGridParma = new GridParma()
            {
                GridName       = "viewcontrol46",
                PageIndex      = thisGridParma.PageIndex,
                PageName       = thisGridParma.PageName,
                PageSize       = thisGridParma.PageSize,
                QueryParmaList = thisGridParma.QueryParmaList,
                SortFieldName  = thisGridParma.SortFieldName,
                SortDirection  = thisGridParma.SortDirection,
            };
            GridParmaList.Add(CopyGridParma);
        }
예제 #4
0
        //页面定义的参数

        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                //加入查询条件列表,设置默认值-----2013-11-6 V3.0 修改
                //暂时只考虑二级联动,后期考虑多级的,反正要保证最后一级联动的最后赋值
                this.AddOrUpdateQueryCondition(this.qc_User_StatusJ4, null);
                this.AddOrUpdateQueryCondition(this.txtUser_TypeV4, null);
                this.AddOrUpdateQueryCondition(this.ctrl_Department_ID, null);
                this.AddOrUpdateQueryCondition(this.ctrl_User_Code, null);
                this.AddOrUpdateQueryCondition(this.ctrl_User_Name, null);
                this.AddOrUpdateQueryCondition(this.qc_Is_Prohibit_WebVJ, null);

                if (!this.IsPostBack)
                {
                    //从菜单进入要清空保存的所有查询条件,不过菜单中URL的Reload=true可能暂时没加上
                    if (Request.QueryString["Reload"] != null)
                    {
                        GridParmaList.Clear();
                    }


                    if (Request.QueryString["ViewID"] == null)
                    {
                        Hidden_SelectViewControlID.Value = "1000000188";
                    }
                    else
                    {
                        Hidden_SelectViewControlID.Value = Request.QueryString["ViewID"];
                    }

                    //设置按钮的权限隐藏


                    //父子视图名称固定

                    //手风琴名称固定
                }
            }
            catch (Exception ex)
            {
                this.AjaxAlert(ex);
            }
        }
예제 #5
0
        //页面定义的参数

        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                //加入查询条件列表,设置默认值-----2013-11-6 V3.0 修改
                //暂时只考虑二级联动,后期考虑多级的,反正要保证最后一级联动的最后赋值
                this.AddOrUpdateQueryCondition(this.tbProduct_Name, null);
                this.AddOrUpdateQueryCondition(this.qc_StateKG, null);
                this.AddOrUpdateQueryCondition(this.qc_DesignStyleJB, null);
                this.AddOrUpdateQueryCondition(this.qc_Designers8H, null);
                this.AddOrUpdateQueryCondition(this.qc_ProductTypeIdH6, null);

                if (!this.IsPostBack)
                {
                    //从菜单进入要清空保存的所有查询条件,不过菜单中URL的Reload=true可能暂时没加上
                    if (Request.QueryString["Reload"] != null)
                    {
                        GridParmaList.Clear();
                    }


                    if (Request.QueryString["ViewID"] == null)
                    {
                        Hidden_SelectViewControlID.Value = "2000000308106";
                    }
                    else
                    {
                        Hidden_SelectViewControlID.Value = Request.QueryString["ViewID"];
                    }

                    //设置按钮的权限隐藏


                    //父子视图名称固定

                    //手风琴名称固定
                }
            }
            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);
        }
        //页面定义的参数

        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                //加入查询条件列表,设置默认值-----2013-11-6 V3.0 修改
                //暂时只考虑二级联动,后期考虑多级的,反正要保证最后一级联动的最后赋值

                if (!this.IsPostBack)
                {
                    //从菜单进入要清空保存的所有查询条件,不过菜单中URL的Reload=true可能暂时没加上
                    if (Request.QueryString["Reload"] != null)
                    {
                        GridParmaList.Clear();
                    }


                    if (Request.QueryString["ViewID"] == null)
                    {
                        Hidden_SelectViewControlID.Value = "2000000307749";
                    }
                    else
                    {
                        Hidden_SelectViewControlID.Value = Request.QueryString["ViewID"];
                    }

                    //设置按钮的权限隐藏


                    //父子视图名称固定

                    //手风琴名称固定
                }
            }
            catch (Exception ex)
            {
                this.AjaxAlert(ex);
            }
        }