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