コード例 #1
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);
        }
コード例 #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());
 }
コード例 #3
0
 /// <summary>
 /// Call to initialize database if it didn't exist before by creating the needed tables.
 /// </summary>
 private void InitializeDb()
 {
     DbUtility.createTables();
 }
コード例 #4
0
 /// <summary>
 /// Deletes the selected HIT from the database.
 /// </summary>
 public void delete()
 {
     DbUtility.delete(selected.id);
 }
コード例 #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);
 }