private void UpdateTemplates()
 {
     DocumentTypes.Clear();
     if (SelectedAccount != null)
     {
         var templates = _applicationState.GetAccountTransactionDocumentTypes(SelectedAccount.AccountTypeId)
                         .Where(x => !string.IsNullOrEmpty(x.ButtonHeader) && x.CanMakeAccountTransaction(SelectedAccount));
         DocumentTypes.AddRange(templates.Select(x => new DocumentTypeButtonViewModel(x, SelectedAccount)));
     }
 }
Ejemplo n.º 2
0
 public void ReloadDocuments()
 {
     DocumentTypes.Clear();
     foreach (var document in documentTypes)
     {
         DocumentTypes.Add(new DocumentTypeItemViewModel
         {
             Description    = document.Description,
             DocumentTypeId = document.DocumentTypeId,
         });
     }
 }
Ejemplo n.º 3
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.º 4
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;
            }
        }