Esempio n. 1
0
 /// <summary>
 /// show or hide export to excel button
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void ContextShowHideExportButton(object sender, ContextEditionEventArgs<Visibility> e)
 {
     paginator.CanExportExcel = e.Context;
 }
Esempio n. 2
0
 private void ContextShowHideExportButtons(object sender, ContextEditionEventArgs<Visibility> e)
 {
     paginator.CanExportExcel = e.Context;
     paginator.CanExportRN = App.CurrentUser.IsInRole(UserRoleEnum.BorderAgent, UserRoleEnum.LOAdmin, UserRoleEnum.SuperAdmin, UserRoleEnum.Supervisor)
         && e.Context == Visibility.Visible ? Visibility.Visible : Visibility.Collapsed;
 }
Esempio n. 3
0
 /// <summary>
 /// When request to display a certificate to edit
 /// </summary>
 /// <param name="sender">The parameter is not used.</param>
 /// <param name="e">Contains the view model to the new page to be displayed</param>
 private void CertificateEditionRequested(object sender, ContextEditionEventArgs<CertificateViewModel> e)
 {
     var edition = new CertificateWindow();
     edition.DataContext = e.Context;
     OpenClosableTabItem(e.Context.Label, edition);
 }
Esempio n. 4
0
 /// <summary>
 /// When request to display a release note to edit
 /// </summary>
 /// <param name="sender">The parameter is not used.</param>
 /// <param name="e">Contains the view model to the new page to be displayed</param>
 private void OnReleaseNoteEditionRequested(object sender, ContextEditionEventArgs<ReleaseNoteViewModel> e)
 {
     var edition = new ReleaseNoteChildWindow();
     edition.DataContext = e.Context;
     edition.Show();
     e.Context.CanceledItem += (s, ev) =>
     {
         edition.Close();
     };
 }
Esempio n. 5
0
 /// <summary>
 /// When request to display a document to edit
 /// </summary>
 /// <param name="sender">The parameter is not used.</param>
 /// <param name="e">Contains the view model to the new page to be displayed</param>
 private void OnDocumentEditionRequested(object sender, ContextEditionEventArgs<DocumentViewModel> e)
 {
     var edition = new DocumentChildWindow();
     edition.DataContext = e.Context;
     edition.Show();
     e.Context.CloseEditableWindow = edition.Close;
 }
Esempio n. 6
0
 /// <summary>
 /// When request to display a user to edit
 /// </summary>
 /// <param name="sender">The parameter is not used.</param>
 /// <param name="e">Contains the view model to the new page to be displayed</param>
 private void UserEditionRequested(object sender, ContextEditionEventArgs<UserViewModel> e)
 {
     var edition = new UserWindow();
     edition.DataContext = e.Context;
     OpenClosableTabItem(e.Context.Label, edition);
 }