Compare commits
2 Commits
b40ddfbf2e
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
afbb4626a0 | ||
|
|
ee83aca490 |
@@ -67,7 +67,20 @@
|
|||||||
SelectionChanged="LstCustomerAdressSets_OnSelectionChanged"
|
SelectionChanged="LstCustomerAdressSets_OnSelectionChanged"
|
||||||
Background="AliceBlue"
|
Background="AliceBlue"
|
||||||
Margin="0,5,0,5"
|
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"
|
<Button Grid.Row="2" HorizontalAlignment="Stretch" x:Name="BtnCustomerAddressSetImport"
|
||||||
Click="BtnCustomerAddressSetImport_OnClick">
|
Click="BtnCustomerAddressSetImport_OnClick">
|
||||||
|
|||||||
@@ -887,4 +887,31 @@ public partial class MainWindow : Window
|
|||||||
MessageBox.Show(this, ex.StackTrace, "Fehler");
|
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");
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user