示例#1
0
        public AddOfferteViewModel(LoginViewModel providerItem, OfferteViewModel offerte)
        {
            this.dataServer = providerItem.dataServer;
            this.offerte    = offerte;

            AddOfferteCommand = new RelayCommand(AddOfferte);
        }
 public AddCustomerViewModel(CustomerListViewModel previousPage, FestiSpecProvider dataServer)
 {
     _previousPage      = previousPage;
     _dataServer        = dataServer;
     AddCustomerCommand = new RelayCommand(AddCustomer);
     CancelCommand      = new RelayCommand(Cancel);
 }
示例#3
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");
        }
 public CertificaatViewModel(LoginViewModel providerItem, GebruikerVM gebruiker)
 {
     this.dataserver              = providerItem.dataServer;
     SelectedGebruiker            = gebruiker;
     CertificateList              = dataserver.GetCertificaten();
     AdministerCertificateCommand = new RelayCommand <AdministerCertificateWindow>(AdministerCertificate);
 }
        public AddQuestionListViewModel(LoginViewModel providerItem, QuestionListViewModel oldPage)
        {
            _oldPage       = oldPage;
            dataServer     = providerItem.dataServer;
            InspectionList = dataServer.GetInspecties();
            CreateTemplate();

            if (_oldPage.SelectedVragenlijst == null)
            {
                NewVragenlijst        = new VragenlijstVM("");
                NewVragenlijst.Vragen = new ObservableCollection <Vraag>();
                AddVragenlijstCommand = new RelayCommand <AddQuestionListWindow>(AddVragenlijst);
            }
            else
            {
                NewVragenlijst        = _oldPage.SelectedVragenlijst;
                NewVragenlijst.Vragen = new ObservableCollection <Vraag>(_oldPage.SelectedVragenlijst.Vragen);
                foreach (InspectieVM i in InspectionList)
                {
                    if (i.Naam.Equals(_oldPage.SelectedVragenlijst.Inspectie.Naam))
                    {
                        SelectedInspection = i;
                    }
                }
            }

            // Command handlers
            SaveEditVragenlijstCommand = new RelayCommand <EditQuestionListWindow>(SaveEditVragenlijst);
            AddQuestionCommand         = new RelayCommand <AddQuestionListWindow>(AddQuestionWindow);
            AddQuestionInEditCommand   = new RelayCommand <EditQuestionListWindow>(AddQuestionInEditWindow);
            CancelAddCommand           = new RelayCommand <AddQuestionListWindow>(CloseAddWindow);
            CancelEditCommand          = new RelayCommand <EditQuestionListWindow>(CloseEditWindow);
            DeleteQuestionCommand      = new RelayCommand(DeleteQuestion);
        }
 public EditOfferteViewModel(FestiSpecProvider dataServer, OfferteViewModel previousPage)
 {
     _dataServer     = dataServer;
     _previousPage   = previousPage;
     _offerte        = previousPage.SelectedOfferte.OfferteModel;
     SaveDataCommand = new RelayCommand(SaveData);
 }
 public CustomerListViewModel(FestiSpecProvider dataServer)
 {
     this._dataServer   = dataServer;
     Customers          = dataServer.GetKlanten();
     AddKlantCommand    = new RelayCommand(AddKlantWindow);
     UpdateKlantCommand = new RelayCommand(UpdateKlant);
     RemoveKlantCommand = new RelayCommand(RemoveKlant);
 }
        public AddInspectorViewModel(LoginViewModel providerItem, InspectorViewModel Inspectors)
        {
            this.dataServer = providerItem.dataServer;

            Inspector = Inspectors;

            AddInspectorCommand = new RelayCommand(AddInspector);
        }
