示例#1
0
 void Handle(Input.AddFranchiseButton addFranchiseButton)
 {
     Db.Transact(() =>
     {
         Corporation corp     = (Corporation)Data;
         Franchise franchise  = new Franchise();
         franchise.Name       = FranchiseName;
         franchise.ParentCorp = corp;
     });
     UpdateFranchiseList();
 }
示例#2
0
 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();
 }
示例#3
0
        void UpdateTransactionsList()
        {
            Franchise franchise = (Franchise)Data;

            TransactionsList = Db.SQL <Transaction>("SELECT t FROM Transaction t WHERE Seller = ?", franchise);
        }