Viele kleine Ärgernisse ausgeräumt, so dass hier 3.5.6.6 ein guter Punkt erreicht ist

This commit is contained in:
Daniel Schick 2017-04-27 11:45:51 +00:00
parent 2490a78dca
commit dc4007740a
22 changed files with 331 additions and 29 deletions

View File

@ -12,12 +12,12 @@
<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="Shipname" Binding="{Binding Shipname}" IsReadOnly="True" />
<DataGridTextColumn Header="ETA" Binding="{Binding ETA , StringFormat=\{0:dd.MM.yyyy HH:mm\}}" IsReadOnly="True" />
<DataGridTextColumn Header="Hafen" Binding="{Binding Portname}" IsReadOnly="True" />
<DataGridTextColumn Header="Port" Binding="{Binding Portname}" IsReadOnly="True" />
<DataGridTextColumn Header="Id" Binding="{Binding DisplayId}" IsReadOnly="True" />
<DataGridTextColumn Header="Status" Binding="{Binding BSMDStatusInternal}" IsReadOnly="True" />
<DataGridTextColumn Header="Bearbeiter" Binding="{Binding EditedBy}" IsReadOnly="True" />
<DataGridTextColumn Header="Edited by" Binding="{Binding EditedBy}" IsReadOnly="True" />
</DataGrid.Columns>
</DataGrid>

View File

@ -17,7 +17,7 @@ Sample license text.
<applicationSettings>
<ENI2.Properties.Settings>
<setting name="ConnectionString" serializeAs="String">
<value>Data Source=(localdb)\Projects;Initial Catalog=nsw;Integrated Security=True;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False</value>
<value>Data Source=192.168.2.12;Initial Catalog=nsw;Uid=dfuser;Pwd=dfpasswd;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False</value>
</setting>
</ENI2.Properties.Settings>
</applicationSettings>

View File

@ -1,10 +1,5 @@
// Copyright (c) 2017 Informatibüro Daniel Schick
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Threading.Tasks;
using System.Windows;
namespace ENI2
@ -14,5 +9,17 @@ namespace ENI2
/// </summary>
public partial class App : Application
{
public App() : base()
{
this.Dispatcher.UnhandledException += Dispatcher_UnhandledException;
}
private void Dispatcher_UnhandledException(object sender, System.Windows.Threading.DispatcherUnhandledExceptionEventArgs e)
{
string errorMessage = string.Format("An unhandled exception occurred: {0}\r\n{1}", e.Exception.Message, e.Exception.StackTrace);
MessageBox.Show(errorMessage, "Error", MessageBoxButton.OK, MessageBoxImage.Error);
e.Handled = true;
}
}
}

View File

@ -60,12 +60,21 @@ namespace ENI2.Controls
}
*/
// das hier bildet 1:1 das Kontext-Menü des ANSW ab
public event Action<DatabaseEntity> EditRequested;
public event Action<DatabaseEntity> DeleteRequested;
public event Action CreateRequested;
public event Action<DatabaseEntity> PrintRequested;
public event Action<DatabaseEntity> ExportRequested;
public event Action<DatabaseEntity> ShowTextRequested;
public void Initialize()
{
this.MouseDoubleClick += dataGrid_MouseDoubleClick;
this.ContextMenu = new ContextMenu();
MenuItem addItem = new MenuItem();
@ -86,6 +95,26 @@ namespace ENI2.Controls
editItem.Click += this.editItem;
this.ContextMenu.Items.Add(editItem);
this.ContextMenu.Items.Add(new Separator());
MenuItem printItem = new MenuItem();
printItem.Header = "_Print";
printItem.Icon = new Image { Source = new BitmapImage(new Uri("pack://application:,,,/Resources/printer.png")) };
printItem.Click += this.printItem;
this.ContextMenu.Items.Add(printItem);
MenuItem exportItem = new MenuItem();
exportItem.Header = "_Export";
exportItem.Icon = new Image { Source = new BitmapImage(new Uri("pack://application:,,,/Resources/floppy_disk_blue.png")) };
exportItem.Click += this.exportItem;
this.ContextMenu.Items.Add(exportItem);
MenuItem showTextItem = new MenuItem();
showTextItem.Header = "_Show data as text";
showTextItem.Icon = new Image { Source = new BitmapImage(new Uri("pack://application:,,,/Resources/document_plain.png")) };
showTextItem.Click += this.showTextItem;
this.ContextMenu.Items.Add(showTextItem);
}
protected void addItem(object sender, RoutedEventArgs e)
@ -118,5 +147,51 @@ namespace ENI2.Controls
}
}
protected void printItem(object sender, RoutedEventArgs e)
{
if ((this.SelectedItems != null) && (this.SelectedItems.Count == 1))
{
DatabaseEntity selectedEntity = this.SelectedItems[0] as DatabaseEntity;
if (selectedEntity != null)
this.PrintRequested?.Invoke(selectedEntity);
}
}
protected void exportItem(object sender, RoutedEventArgs e)
{
if ((this.SelectedItems != null) && (this.SelectedItems.Count == 1))
{
DatabaseEntity selectedEntity = this.SelectedItems[0] as DatabaseEntity;
if (selectedEntity != null)
this.ExportRequested?.Invoke(selectedEntity);
}
}
protected void showTextItem(object sender, RoutedEventArgs e)
{
if ((this.SelectedItems != null) && (this.SelectedItems.Count == 1))
{
DatabaseEntity selectedEntity = this.SelectedItems[0] as DatabaseEntity;
if (selectedEntity != null)
this.ShowTextRequested?.Invoke(selectedEntity);
}
}
private void dataGrid_MouseDoubleClick(object sender, MouseButtonEventArgs e)
{
if (sender != null)
{
DataGrid grid = sender as DataGrid;
if ((grid != null) && (grid.SelectedItems != null) && (grid.SelectedItems.Count == 1))
{
DataGridRow dgr = grid.ItemContainerGenerator.ContainerFromItem(grid.SelectedItem) as DataGridRow;
DatabaseEntity selectedEntity = grid.SelectedItem as DatabaseEntity;
if (selectedEntity != null)
this.EditRequested?.Invoke(selectedEntity);
}
}
}
}
}

