Somehow did the first page

This commit is contained in:
schnulller
2022-06-16 21:47:57 +02:00
parent 25e032be63
commit 078c4b75b8
13 changed files with 347 additions and 74 deletions

View File

@@ -34,15 +34,13 @@ public class HaDocumentWrapper : IHaDocumentWrappper {
}
public ILibrary? SetLibrary(string filepath, ModelStateDictionary? ModelState = null) {
try
{
try {
Library = HaDocument.Document.Create(new HaWeb.Settings.HaDocumentOptions() { HamannXMLFilePath = filepath, AvailableYearRange = (StartYear, EndYear) });
}
catch (Exception ex) {
} catch (Exception ex) {
if (ModelState != null) ModelState.AddModelError("Error", "Das Dokument konnte nicht geparst werden: " + ex.Message);
return null;
}
return Library;
}
@@ -52,7 +50,7 @@ public class HaDocumentWrapper : IHaDocumentWrappper {
private void _AutoLoad(List<IFileInfo> files) {
var orderdlist = files.OrderByDescending(x => x.LastModified);
foreach(var item in orderdlist) {
foreach (var item in orderdlist) {
if (SetLibrary(item.PhysicalPath) != null) {
_xmlProvider.SetInProduction(item);
return;