Пример #1
0
        public EditInspectionViewModel(InspectieViewModel inspection, FestiSpecProvider dataServer)
        {
            _previousPage = inspection;
            _dataServer   = dataServer;
            _inspection   = inspection.SelectedInspectie;

            Datum         = _inspection.Datum;
            GebruikerList = new ObservableCollection <GebruikerVM>();
            foreach (var g in _inspection.InspectieModel.Gebruiker1.ToList())
            {
                GebruikerVM gVM = new GebruikerVM(g);
                gVM.IsIncluded = true;
                GebruikerList.Add(gVM);
            }
            PostCode        = _inspection.Postcode;
            huisnummer      = _inspection.Huisnummer;
            Naam            = _inspection.Naam;
            Wens            = _inspection.Wens;
            SelectedKlant   = new KlantVM(_inspection.InspectieModel.Klant);
            SelectedStatus  = new StatusVM(_inspection.InspectieModel.Status);
            SelectedOfferte = new OfferteVM(_inspection.InspectieModel.Offerte);

            KlantList   = _dataServer.GetKlanten();
            StatusList  = _dataServer.GetStatus();
            OfferteList = _dataServer.GetOfferte().ToList();

            EditInspectionCommand = new RelayCommand(EditInspection);
            ShowMapCommand        = new RelayCommand(CalculateRoute);

            apiConnector = new GeodanRepository("6c4c63db-de9a-11e8-8aac-005056805b87");
        }
Пример #2
0
        public AddInspectionViewModel(LoginViewModel providerItem, InspectieViewModel inspectie)
        {
            this.inspectionVM = inspectie;
            _dataServer       = providerItem.dataServer;
            GebruikerList     = new ObservableCollection <GebruikerVM>();
            this.Datum        = DateTime.Now;

            KlantList                = _dataServer.GetKlanten();
            StatusList               = _dataServer.GetStatus();
            OfferteList              = this._dataServer.GetOfferte().ToList();
            AddInspectionCommand     = new RelayCommand(AddInspectie);
            CalculateDistanceCommand = new RelayCommand(OpenDirection);
            CalculateRouteCommand    = new RelayCommand(CalculateRoute);

            apiConnector = new GeodanRepository("6c4c63db-de9a-11e8-8aac-005056805b87");
        }