/// <summary> /// Loads all User records from the Users table in the database. /// </summary> /// <param name="dtUsers"></param> public static void LoadUsers(TodoDB.UsersDataTable dtUsers) { try { TodoDBTableAdapters.UsersTableAdapter daUsers = new TodoDBTableAdapters.UsersTableAdapter(); daUsers.Fill(dtUsers); } catch (Exception err) { ErrorHandler.ShowErrorMessage(err, "Error in LoadUsers function of TodoDataSync class."); } }
/// <summary> /// Updates all changes in the Users data table to the Users table in the TodoDB database. /// </summary> /// <param name="dtUsers"></param> /// <returns></returns> public static int UpdateUsers(TodoDB.UsersDataTable dtUsers) { try { TodoDBTableAdapters.UsersTableAdapter daUsers = new TodoDBTableAdapters.UsersTableAdapter(); return(daUsers.Update(dtUsers)); } catch (Exception err) { ErrorHandler.ShowErrorMessage(err, "Error in UpdateUsers function of TodoDataSync class."); return(-1); } }