private void checkSettingsExist() { if (isUpdate == null) { isUpdate = new Settings(); isUpdate.Parametr = "updateCalendar"; } if (timer == null) { timer = new Settings(); timer.Parametr = "timerCalendar"; } }
private void Fill() { this.Title = "Обновление календаря"; var settings = UoW.Session.QueryOver <Settings>().List(); isUpdate = settings.FirstOrDefault(x => x.Parametr == "updateCalendar"); if (isUpdate != null) { ycheckbutton.Active = bool.Parse(isUpdate.ValueSettting); } timer = settings.FirstOrDefault(x => x.Parametr == "timerCalendar"); if (timer != null) { yspinbutton.Value = double.Parse(timer.ValueSettting); } }