View File

@ -0,0 +1,47 @@
// Copyright (c) 2017 schick Informatik
// Description: Basisklasse für Bearbeitungsfensterle
// Position merken usw.
using System;
using System.Windows;
using System.Windows.Controls;
using System.ComponentModel;
namespace ENI2.Controls
{
/// <summary>
/// Basisklasse aller Bearbeitungsdialoge. OK/Cancel Buttons und Window Placement
/// </summary>
[TemplatePart(Name = "buttonOK",Type = typeof(Button))]
[TemplatePart(Name = "buttonCancel", Type = typeof(Button))]
public class EditWindowBase : Window
{
static EditWindowBase()
{
DefaultStyleKeyProperty.OverrideMetadata(typeof(EditWindowBase), new FrameworkPropertyMetadata(typeof(EditWindowBase)));
}
public EditWindowBase()
{
Loaded += (_, __) =>
{
var okButton = (Button)Template.FindName("buttonOK", this);
var cancelButton = (Button)Template.FindName("buttonCancel", this);
okButton.Click += (s, e) => DialogResult = true;
cancelButton.Click += (s, e) => DialogResult = false;
};
}
private void Window_Closing(object sender, CancelEventArgs e)
{
// ENI2.Properties.Settings.Default.M
}
protected override void OnSourceInitialized(EventArgs e)
{
base.OnSourceInitialized(e);
// this.SetPlacement(..)
}
}
}

View File

@ -20,6 +20,7 @@ using System.Windows.Shapes;
using bsmd.database;
using bsmd.ExcelReadService;
using ENI2;
using ENI2.EditControls;
namespace ENI2.DetailViewControls
{
@ -70,6 +71,10 @@ namespace ENI2.DetailViewControls
this.dataGridCallPurposes.Initialize();
this.dataGridCallPurposes.ItemsSource = _noa_nod.CallPurposes;
this.dataGridCallPurposes.EditRequested += DataGridCallPurposes_EditRequested;
this.dataGridCallPurposes.AddingNewItem += DataGridCallPurposes_AddingNewItem;
this.dataGridCallPurposes.CreateRequested += DataGridCallPurposes_CreateRequested;
this.dataGridCallPurposes.DeleteRequested += DataGridCallPurposes_DeleteRequested;
this.agentGroupBox.DataContext = _agnt;
@ -81,7 +86,34 @@ namespace ENI2.DetailViewControls
this.dateTimePicker_ETDFromPortOfCall.DataContext = _noa_nod;
}
}
private void DataGridCallPurposes_DeleteRequested(DatabaseEntity obj)
{
// throw new NotImplementedException();
}
private void DataGridCallPurposes_CreateRequested()
{
//throw new NotImplementedException();
}
private void DataGridCallPurposes_AddingNewItem(object sender, AddingNewItemEventArgs e)
{
//throw new NotImplementedException();
}
private void DataGridCallPurposes_EditRequested(DatabaseEntity obj)
{
EditCallPurposeDialog ecpd = new EditCallPurposeDialog();
if(ecpd.ShowDialog() ?? false)
{
// Edit successful
}
else
{
// cancelled out..
}
}
}
}

