/// <summary> /// 页面加载 /// </summary> public override void RenderPage() { if (ApplicationID.IsNoNull()) { objloger_application = objLogRule.loger_application.FirstOrDefault(s => s.ApplicationID == ApplicationID); if (CheckEditObjectIsNull(objloger_application)) { return; } ///是否自动释放 chkIsDispose.Checked = objloger_application.IsDispose; chkIsNotice.Checked = objloger_application.IsNotice; dropIntervalMinutes.SetSelectValue(objloger_application.IntervalMinutes); chkNoticeCategory.SetSelectValue(objloger_application.NoticeCategory); Page.DataBind(); } else { txtLogerCount.Text = "10"; txtNoticeInterval.Text = "3"; txtNoticeSleep.Text = "10"; dropIntervalMinutes.SelectedValue = "5"; txtMinutesMaxCount.Text = "30"; chkNoticeCategory.SetSelectValue("ExceptionError"); } }
public override void InitDataPage() { dropIntervalMinutes.Items.Clear(); for (int i = 2; i < 30; i++) { dropIntervalMinutes.Items.Add(new ListItem(i.ToString(), i.ToString())); } if (ApplicationID.IsNoNull()) { foreach (loger_category objloger_category in objLogRule.loger_category.Where(s => s.ApplicationID == ApplicationID)) { chkNoticeCategory.Items.Add(new ListItem(objloger_category.CategoryName, objloger_category.CategoryTypeCode)); } } else { List <EnumParameter> objCategoryParameterList = EnumHelper.GetEnumMembers(typeof(LogCategory)); foreach (EnumParameter objEnumParameter in objCategoryParameterList) { chkNoticeCategory.Items.Add(new ListItem(objEnumParameter.Description, objEnumParameter.Key)); } } }