public HolidayDetailsViewModel(SKDHoliday holiday = null) { if (holiday == null) { Title = "Новый приаздничный день"; holiday = new SKDHoliday() { Name = "Понедельный график", }; } else { Title = "Редактирование понедельногор графика"; } AvailableTypeNos = new ObservableCollection<int>(); for (int i = 1; i <= 8; i++) { AvailableTypeNos.Add(i); } Holiday = holiday; DateTime = holiday.DateTime; TypeNo = holiday.TypeNo; Name = holiday.Name; }
public HolidayViewModel(SKDHoliday holiday) { Holiday = holiday; }