/// <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> /// Gets all HITs in database as an ArrayList of HitInfo /// </summary> /// <returns>An ArrayList of HitInfos</returns> public static ArrayList getHITs() { return(DbUtility.getHITs()); }
/// <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); }
/// <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); }