5.0.7: Copy-Funktion mit Auslöschung bestehender Anmeldung
This commit is contained in:
parent
8a602e8ee8
commit
09f8a9953f
@ -237,13 +237,37 @@ namespace ENI2
|
|||||||
if(MessageBox.Show(Properties.Resources.textDeclarationAlreadyExists, Properties.Resources.textCaptionExists,
|
if(MessageBox.Show(Properties.Resources.textDeclarationAlreadyExists, Properties.Resources.textCaptionExists,
|
||||||
MessageBoxButton.OKCancel, MessageBoxImage.Question) == MessageBoxResult.OK)
|
MessageBoxButton.OKCancel, MessageBoxImage.Question) == MessageBoxResult.OK)
|
||||||
{
|
{
|
||||||
|
List<Message> existingMessages = DBManager.GetSingleCon(Properties.Settings.Default.ConnectionString).GetMessagesForCore(existingCore, DBManager.MessageLoad.ALL);
|
||||||
|
foreach(Message existingMessage in existingMessages)
|
||||||
|
{
|
||||||
|
if((existingMessage.InternalStatus == Message.BSMDStatus.SENT) &&
|
||||||
|
(existingMessage.MessageNotificationClass != Message.NotificationClass.VISIT) &&
|
||||||
|
(existingMessage.MessageNotificationClass != Message.NotificationClass.TRANSIT))
|
||||||
|
{
|
||||||
|
MessageBox.Show(Properties.Resources.textMessagesAlreadySent, Properties.Resources.textCaptionError, MessageBoxButton.OK, MessageBoxImage.Stop);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// delete all existing data of core
|
||||||
|
existingCore.ETA = newCore.ETA;
|
||||||
|
existingCore.ETAKielCanal = newCore.ETAKielCanal;
|
||||||
|
newCore = existingCore;
|
||||||
|
|
||||||
|
foreach (Message existingMessage in existingMessages)
|
||||||
|
{
|
||||||
|
if (existingMessage is ISublistContainer)
|
||||||
|
{
|
||||||
|
((ISublistContainer)existingMessage).DeleteElements();
|
||||||
|
}
|
||||||
|
DBManager.GetSingleCon(Properties.Settings.Default.ConnectionString).Delete(existingMessage);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
DBManager.GetSingleCon(Properties.Settings.Default.ConnectionString).Save(newCore);
|
DBManager.GetSingleCon(Properties.Settings.Default.ConnectionString).Save(newCore);
|
||||||
|
|||||||
@ -36,7 +36,7 @@
|
|||||||
<CreateWebPageOnPublish>true</CreateWebPageOnPublish>
|
<CreateWebPageOnPublish>true</CreateWebPageOnPublish>
|
||||||
<WebPage>publish.html</WebPage>
|
<WebPage>publish.html</WebPage>
|
||||||
<ApplicationRevision>1</ApplicationRevision>
|
<ApplicationRevision>1</ApplicationRevision>
|
||||||
<ApplicationVersion>5.0.6.%2a</ApplicationVersion>
|
<ApplicationVersion>5.0.7.%2a</ApplicationVersion>
|
||||||
<UseApplicationTrust>false</UseApplicationTrust>
|
<UseApplicationTrust>false</UseApplicationTrust>
|
||||||
<CreateDesktopShortcut>true</CreateDesktopShortcut>
|
<CreateDesktopShortcut>true</CreateDesktopShortcut>
|
||||||
<PublishWizardCompleted>true</PublishWizardCompleted>
|
<PublishWizardCompleted>true</PublishWizardCompleted>
|
||||||
|
|||||||
9
ENI-2/ENI2/ENI2/Properties/Resources.Designer.cs
generated
9
ENI-2/ENI2/ENI2/Properties/Resources.Designer.cs
generated
@ -2879,6 +2879,15 @@ namespace ENI2.Properties {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized string similar to One or more messages have already been sent. Cannot overwrite target declaration!.
|
||||||
|
/// </summary>
|
||||||
|
public static string textMessagesAlreadySent {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("textMessagesAlreadySent", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to Message sent at {0}.
|
/// Looks up a localized string similar to Message sent at {0}.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@ -1645,4 +1645,7 @@
|
|||||||
<data name="textDeclarationAlreadyExists" xml:space="preserve">
|
<data name="textDeclarationAlreadyExists" xml:space="preserve">
|
||||||
<value>There is already a declaration with this ID. A new declaration will not be created. Do you want to clear all data? </value>
|
<value>There is already a declaration with this ID. A new declaration will not be created. Do you want to clear all data? </value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="textMessagesAlreadySent" xml:space="preserve">
|
||||||
|
<value>One or more messages have already been sent. Cannot overwrite target declaration!</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
||||||
Loading…
Reference in New Issue
Block a user