Arbeit an 6.0.10: (WAS mit SSNLocode, Last 10 Ids Suche)
This commit is contained in:
parent
ca32b40662
commit
87b54b185f
@ -50,7 +50,7 @@
|
||||
<CalendarDateRange Start="1/1/2199" End="1/1/9999"/>
|
||||
</DatePicker.BlackoutDates>
|
||||
</DatePicker>
|
||||
<enictrl:LocodeControl Grid.Row="3" Grid.Column="1" x:Name="locodeCtrlLastWastePort" LocodeValue="{Binding LastWasteDisposalPort, Mode=TwoWay}" />
|
||||
<enictrl:LocodeControl Grid.Row="3" Grid.Column="1" x:Name="locodeCtrlLastWastePort" LocodeValue="{Binding LastWasteDisposalPort, Mode=TwoWay}" LocodeSource="SSN" />
|
||||
<TextBox Grid.Row="4" Grid.Column="1" Grid.ColumnSpan="3" Grid.RowSpan="2" Name="textBoxWasteDisposalServiceProviders" Text="{Binding WasteDisposalServiceProviderText}" Margin="2" />
|
||||
<Button Grid.Row="6" Grid.Column="1" Grid.ColumnSpan="1" Name="buttonAddMissingEntries" Content="{x:Static p:Resources.textAddMissingEntries}" Margin="2" Click="buttonAddMissingEntries_Click"/>
|
||||
<Button Grid.Row="6" Grid.Column="2" Grid.ColumnSpan="1" Name="buttonImportFromExcel" Content="{x:Static p:Resources.textImportFromExcel}" Margin="2" Click="buttonImportFromExcel_Click" />
|
||||
|
||||
@ -55,8 +55,9 @@
|
||||
</Grid>
|
||||
<TextBox Grid.Column="3" Grid.Row="2" Name="textBoxTicketNr" VerticalContentAlignment="Center" Margin="2"/>
|
||||
|
||||
<Button Grid.Column="0" Grid.Row="3" Grid.ColumnSpan="2" Content="Clear" Name="buttonClearInput" Click="Button_Click" Margin="2"/>
|
||||
<Button Grid.Column="2" Grid.Row="3" Grid.ColumnSpan="2" Content="Search" Name="buttonSuche" Click="buttonSuche_Click" Margin="2"/>
|
||||
<Button Grid.Column="0" Grid.Row="3" Grid.ColumnSpan="1" Content="Clear" Name="buttonClearInput" Click="Button_Click" Margin="2"/>
|
||||
<Button Grid.Column="2" Grid.Row="3" Grid.ColumnSpan="1" Content="Last 10 Ids" Name="buttonLast10Ids" Click="buttonSuche_Click" Margin="2"/>
|
||||
<Button Grid.Column="3" Grid.Row="3" Grid.ColumnSpan="1" Content="Search" Name="buttonSuche" Click="buttonSuche_Click" Margin="2"/>
|
||||
<Label Name="searchResultLabel" Grid.ColumnSpan="4" Grid.Row="4" VerticalContentAlignment="Center" />
|
||||
</Grid>
|
||||
<DataGrid Grid.Row="1" Margin="0,8,0,0" x:Name="dataGrid" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch" CanUserAddRows="False"
|
||||
|
||||
@ -101,8 +101,17 @@ namespace ENI2
|
||||
|
||||
private void buttonSuche_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
|
||||
// filter auswerten
|
||||
Dictionary<MessageCore.SearchFilterType, string> filterDict = new Dictionary<MessageCore.SearchFilterType, string>();
|
||||
|
||||
bool latestIdsSearch = false;
|
||||
if (sender == this.buttonLast10Ids)
|
||||
{
|
||||
filterDict.Add(MessageCore.SearchFilterType.FILTER_LATESTIDS, null);
|
||||
latestIdsSearch = true;
|
||||
}
|
||||
|
||||
if (!this.textBoxHafen.Text.Trim().IsNullOrEmpty())
|
||||
filterDict.Add(MessageCore.SearchFilterType.FILTER_PORT, this.textBoxHafen.Text.Trim());
|
||||
if (!this.textBoxId.Text.Trim().IsNullOrEmpty())
|
||||
@ -134,7 +143,8 @@ namespace ENI2
|
||||
int? expectedResultNum = DBManager.GetSingleCon(Properties.Settings.Default.ConnectionString).GetNumCoresWithFilters(filterDict);
|
||||
if ((expectedResultNum ?? 0) > 100)
|
||||
resultLimit = 100;
|
||||
|
||||
if (latestIdsSearch)
|
||||
resultLimit = 10;
|
||||
|
||||
Util.UIHelper.SetBusyState();
|
||||
|
||||
|
||||
Binary file not shown.
@ -81,7 +81,8 @@ namespace bsmd.database
|
||||
FILTER_IMO,
|
||||
FILTER_SHIPNAME,
|
||||
FILTER_ETA,
|
||||
FILTER_TICKETNO
|
||||
FILTER_TICKETNO,
|
||||
FILTER_LATESTIDS
|
||||
}
|
||||
|
||||
[Flags]
|
||||
@ -455,7 +456,7 @@ namespace bsmd.database
|
||||
"[{0}].[OwnNotificationClasses], [{0}].[StatusCheckErrorCode], [{0}].[StatusCheckErrorMessage], [{0}].[QueryNSWStatus], " +
|
||||
"[{0}].[ExcelImportComplete], [{0}].[PONumber], [{0}].Flags, [{0}].POATA",
|
||||
this.Tablename);
|
||||
|
||||
|
||||
if(filter == Message.LoadFilter.SEARCH_CORE_FILTERS)
|
||||
{
|
||||
if (criteria[0] is Dictionary<SearchFilterType, string> searchDict && (searchDict.Count > 0))
|
||||
@ -639,6 +640,11 @@ namespace bsmd.database
|
||||
((SqlCommand)cmd).Parameters.AddWithValue("@TICKETNO", searchDict[key]);
|
||||
break;
|
||||
}
|
||||
case SearchFilterType.FILTER_LATESTIDS:
|
||||
{
|
||||
sb.Append(" ((DATALENGTH(VisitId) > 0) OR (DATALENGTH(TransitId) > 0)) ");
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!moreThanOne) moreThanOne = true;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user