Example #1
0
 public static void CreateTable(SQLiteConnection connection)
 {
     using (SQLiteCommand command = connection.CreateCommand())
     {
         DBInsertPointCommands.CreateTable(command);
         command.ExecuteNonQuery();
     }
 }
Example #2
0
 public static long UpdateRow(SQLiteConnection connection, InsertPointModel model)
 {
     using (SQLiteCommand command = connection.CreateCommand())
     {
         DBInsertPointCommands.UpdateRow(command, model);
         int check = command.ExecuteNonQuery();
         if (check == 1)
         {
             return(connection.LastInsertRowId);
         }
         else if (check == 0)
         {
             throw new Exception("DBInsertPoint -> UpdateRow -> No Row is Updated.");
         }
         throw new Exception("DBInsertPoint -> UpdateRow -> Update Point not successful.");
     }
 }
Example #3
0
 public static long InsertRow(ref InsertPointModel model, SQLiteConnection connection)
 {
     using (SQLiteCommand command = connection.CreateCommand())
     {
         DBInsertPointCommands.InsertRow(command, model);
         int check = command.ExecuteNonQuery();
         if (check == 1)
         {
             model.ID = connection.LastInsertRowId;
             return(model.ID);
         }
         else if (check == 0)
         {
             throw new Exception("DBInsertPoint -> Insert -> No Point Was Inserted");
         }
         throw new Exception("DBInsertPoint -> Insert -> Insert Point not successful.");
     }
 }