Example #1
0
 void OnAftnAddedToRepository(object sender, EntityAddedEventArgs<Aftn> e)
 {
     var viewModel = new AftnViewModel(e.NewEntity, _aftnService);
     this.AllAftns.Add(viewModel);
 }
Example #2
0
        void CreateNewAftn()
        {
            foreach (var obj in this.Workspaces)
            {
                if (obj.DisplayName == Entity.AftnViewModel_DisplayName)
                {
                    this.SetActiveWorkspace(obj);
                    return;
                }

            }
            Aftn newAftn = Aftn.CreateNewAftn();
            var workspace = new AftnViewModel(newAftn, _aftnService,_workspaces);
            this.Workspaces.Add(workspace);
            this.SetActiveWorkspace(workspace);
        }