private void CloseWindow(IClosableDialog window)
 {
     if (window != null)
     {
         window.Close();
     }
 }
Ejemplo n.º 2
0
        /// <summary>
        /// Updates the respective row in the database.
        /// </summary>
        /// <param name="window">The window that the current view is held in.</param>
        private void Save(IClosableDialog window)
        {
            bool success = DbUtility.update(id, date, requester, name, amount, bonus, status);

            window.Close(success);
        }
Ejemplo n.º 3
0
 /// <summary>
 /// Closes the window without doing anything.
 /// </summary>
 /// <param name="window">The window that the current view is held in.</param>
 private void Cancel(IClosableDialog window)
 {
     window.Close(false);
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Close dialog.
 /// </summary>
 /// <param name="dialog">Closable dialog.</param>
 public static void Close(this IClosableDialog dialog) =>
 dialog.Identifier.Close();
Ejemplo n.º 5
0
 /// <summary>
 /// Close dialog with parameter.
 /// </summary>
 /// <param name="dialog">Closable dialog.</param>
 /// <param name="parameter">Parameter.</param>
 public static void Close(this IClosableDialog dialog, object parameter) =>
 dialog.Identifier.Close(parameter);
Ejemplo n.º 6
0
 /// <summary>
 /// Adds a new HIT to the database.
 /// </summary>
 /// <param name="window"></param>
 private void Add(IClosableDialog window)
 {
     window.Close(true);
     DbUtility.add(DateTime.Parse(date).ToString("MM/dd/yyyy"), requester, name, amount, bonus, selected);
 }