[#10] MemberAdminWindow: Implement MVVM
This commit is contained in:
@ -25,6 +25,7 @@
|
|||||||
</Target>
|
</Target>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.2.2" />
|
||||||
<PackageReference Include="LinqKit" Version="1.3.0" />
|
<PackageReference Include="LinqKit" Version="1.3.0" />
|
||||||
<PackageReference Include="MailKit" Version="4.7.1.1" />
|
<PackageReference Include="MailKit" Version="4.7.1.1" />
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Razor.Language" Version="6.0.32" />
|
<PackageReference Include="Microsoft.AspNetCore.Razor.Language" Version="6.0.32" />
|
||||||
|
@ -171,15 +171,19 @@ namespace Elwig.Helpers {
|
|||||||
return item;
|
return item;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static object? GetItemFromSource(IEnumerable source, object? item) {
|
public static T? GetItemFromSource<T>(IEnumerable source, T? item) {
|
||||||
return GetItemFromSource(source, Utils.GetEntityIdentifier(item));
|
return (T?)GetItemFromSource(source, Utils.GetEntityIdentifier(item));
|
||||||
|
}
|
||||||
|
|
||||||
|
public static object? GetItemFromSourceWithPk(IEnumerable source, params object?[] primaryKey) {
|
||||||
|
return GetItemFromSource(source, (int?)Utils.GetEntityIdetifierForPk(primaryKey));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void SelectItemWithHash(Selector input, int? hash) {
|
public static void SelectItemWithHash(Selector input, int? hash) {
|
||||||
if (hash == null) {
|
if (hash == null) {
|
||||||
input.SelectedItem = null;
|
input.SelectedItem = null;
|
||||||
} else {
|
} else {
|
||||||
input.SelectedItem = GetItemFromSource(input.ItemsSource, (int)hash);
|
input.SelectedItem = GetItemFromSource(input.ItemsSource, hash);
|
||||||
}
|
}
|
||||||
if (input is ListBox lb && lb.SelectedItem is object lbItem) {
|
if (input is ListBox lb && lb.SelectedItem is object lbItem) {
|
||||||
lb.ScrollIntoView(lbItem);
|
lb.ScrollIntoView(lbItem);
|
||||||
|
@ -537,6 +537,11 @@ namespace Elwig.Helpers {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static int GetEntityIdetifierForPk(params object?[] primaryKey) {
|
||||||
|
var pk = primaryKey.Select(k => k?.GetHashCode() ?? 0).ToArray();
|
||||||
|
return ((IStructuralEquatable)pk).GetHashCode(EqualityComparer<int>.Default);
|
||||||
|
}
|
||||||
|
|
||||||
public static int? GetEntityIdentifier(object? obj) {
|
public static int? GetEntityIdentifier(object? obj) {
|
||||||
if (obj == null) {
|
if (obj == null) {
|
||||||
return null;
|
return null;
|
||||||
|
503
Elwig/Services/MemberService.cs
Normal file
503
Elwig/Services/MemberService.cs
Normal file
@ -0,0 +1,503 @@
|
|||||||
|
using Elwig.Helpers;
|
||||||
|
using Elwig.Models.Entities;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System;
|
||||||
|
using Microsoft.EntityFrameworkCore;
|
||||||
|
using Elwig.Documents;
|
||||||
|
using System.Windows.Input;
|
||||||
|
using System.Windows;
|
||||||
|
using Elwig.Helpers.Billing;
|
||||||
|
using Elwig.Models.Dtos;
|
||||||
|
using Elwig.Helpers.Export;
|
||||||
|
using Microsoft.Win32;
|
||||||
|
using Elwig.ViewModels;
|
||||||
|
|
||||||
|
namespace Elwig.Services {
|
||||||
|
public static class MemberService {
|
||||||
|
|
||||||
|
public static async Task InitInputs(this MemberAdminViewModel vm) {
|
||||||
|
using var ctx = new AppDbContext();
|
||||||
|
vm.MgNrString = $"{await ctx.NextMgNr()}";
|
||||||
|
vm.EntryDate = DateTime.Now.ToString("dd.MM.yyyy");
|
||||||
|
if (vm.BranchSource.Count() == 1)
|
||||||
|
vm.Branch = vm.BranchSource.First();
|
||||||
|
vm.IsActive = true;
|
||||||
|
vm.ContactViaPost = true;
|
||||||
|
vm.EnableMemberReferenceButton = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void ClearInputs(this MemberAdminViewModel vm) {
|
||||||
|
vm.IsMemberSelected = false;
|
||||||
|
vm.MemberHasEmail = false;
|
||||||
|
vm.MemberCanSendEmail = false;
|
||||||
|
vm.EnableMemberReferenceButton = false;
|
||||||
|
vm.StatusDeliveriesLastSeason = "-";
|
||||||
|
vm.StatusDeliveriesLastSeasonInfo = $"{Utils.CurrentLastSeason - 1}";
|
||||||
|
vm.StatusDeliveriesLastSeasonToolTip = null;
|
||||||
|
vm.StatusDeliveriesThisSeason = "-";
|
||||||
|
vm.StatusDeliveriesThisSeasonInfo = $"{Utils.CurrentLastSeason}";
|
||||||
|
vm.StatusDeliveriesThisSeasonToolTip = null;
|
||||||
|
vm.StatusAreaCommitment = "-";
|
||||||
|
vm.Age = "-";
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void FillInputs(this MemberAdminViewModel vm, Member m) {
|
||||||
|
vm.IsMemberSelected = true;
|
||||||
|
vm.MgNrString = $"{m.MgNr}";
|
||||||
|
vm.PredecessorMgNrString = $"{m.PredecessorMgNr}";
|
||||||
|
vm.EnableMemberReferenceButton = m.PredecessorMgNr != null;
|
||||||
|
vm.Prefix = m.Prefix;
|
||||||
|
vm.GivenName = m.GivenName;
|
||||||
|
vm.FamilyName = m.FamilyName;
|
||||||
|
vm.Suffix = m.Suffix;
|
||||||
|
vm.Birthday = (m.Birthday != null) ? string.Join(".", m.Birthday.Split("-").Reverse()) : null;
|
||||||
|
if (m.Birthday?.Length == 10) {
|
||||||
|
vm.Age = Utils.GetAge(DateOnly.ParseExact(m.Birthday, "yyyy-MM-dd")).ToString();
|
||||||
|
} else if (m.Birthday != null) {
|
||||||
|
vm.Age = "ca. " + (DateTime.Now.Year - int.Parse(m.Birthday[^4..])).ToString();
|
||||||
|
} else {
|
||||||
|
vm.Age = "-";
|
||||||
|
}
|
||||||
|
vm.IsDeceased = m.IsDeceased;
|
||||||
|
vm.Address = m.Address;
|
||||||
|
if (m.PostalDest.AtPlz is AT_PlzDest p) {
|
||||||
|
vm.PlzString = $"{p.Plz}";
|
||||||
|
vm.Ort = ControlUtils.GetItemFromSource(vm.OrtSource, p);
|
||||||
|
} else {
|
||||||
|
vm.PlzString = null;
|
||||||
|
vm.Ort = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
var emailAddrs = m.EmailAddresses.OrderBy(a => a.Nr).ToList();
|
||||||
|
for (int i = 0; i < vm.EmailAddresses.Count; i++) {
|
||||||
|
if (i < emailAddrs.Count) {
|
||||||
|
var emailAddr = emailAddrs[i];
|
||||||
|
vm.EmailAddresses[i] = emailAddr.Address;
|
||||||
|
} else {
|
||||||
|
vm.EmailAddresses[i] = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
var phoneNrs = m.TelephoneNumbers.OrderBy(p => p.Nr).ToList();
|
||||||
|
for (int i = 0; i < vm.PhoneNrs.Count; i++) {
|
||||||
|
if (i < phoneNrs.Count) {
|
||||||
|
var phoneNr = phoneNrs[i];
|
||||||
|
var idx = vm.PhoneNrTypes.Select((e, i) => (e, i)).FirstOrDefault(kv => kv.e.Key == phoneNr.Type).i;
|
||||||
|
vm.PhoneNrs[i] = new(idx, phoneNr.Number, phoneNr.Comment);
|
||||||
|
} else {
|
||||||
|
vm.PhoneNrs[i] = new();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
vm.Iban = m.Iban;
|
||||||
|
vm.Bic = m.Bic;
|
||||||
|
|
||||||
|
vm.UstIdNr = m.UstIdNr;
|
||||||
|
vm.LfbisNr = m.LfbisNr;
|
||||||
|
vm.IsBuchführend = m.IsBuchführend;
|
||||||
|
vm.IsOrganic = m.IsOrganic;
|
||||||
|
|
||||||
|
var billingAddr = m.BillingAddress;
|
||||||
|
if (billingAddr != null) {
|
||||||
|
vm.BillingName = billingAddr.Name;
|
||||||
|
vm.BillingAddress = billingAddr.Address;
|
||||||
|
if (billingAddr.PostalDest.AtPlz is AT_PlzDest b) {
|
||||||
|
vm.BillingPlzString = $"{b.Plz}";
|
||||||
|
vm.BillingOrt = ControlUtils.GetItemFromSource(vm.BillingOrtSource, b);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
vm.BillingName = null;
|
||||||
|
vm.BillingAddress = null;
|
||||||
|
vm.BillingPlzString = null;
|
||||||
|
vm.BillingOrt = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
vm.EntryDate = (m.EntryDateString != null) ? string.Join(".", m.EntryDateString.Split("-").Reverse()) : null;
|
||||||
|
vm.ExitDate = (m.ExitDateString != null) ? string.Join(".", m.ExitDateString.Split("-").Reverse()) : null;
|
||||||
|
vm.BusinessSharesString = $"{m.BusinessShares}";
|
||||||
|
vm.AccountingNr = m.AccountingNr;
|
||||||
|
vm.Branch = (Branch?)ControlUtils.GetItemFromSourceWithPk(vm.BranchSource, m.ZwstId);
|
||||||
|
vm.DefaultKg = (AT_Kg?)ControlUtils.GetItemFromSourceWithPk(vm.DefaultKgSource, m.DefaultKgNr);
|
||||||
|
vm.Comment = m.Comment;
|
||||||
|
vm.IsActive = m.IsActive;
|
||||||
|
vm.IsVollLieferant = m.IsVollLieferant;
|
||||||
|
vm.IsFunktionär = m.IsFunktionär;
|
||||||
|
vm.ContactViaPost = m.ContactViaPost;
|
||||||
|
vm.ContactViaEmail = m.ContactViaEmail;
|
||||||
|
|
||||||
|
Dictionary<int, int> deliveries;
|
||||||
|
using (var ctx = new AppDbContext()) {
|
||||||
|
var d1 = ctx.Deliveries.Where(d => d.Year == Utils.CurrentLastSeason && d.MgNr == m.MgNr);
|
||||||
|
var d2 = ctx.Deliveries.Where(d => d.Year == Utils.CurrentLastSeason - 1 && d.MgNr == m.MgNr);
|
||||||
|
vm.StatusDeliveriesLastSeason = $"Lieferungen ({Utils.CurrentLastSeason - 1}): {d2.Count():N0} ({d2.Sum(d => d.Parts.Count):N0}), {d2.SelectMany(d => d.Parts).Sum(p => p.Weight):N0} kg";
|
||||||
|
vm.StatusDeliveriesThisSeason = $"Lieferungen ({Utils.CurrentLastSeason}): {d1.Count():N0} ({d1.Sum(d => d.Parts.Count):N0}), {d1.SelectMany(d => d.Parts).Sum(p => p.Weight):N0} kg";
|
||||||
|
vm.StatusAreaCommitment = $"Gebundene Fläche: {m.ActiveAreaCommitments(ctx).Select(c => c.Area).Sum():N0} m²";
|
||||||
|
deliveries = ctx.Deliveries
|
||||||
|
.Where(d => d.MgNr == m.MgNr)
|
||||||
|
.SelectMany(d => d.Parts)
|
||||||
|
.GroupBy(d => d.Year)
|
||||||
|
.ToDictionary(g => g.Key, g => g.Sum(d => d.Weight));
|
||||||
|
}
|
||||||
|
|
||||||
|
vm.MemberHasEmail = m.EmailAddresses.Count > 0;
|
||||||
|
vm.MemberCanSendEmail = App.Config.Smtp != null && m.EmailAddresses.Count > 0;
|
||||||
|
vm.MemberHasDeliveries = Enumerable.Range(0, 9999).Select(i => deliveries.GetValueOrDefault(i, 0) > 0).ToList();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static async Task<(List<string>, IQueryable<Member>, List<string>)> GetFilters(this MemberAdminViewModel vm, AppDbContext ctx) {
|
||||||
|
List<string> filterNames = [];
|
||||||
|
IQueryable<Member> memberQuery = ctx.Members;
|
||||||
|
if (vm.ShowOnlyActiveMembers) {
|
||||||
|
memberQuery = memberQuery.Where(m => m.IsActive);
|
||||||
|
filterNames.Add("aktive Mitglieder");
|
||||||
|
}
|
||||||
|
|
||||||
|
var filterMgNr = new List<int>();
|
||||||
|
var filterZwst = new List<string>();
|
||||||
|
var filterKgNr = new List<int>();
|
||||||
|
var filterLfbisNr = new List<string>();
|
||||||
|
var filterUstIdNr = new List<string>();
|
||||||
|
var filterAreaCom = new List<string>();
|
||||||
|
|
||||||
|
var filter = vm.TextFilter;
|
||||||
|
if (filter.Count > 0) {
|
||||||
|
var branches = await ctx.Branches.ToListAsync();
|
||||||
|
var mgnr = await ctx.Members.ToDictionaryAsync(m => m.MgNr.ToString(), m => m);
|
||||||
|
var kgs = await ctx.WbKgs.ToDictionaryAsync(k => k.AtKg.Name.ToLower(), k => k.AtKg);
|
||||||
|
var areaComs = await ctx.AreaCommitmentTypes.ToDictionaryAsync(t => $"{t.SortId}{t.AttrId}", t => t);
|
||||||
|
|
||||||
|
for (int i = 0; i < filter.Count; i++) {
|
||||||
|
var e = filter[i];
|
||||||
|
|
||||||
|
if (e.Length >= 5 && e.Length <= 10 && "funktionär".StartsWith(e, StringComparison.CurrentCultureIgnoreCase)) {
|
||||||
|
memberQuery = memberQuery.Where(m => m.IsFunktionär);
|
||||||
|
filter.RemoveAt(i--);
|
||||||
|
filterNames.Add("Funktionäre");
|
||||||
|
} else if (e.Length >= 6 && e.Length <= 11 && e[0] == '!' && "funktionär".StartsWith(e[1..], StringComparison.CurrentCultureIgnoreCase)) {
|
||||||
|
memberQuery = memberQuery.Where(m => !m.IsFunktionär);
|
||||||
|
filter.RemoveAt(i--);
|
||||||
|
filterNames.Add("Nicht-Funktionäre");
|
||||||
|
} else if (e.Equals("bio", StringComparison.CurrentCultureIgnoreCase)) {
|
||||||
|
memberQuery = memberQuery.Where(m => m.IsOrganic);
|
||||||
|
filter.RemoveAt(i--);
|
||||||
|
filterNames.Add("Bio-Betriebe");
|
||||||
|
} else if (e.Equals("!bio", StringComparison.CurrentCultureIgnoreCase)) {
|
||||||
|
memberQuery = memberQuery.Where(m => !m.IsOrganic);
|
||||||
|
filter.RemoveAt(i--);
|
||||||
|
filterNames.Add("Nicht-Bio-Betriebe");
|
||||||
|
} else if (e.Length >= 4 && e.Length <= 13 && "volllieferant".StartsWith(e, StringComparison.CurrentCultureIgnoreCase)) {
|
||||||
|
memberQuery = memberQuery.Where(m => m.IsVollLieferant);
|
||||||
|
filter.RemoveAt(i--);
|
||||||
|
filterNames.Add("Volllieferanten");
|
||||||
|
} else if (e.Length >= 5 && e.Length <= 14 && e[0] == '!' && "volllieferant".StartsWith(e[1..], StringComparison.CurrentCultureIgnoreCase)) {
|
||||||
|
memberQuery = memberQuery.Where(m => !m.IsVollLieferant);
|
||||||
|
filter.RemoveAt(i--);
|
||||||
|
filterNames.Add("Nicht-Vollieferanten");
|
||||||
|
} else if (e.Length >= 5 && e.Length <= 11 && "buchführend".StartsWith(e, StringComparison.CurrentCultureIgnoreCase)) {
|
||||||
|
memberQuery = memberQuery.Where(m => m.IsBuchführend);
|
||||||
|
filter.RemoveAt(i--);
|
||||||
|
filterNames.Add("buchführend");
|
||||||
|
} else if (e.Length >= 6 && e.Length <= 12 && e[0] == '!' && "buchführend".StartsWith(e[1..], StringComparison.CurrentCultureIgnoreCase)) {
|
||||||
|
memberQuery = memberQuery.Where(m => !m.IsBuchführend);
|
||||||
|
filter.RemoveAt(i--);
|
||||||
|
filterNames.Add("pauschaliert");
|
||||||
|
} else if (e.Length >= 8 && e.Length <= 12 && "pauschaliert".StartsWith(e, StringComparison.CurrentCultureIgnoreCase)) {
|
||||||
|
memberQuery = memberQuery.Where(m => !m.IsBuchführend);
|
||||||
|
filter.RemoveAt(i--);
|
||||||
|
filterNames.Add("pauschaliert");
|
||||||
|
} else if (e.Length >= 9 && e.Length <= 13 && e[0] == '!' && "pauschaliert".StartsWith(e[1..], StringComparison.CurrentCultureIgnoreCase)) {
|
||||||
|
memberQuery = memberQuery.Where(m => m.IsBuchführend);
|
||||||
|
filter.RemoveAt(i--);
|
||||||
|
filterNames.Add("buchführend");
|
||||||
|
} else if (e.All(char.IsAsciiDigit) && mgnr.ContainsKey(e)) {
|
||||||
|
filterMgNr.Add(int.Parse(e));
|
||||||
|
filter.RemoveAt(i--);
|
||||||
|
filterNames.Add($"MgNr. {e}");
|
||||||
|
} else if (kgs.TryGetValue(e, out var kg)) {
|
||||||
|
filterKgNr.Add(kg.KgNr);
|
||||||
|
filter.RemoveAt(i--);
|
||||||
|
filterNames.Add($"Stammgemeinde {kg.Name}");
|
||||||
|
} else if (e.StartsWith("zwst:")) {
|
||||||
|
try {
|
||||||
|
var branch = branches.Where(b => b.Name.StartsWith(e[5..], StringComparison.CurrentCultureIgnoreCase)).Single();
|
||||||
|
filterZwst.Add(branch.ZwstId);
|
||||||
|
filter.RemoveAt(i--);
|
||||||
|
filterNames.Add($"Zweigstelle {branch.Name}");
|
||||||
|
} catch (InvalidOperationException) { }
|
||||||
|
} else if (e.StartsWith('+') && e[1..].All(char.IsAsciiDigit)) {
|
||||||
|
memberQuery = memberQuery.Where(m => m.TelephoneNumbers.Any(t => t.Number.Replace(" ", "").StartsWith(e)));
|
||||||
|
filter.RemoveAt(i--);
|
||||||
|
filterNames.Add($"Tel.-Nr. {e}");
|
||||||
|
} else if (areaComs.ContainsKey(e.ToUpper())) {
|
||||||
|
filterAreaCom.Add(e.ToUpper());
|
||||||
|
filter.RemoveAt(i--);
|
||||||
|
filterNames.Add($"Flächenbindung {e.ToUpper()}");
|
||||||
|
} else if (Validator.CheckLfbisNr(e)) {
|
||||||
|
filterLfbisNr.Add(e);
|
||||||
|
filter.RemoveAt(i--);
|
||||||
|
filterNames.Add($"Betriebsnummer {e}");
|
||||||
|
} else if (Validator.CheckUstIdNr(e.ToUpper())) {
|
||||||
|
filterUstIdNr.Add(e.ToUpper());
|
||||||
|
filter.RemoveAt(i--);
|
||||||
|
filterNames.Add($"UID {e.ToUpper()}");
|
||||||
|
} else if (e.Length > 2 && e.StartsWith('"') && e.EndsWith('"')) {
|
||||||
|
filter[i] = e[1..^1];
|
||||||
|
} else if (e.Length < 2) {
|
||||||
|
filter.RemoveAt(i--);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (filterMgNr.Count > 0) memberQuery = memberQuery.Where(m => filterMgNr.Contains(m.MgNr));
|
||||||
|
if (filterKgNr.Count > 0) memberQuery = memberQuery.Where(m => m.DefaultKgNr != null && filterKgNr.Contains((int)m.DefaultKgNr));
|
||||||
|
if (filterZwst.Count > 0) memberQuery = memberQuery.Where(m => m.ZwstId != null && filterZwst.Contains(m.ZwstId));
|
||||||
|
if (filterAreaCom.Count > 0) memberQuery = memberQuery.Where(m => m.AreaCommitments.AsQueryable().Where(Utils.ActiveAreaCommitments()).Any(c => filterAreaCom.Contains(c.VtrgId)));
|
||||||
|
if (filterLfbisNr.Count > 0) memberQuery = memberQuery.Where(m => m.LfbisNr != null && filterLfbisNr.Contains(m.LfbisNr));
|
||||||
|
if (filterUstIdNr.Count > 0) memberQuery = memberQuery.Where(m => m.UstIdNr != null && filterUstIdNr.Contains(m.UstIdNr));
|
||||||
|
}
|
||||||
|
|
||||||
|
return (filterNames, memberQuery, filter);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static async Task GenerateMemberDataSheet(Member m, ExportMode mode) {
|
||||||
|
Mouse.OverrideCursor = Cursors.AppStarting;
|
||||||
|
try {
|
||||||
|
using var ctx = new AppDbContext();
|
||||||
|
using var doc = new MemberDataSheet(m, ctx);
|
||||||
|
await Utils.ExportDocument(doc, mode, emailData: (m, MemberDataSheet.Name, "Im Anhang finden Sie das aktuelle Stammdatenblatt"));
|
||||||
|
} catch (Exception exc) {
|
||||||
|
MessageBox.Show(exc.Message, "Fehler", MessageBoxButton.OK, MessageBoxImage.Error);
|
||||||
|
}
|
||||||
|
Mouse.OverrideCursor = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static async Task GenerateDeliveryConfirmation(Member m, int year, ExportMode mode) {
|
||||||
|
Mouse.OverrideCursor = Cursors.AppStarting;
|
||||||
|
try {
|
||||||
|
var b = new Billing(year);
|
||||||
|
await b.FinishSeason();
|
||||||
|
await b.CalculateBuckets();
|
||||||
|
await App.HintContextChange();
|
||||||
|
|
||||||
|
using var ctx = new AppDbContext();
|
||||||
|
var data = await DeliveryConfirmationDeliveryData.ForMember(ctx.DeliveryParts, year, m);
|
||||||
|
using var doc = new DeliveryConfirmation(ctx, year, m, data);
|
||||||
|
await Utils.ExportDocument(doc, mode, emailData: (m, $"{DeliveryConfirmation.Name} {year}", $"Im Anhang finden Sie die Anlieferungsbestätigung {year}"));
|
||||||
|
} catch (Exception exc) {
|
||||||
|
MessageBox.Show(exc.Message, "Fehler", MessageBoxButton.OK, MessageBoxImage.Error);
|
||||||
|
}
|
||||||
|
Mouse.OverrideCursor = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static async Task GenerateCreditNote(Member m, int year, int avnr, ExportMode mode) {
|
||||||
|
Mouse.OverrideCursor = Cursors.AppStarting;
|
||||||
|
try {
|
||||||
|
using var ctx = new AppDbContext();
|
||||||
|
var v = (await ctx.PaymentVariants.FindAsync(year, avnr))!;
|
||||||
|
var data = await CreditNoteDeliveryData.ForPaymentVariant(ctx.CreditNoteDeliveryRows, ctx.Seasons, year, avnr);
|
||||||
|
var p = (await ctx.MemberPayments.FindAsync(year, avnr, m.MgNr))!;
|
||||||
|
var b = BillingData.FromJson((await ctx.PaymentVariants.FindAsync(year, avnr))!.Data);
|
||||||
|
|
||||||
|
using var doc = new CreditNote(ctx, p, data[m.MgNr],
|
||||||
|
b.ConsiderContractPenalties, b.ConsiderTotalPenalty, b.ConsiderAutoBusinessShares, b.ConsiderCustomModifiers,
|
||||||
|
await ctx.GetMemberUnderDelivery(year, m.MgNr));
|
||||||
|
await Utils.ExportDocument(doc, mode, emailData: (m, $"{CreditNote.Name} {v.Name}", $"Im Anhang finden Sie die Traubengutschrift {v.Name}"));
|
||||||
|
} catch (Exception exc) {
|
||||||
|
MessageBox.Show(exc.Message, "Fehler", MessageBoxButton.OK, MessageBoxImage.Error);
|
||||||
|
}
|
||||||
|
Mouse.OverrideCursor = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static async Task GenerateMemberList(this MemberAdminViewModel vm, int modeWho, ExportMode exportMode) {
|
||||||
|
using var ctx = new AppDbContext();
|
||||||
|
IQueryable<Member> query;
|
||||||
|
List<string> filterNames = [];
|
||||||
|
if (modeWho == 0) {
|
||||||
|
query = ctx.Members.Where(m => m.IsActive);
|
||||||
|
filterNames.Add("aktive Mitglieder");
|
||||||
|
} else if (modeWho == 1) {
|
||||||
|
var (f, q, _) = await vm.GetFilters(ctx);
|
||||||
|
query = q;
|
||||||
|
filterNames.AddRange(f);
|
||||||
|
} else {
|
||||||
|
query = ctx.Members;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (vm.MemberListOrderByMgNr) {
|
||||||
|
query = query
|
||||||
|
.OrderBy(m => m.Branch!.Name)
|
||||||
|
.ThenBy(m => m.MgNr);
|
||||||
|
} else if (vm.MemberListOrderByName) {
|
||||||
|
query = query
|
||||||
|
.OrderBy(m => m.Branch!.Name)
|
||||||
|
.ThenBy(m => m.FamilyName)
|
||||||
|
.ThenBy(m => m.GivenName)
|
||||||
|
.ThenBy(m => m.MgNr);
|
||||||
|
} else if (vm.MemberListOrderByOrt) {
|
||||||
|
query = query
|
||||||
|
.OrderBy(m => m.Branch!.Name)
|
||||||
|
.ThenBy(m => m.DefaultWbKg!.AtKg.Name)
|
||||||
|
.ThenBy(m => m.FamilyName)
|
||||||
|
.ThenBy(m => m.GivenName)
|
||||||
|
.ThenBy(m => m.MgNr);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (exportMode == ExportMode.SaveList) {
|
||||||
|
var d = new SaveFileDialog() {
|
||||||
|
FileName = $"{MemberList.Name}.ods",
|
||||||
|
DefaultExt = "ods",
|
||||||
|
Filter = "OpenDocument Format Spreadsheet (*.ods)|*.ods",
|
||||||
|
Title = $"{MemberList.Name} speichern unter - Elwig"
|
||||||
|
};
|
||||||
|
if (d.ShowDialog() == true) {
|
||||||
|
Mouse.OverrideCursor = Cursors.AppStarting;
|
||||||
|
try {
|
||||||
|
var data = await MemberListData.FromQuery(query, filterNames);
|
||||||
|
using var ods = new OdsFile(d.FileName);
|
||||||
|
await ods.AddTable(data);
|
||||||
|
} catch (Exception exc) {
|
||||||
|
MessageBox.Show(exc.Message, "Fehler", MessageBoxButton.OK, MessageBoxImage.Error);
|
||||||
|
}
|
||||||
|
Mouse.OverrideCursor = null;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
Mouse.OverrideCursor = Cursors.AppStarting;
|
||||||
|
try {
|
||||||
|
var data = await MemberListData.FromQuery(query, filterNames);
|
||||||
|
using var doc = new MemberList(string.Join(" / ", filterNames), data);
|
||||||
|
await Utils.ExportDocument(doc, exportMode);
|
||||||
|
} catch (Exception exc) {
|
||||||
|
MessageBox.Show(exc.Message, "Fehler", MessageBoxButton.OK, MessageBoxImage.Error);
|
||||||
|
}
|
||||||
|
Mouse.OverrideCursor = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static async Task<int> UpdateMember(this MemberAdminViewModel vm, int? oldMgNr) {
|
||||||
|
using var ctx = new AppDbContext();
|
||||||
|
var newMgNr = (int)vm.MgNr!;
|
||||||
|
var m = new Member {
|
||||||
|
MgNr = oldMgNr ?? newMgNr,
|
||||||
|
PredecessorMgNr = vm.PredecessorMgNr,
|
||||||
|
Prefix = string.IsNullOrEmpty(vm.Prefix) ? null : vm.Prefix,
|
||||||
|
GivenName = vm.GivenName!,
|
||||||
|
FamilyName = vm.FamilyName!,
|
||||||
|
Suffix = string.IsNullOrEmpty(vm.Suffix) ? null : vm.Suffix,
|
||||||
|
Birthday = string.IsNullOrEmpty(vm.Birthday) ? null : string.Join("-", vm.Birthday!.Split(".").Reverse()),
|
||||||
|
IsDeceased = vm.IsDeceased,
|
||||||
|
CountryNum = 40, // Austria AT AUT
|
||||||
|
PostalDestId = vm.Ort!.Id,
|
||||||
|
Address = vm.Address!,
|
||||||
|
|
||||||
|
Iban = string.IsNullOrEmpty(vm.Iban) ? null : vm.Iban?.Replace(" ", ""),
|
||||||
|
Bic = string.IsNullOrEmpty(vm.Bic) ? null : vm.Bic,
|
||||||
|
|
||||||
|
UstIdNr = string.IsNullOrEmpty(vm.UstIdNr) ? null : vm.UstIdNr,
|
||||||
|
LfbisNr = string.IsNullOrEmpty(vm.LfbisNr) ? null : vm.LfbisNr,
|
||||||
|
IsBuchführend = vm.IsBuchführend,
|
||||||
|
IsOrganic = vm.IsOrganic,
|
||||||
|
|
||||||
|
EntryDateString = string.IsNullOrEmpty(vm.EntryDate) ? null : string.Join("-", vm.EntryDate.Split(".").Reverse()),
|
||||||
|
ExitDateString = string.IsNullOrEmpty(vm.ExitDate) ? null : string.Join("-", vm.ExitDate.Split(".").Reverse()),
|
||||||
|
BusinessShares = (int)vm.BusinessShares!,
|
||||||
|
AccountingNr = string.IsNullOrEmpty(vm.AccountingNr) ? null : vm.AccountingNr,
|
||||||
|
IsActive = vm.IsActive,
|
||||||
|
IsVollLieferant = vm.IsVollLieferant,
|
||||||
|
IsFunktionär = vm.IsFunktionär,
|
||||||
|
ZwstId = vm.Branch?.ZwstId,
|
||||||
|
DefaultKgNr = vm.DefaultKg?.KgNr,
|
||||||
|
Comment = string.IsNullOrEmpty(vm.Comment) ? null : vm.Comment,
|
||||||
|
ContactViaPost = vm.ContactViaPost,
|
||||||
|
ContactViaEmail = vm.ContactViaEmail,
|
||||||
|
};
|
||||||
|
|
||||||
|
if (oldMgNr != null) {
|
||||||
|
ctx.Update(m);
|
||||||
|
} else {
|
||||||
|
ctx.Add(m);
|
||||||
|
}
|
||||||
|
|
||||||
|
ctx.RemoveRange(ctx.BillingAddresses.Where(a => a.MgNr == oldMgNr));
|
||||||
|
if (vm.BillingOrt != null && vm.BillingName != null) {
|
||||||
|
var p = vm.BillingOrt;
|
||||||
|
ctx.Add(new BillingAddr {
|
||||||
|
MgNr = m.MgNr,
|
||||||
|
Name = vm.BillingName,
|
||||||
|
Address = vm.BillingAddress ?? "",
|
||||||
|
CountryNum = p.CountryNum,
|
||||||
|
PostalDestId = p.Id,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
ctx.RemoveRange(ctx.MemberTelephoneNrs.Where(t => t.MgNr == oldMgNr));
|
||||||
|
ctx.AddRange(vm.PhoneNrs
|
||||||
|
.Where(input => input.Number != null)
|
||||||
|
.Select((input, i) => new MemberTelNr {
|
||||||
|
MgNr = m.MgNr,
|
||||||
|
Nr = i + 1,
|
||||||
|
Type = input.Type == -1 ? (input.Number!.StartsWith("+43 ") && input.Number![4] == '6' ? "mobile" : "landline") : vm.PhoneNrTypes[input.Type].Key,
|
||||||
|
Number = input.Number!,
|
||||||
|
Comment = input.Comment,
|
||||||
|
}));
|
||||||
|
|
||||||
|
ctx.RemoveRange(ctx.MemberEmailAddrs.Where(e => e.MgNr == oldMgNr));
|
||||||
|
ctx.AddRange(vm.EmailAddresses
|
||||||
|
.Where(input => input != null && input != "")
|
||||||
|
.Select((input, i) => new MemberEmailAddr {
|
||||||
|
MgNr = m.MgNr,
|
||||||
|
Nr = i + 1,
|
||||||
|
Address = input!,
|
||||||
|
Comment = null,
|
||||||
|
}));
|
||||||
|
|
||||||
|
await ctx.SaveChangesAsync();
|
||||||
|
|
||||||
|
if (vm.TransferPredecessorAreaComs is int year && m.PredecessorMgNr is int predecessor) {
|
||||||
|
var areaComs = await ctx.AreaCommitments
|
||||||
|
.Where(c => c.MgNr == predecessor && (c.YearTo == null || c.YearTo >= year))
|
||||||
|
.ToListAsync();
|
||||||
|
|
||||||
|
var fbNr = await ctx.NextFbNr();
|
||||||
|
ctx.AddRange(areaComs.Select((c, i) => new AreaCom {
|
||||||
|
FbNr = fbNr + i,
|
||||||
|
MgNr = m.MgNr,
|
||||||
|
VtrgId = c.VtrgId,
|
||||||
|
CultId = c.CultId,
|
||||||
|
Area = c.Area,
|
||||||
|
KgNr = c.KgNr,
|
||||||
|
GstNr = c.GstNr,
|
||||||
|
RdNr = c.RdNr,
|
||||||
|
YearFrom = year,
|
||||||
|
YearTo = c.YearTo,
|
||||||
|
}));
|
||||||
|
|
||||||
|
foreach (var ac in areaComs)
|
||||||
|
ac.YearTo = year - 1;
|
||||||
|
ctx.UpdateRange(areaComs);
|
||||||
|
await ctx.SaveChangesAsync();
|
||||||
|
}
|
||||||
|
vm.TransferPredecessorAreaComs = null;
|
||||||
|
|
||||||
|
if (vm.CancelAreaComs is int yearTo) {
|
||||||
|
var areaComs = await ctx.AreaCommitments
|
||||||
|
.Where(c => c.MgNr == m.MgNr && (c.YearTo == null || c.YearTo > yearTo))
|
||||||
|
.ToListAsync();
|
||||||
|
|
||||||
|
foreach (var ac in areaComs)
|
||||||
|
ac.YearTo = yearTo;
|
||||||
|
ctx.UpdateRange(areaComs);
|
||||||
|
await ctx.SaveChangesAsync();
|
||||||
|
}
|
||||||
|
vm.CancelAreaComs = null;
|
||||||
|
|
||||||
|
if (newMgNr != m.MgNr) {
|
||||||
|
await ctx.Database.ExecuteSqlAsync($"UPDATE member SET mgnr = {newMgNr} WHERE mgnr = {oldMgNr}");
|
||||||
|
}
|
||||||
|
|
||||||
|
await App.HintContextChange();
|
||||||
|
|
||||||
|
return newMgNr;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
163
Elwig/ViewModels/MemberAdminViewModel.cs
Normal file
163
Elwig/ViewModels/MemberAdminViewModel.cs
Normal file
@ -0,0 +1,163 @@
|
|||||||
|
using CommunityToolkit.Mvvm.ComponentModel;
|
||||||
|
using Elwig.Helpers;
|
||||||
|
using Elwig.Models.Entities;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Collections.ObjectModel;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Windows;
|
||||||
|
|
||||||
|
namespace Elwig.ViewModels {
|
||||||
|
public partial class MemberAdminViewModel : ObservableObject {
|
||||||
|
|
||||||
|
public int? TransferPredecessorAreaComs = null;
|
||||||
|
public int? CancelAreaComs = null;
|
||||||
|
|
||||||
|
public ObservableCollection<KeyValuePair<string, string>> PhoneNrTypes { get; set; } = new(Utils.PhoneNrTypes);
|
||||||
|
|
||||||
|
[ObservableProperty]
|
||||||
|
private string? _searchQuery = "";
|
||||||
|
public List<string> TextFilter => [.. SearchQuery?.ToLower().Split(' ').ToList().FindAll(e => e.Length > 0)];
|
||||||
|
|
||||||
|
[ObservableProperty]
|
||||||
|
private bool _showOnlyActiveMembers;
|
||||||
|
|
||||||
|
[ObservableProperty]
|
||||||
|
private Member? _selectedMember;
|
||||||
|
[ObservableProperty]
|
||||||
|
private IEnumerable<Member> _members = [];
|
||||||
|
|
||||||
|
[ObservableProperty]
|
||||||
|
private bool _isMemberSelected;
|
||||||
|
[ObservableProperty]
|
||||||
|
private bool _memberHasEmail;
|
||||||
|
[ObservableProperty]
|
||||||
|
private bool _memberCanSendEmail;
|
||||||
|
[ObservableProperty]
|
||||||
|
private bool _enableMemberReferenceButton;
|
||||||
|
[ObservableProperty]
|
||||||
|
private bool _enableSearchInputs = true;
|
||||||
|
[ObservableProperty]
|
||||||
|
public IEnumerable<bool> _memberHasDeliveries = [ .. Enumerable.Range(0, 9999).Select(i => false) ];
|
||||||
|
|
||||||
|
[ObservableProperty]
|
||||||
|
private bool _memberListOrderByMgNr;
|
||||||
|
[ObservableProperty]
|
||||||
|
private bool _memberListOrderByName;
|
||||||
|
[ObservableProperty]
|
||||||
|
private bool _memberListOrderByOrt;
|
||||||
|
|
||||||
|
[ObservableProperty]
|
||||||
|
private string? _mgNrString;
|
||||||
|
public int? MgNr => int.TryParse(MgNrString, out var mgnr) ? mgnr : null;
|
||||||
|
[ObservableProperty]
|
||||||
|
private string? _predecessorMgNrString;
|
||||||
|
public int? PredecessorMgNr => int.TryParse(PredecessorMgNrString, out var mgnr) ? mgnr : null;
|
||||||
|
[ObservableProperty]
|
||||||
|
private string? _prefix;
|
||||||
|
[ObservableProperty]
|
||||||
|
private string? _givenName;
|
||||||
|
[ObservableProperty]
|
||||||
|
private string? _familyName;
|
||||||
|
[ObservableProperty]
|
||||||
|
private string? _suffix;
|
||||||
|
[ObservableProperty]
|
||||||
|
private string? _birthday;
|
||||||
|
[ObservableProperty]
|
||||||
|
private string? _age;
|
||||||
|
[ObservableProperty]
|
||||||
|
private bool _isDeceased;
|
||||||
|
[ObservableProperty]
|
||||||
|
private string? _address;
|
||||||
|
[ObservableProperty]
|
||||||
|
private string? _plzString;
|
||||||
|
public int? Plz => int.TryParse(PlzString, out var plz) ? plz : null;
|
||||||
|
[ObservableProperty]
|
||||||
|
private AT_PlzDest? _ort;
|
||||||
|
[ObservableProperty]
|
||||||
|
private IEnumerable<AT_PlzDest> _ortSource = [];
|
||||||
|
|
||||||
|
[ObservableProperty]
|
||||||
|
private string? _billingName;
|
||||||
|
[ObservableProperty]
|
||||||
|
private string? _billingAddress;
|
||||||
|
[ObservableProperty]
|
||||||
|
private string? _billingPlzString;
|
||||||
|
public int? BillingPlz => int.TryParse(BillingPlzString, out var plz) ? plz : null;
|
||||||
|
[ObservableProperty]
|
||||||
|
private AT_PlzDest? _billingOrt;
|
||||||
|
[ObservableProperty]
|
||||||
|
private IEnumerable<AT_PlzDest> _billingOrtSource = [];
|
||||||
|
|
||||||
|
[ObservableProperty]
|
||||||
|
private string? _iban;
|
||||||
|
[ObservableProperty]
|
||||||
|
private string? _bic;
|
||||||
|
|
||||||
|
[ObservableProperty]
|
||||||
|
private string? _ustIdNr;
|
||||||
|
[ObservableProperty]
|
||||||
|
private string? _lfbisNr;
|
||||||
|
[ObservableProperty]
|
||||||
|
private bool _isBuchführend;
|
||||||
|
[ObservableProperty]
|
||||||
|
private bool _isOrganic;
|
||||||
|
|
||||||
|
[ObservableProperty]
|
||||||
|
private string? _entryDate;
|
||||||
|
[ObservableProperty]
|
||||||
|
private string? _exitDate;
|
||||||
|
[ObservableProperty]
|
||||||
|
private string? _businessSharesString;
|
||||||
|
public int? BusinessShares => int.TryParse(BusinessSharesString, out var bs) ? bs : null;
|
||||||
|
[ObservableProperty]
|
||||||
|
private string? _accountingNr;
|
||||||
|
[ObservableProperty]
|
||||||
|
private bool _isActive;
|
||||||
|
[ObservableProperty]
|
||||||
|
private bool _isVollLieferant;
|
||||||
|
[ObservableProperty]
|
||||||
|
private bool _isFunktionär;
|
||||||
|
[ObservableProperty]
|
||||||
|
private Branch? _branch;
|
||||||
|
[ObservableProperty]
|
||||||
|
private IEnumerable<Branch> _branchSource = [];
|
||||||
|
[ObservableProperty]
|
||||||
|
private AT_Kg? _defaultKg;
|
||||||
|
[ObservableProperty]
|
||||||
|
private IEnumerable<AT_Kg> _defaultKgSource = [];
|
||||||
|
[ObservableProperty]
|
||||||
|
private string? _comment;
|
||||||
|
[ObservableProperty]
|
||||||
|
private bool _contactViaPost;
|
||||||
|
[ObservableProperty]
|
||||||
|
private bool _contactViaEmail;
|
||||||
|
|
||||||
|
public ObservableCollection<string?> EmailAddresses { get; private set; } = [null, null, null, null, null, null, null, null, null];
|
||||||
|
|
||||||
|
public partial class PhoneNr(int? type = null, string? number = null, string? comment = null) : ObservableObject {
|
||||||
|
[ObservableProperty]
|
||||||
|
public int _type = type ?? -1;
|
||||||
|
[ObservableProperty]
|
||||||
|
public string? _number = number;
|
||||||
|
[ObservableProperty]
|
||||||
|
public string? _comment = comment;
|
||||||
|
}
|
||||||
|
public ObservableCollection<PhoneNr> PhoneNrs { get; private set; } = [new(), new(), new(), new(), new(), new(), new(), new(), new()];
|
||||||
|
|
||||||
|
[ObservableProperty]
|
||||||
|
private string _statusMembers = "Mitglieder: -";
|
||||||
|
[ObservableProperty]
|
||||||
|
private string _statusBusinessShares = "Geschäftsanteile: -";
|
||||||
|
[ObservableProperty]
|
||||||
|
private string _statusDeliveriesLastSeason = "Lieferungen (letzte Saison): -";
|
||||||
|
[ObservableProperty]
|
||||||
|
private string _statusDeliveriesThisSeason = "Lieferungen (aktuelle Saison): -";
|
||||||
|
[ObservableProperty]
|
||||||
|
private string _statusAreaCommitment = "Gebundene Fläche: -";
|
||||||
|
|
||||||
|
[ObservableProperty]
|
||||||
|
private Visibility _controlButtonsVisibility = Visibility.Visible;
|
||||||
|
[ObservableProperty]
|
||||||
|
private Visibility _editingButtonsVisibility = Visibility.Hidden;
|
||||||
|
}
|
||||||
|
}
|
@ -162,9 +162,9 @@ namespace Elwig.Windows {
|
|||||||
if (input is TextBox tb && tb.Text.Length == 0) {
|
if (input is TextBox tb && tb.Text.Length == 0) {
|
||||||
ControlUtils.SetInputInvalid(input);
|
ControlUtils.SetInputInvalid(input);
|
||||||
Valid[input] = false;
|
Valid[input] = false;
|
||||||
} else if (input is ComboBox cb && cb.SelectedItem == null && cb.ItemsSource != null) {
|
} else if (input is ComboBox cb && cb.SelectedItem == null && cb.ItemsSource != null && cb.ItemsSource.Cast<object>().Any()) {
|
||||||
ControlUtils.SetInputInvalid(input);
|
ControlUtils.SetInputInvalid(input);
|
||||||
} else if (input is ListBox lb && lb.SelectedItem == null && lb.ItemsSource != null) {
|
} else if (input is ListBox lb && lb.SelectedItem == null && lb.ItemsSource != null && lb.ItemsSource.Cast<object>().Any()) {
|
||||||
ControlUtils.SetInputInvalid(input);
|
ControlUtils.SetInputInvalid(input);
|
||||||
} else if (input is CheckBox ckb && ckb.IsChecked != true) {
|
} else if (input is CheckBox ckb && ckb.IsChecked != true) {
|
||||||
ControlUtils.SetInputInvalid(input);
|
ControlUtils.SetInputInvalid(input);
|
||||||
@ -271,16 +271,28 @@ namespace Elwig.Windows {
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected void ClearInputs(bool validate = true) {
|
protected void ClearInputs(bool validate = true) {
|
||||||
foreach (var tb in TextBoxInputs)
|
foreach (var tb in TextBoxInputs) {
|
||||||
tb.Text = "";
|
tb.Text = "";
|
||||||
foreach (var cb in ComboBoxInputs)
|
var binding = tb.GetBindingExpression(TextBox.TextProperty);
|
||||||
|
binding?.UpdateSource();
|
||||||
|
}
|
||||||
|
foreach (var cb in ComboBoxInputs) {
|
||||||
cb.SelectedItem = null;
|
cb.SelectedItem = null;
|
||||||
|
var binding = cb.GetBindingExpression(ComboBox.SelectedItemProperty);
|
||||||
|
binding?.UpdateSource();
|
||||||
|
}
|
||||||
foreach (var lb in ListBoxInputs)
|
foreach (var lb in ListBoxInputs)
|
||||||
lb.SelectedItems.Clear();
|
lb.SelectedItems.Clear();
|
||||||
foreach (var cb in CheckBoxInputs)
|
foreach (var cb in CheckBoxInputs) {
|
||||||
cb.IsChecked = cb.IsThreeState ? null : false;
|
cb.IsChecked = cb.IsThreeState ? null : false;
|
||||||
foreach (var rb in RadioButtonInputs)
|
var binding = cb.GetBindingExpression(CheckBox.IsCheckedProperty);
|
||||||
|
binding?.UpdateSource();
|
||||||
|
}
|
||||||
|
foreach (var rb in RadioButtonInputs) {
|
||||||
rb.IsChecked = rb.IsThreeState ? null : false;
|
rb.IsChecked = rb.IsThreeState ? null : false;
|
||||||
|
var binding = rb.GetBindingExpression(RadioButton.IsCheckedProperty);
|
||||||
|
binding?.UpdateSource();
|
||||||
|
}
|
||||||
if (validate) ValidateRequiredInputs();
|
if (validate) ValidateRequiredInputs();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -327,7 +339,7 @@ namespace Elwig.Windows {
|
|||||||
protected async Task UpdatePlz(TextBox plzInput, ComboBox ortInput) {
|
protected async Task UpdatePlz(TextBox plzInput, ComboBox ortInput) {
|
||||||
var plzInputValid = Validator.CheckPlz(plzInput, RequiredInputs.Contains(plzInput)).IsValid;
|
var plzInputValid = Validator.CheckPlz(plzInput, RequiredInputs.Contains(plzInput)).IsValid;
|
||||||
|
|
||||||
List<AT_PlzDest>? list = null;
|
List<AT_PlzDest> list = [];
|
||||||
if (plzInputValid && plzInput.Text.Length == 4) {
|
if (plzInputValid && plzInput.Text.Length == 4) {
|
||||||
var plz = int.Parse(plzInput.Text);
|
var plz = int.Parse(plzInput.Text);
|
||||||
using var ctx = new AppDbContext();
|
using var ctx = new AppDbContext();
|
||||||
@ -338,7 +350,7 @@ namespace Elwig.Windows {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ControlUtils.RenewItemsSource(ortInput, list);
|
ControlUtils.RenewItemsSource(ortInput, list);
|
||||||
if (list != null && ortInput.SelectedItem == null && list.Count == 1)
|
if (ortInput.SelectedItem == null && list.Count == 1)
|
||||||
ortInput.SelectedItem = list[0];
|
ortInput.SelectedItem = list[0];
|
||||||
UpdateComboBox(ortInput);
|
UpdateComboBox(ortInput);
|
||||||
}
|
}
|
||||||
@ -444,9 +456,9 @@ namespace Elwig.Windows {
|
|||||||
private void UpdateComboBox(Control input) {
|
private void UpdateComboBox(Control input) {
|
||||||
bool valid = false;
|
bool valid = false;
|
||||||
if (input is ComboBox cb) {
|
if (input is ComboBox cb) {
|
||||||
valid = cb.ItemsSource == null || cb.SelectedItem != null || !RequiredInputs.Contains(input);
|
valid = cb.ItemsSource == null || cb.SelectedItem != null || !RequiredInputs.Contains(input) || !cb.ItemsSource.Cast<object>().Any();
|
||||||
} else if (input is ListBox lb) {
|
} else if (input is ListBox lb) {
|
||||||
valid = lb.ItemsSource == null || lb.SelectedItem != null || !RequiredInputs.Contains(input);
|
valid = lb.ItemsSource == null || lb.SelectedItem != null || !RequiredInputs.Contains(input) || !lb.ItemsSource.Cast<object>().Any();
|
||||||
}
|
}
|
||||||
if (valid) {
|
if (valid) {
|
||||||
ValidateInput(input, true);
|
ValidateInput(input, true);
|
||||||
|
@ -4,8 +4,12 @@
|
|||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:local="clr-namespace:Elwig.Windows"
|
xmlns:local="clr-namespace:Elwig.Windows"
|
||||||
|
xmlns:vm="clr-namespace:Elwig.ViewModels"
|
||||||
Title="Mitglieder - Elwig" Height="700" Width="1250" MinHeight="650" MinWidth="1150"
|
Title="Mitglieder - Elwig" Height="700" Width="1250" MinHeight="650" MinWidth="1150"
|
||||||
Loaded="Window_Loaded">
|
Loaded="Window_Loaded">
|
||||||
|
<Window.DataContext>
|
||||||
|
<vm:MemberAdminViewModel/>
|
||||||
|
</Window.DataContext>
|
||||||
<Window.Resources>
|
<Window.Resources>
|
||||||
<Style TargetType="Label">
|
<Style TargetType="Label">
|
||||||
<Setter Property="HorizontalAlignment" Value="Left"/>
|
<Setter Property="HorizontalAlignment" Value="Left"/>
|
||||||
@ -47,19 +51,19 @@
|
|||||||
|
|
||||||
<Menu Grid.ColumnSpan="3" BorderThickness="0,0,0,1" BorderBrush="LightGray" Background="White">
|
<Menu Grid.ColumnSpan="3" BorderThickness="0,0,0,1" BorderBrush="LightGray" Background="White">
|
||||||
<MenuItem Header="Kontaktieren">
|
<MenuItem Header="Kontaktieren">
|
||||||
<MenuItem x:Name="Menu_Contact_Email" Header="E-Mail senden..." IsEnabled="False"
|
<MenuItem x:Name="Menu_Contact_Email" Header="E-Mail senden..." IsEnabled="{Binding MemberHasEmail}"
|
||||||
Click="Menu_Contact_Email_Click"/>
|
Click="Menu_Contact_Email_Click"/>
|
||||||
<MenuItem x:Name="Menu_Contact_Letterhead" Header="Briefkopf drucken" IsEnabled="False"
|
<MenuItem x:Name="Menu_Contact_Letterhead" Header="Briefkopf drucken" IsEnabled="{Binding IsMemberSelected}"
|
||||||
Click="Menu_Contact_Letterhead_Click"/>
|
Click="Menu_Contact_Letterhead_Click"/>
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
<MenuItem Header="Stammdatenblatt">
|
<MenuItem Header="Stammdatenblatt">
|
||||||
<MenuItem x:Name="Menu_MemberDataSheet_Show" Header="...anzeigen (PDF)" IsEnabled="False"
|
<MenuItem x:Name="Menu_MemberDataSheet_Show" Header="...anzeigen (PDF)" IsEnabled="{Binding IsMemberSelected}"
|
||||||
Click="Menu_MemberDataSheet_Show_Click" InputGestureText="Strg+P"/>
|
Click="Menu_MemberDataSheet_Show_Click" InputGestureText="Strg+P"/>
|
||||||
<MenuItem x:Name="Menu_MemberDataSheet_SavePdf" Header="...speichern... (PDF)" IsEnabled="False"
|
<MenuItem x:Name="Menu_MemberDataSheet_SavePdf" Header="...speichern... (PDF)" IsEnabled="{Binding IsMemberSelected}"
|
||||||
Click="Menu_MemberDataSheet_SavePdf_Click"/>
|
Click="Menu_MemberDataSheet_SavePdf_Click"/>
|
||||||
<MenuItem x:Name="Menu_MemberDataSheet_Print" Header="...drucken" IsEnabled="False"
|
<MenuItem x:Name="Menu_MemberDataSheet_Print" Header="...drucken" IsEnabled="{Binding IsMemberSelected}"
|
||||||
Click="Menu_MemberDataSheet_Print_Click" InputGestureText="Strg+Shift+P"/>
|
Click="Menu_MemberDataSheet_Print_Click" InputGestureText="Strg+Shift+P"/>
|
||||||
<MenuItem x:Name="Menu_MemberDataSheet_Email" Header="...per E-Mail schicken" IsEnabled="False"
|
<MenuItem x:Name="Menu_MemberDataSheet_Email" Header="...per E-Mail schicken" IsEnabled="{Binding MemberCanSendEmail}"
|
||||||
Click="Menu_MemberDataSheet_Email_Click"/>
|
Click="Menu_MemberDataSheet_Email_Click"/>
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
<MenuItem Header="Anlieferungsbestätigung" x:Name="Menu_DeliveryConfirmation">
|
<MenuItem Header="Anlieferungsbestätigung" x:Name="Menu_DeliveryConfirmation">
|
||||||
@ -110,18 +114,21 @@
|
|||||||
<MenuItem x:Name="Menu_List_PrintAll" Header="...mit allen drucken"
|
<MenuItem x:Name="Menu_List_PrintAll" Header="...mit allen drucken"
|
||||||
Click="Menu_List_PrintAll_Click"/>
|
Click="Menu_List_PrintAll_Click"/>
|
||||||
<Separator/>
|
<Separator/>
|
||||||
<MenuItem x:Name="Menu_List_OrderMgNr" Header="...nach MgNr. sortieren" IsCheckable="True" IsChecked="True"
|
<MenuItem x:Name="Menu_List_OrderMgNr" Header="...nach MgNr. sortieren"
|
||||||
|
IsCheckable="True" IsChecked="{Binding MemberListOrderByMgNr, Mode=TwoWay}"
|
||||||
Click="Menu_List_Order_Click"/>
|
Click="Menu_List_Order_Click"/>
|
||||||
<MenuItem x:Name="Menu_List_OrderName" Header="...nach Nachname, Vorname sortieren" IsCheckable="True"
|
<MenuItem x:Name="Menu_List_OrderName" Header="...nach Nachname, Vorname sortieren"
|
||||||
|
IsCheckable="True" IsChecked="{Binding MemberListOrderByName, Mode=TwoWay}"
|
||||||
Click="Menu_List_Order_Click"/>
|
Click="Menu_List_Order_Click"/>
|
||||||
<MenuItem x:Name="Menu_List_OrderOrt" Header="...nach Stamm-KG, Name sortieren" IsCheckable="True"
|
<MenuItem x:Name="Menu_List_OrderOrt" Header="...nach Stamm-KG, Name sortieren"
|
||||||
|
IsCheckable="True" IsChecked="{Binding MemberListOrderByOrt, Mode=TwoWay}"
|
||||||
Click="Menu_List_Order_Click"/>
|
Click="Menu_List_Order_Click"/>
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
</Menu>
|
</Menu>
|
||||||
|
|
||||||
<Grid Grid.Row="1" Margin="5,0,0,0">
|
<Grid Grid.Row="1" Margin="5,0,0,0">
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="39"/>
|
<RowDefinition Height="35"/>
|
||||||
<RowDefinition Height="*"/>
|
<RowDefinition Height="*"/>
|
||||||
<RowDefinition Height="42"/>
|
<RowDefinition Height="42"/>
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
@ -131,7 +138,8 @@
|
|||||||
<ColumnDefinition Width="*"/>
|
<ColumnDefinition Width="*"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
<TextBox x:Name="SearchInput" Grid.ColumnSpan="3" Margin="5,7,145,0" IsReadOnly="False"
|
<TextBox x:Name="SearchInput" Text="{Binding SearchQuery, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" IsEnabled="{Binding EnableSearchInputs}"
|
||||||
|
Grid.ColumnSpan="3" Margin="5,5,140,0"
|
||||||
TextChanged="SearchInput_TextChanged">
|
TextChanged="SearchInput_TextChanged">
|
||||||
<TextBox.ToolTip>
|
<TextBox.ToolTip>
|
||||||
<TextBlock>
|
<TextBlock>
|
||||||
@ -157,9 +165,11 @@
|
|||||||
</TextBox.ToolTip>
|
</TextBox.ToolTip>
|
||||||
</TextBox>
|
</TextBox>
|
||||||
<CheckBox x:Name="ActiveMemberInput" Content="Nur aktive anzeigen"
|
<CheckBox x:Name="ActiveMemberInput" Content="Nur aktive anzeigen"
|
||||||
|
IsChecked="{Binding ShowOnlyActiveMembers, Mode=TwoWay}" IsEnabled="{Binding EnableSearchInputs}"
|
||||||
Checked="ActiveMemberInput_Changed" Unchecked="ActiveMemberInput_Changed"
|
Checked="ActiveMemberInput_Changed" Unchecked="ActiveMemberInput_Changed"
|
||||||
HorizontalAlignment="Right" Margin="0,12,10,0" VerticalAlignment="Top" Grid.Column="1" Grid.ColumnSpan="2"/>
|
HorizontalAlignment="Right" Margin="0,10,10,0" VerticalAlignment="Top" Grid.Column="1" Grid.ColumnSpan="2"/>
|
||||||
<DataGrid x:Name="MemberList" AutoGenerateColumns="False" HeadersVisibility="Column" IsReadOnly="True" GridLinesVisibility="None" SelectionMode="Single"
|
<DataGrid x:Name="MemberList" AutoGenerateColumns="False" HeadersVisibility="Column" IsReadOnly="True" GridLinesVisibility="None" SelectionMode="Single"
|
||||||
|
ItemsSource="{Binding Members, Mode=TwoWay}" SelectedItem="{Binding SelectedMember, Mode=TwoWay}"
|
||||||
CanUserDeleteRows="False" CanUserResizeRows="False" CanUserAddRows="False"
|
CanUserDeleteRows="False" CanUserResizeRows="False" CanUserAddRows="False"
|
||||||
SelectionChanged="MemberList_SelectionChanged"
|
SelectionChanged="MemberList_SelectionChanged"
|
||||||
Margin="5,0,5,0" Grid.Row="1" FontSize="14" Grid.ColumnSpan="3">
|
Margin="5,0,5,0" Grid.Row="1" FontSize="14" Grid.ColumnSpan="3">
|
||||||
@ -184,21 +194,21 @@
|
|||||||
</DataGrid.Columns>
|
</DataGrid.Columns>
|
||||||
</DataGrid>
|
</DataGrid>
|
||||||
|
|
||||||
<Button x:Name="NewMemberButton" Content="Neu"
|
<Button x:Name="NewMemberButton" Content="Neu" Visibility="{Binding ControlButtonsVisibility}"
|
||||||
HorizontalAlignment="Stretch" VerticalAlignment="Bottom" Margin="5,5,2.5,10" Grid.Column="0" Grid.Row="2"
|
HorizontalAlignment="Stretch" VerticalAlignment="Bottom" Margin="5,5,2.5,10" Grid.Column="0" Grid.Row="2"
|
||||||
Click="NewMemberButton_Click">
|
Click="NewMemberButton_Click">
|
||||||
<Button.ToolTip>
|
<Button.ToolTip>
|
||||||
<TextBlock FontWeight="Bold">Alt+Einfg</TextBlock>
|
<TextBlock FontWeight="Bold">Alt+Einfg</TextBlock>
|
||||||
</Button.ToolTip>
|
</Button.ToolTip>
|
||||||
</Button>
|
</Button>
|
||||||
<Button x:Name="EditMemberButton" Content="Bearbeiten" IsEnabled="False"
|
<Button x:Name="EditMemberButton" Content="Bearbeiten" IsEnabled="False" Visibility="{Binding ControlButtonsVisibility}"
|
||||||
HorizontalAlignment="Stretch" VerticalAlignment="Bottom" Margin="2.5,5,2.5,10" Grid.Column="1" Grid.Row="2"
|
HorizontalAlignment="Stretch" VerticalAlignment="Bottom" Margin="2.5,5,2.5,10" Grid.Column="1" Grid.Row="2"
|
||||||
Click="EditMemberButton_Click">
|
Click="EditMemberButton_Click">
|
||||||
<Button.ToolTip>
|
<Button.ToolTip>
|
||||||
<TextBlock FontWeight="Bold">Strg+B</TextBlock>
|
<TextBlock FontWeight="Bold">Strg+B</TextBlock>
|
||||||
</Button.ToolTip>
|
</Button.ToolTip>
|
||||||
</Button>
|
</Button>
|
||||||
<Button x:Name="DeleteMemberButton" Content="Löschen" IsEnabled="False"
|
<Button x:Name="DeleteMemberButton" Content="Löschen" IsEnabled="False" Visibility="{Binding ControlButtonsVisibility}"
|
||||||
HorizontalAlignment="Stretch" VerticalAlignment="Bottom" Margin="2.5,5,5,10" Grid.Column="2" Grid.Row="2"
|
HorizontalAlignment="Stretch" VerticalAlignment="Bottom" Margin="2.5,5,5,10" Grid.Column="2" Grid.Row="2"
|
||||||
Click="DeleteMemberButton_Click">
|
Click="DeleteMemberButton_Click">
|
||||||
<Button.ToolTip>
|
<Button.ToolTip>
|
||||||
@ -206,21 +216,21 @@
|
|||||||
</Button.ToolTip>
|
</Button.ToolTip>
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
<Button x:Name="SaveButton" Content="Speichern" IsEnabled="False" Visibility="Hidden"
|
<Button x:Name="SaveButton" Content="Speichern" IsEnabled="False" Visibility="{Binding EditingButtonsVisibility}"
|
||||||
HorizontalAlignment="Stretch" VerticalAlignment="Bottom" Margin="5,5,2.5,10" Grid.Column="0" Grid.Row="2"
|
HorizontalAlignment="Stretch" VerticalAlignment="Bottom" Margin="5,5,2.5,10" Grid.Column="0" Grid.Row="2"
|
||||||
Click="SaveButton_Click">
|
Click="SaveButton_Click">
|
||||||
<Button.ToolTip>
|
<Button.ToolTip>
|
||||||
<TextBlock FontWeight="Bold">Strg+S</TextBlock>
|
<TextBlock FontWeight="Bold">Strg+S</TextBlock>
|
||||||
</Button.ToolTip>
|
</Button.ToolTip>
|
||||||
</Button>
|
</Button>
|
||||||
<Button x:Name="ResetButton" Content="Zurücksetzen" IsEnabled="False" Visibility="Hidden"
|
<Button x:Name="ResetButton" Content="Zurücksetzen" IsEnabled="False" Visibility="{Binding EditingButtonsVisibility}"
|
||||||
HorizontalAlignment="Stretch" VerticalAlignment="Bottom" Margin="2.5,5,2.5,10" Grid.Column="1" Grid.Row="2"
|
HorizontalAlignment="Stretch" VerticalAlignment="Bottom" Margin="2.5,5,2.5,10" Grid.Column="1" Grid.Row="2"
|
||||||
Click="ResetButton_Click">
|
Click="ResetButton_Click">
|
||||||
<Button.ToolTip>
|
<Button.ToolTip>
|
||||||
<TextBlock FontWeight="Bold">Strg+Z</TextBlock>
|
<TextBlock FontWeight="Bold">Strg+Z</TextBlock>
|
||||||
</Button.ToolTip>
|
</Button.ToolTip>
|
||||||
</Button>
|
</Button>
|
||||||
<Button x:Name="CancelButton" Content="Abbrechen" IsEnabled="False" Visibility="Hidden" IsCancel="True"
|
<Button x:Name="CancelButton" Content="Abbrechen" IsEnabled="False" Visibility="{Binding EditingButtonsVisibility}" IsCancel="True"
|
||||||
HorizontalAlignment="Stretch" VerticalAlignment="Bottom" Margin="2.5,5,5,10" Grid.Column="2" Grid.Row="2"
|
HorizontalAlignment="Stretch" VerticalAlignment="Bottom" Margin="2.5,5,5,10" Grid.Column="2" Grid.Row="2"
|
||||||
Click="CancelButton_Click">
|
Click="CancelButton_Click">
|
||||||
<Button.ToolTip>
|
<Button.ToolTip>
|
||||||
@ -254,51 +264,62 @@
|
|||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
<Label Content="MgNr.:" Margin="10,10,0,0" Grid.Column="0"/>
|
<Label Content="MgNr.:" Margin="10,10,0,0" Grid.Column="0"/>
|
||||||
<TextBox x:Name="MgNrInput" Margin="0,10,0,0" Width="48" Grid.Column="1" TextAlignment="Right" HorizontalAlignment="Left"
|
<TextBox x:Name="MgNrInput" Text="{Binding MgNrString, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
||||||
|
Margin="0,10,0,0" Width="48" Grid.Column="1" TextAlignment="Right" HorizontalAlignment="Left"
|
||||||
TextChanged="MgNrInput_TextChanged" LostFocus="MgNrInput_LostFocus"/>
|
TextChanged="MgNrInput_TextChanged" LostFocus="MgNrInput_LostFocus"/>
|
||||||
|
|
||||||
<Label Content="Vorg.:" Margin="10,10,0,0" Grid.Column="2"/>
|
<Label Content="Vorg.:" Margin="10,10,0,0" Grid.Column="2"/>
|
||||||
<TextBox x:Name="PredecessorMgNrInput" Margin="0,10,10,0" Width="48" Grid.Column="3" TextAlignment="Right" HorizontalAlignment="Left"
|
<TextBox x:Name="PredecessorMgNrInput" Text="{Binding PredecessorMgNrString, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
||||||
|
Margin="0,10,10,0" Width="48" Grid.Column="3" TextAlignment="Right" HorizontalAlignment="Left"
|
||||||
TextChanged="PredecessorMgNrInput_TextChanged" LostFocus="PredecessorMgNrInput_LostFocus"/>
|
TextChanged="PredecessorMgNrInput_TextChanged" LostFocus="PredecessorMgNrInput_LostFocus"/>
|
||||||
<Button x:Name="MemberReferenceButton" Grid.Column="3" Height="25" Width="25" FontFamily="Segoe MDL2 Assets" Content="" Padding="0,0,0,0"
|
<Button x:Name="MemberReferenceButton" Grid.Column="3" Height="25" Width="25" FontFamily="Segoe MDL2 Assets" Content="" Padding="0,0,0,0"
|
||||||
Margin="53,10,10,10" VerticalAlignment="Top" HorizontalAlignment="Left" IsEnabled="False" ToolTip="Zu Vorgänger springen"
|
Margin="53,10,10,10" VerticalAlignment="Top" HorizontalAlignment="Left" IsEnabled="{Binding EnableMemberReferenceButton}" ToolTip="Zu Vorgänger springen"
|
||||||
Click="MemberReferenceButton_Click"/>
|
Click="MemberReferenceButton_Click"/>
|
||||||
|
|
||||||
<Label Content="Präfix:" Margin="10,40,0,0" Grid.Column="2"/>
|
<Label Content="Präfix:" Margin="10,40,0,0" Grid.Column="2"/>
|
||||||
<TextBox x:Name="PrefixInput" Margin="0,40,10,0" Grid.Column="3"
|
<TextBox x:Name="PrefixInput" Text="{Binding Prefix, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
||||||
|
Margin="0,40,10,0" Grid.Column="3"
|
||||||
TextChanged="TextBox_TextChanged"/>
|
TextChanged="TextBox_TextChanged"/>
|
||||||
|
|
||||||
<Label Content="Vorname:" Margin="10,40,0,0" Grid.Column="0"/>
|
<Label Content="Vorname:" Margin="10,40,0,0" Grid.Column="0"/>
|
||||||
<TextBox x:Name="GivenNameInput" Margin="0,40,0,0" Grid.Column="1"
|
<TextBox x:Name="GivenNameInput" Text="{Binding GivenName, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
||||||
|
Margin="0,40,0,0" Grid.Column="1"
|
||||||
TextChanged="TextBox_TextChanged"/>
|
TextChanged="TextBox_TextChanged"/>
|
||||||
|
|
||||||
<Label Content="Nachname:" Margin="10,70,0,0" Grid.Column="0"/>
|
<Label Content="Nachname:" Margin="10,70,0,0" Grid.Column="0"/>
|
||||||
<TextBox x:Name="FamilyNameInput" Margin="0,70,0,0" Grid.Column="1"
|
<TextBox x:Name="FamilyNameInput" Text="{Binding FamilyName, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
||||||
|
Margin="0,70,0,0" Grid.Column="1"
|
||||||
TextChanged="TextBox_TextChanged"/>
|
TextChanged="TextBox_TextChanged"/>
|
||||||
|
|
||||||
<Label Content="Suffix:" Margin="10,70,0,0" Grid.Column="2"/>
|
<Label Content="Suffix:" Margin="10,70,0,0" Grid.Column="2"/>
|
||||||
<TextBox x:Name="SuffixInput" Margin="0,70,10,0" Grid.Column="3"
|
<TextBox x:Name="SuffixInput" Text="{Binding Suffix, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
||||||
|
Margin="0,70,10,0" Grid.Column="3"
|
||||||
TextChanged="TextBox_TextChanged"/>
|
TextChanged="TextBox_TextChanged"/>
|
||||||
|
|
||||||
<Label Content="Geburtstag:" Margin="10,100,0,0" Grid.Column="0"/>
|
<Label Content="Geburtstag:" Margin="10,100,0,0" Grid.Column="0"/>
|
||||||
<TextBox x:Name="BirthdayInput" Margin="0,100,0,0" Grid.Column="1" Width="78" TextAlignment="Right" HorizontalAlignment="Left"
|
<TextBox x:Name="BirthdayInput" Text="{Binding Birthday, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
||||||
|
Margin="0,100,0,0" Grid.Column="1" Width="78" TextAlignment="Right" HorizontalAlignment="Left"
|
||||||
TextChanged="PartialDateInput_TextChanged" LostFocus="PartialDateInput_LostFocus"/>
|
TextChanged="PartialDateInput_TextChanged" LostFocus="PartialDateInput_LostFocus"/>
|
||||||
|
|
||||||
<Label Content="Alter:" Margin="85,100,0,0" Grid.Column="1" Grid.ColumnSpan="3"/>
|
<Label Content="Alter:" Margin="85,100,0,0" Grid.Column="1" Grid.ColumnSpan="3"/>
|
||||||
<TextBlock x:Name="Age" Text="-" Margin="119,104,0,0" Grid.Column="1" Grid.ColumnSpan="3" TextWrapping="NoWrap" VerticalAlignment="Top"/>
|
<TextBlock x:Name="Age" Text="{Binding Age, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
||||||
|
Margin="119,104,0,0" Grid.Column="1" Grid.ColumnSpan="3" TextWrapping="NoWrap" VerticalAlignment="Top"/>
|
||||||
|
|
||||||
<CheckBox x:Name="DeceasedInput" Content="Verstorben" IsEnabled="False"
|
<CheckBox x:Name="DeceasedInput" Content="Verstorben" IsChecked="{Binding IsDeceased, Mode=TwoWay}"
|
||||||
Checked="CheckBox_Changed" Unchecked="CheckBox_Changed"
|
Checked="CheckBox_Changed" Unchecked="CheckBox_Changed"
|
||||||
Grid.Column="3" HorizontalAlignment="Left" Margin="0,105,0,0" VerticalAlignment="Top" IsChecked="False"/>
|
Grid.Column="3" HorizontalAlignment="Left" Margin="0,105,0,0" VerticalAlignment="Top"/>
|
||||||
|
|
||||||
<Label Content="Adresse:" Margin="10,130,0,0"/>
|
<Label Content="Adresse:" Margin="10,130,0,0"/>
|
||||||
<TextBox x:Name="AddressInput" Margin="0,130,10,0" Grid.Column="1" Grid.ColumnSpan="3"
|
<TextBox x:Name="AddressInput" Text="{Binding Address, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
||||||
|
Margin="0,130,10,0" Grid.Column="1" Grid.ColumnSpan="3"
|
||||||
TextChanged="TextBox_TextChanged"/>
|
TextChanged="TextBox_TextChanged"/>
|
||||||
|
|
||||||
<Label Content="PLZ/Ort:" Margin="10,160,0,0" Grid.Column="0"/>
|
<Label Content="PLZ/Ort:" Margin="10,160,0,0" Grid.Column="0"/>
|
||||||
<TextBox x:Name="PlzInput" Margin="0,160,0,0" Width="42" Grid.Column="1" HorizontalAlignment="Left"
|
<TextBox x:Name="PlzInput" Margin="0,160,0,0" Text="{Binding PlzString, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
||||||
|
Width="42" Grid.Column="1" HorizontalAlignment="Left"
|
||||||
TextChanged="PlzInput_TextChanged" LostFocus="PlzInput_LostFocus" Tag="PLZ"/>
|
TextChanged="PlzInput_TextChanged" LostFocus="PlzInput_LostFocus" Tag="PLZ"/>
|
||||||
<ComboBox x:Name="OrtInput" ItemTemplate="{StaticResource PostalDestTemplate}" TextSearch.TextPath="Ort.Name"
|
<ComboBox x:Name="OrtInput" SelectedItem="{Binding Ort, Mode=TwoWay}" ItemsSource="{Binding OrtSource, Mode=TwoWay}"
|
||||||
|
ItemTemplate="{StaticResource PostalDestTemplate}" TextSearch.TextPath="Ort.Name"
|
||||||
Margin="47,160,10,0" Grid.Column="1" Grid.ColumnSpan="3"/>
|
Margin="47,160,10,0" Grid.Column="1" Grid.ColumnSpan="3"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
</GroupBox>
|
</GroupBox>
|
||||||
@ -311,93 +332,138 @@
|
|||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
<Label x:Name="EmailAddress1Label" Content="E-Mail-Adresse:" Margin="10,10,0,0" Grid.Column="0"/>
|
<Label x:Name="EmailAddress1Label" Content="E-Mail-Adresse:" Margin="10,10,0,0" Grid.Column="0"/>
|
||||||
<TextBox x:Name="EmailAddress1Input" Margin="0,10,10,0" Grid.Column="1" Grid.ColumnSpan="2"
|
<TextBox x:Name="EmailAddress1Input" Text="{Binding EmailAddresses[0], Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
||||||
|
Margin="0,10,10,0" Grid.Column="1" Grid.ColumnSpan="2"
|
||||||
TextChanged="EmailAddressInput_TextChanged" LostFocus="EmailAddressInput_LostFocus"/>
|
TextChanged="EmailAddressInput_TextChanged" LostFocus="EmailAddressInput_LostFocus"/>
|
||||||
|
|
||||||
<Label x:Name="EmailAddress2Label" Content="E-Mail-Adresse:" Margin="10,40,0,0" Grid.Column="0"/>
|
<Label x:Name="EmailAddress2Label" Content="E-Mail-Adresse:" Margin="10,40,0,0" Grid.Column="0"/>
|
||||||
<TextBox x:Name="EmailAddress2Input" Margin="0,40,10,0" Grid.Column="1" Grid.ColumnSpan="2"
|
<TextBox x:Name="EmailAddress2Input" Text="{Binding EmailAddresses[1], Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
||||||
|
Margin="0,40,10,0" Grid.Column="1" Grid.ColumnSpan="2"
|
||||||
TextChanged="EmailAddressInput_TextChanged" LostFocus="EmailAddressInput_LostFocus"/>
|
TextChanged="EmailAddressInput_TextChanged" LostFocus="EmailAddressInput_LostFocus"/>
|
||||||
|
|
||||||
<Label x:Name="EmailAddress3Label" Content="E-Mail-Adresse:" Margin="10,70,0,0" Grid.Column="0"/>
|
<Label x:Name="EmailAddress3Label" Content="E-Mail-Adresse:" Margin="10,70,0,0" Grid.Column="0"/>
|
||||||
<TextBox x:Name="EmailAddress3Input" Margin="0,70,10,0" Grid.Column="1" Grid.ColumnSpan="2"
|
<TextBox x:Name="EmailAddress3Input" Text="{Binding EmailAddresses[2], Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
||||||
|
Margin="0,70,10,0" Grid.Column="1" Grid.ColumnSpan="2"
|
||||||
TextChanged="EmailAddressInput_TextChanged" LostFocus="EmailAddressInput_LostFocus"/>
|
TextChanged="EmailAddressInput_TextChanged" LostFocus="EmailAddressInput_LostFocus"/>
|
||||||
|
|
||||||
<Label x:Name="EmailAddress4Label" Content="E-Mail-Adresse:" Margin="10,100,0,0" Grid.Column="0"/>
|
<Label x:Name="EmailAddress4Label" Content="E-Mail-Adresse:" Margin="10,100,0,0" Grid.Column="0"/>
|
||||||
<TextBox x:Name="EmailAddress4Input" Margin="0,100,10,0" Grid.Column="1" Grid.ColumnSpan="2"
|
<TextBox x:Name="EmailAddress4Input" Text="{Binding EmailAddresses[3], Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
||||||
|
Margin="0,100,10,0" Grid.Column="1" Grid.ColumnSpan="2"
|
||||||
TextChanged="EmailAddressInput_TextChanged" LostFocus="EmailAddressInput_LostFocus"/>
|
TextChanged="EmailAddressInput_TextChanged" LostFocus="EmailAddressInput_LostFocus"/>
|
||||||
|
|
||||||
<Label x:Name="EmailAddress5Label" Content="E-Mail-Adresse:" Margin="10,130,0,0" Grid.Column="0"/>
|
<Label x:Name="EmailAddress5Label" Content="E-Mail-Adresse:" Margin="10,130,0,0" Grid.Column="0"/>
|
||||||
<TextBox x:Name="EmailAddress5Input" Margin="0,130,10,0" Grid.Column="1" Grid.ColumnSpan="2"
|
<TextBox x:Name="EmailAddress5Input" Text="{Binding EmailAddresses[4], Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
||||||
|
Margin="0,130,10,0" Grid.Column="1" Grid.ColumnSpan="2"
|
||||||
TextChanged="EmailAddressInput_TextChanged" LostFocus="EmailAddressInput_LostFocus"/>
|
TextChanged="EmailAddressInput_TextChanged" LostFocus="EmailAddressInput_LostFocus"/>
|
||||||
|
|
||||||
<Label x:Name="EmailAddress6Label" Content="E-Mail-Adresse:" Margin="10,160,0,0" Grid.Column="0"/>
|
<Label x:Name="EmailAddress6Label" Content="E-Mail-Adresse:" Margin="10,160,0,0" Grid.Column="0"/>
|
||||||
<TextBox x:Name="EmailAddress6Input" Margin="0,160,10,0" Grid.Column="1" Grid.ColumnSpan="2"
|
<TextBox x:Name="EmailAddress6Input" Text="{Binding EmailAddresses[5], Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
||||||
|
Margin="0,160,10,0" Grid.Column="1" Grid.ColumnSpan="2"
|
||||||
TextChanged="EmailAddressInput_TextChanged" LostFocus="EmailAddressInput_LostFocus"/>
|
TextChanged="EmailAddressInput_TextChanged" LostFocus="EmailAddressInput_LostFocus"/>
|
||||||
|
|
||||||
<Label x:Name="EmailAddress7Label" Content="E-Mail-Adresse:" Margin="10,190,0,0" Grid.Column="0"/>
|
<Label x:Name="EmailAddress7Label" Content="E-Mail-Adresse:" Margin="10,190,0,0" Grid.Column="0"/>
|
||||||
<TextBox x:Name="EmailAddress7Input" Margin="0,190,10,0" Grid.Column="1" Grid.ColumnSpan="2"
|
<TextBox x:Name="EmailAddress7Input" Text="{Binding EmailAddresses[6], Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
||||||
|
Margin="0,190,10,0" Grid.Column="1" Grid.ColumnSpan="2"
|
||||||
TextChanged="EmailAddressInput_TextChanged" LostFocus="EmailAddressInput_LostFocus"/>
|
TextChanged="EmailAddressInput_TextChanged" LostFocus="EmailAddressInput_LostFocus"/>
|
||||||
|
|
||||||
<Label x:Name="EmailAddress8Label" Content="E-Mail-Adresse:" Margin="10,220,0,0" Grid.Column="0"/>
|
<Label x:Name="EmailAddress8Label" Content="E-Mail-Adresse:" Margin="10,220,0,0" Grid.Column="0"/>
|
||||||
<TextBox x:Name="EmailAddress8Input" Margin="0,220,10,0" Grid.Column="1" Grid.ColumnSpan="2"
|
<TextBox x:Name="EmailAddress8Input" Text="{Binding EmailAddresses[7], Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
||||||
|
Margin="0,220,10,0" Grid.Column="1" Grid.ColumnSpan="2"
|
||||||
TextChanged="EmailAddressInput_TextChanged" LostFocus="EmailAddressInput_LostFocus"/>
|
TextChanged="EmailAddressInput_TextChanged" LostFocus="EmailAddressInput_LostFocus"/>
|
||||||
|
|
||||||
<Label x:Name="EmailAddress9Label" Content="E-Mail-Adresse:" Margin="10,250,0,0" Grid.Column="0"/>
|
<Label x:Name="EmailAddress9Label" Content="E-Mail-Adresse:" Margin="10,250,0,0" Grid.Column="0"/>
|
||||||
<TextBox x:Name="EmailAddress9Input" Margin="0,250,10,0" Grid.Column="1" Grid.ColumnSpan="2"
|
<TextBox x:Name="EmailAddress9Input" Text="{Binding EmailAddresses[8], Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
||||||
|
Margin="0,250,10,0" Grid.Column="1" Grid.ColumnSpan="2"
|
||||||
TextChanged="EmailAddressInput_TextChanged" LostFocus="EmailAddressInput_LostFocus"/>
|
TextChanged="EmailAddressInput_TextChanged" LostFocus="EmailAddressInput_LostFocus"/>
|
||||||
|
|
||||||
<ComboBox x:Name="PhoneNr1TypeInput" DisplayMemberPath="Value" Margin="6,70,5,0" FontSize="12" Padding="6,4,4,4"/>
|
<ComboBox x:Name="PhoneNr1TypeInput" DisplayMemberPath="Value"
|
||||||
<TextBox x:Name="PhoneNr1Input" Margin="0,70,5,0" Grid.Column="1"
|
SelectedIndex="{Binding PhoneNrs[0].Type, Mode=TwoWay}" ItemsSource="{Binding PhoneNrTypes}"
|
||||||
|
Margin="6,70,5,0" FontSize="12" Padding="6,4,4,4"/>
|
||||||
|
<TextBox x:Name="PhoneNr1Input" Text="{Binding PhoneNrs[0].Number, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
||||||
|
Margin="0,70,5,0" Grid.Column="1"
|
||||||
TextChanged="PhoneNrInput_TextChanged" LostFocus="PhoneNrInput_LostFocus"/>
|
TextChanged="PhoneNrInput_TextChanged" LostFocus="PhoneNrInput_LostFocus"/>
|
||||||
<TextBox x:Name="PhoneNr1CommentInput" Margin="0,70,10,0" Grid.Column="2"
|
<TextBox x:Name="PhoneNr1CommentInput" Text="{Binding PhoneNrs[0].Comment, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
||||||
|
Margin="0,70,10,0" Grid.Column="2"
|
||||||
TextChanged="TextBox_TextChanged"/>
|
TextChanged="TextBox_TextChanged"/>
|
||||||
|
|
||||||
<ComboBox x:Name="PhoneNr2TypeInput" DisplayMemberPath="Value" Margin="6,100,5,0" FontSize="12" Padding="6,4,4,4"/>
|
<ComboBox x:Name="PhoneNr2TypeInput" DisplayMemberPath="Value"
|
||||||
<TextBox x:Name="PhoneNr2Input" Margin="0,100,5,0" Grid.Column="1"
|
SelectedIndex="{Binding PhoneNrs[1].Type, Mode=TwoWay}" ItemsSource="{Binding PhoneNrTypes}"
|
||||||
|
Margin="6,100,5,0" FontSize="12" Padding="6,4,4,4"/>
|
||||||
|
<TextBox x:Name="PhoneNr2Input" Text="{Binding PhoneNrs[1].Number, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
||||||
|
Margin="0,100,5,0" Grid.Column="1"
|
||||||
TextChanged="PhoneNrInput_TextChanged" LostFocus="PhoneNrInput_LostFocus"/>
|
TextChanged="PhoneNrInput_TextChanged" LostFocus="PhoneNrInput_LostFocus"/>
|
||||||
<TextBox x:Name="PhoneNr2CommentInput" Margin="0,100,10,0" Grid.Column="2"
|
<TextBox x:Name="PhoneNr2CommentInput" Text="{Binding PhoneNrs[1].Comment, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
||||||
|
Margin="0,100,10,0" Grid.Column="2"
|
||||||
TextChanged="TextBox_TextChanged"/>
|
TextChanged="TextBox_TextChanged"/>
|
||||||
|
|
||||||
<ComboBox x:Name="PhoneNr3TypeInput" DisplayMemberPath="Value" Margin="6,130,5,0" FontSize="12" Padding="6,4,4,4"/>
|
<ComboBox x:Name="PhoneNr3TypeInput" DisplayMemberPath="Value"
|
||||||
<TextBox x:Name="PhoneNr3Input" Margin="0,130,5,0" Grid.Column="1"
|
SelectedIndex="{Binding PhoneNrs[2].Type, Mode=TwoWay}" ItemsSource="{Binding PhoneNrTypes}"
|
||||||
|
Margin="6,130,5,0" FontSize="12" Padding="6,4,4,4"/>
|
||||||
|
<TextBox x:Name="PhoneNr3Input" Text="{Binding PhoneNrs[2].Number, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
||||||
|
Margin="0,130,5,0" Grid.Column="1"
|
||||||
TextChanged="PhoneNrInput_TextChanged" LostFocus="PhoneNrInput_LostFocus"/>
|
TextChanged="PhoneNrInput_TextChanged" LostFocus="PhoneNrInput_LostFocus"/>
|
||||||
<TextBox x:Name="PhoneNr3CommentInput" Margin="0,130,10,0" Grid.Column="2"
|
<TextBox x:Name="PhoneNr3CommentInput" Text="{Binding PhoneNrs[2].Comment, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
||||||
|
Margin="0,130,10,0" Grid.Column="2"
|
||||||
TextChanged="TextBox_TextChanged"/>
|
TextChanged="TextBox_TextChanged"/>
|
||||||
|
|
||||||
<ComboBox x:Name="PhoneNr4TypeInput" DisplayMemberPath="Value" Margin="6,160,5,0" FontSize="12" Padding="6,4,4,4"/>
|
<ComboBox x:Name="PhoneNr4TypeInput" DisplayMemberPath="Value"
|
||||||
<TextBox x:Name="PhoneNr4Input" Margin="0,160,5,0" Grid.Column="1"
|
SelectedIndex="{Binding PhoneNrs[3].Type, Mode=TwoWay}" ItemsSource="{Binding PhoneNrTypes}"
|
||||||
|
Margin="6,160,5,0" FontSize="12" Padding="6,4,4,4"/>
|
||||||
|
<TextBox x:Name="PhoneNr4Input" Text="{Binding PhoneNrs[3].Number, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
||||||
|
Margin="0,160,5,0" Grid.Column="1"
|
||||||
TextChanged="PhoneNrInput_TextChanged" LostFocus="PhoneNrInput_LostFocus"/>
|
TextChanged="PhoneNrInput_TextChanged" LostFocus="PhoneNrInput_LostFocus"/>
|
||||||
<TextBox x:Name="PhoneNr4CommentInput" Margin="0,160,10,0" Grid.Column="2"
|
<TextBox x:Name="PhoneNr4CommentInput" Text="{Binding PhoneNrs[3].Comment, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
||||||
|
Margin="0,160,10,0" Grid.Column="2"
|
||||||
TextChanged="TextBox_TextChanged"/>
|
TextChanged="TextBox_TextChanged"/>
|
||||||
|
|
||||||
<ComboBox x:Name="PhoneNr5TypeInput" DisplayMemberPath="Value" Margin="6,190,5,0" FontSize="12" Padding="6,4,4,4"/>
|
<ComboBox x:Name="PhoneNr5TypeInput" DisplayMemberPath="Value"
|
||||||
<TextBox x:Name="PhoneNr5Input" Margin="0,190,5,0" Grid.Column="1"
|
SelectedIndex="{Binding PhoneNrs[4].Type, Mode=TwoWay}" ItemsSource="{Binding PhoneNrTypes}"
|
||||||
|
Margin="6,190,5,0" FontSize="12" Padding="6,4,4,4"/>
|
||||||
|
<TextBox x:Name="PhoneNr5Input" Text="{Binding PhoneNrs[4].Number, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
||||||
|
Margin="0,190,5,0" Grid.Column="1"
|
||||||
TextChanged="PhoneNrInput_TextChanged" LostFocus="PhoneNrInput_LostFocus"/>
|
TextChanged="PhoneNrInput_TextChanged" LostFocus="PhoneNrInput_LostFocus"/>
|
||||||
<TextBox x:Name="PhoneNr5CommentInput" Margin="0,190,10,0" Grid.Column="2"
|
<TextBox x:Name="PhoneNr5CommentInput" Text="{Binding PhoneNrs[4].Comment, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
||||||
|
Margin="0,190,10,0" Grid.Column="2"
|
||||||
TextChanged="TextBox_TextChanged"/>
|
TextChanged="TextBox_TextChanged"/>
|
||||||
|
|
||||||
<ComboBox x:Name="PhoneNr6TypeInput" DisplayMemberPath="Value" Margin="6,220,5,0" FontSize="12" Padding="6,4,4,4"/>
|
<ComboBox x:Name="PhoneNr6TypeInput" DisplayMemberPath="Value"
|
||||||
<TextBox x:Name="PhoneNr6Input" Margin="0,220,5,0" Grid.Column="1"
|
SelectedIndex="{Binding PhoneNrs[5].Type, Mode=TwoWay}" ItemsSource="{Binding PhoneNrTypes}"
|
||||||
|
Margin="6,220,5,0" FontSize="12" Padding="6,4,4,4"/>
|
||||||
|
<TextBox x:Name="PhoneNr6Input" Text="{Binding PhoneNrs[5].Number, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
||||||
|
Margin="0,220,5,0" Grid.Column="1"
|
||||||
TextChanged="PhoneNrInput_TextChanged" LostFocus="PhoneNrInput_LostFocus"/>
|
TextChanged="PhoneNrInput_TextChanged" LostFocus="PhoneNrInput_LostFocus"/>
|
||||||
<TextBox x:Name="PhoneNr6CommentInput" Margin="0,220,10,0" Grid.Column="2"
|
<TextBox x:Name="PhoneNr6CommentInput" Text="{Binding PhoneNrs[5].Comment, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
||||||
|
Margin="0,220,10,0" Grid.Column="2"
|
||||||
TextChanged="TextBox_TextChanged"/>
|
TextChanged="TextBox_TextChanged"/>
|
||||||
|
|
||||||
<ComboBox x:Name="PhoneNr7TypeInput" DisplayMemberPath="Value" Margin="6,250,5,0" FontSize="12" Padding="6,4,4,4"/>
|
<ComboBox x:Name="PhoneNr7TypeInput" DisplayMemberPath="Value"
|
||||||
<TextBox x:Name="PhoneNr7Input" Margin="0,250,5,0" Grid.Column="1"
|
SelectedIndex="{Binding PhoneNrs[6].Type, Mode=TwoWay}" ItemsSource="{Binding PhoneNrTypes}"
|
||||||
|
Margin="6,250,5,0" FontSize="12" Padding="6,4,4,4"/>
|
||||||
|
<TextBox x:Name="PhoneNr7Input" Text="{Binding PhoneNrs[6].Number, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
||||||
|
Margin="0,250,5,0" Grid.Column="1"
|
||||||
TextChanged="PhoneNrInput_TextChanged" LostFocus="PhoneNrInput_LostFocus"/>
|
TextChanged="PhoneNrInput_TextChanged" LostFocus="PhoneNrInput_LostFocus"/>
|
||||||
<TextBox x:Name="PhoneNr7CommentInput" Margin="0,250,10,0" Grid.Column="2"
|
<TextBox x:Name="PhoneNr7CommentInput" Text="{Binding PhoneNrs[6].Comment, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
||||||
|
Margin="0,250,10,0" Grid.Column="2"
|
||||||
TextChanged="TextBox_TextChanged"/>
|
TextChanged="TextBox_TextChanged"/>
|
||||||
|
|
||||||
<ComboBox x:Name="PhoneNr8TypeInput" DisplayMemberPath="Value" Margin="6,280,5,0" FontSize="12" Padding="6,4,4,4"/>
|
<ComboBox x:Name="PhoneNr8TypeInput" DisplayMemberPath="Value"
|
||||||
<TextBox x:Name="PhoneNr8Input" Margin="0,280,5,0" Grid.Column="1"
|
SelectedIndex="{Binding PhoneNrs[7].Type, Mode=TwoWay}" ItemsSource="{Binding PhoneNrTypes}"
|
||||||
|
Margin="6,280,5,0" FontSize="12" Padding="6,4,4,4"/>
|
||||||
|
<TextBox x:Name="PhoneNr8Input" Text="{Binding PhoneNrs[7].Number, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
||||||
|
Margin="0,280,5,0" Grid.Column="1"
|
||||||
TextChanged="PhoneNrInput_TextChanged" LostFocus="PhoneNrInput_LostFocus"/>
|
TextChanged="PhoneNrInput_TextChanged" LostFocus="PhoneNrInput_LostFocus"/>
|
||||||
<TextBox x:Name="PhoneNr8CommentInput" Margin="0,280,10,0" Grid.Column="2"
|
<TextBox x:Name="PhoneNr8CommentInput" Text="{Binding PhoneNrs[7].Comment, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
||||||
|
Margin="0,280,10,0" Grid.Column="2"
|
||||||
TextChanged="TextBox_TextChanged"/>
|
TextChanged="TextBox_TextChanged"/>
|
||||||
|
|
||||||
<ComboBox x:Name="PhoneNr9TypeInput" DisplayMemberPath="Value" Margin="6,310,5,0" FontSize="12" Padding="6,4,4,4"/>
|
<ComboBox x:Name="PhoneNr9TypeInput" DisplayMemberPath="Value"
|
||||||
<TextBox x:Name="PhoneNr9Input" Margin="0,310,5,0" Grid.Column="1"
|
SelectedIndex="{Binding PhoneNrs[8].Type, Mode=TwoWay}" ItemsSource="{Binding PhoneNrTypes}"
|
||||||
|
Margin="6,310,5,0" FontSize="12" Padding="6,4,4,4"/>
|
||||||
|
<TextBox x:Name="PhoneNr9Input" Text="{Binding PhoneNrs[8].Number, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
||||||
|
Margin="0,310,5,0" Grid.Column="1"
|
||||||
TextChanged="PhoneNrInput_TextChanged" LostFocus="PhoneNrInput_LostFocus"/>
|
TextChanged="PhoneNrInput_TextChanged" LostFocus="PhoneNrInput_LostFocus"/>
|
||||||
<TextBox x:Name="PhoneNr9CommentInput" Margin="0,280,10,0" Grid.Column="2"
|
<TextBox x:Name="PhoneNr9CommentInput" Text="{Binding PhoneNrs[8].Comment, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
||||||
|
Margin="0,280,10,0" Grid.Column="2"
|
||||||
TextChanged="TextBox_TextChanged"/>
|
TextChanged="TextBox_TextChanged"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
</GroupBox>
|
</GroupBox>
|
||||||
@ -409,11 +475,13 @@
|
|||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
<Label Content="IBAN:" Margin="10,10,0,0" Grid.Column="0"/>
|
<Label Content="IBAN:" Margin="10,10,0,0" Grid.Column="0"/>
|
||||||
<TextBox x:Name="IbanInput" Margin="0,10,10,0" Grid.Column="1" Width="290" HorizontalAlignment="Left"
|
<TextBox x:Name="IbanInput" Text="{Binding Iban, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
||||||
|
Margin="0,10,10,0" Grid.Column="1" Width="290" HorizontalAlignment="Left"
|
||||||
TextChanged="IbanInput_TextChanged" LostFocus="IbanInput_LostFocus"/>
|
TextChanged="IbanInput_TextChanged" LostFocus="IbanInput_LostFocus"/>
|
||||||
|
|
||||||
<Label Content="BIC:" Margin="10,40,0,0" Grid.Column="0"/>
|
<Label Content="BIC:" Margin="10,40,0,0" Grid.Column="0"/>
|
||||||
<TextBox x:Name="BicInput" Margin="0,40,10,0" Grid.Column="1" Width="150" HorizontalAlignment="Left"
|
<TextBox x:Name="BicInput" Text="{Binding Bic, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
||||||
|
Margin="0,40,10,0" Grid.Column="1" Width="150" HorizontalAlignment="Left"
|
||||||
TextChanged="BicInput_TextChanged" LostFocus="BicInput_LostFocus"/>
|
TextChanged="BicInput_TextChanged" LostFocus="BicInput_LostFocus"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
</GroupBox>
|
</GroupBox>
|
||||||
@ -426,21 +494,24 @@
|
|||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
<Label Content="UID:" Margin="10,10,0,0" Grid.Column="0"/>
|
<Label Content="UID:" Margin="10,10,0,0" Grid.Column="0"/>
|
||||||
<TextBox x:Name="UstIdNrInput" Margin="0,10,10,0" Grid.Column="1" Width="96" HorizontalAlignment="Left"
|
<TextBox x:Name="UstIdNrInput" Text="{Binding UstIdNr, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
||||||
|
Margin="0,10,10,0" Grid.Column="1" Width="96" HorizontalAlignment="Left"
|
||||||
TextChanged="UstIdNrInput_TextChanged" LostFocus="UstIdNrInput_LostFocus"/>
|
TextChanged="UstIdNrInput_TextChanged" LostFocus="UstIdNrInput_LostFocus"/>
|
||||||
|
|
||||||
<Label Content="Betriebs-Nr.:" Margin="10,40,0,0" Grid.Column="0"/>
|
<Label Content="Betriebs-Nr.:" Margin="10,40,0,0" Grid.Column="0"/>
|
||||||
<TextBox x:Name="LfbisNrInput" Margin="0,40,10,0" Grid.Column="1" Width="64" HorizontalAlignment="Left" TextAlignment="Right"
|
<TextBox x:Name="LfbisNrInput" Text="{Binding LfbisNr, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
||||||
|
Margin="0,40,10,0" Grid.Column="1" Width="64" HorizontalAlignment="Left" TextAlignment="Right"
|
||||||
TextChanged="LfbisNrInput_TextChanged" LostFocus="LfbisNrInput_LostFocus"/>
|
TextChanged="LfbisNrInput_TextChanged" LostFocus="LfbisNrInput_LostFocus"/>
|
||||||
|
|
||||||
<CheckBox x:Name="BuchführendInput" Content="Buchführend" IsEnabled="False"
|
<CheckBox x:Name="BuchführendInput" Content="Buchführend" IsChecked="{Binding IsBuchführend, Mode=TwoWay}" IsEnabled="False"
|
||||||
Checked="CheckBox_Changed" Unchecked="CheckBox_Changed"
|
Checked="CheckBox_Changed" Unchecked="CheckBox_Changed"
|
||||||
Grid.Column="2" HorizontalAlignment="Left" Margin="10,15,0,0" VerticalAlignment="Top" IsChecked="False"/>
|
Grid.Column="2" HorizontalAlignment="Left" Margin="10,15,0,0" VerticalAlignment="Top"/>
|
||||||
|
|
||||||
<CheckBox x:Name="OrganicInput" Content="Bio" IsEnabled="False"
|
<CheckBox x:Name="OrganicInput" Content="Bio" IsChecked="{Binding IsOrganic, Mode=TwoWay}" IsEnabled="False"
|
||||||
Checked="CheckBox_Changed" Unchecked="CheckBox_Changed"
|
Checked="CheckBox_Changed" Unchecked="CheckBox_Changed"
|
||||||
Grid.Column="2" HorizontalAlignment="Left" Margin="10,45,0,0" VerticalAlignment="Top" IsChecked="False"/>
|
Grid.Column="2" HorizontalAlignment="Left" Margin="10,45,0,0" VerticalAlignment="Top"/>
|
||||||
<Button x:Name="OrganicButton" Content="easy-cert.com" Height="25" FontSize="12" IsEnabled="False"
|
<Button x:Name="OrganicButton" Content="easy-cert.com" IsEnabled="{Binding IsMemberSelected}"
|
||||||
|
Height="25" FontSize="12"
|
||||||
Click="OrganicButton_Click"
|
Click="OrganicButton_Click"
|
||||||
Grid.Column="2" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="60,40,0,0"/>
|
Grid.Column="2" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="60,40,0,0"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
@ -453,17 +524,21 @@
|
|||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
<Label Content="Name:" Margin="10,10,0,0" Grid.Column="0"/>
|
<Label Content="Name:" Margin="10,10,0,0" Grid.Column="0"/>
|
||||||
<TextBox x:Name="BillingNameInput" Margin="0,10,10,10" Grid.Column="1" Grid.ColumnSpan="2"
|
<TextBox x:Name="BillingNameInput" Text="{Binding BillingName, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
||||||
|
Margin="0,10,10,10" Grid.Column="1" Grid.ColumnSpan="2"
|
||||||
TextChanged="TextBox_TextChanged"/>
|
TextChanged="TextBox_TextChanged"/>
|
||||||
|
|
||||||
<Label Content="Adresse:" Margin="10,40,0,0" Grid.Column="0"/>
|
<Label Content="Adresse:" Margin="10,40,0,0" Grid.Column="0"/>
|
||||||
<TextBox x:Name="BillingAddressInput" Margin="0,40,10,0" Grid.Column="1"
|
<TextBox x:Name="BillingAddressInput" Text="{Binding BillingAddress, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
||||||
|
Margin="0,40,10,0" Grid.Column="1"
|
||||||
TextChanged="TextBox_TextChanged"/>
|
TextChanged="TextBox_TextChanged"/>
|
||||||
|
|
||||||
<Label Content="PLZ/Ort:" Margin="10,70,0,0" Grid.Column="0"/>
|
<Label Content="PLZ/Ort:" Margin="10,70,0,0" Grid.Column="0"/>
|
||||||
<TextBox x:Name="BillingPlzInput" Margin="0,70,0,0" Width="42" Grid.Column="1" HorizontalAlignment="Left"
|
<TextBox x:Name="BillingPlzInput" Text="{Binding BillingPlzString, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
||||||
|
Margin="0,70,0,0" Width="42" Grid.Column="1" HorizontalAlignment="Left"
|
||||||
TextChanged="PlzInput_TextChanged" LostFocus="PlzInput_LostFocus" Tag="PLZ"/>
|
TextChanged="PlzInput_TextChanged" LostFocus="PlzInput_LostFocus" Tag="PLZ"/>
|
||||||
<ComboBox x:Name="BillingOrtInput" ItemTemplate="{StaticResource PostalDestTemplate}" TextSearch.TextPath="Ort.Name"
|
<ComboBox x:Name="BillingOrtInput" SelectedItem="{Binding BillingOrt, Mode=TwoWay}" ItemsSource="{Binding BillingOrtSource, Mode=TwoWay}"
|
||||||
|
ItemTemplate="{StaticResource PostalDestTemplate}" TextSearch.TextPath="Ort.Name"
|
||||||
Margin="47,70,10,0" Grid.Column="1"/>
|
Margin="47,70,10,0" Grid.Column="1"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
</GroupBox>
|
</GroupBox>
|
||||||
@ -476,60 +551,69 @@
|
|||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
<Label Content="Eintritt:" Margin="10,10,0,0" Grid.Column="0"/>
|
<Label Content="Eintritt:" Margin="10,10,0,0" Grid.Column="0"/>
|
||||||
<TextBox x:Name="EntryDateInput" Margin="0,10,10,0" Width="78" Grid.Column="1" HorizontalAlignment="Left" TextAlignment="Right"
|
<TextBox x:Name="EntryDateInput" Text="{Binding EntryDate, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
||||||
|
Margin="0,10,10,0" Width="78" Grid.Column="1" HorizontalAlignment="Left" TextAlignment="Right"
|
||||||
TextChanged="DateInput_TextChanged" LostFocus="DateInput_LostFocus"/>
|
TextChanged="DateInput_TextChanged" LostFocus="DateInput_LostFocus"/>
|
||||||
|
|
||||||
<Label Content="Austritt:" Margin="10,40,0,0" Grid.Column="0"/>
|
<Label Content="Austritt:" Margin="10,40,0,0" Grid.Column="0"/>
|
||||||
<TextBox x:Name="ExitDateInput" Margin="0,40,10,0" Width="78" Grid.Column="1" HorizontalAlignment="Left" TextAlignment="Right"
|
<TextBox x:Name="ExitDateInput" Text="{Binding ExitDate, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
||||||
|
Margin="0,40,10,0" Width="78" Grid.Column="1" HorizontalAlignment="Left" TextAlignment="Right"
|
||||||
TextChanged="DateInput_TextChanged" LostFocus="DateInput_LostFocus"/>
|
TextChanged="DateInput_TextChanged" LostFocus="DateInput_LostFocus"/>
|
||||||
|
|
||||||
<Label Content="Geschäftsanteile:" Margin="10,70,0,0" Grid.Column="0"/>
|
<Label Content="Geschäftsanteile:" Margin="10,70,0,0" Grid.Column="0"/>
|
||||||
<TextBox x:Name="BusinessSharesInput" Margin="0,70,10,0" Width="48" Grid.Column="1" HorizontalAlignment="Left" TextAlignment="Right"
|
<TextBox x:Name="BusinessSharesInput" Text="{Binding BusinessSharesString, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
||||||
|
Margin="0,70,10,0" Width="48" Grid.Column="1" HorizontalAlignment="Left" TextAlignment="Right"
|
||||||
TextChanged="IntegerInput_TextChanged"/>
|
TextChanged="IntegerInput_TextChanged"/>
|
||||||
|
|
||||||
<Label Content="BH-Konto:" Margin="10,100,0,0" Grid.Column="0"/>
|
<Label Content="BH-Konto:" Margin="10,100,0,0" Grid.Column="0"/>
|
||||||
<TextBox x:Name="AccountingNrInput" Margin="0,100,10,0" Grid.Column="1"
|
<TextBox x:Name="AccountingNrInput" Text="{Binding AccountingNr, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
||||||
|
Margin="0,100,10,0" Grid.Column="1"
|
||||||
TextChanged="TextBox_TextChanged"/>
|
TextChanged="TextBox_TextChanged"/>
|
||||||
|
|
||||||
<CheckBox x:Name="ActiveInput" Content="Aktiv" IsEnabled="False"
|
<CheckBox x:Name="ActiveInput" Content="Aktiv" IsChecked="{Binding IsActive, Mode=TwoWay}" IsEnabled="False"
|
||||||
Checked="ActiveInput_Changed" Unchecked="ActiveInput_Changed"
|
Checked="ActiveInput_Changed" Unchecked="ActiveInput_Changed"
|
||||||
Grid.Column="2" HorizontalAlignment="Left" Margin="10,15,0,0" VerticalAlignment="Top" IsChecked="False"/>
|
Grid.Column="2" HorizontalAlignment="Left" Margin="10,15,0,0" VerticalAlignment="Top"/>
|
||||||
|
|
||||||
<CheckBox x:Name="VollLieferantInput" Content="Volllieferant" IsEnabled="False"
|
<CheckBox x:Name="VollLieferantInput" Content="Volllieferant" IsChecked="{Binding IsVollLieferant, Mode=TwoWay}" IsEnabled="False"
|
||||||
Checked="CheckBox_Changed" Unchecked="CheckBox_Changed"
|
Checked="CheckBox_Changed" Unchecked="CheckBox_Changed"
|
||||||
Grid.Column="2" HorizontalAlignment="Left" Margin="10,45,0,0" VerticalAlignment="Top" IsChecked="False"/>
|
Grid.Column="2" HorizontalAlignment="Left" Margin="10,45,0,0" VerticalAlignment="Top"/>
|
||||||
|
|
||||||
<CheckBox x:Name="FunkionärInput" Content="Funktionär" IsEnabled="False"
|
<CheckBox x:Name="FunkionärInput" Content="Funktionär" IsChecked="{Binding IsFunktionär, Mode=TwoWay}" IsEnabled="False"
|
||||||
Checked="CheckBox_Changed" Unchecked="CheckBox_Changed"
|
Checked="CheckBox_Changed" Unchecked="CheckBox_Changed"
|
||||||
Grid.Column="2" HorizontalAlignment="Left" Margin="10,75,0,0" VerticalAlignment="Top" IsChecked="False"/>
|
Grid.Column="2" HorizontalAlignment="Left" Margin="10,75,0,0" VerticalAlignment="Top"/>
|
||||||
|
|
||||||
<Label Content="Stamm-Zwst.:" Margin="10,130,0,0" Grid.Column="0"/>
|
<Label Content="Stamm-Zwst.:" Margin="10,130,0,0" Grid.Column="0"/>
|
||||||
<ComboBox x:Name="BranchInput" DisplayMemberPath="Name" TextSearch.TextPath="Name"
|
<ComboBox x:Name="BranchInput" SelectedItem="{Binding Branch, Mode=TwoWay}" ItemsSource="{Binding BranchSource, Mode=TwoWay}"
|
||||||
|
DisplayMemberPath="Name" TextSearch.TextPath="Name"
|
||||||
Margin="0,130,10,0" Grid.Column="1" Grid.ColumnSpan="2"/>
|
Margin="0,130,10,0" Grid.Column="1" Grid.ColumnSpan="2"/>
|
||||||
|
|
||||||
<Label Content="Stammgemeinde:" Margin="10,160,0,0" Grid.Column="0"/>
|
<Label Content="Stammgemeinde:" Margin="10,160,0,0" Grid.Column="0"/>
|
||||||
<ComboBox x:Name="DefaultKgInput" DisplayMemberPath="Name" TextSearch.TextPath="Name"
|
<ComboBox x:Name="DefaultKgInput" SelectedItem="{Binding DefaultKg, Mode=TwoWay}" ItemsSource="{Binding DefaultKgSource, Mode=TwoWay}"
|
||||||
|
DisplayMemberPath="Name" TextSearch.TextPath="Name"
|
||||||
Margin="0,160,40,10" Grid.Column="1" Grid.ColumnSpan="2"/>
|
Margin="0,160,40,10" Grid.Column="1" Grid.ColumnSpan="2"/>
|
||||||
<Button x:Name="KgDetailsButton" Content="" FontFamily="Segoe MDL2 Assets" FontSize="14" Padding="0,1,0,0"
|
<Button x:Name="KgDetailsButton" Content="" FontFamily="Segoe MDL2 Assets" FontSize="14" Padding="0,1,0,0"
|
||||||
Click="KgDetailsButton_Click"
|
Click="KgDetailsButton_Click"
|
||||||
Grid.Column="2" VerticalAlignment="Top" HorizontalAlignment="Right" Width="25" Height="25" Margin="10,160,10,10"/>
|
Grid.Column="2" VerticalAlignment="Top" HorizontalAlignment="Right" Width="25" Height="25" Margin="10,160,10,10"/>
|
||||||
|
|
||||||
<Label Content="Anmerkung:" Margin="10,190,0,0" Grid.Column="0"/>
|
<Label Content="Anmerkung:" Margin="10,190,0,0" Grid.Column="0"/>
|
||||||
<TextBox x:Name="CommentInput" Margin="0,190,10,70" Grid.Column="1" Grid.ColumnSpan="2"
|
<TextBox x:Name="CommentInput" Text="{Binding Comment, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
||||||
|
Margin="0,190,10,70" Grid.Column="1" Grid.ColumnSpan="2"
|
||||||
TextChanged="TextBox_TextChanged"
|
TextChanged="TextBox_TextChanged"
|
||||||
VerticalAlignment="Stretch" Height="auto" AcceptsReturn="True" TextWrapping="Wrap" VerticalScrollBarVisibility="Visible"/>
|
VerticalAlignment="Stretch" Height="auto" AcceptsReturn="True" TextWrapping="Wrap" VerticalScrollBarVisibility="Visible"/>
|
||||||
|
|
||||||
<Label Content="Kontaktart:" Margin="10,10,0,10" Grid.Column="0" VerticalAlignment="Bottom"/>
|
<Label Content="Kontaktart:" Margin="10,10,0,10" Grid.Column="0" VerticalAlignment="Bottom"/>
|
||||||
<CheckBox x:Name="ContactPostalInput" Content="Post" IsEnabled="False"
|
<CheckBox x:Name="ContactPostalInput" Content="Post" IsChecked="{Binding ContactViaPost, Mode=TwoWay}" IsEnabled="False"
|
||||||
Checked="CheckBox_Changed" Unchecked="CheckBox_Changed"
|
Checked="CheckBox_Changed" Unchecked="CheckBox_Changed"
|
||||||
HorizontalAlignment="Left" Margin="0,0,0,15" VerticalAlignment="Bottom" Grid.Column="1" Grid.ColumnSpan="2"/>
|
HorizontalAlignment="Left" Margin="0,0,0,15" VerticalAlignment="Bottom" Grid.Column="1" Grid.ColumnSpan="2"/>
|
||||||
<CheckBox x:Name="ContactEmailInput" Content="E-Mail" IsEnabled="False"
|
<CheckBox x:Name="ContactEmailInput" Content="E-Mail" IsChecked="{Binding ContactViaEmail, Mode=TwoWay}" IsEnabled="False"
|
||||||
Checked="ContactEmailInput_Changed" Unchecked="ContactEmailInput_Changed"
|
Checked="ContactEmailInput_Changed" Unchecked="ContactEmailInput_Changed"
|
||||||
HorizontalAlignment="Left" Margin="60,0,0,15" VerticalAlignment="Bottom" Grid.Column="1" Grid.ColumnSpan="2"/>
|
HorizontalAlignment="Left" Margin="60,0,0,15" VerticalAlignment="Bottom" Grid.Column="1" Grid.ColumnSpan="2"/>
|
||||||
|
|
||||||
<Button x:Name="DeliveryButton" Content="Lieferungen" Click="DeliveryButton_Click" IsEnabled="False"
|
<Button x:Name="DeliveryButton" Content="Lieferungen" IsEnabled="{Binding IsMemberSelected}"
|
||||||
|
Click="DeliveryButton_Click"
|
||||||
HorizontalAlignment="Right" Margin="10,00,10,37" Width="150" VerticalAlignment="Bottom" Grid.ColumnSpan="3"/>
|
HorizontalAlignment="Right" Margin="10,00,10,37" Width="150" VerticalAlignment="Bottom" Grid.ColumnSpan="3"/>
|
||||||
<Button x:Name="AreaCommitmentButton" Content="Flächenbindungen" Click="AreaCommitmentButton_Click" IsEnabled="False"
|
<Button x:Name="AreaCommitmentButton" Content="Flächenbindungen" IsEnabled="{Binding IsMemberSelected}"
|
||||||
|
Click="AreaCommitmentButton_Click"
|
||||||
HorizontalAlignment="Right" Margin="10,10,10,5" Width="150" VerticalAlignment="Bottom" Grid.ColumnSpan="3"/>
|
HorizontalAlignment="Right" Margin="10,10,10,5" Width="150" VerticalAlignment="Bottom" Grid.ColumnSpan="3"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
</GroupBox>
|
</GroupBox>
|
||||||
@ -554,23 +638,23 @@
|
|||||||
</ItemsPanelTemplate>
|
</ItemsPanelTemplate>
|
||||||
</StatusBar.ItemsPanel>
|
</StatusBar.ItemsPanel>
|
||||||
<StatusBarItem>
|
<StatusBarItem>
|
||||||
<TextBlock Name="StatusMembers" Text="Mitglieder: -"/>
|
<TextBlock Name="StatusMembers" Text="{Binding StatusMembers}"/>
|
||||||
</StatusBarItem>
|
</StatusBarItem>
|
||||||
<Separator Grid.Column="1"/>
|
<Separator Grid.Column="1"/>
|
||||||
<StatusBarItem Grid.Column="2">
|
<StatusBarItem Grid.Column="2">
|
||||||
<TextBlock Name="StatusBusinessShares" Text="Geschäftsanteile: -"/>
|
<TextBlock Name="StatusBusinessShares" Text="{Binding StatusBusinessShares}"/>
|
||||||
</StatusBarItem>
|
</StatusBarItem>
|
||||||
<Separator Grid.Column="3"/>
|
<Separator Grid.Column="3"/>
|
||||||
<StatusBarItem Grid.Column="4">
|
<StatusBarItem Grid.Column="4">
|
||||||
<TextBlock Name="StatusAreaCommitment" Text="Gebundene Fläche: -"/>
|
<TextBlock Name="StatusAreaCommitment" Text="{Binding StatusAreaCommitment}"/>
|
||||||
</StatusBarItem>
|
</StatusBarItem>
|
||||||
<Separator Grid.Column="5"/>
|
<Separator Grid.Column="5"/>
|
||||||
<StatusBarItem Grid.Column="6">
|
<StatusBarItem Grid.Column="6">
|
||||||
<TextBlock Name="StatusDeliveriesLastSeason" Text="Lieferungen (letzte Saison): -"/>
|
<TextBlock Name="StatusDeliveriesLastSeason" Text="{Binding StatusDeliveriesLastSeason}"/>
|
||||||
</StatusBarItem>
|
</StatusBarItem>
|
||||||
<Separator Grid.Column="7"/>
|
<Separator Grid.Column="7"/>
|
||||||
<StatusBarItem Grid.Column="8">
|
<StatusBarItem Grid.Column="8">
|
||||||
<TextBlock Name="StatusDeliveriesThisSeason" Text="Lieferungen (aktuelle Saison): -"/>
|
<TextBlock Name="StatusDeliveriesThisSeason" Text="{Binding StatusDeliveriesThisSeason}"/>
|
||||||
</StatusBarItem>
|
</StatusBarItem>
|
||||||
</StatusBar>
|
</StatusBar>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user