Compare commits
3 Commits
5172de332c
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
afbb4626a0 | ||
|
|
ee83aca490 | ||
|
|
b40ddfbf2e |
@@ -67,7 +67,20 @@
|
||||
SelectionChanged="LstCustomerAdressSets_OnSelectionChanged"
|
||||
Background="AliceBlue"
|
||||
Margin="0,5,0,5"
|
||||
SelectionMode="Multiple,Toggle" />
|
||||
SelectionMode="Multiple,Toggle">
|
||||
<ListBox.ContextMenu>
|
||||
<ContextMenu>
|
||||
<MenuItem x:Name="MnIAdSetRename" Click="MnIAdSetRename_OnClick">
|
||||
<MenuItem.Header>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<LucideIcon Kind="Pencil" Width="12" Height="12" Size="12" />
|
||||
<Label Content="Umbenennen" VerticalContentAlignment="Center" />
|
||||
</StackPanel>
|
||||
</MenuItem.Header>
|
||||
</MenuItem>
|
||||
</ContextMenu>
|
||||
</ListBox.ContextMenu>
|
||||
</ListBox>
|
||||
|
||||
<Button Grid.Row="2" HorizontalAlignment="Stretch" x:Name="BtnCustomerAddressSetImport"
|
||||
Click="BtnCustomerAddressSetImport_OnClick">
|
||||
|
||||
@@ -887,4 +887,31 @@ public partial class MainWindow : Window
|
||||
MessageBox.Show(this, ex.StackTrace, "Fehler");
|
||||
}
|
||||
}
|
||||
|
||||
private async void MnIAdSetRename_OnClick(object? sender, RoutedEventArgs e)
|
||||
{
|
||||
if (LstCustomerAdressSets.SelectedItems.Count > 0)
|
||||
try
|
||||
{
|
||||
var result = await NamingWindow.Show(this);
|
||||
if (result != null)
|
||||
{
|
||||
var id = KasAddressList.GetIDByAddressSetListItem(LstCustomerAdressSets.SelectedItems[0]
|
||||
.ToString());
|
||||
var cus_id = Customer.GetIDByCustomerListItem(LstCustomers.SelectedItems[0].ToString());
|
||||
foreach (var set in Settings._instance.addressSets.addresses)
|
||||
if (set.ID == id)
|
||||
{
|
||||
set.Name = result;
|
||||
Settings.Save();
|
||||
RefreshAddressSetListItems(cus_id);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MessageBox.Show(this, ex.StackTrace, "Fehler");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2,7 +2,7 @@
|
||||
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"
|
||||
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
||||
mc:Ignorable="d" SizeToContent="WidthAndHeight"
|
||||
x:Class="Logof_Client.NamingWindow"
|
||||
Title="NamingWindow">
|
||||
<StackPanel Orientation="Vertical">
|
||||
|
||||
Reference in New Issue
Block a user