void Handle(Input.AddCorpButton addCorpButton) { Db.Transact(() => { Corporation corp = new Corporation(); corp.Name = Name; }); UpdateCorps(); }
void Handle(Input.AddFranchiseButton addFranchiseButton) { Db.Transact(() => { Corporation corp = (Corporation)Data; Franchise franchise = new Franchise(); franchise.Name = FranchiseName; franchise.ParentCorp = corp; }); UpdateFranchiseList(); }
void UpdateFranchiseList(string orderProperty = "Name") { Corporation corp = (Corporation)Data; FranchiseList = Db.SQL <Franchise>("SELECT f FROM Franchise f WHERE f.ParentCorp = ? ORDER BY f." + orderProperty, corp); }