// **************** private List <DatasetFileViewModel> AddSelectedFile(DatasetFileViewModel selectedFile) { if (Files == null) { Files = new List <DatasetFileViewModel>(); } Files.Add(selectedFile); return(Files); }
private List <DatasetFileViewModel> ConvertToViewModel(List <DatasetFile> datasetFiles, List <Projections> projections, bool selectedForDownload = false) { var selectedFilesViewModel = new List <DatasetFileViewModel>(); foreach (var selectedFile in datasetFiles) { string epsgName = GetEpsgName(projections, selectedFile); DatasetFileViewModel selectedFileViewModel = new DatasetFileViewModel(selectedFile, epsgName, selectedForDownload); selectedFilesViewModel.Add(selectedFileViewModel); } return(selectedFilesViewModel); }
public DatasetFile(DatasetFileViewModel datasetFileViewModel) { Title = datasetFileViewModel.Title; Description = datasetFileViewModel.Description; Url = datasetFileViewModel.Url; LastUpdated = datasetFileViewModel.LastUpdated; Organization = datasetFileViewModel.Organization; Projection = datasetFileViewModel.Category; DatasetId = datasetFileViewModel.DatasetId; DatasetUrl = datasetFileViewModel.DatasetUrl; Restrictions = datasetFileViewModel.Restrictions; }
public DownloadViewModel(Dataset selectedDataset, DatasetFileViewModel selectedFile) { DatasetUrl = selectedDataset.Url; DatasetId = selectedDataset.Uuid; DatasetTitle = selectedDataset.Title; Subscribe = false; // TODO AutoDeleteFiles = false; // TODO AutoAddFiles = false; // TODO AutoAddFiles = false; // TODO Files = AddSelectedFile(selectedFile); Projections = selectedDataset.Projections; }