Rename solution directory to Elwig

This commit is contained in:
2023-03-18 11:04:22 +01:00
parent 649578e8bf
commit 769d80eb81
48 changed files with 7 additions and 11 deletions

View File

@ -0,0 +1,30 @@
using Microsoft.EntityFrameworkCore;
using System.Collections.Generic;
using System.Linq;
using System.Windows;
using System.Windows.Controls;
using Elwig.Helpers;
using Elwig.Models;
namespace Elwig.Windows {
public partial class ContractListWindow : Window {
private readonly AppDbContext Context = new();
public ContractListWindow(Member member) {
InitializeComponent();
}
private void RefreshContractList() {
Context.Members.Load();
List<Contract> contracts = Context.Contracts.OrderBy(c => c.MgNr).ToList();
ContractList.ItemsSource = contracts;
if (contracts.Count == 1)
ContractList.SelectedIndex = 0;
}
private void ContractList_SelectionChanged(object sender, SelectionChangedEventArgs evt) {
RefreshContractList();
}
}
}