6.0.11: Korrekturen von 6.0.10
This commit is contained in:
parent
d353025b72
commit
586a91719d
@ -31,7 +31,7 @@
|
|||||||
</setting>
|
</setting>
|
||||||
<setting name="ConnectionString" serializeAs="String">
|
<setting name="ConnectionString" serializeAs="String">
|
||||||
<!--value>Initial Catalog=nsw;Data Source=192.168.2.24\SQLEXPRESS;Uid=dfuser;pwd=dfpasswd;Persist Security Info=False;Connection Reset=false</value-->
|
<!--value>Initial Catalog=nsw;Data Source=192.168.2.24\SQLEXPRESS;Uid=dfuser;pwd=dfpasswd;Persist Security Info=False;Connection Reset=false</value-->
|
||||||
<value>Data Source=(localdb)\MSSQLLocalDB;Initial Catalog=E:\DATA\DB\NSW.MDF;Integrated Security=True;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False</value>
|
<value>Data Source=(localdb)\MSSQLLocalDB;Initial Catalog=E:\DATA\DB\NSW.MDF;Integrated Security=True;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False</value>
|
||||||
</setting>
|
</setting>
|
||||||
</ENI2.Properties.Settings>
|
</ENI2.Properties.Settings>
|
||||||
</applicationSettings>
|
</applicationSettings>
|
||||||
|
|||||||
@ -45,7 +45,7 @@
|
|||||||
<DataGridTextColumn Header="Ship name" Binding="{Binding Shipname}" IsReadOnly="True" />
|
<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="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 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 POATA, 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\}, 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="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="Hafen" Binding="{Binding PortnameDisplay}" IsReadOnly="True" />
|
||||||
<DataGridTextColumn Header="Id" Binding="{Binding DisplayId}" IsReadOnly="True" />
|
<DataGridTextColumn Header="Id" Binding="{Binding DisplayId}" IsReadOnly="True" />
|
||||||
|
|||||||
@ -80,7 +80,7 @@ namespace ENI2.Controls
|
|||||||
workSheet.Cells[rowIndex, 7].Value = core.Shipname;
|
workSheet.Cells[rowIndex, 7].Value = core.Shipname;
|
||||||
workSheet.Cells[rowIndex, 10].Value = core.PoC.Substring(2);
|
workSheet.Cells[rowIndex, 10].Value = core.PoC.Substring(2);
|
||||||
if(core.POATA.HasValue)
|
if(core.POATA.HasValue)
|
||||||
workSheet.Cells[rowIndex, 11].Value = core.POATA.Value;
|
workSheet.Cells[rowIndex, 11].Value = core.POATA.Value.ToShortDateString();
|
||||||
workSheet.Cells[rowIndex, 13].Value = core.PONumber;
|
workSheet.Cells[rowIndex, 13].Value = core.PONumber;
|
||||||
rowIndex++;
|
rowIndex++;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -28,7 +28,7 @@
|
|||||||
<ColumnDefinition Width="2*" />
|
<ColumnDefinition Width="2*" />
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Label Content="ATA" Grid.Column="0" Grid.Row="0" HorizontalContentAlignment="Right" Margin="0,0,10,0"/>
|
<Label Content="ATA" Grid.Column="0" Grid.Row="0" HorizontalContentAlignment="Right" Margin="0,0,10,0"/>
|
||||||
<xctk:DateTimePicker Grid.Column="1" Value="{Binding ATAPortOfCall, Mode=TwoWay, Converter={util:UtcToLocalDateTimeConverter}}" Name="dateTimePickerATA" Format="Custom" FormatString="dd.MM.yyyy HH:mm" ShowButtonSpinner="False" VerticalContentAlignment="Center" Margin="2" AllowTextInput="True" ContextMenu="{DynamicResource ClearContextMenu}" TextAlignment="Left" Minimum="1899.12.31 00:00" Maximum="2100.12.31 00:00" PreviewKeyUp="DateTimePicker_PreviewKeyUp">
|
<xctk:DateTimePicker Grid.Column="1" Value="{Binding ATAPortOfCall, Mode=TwoWay, Converter={util:UtcToLocalDateTimeConverter}}" Name="dateTimePickerATA" Format="Custom" FormatString="dd.MM.yyyy HH:mm" ShowButtonSpinner="False" VerticalContentAlignment="Center" Margin="2" AllowTextInput="True" ContextMenu="{DynamicResource ClearContextMenu}" TextAlignment="Left" Minimum="1899.12.31 00:00" Maximum="2100.12.31 00:00" PreviewKeyUp="DateTimePicker_PreviewKeyUp" ValueChanged="dateTimePickerATA_ValueChanged">
|
||||||
</xctk:DateTimePicker>
|
</xctk:DateTimePicker>
|
||||||
</Grid>
|
</Grid>
|
||||||
</GroupBox>
|
</GroupBox>
|
||||||
|
|||||||
@ -75,12 +75,16 @@ namespace ENI2.DetailViewControls
|
|||||||
|
|
||||||
this.ataGroupBox.DataContext = ata;
|
this.ataGroupBox.DataContext = ata;
|
||||||
|
|
||||||
if (!ata.ATAPortOfCall.HasValue)
|
// Diese Lösung wurde nicht für gut befunden. Dadurch wird zwar der gültige Bereich hübsch im Control angezeigt,
|
||||||
{
|
// allerdings kann man kein Datum außerhalb des Bereichs angeben, der Wert springt dann wieder zurück. Das wäre doch doofererer und
|
||||||
this.dateTimePickerATA.Minimum = DateTime.Now.AddDays(-14);
|
// fehleranfällig (Feb 2021)
|
||||||
this.dateTimePickerATA.Maximum = DateTime.Now.AddDays(14);
|
|
||||||
this.dateTimePickerATA.ClipValueToMinMax = true;
|
//if (!ata.ATAPortOfCall.HasValue)
|
||||||
}
|
//{
|
||||||
|
// this.dateTimePickerATA.Minimum = DateTime.Now.AddDays(-14);
|
||||||
|
// this.dateTimePickerATA.Maximum = DateTime.Now.AddDays(14);
|
||||||
|
// this.dateTimePickerATA.ClipValueToMinMax = true;
|
||||||
|
//}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
@ -285,5 +289,19 @@ namespace ENI2.DetailViewControls
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
#region special datetimepicker validation popup (OMG)
|
||||||
|
|
||||||
|
private void dateTimePickerATA_ValueChanged(object sender, RoutedPropertyChangedEventArgs<object> e)
|
||||||
|
{
|
||||||
|
if(this.dateTimePickerATA.Value.HasValue)
|
||||||
|
{
|
||||||
|
DateTime setTime = this.dateTimePickerATA.Value.Value;
|
||||||
|
if ((setTime > DateTime.Now.AddDays(14)) || (setTime < DateTime.Now.AddDays(-14)))
|
||||||
|
MessageBox.Show("ATA value may be invalid", "Date implausible", MessageBoxButton.OK, MessageBoxImage.Warning);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -28,7 +28,7 @@
|
|||||||
<ColumnDefinition Width="2*" />
|
<ColumnDefinition Width="2*" />
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Label Content="ATD" Grid.Column="0" Grid.Row="0" HorizontalContentAlignment="Right" Margin="0,0,10,0"/>
|
<Label Content="ATD" Grid.Column="0" Grid.Row="0" HorizontalContentAlignment="Right" Margin="0,0,10,0"/>
|
||||||
<xctk:DateTimePicker Grid.Column="1" Value="{Binding ATDPortOfCall, Mode=TwoWay, Converter={util:UtcToLocalDateTimeConverter}}" Name="dateTimePickerATD" Format="Custom" FormatString="dd.MM.yyyy HH:mm" ShowButtonSpinner="False" VerticalContentAlignment="Center" Margin="2" AllowTextInput="True" ContextMenu="{DynamicResource ClearContextMenu}" TextAlignment="Left" Minimum="1899.12.31 00:00" Maximum="2100.12.31 00:00" PreviewKeyUp="DateTimePicker_PreviewKeyUp"/>
|
<xctk:DateTimePicker Grid.Column="1" Value="{Binding ATDPortOfCall, Mode=TwoWay, Converter={util:UtcToLocalDateTimeConverter}}" Name="dateTimePickerATD" Format="Custom" FormatString="dd.MM.yyyy HH:mm" ShowButtonSpinner="False" VerticalContentAlignment="Center" Margin="2" AllowTextInput="True" ContextMenu="{DynamicResource ClearContextMenu}" TextAlignment="Left" Minimum="1899.12.31 00:00" Maximum="2100.12.31 00:00" PreviewKeyUp="DateTimePicker_PreviewKeyUp" ValueChanged="dateTimePickerATD_ValueChanged"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
</GroupBox>
|
</GroupBox>
|
||||||
<GroupBox Name="tiefdGroupBox" Header="{x:Static p:Resources.textDraughtOnDeparture}" Grid.Row="1">
|
<GroupBox Name="tiefdGroupBox" Header="{x:Static p:Resources.textDraughtOnDeparture}" Grid.Row="1">
|
||||||
|
|||||||
@ -73,12 +73,13 @@ namespace ENI2.DetailViewControls
|
|||||||
|
|
||||||
this.atdGroupBox.DataContext = atd;
|
this.atdGroupBox.DataContext = atd;
|
||||||
|
|
||||||
if (!atd.ATDPortOfCall.HasValue)
|
// no, see ATA
|
||||||
{
|
//if (!atd.ATDPortOfCall.HasValue)
|
||||||
this.dateTimePickerATD.Minimum = DateTime.Now.AddDays(-14);
|
//{
|
||||||
this.dateTimePickerATD.Maximum = DateTime.Now.AddDays(14);
|
// this.dateTimePickerATD.Minimum = DateTime.Now.AddDays(-14);
|
||||||
this.dateTimePickerATD.ClipValueToMinMax = true;
|
// this.dateTimePickerATD.Maximum = DateTime.Now.AddDays(14);
|
||||||
}
|
// this.dateTimePickerATD.ClipValueToMinMax = true;
|
||||||
|
//}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
@ -272,6 +273,19 @@ namespace ENI2.DetailViewControls
|
|||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
#region special datetimepicker validation popup (OMG)
|
||||||
|
|
||||||
|
private void dateTimePickerATD_ValueChanged(object sender, RoutedPropertyChangedEventArgs<object> e)
|
||||||
|
{
|
||||||
|
if (this.dateTimePickerATD.Value.HasValue)
|
||||||
|
{
|
||||||
|
DateTime setTime = this.dateTimePickerATD.Value.Value;
|
||||||
|
if ((setTime > DateTime.Now.AddDays(14)) || (setTime < DateTime.Now.AddDays(-14)))
|
||||||
|
MessageBox.Show("ATD value may be invalid", "Date implausible", MessageBoxButton.OK, MessageBoxImage.Warning);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -326,12 +326,12 @@ namespace ENI2.DetailViewControls
|
|||||||
this.labelBSMDStatusInternal.DataContext = this.Core;
|
this.labelBSMDStatusInternal.DataContext = this.Core;
|
||||||
this.labelBSMDStatusInternal.GetBindingExpression(Label.ContentProperty)?.UpdateTarget();
|
this.labelBSMDStatusInternal.GetBindingExpression(Label.ContentProperty)?.UpdateTarget();
|
||||||
//MessageBox.Show(string.Format("Visit/Transit ID updated: {0}", this.Core.DisplayId));
|
//MessageBox.Show(string.Format("Visit/Transit ID updated: {0}", this.Core.DisplayId));
|
||||||
ShowIdDialog sid = new ShowIdDialog(this.Core)
|
//ShowIdDialog sid = new ShowIdDialog(this.Core)
|
||||||
{
|
//{
|
||||||
DisplayId = this.Core.DisplayId
|
// DisplayId = this.Core.DisplayId
|
||||||
};
|
//};
|
||||||
sid.UpdateId(this.Core.DisplayId);
|
//sid.UpdateId(this.Core.DisplayId);
|
||||||
sid.Show();
|
//sid.Show();
|
||||||
this.Core.IsDirty = false; // ist ja schon gespeichert..
|
this.Core.IsDirty = false; // ist ja schon gespeichert..
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -454,7 +454,7 @@ namespace ENI2.DetailViewControls
|
|||||||
});
|
});
|
||||||
this.mssd.Show();
|
this.mssd.Show();
|
||||||
}
|
}
|
||||||
|
this.mssd.Activate(); // bring to foreground
|
||||||
this.mssd.AddMessages(watchList);
|
this.mssd.AddMessages(watchList);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -408,9 +408,13 @@ namespace ENI2
|
|||||||
// Wartedialog anzeigen
|
// Wartedialog anzeigen
|
||||||
ShowIdDialog showIdDialog = new ShowIdDialog(closedDialog.Core);
|
ShowIdDialog showIdDialog = new ShowIdDialog(closedDialog.Core);
|
||||||
showIdDialog.Closed += (sid, showIdArgs) =>
|
showIdDialog.Closed += (sid, showIdArgs) =>
|
||||||
{
|
{
|
||||||
if(((ShowIdDialog)sid).OpenCore)
|
if (((ShowIdDialog)sid).OpenCore)
|
||||||
this.AnmeldungenControl_MessageCoreSelected(closedDialog.Core); // in einem neuen Reiter öffnen
|
{
|
||||||
|
Dispatcher.BeginInvoke((Action)(() => {
|
||||||
|
this.AnmeldungenControl_MessageCoreSelected(closedDialog.Core); // in einem neuen Reiter öffnen
|
||||||
|
}));
|
||||||
|
}
|
||||||
|
|
||||||
// wenn der Dialog vorzeitig geschlossen wird erkennt man später dass man die Id dort nicht updaten braucht
|
// wenn der Dialog vorzeitig geschlossen wird erkennt man später dass man die Id dort nicht updaten braucht
|
||||||
if (this.showIdDict.ContainsKey(closedDialog.Core.Id.Value))
|
if (this.showIdDict.ContainsKey(closedDialog.Core.Id.Value))
|
||||||
|
|||||||
@ -109,6 +109,7 @@ namespace ENI2
|
|||||||
if (sender == this.buttonLast10Ids)
|
if (sender == this.buttonLast10Ids)
|
||||||
{
|
{
|
||||||
filterDict.Add(MessageCore.SearchFilterType.FILTER_LATESTIDS, null);
|
filterDict.Add(MessageCore.SearchFilterType.FILTER_LATESTIDS, null);
|
||||||
|
filterDict.Add(MessageCore.SearchFilterType.FILTER_CREATEDBY, ReportingParty.CurrentReportingParty.Id.Value.ToString());
|
||||||
latestIdsSearch = true;
|
latestIdsSearch = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -198,7 +199,7 @@ namespace ENI2
|
|||||||
this.dataGrid.ItemsSource = this.anmeldungen;
|
this.dataGrid.ItemsSource = this.anmeldungen;
|
||||||
this.searchResultLabel.Content = ((expectedResultNum ?? 0) > 0) ? string.Format("{0} results found, {1} displayed.", expectedResultNum ?? 0, this.anmeldungen.Count) : "no results";
|
this.searchResultLabel.Content = ((expectedResultNum ?? 0) > 0) ? string.Format("{0} results found, {1} displayed.", expectedResultNum ?? 0, this.anmeldungen.Count) : "no results";
|
||||||
|
|
||||||
if((expectedResultNum ?? 0) > 100)
|
if(!latestIdsSearch && (expectedResultNum ?? 0) > 100)
|
||||||
{
|
{
|
||||||
// Messagebox damit es wirklich jeder merkt :\
|
// Messagebox damit es wirklich jeder merkt :\
|
||||||
string searchMessage = string.Format(Properties.Resources.textSearchExceededMessage, 100, expectedResultNum.Value);
|
string searchMessage = string.Format(Properties.Resources.textSearchExceededMessage, 100, expectedResultNum.Value);
|
||||||
|
|||||||
Binary file not shown.
@ -82,7 +82,8 @@ namespace bsmd.database
|
|||||||
FILTER_SHIPNAME,
|
FILTER_SHIPNAME,
|
||||||
FILTER_ETA,
|
FILTER_ETA,
|
||||||
FILTER_TICKETNO,
|
FILTER_TICKETNO,
|
||||||
FILTER_LATESTIDS
|
FILTER_LATESTIDS,
|
||||||
|
FILTER_CREATEDBY
|
||||||
}
|
}
|
||||||
|
|
||||||
[Flags]
|
[Flags]
|
||||||
@ -648,6 +649,12 @@ namespace bsmd.database
|
|||||||
sb.Append(" ((DATALENGTH(VisitId) > 0) OR (DATALENGTH(TransitId) > 0)) ");
|
sb.Append(" ((DATALENGTH(VisitId) > 0) OR (DATALENGTH(TransitId) > 0)) ");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case SearchFilterType.FILTER_CREATEDBY:
|
||||||
|
{
|
||||||
|
sb.Append(" DefaultReportingPartyId = @DRPID ");
|
||||||
|
((SqlCommand)cmd).Parameters.AddWithValue("@DRPID", searchDict[key]);
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (!moreThanOne) moreThanOne = true;
|
if (!moreThanOne) moreThanOne = true;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -255,15 +255,15 @@ namespace bsmd.database
|
|||||||
{
|
{
|
||||||
violations.Add(RuleEngine.CreateViolation(ValidationCode.TIME_IMPLAUSIBLE, "Check ETAToPortOfCall: might be implausible", this.ETAToPortOfCall.Value.ToString(), this.Title, null, this.Tablename));
|
violations.Add(RuleEngine.CreateViolation(ValidationCode.TIME_IMPLAUSIBLE, "Check ETAToPortOfCall: might be implausible", this.ETAToPortOfCall.Value.ToString(), this.Title, null, this.Tablename));
|
||||||
}
|
}
|
||||||
if(this.ETDFromLastPort < (DateTime.Now.AddDays(-14)))
|
if(this.ETDFromLastPort < DateTime.Now.AddDays(-14))
|
||||||
{
|
{
|
||||||
violations.Add(RuleEngine.CreateViolation(ValidationCode.TIME_IMPLAUSIBLE, "Check ETDFromLastPort: might be implausible", this.ETDFromLastPort.Value.ToString(), this.Title, null, this.Tablename));
|
violations.Add(RuleEngine.CreateViolation(ValidationCode.TIME_IMPLAUSIBLE, "Check ETDFromLastPort: might be implausible", this.ETDFromLastPort.Value.ToString(), this.Title, null, this.Tablename));
|
||||||
}
|
}
|
||||||
if (this.ETDFromPortOfCall < (DateTime.Now.AddDays(-14)))
|
if ((this.ETDFromPortOfCall < DateTime.Now.AddDays(-14)) || (this.ETDFromPortOfCall > DateTime.Now.AddDays(14)))
|
||||||
{
|
{
|
||||||
violations.Add(RuleEngine.CreateViolation(ValidationCode.TIME_IMPLAUSIBLE, "Check ETDFromPortOfCall: might be implausible", this.ETDFromPortOfCall.Value.ToString(), this.Title, null, this.Tablename));
|
violations.Add(RuleEngine.CreateViolation(ValidationCode.TIME_IMPLAUSIBLE, "Check ETDFromPortOfCall: might be implausible", this.ETDFromPortOfCall.Value.ToString(), this.Title, null, this.Tablename));
|
||||||
}
|
}
|
||||||
if (this.ETAToNextPort < DateTime.Now)
|
if ((this.ETAToNextPort < DateTime.Now) || (this.ETAToNextPort > DateTime.Now.AddDays(14)))
|
||||||
{
|
{
|
||||||
violations.Add(RuleEngine.CreateViolation(ValidationCode.TIME_IMPLAUSIBLE, "Check ETAToNextPort: might be implausible", this.ETAToNextPort.Value.ToString(), this.Title, null, this.Tablename));
|
violations.Add(RuleEngine.CreateViolation(ValidationCode.TIME_IMPLAUSIBLE, "Check ETAToNextPort: might be implausible", this.ETAToNextPort.Value.ToString(), this.Title, null, this.Tablename));
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user