Exemplo n.º 1
0
 public void AddFranchise(Franchise fran)
 {
     //var franchiseJson = Self.GET("/Usama/partial/franchise" + fran.GetObjectID());
     franchise.Add(new FranchiseVM()
     {
         Data = fran
     });
 }
Exemplo n.º 2
0
        void Handle(Input.Save action)
        {
            Random r             = new Random();
            var    franchiseName = ((Corporation)Data).franchiseNametoAdd;
            var    frachise      = new Franchise()
            {
                Name              = franchiseName,
                corporation       = (Corporation)Data,
                noOfHomes         = r.Next(20),
                totalCommission   = r.Next(20),
                averageCommission = r.Next(5),
                trend             = r.Next(20)
            };

            Transaction.Commit();
            AddFranchise(frachise);
            franchiseNametoAdd = "";
        }