Ejemplo n.º 1
0
        public KundeView()
        {
            InitializeComponent();

            KundeVm     = new KundeViewModel();
            DataContext = KundeVm;
        }
 public MainWindowViewModel(AutoViewModel autoViewModel, KundeViewModel kundeViewModel,
                            ReservationViewModel reservationViewModel)
 {
     this.autoViewModel        = autoViewModel;
     this.kundeViewModel       = kundeViewModel;
     this.reservationViewModel = reservationViewModel;
 }
 public MainWindowViewModel(AutoViewModel autoViewModel, KundeViewModel kundeViewModel,
     ReservationViewModel reservationViewModel)
 {
     this.autoViewModel = autoViewModel;
     this.kundeViewModel = kundeViewModel;
     this.reservationViewModel = reservationViewModel;
 }
Ejemplo n.º 4
0
        public void Test_KundenLoad()
        {
            KundeViewModel vm = new KundeViewModel(kernel.Get <IServiceFactory>());

            vm.Init();

            Assert.IsTrue(vm.Kunden.Count > 0);
        }
Ejemplo n.º 5
0
        public void Test_KundenLoad()
        {
            KundeViewModel vm = new KundeViewModel(kernel.Get <IServiceFactory>());

            vm.Init();

            Assert.AreEqual(4, vm.Kunden.Count);
        }
Ejemplo n.º 6
0
        public void Test_KundenLoad()
        {
            KundeViewModel vm = new KundeViewModel(kernel.Get <IServiceFactory>());

            vm.Init();

            Assert.Inconclusive("Test not implemented.");
        }
Ejemplo n.º 7
0
        public void KundenLoadTest()
        {
            var model       = new KundeViewModel();
            var loadCommand = model.LoadCommand;

            Assert.IsTrue(loadCommand.CanExecute(null));
            loadCommand.Execute(null);
            Assert.AreEqual(4, model.Kunden.Count);
        }
Ejemplo n.º 8
0
        public void Test_KundenLoad()
        {
            KundeViewModel vm = new KundeViewModel(kernel.Get <IServiceFactory>());

            vm.Init();

            Assert.IsTrue(vm.LoadCommand.CanExecute(null));
            Assert.AreEqual(4, vm.Kunden.Count);
        }
Ejemplo n.º 9
0
        public MainWindow()
        {
            InitializeComponent();

            Kvm         = new KundeViewModel();
            Rvm         = new ReservationViewModel();
            Avm         = new AutoViewModel();
            DataContext = this;
        }
Ejemplo n.º 10
0
        public void KundenLoadTest()
        {
            KundeViewModel kundeViewModel = new KundeViewModel();

            Assert.IsTrue(kundeViewModel.LoadCommand.CanExecute(null));

            kundeViewModel.LoadCommand.Execute(null);
            Assert.AreEqual <int>(4, kundeViewModel.Kunden.Count);
        }
Ejemplo n.º 11
0
        public Kunde(int kundeId)
        {
            InitializeComponent();

            ViewModel = new KundeViewModel(kundeId);
            ViewModel.OnRequestClose += (s, e) => this.Close();
            ViewModel.OnSaveError    += (s, e) => MessageBox.Show((string)Application.Current.TryFindResource("message_error_save_kunde_message"), (string)Application.Current.TryFindResource("message_error_save_kunde_title"), MessageBoxButton.OK, MessageBoxImage.Error);
            DataContext = this;
        }
Ejemplo n.º 12
0
        public void KundenLoadTest()
        {
            TestEnvironmentHelper.InitializeTestData();
            var model   = new KundeViewModel();
            var command = model.LoadCommand;

            Assert.IsTrue(command.CanExecute(null));
            command.Execute(null);
            Assert.AreEqual(4, model.Kunden.Count);
        }
Ejemplo n.º 13
0
        public KundeDetails(KundeViewModel ViewModel, KundeForm Parent)
        {
            InitializeComponent();

            this.ViewModel = ViewModel;
            this.Parent    = Parent;

            this.Location = new Point(370, 80); //Ændrer location, midlertidig for at jeg ikke f****r design ved at åbne designer -MArtin

            LoadItems();
        }
Ejemplo n.º 14
0
        /// <summary>
        /// Lädt die Daten vom Server, wenn die Seite angezeigt wird.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private async void ContentPage_Appearing(object sender, EventArgs e)
        {
            KundeViewModel vm = BindingContext as KundeViewModel;
            await vm.LoadKundenData();

            await vm.LoadTrainingslevel();

            //A little ugly solution -> but to set the datepickers date to an string in Kundendata,
            //we must parse it first to date
            Gebdate.Date = DateTime.Parse(vm.KundenData.GebDatum);
        }
Ejemplo n.º 15
0
        public void KundenLoadTest()
        {
            TestEnvironmentHelper.InitializeTestData();

            KundeViewModel target        = new KundeViewModel();
            ICommand       targetCommand = target.LoadCommand;

            Assert.IsTrue(targetCommand.CanExecute(null));

            targetCommand.Execute(null);

            Assert.AreEqual(4, target.Kunden.Count);
        }
        /// <summary>
        /// Legt die Detailseite auf den Navigation Stack und lädt diese.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private async void ProfileList_ItemSelected(object sender, SelectedItemChangedEventArgs e)
        {
            KundeViewModel vm   = BindingContext as KundeViewModel;
            NavigationItem item = e.SelectedItem as NavigationItem;

            if (item.Title == "delete Account")
            {
                await Navigation.PushAsync(new DeleteAccountPage());
            }
            else
            {
                await Navigation.PushAsync(new PersonalProfilePage());
            }
        }
Ejemplo n.º 17
0
 public AddKundeWindow(AutoReservationService service)
 {
     InitializeComponent();
     DataContext = new KundeViewModel(this, service);
 }
Ejemplo n.º 18
0
 public RegisterPage()
 {
     InitializeComponent();
     BindingContext = new KundeViewModel();
 }
Ejemplo n.º 19
0
 /// <summary>
 /// Lädt die Daten vom Server, wenn die Seite angezeigt wird.
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private async void ContentPage_Appearing(object sender, EventArgs e)
 {
     KundeViewModel vm = BindingContext as KundeViewModel;
     await vm.LoadTrainingslevel();
 }
Ejemplo n.º 20
0
 public PersonalProfilePage()
 {
     InitializeComponent();
     BindingContext = new KundeViewModel();
 }