NSW Version 6.0.7

Patches für PO Number und Reporterzeugung
This commit is contained in:
Daniel Schick 2020-05-13 15:23:15 +00:00
parent a7ff03722d
commit af8bdfede5
7 changed files with 38 additions and 8 deletions

View File

@ -79,6 +79,8 @@ namespace ENI2.Controls
{
workSheet.Cells[rowIndex, 7].Value = core.Shipname;
workSheet.Cells[rowIndex, 10].Value = core.PoC.Substring(2);
if(core.ATA.HasValue)
workSheet.Cells[rowIndex, 11].Value = core.ATA.Value;
workSheet.Cells[rowIndex, 13].Value = core.PONumber;
rowIndex++;
}
@ -191,8 +193,9 @@ namespace ENI2.Controls
DateTime start = bsmd.database.Util.FirstDateOfWeekISO8601(DateTime.Now.Year, (int)this.doubleUpDownCalendarWeek.Value);
DateTime end = start.Add(new TimeSpan(6, 23, 59, 59));
uint from = start.ToUniversalTime().ToUnixTimeStamp();
uint to = end.ToUniversalTime().ToUnixTimeStamp();
// Die Suche findet in einem erweiterten Intervall statt, da später wenn möglich nach ATA gefiltert wird
uint from = start.Subtract(new TimeSpan(10, 0, 0, 0)).ToUniversalTime().ToUnixTimeStamp();
uint to = end.Add(new TimeSpan(5, 0, 0, 0)).ToUniversalTime().ToUnixTimeStamp();
filterDict.Add(MessageCore.SearchFilterType.FILTER_ETA, string.Format("{0}:{1}", from.ToString() ?? "", to.ToString() ?? ""));
Util.UIHelper.SetBusyState();
@ -201,6 +204,23 @@ namespace ENI2.Controls
this.searchResult = DBManager.GetSingleCon(Properties.Settings.Default.ConnectionString).GetMessageCoresWithFilters(filterDict);
// alle anderen Häfen weg
this.searchResult.RemoveAll(item => (!item.PoC.Equals("DEBRV") && !item.PoC.Equals("DEWHV")));
// rückwärts iterieren um nach ETA und ATA zu filtern
if (this.searchResult.Count > 0)
{
for (int i = this.searchResult.Count - 1; i >= 0; i--)
{
MessageCore messageCore = this.searchResult[i];
if (messageCore.ATA.HasValue)
{
if ((messageCore.ATA.Value < start) || (messageCore.ATA.Value > end)) this.searchResult.RemoveAt(i);
}
else
{
if ((messageCore.ETA.Value < start) || (messageCore.ETA.Value > end)) this.searchResult.RemoveAt(i);
}
}
}
this.dataGridPOCores.SelectedItem = null;
this.filteredResult.AddRange(searchResult);

View File

@ -70,8 +70,8 @@ namespace ENI2
foreach (Message aMessage in _messages)
{
if (((aMessage.InternalStatus == Message.BSMDStatus.UPDATED) ||
(aMessage.InternalStatus == Message.BSMDStatus.SAVED) ||
(aMessage.InternalStatus == Message.BSMDStatus.EXCEL)) &&
(aMessage.InternalStatus == Message.BSMDStatus.SAVED)) && // ||
// (aMessage.InternalStatus == Message.BSMDStatus.EXCEL)) &&
!aMessage.UnsentMessageWarningShown)
{
aMessage.UnsentMessageWarningShown = true;

View File

@ -35,7 +35,7 @@
<CreateWebPageOnPublish>true</CreateWebPageOnPublish>
<WebPage>publish.html</WebPage>
<ApplicationRevision>1</ApplicationRevision>
<ApplicationVersion>6.0.5.%2a</ApplicationVersion>
<ApplicationVersion>6.0.7.%2a</ApplicationVersion>
<UseApplicationTrust>false</UseApplicationTrust>
<CreateDesktopShortcut>true</CreateDesktopShortcut>
<PublishWizardCompleted>true</PublishWizardCompleted>

Binary file not shown.

View File

@ -1106,7 +1106,7 @@ namespace bsmd.ReportGenerator
}
}
break;
case "Ship Type":
case "Ship Type":
if (LocalizedLookup.getVesselTypes().ContainsKey(value))
result = string.Format("{0} - {1}", value, LocalizedLookup.getVesselTypes()[value]);
break;
@ -1135,6 +1135,16 @@ namespace bsmd.ReportGenerator
}
}
break;
case "IMOHazardClass":
{
switch(value)
{
case "0": result = "A"; break;
case "1": result = "B"; break;
case "2": result = "A and B"; break;
}
}
break;
default:
break;
}

View File

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

View File

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