Example #1
0
 //------------------------------------------------------------------------//
 public void addCheck(CheckEntity p)
 {
     if (!transaction)
     {
         connect = new SQLiteConnection(new SQLite.Net.Platform.Generic.SQLitePlatformGeneric(), path);
     }
     connect.Insert(p);
     if (!transaction)
     {
         connect.Close();
     }
 }
Example #2
0
 public void updateCheck(CheckEntity p)
 {
     if (!transaction)
     {
         connect = new SQLiteConnection(new SQLite.Net.Platform.Generic.SQLitePlatformGeneric(), path);
     }
     connect.UpdateWithChildren(p);
     if (!transaction)
     {
         connect.Close();
     }
 }
Example #3
0
 public void deleteCheck(CheckEntity p)
 {
     if (!transaction)
     {
         beginTranc();
     }
     connect.GetChildren <CheckEntity>(p);
     connect.DeleteAll(p.Purchases);
     connect.Delete(p);
     if (!transaction)
     {
         Commit();
     }
 }
Example #4
0
 public void getChildren(CheckEntity p)
 {
     if (!transaction)
     {
         connect = new SQLiteConnection(new SQLite.Net.Platform.Generic.SQLitePlatformGeneric(), path);
         connect.BeginTransaction();
     }
     connect.GetChildren(p);
     foreach (PurchaseEntity i in p.Purchases)
     {
         connect.GetChildren <PurchaseEntity>(i);
     }
     if (!transaction)
     {
         connect.Commit();
         connect.Close();
     }
 }