mirror of
https://github.com/Theodor-Springmann-Stiftung/hamann-ausgabe-core.git
synced 2025-10-29 09:15:33 +00:00
Möglichkeit zur Angabe eines zeitraumes für die angezeigten Briefe
This commit is contained in:
9
HaWeb/Models/StartEndYear.cs
Normal file
9
HaWeb/Models/StartEndYear.cs
Normal file
@@ -0,0 +1,9 @@
|
||||
namespace HaWeb.Models;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
public class StartEndYear {
|
||||
[Required]
|
||||
public int StartYear { get; set; }
|
||||
|
||||
[Required]
|
||||
public int EndYear { get; set; }
|
||||
}
|
||||
@@ -10,13 +10,18 @@ public class UploadViewModel {
|
||||
public List<FileModel>? AvailableFiles { get; set; }
|
||||
public Dictionary<string, List<FileModel>?>? UsedFiles { get; private set; }
|
||||
public Dictionary<string, List<FileModel>?>? ProductionFiles { get; set; }
|
||||
|
||||
public List<int> AvailableYears { get; private set; }
|
||||
public int StartYear { get; private set; }
|
||||
public int EndYear { get; private set; }
|
||||
public List<FileModel>? HamannFiles { get; set; }
|
||||
|
||||
public UploadViewModel(string title, string? prefix, List<IXMLRoot>? roots, Dictionary<string, List<FileModel>?>? usedFiles) {
|
||||
public UploadViewModel(string title, string? prefix, List<IXMLRoot>? roots, Dictionary<string, List<FileModel>?>? usedFiles, int startYear, int endYear, List<int> availableYears) {
|
||||
Prefix = prefix;
|
||||
ActiveTitle = title;
|
||||
AvailableRoots = roots;
|
||||
UsedFiles = usedFiles;
|
||||
StartYear = startYear;
|
||||
EndYear = endYear;
|
||||
AvailableYears = availableYears;
|
||||
}
|
||||
}
|
||||
@@ -30,7 +30,6 @@ public class XMLRootDocument {
|
||||
_file = value;
|
||||
// After saving, we don't need to save the ELement anymore, it can get read in if it's used.
|
||||
// We do this to prevent memory hogging. TODO: MAKE IT MORE EFFICIENT, EG ALL USED FILES HAVE SET ELEMENTS OR SO
|
||||
// TODO Also make the file directory more efficient by reading in the directories as they are requested.
|
||||
if (value != null) _Element = null;
|
||||
} }
|
||||
public string Prefix { get; private set; }
|
||||
|
||||
Reference in New Issue
Block a user