void Handle(Input.AddFranchiseButton addFranchiseButton) { Db.Transact(() => { Corporation corp = (Corporation)Data; Franchise franchise = new Franchise(); franchise.Name = FranchiseName; franchise.ParentCorp = corp; }); UpdateFranchiseList(); }
void Handle(Input.RegisterHomeButton registerButton) { Db.Transact(() => { Franchise franchise = (Franchise)Data; Transaction transaction = new Transaction(); transaction.Date = Convert.ToDateTime(HomeDate); transaction.Commission = HomeCommission; transaction.Price = HomePrice; transaction.Seller = franchise; transaction.Address = HomeAddress; }); UpdateTransactionsList(); }
void UpdateTransactionsList() { Franchise franchise = (Franchise)Data; TransactionsList = Db.SQL <Transaction>("SELECT t FROM Transaction t WHERE Seller = ?", franchise); }