private void CloseWindow(IClosableDialog window)
 {
     if (window != null)
     {
         window.Close();
     }
 }
예제 #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);
        }
예제 #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);
 }
예제 #4
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);
 }