public void AddFranchise(Franchise fran) { //var franchiseJson = Self.GET("/Usama/partial/franchise" + fran.GetObjectID()); franchise.Add(new FranchiseVM() { Data = fran }); }
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 = ""; }