Example #1
0
         private void EditUserControl_Loaded(object sender, RoutedEventArgs e)
         {

             _vm = this.DataContext as EditAgriUsersViewModel;
             if (NavigationService != null)
             {
                 Guid userId = PresentationUtility.ParseIdFromUrl(NavigationService.CurrentSource);
                 string navParam = PresentationUtility.GetLastTokenFromUri(NavigationService.CurrentSource);
                 if (navParam != null && navParam.ToLower() == "driver")
                     _vm.CreateDriver = true;
                 else _vm.CreateDriver = false;
                 cmbUserType.IsEnabled = !_vm.CreateDriver;
                 _vm.Load(userId);
             }
         }
Example #2
0
 public EditUser()
 {
     InitializeComponent();
     _vm = DataContext as EditAgriUsersViewModel;
 }