Ejemplo n.º 1
0
        public async void OnStartUp(DocumentViewModel selectedDocument)
        {
            SelectedDocument = selectedDocument;
            var documentVersions = mapper.Map <List <DocumentVersionViewModel> >((await documentVersionService.GetAllVersionsByDocumentId(_selectedDocument.Id)).OrderByDescending(dv => dv.EffectiveDate));

            DocumentVersions = new ObservableCollection <DocumentVersionViewModel>(documentVersions);

            SelectedDocumentVersion = _documentVersions
                                      .Where(dv => dv.Progress == Progress.InEffect)
                                      .OrderByDescending(dv => dv.EffectiveDate)
                                      .FirstOrDefault();
        }
Ejemplo n.º 2
0
 public void CreateNewDocumentVersion()
 {
     SelectedDocumentVersion = new DocumentVersionViewModel(_selectedDocument.Id);
 }