Пример #1
0
 public AdminCarsMenu(RentalCarViewModel rentalCarViewModel)
 {
     InitializeComponent();
     this.rentalCarViewModel = rentalCarViewModel;
     this.rentalCarViewModel.DeserializeCars();
     this.rentalCarViewModel.UnfilteredCars();
     RentalCar.UpdateCarsStatus(this.rentalCarViewModel.Cars.ToList());
 }
Пример #2
0
 public RentCars(RentalCarViewModel rentalCarViewModel, User user)
 {
     InitializeComponent();
     this.rentalCarViewModel = rentalCarViewModel;
     this.rentalCarViewModel.DeserializeCars();
     this.rentalCarViewModel.UnfilteredCars();
     this.user = user;
     RentalCar.UpdateCarsStatus(this.rentalCarViewModel.Cars.ToList());
 }
Пример #3
0
 public EditCar(RentalCarViewModel rentalCarViewModel, Grid parent, AdminCarsMenu carmenu)
 {
     InitializeComponent();
     this.parent               = parent;
     this.carmenu              = carmenu;
     this.rentalCarViewModel   = rentalCarViewModel;
     this.rentalCar            = this.rentalCarViewModel.CarToEditOrCreate;
     txtbox_carBrand.Text      = rentalCar.Brand;
     txtbox_carModel.Text      = rentalCar.Model;
     txtbox_licensePlate.Text  = rentalCar.LicensePlate;
     comboBox_carType.Text     = rentalCar.Type;
     numeric_pricePerDay.Value = rentalCar.PricePerDay;
 }
Пример #4
0
        public AdminMenu(Admin admin)
        {
            InitializeComponent();
            timer          = new DispatcherTimer();
            timer.Interval = new TimeSpan(0, 0, 0, 1);
            timer.Tick    += Timer_Tick;
            timer.Start();
            Timer_Tick(this, EventArgs.Empty);
            HideSubMenu();
            this.admin = admin;

            rentalCarViewModel = new RentalCarViewModel();
            rentalCarViewModel.DeserializeCars();
            rentalCarViewModel.UpdateCarsStatus();
            Desktop.DataContext = rentalCarViewModel;
        }
Пример #5
0
 public RentalServiceMenu(User user)
 {
     InitializeComponent();
     timer          = new DispatcherTimer();
     timer.Interval = new TimeSpan(0, 0, 0, 1);
     timer.Tick    += Timer_Tick;
     timer.Start();
     Timer_Tick(this, EventArgs.Empty);
     HideSubMenu();
     this.user = user;
     DockPanel_UserInfo.DataContext = this.user;
     rentalCarViewModel             = new RentalCarViewModel();
     rentalCarViewModel.DeserializeCars();
     rentalCarViewModel.UpdateCarsStatus();
     Desktop.DataContext = rentalCarViewModel;
     LoadImage();
 }
Пример #6
0
 public AddCar(RentalCarViewModel rentalCarViewModel)
 {
     InitializeComponent();
     this.rentalCarViewModel = rentalCarViewModel;
     this.rentalCar          = this.rentalCarViewModel.CarToEditOrCreate;
 }