public AdminCarsMenu(RentalCarViewModel rentalCarViewModel) { InitializeComponent(); this.rentalCarViewModel = rentalCarViewModel; this.rentalCarViewModel.DeserializeCars(); this.rentalCarViewModel.UnfilteredCars(); RentalCar.UpdateCarsStatus(this.rentalCarViewModel.Cars.ToList()); }
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()); }
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; }
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; }
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(); }
public AddCar(RentalCarViewModel rentalCarViewModel) { InitializeComponent(); this.rentalCarViewModel = rentalCarViewModel; this.rentalCar = this.rentalCarViewModel.CarToEditOrCreate; }