5.1.13 Restpunkte bearbeitet

This commit is contained in:
Daniel Schick 2018-12-10 09:23:09 +00:00
parent 518623fa81
commit be978be025
17 changed files with 80 additions and 67 deletions

View File

@ -58,7 +58,7 @@ namespace ENI2.Controls
case RuleEngine.LocodeMode.STANDARD: case RuleEngine.LocodeMode.STANDARD:
portName = LocodeDB.PortNameFromLocode(value); break; portName = LocodeDB.PortNameFromLocode(value); break;
case RuleEngine.LocodeMode.SSN: case RuleEngine.LocodeMode.SSN:
portName = LocalizedLookup.SSNPortNameFromLocode(value); break; portName = LocodeDB.SSNPortNameFromLocode(value); break;
} }
LocodeState locodeState = portName.IsNullOrEmpty() ? LocodeState.INVALID : LocodeState.OK; LocodeState locodeState = portName.IsNullOrEmpty() ? LocodeState.INVALID : LocodeState.OK;
this.SetLocodeStateImage(this.imageLocodeState, locodeState); this.SetLocodeStateImage(this.imageLocodeState, locodeState);
@ -143,7 +143,7 @@ namespace ENI2.Controls
case RuleEngine.LocodeMode.STANDARD: case RuleEngine.LocodeMode.STANDARD:
portname = LocodeDB.PortNameFromLocode(directLocode); break; portname = LocodeDB.PortNameFromLocode(directLocode); break;
case RuleEngine.LocodeMode.SSN: case RuleEngine.LocodeMode.SSN:
portname = LocalizedLookup.SSNPortNameFromLocode(directLocode); break; portname = LocodeDB.SSNPortNameFromLocode(directLocode); break;
} }
bool isLocode = !portname.IsNullOrEmpty(); bool isLocode = !portname.IsNullOrEmpty();

View File

@ -216,26 +216,6 @@ namespace ENI2
return result; return result;
} }
public static string SSNPortNameFromLocode(string locode)
{
if (locode.IsNullOrEmpty()) return null;
if (locode.Length != 5) return null;
string result = null;
string query = string.Format("SELECT LocationName FROM SSN_LOCODES WHERE LocationCode = '{0}'", locode);
SQLiteCommand cmd = new SQLiteCommand(query, _con);
IDataReader reader = cmd.ExecuteReader();
while (reader.Read())
{
if (!reader.IsDBNull(0))
result = reader.GetString(0);
break;
}
reader.Close();
return result;
}
public static List<LocodeDB.LocodeEntry> SSNAllLocodesForCityNameAsEntries(string city) public static List<LocodeDB.LocodeEntry> SSNAllLocodesForCityNameAsEntries(string city)
{ {
List<LocodeDB.LocodeEntry> results = new List<LocodeDB.LocodeEntry>(); List<LocodeDB.LocodeEntry> results = new List<LocodeDB.LocodeEntry>();

View File

@ -206,7 +206,7 @@ namespace ENI2.Util
case RuleEngine.LocodeMode.NO_PORT_FLAG: case RuleEngine.LocodeMode.NO_PORT_FLAG:
return !LocodeDB.LocationNameFromLocode(locode).IsNullOrEmpty(); return !LocodeDB.LocationNameFromLocode(locode).IsNullOrEmpty();
case RuleEngine.LocodeMode.SSN: case RuleEngine.LocodeMode.SSN:
return !LocalizedLookup.SSNPortNameFromLocode(locode).IsNullOrEmpty(); return !LocodeDB.SSNPortNameFromLocode(locode).IsNullOrEmpty();
default: default:
return !LocodeDB.PortNameFromLocode(locode).IsNullOrEmpty(); return !LocodeDB.PortNameFromLocode(locode).IsNullOrEmpty();
} }

Binary file not shown.

View File

