POATA als separates Feld in MessageCore (für die Maersk-Abrechnung)
This commit is contained in:
parent
a8652a3d59
commit
ca32b40662
@ -45,7 +45,7 @@
|
||||
<DataGridTextColumn Header="Ship name" Binding="{Binding Shipname}" IsReadOnly="True" />
|
||||
<DataGridTextColumn Header="ETA" Binding="{Binding ETA_NOA_NOD, StringFormat=\{0:dd.MM.yyyy HH:mm\}, Converter={util:UtcToLocalDateTimeConverter}}" IsReadOnly="True" />
|
||||
<DataGridTextColumn Header="ETD" Binding="{Binding ETD_NOA_NOD, StringFormat=\{0:dd.MM.yyyy HH:mm\}, Converter={util:UtcToLocalDateTimeConverter}}" IsReadOnly="True" />
|
||||
<DataGridTextColumn x:Name="gridColumnATA" Header="ATA" Binding="{Binding ATA, StringFormat=\{0:dd.MM.yyyy HH:mm\}, Mode=TwoWay, Converter={util:UtcToLocalDateTimeConverter}}" IsReadOnly="False" />
|
||||
<DataGridTextColumn x:Name="gridColumnATA" Header="ATA" Binding="{Binding POATA, StringFormat=\{0:dd.MM.yyyy HH:mm\}, Mode=TwoWay, Converter={util:UtcToLocalDateTimeConverter}}" IsReadOnly="False" />
|
||||
<DataGridTextColumn Header="ATD" Binding="{Binding ATD, StringFormat=\{0:dd.MM.yyyy HH:mm\}, Converter={util:UtcToLocalDateTimeConverter}}" IsReadOnly="True" />
|
||||
<DataGridTextColumn Header="Hafen" Binding="{Binding PortnameDisplay}" IsReadOnly="True" />
|
||||
<DataGridTextColumn Header="Id" Binding="{Binding DisplayId}" IsReadOnly="True" />
|
||||
|
||||
@ -79,8 +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;
|
||||
if(core.POATA.HasValue)
|
||||
workSheet.Cells[rowIndex, 11].Value = core.POATA.Value;
|
||||
workSheet.Cells[rowIndex, 13].Value = core.PONumber;
|
||||
rowIndex++;
|
||||
}
|
||||
@ -107,6 +107,7 @@ namespace ENI2.Controls
|
||||
DBManager.Instance.Save(messageCore);
|
||||
messageCore.IsDirty = false;
|
||||
// load ATA for this Core
|
||||
/* DAS ATA WIRD JETZT NICHT MEHR IN DIE MELDEKLASSE GESPEICHERT
|
||||
Message ataMessage = DBManager.Instance.GetMessage(messageCore, Message.NotificationClass.ATA);
|
||||
if(ataMessage?.Elements.Count == 1)
|
||||
{
|
||||
@ -116,6 +117,7 @@ namespace ENI2.Controls
|
||||
DBManager.Instance.Save(ataMessage.Elements[0]);
|
||||
}
|
||||
}
|
||||
*/
|
||||
}
|
||||
}
|
||||
this.buttonSaveChanges.IsEnabled = false;
|
||||
@ -144,7 +146,7 @@ namespace ENI2.Controls
|
||||
case 3: if (core.IsFlagSet(MessageCore.CoreFlags.SEAGO_WHV)) this.filteredResult.Add(core); break;
|
||||
}
|
||||
}
|
||||
this.dataGridPOCores.ItemsSource = this.filteredResult;
|
||||
this.dataGridPOCores.ItemsSource = this.filteredResult;
|
||||
}
|
||||
|
||||
private void dataGridPOCores_CellEditEnding(object sender, DataGridCellEditEndingEventArgs e)
|
||||
@ -239,7 +241,19 @@ namespace ENI2.Controls
|
||||
MessageCore messageCore = this.searchResult[i];
|
||||
if (messageCore.ATA.HasValue)
|
||||
{
|
||||
if ((messageCore.ATA.Value < start) || (messageCore.ATA.Value > end)) this.searchResult.RemoveAt(i);
|
||||
if ((messageCore.ATA.Value < start) || (messageCore.ATA.Value > end))
|
||||
{
|
||||
this.searchResult.RemoveAt(i);
|
||||
}
|
||||
else
|
||||
{
|
||||
if(!messageCore.POATA.HasValue)
|
||||
{
|
||||
messageCore.POATA = messageCore.ATA;
|
||||
messageCore.IsDirty = true;
|
||||
this.buttonSaveChanges.IsEnabled = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Binary file not shown.
11
nsw/Source/SQL/Update_6.1_To_6.0.10.sql
Normal file
11
nsw/Source/SQL/Update_6.1_To_6.0.10.sql
Normal file
@ -0,0 +1,11 @@
|
||||
--
|
||||
-- ATA soll ggf. auch separat gespeichert werden können
|
||||
-- (Fall wenn ATA nicht im ENI eingegeben wird, das Schiff aber trotzdem mit PO Number exportiert werden soll
|
||||
|
||||
PRINT N'Altering [dbo].[MessageCore]...';
|
||||
|
||||
GO
|
||||
ALTER TABLE [dbo].[MessageCore]
|
||||
ADD [POATA] DATETIME NULL;
|
||||
|
||||
GO
|
||||
@ -309,6 +309,12 @@ namespace bsmd.database
|
||||
/// </summary>
|
||||
public string PONumber { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Dieses Datumsfeld wird verwendet wenn ein ATA (das nicht über das ENI eingegeben wurde) im PO Nummer Dialog eingegeben werden
|
||||
/// soll, damit es anschließend im exportierten Sheet und auf der Rechnung auftaucht
|
||||
/// </summary>
|
||||
public DateTime? POATA { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// generic multipurpose flag field
|
||||
/// </summary>
|
||||
@ -399,6 +405,7 @@ namespace bsmd.database
|
||||
scmd.Parameters.AddWithNullableValue("@P37", this.ExcelImportComplete);
|
||||
scmd.Parameters.AddWithNullableValue("@P38", this.PONumber);
|
||||
scmd.Parameters.AddWithValue("@P39", this.Flags);
|
||||
scmd.Parameters.AddWithNullableValue("@P40", this.POATA);
|
||||
|
||||
if (this.IsNew)
|
||||
{
|
||||
@ -409,9 +416,9 @@ namespace bsmd.database
|
||||
"HerbergFormTemplateGuid, HerbergReportType, HerbergEmailcontactReportingVessel, HerbergEmail24HrsContact, " +
|
||||
"ETAKielCanal, HerbergRevDate, ReportStatus, SietasSheetVersion, Incoming, DefaultReportingPartyId, CreateExcel, " +
|
||||
"EditedBy, TicketNo, Cancelled, VisitIdOrTransitIdCancellable, BlockedNotificationClasses, FreeNotificationClasses, " +
|
||||
"OwnNotificationClasses, StatusCheckErrorCode, StatusCheckErrorMessage, QueryNSWStatus, ExcelImportComplete, PONumber, Flags) VALUES " +
|
||||
"OwnNotificationClasses, StatusCheckErrorCode, StatusCheckErrorMessage, QueryNSWStatus, ExcelImportComplete, PONumber, Flags, POATA) VALUES " +
|
||||
"(@ID, @P1, @P2, @P3, @P4, @P5, @P6, @P7, @P8, @P9, @P10, @P11, @P12, @P13, @P14, @P15, @P16, @P17, " +
|
||||
"@P18, @P19, @P20, @P21, @P22, @P23, @P24, @P25, @P26, @P27, @P28, @P29, @P30, @P31, @P32, @P33, @P34, @P35, @P36, @P37, @P38, @P39)",
|
||||
"@P18, @P19, @P20, @P21, @P22, @P23, @P24, @P25, @P26, @P27, @P28, @P29, @P30, @P31, @P32, @P33, @P34, @P35, @P36, @P37, @P38, @P39, @P40)",
|
||||
this.Tablename);
|
||||
scmd.CommandText = query;
|
||||
}
|
||||
@ -426,7 +433,7 @@ namespace bsmd.database
|
||||
"SietasSheetVersion = @P23, Incoming = @P24, DefaultReportingPartyId = @P25, CreateExcel = @P26, EditedBy = @P27, " +
|
||||
"TicketNo = @P28, Cancelled = @P29, VisitIdOrTransitIdCancellable = @P30, BlockedNotificationClasses = @P31, " +
|
||||
"FreeNotificationClasses = @P32, OwnNotificationClasses = @P33, StatusCheckErrorCode = @P34, StatusCheckErrorMessage = @P35, " +
|
||||
"QueryNSWStatus = @P36, ExcelImportComplete = @P37, PONumber = @P38, Flags = @P39 WHERE Id = @ID", this.Tablename);
|
||||
"QueryNSWStatus = @P36, ExcelImportComplete = @P37, PONumber = @P38, Flags = @P39, POATA = @P40 WHERE Id = @ID", this.Tablename);
|
||||
scmd.CommandText = query;
|
||||
}
|
||||
}
|
||||
@ -446,7 +453,7 @@ namespace bsmd.database
|
||||
"[{0}].[DefaultReportingPartyId], [{0}].[Created], [{0}].[Changed], [{0}].[CreateExcel], [{0}].[EditedBy], [{0}].[TicketNo], " +
|
||||
"[{0}].[Cancelled], [{0}].[VisitIdOrTransitIdCancellable], [{0}].[BlockedNotificationClasses], [{0}].[FreeNotificationClasses], " +
|
||||
"[{0}].[OwnNotificationClasses], [{0}].[StatusCheckErrorCode], [{0}].[StatusCheckErrorMessage], [{0}].[QueryNSWStatus], " +
|
||||
"[{0}].[ExcelImportComplete], [{0}].[PONumber], [{0}].Flags ",
|
||||
"[{0}].[ExcelImportComplete], [{0}].[PONumber], [{0}].Flags, [{0}].POATA",
|
||||
this.Tablename);
|
||||
|
||||
if(filter == Message.LoadFilter.SEARCH_CORE_FILTERS)
|
||||
@ -692,6 +699,7 @@ namespace bsmd.database
|
||||
if (!reader.IsDBNull(39)) core.ExcelImportComplete = reader.GetBoolean(39);
|
||||
if (!reader.IsDBNull(40)) core.PONumber = reader.GetString(40);
|
||||
if (!reader.IsDBNull(41)) core.Flags = reader.GetInt32(41);
|
||||
if (!reader.IsDBNull(42)) core.POATA = reader.GetDateTime(42);
|
||||
|
||||
result.Add(core);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user