Beispiel #1
0
        private void LoadCorrespondents()
        {
            var correspondentDtos = GetCorrespondentsQuery.List();

            correspondentDtos.Insert(0, new CorrespondentDto());
            CorrespondentDropdown.ItemsSource       = correspondentDtos;
            CorrespondentDropdown.DisplayMemberPath = nameof(DocumentTypeDto.Name);
            CorrespondentDropdown.SelectedValuePath = nameof(DocumentTypeDto.Id);
        }
Beispiel #2
0
        public CorrespondentAdminViewModel() //: base(GetCorrespondentsQuery.List().Select(x => new AdminItem { Id = x.Id, Name = x.Name }).ToList())
        {
            var correspondents = GetCorrespondentsQuery.List()
                                 .Select(x => new AdminItem {
                Id = x.Id, Name = x.Name
            }).ToList();

            Items = new ObservableCollection <AdminItem>(correspondents);
            //OriginalItems = correspondents;
        }
Beispiel #3
0
 private void LoadCorrespondents()
 {
     correspondentDropdownItemsSource        = new ObservableCollection <CorrespondentDto>(GetCorrespondentsQuery.List());
     CorrespondentDropdown.ItemsSource       = correspondentDropdownItemsSource;
     CorrespondentDropdown.DisplayMemberPath = nameof(DocumentTypeDto.Name);
     CorrespondentDropdown.SelectedValuePath = nameof(DocumentTypeDto.Id);
 }