Ejemplo n.º 1
0
        private async void AddEditCustomerAsync(AddEditCustomerEventArgs obj)
        {
            LoginViewModel = null;
            if (CurrentUser == null)
            {
                MenuViewModel = null;
            }

            CurrentView = _addEditCustomerViewModelCreator();
            await CurrentView.LoadAsync(obj.Id);
        }
Ejemplo n.º 2
0
        private async void AfterLoginSuccessed(AfterLoginSuccessedEventArgs obj)
        {
            CurrentUser = obj.Person;
            Role        = obj.Role;

            LoginViewModel = null;
            CurrentView    = _carListViewModelCreator();
            await CurrentView.LoadAsync();

            MenuViewModel = _menuViewModelCreator();
            MenuViewModel.Load(Role, CurrentUser);
        }
Ejemplo n.º 3
0
 private async void OpenMainPageAsync(OpenMainPageEventArgs obj)
 {
     if (CurrentUser == null)
     {
         LoginViewModel = _loginViewModelCreator();
         CurrentView    = null;
         MenuViewModel  = null;
     }
     else
     {
         CurrentView = _carListViewModelCreator();
         await CurrentView.LoadAsync();
     }
 }
Ejemplo n.º 4
0
 private async void OpenCustomerListAsync(OpenCustomerListEventArgs obj)
 {
     //if the event comes from a new customer, go to the login view
     if (CurrentUser == null)
     {
         LoginViewModel = _loginViewModelCreator();
         CurrentView    = null;
         MenuViewModel  = null;
     }
     else
     {
         CurrentView = _customerListViewModelCreator();
         await CurrentView.LoadAsync();
     }
 }
Ejemplo n.º 5
0
 private async void AddEditCarAsync(AddEditCarEventArgs obj)
 {
     CurrentView = _addEditCarViewModelCreator();
     await CurrentView.LoadAsync(obj.Id);
 }
Ejemplo n.º 6
0
 private async void OpenCarDetailsAsync(OpenCarDetailViewEventArgs obj)
 {
     CurrentView = _carDetailViewModelCreator();
     await CurrentView.LoadAsync(obj.Id, CurrentUser);
 }
Ejemplo n.º 7
0
 private async void OpenCarListAsync(OpenCarListEventArgs obj)
 {
     CurrentView = _carListViewModelCreator();
     await CurrentView.LoadAsync();
 }
Ejemplo n.º 8
0
 private async void OpenCustomerDetailsAsync(OpenCustomerDetailViewEventArgs obj)
 {
     CurrentView = _customerDetailViewModelCreator();
     await CurrentView.LoadAsync(obj.Id);
 }
Ejemplo n.º 9
0
 private async void OpenCheckoutPageAsync(OpenCheckoutEventArgs obj)
 {
     CurrentView = _checkoutViewModelCreator();
     await CurrentView.LoadAsync(obj.Id, CurrentUser.Id);
 }
Ejemplo n.º 10
0
 private async void OpenSalePageAsync(OpenSaleListEventArgs obj)
 {
     CurrentView = _saleListViewModelCreator();
     await CurrentView.LoadAsync();
 }
Ejemplo n.º 11
0
 private async void OpenEmployeeDetailsAsync(OpenEmployeeDetailViewEventArgs obj)
 {
     CurrentView = _employeeDetailViewModelCreator();
     await CurrentView.LoadAsync(obj.Id);
 }
Ejemplo n.º 12
0
 private async void OpenMyCarsAsync(ShowMyCarsEventArgs obj)
 {
     CurrentView = _myCarsViewModelCreator();
     await CurrentView.LoadAsync(CurrentUser.Id);
 }