public AddUserPageViewModel(AppUserView user = null) { AddCommand = new AsyncDelegateCommand(OnAdd); CloseCommand = new AsyncDelegateCommand(OnClose); User = new AddAppUserView(); RoleList = new ObservableCollection <KeyValuePair <AddAppUserViewRole, string> > { new KeyValuePair <AddAppUserViewRole, string>(AddAppUserViewRole.None, "None"), new KeyValuePair <AddAppUserViewRole, string>(AddAppUserViewRole.Plant_Admin, "Plant Admin"), new KeyValuePair <AddAppUserViewRole, string>(AddAppUserViewRole.Plant_Viewer, "Plant Viewer"), new KeyValuePair <AddAppUserViewRole, string>(AddAppUserViewRole.Sales_Rep, "Sales Rep"), }; SelectedRole = _roleList.First(); }
public async Task <AppUserView> AddUser(AddAppUserView context) { return(await AXClient.Instance.AddUserAsync(context) .ConfigureAwait(false)); }