diff --git a/ENI2/ENI2.csproj b/ENI2/ENI2.csproj
index 4dde7260..f00bde73 100644
--- a/ENI2/ENI2.csproj
+++ b/ENI2/ENI2.csproj
@@ -18,7 +18,7 @@
- eni_publish\
+ eni2.publish\
true
Web
true
@@ -28,7 +28,7 @@
false
false
true
- http://192.168.2.24/eni_publish/
+ http://192.168.2.24/eni2.publish/
http://www.textbausteine.net/
ENI
Informatikbüro Daniel Schick
@@ -36,8 +36,8 @@
5.4.0.0
true
publish.html
- 9
- 7.2.0.9
+ 0
+ 7.2.1.0
false
true
true
diff --git a/ENI2/EditControls/CompareExcelDialog.xaml b/ENI2/EditControls/CompareExcelDialog.xaml
index cb7c433e..c789a0dc 100644
--- a/ENI2/EditControls/CompareExcelDialog.xaml
+++ b/ENI2/EditControls/CompareExcelDialog.xaml
@@ -4,11 +4,11 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:ENI2.EditControls"
- xmlns:enictrl="clr-namespace:ENI2.Controls"
+ xmlns:enictrl="clr-namespace:ENI2.Controls"
xmlns:p="clr-namespace:ENI2.Properties"
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
mc:Ignorable="d"
- Title="{x:Static p:Resources.textCompareExcel}" Height="260" Width="600" Background="AliceBlue" Icon="/Eni2;component/Resources/bullet_ball_grey.ico">
+ Title="{x:Static p:Resources.textCompareExcel}" Height="260" Width="600" Background="AliceBlue" Icon="/ENI2;component/Resources/bullet_ball_grey.ico">
diff --git a/ENI2/EditControls/CopyDeclarationDialog.xaml b/ENI2/EditControls/CopyDeclarationDialog.xaml
index 70cc2361..b1ef8f29 100644
--- a/ENI2/EditControls/CopyDeclarationDialog.xaml
+++ b/ENI2/EditControls/CopyDeclarationDialog.xaml
@@ -4,11 +4,11 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:ENI2.EditControls"
- xmlns:enictrl="clr-namespace:ENI2.Controls"
+ xmlns:enictrl="clr-namespace:ENI2.Controls"
xmlns:p="clr-namespace:ENI2.Properties"
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
mc:Ignorable="d"
- Title="{x:Static p:Resources.textCopyDeclaration}" Height="326" Width="440" WindowStyle="SingleBorderWindow" Background="AliceBlue" ResizeMode="NoResize" Icon="/Eni2;component/Resources/id_cards.ico">
+ Title="{x:Static p:Resources.textCopyDeclaration}" Height="326" Width="440" WindowStyle="SingleBorderWindow" Background="AliceBlue" ResizeMode="NoResize" Icon="/ENI2;component/Resources/id_cards.ico">
@@ -34,28 +34,28 @@
-
-
\ No newline at end of file
diff --git a/ENI2/EditControls/CoreStatusInfoDialog.xaml b/ENI2/EditControls/CoreStatusInfoDialog.xaml
index 4c530ef3..8dc5339f 100644
--- a/ENI2/EditControls/CoreStatusInfoDialog.xaml
+++ b/ENI2/EditControls/CoreStatusInfoDialog.xaml
@@ -8,7 +8,7 @@
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
xmlns:p="clr-namespace:ENI2.Properties"
mc:Ignorable="d"
- Title="{x:Static p:Resources.textCoreStatus}" Height="436" Width="600" WindowStyle="SingleBorderWindow" Background="AliceBlue" Icon="/Eni2;component/Resources/bullet_ball_grey.ico" >
+ Title="{x:Static p:Resources.textCoreStatus}" Height="436" Width="600" WindowStyle="SingleBorderWindow" Background="AliceBlue" Icon="/ENI2;component/Resources/bullet_ball_grey.ico" >
@@ -22,7 +22,7 @@
-
+
diff --git a/ENI2/EditControls/EditRulesDialog.xaml b/ENI2/EditControls/EditRulesDialog.xaml
index 417e7c5f..a306db64 100644
--- a/ENI2/EditControls/EditRulesDialog.xaml
+++ b/ENI2/EditControls/EditRulesDialog.xaml
@@ -9,7 +9,7 @@
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
xmlns:p="clr-namespace:ENI2.Properties"
mc:Ignorable="d"
- Title="{x:Static p:Resources.textEditRules}" Height="402" Width="800" WindowStyle="SingleBorderWindow" Background="AliceBlue" Icon="/Eni2;component/Resources/mail_forward.png">
+ Title="{x:Static p:Resources.textEditRules}" Height="402" Width="800" WindowStyle="SingleBorderWindow" Background="AliceBlue" Icon="/ENI2;component/Resources/mail_forward.png">
@@ -76,8 +76,8 @@
-
-
+
+
diff --git a/ENI2/EditControls/ErrorListDialog.xaml b/ENI2/EditControls/ErrorListDialog.xaml
index 0ac7bd60..76cff46c 100644
--- a/ENI2/EditControls/ErrorListDialog.xaml
+++ b/ENI2/EditControls/ErrorListDialog.xaml
@@ -8,7 +8,7 @@
xmlns:p="clr-namespace:ENI2.Properties"
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
mc:Ignorable="d"
- Title="{x:Static p:Resources.textErrors}" Height="300" Width="600" Background="AliceBlue" Icon="/Eni2;component/Resources/bullet_ball_red.ico" Topmost="False">
+ Title="{x:Static p:Resources.textErrors}" Height="300" Width="600" Background="AliceBlue" Icon="/ENI2;component/Resources/bullet_ball_red.ico" Topmost="False">
diff --git a/ENI2/EditControls/MessageHistoryDialog.xaml b/ENI2/EditControls/MessageHistoryDialog.xaml
index 19d2bd8c..1fe17432 100644
--- a/ENI2/EditControls/MessageHistoryDialog.xaml
+++ b/ENI2/EditControls/MessageHistoryDialog.xaml
@@ -7,7 +7,7 @@
xmlns:enictrl="clr-namespace:ENI2.Controls"
xmlns:p="clr-namespace:ENI2.Properties"
mc:Ignorable="d"
- Title="{x:Static p:Resources.textMessageHistory}" Height="450" Width="800" Background="AliceBlue" Icon="/Eni2;component/Resources/clock_history.ico">
+ Title="{x:Static p:Resources.textMessageHistory}" Height="450" Width="800" Background="AliceBlue" Icon="/ENI2;component/Resources/clock_history.ico">
@@ -15,8 +15,8 @@
-
diff --git a/ENI2/EditControls/NewDGItemDialog.xaml b/ENI2/EditControls/NewDGItemDialog.xaml
index 3d73c30b..2d10c678 100644
--- a/ENI2/EditControls/NewDGItemDialog.xaml
+++ b/ENI2/EditControls/NewDGItemDialog.xaml
@@ -4,12 +4,12 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:ENI2.EditControls"
- xmlns:enictrl="clr-namespace:ENI2.Controls"
+ xmlns:enictrl="clr-namespace:ENI2.Controls"
xmlns:p="clr-namespace:ENI2.Properties"
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
mc:Ignorable="d"
- Title="{x:Static p:Resources.textNewDGItem}" Height="350" Width="600" WindowStyle="SingleBorderWindow" Background="AliceBlue" ResizeMode="CanResize"
- Icon="/Eni2;component/Resources/bullet_ball_yellow.ico" Loaded="EditWindowBase_Loaded">
+ Title="{x:Static p:Resources.textNewDGItem}" Height="350" Width="600" WindowStyle="SingleBorderWindow" Background="AliceBlue" ResizeMode="CanResize"
+ Icon="/ENI2;component/Resources/bullet_ball_yellow.ico" Loaded="EditWindowBase_Loaded">
diff --git a/ENI2/EditControls/NewWithIdDialog.xaml b/ENI2/EditControls/NewWithIdDialog.xaml
index 6abe669c..0fb1a1fa 100644
--- a/ENI2/EditControls/NewWithIdDialog.xaml
+++ b/ENI2/EditControls/NewWithIdDialog.xaml
@@ -4,12 +4,12 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:ENI2.EditControls"
- xmlns:enictrl="clr-namespace:ENI2.Controls"
+ xmlns:enictrl="clr-namespace:ENI2.Controls"
xmlns:p="clr-namespace:ENI2.Properties"
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
mc:Ignorable="d"
- Title="{x:Static p:Resources.textNewWithId}" Height="220" Width="350" WindowStyle="SingleBorderWindow" Background="AliceBlue" ResizeMode="NoResize" Icon="/Eni2;component/Resources/id_card_add.ico">
-
+ Title="{x:Static p:Resources.textNewWithId}" Height="220" Width="350" WindowStyle="SingleBorderWindow" Background="AliceBlue" ResizeMode="NoResize" Icon="/ENI2;component/Resources/id_card_add.ico">
+
@@ -30,29 +30,29 @@
-
-
+ Title="Search port area" Height="400" Width="600" WindowStyle="SingleBorderWindow" Background="AliceBlue" ResizeMode="CanResize" Icon="/ENI2;component/Resources/bullet_ball_yellow.ico" Loaded="Window_Loaded">
@@ -19,7 +19,7 @@
-
+
diff --git a/ENI2/EditControls/ViolationListDialog.xaml b/ENI2/EditControls/ViolationListDialog.xaml
index b3fd8355..a8ad0c61 100644
--- a/ENI2/EditControls/ViolationListDialog.xaml
+++ b/ENI2/EditControls/ViolationListDialog.xaml
@@ -8,7 +8,7 @@
xmlns:p="clr-namespace:ENI2.Properties"
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
mc:Ignorable="d"
- Title="{x:Static p:Resources.textViolations}" Height="300" Width="600" Background="AliceBlue" Icon="/Eni2;component/Resources/bullet_ball_yellow.ico" Topmost="False">
+ Title="{x:Static p:Resources.textViolations}" Height="300" Width="600" Background="AliceBlue" Icon="/ENI2;component/Resources/bullet_ball_yellow.ico" Topmost="False">
@@ -16,7 +16,7 @@
-
diff --git a/ENI2/EditControls/VisitIdDialog.xaml b/ENI2/EditControls/VisitIdDialog.xaml
index 812582b6..4c04704f 100644
--- a/ENI2/EditControls/VisitIdDialog.xaml
+++ b/ENI2/EditControls/VisitIdDialog.xaml
@@ -4,11 +4,11 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:ENI2.EditControls"
- xmlns:enictrl="clr-namespace:ENI2.Controls"
+ xmlns:enictrl="clr-namespace:ENI2.Controls"
xmlns:p="clr-namespace:ENI2.Properties"
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
mc:Ignorable="d"
- Title="{x:Static p:Resources.textNewVisitTransitId}" Height="220" Width="350" WindowStyle="SingleBorderWindow" Background="AliceBlue" ResizeMode="NoResize" Icon="/Eni2;component/Resources/id_card_new.ico">
+ Title="{x:Static p:Resources.textNewVisitTransitId}" Height="220" Width="350" WindowStyle="SingleBorderWindow" Background="AliceBlue" ResizeMode="NoResize" Icon="/ENI2;component/Resources/id_card_new.ico">
@@ -26,28 +26,28 @@
-
- maxLength.Value)
+ {
+ result = result.Substring(0, maxLength.Value);
+ }
+ }
return result;
}
catch (Exception e)
diff --git a/ENI2/Excel/ExcelUtil.cs b/ENI2/Excel/ExcelUtil.cs
index a0fbcabb..2404453e 100644
--- a/ENI2/Excel/ExcelUtil.cs
+++ b/ENI2/Excel/ExcelUtil.cs
@@ -2091,8 +2091,8 @@ namespace ENI2.Excel
for (int i = 0; i < 5000; i++)
{
- string lastName = reader.ReadCellAsText(sheetTitle, string.Format("C{0}", i + 18));
- string firstName = reader.ReadCellAsText(sheetTitle, string.Format("D{0}", i + 18));
+ string lastName = reader.ReadCellAsText(sheetTitle, string.Format("C{0}", i + 18), 100);
+ string firstName = reader.ReadCellAsText(sheetTitle, string.Format("D{0}", i + 18), 100);
if (lastName.IsNullOrEmpty() && firstName.IsNullOrEmpty()) break;
if (!(crewMessage.GetSublistElementWithIdentifier((i + 1).ToString()) is CREW crew))
@@ -2111,10 +2111,10 @@ namespace ENI2.Excel
crew.CrewMemberGender = ReadGender(reader.ReadCellAsText(sheetTitle, string.Format("E{0}", i + 18)), out bool canceled);
if (canceled) return true;
- crew.CrewMemberDuty = reader.ReadCellAsText(sheetTitle, string.Format("F{0}", i + 18));
+ crew.CrewMemberDuty = reader.ReadCellAsText(sheetTitle, string.Format("F{0}", i + 18), 100);
crew.CrewMemberNationality = ReadNationality(reader.ReadCellAsText(sheetTitle, string.Format("G{0}", i + 18)), out canceled);
if (canceled) return true;
- crew.CrewMemberPlaceOfBirth = reader.ReadCellAsText(sheetTitle, string.Format("H{0}", i + 18));
+ crew.CrewMemberPlaceOfBirth = reader.ReadCellAsText(sheetTitle, string.Format("H{0}", i + 18), 100);
crew.CrewMemberCountryOfBirth = ReadNationality(reader.ReadCellAsText(sheetTitle, string.Format("I{0}", i + 18)), out _);
crew.CrewMemberDateOfBirth = reader.ReadCellAsDateTime(sheetTitle, string.Format("J{0}", i + 18));
@@ -2122,8 +2122,8 @@ namespace ENI2.Excel
crew.CrewMemberIdentityDocumentType = ReadDocumentType(reader.ReadCellAsText(sheetTitle, string.Format("K{0}", i + 18)), out canceled);
if (canceled) return true;
- crew.CrewMemberIdentityDocumentId = reader.ReadCellAsText(sheetTitle, string.Format("L{0}", i + 18));
- crew.CrewMemberVisaNumber = reader.ReadCellAsText(sheetTitle, string.Format("O{0}", i + 18));
+ crew.CrewMemberIdentityDocumentId = reader.ReadCellAsText(sheetTitle, string.Format("L{0}", i + 18), 100);
+ crew.CrewMemberVisaNumber = reader.ReadCellAsText(sheetTitle, string.Format("O{0}", i + 18), 100);
crew.CrewMemberIdentityDocumentIssuingState = ReadNationality(reader.ReadCellAsText(sheetTitle, string.Format("M{0}", i + 18)), out canceled);
if (canceled) return true;
if (crew.CrewMemberIdentityDocumentIssuingState.IsNullOrEmpty() && isOldVersion)
@@ -2132,11 +2132,7 @@ namespace ENI2.Excel
if (!crew.CrewMemberIdentityDocumentExpiryDate.HasValue && isOldVersion)
crew.CrewMemberIdentityDocumentExpiryDate = new DateTime(2100, 12, 31);
- crew.Effects = reader.ReadCellAsText("2. PORT", string.Format("C{0}", i + 142));
- if (crew.Effects.Length > 256)
- crew.Effects = crew.Effects.Substring(0, 256);
-
- // crew.NotificationSchengen = crew.HasSchengenDetails;
+ crew.Effects = reader.ReadCellAsText("2. PORT", string.Format("C{0}", i + 142), 256);
Util.UIHelper.SetBusyState(); // dialog might reset busy state
}
@@ -2208,7 +2204,7 @@ namespace ENI2.Excel
for (int i = 0; i < 5000; i++)
{
- string lastName = reader.ReadCellAsText(sheetTitle, string.Format("C{0}", i + 18));
+ string lastName = reader.ReadCellAsText(sheetTitle, string.Format("C{0}", i + 18), 100);
if (lastName.IsNullOrEmpty()) break;
if (!(crewdMessage.GetSublistElementWithIdentifier((i + 1).ToString()) is CREWD crewd))
@@ -2223,32 +2219,30 @@ namespace ENI2.Excel
crewd.NotificationSchengen = true;
crewd.NotificationPAX = notificationPax ?? false;
crewd.CrewMemberLastName = lastName;
- crewd.CrewMemberFirstName = reader.ReadCellAsText(sheetTitle, string.Format("D{0}", i + 18));
+ crewd.CrewMemberFirstName = reader.ReadCellAsText(sheetTitle, string.Format("D{0}", i + 18), 100);
crewd.CrewMemberGender = ReadGender(reader.ReadCellAsText(sheetTitle, string.Format("E{0}", i + 18)), out bool canceled);
if (canceled) return true;
- crewd.CrewMemberDuty = reader.ReadCellAsText(sheetTitle, string.Format("F{0}", i + 18));
+ crewd.CrewMemberDuty = reader.ReadCellAsText(sheetTitle, string.Format("F{0}", i + 18), 100);
crewd.CrewMemberNationality = ReadNationality(reader.ReadCellAsText(sheetTitle, string.Format("G{0}", i + 18)), out canceled);
if (canceled) return true;
- crewd.CrewMemberPlaceOfBirth = reader.ReadCellAsText(sheetTitle, string.Format("H{0}", i + 18));
+ crewd.CrewMemberPlaceOfBirth = reader.ReadCellAsText(sheetTitle, string.Format("H{0}", i + 18), 100);
crewd.CrewMemberCountryOfBirth = ReadNationality(reader.ReadCellAsText(sheetTitle, string.Format("I{0}", i + 18)), out _);
crewd.CrewMemberDateOfBirth = reader.ReadCellAsDateTime(sheetTitle, string.Format("J{0}", i + 18));
crewd.CrewMemberIdentityDocumentType = ReadDocumentType(reader.ReadCellAsText(sheetTitle, string.Format("K{0}", i + 18)), out canceled);
if (canceled) return true;
- crewd.CrewMemberIdentityDocumentId = reader.ReadCellAsText(sheetTitle, string.Format("L{0}", i + 18));
- crewd.CrewMemberVisaNumber = reader.ReadCellAsText(sheetTitle, string.Format("O{0}", i + 18));
+ crewd.CrewMemberIdentityDocumentId = reader.ReadCellAsText(sheetTitle, string.Format("L{0}", i + 18), 100);
+ crewd.CrewMemberVisaNumber = reader.ReadCellAsText(sheetTitle, string.Format("O{0}", i + 18), 100);
crewd.CrewMemberIdentityDocumentIssuingState = ReadNationality(reader.ReadCellAsText(sheetTitle, string.Format("M{0}", i + 18)), out canceled);
if (canceled) return true;
if (crewd.CrewMemberIdentityDocumentIssuingState.IsNullOrEmpty())
crewd.CrewMemberIdentityDocumentIssuingState = "XX";
crewd.CrewMemberIdentityDocumentExpiryDate = reader.ReadCellAsDateTime(sheetTitle, string.Format("N{0}", i + 18)) ?? (DateTime?)new DateTime(2100, 12, 31);
- crewd.Effects = reader.ReadCellAsText("2. PORT", string.Format("C{0}", i + 142));
-
- // crewd.NotificationSchengen = crewd.HasSchengenDetails;
+ crewd.Effects = reader.ReadCellAsText("2. PORT", string.Format("C{0}", i + 142), 256);
Util.UIHelper.SetBusyState(); // dialog might reset busy state
}
@@ -2321,8 +2315,8 @@ namespace ENI2.Excel
for (int i = 0; i < 5000; i++)
{
- string lastName = reader.ReadCellAsText(sheetTitle, string.Format("C{0}", i + 17));
- string firstName = reader.ReadCellAsText(sheetTitle, string.Format("D{0}", i + 17));
+ string lastName = reader.ReadCellAsText(sheetTitle, string.Format("C{0}", i + 17), 100);
+ string firstName = reader.ReadCellAsText(sheetTitle, string.Format("D{0}", i + 17), 100);
if (lastName.IsNullOrEmpty() && firstName.IsNullOrEmpty()) break; // finish after reading last row
PAS pas = new PAS();
@@ -2351,7 +2345,7 @@ namespace ENI2.Excel
pas.PassengerInTransit = reader.ReadCellAsBool(sheetTitle, string.Format("H{0}", i + 17));
- pas.PassengerPlaceOfBirth = reader.ReadCellAsText(sheetTitle, string.Format("J{0}", i + 17));
+ pas.PassengerPlaceOfBirth = reader.ReadCellAsText(sheetTitle, string.Format("J{0}", i + 17), 100);
pas.PassengerCountryOfBirth = ReadNationality(reader.ReadCellAsText(sheetTitle, string.Format("K{0}", i + 17)), out _);
if (canceled) return true;
@@ -2360,13 +2354,13 @@ namespace ENI2.Excel
pas.PassengerIdentityDocumentType = ReadDocumentType(reader.ReadCellAsText(sheetTitle, string.Format("M{0}", i + 17)), out canceled);
if (canceled) return true;
- pas.PassengerIdentityDocumentId = reader.ReadCellAsText(sheetTitle, string.Format("N{0}", i + 17));
+ pas.PassengerIdentityDocumentId = reader.ReadCellAsText(sheetTitle, string.Format("N{0}", i + 17), 100);
pas.PassengerIdentityDocumentExpiryDate = reader.ReadCellAsDateTime(sheetTitle, string.Format("P{0}", i + 17)) ?? (DateTime?)new DateTime(2100, 12, 31);
- pas.PassengerVisaNumber = reader.ReadCellAsText(sheetTitle, string.Format("Q{0}", i + 17));
- pas.EmergencyCare = reader.ReadCellAsText(sheetTitle, string.Format("R{0}", i + 17));
- pas.EmergencyContactNumber = reader.ReadCellAsText(sheetTitle, string.Format("S{0}", i + 17));
+ pas.PassengerVisaNumber = reader.ReadCellAsText(sheetTitle, string.Format("Q{0}", i + 17), 100);
+ pas.EmergencyCare = reader.ReadCellAsText(sheetTitle, string.Format("R{0}", i + 17), 255);
+ pas.EmergencyContactNumber = reader.ReadCellAsText(sheetTitle, string.Format("S{0}", i + 17), 99);
// pas.NotificationSchengen = pas.HasSchengenDetails;
@@ -2458,8 +2452,8 @@ namespace ENI2.Excel
for (int i = 0; i < 5000; i++)
{
- string lastName = reader.ReadCellAsText(sheetTitle, string.Format("C{0}", i + 18));
- string firstName = reader.ReadCellAsText(sheetTitle, string.Format("D{0}", i + 18));
+ string lastName = reader.ReadCellAsText(sheetTitle, string.Format("C{0}", i + 18), 100);
+ string firstName = reader.ReadCellAsText(sheetTitle, string.Format("D{0}", i + 18), 100);
if (lastName.IsNullOrEmpty() && firstName.IsNullOrEmpty()) break; // finish after reading last row
PASD pas = new PASD();
@@ -2489,7 +2483,7 @@ namespace ENI2.Excel
pas.PassengerInTransit = reader.ReadCellAsBool(sheetTitle, string.Format("H{0}", i + 18));
- pas.PassengerPlaceOfBirth = reader.ReadCellAsText(sheetTitle, string.Format("J{0}", i + 18));
+ pas.PassengerPlaceOfBirth = reader.ReadCellAsText(sheetTitle, string.Format("J{0}", i + 18), 100);
pas.PassengerCountryOfBirth = ReadNationality(reader.ReadCellAsText(sheetTitle, string.Format("K{0}", i + 18)), out _);
if (canceled) return true;
@@ -2498,13 +2492,13 @@ namespace ENI2.Excel
pas.PassengerIdentityDocumentType = ReadDocumentType(reader.ReadCellAsText(sheetTitle, string.Format("M{0}", i + 18)), out canceled);
if (canceled) return true;
- pas.PassengerIdentityDocumentId = reader.ReadCellAsText(sheetTitle, string.Format("N{0}", i + 18));
+ pas.PassengerIdentityDocumentId = reader.ReadCellAsText(sheetTitle, string.Format("N{0}", i + 18), 100);
pas.PassengerIdentityDocumentExpiryDate = reader.ReadCellAsDateTime(sheetTitle, string.Format("P{0}", i + 18)) ?? (DateTime?)new DateTime(2100, 12, 31);
- pas.PassengerVisaNumber = reader.ReadCellAsText(sheetTitle, string.Format("Q{0}", i + 18));
- pas.EmergencyCare = reader.ReadCellAsText(sheetTitle, string.Format("R{0}", i + 18));
- pas.EmergencyContactNumber = reader.ReadCellAsText(sheetTitle, string.Format("S{0}", i + 18));
+ pas.PassengerVisaNumber = reader.ReadCellAsText(sheetTitle, string.Format("Q{0}", i + 18), 100);
+ pas.EmergencyCare = reader.ReadCellAsText(sheetTitle, string.Format("R{0}", i + 18), 255);
+ pas.EmergencyContactNumber = reader.ReadCellAsText(sheetTitle, string.Format("S{0}", i + 18), 99);
// pas.NotificationSchengen = pas.HasSchengenDetails;
diff --git a/bsmd.database/DBManager.cs b/bsmd.database/DBManager.cs
index 37ffa73f..b13f2a8e 100644
--- a/bsmd.database/DBManager.cs
+++ b/bsmd.database/DBManager.cs
@@ -1526,11 +1526,12 @@ namespace bsmd.database
if (core == null) return;
using (SqlCommand cmd = new SqlCommand())
{
- cmd.CommandText = "SELECT COUNT(*) FROM MessageHeader WHERE MessageHeader.MessageCoreId = @ID AND ((MessageHeader.NotificationClass > 1 AND MessageHeader.NotificationClass < 28) OR MessageHeader.NotificationClass > 30)";
+ // count all message classes except VISIT, TRANSIT and STO
+ cmd.CommandText = "SELECT COUNT(*) FROM MessageHeader WHERE MessageHeader.MessageCoreId = @ID AND (MessageHeader.NotificationClass > 1 AND MessageHeader.NotificationClass != 28)";
cmd.Parameters.AddWithValue("@ID", core.Id);
int total = this.PerformReadIntQuery(cmd) ?? 0;
- cmd.CommandText = "SELECT COUNT(*) FROM MessageHeader WHERE MessageHeader.MessageCoreId = @ID AND MessageHeader.BSMDStatus = 5 AND ((MessageHeader.NotificationClass > 1 AND MessageHeader.NotificationClass < 28) OR MessageHeader.NotificationClass > 30)"; // compare "CONFIRMED"
+ cmd.CommandText = "SELECT COUNT(*) FROM MessageHeader WHERE MessageHeader.MessageCoreId = @ID AND MessageHeader.BSMDStatus = 5 AND (MessageHeader.NotificationClass > 1 AND MessageHeader.NotificationClass != 28)"; // compare "CONFIRMED"
int sent = this.PerformReadIntQuery(cmd) ?? 0;
core.NumberSentDisplay = string.Format("{0}/{1}", sent, total);
diff --git a/bsmd.database/PAS.cs b/bsmd.database/PAS.cs
index bddd83ad..cd247fa4 100644
--- a/bsmd.database/PAS.cs
+++ b/bsmd.database/PAS.cs
@@ -128,7 +128,7 @@ namespace bsmd.database
[ENI2Validation]
public string PassengerIdentityDocumentIssuingState { get; set; }
-
+
[Validation(ValidationCode.PAST_DATE)]
[ENI2Validation]
public DateTime? PassengerIdentityDocumentExpiryDate { get; set; }
@@ -388,7 +388,7 @@ namespace bsmd.database
violations.Add(RuleEngine.CreateViolation(ValidationCode.TIME_IMPLAUSIBLE, "Check date of birth", null, this.Title, this.Identifier, this.IsDeparture ? "PASD" : "PASA"));
}
- // NSW 7.2 rules
+ // NSW 7.2 rules
if ((this.NotificationSchengen ?? false) && (!this.HasSchengenDetails))
{
@@ -402,7 +402,7 @@ namespace bsmd.database
if ((this.NotificationPAX ?? false) && (!this.HasPAXDetails))
{
- errors.Add(RuleEngine.CreateError(ValidationCode.V203, "PAX flag set but no data", null, this.Title, null, this.IsDeparture ? "PASD" : "PASA"));
+ errors.Add(RuleEngine.CreateError(ValidationCode.V203, "PAX flag set but no data - emergency details", null, this.Title, null, this.IsDeparture ? "PASD" : "PASA"));
}
if (!(this.NotificationPAX ?? false) && (this.HasPAXDetails))
diff --git a/bsmd.database/Properties/AssemblyProductInfo.cs b/bsmd.database/Properties/AssemblyProductInfo.cs
index ff9453c8..eea01c76 100644
--- a/bsmd.database/Properties/AssemblyProductInfo.cs
+++ b/bsmd.database/Properties/AssemblyProductInfo.cs
@@ -2,6 +2,6 @@
[assembly: AssemblyCompany("schick Informatik")]
[assembly: AssemblyProduct("BSMD NSW interface")]
-[assembly: AssemblyInformationalVersion("7.2.0")]
+[assembly: AssemblyInformationalVersion("7.2.1")]
[assembly: AssemblyCopyright("Copyright © 2014-2023 schick Informatik")]
[assembly: AssemblyTrademark("")]
\ No newline at end of file
diff --git a/bsmd.database/Properties/AssemblyProjectInfo.cs b/bsmd.database/Properties/AssemblyProjectInfo.cs
index 8111450c..cc61ac43 100644
--- a/bsmd.database/Properties/AssemblyProjectInfo.cs
+++ b/bsmd.database/Properties/AssemblyProjectInfo.cs
@@ -1,4 +1,4 @@
using System.Reflection;
-[assembly: AssemblyVersion("7.2.0.*")]
+[assembly: AssemblyVersion("7.2.1.*")]