public static CommunicationTypeModel Convert(CommunicationType communicationType)
 {
     return(new CommunicationTypeModel
     {
         Id = communicationType.Id,
         Type = communicationType.Type
     });
 }
コード例 #2
0
        public SettingsViewModel()
        {
            _settingsLoader           = SettingsLoader.Load();
            ProgramSettings           = _settingsLoader.GetSettings();
            _organizationManager      = Directory.GetOrganizationManager();
            _communicationTypeManager = Directory.GetCommunicationTypeManager();

            OrganizationViewModel      = new OrganizationViewModel();
            CommunicationTypeViewModel = new CommunicationTypeViewModel();

            AddedOrganization      = new Organization();
            AddedCommunicationType = new CommunicationType();
        }
コード例 #3
0
 public CommunicationTypeViewModel()
 {
     CommunicationType         = new CommunicationType();
     _communicationTypeManager = Directory.GetCommunicationTypeManager();
     Types = new ObservableCollection <CommunicationType>(CommunicationTypeModelToCommunicationType.Convert(_communicationTypeManager.GetAllTypes()));
 }