示例#9
0
 public AddQuestionViewModel(AddQuestionListViewModel oldPage)
 {
     OpenWindowCommand  = new RelayCommand <AddQuestionListWindow>(AddQuestionWindow);
     _oldPage           = oldPage;
     _dataServer        = _oldPage.dataServer;
     AddQuestionCommand = new RelayCommand(AddQuestion);
     QuestionTypes      = new ObservableCollection <Vraagtype>(_dataServer.GetQuestionTypes());
     Antwoorden         = new ObservableCollection <string>();
     Cancel             = new RelayCommand <AddQuestionWindow>(CloseWindow);
     Stackpanel         = "Collapsed";
 }
        public QuestionListViewModel(LoginViewModel providerItem)
        {
            QuestionList     = providerItem.dataServer.GetVragenlijsten();
            OpenQuestionList = new RelayCommand(OpenNewQuestionList);
            //var AddQuestionWindow = new AddQuestionListWindow();

            DataServer   = providerItem.dataServer;
            QuestionList = DataServer.GetVragenlijsten();

            DeleteVragenlijstCommand = new RelayCommand(DeleteVragenlijst);
            EditVragenlijstCommand   = new RelayCommand(EditVragenlijst);
        }
 public EditCustomerViewModel(CustomerListViewModel customerList, FestiSpecProvider dataServer)
 {
     _previousPage       = customerList;
     _dataServer         = dataServer;
     _id                 = customerList.SelectedCustomer.Id;
     Bedrijfsnaam        = customerList.SelectedCustomer.Bedrijfsnaam;
     EMail               = customerList.SelectedCustomer.EMail;
     Huisnummer          = customerList.SelectedCustomer.Huisnummer.ToString();
     Postcode            = customerList.SelectedCustomer.Postcode;
     Telefoonnummer      = customerList.SelectedCustomer.Telefoonnummer;
     EditCustomerCommand = new RelayCommand(EditCustomer);
     CancelCommand       = new RelayCommand(Cancel);
 }
        protected void Application_Start()
        {
            AreaRegistration.RegisterAllAreas();

            ModelBinders.Binders.Add(typeof(IVragenlijstStap), new StapModelBinder());


            FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
            RouteConfig.RegisterRoutes(RouteTable.Routes);
            BundleConfig.RegisterBundles(BundleTable.Bundles);

            Application["dataServer"] = new FestiSpecProvider();
        }
示例#13
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");
        }
示例#14
0
        public EditInspectorViewModel(LoginViewModel login, InspectorViewModel inspectorViewModel)
        {
            _dataServer = login.dataServer;
            InspectorVM = inspectorViewModel;

            EditInspectorCommand = new RelayCommand(EditInspector);

            _id         = InspectorVM.SelectedInspector.Id;
            this.Name   = InspectorVM.SelectedInspector.Naam;
            LastName    = InspectorVM.SelectedInspector.Achternaam;
            DateOfBirth = InspectorVM.SelectedInspector.GeboorteDatum;
            Zipcode     = InspectorVM.SelectedInspector.Postcode;
            PhoneNumber = InspectorVM.SelectedInspector.Telefoonnummer;
            Email       = InspectorVM.SelectedInspector.Email;
            Password    = InspectorVM.SelectedInspector.Wachtwoord;
            HouseNumber = InspectorVM.SelectedInspector.Huisnummer;
        }
示例#15
0
        public HomeViewModel(FestiSpecProvider dataServer)
        {
            _dataServer = dataServer;
            // Pages
            _inspectionPage   = new InspectionPage();
            _inspectorPage    = new InspectorPage();
            _questionListPage = new QuestionListPage();
            _customerListPage = new CustomerListPage();
            _offertePage      = new OffertePage();
            _homePage         = new HomePage();
            CurrentPage       = _homePage;

            // Commands
            OpenHome           = new RelayCommand(() => CurrentPage = _homePage);
            OpenInspectionPage = new RelayCommand(() => CurrentPage = _inspectionPage);
            OpenInspectorPage  = new RelayCommand(() => CurrentPage = _inspectorPage);
            OpenQuestionList   = new RelayCommand(() => CurrentPage = _questionListPage);
            OpenCustomerList   = new RelayCommand(() => CurrentPage = _customerListPage);
            OpenOffertes       = new RelayCommand(() => CurrentPage = _offertePage);
            LogoutUser         = new RelayCommand <HomeWindow>(Logout);
        }
示例#16
0
 public LoginViewModel()
 {
     dataServer = new FestiSpecProvider();
     CheckLogin = new RelayCommand <LoginWindow>(ValidateCredentials);
 }
 public HomePageViewModel(FestiSpecProvider dataServer)
 {
     Id          = "ID: " + dataServer._gebruiker.Id;
     Name        = "Gebruiker: " + dataServer._gebruiker.Naam + " " + dataServer._gebruiker.Achternaam;
     CurrentTime = "Actief sinds: " + DateTime.Now.ToString();
 }