protected override bool SetSettingItemValue(SettingBase setting, System.Reflection.PropertyInfo property) { if (property.Name == "AllNotify") { NotifySettingItemCollection items = new NotifySettingItemCollection(); NotifySettingItem newItem; foreach (NotifyType nt in NotifyBO.AllNotifyTypes) { newItem = new NotifySettingItem(); newItem.NotifyType = nt.TypeID; newItem.OpenState = _Request.Get <NotifyState>(string.Format("{0}_OpenState", nt.TypeID), Method.Post, NotifyState.DefaultOpen); items.Add(newItem); } ((NotifySettings)setting).AllNotify = items; return(true); } else if (property.Name == "NotifySaveDays") { property.SetValue(setting, _Request.Get <int>("saveDays", 0), null); return(true); } else if (property.Name == "NotifySaveRows") { property.SetValue(setting, _Request.Get <int>("SaveRows", 0), null); return(true); } else if (property.Name == "DataClearMode") { if (_Request.Get <bool>("IsCombin", false)) { property.SetValue(setting, JobDataClearMode.CombinMode, null); } } return(base.SetSettingItemValue(setting, property)); }
protected override bool SetSettingItemValue(SettingBase setting, System.Reflection.PropertyInfo property) { if (property.Name == "AllNotify") { NotifySettingItemCollection items = new NotifySettingItemCollection(); NotifySettingItem newItem; foreach ( NotifyType nt in NotifyBO.AllNotifyTypes) { newItem = new NotifySettingItem(); newItem.NotifyType = nt.TypeID; newItem.OpenState = _Request.Get<NotifyState>( string.Format("{0}_OpenState",nt.TypeID), Method.Post, NotifyState.DefaultOpen); items.Add( newItem ); } ((NotifySettings)setting).AllNotify = items; return true; } else if (property.Name == "NotifySaveDays") { property.SetValue(setting, _Request.Get<int>("saveDays", 0), null); return true; } else if (property.Name == "NotifySaveRows") { property.SetValue(setting, _Request.Get<int>("SaveRows", 0), null); return true; } else if (property.Name == "DataClearMode") { if (_Request.Get<bool>("IsCombin",false)) { property.SetValue(setting, JobDataClearMode.CombinMode, null); } } return base.SetSettingItemValue(setting, property); }