private bool AddPurchase(Purchases purchase) { PurchaseDb purchaseDb = new PurchaseDb(); var t = purchaseDb.AddPurchase(purchase); if (t > 0) { return(true); } else { return(false); } }