public FIRViewModel(FIR fir, FIRService firService) { if (fir == null) throw new ArgumentNullException("fir"); if (firService == null) throw new ArgumentNullException("firService"); _fir = fir; _firService = firService; // _customerType = Strings.CustomerViewModel_CustomerTypeOption_NotSpecified; }
public MainWindowViewModel(NotamDataContext dataContext ) { base.DisplayName = Entity.MainWindowViewModel_DisplayName; _originService = new OriginService(dataContext); _firService = new FIRService(dataContext); _notamService = new NotamService(dataContext); _aerodomService = new AerodomService(dataContext); _notamCodeService = new NotamCodeService(dataContext); _snowtamService = new SnowtamService(dataContext); _authService = new AuthenticationService(dataContext); _aftnService = new AftnService(dataContext); _intlNotamService = new IntlNotamService(dataContext); var workspace = new NotamSearchViewModel(_notamService, Workspaces); this.Workspaces.Add(workspace); this.SetActiveWorkspace(workspace); System.Windows.Threading.DispatcherTimer dispatcherTimer = new System.Windows.Threading.DispatcherTimer(); dispatcherTimer.Tick += new EventHandler(dispatcherTimer_Tick); dispatcherTimer.Interval = new TimeSpan(0,1,0); dispatcherTimer.Start(); }
public FIRViewModel(FIR fir, FIRService firService, ObservableCollection<WorkspaceViewModel> parent) : this(fir, firService) { parentWorkSpaces = parent; }
public List<FIR> GetAllFIRs() { var firService = new FIRService(_dataContext); return firService.GetFIRs(); }
public List<FIR> GetAllFIRs() { FIRService fIRService = new FIRService(this._dataContext); return fIRService.GetFIRs(); }
public List<Aerodom> GetAllAerodomsForFIRStr(string sfir) { var aeroService = new AerodomService(_dataContext); List<Aerodom> aeroList = aeroService.GetAerodoms(); var firService = new FIRService(_dataContext); FIR fir = firService.GetFIRs().Where(x => x.Code.Equals(sfir)).FirstOrDefault(); return aeroList.Where(x => x.FIR == fir).OrderBy(x => x.Code).ToList(); }
public Dictionary<string, string> GetAddressList(List<string> AeroList) { var firService = new FIRService(_dataContext); Dictionary<string, string> retDic = new Dictionary<string, string>(); List<Aerodom> AerodomRecords = GetAerodoms(); foreach (string aeroItem in AeroList) { Aerodom result = AerodomRecords.Find(x => x.Code == aeroItem); if (result != null) if (!retDic.ContainsKey(aeroItem)) retDic.Add(aeroItem, result.Address); } return retDic; }