@ -21,6 +21,7 @@
<DefineConstants>DEBUG;TRACE</DefineConstants> <DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
<CodeAnalysisRuleSet>..\..\..\..\mtc\puls200.frame\frame.ruleset</CodeAnalysisRuleSet>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget> <PlatformTarget>AnyCPU</PlatformTarget>

View File

@ -22,11 +22,9 @@ namespace bsmd.ExcelReadService
{ {
internal class ExcelReader : ExcelBase internal class ExcelReader : ExcelBase
{ {
private Dictionary<string, string> stringVals = new Dictionary<string, string>();
internal enum ReadState { NONE, OK, WARN, FAIL }; internal enum ReadState { NONE, OK, WARN, FAIL };
internal Dictionary<string, string> ImportValues { get { return this.stringVals; } } internal Dictionary<string, string> ImportValues { get; } = new Dictionary<string, string>();
public ExcelReader(string filePath) public ExcelReader(string filePath)
{ {
@ -129,7 +127,7 @@ namespace bsmd.ExcelReadService
if (result != null) if (result != null)
{ {
result = result.Trim(); result = result.Trim();
this.stringVals[lookup] = result; this.ImportValues[lookup] = result;
} }
return result; return result;
@ -147,6 +145,7 @@ namespace bsmd.ExcelReadService
string val = this.ReadText(lookup); string val = this.ReadText(lookup);
if(!val.IsNullOrEmpty()) if(!val.IsNullOrEmpty())
{ {
val = val.ToUpper();
string portName = LocodeDB.PortNameFromLocode(val); string portName = LocodeDB.PortNameFromLocode(val);
if(portName == null) if(portName == null)
{ {
@ -292,9 +291,9 @@ namespace bsmd.ExcelReadService
if(val != null) if(val != null)
{ {
if (val.IndexOf("load", StringComparison.OrdinalIgnoreCase) >= 0) result = 0; if ((val.IndexOf("load", StringComparison.OrdinalIgnoreCase) >= 0) || val.Equals("1")) result = 0;
if (val.IndexOf("discharge", StringComparison.OrdinalIgnoreCase) >= 0) result = 1; if ((val.IndexOf("discharge", StringComparison.OrdinalIgnoreCase) >= 0) || val.Equals("2")) result = 1;
if (val.IndexOf("transit", StringComparison.OrdinalIgnoreCase) >= 0) result = 2; if ((val.IndexOf("transit", StringComparison.OrdinalIgnoreCase) >= 0) || val.Equals("3")) result = 2;
if (result == null) if (result == null)
this.Conf.ConfirmText(lookup, val, ReadState.WARN); this.Conf.ConfirmText(lookup, val, ReadState.WARN);
else else
@ -422,9 +421,9 @@ namespace bsmd.ExcelReadService
if (val != null) if (val != null)
{ {
if (val.IndexOf("all", StringComparison.OrdinalIgnoreCase) >= 0) result = 0; if ((val.IndexOf("all", StringComparison.OrdinalIgnoreCase) >= 0) || val.Equals("1")) result = 0;
if (val.IndexOf("some", StringComparison.OrdinalIgnoreCase) >= 0) result = 1; if ((val.IndexOf("some", StringComparison.OrdinalIgnoreCase) >= 0) || val.Equals("2")) result = 1;
if (val.IndexOf("none", StringComparison.OrdinalIgnoreCase) >= 0) result = 2; if ((val.IndexOf("none", StringComparison.OrdinalIgnoreCase) >= 0) || val.Equals("3")) result = 2;
if (result == null) if (result == null)
this.Conf.ConfirmText(lookup, val, ReadState.WARN); this.Conf.ConfirmText(lookup, val, ReadState.WARN);
else else
@ -473,7 +472,7 @@ namespace bsmd.ExcelReadService
{ {
CultureInfo provider = CultureInfo.InvariantCulture; CultureInfo provider = CultureInfo.InvariantCulture;
string dateString = val.ToString(); string dateString = val.ToString();
string format = "yyyyMMdd"; const string format = "yyyyMMdd";
if (DateTime.TryParseExact(dateString, format, provider, DateTimeStyles.None, out DateTime tmpDate)) if (DateTime.TryParseExact(dateString, format, provider, DateTimeStyles.None, out DateTime tmpDate))
date = tmpDate; date = tmpDate;
} }
@ -562,7 +561,7 @@ namespace bsmd.ExcelReadService
string dateString = val.ToString(); string dateString = val.ToString();
if (!dateString.Contains(":")) if (!dateString.Contains(":"))
{ {
string format = "HHmm"; const string format = "HHmm";
if (DateTime.TryParseExact(dateString, format, provider, DateTimeStyles.None, out DateTime tmpDate)) if (DateTime.TryParseExact(dateString, format, provider, DateTimeStyles.None, out DateTime tmpDate))
result = tmpDate; result = tmpDate;
} }

View File

@ -162,6 +162,30 @@ namespace bsmd.ExcelReadService
return result; return result;
} }
/// <summary>
/// SSN Portname from Locode (for validation)
/// </summary>
public static string SSNPortNameFromLocode(string locode)
{
if (locode.IsNullOrEmpty()) return null;
if (locode.Length != 5) return null;
string result = null;
string query = string.Format("SELECT LocationName FROM SSN_LOCODES WHERE LocationCode = '{0}'", locode);
SQLiteCommand cmd = new SQLiteCommand(query, _con);
IDataReader reader = cmd.ExecuteReader();
while (reader.Read())
{
if (!reader.IsDBNull(0))
result = reader.GetString(0);
break;
}
reader.Close();
return result;
}
/// <summary> /// <summary>
/// Get Locationname from LOCODE /// Get Locationname from LOCODE
/// </summary> /// </summary>

View File

@ -147,7 +147,7 @@ namespace bsmd.ExcelReadService
#region ATA #region ATA
static void ScanATA(List<Message> messages, MessageCore messageCore, ExcelReader reader) private static void ScanATA(List<Message> messages, MessageCore messageCore, ExcelReader reader)
{ {
Message ataMessage = Util.GetMessageWithType(messages, messageCore, Message.NotificationClass.ATA); Message ataMessage = Util.GetMessageWithType(messages, messageCore, Message.NotificationClass.ATA);
if (ataMessage.Elements.Count == 0) if (ataMessage.Elements.Count == 0)
@ -172,7 +172,7 @@ namespace bsmd.ExcelReadService
#region ATD #region ATD
static void ScanATD(List<Message> messages, MessageCore messageCore, ExcelReader reader) private static void ScanATD(List<Message> messages, MessageCore messageCore, ExcelReader reader)
{ {
Message atdMessage = Util.GetMessageWithType(messages, messageCore, Message.NotificationClass.ATD); Message atdMessage = Util.GetMessageWithType(messages, messageCore, Message.NotificationClass.ATD);
if (atdMessage.Elements.Count == 0) if (atdMessage.Elements.Count == 0)
@ -197,7 +197,7 @@ namespace bsmd.ExcelReadService
#region TIEFA #region TIEFA
static void ScanTIEFA(List<Message> messages, MessageCore messageCore, ExcelReader reader) private static void ScanTIEFA(List<Message> messages, MessageCore messageCore, ExcelReader reader)
{ {
Message tiefaMessage = Util.GetMessageWithType(messages, messageCore, Message.NotificationClass.TIEFA); Message tiefaMessage = Util.GetMessageWithType(messages, messageCore, Message.NotificationClass.TIEFA);
if (tiefaMessage.Elements.Count == 0) if (tiefaMessage.Elements.Count == 0)
@ -297,8 +297,7 @@ namespace bsmd.ExcelReadService
if (!bpolNameValue.IsNullOrEmpty() || !bpolLocodeValue.IsNullOrEmpty()) if (!bpolNameValue.IsNullOrEmpty() || !bpolLocodeValue.IsNullOrEmpty())
{ {
PortOfItinerary poi = bpol.GetSublistElementWithIdentifier(i.ToString()) as PortOfItinerary; if (!(bpol.GetSublistElementWithIdentifier(i.ToString()) is PortOfItinerary poi))
if (poi == null)
{ {
poi = new PortOfItinerary(); poi = new PortOfItinerary();
poi.BPOL = bpol; poi.BPOL = bpol;
@ -1098,7 +1097,7 @@ namespace bsmd.ExcelReadService
reader.Conf.ConfirmText("STAT.MMSINumber", stat.MMSINumber, (stat.MMSINumber.IsNullOrEmpty() || (stat.MMSINumber.Length != 9)) ? ExcelReader.ReadState.FAIL : ExcelReader.ReadState.OK); reader.Conf.ConfirmText("STAT.MMSINumber", stat.MMSINumber, (stat.MMSINumber.IsNullOrEmpty() || (stat.MMSINumber.Length != 9)) ? ExcelReader.ReadState.FAIL : ExcelReader.ReadState.OK);
stat.CallSign = reader.ReadTextNoWhitespace("STAT.CallSign"); stat.CallSign = reader.ReadTextNoWhitespace("STAT.CallSign");
reader.Conf.ConfirmText("STAT.CallSign", stat.CallSign, (stat.CallSign.IsNullOrEmpty() ? ExcelReader.ReadState.FAIL : ExcelReader.ReadState.OK)); reader.Conf.ConfirmText("STAT.CallSign", stat.CallSign, stat.CallSign.IsNullOrEmpty() ? ExcelReader.ReadState.FAIL : ExcelReader.ReadState.OK);
stat.ISMCompanyId = reader.ReadTextNoWhitespace("STAT.ISMCompanyId"); stat.ISMCompanyId = reader.ReadTextNoWhitespace("STAT.ISMCompanyId");
@ -1220,14 +1219,19 @@ namespace bsmd.ExcelReadService
reader.Conf.ConfirmText("NOA_NOD.LastPort", lastPort, noa_nod.LastPort.IsNullOrEmpty() ? ExcelReader.ReadState.WARN : ExcelReader.ReadState.OK); reader.Conf.ConfirmText("NOA_NOD.LastPort", lastPort, noa_nod.LastPort.IsNullOrEmpty() ? ExcelReader.ReadState.WARN : ExcelReader.ReadState.OK);
string nextPort = reader.ReadText("NOA_NOD.NextPort"); string nextPort = reader.ReadText("NOA_NOD.NextPort");
bool? isValidSSNPort = false;
if (!nextPort.IsNullOrEmpty()) if (!nextPort.IsNullOrEmpty())
{ {
noa_nod.NextPort = nextPort.Trim(); noa_nod.NextPort = nextPort.Trim();
if (noa_nod.NextPort.Length > 5) if (noa_nod.NextPort.Length > 5)
noa_nod.NextPort = noa_nod.NextPort.Substring(0, 5); //trunc noa_nod.NextPort = noa_nod.NextPort.Substring(0, 5); //trunc
isValidSSNPort = !LocodeDB.SSNPortNameFromLocode(noa_nod.NextPort).IsNullOrEmpty();
} }
reader.Conf.ConfirmText("NOA_NOD.NextPort", nextPort, noa_nod.NextPort.IsNullOrEmpty() ? ExcelReader.ReadState.WARN : ExcelReader.ReadState.OK); if(!isValidSSNPort.HasValue)
reader.Conf.ConfirmText("NOA_NOD.NextPort", nextPort, ExcelReader.ReadState.WARN);
else
reader.Conf.ConfirmText("NOA_NOD.NextPort", nextPort, isValidSSNPort.Value ? ExcelReader.ReadState.OK : ExcelReader.ReadState.FAIL);
if(messageCore.IsTransit) if(messageCore.IsTransit)
{ {
@ -1248,7 +1252,7 @@ namespace bsmd.ExcelReadService
noa_nod.ETDFromLastPort = reader.ReadDateTime("NOA_NOD.ETDDateFromLastPort", "NOA_NOD.ETDTimeFromLastPort"); noa_nod.ETDFromLastPort = reader.ReadDateTime("NOA_NOD.ETDDateFromLastPort", "NOA_NOD.ETDTimeFromLastPort");
noa_nod.ETAToNextPort = reader.ReadDateTime("NOA_NOD.ETADateToNextPort", "NOA_NOD.ETATimeToNextPort"); noa_nod.ETAToNextPort = reader.ReadDateTime("NOA_NOD.ETADateToNextPort", "NOA_NOD.ETATimeToNextPort");
// DK // DK
noa_nod.IsAnchored = reader.ReadBoolean("NOA_NOD.IsAnchored", (reader.Mode == ExcelReader.CountryMode.DE)); noa_nod.IsAnchored = reader.ReadBoolean("NOA_NOD.IsAnchored", reader.Mode == ExcelReader.CountryMode.DE);
} }
@ -1728,9 +1732,9 @@ namespace bsmd.ExcelReadService
string isscType = reader.ReadText("SEC.ISSCType"); string isscType = reader.ReadText("SEC.ISSCType");
if(isscType != null) if(isscType != null)
{ {
if (isscType.Equals("full", StringComparison.OrdinalIgnoreCase)) if (isscType.Equals("full", StringComparison.OrdinalIgnoreCase) || isscType.Equals("1"))
sec.ISSCType = 0; sec.ISSCType = 0;
if (isscType.Equals("interim", StringComparison.OrdinalIgnoreCase)) if (isscType.Equals("interim", StringComparison.OrdinalIgnoreCase) || isscType.Equals("2"))
sec.ISSCType = 1; sec.ISSCType = 1;
} }
@ -1752,9 +1756,9 @@ namespace bsmd.ExcelReadService
string isscIssuerType = reader.ReadText("SEC.ISSCIssuerType"); string isscIssuerType = reader.ReadText("SEC.ISSCIssuerType");
if(isscIssuerType != null) if(isscIssuerType != null)
{ {
if (isscIssuerType.Equals("rso", StringComparison.OrdinalIgnoreCase)) if (isscIssuerType.Equals("rso", StringComparison.OrdinalIgnoreCase) || isscIssuerType.Equals("2"))
sec.ISSCIssuerType = 1; sec.ISSCIssuerType = 1;
if (isscIssuerType.Contains("admin", StringComparison.OrdinalIgnoreCase)) if (isscIssuerType.Contains("admin", StringComparison.OrdinalIgnoreCase) || isscIssuerType.Equals("1"))
sec.ISSCIssuerType = 0; sec.ISSCIssuerType = 0;
} }

View File

@ -20,6 +20,7 @@
<DefineConstants>DEBUG;TRACE</DefineConstants> <DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
<CodeAnalysisRuleSet>..\..\..\..\mtc\puls200.frame\frame.ruleset</CodeAnalysisRuleSet>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType> <DebugType>pdbonly</DebugType>

View File

@ -2,6 +2,6 @@
[assembly: AssemblyCompany("schick Informatik")] [assembly: AssemblyCompany("schick Informatik")]
[assembly: AssemblyProduct("BSMD NSW interface")] [assembly: AssemblyProduct("BSMD NSW interface")]
[assembly: AssemblyInformationalVersion("5.1.2")] [assembly: AssemblyInformationalVersion("5.1.3")]
[assembly: AssemblyCopyright("Copyright © 2014-2018 schick Informatik")] [assembly: AssemblyCopyright("Copyright © 2014-2018 schick Informatik")]
[assembly: AssemblyTrademark("")] [assembly: AssemblyTrademark("")]

View File

@ -1,4 +1,4 @@
using System.Reflection; using System.Reflection;
[assembly: AssemblyVersion("5.1.2.*")] [assembly: AssemblyVersion("5.1.3.*")]

View File

@ -401,7 +401,7 @@ namespace bsmd.database
// individuelle Fehler nach Nachrichtenklasse prüfen // individuelle Fehler nach Nachrichtenklasse prüfen
derivedEntity.MessageCore = aMessage.MessageCore; // some instance we need info from core (NOA / Transit) derivedEntity.MessageCore = aMessage.MessageCore; // some instance we need info from core (NOA / Transit)
if ((derivedEntity is LADG) && aMessage.MessageCore.IsTransit) continue; // kein error reporting für LADG bei Transit (CH, 1.2.16) if ((derivedEntity is LADG) && aMessage.MessageCore.IsTransit) continue; // kein error reporting für LADG bei Transit (CH, 1.2.16)
if ((derivedEntity is SEC) && aMessage.MessageCore.IsSmallShip) continue; // keine STAT Validierung für kleine Schiffe (CH, 1.11.18) if ((derivedEntity is SEC) && aMessage.MessageCore.IsSmallShip) continue; // keine SEC Validierung für kleine Schiffe (CH, 1.11.18)
RuleEngine.ValidateProperties(derivedEntity, errors, violations); RuleEngine.ValidateProperties(derivedEntity, errors, violations);
derivedEntity.Validate(errors, violations); derivedEntity.Validate(errors, violations);
} }

View File

@ -383,6 +383,11 @@ namespace bsmd.database
L10Called.Validate(errors, violations); L10Called.Validate(errors, violations);
} }
if(this.LastTenPortFacilitesCalled.Count != 10)
{
violations.Add(RuleEngine.CreateViolation(ValidationCode.IMPLAUSIBLE, "Number of last port facilities != 10", null, this.Title, null, this.Tablename));
}
foreach (ShipToShipActivitiesDuringLastTenPortFacilitiesCalled s2s in this.ShipToShipActivitiesDuringLastTenPortFacilitiesCalled) foreach (ShipToShipActivitiesDuringLastTenPortFacilitiesCalled s2s in this.ShipToShipActivitiesDuringLastTenPortFacilitiesCalled)
{ {
RuleEngine.ValidateProperties(s2s, errors, violations); RuleEngine.ValidateProperties(s2s, errors, violations);

View File

@ -20,6 +20,7 @@
<DefineConstants>DEBUG;TRACE</DefineConstants> <DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
<CodeAnalysisRuleSet>..\..\..\..\mtc\puls200.frame\frame.ruleset</CodeAnalysisRuleSet>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType> <DebugType>pdbonly</DebugType>

View File

@ -19,21 +19,17 @@ namespace bsmd.hisnord
{ {
public class Request public class Request
{ {
private static ILog _log = LogManager.GetLogger(typeof(Request)); private static readonly ILog _log = LogManager.GetLogger(typeof(Request));
private static Dictionary<Guid, ReportingParty> _reportingPartyDict = null; private static Dictionary<Guid, ReportingParty> _reportingPartyDict = null;
private static Dictionary<MessageCore, Dictionary<Message, string>> coreFilenameDict = new Dictionary<MessageCore, Dictionary<Message,string>>(); private static readonly Dictionary<MessageCore, Dictionary<Message, string>> coreFilenameDict = new Dictionary<MessageCore, Dictionary<Message,string>>();
private static Dictionary<MessageCore, bool> coreUseTestDict = new Dictionary<MessageCore, bool>(); private static readonly Dictionary<MessageCore, bool> coreUseTestDict = new Dictionary<MessageCore, bool>();
//private static Dictionary<Message.NotificationClass, Message> noteMessageDict = new Dictionary<Message.NotificationClass, Message>(); //private static Dictionary<Message.NotificationClass, Message> noteMessageDict = new Dictionary<Message.NotificationClass, Message>();
internal static Dictionary<Guid, ReportingParty> ReportingPartyDict internal static Dictionary<Guid, ReportingParty> ReportingPartyDict
{ {
get get
{ {
if (_reportingPartyDict == null) return _reportingPartyDict ?? (_reportingPartyDict = DBManager.Instance.GetReportingPartyDict());
{
_reportingPartyDict = DBManager.Instance.GetReportingPartyDict();
}
return _reportingPartyDict;
} }
} }
@ -105,8 +101,8 @@ namespace bsmd.hisnord
return false; return false;
} }
_nsw.conveyance.owner_sender.name_short = @"BSMD"; _nsw.conveyance.owner_sender.name_short = "BSMD";
_nsw.conveyance.owner_sender.name_long = @"BSMD";// rp.Name; // core.Customer.Name; _nsw.conveyance.owner_sender.name_long = "BSMD";// rp.Name; // core.Customer.Name;
_nsw.conveyance.owner_sender.address = new addresstype(); _nsw.conveyance.owner_sender.address = new addresstype();
@ -116,7 +112,7 @@ namespace bsmd.hisnord
// das hier ist der e-mail(!) Empfänger für Error/Violation Meldungen // das hier ist der e-mail(!) Empfänger für Error/Violation Meldungen
_nsw.conveyance.owner_sender.contact = new contacts(); _nsw.conveyance.owner_sender.contact = new contacts();
_nsw.conveyance.owner_sender.contact.name = @"BSMD"; // rp.LastName; _nsw.conveyance.owner_sender.contact.name = "BSMD"; // rp.LastName;
_nsw.conveyance.owner_sender.contact.email = rp.EMail; _nsw.conveyance.owner_sender.contact.email = rp.EMail;
_nsw.conveyance.owner_sender.contact.firstname = string.Format("{0} {1}", rp.FirstName, rp.LastName); _nsw.conveyance.owner_sender.contact.firstname = string.Format("{0} {1}", rp.FirstName, rp.LastName);
_nsw.conveyance.owner_sender.contact.phone = rp.Phone; _nsw.conveyance.owner_sender.contact.phone = rp.Phone;
@ -207,7 +203,7 @@ namespace bsmd.hisnord
hn_stat.InmarsatCallNumbers.InmarsatCallNumber = callNumbers.ToArray(); hn_stat.InmarsatCallNumbers.InmarsatCallNumber = callNumbers.ToArray();
} }
if (!stat.ISMCompanyName.IsNullOrEmpty() || ((stat.GrossTonnage ?? 0) > 500)) // Vio. 821 if (!stat.ISMCompanyName.IsNullOrEmpty() && ((stat.GrossTonnage ?? 0) >= 500)) // Vio. 821
{ {
hn_stat.ISMCompany = new ismcompany(); hn_stat.ISMCompany = new ismcompany();
if (!stat.ISMCompanyCity.IsNullOrEmpty()) if (!stat.ISMCompanyCity.IsNullOrEmpty())
@ -1024,7 +1020,7 @@ namespace bsmd.hisnord
List<object> mdh_items = new List<object>(); List<object> mdh_items = new List<object>();
List<ItemsChoiceType5> mdh_types = new List<ItemsChoiceType5>(); List<ItemsChoiceType5> mdh_types = new List<ItemsChoiceType5>();
if (mdh.MDHSimplification.HasValue && mdh.MDHSimplification.Value) if (mdh.MDHSimplification == true)
{ {
mdh_items.Add(ytype.Y); mdh_items.Add(ytype.Y);
mdh_types.Add(ItemsChoiceType5.MDHSimplification); mdh_types.Add(ItemsChoiceType5.MDHSimplification);

View File

@ -20,6 +20,7 @@
<DefineConstants>DEBUG;TRACE</DefineConstants> <DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
<CodeAnalysisRuleSet>..\..\..\..\mtc\puls200.frame\frame.ruleset</CodeAnalysisRuleSet>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType> <DebugType>pdbonly</DebugType>

View File

@ -21,6 +21,7 @@
<DefineConstants>DEBUG;TRACE</DefineConstants> <DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
<CodeAnalysisRuleSet>..\..\..\..\mtc\puls200.frame\frame.ruleset</CodeAnalysisRuleSet>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType> <DebugType>pdbonly</DebugType>