View File

@ -35,7 +35,7 @@
<MinimumRequiredVersion>3.5.1.0</MinimumRequiredVersion>
<CreateWebPageOnPublish>true</CreateWebPageOnPublish>
<WebPage>publish.html</WebPage>
<ApplicationRevision>3</ApplicationRevision>
<ApplicationRevision>6</ApplicationRevision>
<ApplicationVersion>3.5.6.%2a</ApplicationVersion>
<UseApplicationTrust>false</UseApplicationTrust>
<CreateDesktopShortcut>true</CreateDesktopShortcut>
@ -51,6 +51,7 @@
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
@ -101,6 +102,7 @@
<Reference Include="System.Data.SQLite, Version=1.0.105.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
<HintPath>packages\System.Data.SQLite.Core.1.0.105.0\lib\net451\System.Data.SQLite.dll</HintPath>
<Private>True</Private>
<EmbedInteropTypes>False</EmbedInteropTypes>
</Reference>
<Reference Include="System.Drawing" />
<Reference Include="System.Xml" />
@ -157,6 +159,7 @@
<Compile Include="..\..\..\nsw\Source\bsmd.ExcelReadService\LocodeDB.cs">
<Link>Locode\LocodeDB.cs</Link>
</Compile>
<Compile Include="Controls\EditWindowBase.cs" />
<Compile Include="Controls\ENIDataGrid.cs" />
<Compile Include="Controls\LocodeControl.xaml.cs">
<DependentUpon>LocodeControl.xaml</DependentUpon>
@ -204,6 +207,9 @@
<Compile Include="DetailViewControls\WasteDetailControl.xaml.cs">
<DependentUpon>WasteDetailControl.xaml</DependentUpon>
</Compile>
<Compile Include="EditControls\EditCallPurposeDialog.xaml.cs">
<DependentUpon>EditCallPurposeDialog.xaml</DependentUpon>
</Compile>
<Compile Include="SucheControl.xaml.cs">
<DependentUpon>SucheControl.xaml</DependentUpon>
</Compile>
@ -275,6 +281,10 @@
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="EditControls\EditCallPurposeDialog.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="MainWindow.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
@ -317,6 +327,15 @@
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
<Content Include="x64\SQLite.Interop.dll">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="x86\SQLite.Interop.dll">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Resource Include="Resources\printer.png" />
<Resource Include="Resources\floppy_disk_blue.png" />
<Resource Include="Resources\document_plain.png" />
<Resource Include="Resources\edit.png" />
<Resource Include="Resources\delete.png" />
<Resource Include="Resources\add.png" />
@ -431,6 +450,7 @@
<ItemGroup>
<Resource Include="Resources\bullet_ball_yellow.png" />
</ItemGroup>
<ItemGroup />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="packages\System.Data.SQLite.Core.1.0.105.0\build\net451\System.Data.SQLite.Core.targets" Condition="Exists('packages\System.Data.SQLite.Core.1.0.105.0\build\net451\System.Data.SQLite.Core.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">

View File

@ -0,0 +1,25 @@
<enictrl:EditWindowBase x:Class="ENI2.EditControls.EditCallPurposeDialog"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:enictrl="clr-namespace:ENI2.Controls"
xmlns:local="clr-namespace:ENI2.EditControls"
mc:Ignorable="d"
Title="Edit call purpose" Height="150" Width="300" WindowStyle="SingleBorderWindow" Background="AliceBlue">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="30" />
<RowDefinition Height="50" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*" />
<ColumnDefinition Width="2*" />
</Grid.ColumnDefinitions>
<Label Grid.Row="0" Grid.Column="0" Content="Code" />
<Label Grid.Row="1" Grid.Column="0" Content="Description" />
<ComboBox Grid.Row="0" Grid.Column="1" Width="auto" Name="comboBoxCode" Margin="2" TextBlock.TextAlignment="Center"/>
<TextBox Grid.Row="1" Grid.Column="1" Width="auto" Name="textBoxDescription" Margin="2" MinLines="2" TextWrapping="Wrap" AcceptsReturn="True" MaxLength="100" />
</Grid>
</enictrl:EditWindowBase>

View File

@ -0,0 +1,29 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using ENI2.Controls;
namespace ENI2.EditControls
{
/// <summary>
/// Interaction logic for EditCallPurposeDialog.xaml
/// </summary>
public partial class EditCallPurposeDialog : EditWindowBase
{
public EditCallPurposeDialog()
{
InitializeComponent();
}
}
}

View File

