Korrekturen für 7.7

This commit is contained in:
Daniel Schick 2022-12-13 08:39:17 +01:00
parent d63cb8034d
commit 894aadc2d9
9 changed files with 36 additions and 24 deletions

View File

@ -20,6 +20,7 @@
<DataGridTextColumn Header="{x:Static p:Resources.textLogin}" Binding="{Binding Logon}" IsReadOnly="True" Width="0.1*" /> <DataGridTextColumn Header="{x:Static p:Resources.textLogin}" Binding="{Binding Logon}" IsReadOnly="True" Width="0.1*" />
<DataGridTextColumn Header="{x:Static p:Resources.textEMail}" Binding="{Binding UserEMail}" IsReadOnly="True" Width="0.2*" /> <DataGridTextColumn Header="{x:Static p:Resources.textEMail}" Binding="{Binding UserEMail}" IsReadOnly="True" Width="0.2*" />
<DataGridCheckBoxColumn Header="{x:Static p:Resources.textAdministrator}" Binding="{Binding IsAdmin}" IsReadOnly="True" Width="0.1*" /> <DataGridCheckBoxColumn Header="{x:Static p:Resources.textAdministrator}" Binding="{Binding IsAdmin}" IsReadOnly="True" Width="0.1*" />
<DataGridCheckBoxColumn Header="{x:Static p:Resources.textEditor}" Binding="{Binding IsEditor}" IsReadOnly="True" Width="0.1*" />
<DataGridTextColumn Header="{x:Static p:Resources.textCreated}" Binding="{Binding Created}" IsReadOnly="True" Width="0.1*" /> <DataGridTextColumn Header="{x:Static p:Resources.textCreated}" Binding="{Binding Created}" IsReadOnly="True" Width="0.1*" />
<DataGridTextColumn Header="{x:Static p:Resources.textChanged}" Binding="{Binding Changed}" IsReadOnly="True" Width="0.1*" /> <DataGridTextColumn Header="{x:Static p:Resources.textChanged}" Binding="{Binding Changed}" IsReadOnly="True" Width="0.1*" />
</DataGrid.Columns> </DataGrid.Columns>

View File

