Exemplo n.º 1
0
 public static void CreateTable(SQLiteConnection connection)
 {
     using (SQLiteCommand command = connection.CreateCommand())
     {
         DBAreaBorderCommands.CreateTable(command);
         command.ExecuteNonQuery();
     }
 }
Exemplo n.º 2
0
 public static long InsertRow(SQLiteConnection connection, ref AreaBorderModel model)
 {
     using (SQLiteCommand command = connection.CreateCommand())
     {
         DBAreaBorderCommands.InsertRow(model, command);
         long check = command.ExecuteNonQuery();
         if (check == 1)
         {
             model.ID = connection.LastInsertRowId;
             return(model.ID);
         }
         else if (check == 0)
         {
             throw new Exception("DBFixtureBeingUsed -> insertRow -> No Row is inserted.");
         }
         throw new Exception("DBFixtureBeingUsed -> insertRow -> Row insertion not successful.");
     }
 }
Exemplo n.º 3
0
 public static long UpdateRow(SQLiteConnection connection, AreaBorderModel model)
 {
     using (SQLiteCommand command = connection.CreateCommand())
     {
         DBAreaBorderCommands.UpdateRow(command, model);
         long check = command.ExecuteNonQuery();
         if (check == 1)
         {
             model.ID = connection.LastInsertRowId;
             return(model.ID);
         }
         else if (check == 0)
         {
             //throw new Exception("FixtureBeingUsedAreaModel -> UpdateRow -> No Row is Updated.");
         }
         throw new Exception("FixtureBeingUsedAreaModel -> UpdateRow -> Insert Not Successful.");
     }
 }