//------------------------------------------------------------------------// public void addCheck(CheckEntity p) { if (!transaction) { connect = new SQLiteConnection(new SQLite.Net.Platform.Generic.SQLitePlatformGeneric(), path); } connect.Insert(p); if (!transaction) { connect.Close(); } }
public void updateCheck(CheckEntity p) { if (!transaction) { connect = new SQLiteConnection(new SQLite.Net.Platform.Generic.SQLitePlatformGeneric(), path); } connect.UpdateWithChildren(p); if (!transaction) { connect.Close(); } }
public void deleteCheck(CheckEntity p) { if (!transaction) { beginTranc(); } connect.GetChildren <CheckEntity>(p); connect.DeleteAll(p.Purchases); connect.Delete(p); if (!transaction) { Commit(); } }
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(); } }