@ -5,13 +5,14 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:ENI2"
mc:Ignorable="d"
Title="ENI 2" Height="350" Width="525" Icon="Resources/logo_schwarz.ico" Loaded="Window_Loaded" Closing="Window_Closing" SourceInitialized="Window_SourceInitialized">
Title="ENI 2" Height="350" Width="525" Icon="Resources/logo_schwarz.ico" Loaded="Window_Loaded" Closing="Window_Closing"
SourceInitialized="Window_SourceInitialized">
<DockPanel>
<Grid DockPanel.Dock="Top" Height="80" Background="#FFE8F6FF">
<Image x:Name="logoImage" HorizontalAlignment="Left" Height="80" Width="80" Source="Resources/EUREPORT.png" Stretch="Fill" MouseUp="logoImage_MouseUp"/>
<Button x:Name="buttonAnmeldungen" Content="Anmeldungen" HorizontalAlignment="Left" Margin="101,25,0,0" VerticalAlignment="Top" Width="95" Height="23" Click="buttonAnmeldungen_Click" Background="Transparent" />
<Button x:Name="buttonVorgaenge" Content="Vorgänge" HorizontalAlignment="Left" Margin="201,25,0,0" VerticalAlignment="Top" Width="95" Height="23" Click="buttonVorgaenge_Click" Background="Transparent" />
<Button x:Name="buttonSuche" Content="Suche" HorizontalAlignment="Left" Margin="301,25,0,0" VerticalAlignment="Top" Width="95" Height="23" Click="buttonSuche_Click" Background="Transparent" />
<Button x:Name="buttonAnmeldungen" Content="Declarations" HorizontalAlignment="Left" Margin="101,25,0,0" VerticalAlignment="Top" Width="95" Height="23" Click="buttonAnmeldungen_Click" Background="Transparent" />
<Button x:Name="buttonVorgaenge" Content="Operations" HorizontalAlignment="Left" Margin="201,25,0,0" VerticalAlignment="Top" Width="95" Height="23" Click="buttonVorgaenge_Click" Background="Transparent" />
<Button x:Name="buttonSuche" Content="Search " HorizontalAlignment="Left" Margin="301,25,0,0" VerticalAlignment="Top" Width="95" Height="23" Click="buttonSuche_Click" Background="Transparent" />
</Grid>
<Grid DockPanel.Dock="Bottom" Height="20" Background="#FFE8F6FF">

View File

