public void Setup_FromTable( ClsSysCurrentUser CurrentUser , string TableName , List<ClsBindGridColumn_Web_Telerik> BindDefinition , string Key = "" , bool AllowSort = false , bool AllowPaging = false , Methods_Web_Telerik.eSelectorType SelectorType = Methods_Web_Telerik.eSelectorType.None , string ModuleName = "" , bool IsPersistent = true ) { this.mTableName = TableName; this.Setup(CurrentUser, BindDefinition, Key, AllowSort, AllowPaging, eSourceType.Table, SelectorType, ModuleName, IsPersistent, true); this.Session[CnsTableName + this.mObjID] = this.mTableName; }
public void Setup( ClsSysCurrentUser CurrentUser , List<ClsBindGridColumn_Web_Telerik> BindDefinition = null , string Key = "" , bool AllowSort = false , bool AllowPaging = false , eSourceType SourceType = eSourceType.Base , Methods_Web_Telerik.eSelectorType SelectorType = Methods_Web_Telerik.eSelectorType.None , string ModuleName = "" , bool IsPersistent = true , bool IsBind = false) { if (SelectorType != Methods_Web_Telerik.eSelectorType.None && Key.Trim() == "") { throw new Exception("Key is required when using selectors."); } if (this.mObjID == null) { this.mCurrentUser = CurrentUser; this.mObjID = this.mCurrentUser.GetNewPageObjectID(); this.ViewState[CnsObjID] = this.mObjID; } this.mProperties = new Control_GridList_Properties(); this.ViewState[CnsProperties] = this.mProperties; this.mProperties.BindDefinition = BindDefinition; this.mProperties.Key = Key; this.mProperties.AllowSort = AllowSort; this.mProperties.AllowPaging = AllowPaging; //this.mProperties.IsRequery = IsRequery; this.mProperties.SourceType = SourceType; this.mProperties.SelectorType = SelectorType; this.mProperties.ModuleName = ModuleName != "" ? CnsState_GridList + ModuleName : CnsState_GridList + this.Page.Request.Url.AbsolutePath; this.mProperties.IsPersistent = IsPersistent; if (this.mProperties.IsPersistent) { this.mState = (Control_GridList_State)this.Session[this.mProperties.ModuleName]; if (this.mState == null) { this.mState = new Control_GridList_State(); this.Session[this.mProperties.ModuleName] = this.mState; } } else { this.mState = new Control_GridList_State(); this.ViewState[CnsState_GridList] = this.mState; } if (IsBind) { this.BindGrid(); } }