public UserDetailPresenter(IDetailView detailView, IUser user) { _view = detailView; LoadUser(user); _view.SomeProperty = _userData; //to populate view with data _view.Show(); // tells the view to show data }
public WizardDetailView(IDetailView view) { Title = view.Title; Name = view.Name; Width = view.Width; Height = view.Height; isMaximaze = view.isMaximaze; HideToolbar = view.HideToolbar; DataSource = view.DataSource; Toolbars = view.Toolbars; Editors = view.Editors; CSHtmlHelper = view.CSHtmlHelper; WizardName = view.WizardName; AjaxForm = view.AjaxForm; }
public DetailUserController(Views.User.UserDetailView view, ReadOnlyContext context, int userID) { _detailUserView = view; _view = (IDetailView)view; _usersRepository = context.GetRepository<DataInterface.Entities.User>(); _leasesRepository = context.GetRepository<DataInterface.Entities.Lease>(); _reservationsRepository = context.GetRepository<DataInterface.Entities.Reservation>(); _bookCopiesRepository = context.GetRepository<DataInterface.Entities.Copy>(); selectedUser = _usersRepository.GetById(userID); var userBorrowedBooks = _leasesRepository.GetByQuery(x => x.User.Id == userID); var userReservedBooks = _reservationsRepository.GetByQuery(x => x.ReservedBy.Id == userID); Views.User.UserDetailView example = new Views.User.UserDetailView(selectedUser, userBorrowedBooks, userReservedBooks); _detailUserView = example; _view = example; if (context.CurrentUser.Role == DataInterface.Enums.Role.Reader) { Name.Enabled = false; Surname.Enabled = false; PESEL.Enabled = false; Mail.Enabled = false; Phone.Enabled = false; Role.Enabled = false; Address.Enabled = false; Postal.Enabled = false; City.Enabled = false; State.Enabled = false; Country.Enabled = false; Active.Enabled = false; Update.Enabled = false; Return.Enabled = false; } if (context.CurrentUser.Role == DataInterface.Enums.Role.Librarian) { Role.Enabled = false; } isRegistered = Active.Checked; Update.Click += Update_Click; Return.Click += ReturnBook_Click; CancelReservation.Click += CancelReservation_Click; ExtendLease.Click += ExtendLease_Click; _detailUserView.Show(); }
public void Update(IDetailView template) { throw new System.NotImplementedException(); }
public void Show(IUser user, IDetailView detailView) { _view = detailView; InitializeView(user); _view.Show(); }
public DetailPresenter(IDetailView view) { this.view = view; //TODO: Add console events and register this as a listener }
public DetailNavigation(IDetailView view, IPopupNavigation popupNavigation, IViewLocator viewLocator, IViewModelFactory viewModelFactory) : base(view, popupNavigation, viewLocator, viewModelFactory) { }
public UserDetailPresenter(IDetailView detailView, IUser user) { _view = detailView; LoadUser(user) _view.Show(); }
public DetailController(IDetailView view) { _view = view ?? throw new ArgumentException(nameof(view)); }