public AllUsersViewModel(AllUsersWindow.UpdateGridDelegate updateDelegate, AllUsersWindow.GetSelectedIndexDelegate getSelectedIndexDelegate, AllUsersWindow.GetSelectedSortItemDelegate getSelectedSortItem) { _update = updateDelegate; _getSelectedUser = getSelectedIndexDelegate; _getSelectedSortItem = getSelectedSortItem; DisplayableUsers = new List <User>(); User.Preload(DisplayableUsers); _update(DisplayableUsers); }
public PersonCreationWindow(AllUsersViewModel.DelegateAddUser delegateAddPerson, AllUsersWindow.UpdateGridDelegate _update, User u = null) { InitializeComponent(); DataContext = new PersonCreationViewModel(CloseWindow, delegateAddPerson, _update, u); }
public PersonCreationViewModel(PersonCreationWindow.DelegateCloseWindow closeWindow, AllUsersViewModel.DelegateAddUser addUser, AllUsersWindow.UpdateGridDelegate _update, User u = null) { _closeAction = closeWindow; _proceedAction = addUser; if (u != null) { FirstName = u.FirstName; LastName = u.LastName; Email = u.Email; DateOfBirth = u.DateOfBirth; } }