public void Page_Load(object sender, EventArgs e) { if (IsForbidden) { return; } PageUtils.CheckRequestParameter("PublishmentSystemID"); if (!IsPostBack) { rblTableType.Items.Add(EAuxiliaryTableTypeUtils.GetListItem(EAuxiliaryTableType.BackgroundContent, true)); rblTableType.Items.Add(EAuxiliaryTableTypeUtils.GetListItem(EAuxiliaryTableType.UserDefined, false)); if (Body.IsQueryExists("ModelID")) { tbModelID.Enabled = false; var modelId = Body.GetQueryString("ModelID"); var modelInfo = BaiRongDataProvider.ContentModelDao.GetContentModelInfo(modelId, PublishmentSystemId); if (modelInfo != null) { tbModelID.Text = modelId; tbModelName.Text = modelInfo.ModelName; tbIconUrl.Text = modelInfo.IconUrl; ControlUtils.SelectListItemsIgnoreCase(rblTableType, EAuxiliaryTableTypeUtils.GetValue(modelInfo.TableType)); rblTableType_SelectedIndexChanged(null, null); ControlUtils.SelectListItemsIgnoreCase(ddlTableName, modelInfo.TableName); tbDescription.Text = modelInfo.Description; } } else { rblTableType_SelectedIndexChanged(null, null); } } }
public void Page_Load(object sender, EventArgs e) { if (IsForbidden) { return; } var enName = Body.GetQueryString("ENName"); if (!IsPostBack) { var pageTitle = !string.IsNullOrEmpty(enName) ? "编辑辅助表" : "添加辅助表"; BreadCrumbSys(AppManager.Sys.LeftMenu.Auxiliary, pageTitle, AppManager.Sys.Permission.SysAuxiliary); ltlPageTitle.Text = pageTitle; //cms AuxiliaryTableType.Items.Add(EAuxiliaryTableTypeUtils.GetListItem(EAuxiliaryTableType.BackgroundContent, true)); if (AppManager.IsWcm()) { //wcm AuxiliaryTableType.Items.Add(EAuxiliaryTableTypeUtils.GetListItem(EAuxiliaryTableType.GovPublicContent, false)); AuxiliaryTableType.Items.Add(EAuxiliaryTableTypeUtils.GetListItem(EAuxiliaryTableType.GovInteractContent, false)); } //others AuxiliaryTableType.Items.Add(EAuxiliaryTableTypeUtils.GetListItem(EAuxiliaryTableType.VoteContent, false)); AuxiliaryTableType.Items.Add(EAuxiliaryTableTypeUtils.GetListItem(EAuxiliaryTableType.JobContent, false)); AuxiliaryTableType.Items.Add(EAuxiliaryTableTypeUtils.GetListItem(EAuxiliaryTableType.UserDefined, false)); if (!string.IsNullOrEmpty(enName)) { var info = BaiRongDataProvider.TableCollectionDao.GetAuxiliaryTableInfo(enName); if (info != null) { TableENName.Text = info.TableEnName; TableENName.Enabled = false; TableCNName.Text = info.TableCnName; Description.Text = info.Description; ControlUtils.SelectListItems(AuxiliaryTableType, EAuxiliaryTableTypeUtils.GetValue(info.AuxiliaryTableType)); AuxiliaryTableType.Enabled = false; } } } }