private DocumentTypeDiffgram AddDocumentType(DocumentTypeConfiguration documentTypeConfiguration)
        {
            var docTypeDiffgram = new DocumentTypeDiffgram(this, documentTypeConfiguration, serviceContext);

            DocumentTypes.Add(documentTypeConfiguration.Alias, docTypeDiffgram);
            return(docTypeDiffgram);
        }
Ejemplo n.º 2
0
        private async void LoadData()
        {
            using (BusyScope.CreateWork())
            {
                try
                {
                    var types = await Task.Run(() => _accountIdentService.GetPrimaryPersonalDocuments());

                    foreach (var type in types)
                    {
                        DocumentTypes.Add(type);
                    }
                }
                catch (Exception ex)
                {
                    var message = ex.GetLastError();
                    _userMessageService?.ShowError(message);
                }
            }

            if (cardReader != null)
            {
                var curentCard = cardReader.GetCardOnScanner();
                if (curentCard != null)
                {
                    TryFindAccountByCard(curentCard.CardNumber);
                }
            }
        }
        public DocumentTypeConfigurator DocumentType(string alias)
        {
            var documentTypeConfiguration = new DocumentTypeConfigurator(this, alias);

            DocumentTypes.Add(alias, documentTypeConfiguration);
            return(documentTypeConfiguration);
        }
Ejemplo n.º 4
0
 public void ReloadDocuments()
 {
     DocumentTypes.Clear();
     foreach (var document in documentTypes)
     {
         DocumentTypes.Add(new DocumentTypeItemViewModel
         {
             Description    = document.Description,
             DocumentTypeId = document.DocumentTypeId,
         });
     }
 }
Ejemplo n.º 5
0
        private void LoadDocumentTypes(List <DocumentType> documentTypes)
        {
            DocumentTypes.Clear();
            foreach (var documentType in documentTypes)
            {
                DocumentTypes.Add(new DocumentType
                {
                    Description    = documentType.Description,
                    DocumentTypeId = documentType.DocumentTypeId,
                });
            }

            var mainViewModel = MainViewModel.GetInstance();

            DocumentTypeId = mainViewModel.Employee.DocumentTypeId;
            PropertyChanged?.Invoke(this, new PropertyChangedEventArgs("DocumentTypeId"));
        }
Ejemplo n.º 6
0
        public void ReloadDocuments()
        {
            int index = 0;

            DocumentTypes.Clear();
            foreach (var document in documentTypes)
            {
                DocumentTypes.Add(new DocumentTypeItemViewModel
                {
                    Description    = document.Description,
                    DocumentTypeId = document.DocumentTypeId,
                });

                if (document.DocumentTypeId == employee.DocumentTypeId)
                {
                    SourceIndex = index;
                }

                index += 1;
            }
        }
Ejemplo n.º 7
0
        public DocumentTypes GetDocumentTypes()
        {
            var documentTypes = new DocumentTypes();
            using (var app = OBConnection(ServiceUrl, DataSource, UserName, Password))
            {
                foreach (var udtg in app.Core.DocumentTypeGroups)
                {
                    var dtg = new DocumentType(udtg.ID, udtg.Name);
                    documentTypes.Add(dtg);

                    if (udtg.DocumentTypes != null)
                    {
                        foreach (var udt in udtg.DocumentTypes)
                        {
                            if (dtg.DocumentTypes == null)
                                dtg.DocumentTypes = new DocumentTypes();

                            dtg.DocumentTypes.Add(new DocumentType(udt.ID, udt.Name));
                        }
                    }
                }
            }
            return documentTypes;
        }