@ -59,7 +59,7 @@ namespace ENI2.Controls
DBManager.GetSingleCon(Properties.Settings.Default.ConnectionString).Save(selectedParty); DBManager.GetSingleCon(Properties.Settings.Default.ConnectionString).Save(selectedParty);
} }
} }
} }
} }
#region grid event handler #region grid event handler
@ -98,7 +98,7 @@ namespace ENI2.Controls
{ {
ReportingParty rp = new ReportingParty(); ReportingParty rp = new ReportingParty();
EditReportingPartyDialog ebd = new EditReportingPartyDialog(); EditReportingPartyDialog ebd = new EditReportingPartyDialog();
ebd.ReportingParty = rp; ebd.ReportingParty = rp;
if (ebd.ShowDialog() ?? false) if (ebd.ShowDialog() ?? false)
{ {

View File

@ -67,8 +67,9 @@ namespace ENI2.DetailViewControls
this.RegisterTextboxChange(this.textBox_AgentPostalCode, Message.NotificationClass.AGNT); this.RegisterTextboxChange(this.textBox_AgentPostalCode, Message.NotificationClass.AGNT);
this.RegisterTextboxChange(this.textBox_AgentStreetAndNumber, Message.NotificationClass.AGNT); this.RegisterTextboxChange(this.textBox_AgentStreetAndNumber, Message.NotificationClass.AGNT);
this.RegisterTextboxChange(this.textBox_AgentCountry, Message.NotificationClass.AGNT); this.RegisterTextboxChange(this.textBox_AgentCountry, Message.NotificationClass.AGNT);
this.buttonSaveTemplate.IsEnabled = DBManager.Instance.GetReportingPartyDict()[App.UserId.Value].IsEditor; this.buttonSaveTemplate.IsEnabled = DBManager.Instance.GetReportingPartyDict()[App.UserId.Value].IsEditor;
this.buttonDeleteTemplate.IsEnabled = DBManager.Instance.GetReportingPartyDict()[App.UserId.Value].IsEditor;
} }
public override void Initialize() public override void Initialize()
@ -110,7 +111,7 @@ namespace ENI2.DetailViewControls
this.dataGridCallPurposes.EditRequested += DataGridCallPurposes_EditRequested; this.dataGridCallPurposes.EditRequested += DataGridCallPurposes_EditRequested;
this.dataGridCallPurposes.AddingNewItem += DataGridCallPurposes_AddingNewItem; this.dataGridCallPurposes.AddingNewItem += DataGridCallPurposes_AddingNewItem;
this.dataGridCallPurposes.CreateRequested += DataGridCallPurposes_CreateRequested; this.dataGridCallPurposes.CreateRequested += DataGridCallPurposes_CreateRequested;
this.dataGridCallPurposes.DeleteRequested += DataGridCallPurposes_DeleteRequested; this.dataGridCallPurposes.DeleteRequested += DataGridCallPurposes_DeleteRequested;
this.agentGroupBox.DataContext = _agnt; this.agentGroupBox.DataContext = _agnt;
@ -140,8 +141,7 @@ namespace ENI2.DetailViewControls
private void DataGridCallPurposes_DeleteRequested(DatabaseEntity obj) private void DataGridCallPurposes_DeleteRequested(DatabaseEntity obj)
{ {
CallPurpose cp = obj as CallPurpose; if (obj is CallPurpose cp)
if (cp != null)
{ {
// are you sure dialog is in base class // are you sure dialog is in base class
_noa_nod.CallPurposes.Remove(cp); _noa_nod.CallPurposes.Remove(cp);
@ -153,7 +153,7 @@ namespace ENI2.DetailViewControls
} }
private void DataGridCallPurposes_CreateRequested() private void DataGridCallPurposes_CreateRequested()
{ {
EditCallPurposeDialog ecpd = new EditCallPurposeDialog(); EditCallPurposeDialog ecpd = new EditCallPurposeDialog();
ecpd.AddClicked += () => ecpd.AddClicked += () =>
{ {
@ -258,16 +258,15 @@ namespace ENI2.DetailViewControls
private void comboBox_AgentTemplate_SelectionChanged(object sender, SelectionChangedEventArgs e) private void comboBox_AgentTemplate_SelectionChanged(object sender, SelectionChangedEventArgs e)
{ {
Trace.WriteLine("combo selection changed"); Trace.WriteLine("combo selection changed");
AGNT_Template at = this.comboBox_AgentTemplate.SelectedItem as AGNT_Template; if (this.comboBox_AgentTemplate.SelectedItem is AGNT_Template at)
if(at != null)
{ {
this.textBoxTemplateTitle.Text = at.AgentTitle; this.textBoxTemplateTitle.Text = at.AgentTitle;
this.buttonDeleteTemplate.IsEnabled = true; this.buttonDeleteTemplate.IsEnabled = true;
this.buttonSetTemplate.IsEnabled = true; this.buttonSetTemplate.IsEnabled = true;
this._currentTemplate = at; this._currentTemplate = at;
} }
} }
private void buttonDeleteTemplate_Click(object sender, RoutedEventArgs e) private void buttonDeleteTemplate_Click(object sender, RoutedEventArgs e)
{ {

View File

@ -36,7 +36,7 @@
<MinimumRequiredVersion>5.4.0.0</MinimumRequiredVersion> <MinimumRequiredVersion>5.4.0.0</MinimumRequiredVersion>
<CreateWebPageOnPublish>true</CreateWebPageOnPublish> <CreateWebPageOnPublish>true</CreateWebPageOnPublish>
<WebPage>publish.html</WebPage> <WebPage>publish.html</WebPage>
<ApplicationRevision>1</ApplicationRevision> <ApplicationRevision>3</ApplicationRevision>
<ApplicationVersion>7.7.0.%2a</ApplicationVersion> <ApplicationVersion>7.7.0.%2a</ApplicationVersion>
<UseApplicationTrust>false</UseApplicationTrust> <UseApplicationTrust>false</UseApplicationTrust>
<CreateDesktopShortcut>true</CreateDesktopShortcut> <CreateDesktopShortcut>true</CreateDesktopShortcut>
@ -84,7 +84,7 @@
</PropertyGroup> </PropertyGroup>
<PropertyGroup /> <PropertyGroup />
<PropertyGroup> <PropertyGroup>
<ManifestCertificateThumbprint>62DE8527C377957850DB503DA52FF66F664BD459</ManifestCertificateThumbprint> <ManifestCertificateThumbprint>F2C2D0164244EC89955EF50201EE24C2A300FF0B</ManifestCertificateThumbprint>
</PropertyGroup> </PropertyGroup>
<PropertyGroup> <PropertyGroup>
<SignManifests>true</SignManifests> <SignManifests>true</SignManifests>

View File

@ -19,7 +19,7 @@ Copyright (c) 2017 schick Informatik
<RowDefinition Height="28" /> <RowDefinition Height="28" />
<RowDefinition Height="28" /> <RowDefinition Height="28" />
<RowDefinition Height="28" /> <RowDefinition Height="28" />
<RowDefinition Height="28" /> <RowDefinition Height="*" />
</Grid.RowDefinitions> </Grid.RowDefinitions>
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="1*" /> <ColumnDefinition Width="1*" />
@ -45,15 +45,20 @@ Copyright (c) 2017 schick Informatik
<xctk:IntegerUpDown Grid.Row="2" Grid.Column="1" Name="integerUpDownNumberOfItems" ShowButtonSpinner="False" ParsingNumberStyle="Any" Margin="2,2,2,2" TextAlignment="Left"/> <xctk:IntegerUpDown Grid.Row="2" Grid.Column="1" Name="integerUpDownNumberOfItems" ShowButtonSpinner="False" ParsingNumberStyle="Any" Margin="2,2,2,2" TextAlignment="Left"/>
<xctk:DoubleUpDown Grid.Row="3" Grid.Column="1" Name="doubleUpDownGrossQuantity" ShowButtonSpinner="False" ParsingNumberStyle="Any" Margin="2,2,2,2" FormatString="N3" TextAlignment="Left"/> <xctk:DoubleUpDown Grid.Row="3" Grid.Column="1" Name="doubleUpDownGrossQuantity" ShowButtonSpinner="False" ParsingNumberStyle="Any" Margin="2,2,2,2" FormatString="N3" TextAlignment="Left"/>
<enictrl:LocodeControl Grid.Column="1" Grid.Row="4" Width="Auto" x:Name="locodeControl_PortOfLoading" /> <enictrl:LocodeControl Grid.Column="1" Grid.Row="4" Width="Auto" x:Name="locodeControl_PortOfLoading" />
<enictrl:LocodeControl Grid.Column="1" Grid.Row="5" Width="Auto" x:Name="locodeControl_PortOfDischarge" /> <enictrl:LocodeControl Grid.Column="1" Grid.Row="5" Width="Auto" x:Name="locodeControl_PortOfDischarge" Height="28" VerticalAlignment="Top"/>
<TextBox Grid.Row="3" Grid.Column="3" Margin="2" Name="textBoxSearchNSTList" TextChanged="textBoxSearchNSTList_TextChanged" VerticalContentAlignment="Center" /> <TextBox Grid.Row="3" Grid.Column="3" Margin="2" Name="textBoxSearchNSTList" TextChanged="textBoxSearchNSTList_TextChanged" VerticalContentAlignment="Center" />
<Grid Grid.Row="4" Grid.Column="3"> <Grid Grid.Row="4" Grid.Column="3" Grid.RowSpan="2">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="*" /> <ColumnDefinition Width="*" />
<ColumnDefinition Width="28" /> <ColumnDefinition Width="28" />
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<ComboBox Name="comboBoxSelectNST2007ListItem" Margin="2" DisplayMemberPath="Key" /> <Grid.RowDefinitions>
<RowDefinition Height="28" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<ListBox Name="listBoxNST2007" Margin="2" Grid.RowSpan="2" DisplayMemberPath="Key" MouseDoubleClick="listBoxNST2007_MouseDoubleClick" />
<!--ComboBox Name="comboBoxSelectNST2007ListItem" Margin="2" DisplayMemberPath="Key" Grid.RowSpan="2" /-->
<Button Name="buttonSetTemplate" Margin="2" Click="buttonSetTemplate_Click" BorderThickness="0" Background="Transparent" ToolTip="Apply template" HorizontalContentAlignment="Right" Grid.Column="1"> <Button Name="buttonSetTemplate" Margin="2" Click="buttonSetTemplate_Click" BorderThickness="0" Background="Transparent" ToolTip="Apply template" HorizontalContentAlignment="Right" Grid.Column="1">
<StackPanel Orientation="Horizontal"> <StackPanel Orientation="Horizontal">
<Image Source="../Resources/check.png" Margin="0,0,0,0" Height="20" Width="20" /> <Image Source="../Resources/check.png" Margin="0,0,0,0" Height="20" Width="20" />

View File

@ -123,20 +123,22 @@ namespace ENI2.EditControls
{ {
if (textBoxSearchNSTList.Text.IsNullOrEmpty() || (textBoxSearchNSTList.Text.Length == 1)) if (textBoxSearchNSTList.Text.IsNullOrEmpty() || (textBoxSearchNSTList.Text.Length == 1))
{ {
this.comboBoxSelectNST2007ListItem.ItemsSource = null; this.listBoxNST2007.ItemsSource = null;
// this.comboBoxSelectNST2007ListItem.ItemsSource = null;
} }
else else
{ {
var result = _nstList.Where(kvp => kvp.Key.Contains(textBoxSearchNSTList.Text, StringComparison.OrdinalIgnoreCase)); var result = _nstList.Where(kvp => kvp.Key.Contains(textBoxSearchNSTList.Text, StringComparison.OrdinalIgnoreCase));
this.comboBoxSelectNST2007ListItem.ItemsSource = result; this.listBoxNST2007.ItemsSource = result;
//this.comboBoxSelectNST2007ListItem.ItemsSource = result;
} }
} }
private void buttonSetTemplate_Click(object sender, RoutedEventArgs e) private void buttonSetTemplate_Click(object sender, RoutedEventArgs e)
{ {
if(this.comboBoxSelectNST2007ListItem.SelectedItem != null) if(this.listBoxNST2007.SelectedItem != null)
{ {
KeyValuePair<string, string> selectedTemplate = (KeyValuePair<string, string>) this.comboBoxSelectNST2007ListItem.SelectedItem; KeyValuePair<string, string> selectedTemplate = (KeyValuePair<string, string>) this.listBoxNST2007.SelectedItem;
if(selectedTemplate.Value.Length == 3) if(selectedTemplate.Value.Length == 3)
{ {
this.comboBoxNSTCode.SelectedValue = selectedTemplate.Value.Substring(0, 2); this.comboBoxNSTCode.SelectedValue = selectedTemplate.Value.Substring(0, 2);
@ -145,6 +147,11 @@ namespace ENI2.EditControls
} }
} }
private void listBoxNST2007_MouseDoubleClick(object sender, System.Windows.Input.MouseButtonEventArgs e)
{
this.buttonSetTemplate_Click(null, null);
}
#endregion #endregion
} }

View File

@ -265,7 +265,7 @@ namespace ENI2
Dictionary<Guid, ReportingParty> repPartyDict = DBManager.Instance.GetReportingPartyDict(); Dictionary<Guid, ReportingParty> repPartyDict = DBManager.Instance.GetReportingPartyDict();
this.rpControl.ReportingParties = new ObservableCollection<ReportingParty>(repPartyDict.Values); this.rpControl.ReportingParties = new ObservableCollection<ReportingParty>(repPartyDict.Values);
} }
this.rootContainer.Children.Add(this.rpControl); this.rootContainer.Children.Add(this.rpControl);
} }
else if(sender == this.buttonPOListe) else if(sender == this.buttonPOListe)
{ {

View File

@ -24,7 +24,7 @@ namespace bsmd.database
#region Properties #region Properties
[ShowReport] [ShowReport]
[Validation(ValidationCode.NOT_NULL)] // [Validation(ValidationCode.NOT_NULL)] // damit sieht die Validierung "sauberer" aus (v7.7, Dez. 2022)
[LookupName("ATA.ATAPortOfCall")] [LookupName("ATA.ATAPortOfCall")]
[ENI2Validation] [ENI2Validation]
public DateTime? ATAPortOfCall { get; set; } public DateTime? ATAPortOfCall { get; set; }

View File

@ -24,7 +24,7 @@ namespace bsmd.database
#region Properties #region Properties
[ShowReport] [ShowReport]
[Validation(ValidationCode.NOT_NULL)] // [Validation(ValidationCode.NOT_NULL)] // damit sieht die Validierung "sauberer" aus (v7.7, Dez. 2022)
[LookupName("ATD.ATDPortOfCall")] [LookupName("ATD.ATDPortOfCall")]
[ENI2Validation] [ENI2Validation]
public DateTime? ATDPortOfCall { get; set; } public DateTime? ATDPortOfCall { get; set; }