Korrekturen lt Rückmeldung
This commit is contained in:
parent
a0bcbe4ccf
commit
5118ed8aaf
@ -119,7 +119,7 @@ namespace ENI2.Controls
|
|||||||
{
|
{
|
||||||
var grid = sender as ENIDataGrid;
|
var grid = sender as ENIDataGrid;
|
||||||
if (Key.Delete == e.Key)
|
if (Key.Delete == e.Key)
|
||||||
this.deleteItem(null, null);
|
this.deleteItem(null, null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -104,7 +104,7 @@ namespace ENI2.Controls
|
|||||||
{
|
{
|
||||||
DBManager.Instance.GetReportingPartyDict().Add(Guid.NewGuid(), rp);
|
DBManager.Instance.GetReportingPartyDict().Add(Guid.NewGuid(), rp);
|
||||||
this.ReportingParties.Add(rp);
|
this.ReportingParties.Add(rp);
|
||||||
this.dataGridReportingParties.Items.Refresh();
|
this.dataGridReportingParties.Items.Refresh();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -7,27 +7,25 @@
|
|||||||
//
|
//
|
||||||
// Copyright (c) 2015 Informatikbüro Daniel Schick. All rights reserved.
|
// Copyright (c) 2015 Informatikbüro Daniel Schick. All rights reserved.
|
||||||
|
|
||||||
using log4net;
|
using bsmd.database;
|
||||||
|
using ENI2.Locode;
|
||||||
using Microsoft.Office.Interop.Excel;
|
using Microsoft.Office.Interop.Excel;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Data;
|
using System.Data;
|
||||||
|
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
using ENI2.Locode;
|
|
||||||
using bsmd.database;
|
|
||||||
using System.Text.RegularExpressions;
|
|
||||||
|
|
||||||
namespace ENI2.Excel
|
namespace ENI2.Excel
|
||||||
{
|
{
|
||||||
internal class ExcelReader : ExcelBase
|
internal class ExcelReader : ExcelBase
|
||||||
{
|
{
|
||||||
|
internal enum ReadState
|
||||||
|
{ NONE, OK, WARN, FAIL };
|
||||||
|
|
||||||
internal enum ReadState { NONE, OK, WARN, FAIL };
|
internal enum SheetTypeEnum
|
||||||
|
{ BSMD, DAKOSY };
|
||||||
internal enum SheetTypeEnum { BSMD, DAKOSY };
|
|
||||||
|
|
||||||
private readonly SheetTypeEnum _sheetType = SheetTypeEnum.BSMD;
|
private readonly SheetTypeEnum _sheetType = SheetTypeEnum.BSMD;
|
||||||
|
|
||||||
@ -36,15 +34,16 @@ namespace ENI2.Excel
|
|||||||
public ExcelReader(string filePath, bool openReadonly = true, bool createNameFields = true)
|
public ExcelReader(string filePath, bool openReadonly = true, bool createNameFields = true)
|
||||||
{
|
{
|
||||||
this._workBook = _excelWorkbooks.Open(filePath, 0, openReadonly, 5, "", "", false, XlPlatform.xlWindows, "", false, false, 0, false, false, false);
|
this._workBook = _excelWorkbooks.Open(filePath, 0, openReadonly, 5, "", "", false, XlPlatform.xlWindows, "", false, false, 0, false, false, false);
|
||||||
if(createNameFields)
|
if (createNameFields)
|
||||||
this.InitNameFields();
|
this.InitNameFields();
|
||||||
|
|
||||||
// Determine if this is a Dakosy or BSMD Sheet
|
// Determine if this is a Dakosy or BSMD Sheet
|
||||||
if(createNameFields)
|
if (createNameFields)
|
||||||
_sheetType = (_nameDict.Count > 10) ? SheetTypeEnum.BSMD : SheetTypeEnum.DAKOSY;
|
_sheetType = (_nameDict.Count > 10) ? SheetTypeEnum.BSMD : SheetTypeEnum.DAKOSY;
|
||||||
}
|
}
|
||||||
|
|
||||||
public SheetTypeEnum SheetType { get { return _sheetType; } }
|
public SheetTypeEnum SheetType
|
||||||
|
{ get { return _sheetType; } }
|
||||||
|
|
||||||
internal static void SaveMessage(Message message)
|
internal static void SaveMessage(Message message)
|
||||||
{
|
{
|
||||||
@ -80,7 +79,7 @@ namespace ENI2.Excel
|
|||||||
if (result != null)
|
if (result != null)
|
||||||
{
|
{
|
||||||
result = result.Trim();
|
result = result.Trim();
|
||||||
if(result.Length > 0)
|
if (result.Length > 0)
|
||||||
{
|
{
|
||||||
result = result.Clean();
|
result = result.Clean();
|
||||||
}
|
}
|
||||||
@ -120,7 +119,7 @@ namespace ENI2.Excel
|
|||||||
if (!val.IsNullOrEmpty())
|
if (!val.IsNullOrEmpty())
|
||||||
{
|
{
|
||||||
val = val.ToUpper();
|
val = val.ToUpper();
|
||||||
string portName = LocodeDB.SSNPortNameFromLocode(val);
|
string portName = LocodeDB.SSNPortNameFromLocode(val);
|
||||||
if (portName.IsNullOrEmpty())
|
if (portName.IsNullOrEmpty())
|
||||||
{
|
{
|
||||||
_log.WarnFormat("unknown Locode {0}", val);
|
_log.WarnFormat("unknown Locode {0}", val);
|
||||||
@ -135,7 +134,7 @@ namespace ENI2.Excel
|
|||||||
string val = ReadText(lookup);
|
string val = ReadText(lookup);
|
||||||
if (val.IsNullOrEmpty()) return null;
|
if (val.IsNullOrEmpty()) return null;
|
||||||
|
|
||||||
if(int.TryParse(val, out int result))
|
if (int.TryParse(val, out int result))
|
||||||
{
|
{
|
||||||
if ((result < 10) || (result > 99))
|
if ((result < 10) || (result > 99))
|
||||||
_log.WarnFormat("invalid cargo LA code {0}", result);
|
_log.WarnFormat("invalid cargo LA code {0}", result);
|
||||||
@ -154,16 +153,17 @@ namespace ENI2.Excel
|
|||||||
string val = this.ReadText(lookup);
|
string val = this.ReadText(lookup);
|
||||||
if (val != null)
|
if (val != null)
|
||||||
{
|
{
|
||||||
if (val.Equals("m", StringComparison.CurrentCultureIgnoreCase) || val.Equals("male", StringComparison.CurrentCultureIgnoreCase)) {
|
if (val.Equals("m", StringComparison.CurrentCultureIgnoreCase) || val.Equals("male", StringComparison.CurrentCultureIgnoreCase))
|
||||||
|
{
|
||||||
result = 1;
|
result = 1;
|
||||||
}
|
}
|
||||||
else if (val.Equals("f", StringComparison.CurrentCultureIgnoreCase) || val.Equals("female", StringComparison.CurrentCultureIgnoreCase))
|
else if (val.Equals("f", StringComparison.CurrentCultureIgnoreCase) || val.Equals("female", StringComparison.CurrentCultureIgnoreCase))
|
||||||
{
|
{
|
||||||
result = 2;
|
result = 2;
|
||||||
}
|
}
|
||||||
else if (val.Equals("n", StringComparison.CurrentCultureIgnoreCase) ||
|
else if (val.Equals("n", StringComparison.CurrentCultureIgnoreCase) ||
|
||||||
val.Equals("not applicable", StringComparison.CurrentCultureIgnoreCase) ||
|
val.Equals("not applicable", StringComparison.CurrentCultureIgnoreCase) ||
|
||||||
val.Equals("d", StringComparison.CurrentCultureIgnoreCase) ||
|
val.Equals("d", StringComparison.CurrentCultureIgnoreCase) ||
|
||||||
val.Equals("diverse", StringComparison.CurrentCultureIgnoreCase))
|
val.Equals("diverse", StringComparison.CurrentCultureIgnoreCase))
|
||||||
{
|
{
|
||||||
result = 9;
|
result = 9;
|
||||||
@ -173,7 +173,7 @@ namespace ENI2.Excel
|
|||||||
result = 0;
|
result = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(result == null)
|
if (result == null)
|
||||||
{
|
{
|
||||||
_log.ErrorFormat("error reading gender on {0}", lookup);
|
_log.ErrorFormat("error reading gender on {0}", lookup);
|
||||||
}
|
}
|
||||||
@ -192,7 +192,7 @@ namespace ENI2.Excel
|
|||||||
if (val.Equals("picture_id", StringComparison.CurrentCultureIgnoreCase) || val.Equals("picture id", StringComparison.CurrentCultureIgnoreCase) || val.Equals("4")) result = 3;
|
if (val.Equals("picture_id", StringComparison.CurrentCultureIgnoreCase) || val.Equals("picture id", StringComparison.CurrentCultureIgnoreCase) || val.Equals("4")) result = 3;
|
||||||
if (val.Equals("residental_permit", StringComparison.CurrentCultureIgnoreCase) || val.Equals("residental permit", StringComparison.CurrentCultureIgnoreCase) || val.Equals("5")) result = 4;
|
if (val.Equals("residental_permit", StringComparison.CurrentCultureIgnoreCase) || val.Equals("residental permit", StringComparison.CurrentCultureIgnoreCase) || val.Equals("5")) result = 4;
|
||||||
if (val.Equals("other_legal_identity_document", StringComparison.CurrentCultureIgnoreCase) || val.Equals("other legal identity document", StringComparison.CurrentCultureIgnoreCase) || val.Equals("6")) result = 5;
|
if (val.Equals("other_legal_identity_document", StringComparison.CurrentCultureIgnoreCase) || val.Equals("other legal identity document", StringComparison.CurrentCultureIgnoreCase) || val.Equals("6")) result = 5;
|
||||||
if (val.Equals("ic", StringComparison.CurrentCultureIgnoreCase)) result = 0;
|
if (val.Equals("ic", StringComparison.CurrentCultureIgnoreCase)) result = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!result.HasValue)
|
if (!result.HasValue)
|
||||||
@ -243,11 +243,11 @@ namespace ENI2.Excel
|
|||||||
string val = this.ReadText(lookup);
|
string val = this.ReadText(lookup);
|
||||||
byte? result = null;
|
byte? result = null;
|
||||||
|
|
||||||
if(val != null)
|
if (val != null)
|
||||||
{
|
{
|
||||||
if ((val.IndexOf("load", StringComparison.OrdinalIgnoreCase) >= 0) || val.Equals("1")) result = 0;
|
if ((val.IndexOf("load", StringComparison.OrdinalIgnoreCase) >= 0) || val.Equals("1")) result = 0;
|
||||||
if ((val.IndexOf("discharge", StringComparison.OrdinalIgnoreCase) >= 0) || val.Equals("2")) result = 1;
|
if ((val.IndexOf("discharge", StringComparison.OrdinalIgnoreCase) >= 0) || val.Equals("2")) result = 1;
|
||||||
if ((val.IndexOf("transit", StringComparison.OrdinalIgnoreCase) >= 0) || val.Equals("3")) result = 2;
|
if ((val.IndexOf("transit", StringComparison.OrdinalIgnoreCase) >= 0) || val.Equals("3")) result = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!result.HasValue)
|
if (!result.HasValue)
|
||||||
@ -275,7 +275,7 @@ namespace ENI2.Excel
|
|||||||
_log.ErrorFormat("Wrong ISO code {0}", val);
|
_log.ErrorFormat("Wrong ISO code {0}", val);
|
||||||
val = "";
|
val = "";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
@ -302,7 +302,7 @@ namespace ENI2.Excel
|
|||||||
string val = this.ReadText(lookup);
|
string val = this.ReadText(lookup);
|
||||||
byte? result = null;
|
byte? result = null;
|
||||||
|
|
||||||
if(val!= null)
|
if (val != null)
|
||||||
{
|
{
|
||||||
if (val == "I") result = 0;
|
if (val == "I") result = 0;
|
||||||
if (val == "1") result = 0;
|
if (val == "1") result = 0;
|
||||||
@ -310,7 +310,7 @@ namespace ENI2.Excel
|
|||||||
if (val == "2") result = 1;
|
if (val == "2") result = 1;
|
||||||
if (val == "III") result = 2;
|
if (val == "III") result = 2;
|
||||||
if (val == "3") result = 2;
|
if (val == "3") result = 2;
|
||||||
if (val.Equals("NONE", StringComparison.OrdinalIgnoreCase)) result = 0;
|
if (val.Equals("NONE", StringComparison.OrdinalIgnoreCase)) result = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!result.HasValue)
|
if (!result.HasValue)
|
||||||
@ -323,7 +323,7 @@ namespace ENI2.Excel
|
|||||||
{
|
{
|
||||||
string val = this.ReadText(lookup);
|
string val = this.ReadText(lookup);
|
||||||
bool isValid = false;
|
bool isValid = false;
|
||||||
if(!val.IsNullOrEmpty())
|
if (!val.IsNullOrEmpty())
|
||||||
{
|
{
|
||||||
if (int.TryParse(val, out int typeVal))
|
if (int.TryParse(val, out int typeVal))
|
||||||
{
|
{
|
||||||
@ -371,13 +371,13 @@ namespace ENI2.Excel
|
|||||||
_log.ErrorFormat("cannot read delivery {0}", lookup);
|
_log.ErrorFormat("cannot read delivery {0}", lookup);
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
internal byte? ReadHazards(string lookup)
|
internal byte? ReadHazards(string lookup)
|
||||||
{
|
{
|
||||||
string val = this.ReadText(lookup);
|
string val = this.ReadText(lookup);
|
||||||
byte? result = null;
|
byte? result = null;
|
||||||
if(val != null)
|
if (val != null)
|
||||||
{
|
{
|
||||||
if (val.Equals("p", StringComparison.OrdinalIgnoreCase)) return 0;
|
if (val.Equals("p", StringComparison.OrdinalIgnoreCase)) return 0;
|
||||||
if (val.Equals("s", StringComparison.OrdinalIgnoreCase)) return 1;
|
if (val.Equals("s", StringComparison.OrdinalIgnoreCase)) return 1;
|
||||||
@ -390,7 +390,7 @@ namespace ENI2.Excel
|
|||||||
{
|
{
|
||||||
string val = this.ReadText(lookup);
|
string val = this.ReadText(lookup);
|
||||||
byte? result = null;
|
byte? result = null;
|
||||||
if(val != null)
|
if (val != null)
|
||||||
{
|
{
|
||||||
if (val.Equals("a", StringComparison.OrdinalIgnoreCase)) return 0;
|
if (val.Equals("a", StringComparison.OrdinalIgnoreCase)) return 0;
|
||||||
if (val.Equals("b", StringComparison.OrdinalIgnoreCase)) return 1;
|
if (val.Equals("b", StringComparison.OrdinalIgnoreCase)) return 1;
|
||||||
@ -401,8 +401,8 @@ namespace ENI2.Excel
|
|||||||
|
|
||||||
internal DateTime? ReadBirthDate(string lookup)
|
internal DateTime? ReadBirthDate(string lookup)
|
||||||
{
|
{
|
||||||
DateTime? result = this.ReadDate(lookup);
|
DateTime? result = this.ReadDate(lookup);
|
||||||
if(result.HasValue)
|
if (result.HasValue)
|
||||||
{
|
{
|
||||||
if (result.Value > DateTime.Now)
|
if (result.Value > DateTime.Now)
|
||||||
_log.WarnFormat("Birth date implausible for {0} : {1}", lookup, result);
|
_log.WarnFormat("Birth date implausible for {0} : {1}", lookup, result);
|
||||||
@ -430,7 +430,7 @@ namespace ENI2.Excel
|
|||||||
date = DateTime.FromOADate(val);
|
date = DateTime.FromOADate(val);
|
||||||
}
|
}
|
||||||
catch (ArgumentException) { /* .. */ }
|
catch (ArgumentException) { /* .. */ }
|
||||||
if(date == null)
|
if (date == null)
|
||||||
{
|
{
|
||||||
CultureInfo provider = CultureInfo.InvariantCulture;
|
CultureInfo provider = CultureInfo.InvariantCulture;
|
||||||
string dateString = val.ToString();
|
string dateString = val.ToString();
|
||||||
@ -465,7 +465,7 @@ namespace ENI2.Excel
|
|||||||
{
|
{
|
||||||
if ((date.Value < new DateTime(1899, 1, 1)) || (date.Value > new DateTime(2130, 1, 1)))
|
if ((date.Value < new DateTime(1899, 1, 1)) || (date.Value > new DateTime(2130, 1, 1)))
|
||||||
{
|
{
|
||||||
date = null; // this can't be right
|
date = null; // this can't be right
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -485,26 +485,26 @@ namespace ENI2.Excel
|
|||||||
DateTime? etaDate = this.ReadDate(dateField);
|
DateTime? etaDate = this.ReadDate(dateField);
|
||||||
DateTime? etaTime = this.ReadTime(timeField);
|
DateTime? etaTime = this.ReadTime(timeField);
|
||||||
if (etaDate != null)
|
if (etaDate != null)
|
||||||
{
|
{
|
||||||
if (etaTime != null)
|
if (etaTime != null)
|
||||||
{
|
{
|
||||||
result = new DateTime(etaDate.Value.Year, etaDate.Value.Month, etaDate.Value.Day, etaTime.Value.Hour, etaTime.Value.Minute, etaTime.Value.Second, DateTimeKind.Local);
|
result = new DateTime(etaDate.Value.Year, etaDate.Value.Month, etaDate.Value.Day, etaTime.Value.Hour, etaTime.Value.Minute, etaTime.Value.Second, DateTimeKind.Local);
|
||||||
result = result.Value.ToUniversalTime();
|
result = result.Value.ToUniversalTime();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
result = new DateTime(etaDate.Value.Year, etaDate.Value.Month, etaDate.Value.Day, 0, 0, 0, DateTimeKind.Local);
|
result = new DateTime(etaDate.Value.Year, etaDate.Value.Month, etaDate.Value.Day, 0, 0, 0, DateTimeKind.Local);
|
||||||
result = result.Value.ToUniversalTime();
|
result = result.Value.ToUniversalTime();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
internal DateTime? ReadTime(string lookup)
|
internal DateTime? ReadTime(string lookup)
|
||||||
{
|
{
|
||||||
DateTime? result = null;
|
DateTime? result = null;
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
if (_nameDict.ContainsKey(lookup))
|
if (_nameDict.ContainsKey(lookup))
|
||||||
@ -520,7 +520,7 @@ namespace ENI2.Excel
|
|||||||
{
|
{
|
||||||
result = DateTime.FromOADate(val);
|
result = DateTime.FromOADate(val);
|
||||||
}
|
}
|
||||||
catch(ArgumentException) { }
|
catch (ArgumentException) { }
|
||||||
|
|
||||||
if (result == null)
|
if (result == null)
|
||||||
{
|
{
|
||||||
@ -535,7 +535,8 @@ namespace ENI2.Excel
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (val is string) {
|
if (val is string)
|
||||||
|
{
|
||||||
if (((string)val).EndsWith("lt", StringComparison.OrdinalIgnoreCase))
|
if (((string)val).EndsWith("lt", StringComparison.OrdinalIgnoreCase))
|
||||||
val = ((string)val).Substring(0, ((string)val).Length - 2).Trim();
|
val = ((string)val).Substring(0, ((string)val).Length - 2).Trim();
|
||||||
else
|
else
|
||||||
@ -564,21 +565,21 @@ namespace ENI2.Excel
|
|||||||
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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception)
|
catch (Exception)
|
||||||
{
|
{
|
||||||
_log.WarnFormat("error reading time for lookup {0}", lookup);
|
_log.WarnFormat("error reading time for lookup {0}", lookup);
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
internal double ReadNumberDefaultZero(string lookup)
|
internal double ReadNumberDefaultZero(string lookup)
|
||||||
{
|
{
|
||||||
double? result = this.ReadNumber(lookup);
|
double? result = this.ReadNumber(lookup);
|
||||||
if(!result.HasValue)
|
if (!result.HasValue)
|
||||||
{
|
{
|
||||||
result = 0;
|
result = 0;
|
||||||
}
|
}
|
||||||
@ -588,9 +589,9 @@ namespace ENI2.Excel
|
|||||||
internal bool? ReadBoolean(string lookup)
|
internal bool? ReadBoolean(string lookup)
|
||||||
{
|
{
|
||||||
string val = this.ReadText(lookup);
|
string val = this.ReadText(lookup);
|
||||||
if (val == null)
|
if (val == null)
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
if ((val == "y") || (val == "Y") || val.Equals("yes", StringComparison.OrdinalIgnoreCase) || (val == "1") || (val == "x") || (val == "X"))
|
if ((val == "y") || (val == "Y") || val.Equals("yes", StringComparison.OrdinalIgnoreCase) || (val == "1") || (val == "x") || (val == "X"))
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
@ -599,17 +600,30 @@ namespace ENI2.Excel
|
|||||||
|
|
||||||
#region Dakosy-specific functions
|
#region Dakosy-specific functions
|
||||||
|
|
||||||
|
internal bool HasWorksheetNamed(string sheetName)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
Worksheet theWorkSheet = _workBook.Worksheets[sheetName];
|
||||||
|
return theWorkSheet != null;
|
||||||
|
}
|
||||||
|
catch (Exception)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
internal string ReadCellAsText(string sheetName, string range)
|
internal string ReadCellAsText(string sheetName, string range)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
Worksheet workSheet = (Worksheet) _workBook.Worksheets[sheetName];
|
Worksheet workSheet = (Worksheet)_workBook.Worksheets[sheetName];
|
||||||
string result = workSheet.Range[range].Text.ToString();
|
string result = workSheet.Range[range].Text.ToString();
|
||||||
if (!result.IsNullOrEmpty())
|
if (!result.IsNullOrEmpty())
|
||||||
result = result.Trim().Clean();
|
result = result.Trim().Clean();
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
catch(Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
_log.Warn(e.Message);
|
_log.Warn(e.Message);
|
||||||
}
|
}
|
||||||
@ -642,7 +656,6 @@ namespace ENI2.Excel
|
|||||||
Range aRange = workSheet.Range[range];
|
Range aRange = workSheet.Range[range];
|
||||||
if (aRange != null)
|
if (aRange != null)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
@ -713,12 +726,11 @@ namespace ENI2.Excel
|
|||||||
return tmpDate2;
|
return tmpDate2;
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#endregion
|
#endregion Dakosy-specific functions
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
@ -212,6 +212,7 @@ namespace ENI2
|
|||||||
{
|
{
|
||||||
if(drc.HasCriticalInfoMissing(out string missingClass))
|
if(drc.HasCriticalInfoMissing(out string missingClass))
|
||||||
{
|
{
|
||||||
|
_log.WarnFormat("set close warning because at least {0} is missing from BRE/BRV arrival", missingClass);
|
||||||
if (MessageBox.Show(string.Format(Properties.Resources.textSpecialCaseBREBRV, missingClass), Properties.Resources.textConfirmation, MessageBoxButton.YesNo,
|
if (MessageBox.Show(string.Format(Properties.Resources.textSpecialCaseBREBRV, missingClass), Properties.Resources.textConfirmation, MessageBoxButton.YesNo,
|
||||||
MessageBoxImage.Question, MessageBoxResult.No) == MessageBoxResult.No)
|
MessageBoxImage.Question, MessageBoxResult.No) == MessageBoxResult.No)
|
||||||
e.Cancel = true;
|
e.Cancel = true;
|
||||||
|
|||||||
2
ENI2/Properties/Resources.Designer.cs
generated
2
ENI2/Properties/Resources.Designer.cs
generated
@ -4552,7 +4552,7 @@ namespace ENI2.Properties {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to One or more important classes haven't been sent for DEBRE/DEBRV: {0} Close anyway?.
|
/// Looks up a localized string similar to At least one of NOA_NOD, AGNT, INFO, SEC, TIEFA hasn't been sent for DEBRE/DEBRV: ({0}) Close anyway?.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static string textSpecialCaseBREBRV {
|
public static string textSpecialCaseBREBRV {
|
||||||
get {
|
get {
|
||||||
|
|||||||
@ -1859,6 +1859,6 @@
|
|||||||
<value>Search NST2007 list</value>
|
<value>Search NST2007 list</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="textSpecialCaseBREBRV" xml:space="preserve">
|
<data name="textSpecialCaseBREBRV" xml:space="preserve">
|
||||||
<value>One or more important classes haven't been sent for DEBRE/DEBRV: {0} Close anyway?</value>
|
<value>At least one of NOA_NOD, AGNT, INFO, SEC, TIEFA hasn't been sent for DEBRE/DEBRV: ({0}) Close anyway?</value>
|
||||||
</data>
|
</data>
|
||||||
</root>
|
</root>
|
||||||
Loading…
Reference in New Issue
Block a user