/// <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);
        }
Example #2
0
 /// <summary>
 /// Gets all HITs in database as an ArrayList of HitInfo
 /// </summary>
 /// <returns>An ArrayList of HitInfos</returns>
 public static ArrayList getHITs()
 {
     return(DbUtility.getHITs());
 }
Example #3
0
 /// <summary>
 /// Call to initialize database if it didn't exist before by creating the needed tables.
 /// </summary>
 private void InitializeDb()
 {
     DbUtility.createTables();
 }
 /// <summary>
 /// Deletes the selected HIT from the database.
 /// </summary>
 public void delete()
 {
     DbUtility.delete(selected.id);
 }
Example #5
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);
 }