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(); }
/// <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); }