Use CountryCode as PK

This commit is contained in:
2023-07-14 00:15:46 +02:00
parent 5c2f7ae69a
commit db5f6dbef0
6 changed files with 17 additions and 17 deletions

View File

@ -329,7 +329,7 @@ namespace Elwig.Windows {
m.FamilyName = FamilyNameInput.Text;
m.Suffix = (SuffixInput.Text == "") ? null : SuffixInput.Text;
m.Birthday = (BirthdayInput.Text == "") ? null : string.Join("-", BirthdayInput.Text.Split(".").Reverse());
m.CountryCode = "AT";
m.CountryNum = 40; // Austria AT AUT
m.PostalDestId = ((AT_PlzDest)OrtInput.SelectedItem).Id;
m.Address = AddressInput.Text;
@ -373,7 +373,7 @@ namespace Elwig.Windows {
b.Name = BillingNameInput.Text;
b.Address = BillingAddressInput.Text;
var p = (AT_PlzDest)BillingOrtInput.SelectedItem;
b.CountryCode = p.CountryCode;
b.CountryNum = p.CountryNum;
b.PostalDestId = p.Id;
if (m.BillingAddress == null) {
b.MgNr = newMgNr;