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.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.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.textChanged}" Binding="{Binding Changed}" IsReadOnly="True" Width="0.1*" />
</DataGrid.Columns>

View File

@ -59,7 +59,7 @@ namespace ENI2.Controls
DBManager.GetSingleCon(Properties.Settings.Default.ConnectionString).Save(selectedParty);
}
}
}
}
}
#region grid event handler
@ -98,7 +98,7 @@ namespace ENI2.Controls
{
ReportingParty rp = new ReportingParty();
EditReportingPartyDialog ebd = new EditReportingPartyDialog();
ebd.ReportingParty = rp;
ebd.ReportingParty = rp;
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_AgentStreetAndNumber, Message.NotificationClass.AGNT);
this.RegisterTextboxChange(this.textBox_AgentCountry, Message.NotificationClass.AGNT);
this.buttonSaveTemplate.IsEnabled = DBManager.Instance.GetReportingPartyDict()[App.UserId.Value].IsEditor;
this.buttonDeleteTemplate.IsEnabled = DBManager.Instance.GetReportingPartyDict()[App.UserId.Value].IsEditor;
}
public override void Initialize()
@ -110,7 +111,7 @@ namespace ENI2.DetailViewControls
this.dataGridCallPurposes.EditRequested += DataGridCallPurposes_EditRequested;
this.dataGridCallPurposes.AddingNewItem += DataGridCallPurposes_AddingNewItem;
this.dataGridCallPurposes.CreateRequested += DataGridCallPurposes_CreateRequested;
this.dataGridCallPurposes.DeleteRequested += DataGridCallPurposes_DeleteRequested;
this.dataGridCallPurposes.DeleteRequested += DataGridCallPurposes_DeleteRequested;
this.agentGroupBox.DataContext = _agnt;
@ -140,8 +141,7 @@ namespace ENI2.DetailViewControls
private void DataGridCallPurposes_DeleteRequested(DatabaseEntity obj)
{
CallPurpose cp = obj as CallPurpose;
if (cp != null)
if (obj is CallPurpose cp)
{
// are you sure dialog is in base class
_noa_nod.CallPurposes.Remove(cp);
@ -153,7 +153,7 @@ namespace ENI2.DetailViewControls
}
private void DataGridCallPurposes_CreateRequested()
{
{
EditCallPurposeDialog ecpd = new EditCallPurposeDialog();
ecpd.AddClicked += () =>
{
@ -258,16 +258,15 @@ namespace ENI2.DetailViewControls
private void comboBox_AgentTemplate_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
Trace.WriteLine("combo selection changed");
AGNT_Template at = this.comboBox_AgentTemplate.SelectedItem as AGNT_Template;
if(at != null)
if (this.comboBox_AgentTemplate.SelectedItem is AGNT_Template at)
{
this.textBoxTemplateTitle.Text = at.AgentTitle;
this.buttonDeleteTemplate.IsEnabled = true;
this.buttonDeleteTemplate.IsEnabled = true;
this.buttonSetTemplate.IsEnabled = true;
this._currentTemplate = at;
}
}
}
private void buttonDeleteTemplate_Click(object sender, RoutedEventArgs e)
{

View File

@ -36,7 +36,7 @@
<MinimumRequiredVersion>5.4.0.0</MinimumRequiredVersion>
<CreateWebPageOnPublish>true</CreateWebPageOnPublish>
<WebPage>publish.html</WebPage>
<ApplicationRevision>1</ApplicationRevision>
<ApplicationRevision>3</ApplicationRevision>
<ApplicationVersion>7.7.0.%2a</ApplicationVersion>
<UseApplicationTrust>false</UseApplicationTrust>
<CreateDesktopShortcut>true</CreateDesktopShortcut>
@ -84,7 +84,7 @@
</PropertyGroup>
<PropertyGroup />
<PropertyGroup>
<ManifestCertificateThumbprint>62DE8527C377957850DB503DA52FF66F664BD459</ManifestCertificateThumbprint>
<ManifestCertificateThumbprint>F2C2D0164244EC89955EF50201EE24C2A300FF0B</ManifestCertificateThumbprint>
</PropertyGroup>
<PropertyGroup>
<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="*" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<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: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="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" />
<Grid Grid.Row="4" Grid.Column="3">
<Grid Grid.Row="4" Grid.Column="3" Grid.RowSpan="2">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="28" />
</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">
<StackPanel Orientation="Horizontal">
<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))
{
this.comboBoxSelectNST2007ListItem.ItemsSource = null;
this.listBoxNST2007.ItemsSource = null;
// this.comboBoxSelectNST2007ListItem.ItemsSource = null;
}
else
{
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)
{
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)
{
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
}

View File

@ -265,7 +265,7 @@ namespace ENI2
Dictionary<Guid, ReportingParty> repPartyDict = DBManager.Instance.GetReportingPartyDict();
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)
{

View File

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

View File

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