private bool IsBoardValid() { if (BoardCode.IsEmpty()) { _editor.SetSaveError(LocalizedStrings.Str1433); return(false); } if (SpecialHolidays.Intersect(SpecialWorkingDays).Any()) { _editor.SetSaveError(LocalizedStrings.Str1434); return(false); } return(true); }
private ExchangeBoard CreateBoardFromData() { return(new ExchangeBoard { Code = BoardCode, ExpiryTime = ExpiryTime.TimeOfDay, IsSupportAtomicReRegister = IsSupportAtomicReRegister, IsSupportMarketOrders = IsSupportMarketOrders, WorkingTime = new WorkingTime { Periods = Periods.Select(p => new WorkingTimePeriod { Till = p.Till, Times = p.WorkTimes.ToArray() }).ToArray(), SpecialWorkingDays = SpecialWorkingDays.Select(m => m.DateTime).ToArray(), SpecialHolidays = SpecialHolidays.Select(m => m.DateTime).ToArray() }, }); }