public ucModuleTreeList() { this.OptionsBehavior.Editable = false; this.OptionsView.ShowCheckBoxes = true; this.OptionsView.ShowColumns = false; _TreeListInitial = new TreeListInitial(this); if (CheckDesingModel.IsDesingMode) { return; } var Column = this.Columns.Add(); Column.Caption = "名称"; Column.FieldName = "DisplayName"; Column.MinWidth = 32; Column.Name = "treeListColumn1"; Column.Visible = true; Column.VisibleIndex = 0; this.AfterCheckNode += ucModuleList_AfterCheckNode; this.KeyFieldName = "PKey"; this.ParentFieldName = "ParentKey"; bll = new bllModules(); this.DataSource = bll.GetSystemModules(); }
void LoadDataSource() { if (CheckDesingModel.IsDesingMode) { return; } DataTable dtSource = null; switch (DataSourceType) { case DataType.所有系统模块: { dtSource = bll.GetSystemModules(); } break; case DataType.当前用户模块: { dtSource = bll.GetTreeModule_CurrentUser(); } break; } if (dtSource != null) { this.DataSource = dtSource; RefreshNodeCheckState(); } }