/// <summary> /// 页面加载 /// </summary> public override void RenderPage() { if (ThemeID.IsNoNull()) { objSys_Theme = objThemeRule.Sys_Theme.First(s => s.ThemeID == ThemeID); Page.DataBind(); } else { } }
public SimpleCalendar(ThemeID themeId, LanguageID lanugageId, ConsoleUtility formatter) { var themes = new List <Theme> { new DarkTheme(), new LightTheme() }; var languages = new List <Language> { new Polish(), new English() }; Formatter = formatter; SelectedTheme = themes.Find(x => x.ThemeId == themeId); SelectedLanugage = languages.Find(x => x.LanguageId == lanugageId); }
/// <summary> /// 保存信息 /// </summary> public void SaveInfo() { if (ThemeID.IsNull()) { objSys_Theme.ThemeID = Guid.NewGuid().ToString(); objSys_Theme.ThemeTypeID = ThemeTypeID; ///主题名称 objSys_Theme.ThemeName = txtThemeName.TextCutWord(50); ///是否启用 objSys_Theme.IsEnable = false; objThemeRule.InsertTheme(objSys_Theme); MessageDialog("新增成功", "ThemeList.aspx?ThemeTypeID=" + ThemeTypeID); } else { objSys_Theme = objThemeRule.Sys_Theme.First(p => p.ThemeID == ThemeID); ///主题名称 objSys_Theme.ThemeName = txtThemeName.TextCutWord(50); objThemeRule.UpdateTheme(objSys_Theme); MessageDialog("修改成功", "ThemeList.aspx?ThemeTypeID=" + ThemeTypeID); } }