@ -180,6 +180,16 @@ namespace ENI2.Properties {
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap document_plain {
get {
object obj = ResourceManager.GetObject("document_plain", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
@ -230,6 +240,16 @@ namespace ENI2.Properties {
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap floppy_disk_blue {
get {
object obj = ResourceManager.GetObject("floppy_disk_blue", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
@ -270,6 +290,16 @@ namespace ENI2.Properties {
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap printer {
get {
object obj = ResourceManager.GetObject("printer", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>

View File

@ -190,4 +190,13 @@
<data name="edit" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\edit.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="document_plain" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\document_plain.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="floppy_disk_blue" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\floppy_disk_blue.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="printer" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\printer.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</root>

Binary file not shown.

After

Width:  |  Height:  |  Size: 674 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

@ -30,11 +30,11 @@
</Grid.RowDefinitions>
<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="2" Content="Schiffsname"/>
<Label Grid.Column="2" Grid.Row="0" Content="Anlaufhafen"/>
<Label Grid.Column="0" Grid.Row="1" Content="IMO / ENI No."/>
<Label Grid.Column="0" Grid.Row="2" Content="Shipname"/>
<Label Grid.Column="2" Grid.Row="0" Content="Port of call"/>
<Label Grid.Column="2" Grid.Row="1" Content="ETA"/>
<Label Grid.Column="2" Grid.Row="2" Content="Ticket-Nr."/>
<Label Grid.Column="2" Grid.Row="2" Content="Ticket-No."/>
<TextBox Grid.Column="1" Grid.Row="0" Name="textBoxId" VerticalContentAlignment="Center" Margin="2"/>
<TextBox Grid.Column="1" Grid.Row="1" Name="textBoxIMO" VerticalContentAlignment="Center" Margin="2" MaxLength="7"/>
<TextBox Grid.Column="1" Grid.Row="2" Name="textBoxName" VerticalContentAlignment="Center" Margin="2"/>
@ -46,15 +46,15 @@
<ColumnDefinition Width="1*" />
<ColumnDefinition Width="3*" />
</Grid.ColumnDefinitions>
<Label Grid.Column="0" Grid.Row="0" Content="Von:" HorizontalAlignment="Left" />
<Label Grid.Column="0" Grid.Row="0" Content="From:" HorizontalAlignment="Left" />
<xctk:DateTimePicker Grid.Column="1" Grid.Row="0" Name="dateTimePickerETAFrom" Format="Custom" FormatString="dd.MM.yyyy" ShowButtonSpinner="False" VerticalContentAlignment="Center" AutoCloseCalendar="True" ValueChanged="etaValueChanged" AllowTextInput="False" TimePickerVisibility="Collapsed"/>
<Label Grid.Column="2" Grid.Row="0" Content="Bis:" HorizontalAlignment="Left" />
<Label Grid.Column="2" Grid.Row="0" Content="To:" HorizontalAlignment="Left" />
<xctk:DateTimePicker Grid.Column="3" Grid.Row="0" Name="dateTimePickerETATo" Format="Custom" FormatString="dd.MM.yyyy" ShowButtonSpinner="False" VerticalContentAlignment="Center" AutoCloseCalendar="True" ValueChanged="etaValueChanged" AllowTextInput="False" TimePickerVisibility="Collapsed"/>
</Grid>
<TextBox Grid.Column="3" Grid.Row="2" Name="textBoxTicketNr" Margin="2"/>
<Button Grid.Column="0" Grid.Row="3" Grid.ColumnSpan="2" Content="Eingaben löschen" Name="buttonClearInput" Click="Button_Click" Margin="2"/>
<Button Grid.Column="2" Grid.Row="3" Grid.ColumnSpan="2" Content="Suche" Name="buttonSuche" Click="buttonSuche_Click" 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"/>
<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"
@ -67,7 +67,7 @@
<DataGridTextColumn Header="Hafen" Binding="{Binding Portname}" IsReadOnly="True" />
<DataGridTextColumn Header="Id" Binding="{Binding DisplayId}" IsReadOnly="True" />
<DataGridTextColumn Header="Status" Binding="{Binding BSMDStatusInternal}" IsReadOnly="True" />
<DataGridTextColumn Header="Bearbeiter" Binding="{Binding EditedBy}" IsReadOnly="True" />
<DataGridTextColumn Header="Edited by" Binding="{Binding EditedBy}" IsReadOnly="True" />
</DataGrid.Columns>
</DataGrid>

View File

@ -43,7 +43,7 @@ namespace ENI2
private void Button_Click(object sender, RoutedEventArgs e)
{
// Eingabefelder löschen
// Eingabefelder und Ergebnis löschen
textBoxHafen.Text = string.Empty;
textBoxId.Text = string.Empty;
textBoxIMO.Text = string.Empty;
@ -51,6 +51,7 @@ namespace ENI2
textBoxTicketNr.Text = string.Empty;
dateTimePickerETAFrom.Text = string.Empty;
dateTimePickerETATo.Text = string.Empty;
this.dataGrid.ItemsSource = null;
}
private void buttonSuche_Click(object sender, RoutedEventArgs e)

View File

@ -17,4 +17,30 @@
</Setter.Value>
</Setter>
</Style>
<Style TargetType="{x:Type enictrl:EditWindowBase}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type enictrl:EditWindowBase}">
<!--Border Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}">
/-->
<Grid Background="{TemplateBinding Background}" Margin="2">
<Grid.RowDefinitions>
<RowDefinition Height="auto"/>
<RowDefinition Height="30" />
</Grid.RowDefinitions>
<!-- This ContentPresenter automatically binds to the Content of the Window -->
<ContentPresenter />
<StackPanel Grid.Row="1" Orientation="Horizontal" Margin="5" HorizontalAlignment="Right">
<Button Width="80" Content="OK" IsDefault="True" Name="buttonOK" Margin="0,0,10,0" />
<Button Width="80" Content="Cancel" IsCancel="True" Name="buttonCancel" />
</StackPanel>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ResourceDictionary>

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -274,7 +274,7 @@ namespace bsmd.database
}
case Message.LoadFilter.BSMDSTATUS:
{
sb.Append("WHERE BSMDStatus = @STATUS ORDER BY ETA");
sb.Append("WHERE BSMDStatus = @STATUS ORDER BY ETA DESC");
((SqlCommand)cmd).Parameters.AddWithValue("@STATUS", criteria[0]);
break;
}
@ -397,12 +397,12 @@ namespace bsmd.database
if (!moreThanOne) moreThanOne = true;
}
}
sb.Append(" ORDER BY ETA");
sb.Append(" ORDER BY ETA DESC");
break;
}
case Message.LoadFilter.ALL:
default:
sb.Append(" ORDER BY ETA");
sb.Append(" ORDER BY ETA DESC");
break;
}