3.20.0: MaxLength Attribut zur zusätzlichen Validierung beim Speichern, Modultest Excel-Einlesen (Achtung Logfile Auswertung), Versenden der Highlight-Kopie
This commit is contained in:
parent
746928a61e
commit
dad76beb2c
Binary file not shown.
@ -34,6 +34,9 @@
|
||||
</ArrayOfString>
|
||||
</value>
|
||||
</setting>
|
||||
<setting name="SendConfirmationSheet" serializeAs="String">
|
||||
<value>False</value>
|
||||
</setting>
|
||||
</bsmd.ExcelReadService.Properties.Settings>
|
||||
</applicationSettings>
|
||||
</configuration>
|
||||
@ -131,19 +131,25 @@ namespace bsmd.ExcelReadService
|
||||
receiptText = string.Format("Incoming sheet could not be read: {0}", readMessage);
|
||||
_log.Error(receiptText);
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: Quittung / set messagecore to createreport and let reportGenerator create a reply?
|
||||
if (readResult)
|
||||
{
|
||||
// Quittung / set messagecore to createreport and let reportGenerator create a reply?
|
||||
if (Properties.Settings.Default.SendConfirmationSheet)
|
||||
{
|
||||
string confirmationFileName = Path.Combine(Path.GetDirectoryName(attachmentLocalPath),
|
||||
string.Format("{0}_confirm.xls", Path.GetFileNameWithoutExtension(attachmentLocalPath)));
|
||||
|
||||
// create a reply sheet (template + scanned highlighted content for verification
|
||||
if (readResult)
|
||||
{
|
||||
string confirmationExcelFilePath = Util.CreateConfirmationSheet(messageCore);
|
||||
List<string> sendItems = new List<string>();
|
||||
sendItems.Add(confirmationExcelFilePath);
|
||||
// send reply sheet back to sender
|
||||
BSMDMail.SendNSWReportWithAttachments(Properties.Settings.Default.SendEMailSubject, sendItems);
|
||||
}
|
||||
if (reader.SaveCopy(confirmationFileName))
|
||||
{
|
||||
List<string> sendItems = new List<string>();
|
||||
sendItems.Add(confirmationFileName);
|
||||
// send reply sheet back to sender
|
||||
BSMDMail.SendNSWReportWithAttachments(Properties.Settings.Default.SendEMailSubject, sendItems);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (receiptText.Length > 0)
|
||||
|
||||
@ -22,6 +22,7 @@ namespace bsmd.ExcelReadService
|
||||
{
|
||||
private ILog _log = LogManager.GetLogger(typeof(ExcelReader));
|
||||
private Workbooks _excelWorkbooks;
|
||||
private Workbook _portcall;
|
||||
private Application _excelApp;
|
||||
private Dictionary<string, Name> _nameDict;
|
||||
|
||||
@ -37,22 +38,50 @@ namespace bsmd.ExcelReadService
|
||||
{
|
||||
this._excelApp = new Application();
|
||||
this._excelWorkbooks = _excelApp.Workbooks;
|
||||
Workbook portcall = _excelWorkbooks.Open(filePath, 0, true, 5, "", "", false, XlPlatform.xlWindows, "", false, false, 0, false, false, false);
|
||||
this._portcall = _excelWorkbooks.Open(filePath, 0, true, 5, "", "", false, XlPlatform.xlWindows, "", false, false, 0, false, false, false);
|
||||
_nameDict = new Dictionary<string, Name>();
|
||||
foreach(Name name in portcall.Names)
|
||||
foreach(Name name in _portcall.Names)
|
||||
{
|
||||
_nameDict[name.Name] = name;
|
||||
}
|
||||
}
|
||||
|
||||
internal void Save(string filePath)
|
||||
internal bool Save(string filePath)
|
||||
{
|
||||
if (this._excelApp == null) return;
|
||||
this._excelApp.SaveWorkspace(filePath);
|
||||
bool result = true;
|
||||
if (this._excelApp == null) return false;
|
||||
try
|
||||
{
|
||||
this._excelApp.SaveWorkspace(filePath);
|
||||
}
|
||||
catch(Exception ex)
|
||||
{
|
||||
_log.WarnFormat("cannot save workspace: {0}", ex.Message);
|
||||
result = false;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
internal bool SaveCopy(string filePath)
|
||||
{
|
||||
bool result = true;
|
||||
if (this._excelApp == null) return false;
|
||||
try
|
||||
{
|
||||
this._portcall.Saved = true;
|
||||
this._portcall.SaveCopyAs(filePath);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_log.WarnFormat("cannot save copy of workbook: {0}", ex.Message);
|
||||
result = false;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
internal void HighlightLookup(string lookup, ReadState state)
|
||||
{
|
||||
if (!_nameDict.ContainsKey(lookup)) return;
|
||||
Range range = _nameDict[lookup].RefersToRange;
|
||||
if(range != null)
|
||||
{
|
||||
@ -117,6 +146,7 @@ namespace bsmd.ExcelReadService
|
||||
internal byte? ReadShippingArea(string lookup)
|
||||
{
|
||||
string val = this.ReadText(lookup);
|
||||
if (val == null) return null;
|
||||
if (val.IndexOf("baltic", StringComparison.OrdinalIgnoreCase) >= 0) return 0;
|
||||
if (val.IndexOf("europe", StringComparison.OrdinalIgnoreCase) >= 0) return 1;
|
||||
if (val.IndexOf("overseas", StringComparison.OrdinalIgnoreCase) >= 0) return 2;
|
||||
@ -127,6 +157,7 @@ namespace bsmd.ExcelReadService
|
||||
internal byte? ReadHullConfiguration(string lookup)
|
||||
{
|
||||
string val = this.ReadText(lookup);
|
||||
if (val == null) return null;
|
||||
if (val.IndexOf("sbt", StringComparison.OrdinalIgnoreCase) >= 0) return 1;
|
||||
if (val.IndexOf("single", StringComparison.OrdinalIgnoreCase) >= 0) return 0;
|
||||
if (val.IndexOf("double", StringComparison.OrdinalIgnoreCase) >= 0) return 2;
|
||||
@ -137,6 +168,7 @@ namespace bsmd.ExcelReadService
|
||||
internal byte? ReadConditionTanks(string lookup)
|
||||
{
|
||||
string val = this.ReadText(lookup);
|
||||
if (val == null) return null;
|
||||
if (val.IndexOf("full", StringComparison.OrdinalIgnoreCase) >= 0) return 0;
|
||||
if (val.IndexOf("empty", StringComparison.OrdinalIgnoreCase) >= 0) return 1;
|
||||
if (val.IndexOf("inerted", StringComparison.OrdinalIgnoreCase) >= 0) return 2;
|
||||
@ -147,6 +179,7 @@ namespace bsmd.ExcelReadService
|
||||
internal byte? ReadDelivery(string lookup)
|
||||
{
|
||||
string val = this.ReadText(lookup);
|
||||
if (val == null) return null;
|
||||
if (val.IndexOf("all", StringComparison.OrdinalIgnoreCase) >= 0) return 0;
|
||||
if (val.IndexOf("some", StringComparison.OrdinalIgnoreCase) >= 0) return 1;
|
||||
if (val.IndexOf("none", StringComparison.OrdinalIgnoreCase) >= 0) return 2;
|
||||
@ -166,6 +199,7 @@ namespace bsmd.ExcelReadService
|
||||
{
|
||||
try
|
||||
{
|
||||
if (!_nameDict.ContainsKey(lookup)) return null;
|
||||
var val = _nameDict[lookup].RefersToRange.Value;
|
||||
if (val is DateTime) return val;
|
||||
if (val is double)
|
||||
@ -206,6 +240,7 @@ namespace bsmd.ExcelReadService
|
||||
{
|
||||
try
|
||||
{
|
||||
if (!_nameDict.ContainsKey(lookup)) return null;
|
||||
var val = _nameDict[lookup].RefersToRange.Value;
|
||||
if (val is DateTime) return val;
|
||||
if (val is double)
|
||||
@ -231,6 +266,7 @@ namespace bsmd.ExcelReadService
|
||||
double result;
|
||||
try
|
||||
{
|
||||
if (!_nameDict.ContainsKey(lookup)) return null;
|
||||
var val = _nameDict[lookup].RefersToRange.Value;
|
||||
if (val is double) return val;
|
||||
if (val is string)
|
||||
|
||||
@ -59,7 +59,15 @@ namespace bsmd.ExcelReadService
|
||||
public static List<string> AllLocodesForCityName(string city)
|
||||
{
|
||||
List<string> results = new List<string>();
|
||||
string query = string.Format("SELECT city_code, countries.code FROM locodes JOIN countries ON locodes.country_id = countries.ID WHERE locodes.port='t' AND locodes.name like '{1}'", city);
|
||||
if(city.Contains(","))
|
||||
{
|
||||
string[] elems = city.Split(',');
|
||||
string countryCode = CountryCodeFromName(elems[1].Trim());
|
||||
string lcLookup = LocodeFromCity(elems[0].Trim(), countryCode);
|
||||
if ((countryCode != null) && (lcLookup != null))
|
||||
results.Add(lcLookup);
|
||||
}
|
||||
string query = string.Format("SELECT city_code, countries.code FROM locodes JOIN countries ON locodes.country_id = countries.ID WHERE locodes.port='t' AND locodes.name like '{0}'", city);
|
||||
SQLiteCommand cmd = new SQLiteCommand(query, _con);
|
||||
IDataReader reader = cmd.ExecuteReader();
|
||||
while (reader.Read())
|
||||
|
||||
@ -74,5 +74,14 @@ namespace bsmd.ExcelReadService.Properties {
|
||||
return ((global::System.Collections.Specialized.StringCollection)(this["ValidSender"]));
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.ApplicationScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("False")]
|
||||
public bool SendConfirmationSheet {
|
||||
get {
|
||||
return ((bool)(this["SendConfirmationSheet"]));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -24,5 +24,8 @@
|
||||
<string>hollmann@bsmd.de</string>
|
||||
</ArrayOfString></Value>
|
||||
</Setting>
|
||||
<Setting Name="SendConfirmationSheet" Type="System.Boolean" Scope="Application">
|
||||
<Value Profile="(Default)">False</Value>
|
||||
</Setting>
|
||||
</Settings>
|
||||
</SettingsFile>
|
||||
@ -140,13 +140,7 @@ namespace bsmd.ExcelReadService
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
internal static string CreateConfirmationSheet(MessageCore messageCore)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#region ATA
|
||||
|
||||
@ -354,6 +348,7 @@ namespace bsmd.ExcelReadService
|
||||
if (!callPurposeDescription.IsNullOrEmpty())
|
||||
{
|
||||
CallPurpose callPurpose = new CallPurpose();
|
||||
callPurpose.NOA_NOD = noa_nod;
|
||||
callPurpose.CallPurposeCode = noa_nod.getCallPurposeCodeFromDescription(callPurposeDescription) ?? 0;
|
||||
callPurpose.CallPurposeDescription = callPurposeDescription;
|
||||
noa_nod.CallPurposes.Add(callPurpose);
|
||||
@ -591,8 +586,8 @@ namespace bsmd.ExcelReadService
|
||||
|
||||
s2sActivity.ShipToShipActivityLocationName = reader.ReadText(s2sName);
|
||||
s2sActivity.ShipToShipActivityLocationLoCode = reader.ReadTextNoWhitespace(s2sLocode);
|
||||
s2sActivity.ShipToShipActivityLocationCoordinatesLatitude = (int)reader.ReadNumber(s2sLatitude);
|
||||
s2sActivity.ShipToShipActivityLocationCoordinatesLongitude = (int)reader.ReadNumber(s2sLongitude);
|
||||
s2sActivity.ShipToShipActivityLocationCoordinatesLatitude = (int?)reader.ReadNumber(s2sLatitude);
|
||||
s2sActivity.ShipToShipActivityLocationCoordinatesLongitude = (int?)reader.ReadNumber(s2sLongitude);
|
||||
s2sActivity.ShipToShipActivityDateFrom = reader.ReadDate(s2sFromDate);
|
||||
s2sActivity.ShipToShipActivityDateTo = reader.ReadDate(s2sToDate);
|
||||
s2sActivity.ShipToShipActivityType = reader.ReadText(s2sActivityString);
|
||||
@ -774,7 +769,7 @@ namespace bsmd.ExcelReadService
|
||||
}
|
||||
|
||||
ladg.CargoCodeNST = reader.ReadText(lnType);
|
||||
if (ladg.CargoCodeNST.Length != 2) ladg.CargoCodeNST = null; // stupid validation
|
||||
if ((ladg.CargoCodeNST != null) && (ladg.CargoCodeNST.Length != 2)) ladg.CargoCodeNST = null; // stupid validation
|
||||
|
||||
ladg.CargoNumberOfItems = (int?) reader.ReadNumber(lnCNOI);
|
||||
ladg.CargoGrossQuantity_TNE = reader.ReadNumber(lnCGQ);
|
||||
@ -972,8 +967,15 @@ namespace bsmd.ExcelReadService
|
||||
// Im Sheet könnte der Name statt des LOCODES stehen!
|
||||
if (!RuleEngine.IsGermanLocode(poc))
|
||||
{
|
||||
string aGermanPortName = poc;
|
||||
|
||||
if(poc.Contains(',')) // irgendwas wie "Hamburg, Germany"
|
||||
{
|
||||
aGermanPortName = poc.Split(',')[0];
|
||||
}
|
||||
|
||||
// somehow lookup LOCODE from the port's name!
|
||||
poc = LocodeDB.LocodeGERFromCity(poc);
|
||||
poc = LocodeDB.LocodeGERFromCity(aGermanPortName);
|
||||
}
|
||||
}
|
||||
|
||||
@ -982,11 +984,13 @@ namespace bsmd.ExcelReadService
|
||||
// ETA
|
||||
eta = reader.ReadDateTime("NOA_NOD.ETADateToPortOfCall", "NOA_NOD.ETATimeToPortOfCall");
|
||||
|
||||
if ((imo != null) && (eta.HasValue))
|
||||
if ((imo != null) && (eta.HasValue) && (poc != null))
|
||||
{
|
||||
result = DBManager.Instance.GetMessageCoreByShipInfos(imo, eta.Value, poc);
|
||||
if (result.IsNew)
|
||||
result.IsTransit = isTransit;
|
||||
result = DBManager.Instance.GetMessageCoreByShipInfos(imo, eta.Value, poc);
|
||||
if(result != null)
|
||||
{
|
||||
_log.InfoFormat("Core [{3}] found for IMO {0}, ETA {1}, Poc {2}", imo, eta, poc, result.Id);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1015,6 +1019,7 @@ namespace bsmd.ExcelReadService
|
||||
result = new MessageCore();
|
||||
|
||||
result.IMO = imo;
|
||||
result.IsTransit = isTransit;
|
||||
result.ReportStatus = MessageCore.ReportStatusEnum.COMPLETE;
|
||||
result.Portname = poc;
|
||||
result.ETA = eta;
|
||||
|
||||
@ -35,44 +35,54 @@ namespace bsmd.database
|
||||
[ShowReport]
|
||||
[Validation2(ValidationCode.NOT_NULL)]
|
||||
[LookupName("AGNT.AgentCompanyName")]
|
||||
[MaxLength(100)]
|
||||
public string AgentCompanyName { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[LookupName("AGNT.AgentStreetAndNumber")]
|
||||
[MaxLength(100)]
|
||||
public string AgentStreetAndNumber { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[LookupName("AGNT.AgentPostalCode")]
|
||||
[MaxLength(100)]
|
||||
public string AgentPostalCode { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[LookupName("AGNT.AgentCity")]
|
||||
[MaxLength(100)]
|
||||
public string AgentCity { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[LookupName("AGNT.AgentCountry")]
|
||||
[MaxLength(100)]
|
||||
public string AgentCountry { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[LookupName("AGNT.AgentLastName")]
|
||||
[Validation2(ValidationCode.NOT_NULL)]
|
||||
[MaxLength(100)]
|
||||
public string AgentLastName { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[LookupName("AGNT.AgentFirstName")]
|
||||
[MaxLength(100)]
|
||||
public string AgentFirstName { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[Validation2(ValidationCode.NOT_NULL)]
|
||||
[LookupName("AGNT.AgentPhone")]
|
||||
[MaxLength(100)]
|
||||
public string AgentPhone { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[LookupName("AGNT.AgentFax")]
|
||||
[MaxLength(100)]
|
||||
public string AgentFax { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[LookupName("AGNT.AgentEMail")]
|
||||
[MaxLength(100)]
|
||||
public string AgentEMail { get; set; }
|
||||
|
||||
#endregion
|
||||
|
||||
@ -26,6 +26,7 @@ namespace bsmd.database
|
||||
|
||||
[ShowReport]
|
||||
[Validation(ValidationCode.NOT_NULL)]
|
||||
[MaxLength(100)]
|
||||
public string BunkerFuelType { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
|
||||
@ -26,6 +26,7 @@ namespace bsmd.database
|
||||
|
||||
[ShowReport]
|
||||
[Validation(ValidationCode.NOT_NULL)]
|
||||
[MaxLength(100)]
|
||||
public string BunkerFuelType { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
|
||||
@ -27,16 +27,19 @@ namespace bsmd.database
|
||||
[ShowReport]
|
||||
[ReportDisplayName("Last name")]
|
||||
[Validation(ValidationCode.NOT_NULL)]
|
||||
[MaxLength(100)]
|
||||
public string CrewMemberLastName { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[ReportDisplayName("First name")]
|
||||
[Validation(ValidationCode.NOT_NULL)]
|
||||
[MaxLength(100)]
|
||||
public string CrewMemberFirstName { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[ReportDisplayName("Place of birth")]
|
||||
[Validation(ValidationCode.NOT_NULL)]
|
||||
[MaxLength(100)]
|
||||
public string CrewMemberPlaceOfBirth { get; set; }
|
||||
|
||||
[Validation(ValidationCode.NOT_NULL)]
|
||||
@ -63,6 +66,7 @@ namespace bsmd.database
|
||||
[ShowReport]
|
||||
[ReportDisplayName("Nationality")]
|
||||
[Validation(ValidationCode.NOT_NULL)]
|
||||
[MaxLength(2)]
|
||||
public string CrewMemberNationality { get; set; }
|
||||
|
||||
[Validation(ValidationCode.NOT_NULL)]
|
||||
@ -75,16 +79,19 @@ namespace bsmd.database
|
||||
[ShowReport]
|
||||
[ReportDisplayName("Identity document id")]
|
||||
[Validation(ValidationCode.NOT_NULL)]
|
||||
[MaxLength(100)]
|
||||
public string CrewMemberIdentityDocumentId { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[ReportDisplayName("Visa number")]
|
||||
[Validation(ValidationCode.NOT_NULL)]
|
||||
[MaxLength(100)]
|
||||
public string CrewMemberVisaNumber { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[ReportDisplayName("Duty")]
|
||||
[Validation(ValidationCode.NOT_NULL)]
|
||||
[MaxLength(100)]
|
||||
public string CrewMemberDuty { get; set; }
|
||||
|
||||
public string Identifier { get; set; }
|
||||
|
||||
@ -30,6 +30,7 @@ namespace bsmd.database
|
||||
public int CallPurposeCode { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[MaxLength(100)]
|
||||
public string CallPurposeDescription { get; set; }
|
||||
|
||||
public string Identifier { get; set; }
|
||||
|
||||
@ -28,24 +28,34 @@ namespace bsmd.database
|
||||
|
||||
#region Properties
|
||||
|
||||
[MaxLength(100)]
|
||||
public string Name { get; set; }
|
||||
|
||||
[MaxLength(50)]
|
||||
public string Phone { get; set; }
|
||||
|
||||
[MaxLength(100)]
|
||||
public string Email { get; set; }
|
||||
|
||||
[MaxLength(50)]
|
||||
public string ContactFirstName { get; set; }
|
||||
|
||||
[MaxLength(50)]
|
||||
public string ContactLastName { get; set; }
|
||||
|
||||
[MaxLength(50)]
|
||||
public string StreetAndNumber { get; set; }
|
||||
|
||||
[MaxLength(50)]
|
||||
public string PostalCode { get; set; }
|
||||
|
||||
[MaxLength(50)]
|
||||
public string City { get; set; }
|
||||
|
||||
[MaxLength(50)]
|
||||
public string Country { get; set; }
|
||||
|
||||
[MaxLength(50)]
|
||||
public string CustomerNumber { get; set; }
|
||||
|
||||
#endregion
|
||||
|
||||
@ -349,6 +349,13 @@ namespace bsmd.database
|
||||
|
||||
public void Save(DatabaseEntity entity)
|
||||
{
|
||||
List<string> truncatedFields = new List<string>();
|
||||
entity.TruncateFields(truncatedFields);
|
||||
foreach(string truncatedField in truncatedFields)
|
||||
{
|
||||
_log.WarnFormat("Entity {0} save: Field truncated: {1}", entity.GetType(), truncatedField);
|
||||
}
|
||||
|
||||
SqlCommand cmd = new SqlCommand();
|
||||
entity.PrepareSave(cmd);
|
||||
int queryResult = this.PerformNonQuery(cmd);
|
||||
|
||||
@ -83,12 +83,50 @@ namespace bsmd.database
|
||||
|
||||
public abstract List<DatabaseEntity> LoadList(IDataReader reader);
|
||||
|
||||
/// <summary>
|
||||
/// Überprüft eingegangene Meldeklassen auf Fehlerkonditionen
|
||||
/// </summary>
|
||||
/// <param name="errors"></param>
|
||||
/// <param name="violations"></param>
|
||||
public virtual void Validate(List<MessageError> errors, List<MessageViolation> violations)
|
||||
{
|
||||
errors = new List<MessageError>();
|
||||
violations = new List<MessageViolation>();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Diese Methode sollte eigentlich nie einen Effekt haben und dient nur dazu, dass keine Situation
|
||||
/// auftreten kann in der ein Insert/Update an fehlender Datenvalidierung kracht
|
||||
/// </summary>
|
||||
/// <param name="truncated"></param>
|
||||
public virtual void TruncateFields(List<string> truncated)
|
||||
{
|
||||
List<PropertyInfo> props = new List<PropertyInfo>();
|
||||
|
||||
// add flagged properties to check list
|
||||
props.AddRange(this.GetType().GetProperties().Where(prop => Attribute.IsDefined(prop, typeof(MaxLengthAttribute))));
|
||||
foreach (PropertyInfo property in props)
|
||||
{
|
||||
object propValue = property.GetValue(this, null);
|
||||
string value = (propValue == null) ? string.Empty : propValue.ToString();
|
||||
|
||||
MaxLengthAttribute maxLengthAttribute = Attribute.GetCustomAttribute(property, typeof(MaxLengthAttribute))
|
||||
as MaxLengthAttribute;
|
||||
|
||||
if(value.Length > maxLengthAttribute.MaxLength) // truncate situation
|
||||
{
|
||||
string maxLengthValue = value.Substring(0, maxLengthAttribute.MaxLength);
|
||||
truncated.Add(string.Format("[{0} ({1})]: {2}", property.Name, maxLengthAttribute.MaxLength, value));
|
||||
property.SetValue(this, maxLengthValue);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Kann überschrieben werden, wenn abhängig von den Daten (einem Flag) andere Regeln gelten (Bsp. wenn schon eine
|
||||
/// MDH Meldung abgegeben wurde)
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public virtual ValidationBlock GetValidationBlock()
|
||||
{
|
||||
return ValidationBlock.BLOCK1;
|
||||
|
||||
@ -27,6 +27,7 @@ namespace bsmd.database
|
||||
public HAZ HAZ { get; set; }
|
||||
[ShowReport]
|
||||
[Validation(ValidationCode.NOT_NULL)]
|
||||
[MaxLength(255)]
|
||||
public string ProductName { get; set; }
|
||||
[ShowReport]
|
||||
[Validation(ValidationCode.NOT_NULL)]
|
||||
@ -36,24 +37,37 @@ namespace bsmd.database
|
||||
[ShowReport]
|
||||
[Validation(ValidationCode.NOT_NULL)]
|
||||
public byte? FlashpointInformation { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[MaxLength(11)]
|
||||
public string Flashpoint_CEL { get; set; }
|
||||
[ShowReport]
|
||||
[Validation(ValidationCode.DOUBLE_GT_ZERO)]
|
||||
|
||||
public double? Quantity_KGM { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[Validation(ValidationCode.NOT_NULL)]
|
||||
[MaxLength(24)]
|
||||
public string StowagePosition { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[Validation(ValidationCode.LOCODE)]
|
||||
[MaxLength(5)]
|
||||
public string PortOfLoading { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[Validation(ValidationCode.LOCODE)]
|
||||
[MaxLength(5)]
|
||||
public string PortOfDischarge { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
public bool? SpecRef15_19 { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[MaxLength(255)]
|
||||
public string Remarks { get; set; }
|
||||
|
||||
public string Identifier { get; set; }
|
||||
|
||||
#endregion
|
||||
|
||||
@ -25,27 +25,43 @@ namespace bsmd.database
|
||||
#region Properties
|
||||
|
||||
public HAZ HAZ { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[MaxLength(4)]
|
||||
public string UNNumber { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[MaxLength(10)]
|
||||
public string IMOClass { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[Validation(ValidationCode.NOT_NULL)]
|
||||
[MaxLength(255)]
|
||||
public string ProductName { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[Validation(ValidationCode.DOUBLE_GT_ZERO)]
|
||||
public double? Quantity_KGM { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[Validation(ValidationCode.NOT_NULL)]
|
||||
[MaxLength(24)]
|
||||
public string StowagePosition { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[Validation(ValidationCode.LOCODE)]
|
||||
[MaxLength(5)]
|
||||
public string PortOfLoading { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[Validation(ValidationCode.LOCODE)]
|
||||
[MaxLength(5)]
|
||||
public string PortOfDischarge { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[MaxLength(255)]
|
||||
public string Remarks { get; set; }
|
||||
|
||||
public string Identifier { get; set; }
|
||||
|
||||
#endregion
|
||||
|
||||
@ -27,83 +27,129 @@ namespace bsmd.database
|
||||
#region Properties
|
||||
|
||||
public HAZ HAZ { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[Validation(ValidationCode.NOT_NULL)]
|
||||
[MaxLength(10)]
|
||||
public string UNNumber { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
public byte? PackingGroup { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[Validation(ValidationCode.NOT_NULL)]
|
||||
[MaxLength(255)]
|
||||
public string ProperShippingName { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[Validation(ValidationCode.NOT_NULL)]
|
||||
[MaxLength(10)]
|
||||
public string IMOClass { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[MaxLength(10)]
|
||||
public string CompatibilityGroup { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[MaxLength(255)]
|
||||
public string TechnicalName { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
public double? NetExplosiveMass_KGM { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[MaxLength(10)]
|
||||
public string Flashpoint_CEL { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[MaxLength(100)]
|
||||
public string Class7NuclideName { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
public double? Class7MaxActivity_BQL { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
public int? Class7Category { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
public double? Class7TransportIndex { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
public int? Class7CSI { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
public double? ControlTemperature_CEL { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
public double? EmergencyTemperature_CEL { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[Validation(ValidationCode.NOT_NULL)]
|
||||
public bool? MarinePollutant { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[Validation(ValidationCode.NOT_NULL)]
|
||||
public int? NumberOfPackages { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[Validation(ValidationCode.NOT_NULL)]
|
||||
[MaxLength(255)]
|
||||
public string PackageType { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[Validation(ValidationCode.NOT_NULL)]
|
||||
public bool? LimitedQuantities { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[Validation(ValidationCode.NOT_NULL)]
|
||||
public bool? ExceptedQuantities { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
public double? NetQuantity_KGM { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
public double? GrossQuantity_KGM { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
public double? Volume_MTQ { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
public bool? GeneralCargoIBC { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[MaxLength(24)]
|
||||
public string ContainerNumber { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[MaxLength(24)]
|
||||
public string VehicleLicenseNumber { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[Validation(ValidationCode.NOT_NULL)]
|
||||
[MaxLength(24)]
|
||||
public string StowagePosition { get; set; }
|
||||
|
||||
[MaxLength(5)]
|
||||
public string Bay { get; set; }
|
||||
|
||||
[MaxLength(5)]
|
||||
public string Row { get; set; }
|
||||
|
||||
[MaxLength(5)]
|
||||
public string Tier { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[Validation(ValidationCode.LOCODE)]
|
||||
[MaxLength(5)]
|
||||
public string PortOfLoading { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[Validation(ValidationCode.LOCODE)]
|
||||
[MaxLength(5)]
|
||||
public string PortOfDischarge { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[MaxLength(255)]
|
||||
public string Remarks { get; set; }
|
||||
|
||||
public List<SubsidiaryRisks> SubsidiaryRiskList { get { return this.subsidiaryRisksList; } }
|
||||
|
||||
@ -25,30 +25,47 @@ namespace bsmd.database
|
||||
#region Properties
|
||||
|
||||
public HAZ HAZ { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[Validation(ValidationCode.NOT_NULL)]
|
||||
[MaxLength(255)]
|
||||
public string BulkCargoShippingName { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[Validation(ValidationCode.NOT_NULL)]
|
||||
public bool? MHB { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[MaxLength(4)]
|
||||
public string UNNumber { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[MaxLength(10)]
|
||||
public string IMOClass { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[Validation(ValidationCode.DOUBLE_GT_ZERO)]
|
||||
public double? Quantity_KGM { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[Validation(ValidationCode.NOT_NULL)]
|
||||
[MaxLength(24)]
|
||||
public string StowagePosition { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[Validation(ValidationCode.LOCODE)]
|
||||
[MaxLength(5)]
|
||||
public string PortOfLoading { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[Validation(ValidationCode.LOCODE)]
|
||||
[MaxLength(5)]
|
||||
public string PortOfDischarge { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[MaxLength(255)]
|
||||
public string Remarks { get; set; }
|
||||
|
||||
public string Identifier { get; set; }
|
||||
|
||||
#endregion
|
||||
|
||||
@ -30,12 +30,15 @@ namespace bsmd.database
|
||||
[ShowReport]
|
||||
[Validation(ValidationCode.NOT_NULL)]
|
||||
[LookupName("INFO.RequestedPositionInPortOfCall")]
|
||||
[MaxLength(100)]
|
||||
public string RequestedPositionInPortOfCall { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[MaxLength(255)]
|
||||
public string SpecialRequirementsOfShipAtBerth { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[MaxLength(100)]
|
||||
public string ConstructionCharacteristicsOfShip { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
@ -49,10 +52,13 @@ namespace bsmd.database
|
||||
[ShowReport]
|
||||
[LookupName("INFO.PortArea")]
|
||||
[Validation(ValidationCode.NOT_NULL)]
|
||||
[MaxLength(50)]
|
||||
public string PortArea { get; set; }
|
||||
|
||||
[MaxLength(50)]
|
||||
public string BowThrusterPower { get; set; }
|
||||
|
||||
[MaxLength(50)]
|
||||
public string SternThrusterPower { get; set; }
|
||||
|
||||
#endregion
|
||||
|
||||
@ -27,6 +27,7 @@ namespace bsmd.database
|
||||
public MDH MDH { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[MaxLength(255)]
|
||||
public string InfectedAreaPort { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
|
||||
@ -30,6 +30,7 @@ namespace bsmd.database
|
||||
|
||||
[ShowReport]
|
||||
[Validation(ValidationCode.TWO_DIGIT)]
|
||||
[MaxLength(5)]
|
||||
public string CargoCodeNST { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
|
||||
@ -25,25 +25,38 @@ namespace bsmd.database
|
||||
#region Properties
|
||||
|
||||
public SEC SEC { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[MaxLength(100)]
|
||||
public string PortFacilityPortName { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[MaxLength(100)]
|
||||
public string PortFacilityPortCountry { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[MaxLength(5)]
|
||||
public string PortFacilityPortLoCode { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[Validation(ValidationCode.NOT_NULL)]
|
||||
public DateTime? PortFacilityDateOfArrival { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[Validation(ValidationCode.NOT_NULL)]
|
||||
public DateTime? PortFacilityDateOfDeparture { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[Validation(ValidationCode.NOT_NULL)]
|
||||
public byte? PortFacilityShipSecurityLevel { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[MaxLength(255)]
|
||||
public string PortFacilitySecurityMattersToReport { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[Validation(ValidationCode.GISIS)]
|
||||
[MaxLength(4)]
|
||||
public string PortFacilityGISISCode { get; set; }
|
||||
|
||||
public string Identifier { get; set; }
|
||||
|
||||
@ -25,27 +25,41 @@ namespace bsmd.database
|
||||
#region Properties
|
||||
|
||||
public HAZ HAZ { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[Validation(ValidationCode.NOT_NULL)]
|
||||
[MaxLength(255)]
|
||||
public string Name { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[Validation(ValidationCode.NOT_NULL)]
|
||||
public byte? FlashpointInformation { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[MaxLength(10)]
|
||||
public string Flashpoint_CEL { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[Validation(ValidationCode.DOUBLE_GT_ZERO)]
|
||||
public double? Quantity_KGM { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[Validation(ValidationCode.NOT_NULL)]
|
||||
[MaxLength(24)]
|
||||
public string StowagePosition { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[Validation(ValidationCode.LOCODE)]
|
||||
[MaxLength(5)]
|
||||
public string PortOfLoading { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[Validation(ValidationCode.LOCODE)]
|
||||
[MaxLength(5)]
|
||||
public string PortOfDischarge { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[MaxLength(255)]
|
||||
public string Remarks { get; set; }
|
||||
|
||||
public string Identifier { get; set; }
|
||||
|
||||
@ -44,85 +44,113 @@ namespace bsmd.database
|
||||
[Validation1(ValidationCode.NOT_NULL)]
|
||||
[LookupName("MDH.ValidSanitaryControlExemptionOrCertificateOnBoard")]
|
||||
public bool? MDHSimplification { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[Validation1(ValidationCode.LOCODE_GER)]
|
||||
[LookupName("MDH.PlaceOfIssue")]
|
||||
[MaxLength(5)]
|
||||
public string PortOfCallWhereCompleteMDHNotified { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[Validation2(ValidationCode.NOT_NULL)]
|
||||
[LookupName("MDH.DateOfIssue")]
|
||||
public bool? NonAccidentalDeathsDuringVoyage { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[LookupName("MDH.NonAccidentialDeathsDuringVoyageCount")]
|
||||
public int? NonAccidentalDeathsDuringVoyageCount { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[Validation2(ValidationCode.NOT_NULL)]
|
||||
[LookupName("MDH.SuspisionInfectiousNature")]
|
||||
public bool? SuspisionInfectiousNature { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[Validation2(ValidationCode.NOT_NULL)]
|
||||
[LookupName("MDH.NumberOfIllPersonsHigherThanExpected")]
|
||||
public bool? NumberOfIllPersonsHigherThanExpected { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[LookupName("MDH.NumberOfIllPersons")]
|
||||
public int? NumberOfIllPersons { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[Validation2(ValidationCode.NOT_NULL)]
|
||||
[LookupName("MDH.SickPersonsOnBoard")]
|
||||
public bool? SickPersonsOnBoard { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[Validation2(ValidationCode.NOT_NULL)]
|
||||
[LookupName("MDH.MedicalConsulted")]
|
||||
public bool? MedicalConsulted { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[Validation2(ValidationCode.NOT_NULL)]
|
||||
[LookupName("MDH.AwareOfConditionsForFurtherInfections")]
|
||||
public bool? AwareOfFurtherInfections { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[Validation2(ValidationCode.NOT_NULL)]
|
||||
[LookupName("MDH.SanitaryMeasuresApplied")]
|
||||
public bool? SanitaryMeasuresApplied { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[LookupName("MDH.SanitaryMeasuresType_1")] // TODO: NSW 3.0: wird ein Array
|
||||
[MaxLength(100)]
|
||||
public string SanitaryMeasuresType { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[LookupName("MDH.SanitaryMeasuresLocation_1")]
|
||||
[MaxLength(100)]
|
||||
public string SanitaryMeasuresLocation { get; set; }
|
||||
[ShowReport]
|
||||
[LookupName("MDH.SanitaryMeasuresDate_1")]
|
||||
public DateTime? SanitaryMeasuresDate { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[Validation2(ValidationCode.NOT_NULL)]
|
||||
[LookupName("MDH.StowawaysDetected")]
|
||||
public bool? StowawaysDetected { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[LookupName("MDH.StowawaysJoiningLocation_1")] // TODO: NSW 3.0: wird ein Array
|
||||
[MaxLength(100)]
|
||||
public string StowawaysJoiningLocation { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[Validation2(ValidationCode.NOT_NULL)]
|
||||
[LookupName("MDH.SickAnimalOrPetOnBoard")]
|
||||
public bool? SickAnimalOrPetOnBoard { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[Validation2(ValidationCode.NOT_NULL)]
|
||||
[LookupName("MDH.ValidSanitaryControlExemptionOrCertificateOnBoard")]
|
||||
public bool? ValidSanitaryControlExemptionOrCertificateOnBoard { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[LookupName("MDH.PlaceOfIssue")]
|
||||
[MaxLength(100)]
|
||||
public string PlaceOfIssue { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[LookupName("MDH.DateOfIssue")]
|
||||
public DateTime? DateOfIssue { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[Validation2(ValidationCode.NOT_NULL)]
|
||||
[LookupName("SanitaryControlReinspectionRequired")]
|
||||
public bool? SanitaryControlReinspectionRequired { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[Validation2(ValidationCode.NOT_NULL)]
|
||||
[LookupName("MDH.InfectedAreaVisited")]
|
||||
public bool? InfectedAreaVisited { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[LookupName("MDH.InfectedAreaPort_1")] // TODO: NSW 3.0: wird ein Array
|
||||
[MaxLength(100)]
|
||||
public string InfectedAreaPort { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[LookupName("MDH.InfectedAreaDate_1")]
|
||||
public DateTime? InfectedAreaDate { get; set; }
|
||||
|
||||
@ -55,16 +55,22 @@ namespace bsmd.database
|
||||
|
||||
#region Properties
|
||||
|
||||
[MaxLength(25)]
|
||||
public string VisitId { get; set; }
|
||||
|
||||
[MaxLength(25)]
|
||||
public string TransitId { get; set; }
|
||||
|
||||
[MaxLength(7)]
|
||||
public string IMO { get; set; }
|
||||
|
||||
[MaxLength(8)]
|
||||
public string ENI { get; set; }
|
||||
|
||||
[MaxLength(5)]
|
||||
public string PoC { get; set; }
|
||||
|
||||
[MaxLength(50)]
|
||||
public string Portname { get; set; }
|
||||
|
||||
public DateTime? ETA { get; set; }
|
||||
@ -83,10 +89,13 @@ namespace bsmd.database
|
||||
|
||||
public Guid? HerbergFormTemplateGuid { get; set; }
|
||||
|
||||
[MaxLength(50)]
|
||||
public string HerbergReportType { get; set; }
|
||||
|
||||
[MaxLength(255)]
|
||||
public string HerbergEmailContactReportingVessel { get; set; }
|
||||
|
||||
[MaxLength(255)]
|
||||
public string HerbergEmail24HrsContact { get; set; }
|
||||
|
||||
public DateTime? HerbergRevDate { get; set; }
|
||||
@ -97,6 +106,7 @@ namespace bsmd.database
|
||||
|
||||
public ReportStatusEnum ReportStatus { get; set; }
|
||||
|
||||
[MaxLength(50)]
|
||||
public string SietasSheetVersion { get; set; }
|
||||
|
||||
public Guid? DefaultReportingPartyId { get; set; }
|
||||
|
||||
@ -27,6 +27,7 @@ namespace bsmd.database
|
||||
[ShowReport]
|
||||
[Validation(ValidationCode.NOT_NULL)]
|
||||
[LookupName("NAME.NameOfMaster")]
|
||||
[MaxLength(100)]
|
||||
public string NameOfMaster { get; set; }
|
||||
|
||||
#endregion
|
||||
|
||||
@ -29,25 +29,35 @@ namespace bsmd.database
|
||||
[ShowReport]
|
||||
[Validation1(ValidationCode.NOT_NULL)]
|
||||
public DateTime? ETAToPortOfCall { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[Validation1(ValidationCode.NOT_NULL)]
|
||||
public DateTime? ETDFromPortOfCall { get; set; }
|
||||
|
||||
[Validation1(ValidationCode.NOT_NULL)]
|
||||
public List<CallPurpose> CallPurposes { get { return this.callPurposes; } }
|
||||
|
||||
[ShowReport]
|
||||
[Validation2(ValidationCode.NOT_NULL)]
|
||||
public DateTime? ETAToKielCanal { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[Validation2(ValidationCode.NOT_NULL)]
|
||||
public DateTime? ETDFromKielCanal { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[Validation(ValidationCode.NOT_NULL)]
|
||||
[MaxLength(5)]
|
||||
public string LastPort { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
public DateTime? ETDFromLastPort { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[Validation(ValidationCode.NOT_NULL)]
|
||||
[MaxLength(5)]
|
||||
public string NextPort { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
public DateTime? ETAToNextPort { get; set; }
|
||||
|
||||
|
||||
@ -23,19 +23,26 @@ namespace bsmd.database
|
||||
}
|
||||
|
||||
#region Properties
|
||||
|
||||
[ShowReport]
|
||||
[ReportDisplayName("Last name")]
|
||||
[Validation(ValidationCode.NOT_NULL)]
|
||||
[MaxLength(100)]
|
||||
public string PassengerLastName { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[ReportDisplayName("First name")]
|
||||
[Validation(ValidationCode.NOT_NULL)]
|
||||
[MaxLength(100)]
|
||||
public string PassengerFirstName { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[ReportDisplayName("Place of birth")]
|
||||
[Validation(ValidationCode.NOT_NULL)]
|
||||
[MaxLength(100)]
|
||||
public string PassengerPlaceOfBirth { get; set; }
|
||||
|
||||
|
||||
[Validation(ValidationCode.NOT_NULL)]
|
||||
public DateTime? PassengerDateOfBirth { get; set; }
|
||||
|
||||
@ -59,6 +66,7 @@ namespace bsmd.database
|
||||
[ShowReport]
|
||||
[ReportDisplayName("Nationality")]
|
||||
[Validation(ValidationCode.NOT_NULL)]
|
||||
[MaxLength(2)]
|
||||
public string PassengerNationality { get; set; }
|
||||
|
||||
[Validation(ValidationCode.NOT_NULL)]
|
||||
@ -71,18 +79,26 @@ namespace bsmd.database
|
||||
[ShowReport]
|
||||
[ReportDisplayName("Identity document id")]
|
||||
[Validation(ValidationCode.NOT_NULL)]
|
||||
[MaxLength(100)]
|
||||
public string PassengerIdentityDocumentId { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[ReportDisplayName("Visa number")]
|
||||
[MaxLength(100)]
|
||||
public string PassengerVisaNumber { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[ReportDisplayName("Port of embarkation")]
|
||||
[Validation(ValidationCode.NOT_NULL)]
|
||||
[MaxLength(5)]
|
||||
public string PassengerPortOfEmbarkation { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[ReportDisplayName("Port of disembarkation")]
|
||||
[Validation(ValidationCode.NOT_NULL)]
|
||||
[MaxLength(5)]
|
||||
public string PassengerPortOfDisembarkation { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[ReportDisplayName("In transit")]
|
||||
[Validation(ValidationCode.NOT_NULL)]
|
||||
|
||||
@ -28,27 +28,38 @@ namespace bsmd.database
|
||||
[Validation(ValidationCode.NOT_NULL)]
|
||||
[LookupName("PRE72H.Tanker")]
|
||||
public bool? Tanker { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
public byte? TankerHullConfiguration { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
public byte? ConditionCargoBallastTanks { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[LookupName("PRE72H.NaturOfCargo")]
|
||||
[MaxLength(100)]
|
||||
public string NatureOfCargo { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[LookupName("PRE72H.VolumeOfCargo_TNE")]
|
||||
public double? VolumeOfCargo { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[Validation(ValidationCode.NOT_NULL)]
|
||||
[LookupName("PRE72H.PlannedOperations")]
|
||||
[MaxLength(100)]
|
||||
public string PlannedOperations { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[Validation(ValidationCode.NOT_NULL)]
|
||||
[LookupName("PRE72H.PlannedWorks")]
|
||||
[MaxLength(255)]
|
||||
public string PlannedWorks { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[LookupName("PRE72H.DateOfLastExpandedInspection")]
|
||||
public DateTime? DateOfLastExpandedInspection { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[Validation(ValidationCode.DOUBLE_GT_ZERO)]
|
||||
[LookupName("PRE72H.PlannedPeriodOfStay_HUR")]
|
||||
|
||||
@ -14,14 +14,19 @@ namespace bsmd.database
|
||||
|
||||
#region Properties
|
||||
|
||||
[MaxLength(10)]
|
||||
public string Country { get; set; }
|
||||
|
||||
[MaxLength(5)]
|
||||
public string Locode { get; set; }
|
||||
|
||||
[MaxLength(255)]
|
||||
public string Port { get; set; }
|
||||
|
||||
[MaxLength(10)]
|
||||
public string Code { get; set; }
|
||||
|
||||
[MaxLength(255)]
|
||||
public string Name { get; set; }
|
||||
|
||||
#endregion
|
||||
|
||||
@ -30,11 +30,14 @@ namespace bsmd.database
|
||||
|
||||
public List<PortOfCallLast30DaysCrewJoinedShip> CrewJoinedShip { get { return this.poc30Crew; } }
|
||||
[ShowReport]
|
||||
[Validation2(ValidationCode.LOCODE)]
|
||||
[Validation2(ValidationCode.LOCODE)]
|
||||
[MaxLength(5)]
|
||||
public string PortOfCallLast30DaysLocode { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[Validation2(ValidationCode.NOT_NULL)]
|
||||
public DateTime? PortOfCallLast30DaysDateOfDeparture { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[Validation2(ValidationCode.NOT_NULL)]
|
||||
public bool? PortOfCallLast30DaysCrewMembersJoined { get; set; }
|
||||
|
||||
@ -25,8 +25,10 @@ namespace bsmd.database
|
||||
#region Properties
|
||||
|
||||
public PortOfCallLast30Days PortOfCallLast30Days { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[Validation2(ValidationCode.NOT_NULL)]
|
||||
[MaxLength(255)]
|
||||
public string PortOfCallLast30DaysCrewJoinedShipName { get; set; }
|
||||
|
||||
public string Identifier { get; set; }
|
||||
|
||||
@ -25,9 +25,12 @@ namespace bsmd.database
|
||||
#region Properties
|
||||
|
||||
public BPOL BPOL { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[Validation(ValidationCode.NOT_NULL)]
|
||||
[MaxLength(100)]
|
||||
public string PortOfItineraryName { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[Validation(ValidationCode.NOT_NULL)]
|
||||
public DateTime? PortOfItineraryETA { get; set; }
|
||||
|
||||
@ -2,6 +2,6 @@
|
||||
|
||||
[assembly: AssemblyCompany("Informatikbüro Daniel Schick")]
|
||||
[assembly: AssemblyProduct("BSMD NSW interface")]
|
||||
[assembly: AssemblyInformationalVersion("3.1.6")]
|
||||
[assembly: AssemblyInformationalVersion("3.2.0")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2014-2016 Informatikbüro Daniel Schick. All rights reserved.")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
@ -1,4 +1,4 @@
|
||||
using System.Reflection;
|
||||
|
||||
[assembly: AssemblyVersion("3.1.6.*")]
|
||||
[assembly: AssemblyVersion("3.2.0.*")]
|
||||
|
||||
|
||||
@ -20,24 +20,34 @@ namespace bsmd.database
|
||||
|
||||
#region Properties
|
||||
|
||||
[MaxLength(100)]
|
||||
public string Name { get; set; }
|
||||
|
||||
[MaxLength(100)]
|
||||
public string StreetAndNumber { get; set; }
|
||||
|
||||
[MaxLength(25)]
|
||||
public string PostalCode { get; set; }
|
||||
|
||||
[MaxLength(100)]
|
||||
public string City { get; set; }
|
||||
|
||||
[MaxLength(100)]
|
||||
public string Country { get; set; }
|
||||
|
||||
[MaxLength(100)]
|
||||
public string LastName { get; set; }
|
||||
|
||||
[MaxLength(100)]
|
||||
public string FirstName { get; set; }
|
||||
|
||||
[MaxLength(100)]
|
||||
public string Phone { get; set; }
|
||||
|
||||
[MaxLength(100)]
|
||||
public string Fax { get; set; }
|
||||
|
||||
[MaxLength(100)]
|
||||
public string EMail { get; set; }
|
||||
|
||||
public ReportingPartyTypeEnum? ReportingPartyType { get; set; }
|
||||
|
||||
@ -27,44 +27,62 @@ namespace bsmd.database
|
||||
}
|
||||
|
||||
#region Properties
|
||||
|
||||
[ShowReport]
|
||||
[Validation1(ValidationCode.NOT_NULL)]
|
||||
public bool? SECSimplification { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[Validation1(ValidationCode.LOCODE_GER)]
|
||||
[MaxLength(5)]
|
||||
public string PortOfCallWhereCompleteSECNotified { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[Validation2(ValidationCode.NOT_NULL)]
|
||||
[LookupName("SEC.CSOLastName")]
|
||||
[MaxLength(100)]
|
||||
public string CSOLastName { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[MaxLength(100)]
|
||||
public string CSOFirstName { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[Validation2(ValidationCode.NOT_NULL)]
|
||||
[LookupName("SEC.CSOPhone")]
|
||||
[MaxLength(100)]
|
||||
public string CSOPhone { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[MaxLength(100)]
|
||||
public string CSOFax { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[MaxLength(100)]
|
||||
public string CSOEMail { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[Validation2(ValidationCode.NOT_NULL)]
|
||||
[LookupName("SEC.ValidISSCOnBoard")]
|
||||
public bool? ValidISSCOnBoard { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[LookupName("SEC.ReasonsForNoValidISSC")]
|
||||
[MaxLength(255)]
|
||||
public string ReasonsForNoValidISSC { get; set; }
|
||||
|
||||
[Validation2(ValidationCode.NOT_NULL)]
|
||||
[LookupName("SEC.ISSCType")]
|
||||
public byte? ISSCType { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[ReportDisplayName("ISSC type")]
|
||||
public string ISSCTypeDisplay { get { return Util.GetISSCTypeDisplay(this.ISSCType); } }
|
||||
|
||||
[Validation2(ValidationCode.NOT_NULL)]
|
||||
[LookupName("SEC.ISSCIssuerType")]
|
||||
|
||||
public byte? ISSCIssuerType { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[ReportDisplayName("ISSC issuer type")]
|
||||
public string ISSCIssuerTypeDisplay { get { return Util.GetISSCIssuerTypeDisplay(this.ISSCIssuerType); } }
|
||||
@ -72,21 +90,28 @@ namespace bsmd.database
|
||||
[ShowReport]
|
||||
[Validation2(ValidationCode.NOT_NULL)]
|
||||
[LookupName("SEC.ISSCIssuerName")]
|
||||
[MaxLength(100)]
|
||||
public string ISSCIssuerName { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[Validation2(ValidationCode.NOT_NULL)]
|
||||
[LookupName("SEC.ISSCDateOfExpiration")]
|
||||
public DateTime? ISSCDateOfExpiration { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[Validation2(ValidationCode.NOT_NULL)]
|
||||
[LookupName("SEC.ApprovedSecurityPlanOnBoard")]
|
||||
public bool? ApprovedSecurityPlanOnBoard { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[Validation(ValidationCode.NOT_NULL)]
|
||||
[LookupName("SEC.CurrentShipSecurityLevel")]
|
||||
public byte? CurrentShipSecurityLevel { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[MaxLength(100)]
|
||||
public string PortFacilityOfArrival { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[Validation2(ValidationCode.NOT_NULL)]
|
||||
[LookupName("SEC.GeneralDescriptionOfCargo")]
|
||||
|
||||
@ -23,15 +23,21 @@ namespace bsmd.database
|
||||
}
|
||||
|
||||
#region Properties
|
||||
|
||||
[ShowReport]
|
||||
[MaxLength(100)]
|
||||
public string ServiceName { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[Validation1(ValidationCode.NOT_NULL)]
|
||||
[LookupName("SERV.ServiceBeneficiary")]
|
||||
[MaxLength(100)]
|
||||
public string ServiceBeneficiary { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[Validation1(ValidationCode.NOT_NULL)]
|
||||
[LookupName("SERV.ServiceInvoiceRecipient")]
|
||||
[MaxLength(100)]
|
||||
public string ServiceInvoiceRecipient { get; set; }
|
||||
|
||||
public string Identifier { get; set; }
|
||||
|
||||
@ -27,21 +27,25 @@ namespace bsmd.database
|
||||
[ShowReport]
|
||||
[Validation(ValidationCode.NOT_NULL)]
|
||||
[LookupName("STAT.ShipName")]
|
||||
[MaxLength(100)]
|
||||
public string ShipName { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[Validation(ValidationCode.NOT_NULL)]
|
||||
[LookupName("STAT.CallSign")]
|
||||
[MaxLength(50)]
|
||||
public string CallSign { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[Validation(ValidationCode.NOT_NULL)]
|
||||
[LookupName("STAT.MMSINumber")]
|
||||
[MaxLength(50)]
|
||||
public string MMSINumber { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[Validation(ValidationCode.FLAG_CODE)]
|
||||
[LookupName("STAT.Flag")]
|
||||
[MaxLength(2)]
|
||||
public string Flag { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
@ -62,15 +66,18 @@ namespace bsmd.database
|
||||
[ShowReport]
|
||||
[Validation(ValidationCode.LOCODE)]
|
||||
[LookupName("STAT.PortOfRegistry")]
|
||||
[MaxLength(5)]
|
||||
public string PortOfRegistry { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[MaxLength(100)]
|
||||
public string InmarsatCallNumber { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// UNECE Rec.19 Code (http://www.unece.org/fileadmin/DAM/cefact/recommendations/rec19/rec19_ecetrd138.pdf)
|
||||
/// </summary>
|
||||
[Validation(ValidationCode.NOT_NULL)]
|
||||
[MaxLength(1)]
|
||||
public string TransportMode { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
@ -90,27 +97,34 @@ namespace bsmd.database
|
||||
[ShowReport]
|
||||
[Validation(ValidationCode.NOT_NULL)]
|
||||
[LookupName("STAT.ShipType")]
|
||||
[MaxLength(5)]
|
||||
public string ShipType { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[LookupName("STAT.ISMCompanyName")]
|
||||
[MaxLength(100)]
|
||||
public string ISMCompanyName { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[Validation(ValidationCode.STRING_EXACT_LEN, 7)]
|
||||
[LookupName("STAT.ISMCompanyId")]
|
||||
[MaxLength(10)]
|
||||
public string ISMCompanyId { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[MaxLength(100)]
|
||||
public string ISMCompanyStreetAndNumber { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[MaxLength(24)]
|
||||
public string ISMCompanyPostalCode { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[MaxLength(100)]
|
||||
public string ISMCompanyCity { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[MaxLength(100)]
|
||||
public string ISMCompanyCountry { get; set; }
|
||||
|
||||
public override string Subtitle
|
||||
|
||||
@ -28,9 +28,11 @@ namespace bsmd.database
|
||||
public MDH MDH { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[MaxLength(255)]
|
||||
public string SanitaryMeasuresType { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[MaxLength(255)]
|
||||
public string SanitaryMeasuresLocation { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
|
||||
@ -25,24 +25,36 @@ namespace bsmd.database
|
||||
#region Properties
|
||||
|
||||
public SEC SEC { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[MaxLength(255)]
|
||||
public string ShipToShipActivityLocationName { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[MaxLength(5)]
|
||||
public string ShipToShipActivityLocationLoCode { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
public int? ShipToShipActivityLocationCoordinatesLatitude { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
public int? ShipToShipActivityLocationCoordinatesLongitude { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[Validation2(ValidationCode.NOT_NULL)]
|
||||
public DateTime? ShipToShipActivityDateFrom { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[Validation2(ValidationCode.NOT_NULL)]
|
||||
public DateTime? ShipToShipActivityDateTo { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[Validation2(ValidationCode.NOT_NULL)]
|
||||
[MaxLength(255)]
|
||||
public string ShipToShipActivityType { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[MaxLength(255)]
|
||||
public string ShipToShipActivitySecurityMattersToReport { get; set; }
|
||||
|
||||
public string Identifier { get; set; }
|
||||
|
||||
@ -28,6 +28,7 @@ namespace bsmd.database
|
||||
public MDH MDH { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[MaxLength(255)]
|
||||
public string StowawayJoiningLocation { get; set; }
|
||||
|
||||
public string Identifier { get; set; }
|
||||
|
||||
@ -27,6 +27,7 @@ namespace bsmd.database
|
||||
public IMDGPosition IMDGPosition { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[MaxLength(11)]
|
||||
public string SubsidiaryRisk { get; set; }
|
||||
|
||||
public string Identifier { get; set; }
|
||||
|
||||
@ -26,35 +26,45 @@ namespace bsmd.database
|
||||
[ShowReport]
|
||||
[Validation(ValidationCode.NOT_NULL)]
|
||||
[LookupName("TOWA.TowageOnArrivalName")]
|
||||
[MaxLength(100)]
|
||||
public string TowageOnArrivalName { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[Validation(ValidationCode.FLAG_CODE)]
|
||||
[LookupName("TOWA.TowageOnArrivalFlag")]
|
||||
[MaxLength(2)]
|
||||
public string TowageOnArrivalFlag { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[MaxLength(100)]
|
||||
public string TowageOnArrivalOperatorCompanyName { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[MaxLength(100)]
|
||||
public string TowageOnArrivalOperatorStreetNameAndNumber { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[MaxLength(24)]
|
||||
public string TowageOnArrivalOperatorPostalCode { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[MaxLength(100)]
|
||||
public string TowageOnArrivalOperatorCity { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[MaxLength(100)]
|
||||
public string TowageOnArrivalOperatorCountry { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[MaxLength(100)]
|
||||
public string TowageOnArrivalOperatorPhone { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[MaxLength(100)]
|
||||
public string TowageOnArrivalOperatorFax { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[MaxLength(100)]
|
||||
public string TowageOnArrivalOperatorEmail { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
@ -75,6 +85,7 @@ namespace bsmd.database
|
||||
[ShowReport]
|
||||
[Validation(ValidationCode.NOT_NULL)]
|
||||
[LookupName("TOWA.TowageOnArrivalPurposeOfCall")]
|
||||
[MaxLength(100)]
|
||||
public string TowageOnArrivalPurposeOfCall { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
@ -83,6 +94,7 @@ namespace bsmd.database
|
||||
public double? TowageOnArrivalDraught_DMT { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[MaxLength(255)]
|
||||
public string TowageOnArrivalRemarks { get; set; }
|
||||
|
||||
public string Identifier { get; set; }
|
||||
|
||||
@ -27,34 +27,44 @@ namespace bsmd.database
|
||||
[ShowReport]
|
||||
[Validation(ValidationCode.NOT_NULL)]
|
||||
[LookupName("TOWD.TowageOnDepartureName")]
|
||||
[MaxLength(100)]
|
||||
public string TowageOnDepartureName { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[LookupName("TOWD.TowageOnDepartureFlag")]
|
||||
[MaxLength(2)]
|
||||
public string TowageOnDepartureFlag { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[MaxLength(100)]
|
||||
public string TowageOnDepartureOperatorCompanyName { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[MaxLength(100)]
|
||||
public string TowageOnDepartureOperatorStreetNameAndNumber { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[MaxLength(24)]
|
||||
public string TowageOnDepartureOperatorPostalCode { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[MaxLength(100)]
|
||||
public string TowageOnDepartureOperatorCity { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[MaxLength(100)]
|
||||
public string TowageOnDepartureOperatorCountry { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[MaxLength(100)]
|
||||
public string TowageOnDepartureOperatorPhone { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[MaxLength(100)]
|
||||
public string TowageOnDepartureOperatorFax { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[MaxLength(100)]
|
||||
public string TowageOnDepartureOperatorEmail { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
@ -71,6 +81,7 @@ namespace bsmd.database
|
||||
public double? TowageOnDepartureDraught_DMT { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[MaxLength(255)]
|
||||
public string TowageOnDepartureRemarks { get; set; }
|
||||
|
||||
public string Identifier { get; set; }
|
||||
|
||||
@ -110,7 +110,7 @@ namespace bsmd.database
|
||||
{
|
||||
private ValidationCode validationCode;
|
||||
|
||||
|
||||
|
||||
|
||||
public Validation1Attribute(ValidationCode code)
|
||||
{
|
||||
@ -131,7 +131,7 @@ namespace bsmd.database
|
||||
[AttributeUsage(AttributeTargets.Property)]
|
||||
public class Validation2Attribute : Attribute
|
||||
{
|
||||
private ValidationCode validationCode;
|
||||
private ValidationCode validationCode;
|
||||
|
||||
public Validation2Attribute(ValidationCode code)
|
||||
{
|
||||
@ -147,4 +147,25 @@ namespace bsmd.database
|
||||
|
||||
#endregion
|
||||
|
||||
#region Überprüfung der maximalen String-Länge
|
||||
|
||||
[AttributeUsage(AttributeTargets.Property)]
|
||||
public class MaxLengthAttribute : Attribute
|
||||
{
|
||||
private int maxLength;
|
||||
|
||||
public MaxLengthAttribute(int length)
|
||||
{
|
||||
this.maxLength = length;
|
||||
}
|
||||
|
||||
public int MaxLength
|
||||
{
|
||||
get { return this.maxLength; }
|
||||
set { this.maxLength = value; }
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
|
||||
@ -27,19 +27,25 @@ namespace bsmd.database
|
||||
}
|
||||
|
||||
#region Properties
|
||||
|
||||
[ShowReport]
|
||||
public bool? WasteDisposalValidExemption { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[Validation2(ValidationCode.NOT_NULL)]
|
||||
[Validation2(ValidationCode.NOT_NULL)]
|
||||
[MaxLength(5)]
|
||||
public string LastWasteDisposalPort { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[Validation2(ValidationCode.NOT_NULL)]
|
||||
[LookupName("WAS.ConfirmationOfCorrectness")]
|
||||
public bool? ConfirmationOfCorrectness { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[Validation2(ValidationCode.NOT_NULL)]
|
||||
[LookupName("WAS.LastWasteDisposalDate")]
|
||||
public DateTime? LastWasteDisposalDate { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[Validation2(ValidationCode.NOT_NULL)]
|
||||
public byte? WasteDisposalDelivery { get; set; }
|
||||
|
||||
@ -50,22 +50,29 @@ namespace bsmd.database
|
||||
|
||||
[Validation(ValidationCode.NOT_NULL)]
|
||||
public byte? WasteType { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[Validation(ValidationCode.NOT_NULL)]
|
||||
[MaxLength(100)]
|
||||
public string WasteDescription { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[Validation(ValidationCode.NOT_NULL)]
|
||||
public double? WasteDisposalAmount_MTQ { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
public double? WasteCapacity_MTQ { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
public double? WasteAmountRetained_MTQ { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[MaxLength(5)]
|
||||
public string WasteDisposalPort { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
public double? WasteAmountGeneratedTillNextPort_MTQ { get; set; }
|
||||
|
||||
|
||||
public string Identifier { get; set; }
|
||||
|
||||
#endregion
|
||||
|
||||
@ -25,8 +25,11 @@ namespace bsmd.database
|
||||
#region Properties
|
||||
|
||||
public WAS WAS { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[MaxLength(100)]
|
||||
public string WasteDisposalServiceProviderName { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
public byte? WasteDisposalDelivery { get; set; }
|
||||
|
||||
|
||||
@ -90,8 +90,7 @@ namespace bsmd.email.Properties {
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("<?xml version=\"1.0\" encoding=\"utf-16\"?>\r\n<ArrayOfString xmlns:xsi=\"http://www.w3." +
|
||||
"org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\">\r\n <s" +
|
||||
"tring>nsw@textbausteine.net</string>\r\n <string>hollmann@bsmd.de</string>\r\n</Arr" +
|
||||
"ayOfString>")]
|
||||
"tring>nsw@textbausteine.net</string>\r\n</ArrayOfString>")]
|
||||
public global::System.Collections.Specialized.StringCollection Recipient {
|
||||
get {
|
||||
return ((global::System.Collections.Specialized.StringCollection)(this["Recipient"]));
|
||||
|
||||
@ -27,7 +27,6 @@
|
||||
<Value Profile="(Default)"><?xml version="1.0" encoding="utf-16"?>
|
||||
<ArrayOfString xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
|
||||
<string>nsw@textbausteine.net</string>
|
||||
<string>hollmann@bsmd.de</string>
|
||||
</ArrayOfString></Value>
|
||||
</Setting>
|
||||
<Setting Name="Sender" Type="System.String" Scope="Application">
|
||||
|
||||
@ -33,7 +33,6 @@
|
||||
<ArrayOfString xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
|
||||
<string>nsw@textbausteine.net</string>
|
||||
<string>hollmann@bsmd.de</string>
|
||||
</ArrayOfString>
|
||||
</value>
|
||||
</setting>
|
||||
|
||||
Binary file not shown.
Loading…
Reference in New Issue
Block a user