3.4.9: Korrekturen
This commit is contained in:
parent
5d58beea00
commit
ab2a3b7c3e
@ -8,40 +8,64 @@
|
|||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
d:DesignHeight="600" d:DesignWidth="800">
|
d:DesignHeight="600" d:DesignWidth="800">
|
||||||
<Grid>
|
<Grid>
|
||||||
<!--Label x:Name="label" Content="Platzhalter für Suche " HorizontalAlignment="Left" Margin="48,128,0,0" VerticalAlignment="Top"/-->
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="120" />
|
||||||
|
<RowDefinition Height="*" />
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<Grid Grid.Row="0">
|
||||||
|
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="1*" />
|
<ColumnDefinition Width="1*" />
|
||||||
|
<ColumnDefinition Width="2*" />
|
||||||
<ColumnDefinition Width="1*" />
|
<ColumnDefinition Width="1*" />
|
||||||
|
<ColumnDefinition Width="2*" />
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="25" />
|
|
||||||
<RowDefinition Height="25" />
|
|
||||||
<RowDefinition Height="25" />
|
|
||||||
<RowDefinition Height="25" />
|
|
||||||
<RowDefinition Height="25" />
|
|
||||||
<RowDefinition Height="25" />
|
|
||||||
<RowDefinition Height="25" />
|
|
||||||
<RowDefinition Height="10" />
|
|
||||||
<RowDefinition Height="30" />
|
<RowDefinition Height="30" />
|
||||||
<RowDefinition Height="20" />
|
<RowDefinition Height="30" />
|
||||||
|
<RowDefinition Height="30" />
|
||||||
|
<RowDefinition Height="30" />
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
<Label Grid.Column="0" Grid.Row="0" Content="Id"/>
|
<Label Grid.Column="0" Grid.Row="0" Content="Id"/>
|
||||||
<Label Grid.Column="0" Grid.Row="1" Content="IMO / ENI Nr."/>
|
<Label Grid.Column="0" Grid.Row="1" Content="IMO / ENI Nr."/>
|
||||||
<Label Grid.Column="0" Grid.Row="2" Content="Schiffsname"/>
|
<Label Grid.Column="0" Grid.Row="2" Content="Schiffsname"/>
|
||||||
<Label Grid.Column="0" Grid.Row="3" Content="Anlaufhafen"/>
|
<Label Grid.Column="2" Grid.Row="0" Content="Anlaufhafen"/>
|
||||||
<Label Grid.Column="0" Grid.Row="4" Content="ETA"/>
|
<Label Grid.Column="2" Grid.Row="1" Content="ETA"/>
|
||||||
<Label Grid.Column="0" Grid.Row="5" Content="Ticket-Nr."/>
|
<Label Grid.Column="2" Grid.Row="2" Content="Ticket-Nr."/>
|
||||||
<TextBox Grid.Column="1" Grid.Row="0" Name="textBoxId" Margin="2"/>
|
<TextBox Grid.Column="1" Grid.Row="0" Name="textBoxId" VerticalContentAlignment="Center" Margin="2"/>
|
||||||
<TextBox Grid.Column="1" Grid.Row="1" Name="textBoxIMO" Margin="2"/>
|
<TextBox Grid.Column="1" Grid.Row="1" Name="textBoxIMO" VerticalContentAlignment="Center" Margin="2"/>
|
||||||
<TextBox Grid.Column="1" Grid.Row="2" Name="textBoxName" Margin="2"/>
|
<TextBox Grid.Column="1" Grid.Row="2" Name="textBoxName" VerticalContentAlignment="Center" Margin="2"/>
|
||||||
<TextBox Grid.Column="1" Grid.Row="3" Name="textBoxHafen" Margin="2"/>
|
<TextBox Grid.Column="3" Grid.Row="0" Name="textBoxHafen" VerticalContentAlignment="Center" Margin="2"/>
|
||||||
|
<Grid Grid.Column="3" Grid.Row="1" Height="Auto" Margin="2">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="1*" />
|
||||||
|
<ColumnDefinition Width="3*" />
|
||||||
|
<ColumnDefinition Width="1*" />
|
||||||
|
<ColumnDefinition Width="3*" />
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Label Grid.Column="0" Grid.Row="0" Content="Von:" HorizontalAlignment="Left" />
|
||||||
|
<xctk:DateTimePicker Grid.Column="1" Grid.Row="0" Name="dateTimePickerETAFrom" VerticalContentAlignment="Center" />
|
||||||
|
<Label Grid.Column="2" Grid.Row="0" Content="Bis:" HorizontalAlignment="Left" />
|
||||||
|
<xctk:DateTimePicker Grid.Column="3" Grid.Row="0" Name="dateTimePickerETATo" VerticalContentAlignment="Center" />
|
||||||
|
</Grid>
|
||||||
|
<TextBox Grid.Column="3" Grid.Row="2" Name="textBoxTicketNr" Margin="2"/>
|
||||||
|
|
||||||
<xctk:DateTimePicker Grid.Column="1" Grid.Row="4" Name="dateTimePickerETA" Margin="2"/>
|
<Button Grid.Column="0" Grid.Row="3" Grid.ColumnSpan="2" Content="Eingaben löschen" Name="buttonClearInput" Click="Button_Click" Margin="2"/>
|
||||||
<TextBox Grid.Column="1" Grid.Row="5" Name="textBoxTicketNr" Margin="2"/>
|
<Button Grid.Column="2" Grid.Row="3" Grid.ColumnSpan="2" Content="Suche" Name="buttonSuche" Click="buttonSuche_Click" Margin="2"/>
|
||||||
|
</Grid>
|
||||||
<Button Grid.Column="0" Grid.Row="8" Content="Eingaben löschen" Name="buttonClearInput" Click="Button_Click" Margin="2"/>
|
<DataGrid Grid.Row="1" Margin="0,8,0,0" x:Name="dataGrid" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch" SelectionMode="Single" AutoGenerateColumns="False">
|
||||||
<Button Grid.Column="1" Grid.Row="8" Content="Suche" Name="buttonSuche" Click="buttonSuche_Click" Margin="2"/>
|
<DataGrid.Columns>
|
||||||
|
<DataGridTextColumn Header="Type" Binding="{Binding HerbergReportType}" IsReadOnly="True" />
|
||||||
|
<DataGridTextColumn Header="IMO" Binding="{Binding IMO}" IsReadOnly="True" />
|
||||||
|
<DataGridTextColumn Header="Ship name" Binding="{Binding Shipname}" IsReadOnly="True" />
|
||||||
|
<DataGridTextColumn Header="ETA" Binding="{Binding ETA}" IsReadOnly="True" />
|
||||||
|
<DataGridTextColumn Header="Hafen" Binding="{Binding Portname}" IsReadOnly="True" />
|
||||||
|
<DataGridTextColumn Header="Id" Binding="{Binding VisitId}" IsReadOnly="True" />
|
||||||
|
<DataGridTextColumn Header="Status" Binding="{Binding BSMDStatusInternal}" IsReadOnly="True" />
|
||||||
|
<DataGridTextColumn Header="Bearbeiter" Binding="{Binding EditedBy}" IsReadOnly="True" />
|
||||||
|
|
||||||
|
</DataGrid.Columns>
|
||||||
|
</DataGrid>
|
||||||
</Grid>
|
</Grid>
|
||||||
</UserControl>
|
</UserControl>
|
||||||
|
|||||||
@ -16,6 +16,8 @@ using System.Windows.Shapes;
|
|||||||
|
|
||||||
using Xceed.Wpf.Toolkit;
|
using Xceed.Wpf.Toolkit;
|
||||||
|
|
||||||
|
using bsmd.database;
|
||||||
|
|
||||||
namespace ENI2
|
namespace ENI2
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -23,6 +25,9 @@ namespace ENI2
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public partial class SucheControl : UserControl
|
public partial class SucheControl : UserControl
|
||||||
{
|
{
|
||||||
|
|
||||||
|
private List<MessageCore> anmeldungen = new List<MessageCore>();
|
||||||
|
|
||||||
public SucheControl()
|
public SucheControl()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
@ -36,12 +41,31 @@ namespace ENI2
|
|||||||
textBoxIMO.Text = string.Empty;
|
textBoxIMO.Text = string.Empty;
|
||||||
textBoxName.Text = string.Empty;
|
textBoxName.Text = string.Empty;
|
||||||
textBoxTicketNr.Text = string.Empty;
|
textBoxTicketNr.Text = string.Empty;
|
||||||
dateTimePickerETA.Text = string.Empty;
|
dateTimePickerETAFrom.Text = string.Empty;
|
||||||
|
dateTimePickerETATo.Text = string.Empty;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void buttonSuche_Click(object sender, RoutedEventArgs e)
|
private void buttonSuche_Click(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
|
// filter auswerten
|
||||||
|
Dictionary<MessageCore.SearchFilterType, string> filterDict = new Dictionary<MessageCore.SearchFilterType, string>();
|
||||||
|
if (!this.textBoxHafen.Text.IsNullOrEmpty())
|
||||||
|
filterDict.Add(MessageCore.SearchFilterType.FILTER_PORT, this.textBoxHafen.Text);
|
||||||
|
if (!this.textBoxId.Text.IsNullOrEmpty())
|
||||||
|
filterDict.Add(MessageCore.SearchFilterType.FILTER_ID, this.textBoxId.Text);
|
||||||
|
if (!this.textBoxIMO.Text.IsNullOrEmpty())
|
||||||
|
filterDict.Add(MessageCore.SearchFilterType.FILTER_IMO, this.textBoxIMO.Text);
|
||||||
|
if (!this.textBoxName.Text.IsNullOrEmpty())
|
||||||
|
filterDict.Add(MessageCore.SearchFilterType.FILTER_SHIPNAME, this.textBoxName.Text);
|
||||||
|
if (!this.textBoxTicketNr.Text.IsNullOrEmpty())
|
||||||
|
filterDict.Add(MessageCore.SearchFilterType.FILTER_TICKETNO, this.textBoxTicketNr.Text);
|
||||||
|
|
||||||
|
|
||||||
|
// suche auslösen
|
||||||
|
this.anmeldungen = DBManager.Instance.GetMessageCoresWithFilters(filterDict);
|
||||||
|
|
||||||
|
// ergebnis anzeigen
|
||||||
|
this.dataGrid.ItemsSource = this.anmeldungen;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Binary file not shown.
BIN
nsw/HIS-NORD/HIS-NORD_BSMD.docx
Normal file
BIN
nsw/HIS-NORD/HIS-NORD_BSMD.docx
Normal file
Binary file not shown.
@ -66,9 +66,9 @@ namespace bsmd.ExcelReadService
|
|||||||
var val = _nameDict[lookup].RefersToRange.Value;
|
var val = _nameDict[lookup].RefersToRange.Value;
|
||||||
var val2 = _nameDict[lookup].RefersToRange.Value2;
|
var val2 = _nameDict[lookup].RefersToRange.Value2;
|
||||||
if (val != null)
|
if (val != null)
|
||||||
return val.ToString();
|
return val.ToString().Trim();
|
||||||
if (val2 != null)
|
if (val2 != null)
|
||||||
return val2.ToString();
|
return val2.ToString().Trim();
|
||||||
}
|
}
|
||||||
catch(COMException)
|
catch(COMException)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -140,6 +140,23 @@ namespace bsmd.database
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public List<MessageCore> GetMessageCoresWithFilters(Dictionary<MessageCore.SearchFilterType, string> filters)
|
||||||
|
{
|
||||||
|
MessageCore aMessageCore = new MessageCore();
|
||||||
|
SqlCommand cmd = new SqlCommand();
|
||||||
|
aMessageCore.PrepareLoadCommand(cmd, Message.LoadFilter.SEARCH_CORE_FILTERS, filters);
|
||||||
|
|
||||||
|
SqlDataReader reader = this.PerformCommand(cmd);
|
||||||
|
List<DatabaseEntity> cores = aMessageCore.LoadList(reader);
|
||||||
|
List<MessageCore> result = new List<MessageCore>();
|
||||||
|
foreach (MessageCore core in cores)
|
||||||
|
{
|
||||||
|
this.LoadCustomer(core);
|
||||||
|
result.Add(core);
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Lädt MessageCore (=Schiffsanlauf) einer EU-NOAD Nachricht vom Fleettracker / Herberg
|
/// Lädt MessageCore (=Schiffsanlauf) einer EU-NOAD Nachricht vom Fleettracker / Herberg
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@ -134,7 +134,8 @@ namespace bsmd.database
|
|||||||
BY_CORE_ENI,
|
BY_CORE_ENI,
|
||||||
BY_CORE_EXCEL,
|
BY_CORE_EXCEL,
|
||||||
BY_CORE_HE,
|
BY_CORE_HE,
|
||||||
CREATE_EXCEL
|
CREATE_EXCEL,
|
||||||
|
SEARCH_CORE_FILTERS
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@ -53,6 +53,17 @@ namespace bsmd.database
|
|||||||
RECEIPT // einfache Empfangsbestätigung (TBD)
|
RECEIPT // einfache Empfangsbestätigung (TBD)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public enum SearchFilterType
|
||||||
|
{
|
||||||
|
FILTER_ID,
|
||||||
|
FILTER_PORT,
|
||||||
|
FILTER_IMO,
|
||||||
|
FILTER_SHIPNAME,
|
||||||
|
FILTER_ETA,
|
||||||
|
FILTER_TICKETNO
|
||||||
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Properties
|
#region Properties
|
||||||
@ -277,6 +288,49 @@ namespace bsmd.database
|
|||||||
query += "WHERE CreateExcel = 1";
|
query += "WHERE CreateExcel = 1";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case Message.LoadFilter.SEARCH_CORE_FILTERS:
|
||||||
|
{
|
||||||
|
// object ist jetzt ein dict aus filtertyp und filterparameter
|
||||||
|
bool moreThanOne = false;
|
||||||
|
StringBuilder sb = new StringBuilder(query);
|
||||||
|
Dictionary<SearchFilterType, string> searchDict = criteria[0] as Dictionary<SearchFilterType, string>;
|
||||||
|
if (searchDict != null && (searchDict.Count > 0))
|
||||||
|
{
|
||||||
|
sb.Append("WHERE ");
|
||||||
|
foreach (SearchFilterType key in searchDict.Keys)
|
||||||
|
{
|
||||||
|
if (moreThanOne) sb.Append(" AND ");
|
||||||
|
switch(key)
|
||||||
|
{
|
||||||
|
case SearchFilterType.FILTER_ETA:
|
||||||
|
// ist eine "between" Suche
|
||||||
|
|
||||||
|
break;
|
||||||
|
case SearchFilterType.FILTER_ID:
|
||||||
|
sb.Append(" (VisitId LIKE @SEARCH_ID OR TransitId LIKE @SEARCH_ID) ");
|
||||||
|
((SqlCommand)cmd).Parameters.AddWithValue("@SEARCH_ID", string.Format("%{0}%", searchDict[key]));
|
||||||
|
break;
|
||||||
|
case SearchFilterType.FILTER_IMO:
|
||||||
|
sb.Append(" IMO = @SEARCH_IMO ");
|
||||||
|
((SqlCommand)cmd).Parameters.AddWithValue("@SEARCH_IMO", searchDict[key]);
|
||||||
|
break;
|
||||||
|
case SearchFilterType.FILTER_PORT:
|
||||||
|
sb.Append(" Portname LIKE @SEARCH_PORT ");
|
||||||
|
((SqlCommand)cmd).Parameters.AddWithValue("@SEARCH_PORT", string.Format("%{0}%", searchDict[key]));
|
||||||
|
break;
|
||||||
|
case SearchFilterType.FILTER_SHIPNAME:
|
||||||
|
|
||||||
|
break;
|
||||||
|
case SearchFilterType.FILTER_TICKETNO:
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if (!moreThanOne) moreThanOne = true;
|
||||||
|
}
|
||||||
|
query = sb.ToString();
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
case Message.LoadFilter.ALL:
|
case Message.LoadFilter.ALL:
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
|||||||
@ -2,6 +2,6 @@
|
|||||||
|
|
||||||
[assembly: AssemblyCompany("Informatikbüro Daniel Schick")]
|
[assembly: AssemblyCompany("Informatikbüro Daniel Schick")]
|
||||||
[assembly: AssemblyProduct("BSMD NSW interface")]
|
[assembly: AssemblyProduct("BSMD NSW interface")]
|
||||||
[assembly: AssemblyInformationalVersion("3.4.8")]
|
[assembly: AssemblyInformationalVersion("3.4.9")]
|
||||||
[assembly: AssemblyCopyright("Copyright © 2014-2017 Informatikbüro Daniel Schick. All rights reserved.")]
|
[assembly: AssemblyCopyright("Copyright © 2014-2017 Informatikbüro Daniel Schick. All rights reserved.")]
|
||||||
[assembly: AssemblyTrademark("")]
|
[assembly: AssemblyTrademark("")]
|
||||||
@ -1,4 +1,4 @@
|
|||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
|
|
||||||
[assembly: AssemblyVersion("3.4.8.*")]
|
[assembly: AssemblyVersion("3.4.9.*")]
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user