Esempio n. 1
0
 public static void RefreshTasks(SQLiteDatabase db)
 {
     try
     {
         //UPDATE Tasks SET taskStatus=1 WHERE id=(SELECT id FROM Tasks WHERE taskStatus=0 LIMIT 1)
         db.ExecuteNonQuery("UPDATE Tasks SET taskStatus='3' WHERE id IN (SELECT id FROM Tasks WHERE taskStatus=-7)");
     }
     catch (Exception fail)
     {
         throw new FSSQLiteException("An error occurred when trying to update a task.");
     }
 }
Esempio n. 2
0
 private static void ChangeState(string id, int stateCode, SQLiteDatabase db)
 {
     try
     {
         int res = db.ExecuteNonQuery(String.Format("UPDATE Tasks SET taskStatus={1} WHERE id={0}", id, stateCode));
     }
     catch (Exception fail)
     {
         throw new FSSQLiteException("An error occurred when trying to update a task.");
     }
 }
Esempio n. 3
0
 public static void UpdateISBN(string id, string ISBN, SQLiteDatabase db)
 {
     try
     {
         //UPDATE Tasks SET taskStatus=1 WHERE id=(SELECT id FROM Tasks WHERE taskStatus=0 LIMIT 1)
         db.ExecuteNonQuery(String.Format("UPDATE Tasks SET taskStatus='0', ISBN='{1}' WHERE id={0}", id, SQLiteDatabase.EscapeSpecialChars(ISBN)));
     }
     catch (Exception fail)
     {
         throw new FSSQLiteException("An error occurred when trying to update a task.");
     }
 }