private void AddNewRole() { StaffMemberRole r = new StaffMemberRole(); DataStoreItemViewModel d = new DataStoreItemViewModel((StaffMemberRole)r); StaffMemberRoles.Add(r); DesktopApplication.MakeModalDocument(d, DesktopApplication.DocumentMode.New); }
private void AddRole() { StaffMemberRole r = new StaffMemberRole(); r.Name = "Enter Name"; StaffMemberRoleViewModel s = new StaffMemberRoleViewModel(); s.SetItem(r); if (_selectedStaffMemberRole != null) { r.ParentRole = (StaffMemberRole)_selectedStaffMemberRole.Item; _selectedStaffMemberRole.ChildRoles.Add(s); logger.Trace("Parent Role set to " + r.ParentRole.Name); } r.Practice = (NucMedPractice)this.Item; SelectedStaffMemberRole = s; RaisePropertyChanged("Roles"); }