Korrekturen
This commit is contained in:
parent
820d12611d
commit
50e7d7eb5a
@ -36,7 +36,7 @@
|
|||||||
<MinimumRequiredVersion>5.4.0.0</MinimumRequiredVersion>
|
<MinimumRequiredVersion>5.4.0.0</MinimumRequiredVersion>
|
||||||
<CreateWebPageOnPublish>true</CreateWebPageOnPublish>
|
<CreateWebPageOnPublish>true</CreateWebPageOnPublish>
|
||||||
<WebPage>publish.html</WebPage>
|
<WebPage>publish.html</WebPage>
|
||||||
<ApplicationRevision>3</ApplicationRevision>
|
<ApplicationRevision>4</ApplicationRevision>
|
||||||
<ApplicationVersion>7.8.0.%2a</ApplicationVersion>
|
<ApplicationVersion>7.8.0.%2a</ApplicationVersion>
|
||||||
<UseApplicationTrust>false</UseApplicationTrust>
|
<UseApplicationTrust>false</UseApplicationTrust>
|
||||||
<CreateDesktopShortcut>true</CreateDesktopShortcut>
|
<CreateDesktopShortcut>true</CreateDesktopShortcut>
|
||||||
|
|||||||
@ -1,15 +1,12 @@
|
|||||||
// Copyright (c) 2020-present schick Informatik
|
// Copyright (c) 2020-present schick Informatik
|
||||||
// Description: Manager zum Senden/Empfangen von Daten mit dbh
|
// Description: Manager zum Senden/Empfangen von Daten mit dbh
|
||||||
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using log4net;
|
using log4net;
|
||||||
using bsmd.database;
|
using System;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
|
||||||
|
using bsmd.database;
|
||||||
|
|
||||||
namespace bsmd.dbh
|
namespace bsmd.dbh
|
||||||
{
|
{
|
||||||
public static class MessageController
|
public static class MessageController
|
||||||
@ -70,6 +67,39 @@ namespace bsmd.dbh
|
|||||||
{
|
{
|
||||||
bool result = true;
|
bool result = true;
|
||||||
|
|
||||||
|
Message cancelMessage = null;
|
||||||
|
foreach(Message aMessage in DBManager.Instance.GetMessagesForCore(core, DBManager.MessageLoad.ALL))
|
||||||
|
{
|
||||||
|
if(core.IsTransit && (aMessage.MessageNotificationClass == Message.NotificationClass.TRANSIT))
|
||||||
|
{
|
||||||
|
cancelMessage = aMessage; break;
|
||||||
|
}
|
||||||
|
if(!core.IsTransit && (aMessage.MessageNotificationClass == Message.NotificationClass.VISIT))
|
||||||
|
{
|
||||||
|
cancelMessage = aMessage; break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
string messageFile = RequestUtil.CreateMessageFile(core, cancelMessage);
|
||||||
|
|
||||||
|
if (messageFile != null)
|
||||||
|
{
|
||||||
|
|
||||||
|
if (!_fileSequenceCounter.HasValue)
|
||||||
|
_fileSequenceCounter = DBManager.Instance.GetMessageFileMaxNum();
|
||||||
|
_fileSequenceCounter += 1;
|
||||||
|
cancelMessage.FileSequenceNumber = _fileSequenceCounter;
|
||||||
|
|
||||||
|
string onlyFileName = Path.GetFileName(messageFile);
|
||||||
|
string moveTarget = Path.Combine(Properties.Settings.Default.OutgoingFolder, onlyFileName);
|
||||||
|
// move file to output directory
|
||||||
|
File.Move(messageFile, moveTarget);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
result = false;
|
||||||
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -40,7 +40,9 @@ namespace bsmd.dbh
|
|||||||
filenameComponent = "BSMD";
|
filenameComponent = "BSMD";
|
||||||
root.Sender = Properties.Settings.Default.Sender;
|
root.Sender = Properties.Settings.Default.Sender;
|
||||||
}
|
}
|
||||||
root.SenderReference = message.Id.Value.ToString("N");
|
|
||||||
|
if(message != null)
|
||||||
|
root.SenderReference = message.Id.Value.ToString("N");
|
||||||
_log.InfoFormat("DBH: setting sender to {0}", root.Sender);
|
_log.InfoFormat("DBH: setting sender to {0}", root.Sender);
|
||||||
|
|
||||||
bsmd.database.ReportingParty reportingParty = DBManager.Instance.GetReportingPartyDict()[core.DefaultReportingPartyId.Value];
|
bsmd.database.ReportingParty reportingParty = DBManager.Instance.GetReportingPartyDict()[core.DefaultReportingPartyId.Value];
|
||||||
@ -81,7 +83,7 @@ namespace bsmd.dbh
|
|||||||
RootReportingClassesToReset rrctr = new RootReportingClassesToReset();
|
RootReportingClassesToReset rrctr = new RootReportingClassesToReset();
|
||||||
rrctr.ReportingClassToReset = new string[1];
|
rrctr.ReportingClassToReset = new string[1];
|
||||||
rrctr.ReportingClassToReset[0] = message.MessageNotificationClassDisplay;
|
rrctr.ReportingClassToReset[0] = message.MessageNotificationClassDisplay;
|
||||||
root.Items = new object[0];
|
root.Items = new object[1];
|
||||||
root.Items[0] = rrctr;
|
root.Items[0] = rrctr;
|
||||||
root.Type = RootType.RESET;
|
root.Type = RootType.RESET;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user