Compare commits
16 Commits
Author | SHA1 | Date | |
---|---|---|---|
b5c1bfb08f | |||
cd2b482b5a | |||
bec1b165bf | |||
2ae2564647 | |||
adbe418b7c | |||
94db0723c5 | |||
f54677d429 | |||
49e4b65c27 | |||
ada5085cae | |||
85931e62e8 | |||
39956cbcbd | |||
84d8d0cecb | |||
fe7f9d675b | |||
9d1ee8638c | |||
cd40075702 | |||
204dfe8745 |
60
CHANGELOG.md
60
CHANGELOG.md
@ -2,6 +2,66 @@
|
|||||||
Changelog
|
Changelog
|
||||||
=========
|
=========
|
||||||
|
|
||||||
|
[v0.10.5][v0.10.5] (2024-08-24) {#v0.10.5}
|
||||||
|
------------------------------------------
|
||||||
|
|
||||||
|
### Neue Funktionen {#v0.10.5-features}
|
||||||
|
|
||||||
|
* Im Mitglieder-Fenster (`MemberAdminWindow`) kann der Benutzer beim Übertragen von Flächenbindungen entscheiden, ob der Beginn der Laufzeit übernommen werden soll, oder nicht. (bec1b165bf)
|
||||||
|
* Im Haupt-Fenster (`MainWindow`) ist es nun möglich für Waagen vom Typ `SysTec-IT` Datum und Uhrzeit festzulegen. (cd2b482b5a)
|
||||||
|
|
||||||
|
### Sonstiges {#v0.10.5-misc}
|
||||||
|
|
||||||
|
* Abstände in der Statusleiste im Anmeldungen-Fenster (`DeliveryAncmtAdminWindow`). (adbe418b7c)
|
||||||
|
* Im Anmeldungen-Fenster (`DeliveryAncmtAdminWindow`) scheinen keine Warnungen mehr auf, wenn ein nicht-optionales Feld nicht ausgefüllt wurde. (2ae2564647)
|
||||||
|
|
||||||
|
[v0.10.5]: https://git.necronda.net/winzer/elwig/releases/tag/v0.10.5
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
[v0.10.4][v0.10.4] (2024-08-22) {#v0.10.4}
|
||||||
|
------------------------------------------
|
||||||
|
|
||||||
|
### Sonstiges {#v0.10.4-misc}
|
||||||
|
|
||||||
|
* Im Anmeldungen-Fenster (`DeliveryAncmtAdminWindow`) wird der Wochentag auch beim Bearbeiten angezeigt. (85931e62e8)
|
||||||
|
* Im Mitglieder-Fenster (`MemberAdminWindow`) werden Anzahl der Mitglieder und Geschäftsanteile nicht mehr von allen aktiven angezeigt, sonder von den momentan gefilterten. (49e4b65c27)
|
||||||
|
* Statusleiste im Anmeldungen-Fenster (`DeliveryAncmtAdminWindow`). (f54677d429)
|
||||||
|
|
||||||
|
[v0.10.4]: https://git.necronda.net/winzer/elwig/releases/tag/v0.10.4
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
[v0.10.3][v0.10.3] (2024-08-21) {#v0.10.3}
|
||||||
|
------------------------------------------
|
||||||
|
|
||||||
|
### Behobene Fehler {#v0.10.3-bugfixes}
|
||||||
|
|
||||||
|
* Datum für _Anmeldungen bis_ im Leseplan-Fenster (`DeliveryScheduleAdminWindow`) ab jetzt änderbar. (84d8d0cecb)
|
||||||
|
|
||||||
|
### Sonstiges {#v0.10.3-misc}
|
||||||
|
|
||||||
|
* Wochentag bei Leseplan-Liste im Anmeldungen-Fenster (`DeliveryAncmtAdminWindow`) anzeigen. (fe7f9d675b)
|
||||||
|
|
||||||
|
[v0.10.3]: https://git.necronda.net/winzer/elwig/releases/tag/v0.10.3
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
[v0.10.2][v0.10.2] (2024-08-16) {#v0.10.2}
|
||||||
|
------------------------------------------
|
||||||
|
|
||||||
|
### Behobene Fehler {#v0.10.2-bugfixes}
|
||||||
|
|
||||||
|
* Beim Hochladen der Mitgliederdaten sind Flächenbindungen nicht mitexportiert worden. (204dfe8745)
|
||||||
|
* Beim Importieren von älteren Exportdaten kam es zu einem Fehler. (cd40075702)
|
||||||
|
|
||||||
|
[v0.10.2]: https://git.necronda.net/winzer/elwig/releases/tag/v0.10.2
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
[v0.10.1][v0.10.1] (2024-08-14) {#v0.10.1}
|
[v0.10.1][v0.10.1] (2024-08-14) {#v0.10.1}
|
||||||
------------------------------------------
|
------------------------------------------
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
ResizeMode="NoResize" ShowInTaskbar="False" Topmost="True"
|
ResizeMode="NoResize" ShowInTaskbar="False" Topmost="True"
|
||||||
WindowStartupLocation="CenterOwner"
|
WindowStartupLocation="CenterOwner"
|
||||||
DataContext="{Binding RelativeSource={RelativeSource Self}}"
|
DataContext="{Binding RelativeSource={RelativeSource Self}}"
|
||||||
Title="Flächenbindungen übertragen" Height="230" Width="450">
|
Title="Flächenbindungen übertragen" Height="260" Width="450">
|
||||||
<Window.Resources>
|
<Window.Resources>
|
||||||
<Style TargetType="Label">
|
<Style TargetType="Label">
|
||||||
<Setter Property="HorizontalAlignment" Value="Left"/>
|
<Setter Property="HorizontalAlignment" Value="Left"/>
|
||||||
@ -48,11 +48,15 @@
|
|||||||
Minimum="1900" Maximum="9999"
|
Minimum="1900" Maximum="9999"
|
||||||
HorizontalAlignment="Center" VerticalAlignment="Top"
|
HorizontalAlignment="Center" VerticalAlignment="Top"
|
||||||
TextChanged="SeasonInput_TextChanged"/>
|
TextChanged="SeasonInput_TextChanged"/>
|
||||||
|
<CheckBox x:Name="CopyYearToInput" Content="Beginn der Laufzeit von Vorgänger übernehmen" Margin="0,80,0,0"
|
||||||
|
HorizontalAlignment="Center" VerticalAlignment="Top"
|
||||||
|
Checked="CopyYearToInput_Changed" Unchecked="CopyYearToInput_Changed"
|
||||||
|
IsChecked="{Binding MaintainYearTo}"/>
|
||||||
|
|
||||||
<TextBlock x:Name="DescBlock1" Margin="0,85,0,0" TextAlignment="Center"
|
<TextBlock x:Name="DescBlock1" Margin="0,105,0,0" TextAlignment="Center"
|
||||||
HorizontalAlignment="Center" VerticalAlignment="Top">
|
HorizontalAlignment="Center" VerticalAlignment="Top">
|
||||||
Die Flächenbindungen beim <Bold>Vorgänger</Bold> sind bis inkl. Saison <Bold><Run x:Name="CancelSeason1"/></Bold> gültig,<LineBreak/>
|
Die Flächenbindungen beim <Bold>Vorgänger</Bold> sind bis inkl. Saison <Bold><Run x:Name="CancelSeason1"/></Bold> gültig,<LineBreak/>
|
||||||
und werden beim <Bold>Nachfolger</Bold> ab inkl. Saison <Bold><Run x:Name="TransferSeason"/></Bold> übernommen.
|
und werden beim <Bold>Nachfolger</Bold> ab <Run x:Name="DescBlock1Season" Text="inkl. Saison "/><Bold><Run x:Name="TransferSeason"/></Bold> übernommen.
|
||||||
</TextBlock>
|
</TextBlock>
|
||||||
<TextBlock x:Name="DescBlock2" Margin="0,70,0,0" TextAlignment="Center" Visibility="Hidden"
|
<TextBlock x:Name="DescBlock2" Margin="0,70,0,0" TextAlignment="Center" Visibility="Hidden"
|
||||||
HorizontalAlignment="Center" VerticalAlignment="Top">
|
HorizontalAlignment="Center" VerticalAlignment="Top">
|
||||||
|
@ -7,6 +7,7 @@ namespace Elwig.Dialogs {
|
|||||||
|
|
||||||
public int CancelSeason { get; set; }
|
public int CancelSeason { get; set; }
|
||||||
public int SuccessorSeason => CancelSeason + 1;
|
public int SuccessorSeason => CancelSeason + 1;
|
||||||
|
public bool MaintainYearTo { get; set; }
|
||||||
|
|
||||||
public string AreaComNum { get; set; }
|
public string AreaComNum { get; set; }
|
||||||
public string Area { get; set; }
|
public string Area { get; set; }
|
||||||
@ -22,6 +23,7 @@ namespace Elwig.Dialogs {
|
|||||||
QuestionBlock2.Visibility = Visibility.Visible;
|
QuestionBlock2.Visibility = Visibility.Visible;
|
||||||
DescBlock1.Visibility = Visibility.Hidden;
|
DescBlock1.Visibility = Visibility.Hidden;
|
||||||
DescBlock2.Visibility = Visibility.Visible;
|
DescBlock2.Visibility = Visibility.Visible;
|
||||||
|
CopyYearToInput.Visibility = Visibility.Hidden;
|
||||||
Height = 240;
|
Height = 240;
|
||||||
SeasonInput.Margin = new(0, 40, 0, 0);
|
SeasonInput.Margin = new(0, 40, 0, 0);
|
||||||
SeasonLabel.Margin = new(0, 40, 100, 0);
|
SeasonLabel.Margin = new(0, 40, 100, 0);
|
||||||
@ -41,7 +43,13 @@ namespace Elwig.Dialogs {
|
|||||||
CancelSeason = (int)SeasonInput.Value!;
|
CancelSeason = (int)SeasonInput.Value!;
|
||||||
CancelSeason1.Text = $"{CancelSeason}";
|
CancelSeason1.Text = $"{CancelSeason}";
|
||||||
CancelSeason2.Text = $"{CancelSeason}";
|
CancelSeason2.Text = $"{CancelSeason}";
|
||||||
TransferSeason.Text = $"{SuccessorSeason}";
|
TransferSeason.Text = MaintainYearTo ? "" : $"{SuccessorSeason}";
|
||||||
|
DescBlock1Season.Text = MaintainYearTo ? "dem originalen Beginn der FB" : "inkl. Saison ";
|
||||||
|
}
|
||||||
|
|
||||||
|
private void CopyYearToInput_Changed(object sender, RoutedEventArgs evt) {
|
||||||
|
TransferSeason.Text = MaintainYearTo ? "" : $"{SuccessorSeason}";
|
||||||
|
DescBlock1Season.Text = MaintainYearTo ? "dem originalen Beginn der FB" : "inkl. Saison ";
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ConfirmButton_Click(object sender, RoutedEventArgs evt) {
|
private void ConfirmButton_Click(object sender, RoutedEventArgs evt) {
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
<UseWPF>true</UseWPF>
|
<UseWPF>true</UseWPF>
|
||||||
<PreserveCompilationContext>true</PreserveCompilationContext>
|
<PreserveCompilationContext>true</PreserveCompilationContext>
|
||||||
<ApplicationIcon>Resources\Images\Elwig.ico</ApplicationIcon>
|
<ApplicationIcon>Resources\Images\Elwig.ico</ApplicationIcon>
|
||||||
<Version>0.10.1</Version>
|
<Version>0.10.5</Version>
|
||||||
<SatelliteResourceLanguages>de-AT</SatelliteResourceLanguages>
|
<SatelliteResourceLanguages>de-AT</SatelliteResourceLanguages>
|
||||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||||
<ApplicationManifest>app.manifest</ApplicationManifest>
|
<ApplicationManifest>app.manifest</ApplicationManifest>
|
||||||
|
@ -39,6 +39,7 @@ namespace Elwig.Helpers.Export {
|
|||||||
Dictionary<int, int> currentDids;
|
Dictionary<int, int> currentDids;
|
||||||
Dictionary<string, int> currentLsNrs;
|
Dictionary<string, int> currentLsNrs;
|
||||||
Dictionary<int, List<WbRd>> currentWbRde;
|
Dictionary<int, List<WbRd>> currentWbRde;
|
||||||
|
Dictionary<int, AT_Kg> kgs;
|
||||||
|
|
||||||
using (var ctx = new AppDbContext()) {
|
using (var ctx = new AppDbContext()) {
|
||||||
branches = await ctx.Branches.ToDictionaryAsync(b => b.ZwstId);
|
branches = await ctx.Branches.ToDictionaryAsync(b => b.ZwstId);
|
||||||
@ -50,6 +51,7 @@ namespace Elwig.Helpers.Export {
|
|||||||
currentWbRde = await ctx.WbRde
|
currentWbRde = await ctx.WbRde
|
||||||
.GroupBy(r => r.KgNr)
|
.GroupBy(r => r.KgNr)
|
||||||
.ToDictionaryAsync(g => g.Key, g => g.ToList());
|
.ToDictionaryAsync(g => g.Key, g => g.ToList());
|
||||||
|
kgs = await ctx.Katastralgemeinden.Include(k => k.WbKg).ToDictionaryAsync(k => k.KgNr);
|
||||||
}
|
}
|
||||||
|
|
||||||
var data = new List<(
|
var data = new List<(
|
||||||
@ -101,9 +103,9 @@ namespace Elwig.Helpers.Export {
|
|||||||
string? line;
|
string? line;
|
||||||
while ((line = await reader.ReadLineAsync()) != null) {
|
while ((line = await reader.ReadLineAsync()) != null) {
|
||||||
var obj = JsonNode.Parse(line)!.AsObject();
|
var obj = JsonNode.Parse(line)!.AsObject();
|
||||||
var (m, b, telNrs, emailAddrs) = obj.ToMember();
|
var (m, b, telNrs, emailAddrs) = obj.ToMember(kgs);
|
||||||
r.Members.Add(m);
|
r.Members.Add(m);
|
||||||
if (b != null) data[^1].BillingAddresses.Add(b);
|
if (b != null) r.BillingAddresses.Add(b);
|
||||||
r.TelephoneNumbers.AddRange(telNrs);
|
r.TelephoneNumbers.AddRange(telNrs);
|
||||||
r.EmailAddresses.AddRange(emailAddrs);
|
r.EmailAddresses.AddRange(emailAddrs);
|
||||||
}
|
}
|
||||||
@ -115,9 +117,12 @@ namespace Elwig.Helpers.Export {
|
|||||||
string? line;
|
string? line;
|
||||||
while ((line = await reader.ReadLineAsync()) != null) {
|
while ((line = await reader.ReadLineAsync()) != null) {
|
||||||
var obj = JsonNode.Parse(line)!.AsObject();
|
var obj = JsonNode.Parse(line)!.AsObject();
|
||||||
var (areaCom, wbrd) = obj.ToAreaCom(currentWbRde);
|
var (areaCom, wbrd) = obj.ToAreaCom(kgs, currentWbRde);
|
||||||
r.AreaCommitments.Add(areaCom);
|
r.AreaCommitments.Add(areaCom);
|
||||||
if (wbrd != null) r.Riede.Add(wbrd);
|
if (wbrd != null) {
|
||||||
|
currentWbRde[wbrd.KgNr].Add(wbrd);
|
||||||
|
r.Riede.Add(wbrd);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -223,6 +228,7 @@ namespace Elwig.Helpers.Export {
|
|||||||
importedMembers.Add((meta.FileName, meta.ZwstId, meta.Device, n, o, members.Count - n - o, meta.MemberFilters));
|
importedMembers.Add((meta.FileName, meta.ZwstId, meta.Device, n, o, members.Count - n - o, meta.MemberFilters));
|
||||||
}
|
}
|
||||||
if (areaCommitments.Count > 0) {
|
if (areaCommitments.Count > 0) {
|
||||||
|
ctx.AddRange(riede);
|
||||||
var imported = areaCommitments.Where(c => (importNewMembers && !duplicateMgNrs.Contains(c.MgNr)) || (importDuplicateMembers && duplicateMgNrs.Contains(c.MgNr))).ToList();
|
var imported = areaCommitments.Where(c => (importNewMembers && !duplicateMgNrs.Contains(c.MgNr)) || (importDuplicateMembers && duplicateMgNrs.Contains(c.MgNr))).ToList();
|
||||||
importedAreaComs.Add((meta.FileName, meta.ZwstId, meta.Device, imported.Count, areaCommitments.Count - imported.Count, meta.AreaComFilters));
|
importedAreaComs.Add((meta.FileName, meta.ZwstId, meta.Device, imported.Count, areaCommitments.Count - imported.Count, meta.AreaComFilters));
|
||||||
}
|
}
|
||||||
@ -457,12 +463,16 @@ namespace Elwig.Helpers.Export {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
public static (Member, BillingAddr?, List<MemberTelNr>, List<MemberEmailAddr>) ToMember(this JsonNode json) {
|
public static (Member, BillingAddr?, List<MemberTelNr>, List<MemberEmailAddr>) ToMember(this JsonNode json, Dictionary<int, AT_Kg> kgs) {
|
||||||
var mgnr = json["mgnr"]!.AsValue().GetValue<int>();
|
var mgnr = json["mgnr"]!.AsValue().GetValue<int>();
|
||||||
|
var kgnr = json["default_kgnr"]?.AsValue().GetValue<int>();
|
||||||
|
if (kgnr != null && !kgs.Values.Any(k => k.WbKg?.KgNr == kgnr)) {
|
||||||
|
throw new ArgumentException($"Für KG {(kgs.TryGetValue(kgnr.Value, out var k) ? k.Name : "?")} ({kgnr:00000}) ist noch keine Großlage festgelegt!\n(Stammdaten → Herkunftshierarchie)");
|
||||||
|
}
|
||||||
return (new Member {
|
return (new Member {
|
||||||
MgNr = mgnr,
|
MgNr = mgnr,
|
||||||
PredecessorMgNr = json["predecessor_mgnr"]?.AsValue().GetValue<int>(),
|
PredecessorMgNr = json["predecessor_mgnr"]?.AsValue().GetValue<int>(),
|
||||||
Name = json["name"]!.AsValue().GetValue<string>(),
|
Name = json["name"]?.AsValue().GetValue<string>() ?? json["family_name"]!.AsValue().GetValue<string>(),
|
||||||
Prefix = json["prefix"]?.AsValue().GetValue<string>(),
|
Prefix = json["prefix"]?.AsValue().GetValue<string>(),
|
||||||
GivenName = json["given_name"]?.AsValue().GetValue<string>(),
|
GivenName = json["given_name"]?.AsValue().GetValue<string>(),
|
||||||
MiddleName = json["middle_names"]?.AsValue().GetValue<string>(),
|
MiddleName = json["middle_names"]?.AsValue().GetValue<string>(),
|
||||||
@ -488,7 +498,7 @@ namespace Elwig.Helpers.Export {
|
|||||||
CountryNum = json["address"]!["country"]!.AsValue().GetValue<int>(),
|
CountryNum = json["address"]!["country"]!.AsValue().GetValue<int>(),
|
||||||
PostalDestId = json["address"]!["postal_dest"]!.AsValue().GetValue<string>(),
|
PostalDestId = json["address"]!["postal_dest"]!.AsValue().GetValue<string>(),
|
||||||
Address = json["address"]!["address"]!.AsValue().GetValue<string>(),
|
Address = json["address"]!["address"]!.AsValue().GetValue<string>(),
|
||||||
DefaultKgNr = json["default_kgnr"]?.AsValue().GetValue<int>(),
|
DefaultKgNr = kgnr,
|
||||||
ContactViaPost = json["contact_postal"]?.AsValue().GetValue<bool>() ?? false,
|
ContactViaPost = json["contact_postal"]?.AsValue().GetValue<bool>() ?? false,
|
||||||
ContactViaEmail = json["contact_email"]?.AsValue().GetValue<bool>() ?? false,
|
ContactViaEmail = json["contact_email"]?.AsValue().GetValue<bool>() ?? false,
|
||||||
Comment = json["comment"]?.AsValue().GetValue<string>(),
|
Comment = json["comment"]?.AsValue().GetValue<string>(),
|
||||||
@ -528,13 +538,13 @@ namespace Elwig.Helpers.Export {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
public static (AreaCom, WbRd?) ToAreaCom(this JsonNode json, Dictionary<int, List<WbRd>> riede) {
|
public static (AreaCom, WbRd?) ToAreaCom(this JsonNode json, Dictionary<int, AT_Kg> kgs, Dictionary<int, List<WbRd>> riede) {
|
||||||
var kgnr = json["kgnr"]!.AsValue().GetValue<int>();
|
var kgnr = json["kgnr"]!.AsValue().GetValue<int>();
|
||||||
var ried = json["ried"]?.AsValue().GetValue<string>();
|
var ried = json["ried"]?.AsValue().GetValue<string>();
|
||||||
WbRd? rd = null;
|
WbRd? rd = null;
|
||||||
bool newRd = false;
|
bool newRd = false;
|
||||||
if (ried != null) {
|
if (ried != null) {
|
||||||
var rde = riede[kgnr] ?? throw new ArgumentException($"KG {kgnr:00000} is no WbKg");
|
var rde = riede[kgnr] ?? throw new ArgumentException($"Für KG {(kgs.TryGetValue(kgnr, out var k) ? k.Name : "?")} ({kgnr:00000}) ist noch keine Großlage festgelegt!\n(Stammdaten → Herkunftshierarchie)");
|
||||||
rd = rde.FirstOrDefault(r => r.Name == ried);
|
rd = rde.FirstOrDefault(r => r.Name == ried);
|
||||||
if (rd == null) {
|
if (rd == null) {
|
||||||
newRd = true;
|
newRd = true;
|
||||||
|
@ -8,7 +8,7 @@ namespace Elwig.Helpers {
|
|||||||
public static class Validator {
|
public static class Validator {
|
||||||
|
|
||||||
private static readonly Dictionary<string, string[][]> PHONE_NRS = new() {
|
private static readonly Dictionary<string, string[][]> PHONE_NRS = new() {
|
||||||
{ "43", new string[][] {
|
{ "43", [
|
||||||
[],
|
[],
|
||||||
["57", "59"],
|
["57", "59"],
|
||||||
[
|
[
|
||||||
@ -17,17 +17,17 @@ namespace Elwig.Helpers {
|
|||||||
"650", "651", "652", "653", "655", "657", "659", "660", "661",
|
"650", "651", "652", "653", "655", "657", "659", "660", "661",
|
||||||
"663", "664", "665", "666", "667", "668", "669", "67", "68", "69"
|
"663", "664", "665", "666", "667", "668", "669", "67", "68", "69"
|
||||||
]
|
]
|
||||||
} },
|
] },
|
||||||
{ "49", Array.Empty<string[]>() },
|
{ "49", [] },
|
||||||
{ "48", Array.Empty<string[]>() },
|
{ "48", [] },
|
||||||
{ "420", Array.Empty<string[]>() },
|
{ "420", [] },
|
||||||
{ "421", Array.Empty<string[]>() },
|
{ "421", [] },
|
||||||
{ "36", Array.Empty<string[]>() },
|
{ "36", [] },
|
||||||
{ "386", Array.Empty<string[]>() },
|
{ "386", [] },
|
||||||
{ "39", Array.Empty<string[]>() },
|
{ "39", [] },
|
||||||
{ "33", Array.Empty<string[]>() },
|
{ "33", [] },
|
||||||
{ "41", Array.Empty<string[]>() },
|
{ "41", [] },
|
||||||
{ "423", Array.Empty<string[]>() },
|
{ "423", [] },
|
||||||
};
|
};
|
||||||
|
|
||||||
public static ValidationResult CheckInteger(TextBox input, bool required) {
|
public static ValidationResult CheckInteger(TextBox input, bool required) {
|
||||||
|
@ -118,5 +118,9 @@ namespace Elwig.Helpers.Weighing {
|
|||||||
public async Task RevokeFillingClearance() {
|
public async Task RevokeFillingClearance() {
|
||||||
await SetFillingClearance(false);
|
await SetFillingClearance(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Task SetDateAndTime(DateTime dateTime) {
|
||||||
|
throw new NotImplementedException("Für Waagen vom Typ 'Gassner' ist diese Funktion noch nicht implementiert");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
using System;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace Elwig.Helpers.Weighing {
|
namespace Elwig.Helpers.Weighing {
|
||||||
@ -31,5 +32,10 @@ namespace Elwig.Helpers.Weighing {
|
|||||||
/// Revoke clearance to fill the scale container
|
/// Revoke clearance to fill the scale container
|
||||||
/// </summary>
|
/// </summary>
|
||||||
Task RevokeFillingClearance();
|
Task RevokeFillingClearance();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Try to set date and time on the scale
|
||||||
|
/// </summary>
|
||||||
|
Task SetDateAndTime(DateTime dateTime);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -161,5 +161,10 @@ namespace Elwig.Helpers.Weighing {
|
|||||||
public async Task RevokeFillingClearance() {
|
public async Task RevokeFillingClearance() {
|
||||||
await SetFillingClearance(false);
|
await SetFillingClearance(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public async Task SetDateAndTime(DateTime dateTime) {
|
||||||
|
await SendCommand($"ST{dateTime:dd.MM.yyHH:mm:ss}");
|
||||||
|
await ReceiveResponse();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -9,7 +9,6 @@ using Elwig.Documents;
|
|||||||
using Elwig.Helpers.Export;
|
using Elwig.Helpers.Export;
|
||||||
using Elwig.Models.Dtos;
|
using Elwig.Models.Dtos;
|
||||||
using Microsoft.Win32;
|
using Microsoft.Win32;
|
||||||
using System.Net.Http;
|
|
||||||
using System.Windows.Input;
|
using System.Windows.Input;
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
using System;
|
using System;
|
||||||
@ -27,6 +26,8 @@ namespace Elwig.Services {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static void ClearInputs(this DeliveryAncmtAdminViewModel vm) {
|
public static void ClearInputs(this DeliveryAncmtAdminViewModel vm) {
|
||||||
|
vm.StatusAncmtCreated = "-";
|
||||||
|
vm.StatusAncmtModified = "-";
|
||||||
}
|
}
|
||||||
|
|
||||||
public static async Task FillInputs(this DeliveryAncmtAdminViewModel vm, DeliveryAncmt a) {
|
public static async Task FillInputs(this DeliveryAncmtAdminViewModel vm, DeliveryAncmt a) {
|
||||||
@ -34,6 +35,8 @@ namespace Elwig.Services {
|
|||||||
vm.DeliverySchedule = (DeliverySchedule?)ControlUtils.GetItemFromSourceWithPk(vm.DeliveryScheduleSource, a.Year, a.DsNr);
|
vm.DeliverySchedule = (DeliverySchedule?)ControlUtils.GetItemFromSourceWithPk(vm.DeliveryScheduleSource, a.Year, a.DsNr);
|
||||||
vm.SortId = a.SortId;
|
vm.SortId = a.SortId;
|
||||||
vm.Weight = a.Weight;
|
vm.Weight = a.Weight;
|
||||||
|
vm.StatusAncmtCreated = $"{a.CreatedTimestamp:dd.MM.yyyy, HH:mm} ({a.Type})";
|
||||||
|
vm.StatusAncmtModified = a.ModifiedTimestamp != a.CreatedTimestamp ? $"{a.ModifiedTimestamp:dd.MM.yyyy, HH:mm}" : "-";
|
||||||
}
|
}
|
||||||
|
|
||||||
public static async Task<(List<string>, IQueryable<DeliveryAncmt>, List<string>)> GetFilters(this DeliveryAncmtAdminViewModel vm, AppDbContext ctx) {
|
public static async Task<(List<string>, IQueryable<DeliveryAncmt>, List<string>)> GetFilters(this DeliveryAncmtAdminViewModel vm, AppDbContext ctx) {
|
||||||
|
@ -460,26 +460,30 @@ namespace Elwig.Services {
|
|||||||
try {
|
try {
|
||||||
var filename = $"{DateTime.Now:yyyy-MM-dd_HH-mm-ss}_{App.ZwstId}.elwig.zip";
|
var filename = $"{DateTime.Now:yyyy-MM-dd_HH-mm-ss}_{App.ZwstId}.elwig.zip";
|
||||||
var path = Path.Combine(App.TempPath, filename);
|
var path = Path.Combine(App.TempPath, filename);
|
||||||
var list = await query
|
var members = await query
|
||||||
.OrderBy(m => m.MgNr)
|
.OrderBy(m => m.MgNr)
|
||||||
.Include(m => m.BillingAddress)
|
.Include(m => m.BillingAddress)
|
||||||
.Include(m => m.TelephoneNumbers)
|
.Include(m => m.TelephoneNumbers)
|
||||||
.Include(m => m.EmailAddresses)
|
.Include(m => m.EmailAddresses)
|
||||||
.AsSplitQuery()
|
.AsSplitQuery()
|
||||||
.ToListAsync();
|
.ToListAsync();
|
||||||
if (list.Count == 0) {
|
var areaComs = await query
|
||||||
|
.SelectMany(m => m.AreaCommitments)
|
||||||
|
.Include(c => c.Rd)
|
||||||
|
.ToListAsync();
|
||||||
|
if (members.Count == 0) {
|
||||||
MessageBox.Show("Es wurden keine Mitglieder zum Hochladen ausgewählt!", "Mitglieder hochladen",
|
MessageBox.Show("Es wurden keine Mitglieder zum Hochladen ausgewählt!", "Mitglieder hochladen",
|
||||||
MessageBoxButton.OK, MessageBoxImage.Error);
|
MessageBoxButton.OK, MessageBoxImage.Error);
|
||||||
} else {
|
} else {
|
||||||
await ElwigData.Export(path, list, filterNames);
|
await ElwigData.Export(path, members, areaComs, filterNames);
|
||||||
await Utils.UploadExportData(path, App.Config.SyncUrl, App.Config.SyncUsername, App.Config.SyncPassword);
|
await Utils.UploadExportData(path, App.Config.SyncUrl, App.Config.SyncUsername, App.Config.SyncPassword);
|
||||||
MessageBox.Show($"Hochladen von {list.Count} Mitgliedern erfolgreich!", "Mitglieder hochgeladen",
|
MessageBox.Show($"Hochladen von {members.Count} Mitgliedern erfolgreich!", "Mitglieder hochgeladen",
|
||||||
MessageBoxButton.OK, MessageBoxImage.Information);
|
MessageBoxButton.OK, MessageBoxImage.Information);
|
||||||
}
|
}
|
||||||
} catch (HttpRequestException exc) {
|
} catch (HttpRequestException exc) {
|
||||||
MessageBox.Show("Eventuell Internetverbindung prüfen!\n\n" + exc.Message, "Lieferungen hochladen", MessageBoxButton.OK, MessageBoxImage.Error);
|
MessageBox.Show("Eventuell Internetverbindung prüfen!\n\n" + exc.Message, "Mitglieder hochladen", MessageBoxButton.OK, MessageBoxImage.Error);
|
||||||
} catch (TaskCanceledException exc) {
|
} catch (TaskCanceledException exc) {
|
||||||
MessageBox.Show("Eventuell Internetverbindung prüfen!\n\n" + exc.Message, "Fehler", MessageBoxButton.OK, MessageBoxImage.Error);
|
MessageBox.Show("Eventuell Internetverbindung prüfen!\n\n" + exc.Message, "Mitglieder hochladen", MessageBoxButton.OK, MessageBoxImage.Error);
|
||||||
} catch (Exception exc) {
|
} catch (Exception exc) {
|
||||||
MessageBox.Show(exc.Message, "Fehler", MessageBoxButton.OK, MessageBoxImage.Error);
|
MessageBox.Show(exc.Message, "Fehler", MessageBoxButton.OK, MessageBoxImage.Error);
|
||||||
}
|
}
|
||||||
@ -593,7 +597,7 @@ namespace Elwig.Services {
|
|||||||
KgNr = c.KgNr,
|
KgNr = c.KgNr,
|
||||||
GstNr = c.GstNr,
|
GstNr = c.GstNr,
|
||||||
RdNr = c.RdNr,
|
RdNr = c.RdNr,
|
||||||
YearFrom = year,
|
YearFrom = vm.MaintainAreaComYearTo ? c.YearFrom : year,
|
||||||
YearTo = c.YearTo,
|
YearTo = c.YearTo,
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
@ -62,6 +62,15 @@ namespace Elwig.ViewModels {
|
|||||||
set => WeightString = $"{value}";
|
set => WeightString = $"{value}";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[ObservableProperty]
|
||||||
|
private string _statusAncmts = "-";
|
||||||
|
[ObservableProperty]
|
||||||
|
private string _statusWeight = "-";
|
||||||
|
[ObservableProperty]
|
||||||
|
private string _statusAncmtCreated = "-";
|
||||||
|
[ObservableProperty]
|
||||||
|
private string _statusAncmtModified = "-";
|
||||||
|
|
||||||
[ObservableProperty]
|
[ObservableProperty]
|
||||||
private Visibility _controlButtonsVisibility = Visibility.Visible;
|
private Visibility _controlButtonsVisibility = Visibility.Visible;
|
||||||
[ObservableProperty]
|
[ObservableProperty]
|
||||||
|
@ -11,6 +11,7 @@ namespace Elwig.ViewModels {
|
|||||||
public partial class MemberAdminViewModel : ObservableObject {
|
public partial class MemberAdminViewModel : ObservableObject {
|
||||||
|
|
||||||
public int? TransferPredecessorAreaComs = null;
|
public int? TransferPredecessorAreaComs = null;
|
||||||
|
public bool MaintainAreaComYearTo = false;
|
||||||
public int? CancelAreaComs = null;
|
public int? CancelAreaComs = null;
|
||||||
|
|
||||||
public ObservableCollection<KeyValuePair<string, string>> PhoneNrTypes { get; set; } = new(Utils.PhoneNrTypes);
|
public ObservableCollection<KeyValuePair<string, string>> PhoneNrTypes { get; set; } = new(Utils.PhoneNrTypes);
|
||||||
|
@ -61,7 +61,7 @@
|
|||||||
<RowDefinition Height="24"/>
|
<RowDefinition Height="24"/>
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="1*" MinWidth="250"/>
|
<ColumnDefinition Width="1.25*" MinWidth="250"/>
|
||||||
<ColumnDefinition Width="5"/>
|
<ColumnDefinition Width="5"/>
|
||||||
<ColumnDefinition Width="1*" MinWidth="300"/>
|
<ColumnDefinition Width="1*" MinWidth="300"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
@ -123,6 +123,7 @@
|
|||||||
<ListBox.ItemTemplate>
|
<ListBox.ItemTemplate>
|
||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
<StackPanel Orientation="Horizontal">
|
<StackPanel Orientation="Horizontal">
|
||||||
|
<TextBlock Text="{Binding Date, StringFormat='ddd.'}" Width="24"/>
|
||||||
<TextBlock Text="{Binding Date, StringFormat='dd.MM.'}" Width="32"/>
|
<TextBlock Text="{Binding Date, StringFormat='dd.MM.'}" Width="32"/>
|
||||||
<TextBlock Text="{Binding ZwstId}" Width="25" TextAlignment="Center"/>
|
<TextBlock Text="{Binding ZwstId}" Width="25" TextAlignment="Center"/>
|
||||||
<TextBlock Text="{Binding Description}" Width="200"/>
|
<TextBlock Text="{Binding Description}" Width="200"/>
|
||||||
@ -267,6 +268,7 @@
|
|||||||
<ComboBox.ItemTemplate>
|
<ComboBox.ItemTemplate>
|
||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
<StackPanel Orientation="Horizontal">
|
<StackPanel Orientation="Horizontal">
|
||||||
|
<TextBlock Text="{Binding Date, StringFormat='ddd.'}" Width="28"/>
|
||||||
<TextBlock Text="{Binding Date, StringFormat='dd.MM.'}" Width="35"/>
|
<TextBlock Text="{Binding Date, StringFormat='dd.MM.'}" Width="35"/>
|
||||||
<TextBlock Text="{Binding ZwstId}" Width="30" TextAlignment="Center"/>
|
<TextBlock Text="{Binding ZwstId}" Width="30" TextAlignment="Center"/>
|
||||||
<TextBlock Text="{Binding Description}"/>
|
<TextBlock Text="{Binding Description}"/>
|
||||||
@ -305,17 +307,39 @@
|
|||||||
<ItemsPanelTemplate>
|
<ItemsPanelTemplate>
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="150"/>
|
<ColumnDefinition Width="1*" MinWidth="120"/>
|
||||||
<ColumnDefinition Width="Auto"/>
|
<ColumnDefinition Width="Auto"/>
|
||||||
<ColumnDefinition Width="200"/>
|
<ColumnDefinition Width="1*" MinWidth="150"/>
|
||||||
<ColumnDefinition Width="Auto"/>
|
<ColumnDefinition Width="Auto"/>
|
||||||
<ColumnDefinition Width="1*"/>
|
<ColumnDefinition Width="2.25*"/>
|
||||||
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
<ColumnDefinition Width="2*"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
</Grid>
|
</Grid>
|
||||||
</ItemsPanelTemplate>
|
</ItemsPanelTemplate>
|
||||||
</StatusBar.ItemsPanel>
|
</StatusBar.ItemsPanel>
|
||||||
<StatusBarItem>
|
<StatusBarItem>
|
||||||
|
<TextBlock>
|
||||||
|
Anmeldungen: <Run Text="{Binding StatusAncmts}"/>
|
||||||
|
</TextBlock>
|
||||||
|
</StatusBarItem>
|
||||||
|
<Separator Grid.Column="1"/>
|
||||||
|
<StatusBarItem Grid.Column="2">
|
||||||
|
<TextBlock>
|
||||||
|
Gewicht: <Run Text="{Binding StatusWeight}"/>
|
||||||
|
</TextBlock>
|
||||||
|
</StatusBarItem>
|
||||||
|
<Separator Grid.Column="3"/>
|
||||||
|
<StatusBarItem Grid.Column="4">
|
||||||
|
<TextBlock>
|
||||||
|
Anmldg. erstellt: <Run Text="{Binding StatusAncmtCreated}"/>
|
||||||
|
</TextBlock>
|
||||||
|
</StatusBarItem>
|
||||||
|
<Separator Grid.Column="5"/>
|
||||||
|
<StatusBarItem Grid.Column="6">
|
||||||
|
<TextBlock>
|
||||||
|
Anmldg. geändert: <Run Text="{Binding StatusAncmtModified}"/>
|
||||||
|
</TextBlock>
|
||||||
</StatusBarItem>
|
</StatusBarItem>
|
||||||
</StatusBar>
|
</StatusBar>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
@ -31,6 +31,8 @@ namespace Elwig.Windows {
|
|||||||
MgNrInput, MemberInput, DeliveryScheduleInput, SortIdInput, WineVarietyInput, WeightInput,
|
MgNrInput, MemberInput, DeliveryScheduleInput, SortIdInput, WineVarietyInput, WeightInput,
|
||||||
];
|
];
|
||||||
|
|
||||||
|
DoShowWarningWindows = false;
|
||||||
|
|
||||||
InitializeDelayTimer(SearchInput, SearchInput_TextChanged);
|
InitializeDelayTimer(SearchInput, SearchInput_TextChanged);
|
||||||
SearchInput.TextChanged -= SearchInput_TextChanged;
|
SearchInput.TextChanged -= SearchInput_TextChanged;
|
||||||
ViewModel.FilterSeason = Utils.CurrentLastSeason;
|
ViewModel.FilterSeason = Utils.CurrentLastSeason;
|
||||||
@ -127,6 +129,9 @@ namespace Elwig.Windows {
|
|||||||
DeliveryAncmtList_SelectionChanged, ViewModel.TextFilter.Count > 0 ? ControlUtils.RenewSourceDefault.IfOnly : ControlUtils.RenewSourceDefault.None, !updateSort);
|
DeliveryAncmtList_SelectionChanged, ViewModel.TextFilter.Count > 0 ? ControlUtils.RenewSourceDefault.IfOnly : ControlUtils.RenewSourceDefault.None, !updateSort);
|
||||||
if (updateSort && DeliveryAncmtList.SelectedItem != null)
|
if (updateSort && DeliveryAncmtList.SelectedItem != null)
|
||||||
DeliveryAncmtList.ScrollIntoView(DeliveryAncmtList.SelectedItem);
|
DeliveryAncmtList.ScrollIntoView(DeliveryAncmtList.SelectedItem);
|
||||||
|
|
||||||
|
ViewModel.StatusAncmts = $"{deliveryAncmts.Count:N0}";
|
||||||
|
ViewModel.StatusWeight = $"{deliveryAncmts.Sum(a => a.Weight):N0} kg";
|
||||||
}
|
}
|
||||||
|
|
||||||
private async Task RefreshInputs(bool validate = false) {
|
private async Task RefreshInputs(bool validate = false) {
|
||||||
|
@ -200,7 +200,7 @@
|
|||||||
<Label Content="Datum/Zwst.:" Margin="10,10,0,10"/>
|
<Label Content="Datum/Zwst.:" Margin="10,10,0,10"/>
|
||||||
<TextBox x:Name="DateInput" Text="{Binding DateString, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
<TextBox x:Name="DateInput" Text="{Binding DateString, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
||||||
Margin="0,10,10,10" Width="77" Grid.Column="1" HorizontalAlignment="Left" TextAlignment="Right"
|
Margin="0,10,10,10" Width="77" Grid.Column="1" HorizontalAlignment="Left" TextAlignment="Right"
|
||||||
TextChanged="DateInput_TextChanged" LostFocus="DateInput_LostFocus"/>
|
TextChanged="ScheduleDateInput_TextChanged" LostFocus="DateInput_LostFocus"/>
|
||||||
<ComboBox x:Name="BranchInput" SelectedItem="{Binding Branch, Mode=TwoWay}" ItemsSource="{Binding BranchSource, Mode=TwoWay}"
|
<ComboBox x:Name="BranchInput" SelectedItem="{Binding Branch, Mode=TwoWay}" ItemsSource="{Binding BranchSource, Mode=TwoWay}"
|
||||||
DisplayMemberPath="Name" TextSearch.TextPath="Name"
|
DisplayMemberPath="Name" TextSearch.TextPath="Name"
|
||||||
Margin="82,10,10,10" Width="150" Grid.Column="1" HorizontalAlignment="Left"/>
|
Margin="82,10,10,10" Width="150" Grid.Column="1" HorizontalAlignment="Left"/>
|
||||||
|
@ -297,8 +297,8 @@ namespace Elwig.Windows {
|
|||||||
ViewModel.ControlButtonsVisibility = Visibility.Hidden;
|
ViewModel.ControlButtonsVisibility = Visibility.Hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
private new void DateInput_TextChanged(object sender, TextChangedEventArgs evt) {
|
private void ScheduleDateInput_TextChanged(object sender, TextChangedEventArgs evt) {
|
||||||
base.DateInput_TextChanged(sender, evt);
|
DateInput_TextChanged(sender, evt);
|
||||||
if (ViewModel.Date is DateOnly date) {
|
if (ViewModel.Date is DateOnly date) {
|
||||||
ViewModel.AncmtToDate = date.AddDays(-2);
|
ViewModel.AncmtToDate = date.AddDays(-2);
|
||||||
}
|
}
|
||||||
|
@ -25,6 +25,9 @@
|
|||||||
<MenuItem Header="Abfragen stellen" Click="Menu_Database_Query_Click"/>
|
<MenuItem Header="Abfragen stellen" Click="Menu_Database_Query_Click"/>
|
||||||
<MenuItem Header="Speicherort öffnen..." Click="Menu_Database_Open_Click"/>
|
<MenuItem Header="Speicherort öffnen..." Click="Menu_Database_Open_Click"/>
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
|
<MenuItem Header="Waagen">
|
||||||
|
<MenuItem Header="Datum und Uhrzeit setzen" Click="Menu_Scales_SetDateTime_Click"/>
|
||||||
|
</MenuItem>
|
||||||
<MenuItem x:Name="HelpMenu" Header="Hilfe">
|
<MenuItem x:Name="HelpMenu" Header="Hilfe">
|
||||||
<MenuItem Header="Über"/>
|
<MenuItem Header="Über"/>
|
||||||
<MenuItem x:Name="Menu_Help_Update" Header="Nach Updates suchen" Click="Menu_Help_Update_Click"/>
|
<MenuItem x:Name="Menu_Help_Update" Header="Nach Updates suchen" Click="Menu_Help_Update_Click"/>
|
||||||
|
@ -90,6 +90,21 @@ namespace Elwig.Windows {
|
|||||||
} catch { }
|
} catch { }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private async void Menu_Scales_SetDateTime_Click(object sender, RoutedEventArgs evt) {
|
||||||
|
if (App.CommandScales.Count == 0) {
|
||||||
|
MessageBox.Show("Es sind keine geeigneten Waagen verfügbar!", "Datum und Uhrzeit setzen", MessageBoxButton.OK, MessageBoxImage.Error);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
foreach (var s in App.CommandScales) {
|
||||||
|
try {
|
||||||
|
await s.SetDateAndTime(DateTime.Now);
|
||||||
|
} catch (Exception exc) {
|
||||||
|
MessageBox.Show(exc.Message, "Fehler", MessageBoxButton.OK, MessageBoxImage.Error);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
MessageBox.Show("Datum und Uhrzeit auf entsprechenden Waagen gesetzt!", "Datum und Uhrzeit setzen", MessageBoxButton.OK, MessageBoxImage.Information);
|
||||||
|
}
|
||||||
|
|
||||||
private void Menu_Database_Query_Click(object sender, RoutedEventArgs evt) {
|
private void Menu_Database_Query_Click(object sender, RoutedEventArgs evt) {
|
||||||
var w = new QueryWindow();
|
var w = new QueryWindow();
|
||||||
w.Show();
|
w.Show();
|
||||||
|
@ -150,6 +150,9 @@ namespace Elwig.Windows {
|
|||||||
MemberList_SelectionChanged, ViewModel.TextFilter.Count > 0 ? ControlUtils.RenewSourceDefault.IfOnly : ControlUtils.RenewSourceDefault.None, !updateSort);
|
MemberList_SelectionChanged, ViewModel.TextFilter.Count > 0 ? ControlUtils.RenewSourceDefault.IfOnly : ControlUtils.RenewSourceDefault.None, !updateSort);
|
||||||
if (updateSort && MemberList.SelectedItem != null)
|
if (updateSort && MemberList.SelectedItem != null)
|
||||||
MemberList.ScrollIntoView(MemberList.SelectedItem);
|
MemberList.ScrollIntoView(MemberList.SelectedItem);
|
||||||
|
|
||||||
|
ViewModel.StatusMembers = $"{members.Count:N0} ({await ctx.Members.CountAsync():N0})";
|
||||||
|
ViewModel.StatusBusinessShares = $"{members.Sum(m => m.BusinessShares):N0} ({await ctx.Members.SumAsync(m => m.BusinessShares):N0})";
|
||||||
}
|
}
|
||||||
|
|
||||||
private async Task RefreshInputs(bool validate = false) {
|
private async Task RefreshInputs(bool validate = false) {
|
||||||
@ -237,7 +240,6 @@ namespace Elwig.Windows {
|
|||||||
var mM = Math.Max(mA.Length, Math.Max(mI.Length, mT.Length));
|
var mM = Math.Max(mA.Length, Math.Max(mI.Length, mT.Length));
|
||||||
var mS = mM > 3;
|
var mS = mM > 3;
|
||||||
if (mS) mM--;
|
if (mS) mM--;
|
||||||
ViewModel.StatusMembers = $"{mA} ({mT})";
|
|
||||||
ViewModel.StatusMembersToolTip =
|
ViewModel.StatusMembersToolTip =
|
||||||
$"{new string(s1, Math.Max(0, mM - mA.Length))}{(mS && mA.Length < 4 ? s2 : "")}{mA} aktive Mitglieder\n" +
|
$"{new string(s1, Math.Max(0, mM - mA.Length))}{(mS && mA.Length < 4 ? s2 : "")}{mA} aktive Mitglieder\n" +
|
||||||
$"{new string(s1, Math.Max(0, mM - mI.Length))}{(mS && mI.Length < 4 ? s2 : "")}{mI} nicht aktive Mitglieder\n" +
|
$"{new string(s1, Math.Max(0, mM - mI.Length))}{(mS && mI.Length < 4 ? s2 : "")}{mI} nicht aktive Mitglieder\n" +
|
||||||
@ -249,7 +251,6 @@ namespace Elwig.Windows {
|
|||||||
var bM = Math.Max(bA.Length, Math.Max(bI.Length, bT.Length));
|
var bM = Math.Max(bA.Length, Math.Max(bI.Length, bT.Length));
|
||||||
var bS = bM > 3;
|
var bS = bM > 3;
|
||||||
if (bS) bM--;
|
if (bS) bM--;
|
||||||
ViewModel.StatusBusinessShares = $"{bA} ({bT})";
|
|
||||||
ViewModel.StatusBusinessSharesToolTip =
|
ViewModel.StatusBusinessSharesToolTip =
|
||||||
$"{new string(s1, Math.Max(0, bM - bA.Length))}{(bS && bA.Length < 4 ? s2 : "")}{bA} Geschäftsanteile von aktiven Mitgliedern\n" +
|
$"{new string(s1, Math.Max(0, bM - bA.Length))}{(bS && bA.Length < 4 ? s2 : "")}{bA} Geschäftsanteile von aktiven Mitgliedern\n" +
|
||||||
$"{new string(s1, Math.Max(0, bM - bI.Length))}{(bS && bI.Length < 4 ? s2 : "")}{bI} Geschäftsanteile von nicht aktiven Mitgliedern\n" +
|
$"{new string(s1, Math.Max(0, bM - bI.Length))}{(bS && bI.Length < 4 ? s2 : "")}{bI} Geschäftsanteile von nicht aktiven Mitgliedern\n" +
|
||||||
@ -746,6 +747,7 @@ namespace Elwig.Windows {
|
|||||||
if (d.ShowDialog() != true)
|
if (d.ShowDialog() != true)
|
||||||
return;
|
return;
|
||||||
ViewModel.TransferPredecessorAreaComs = d.SuccessorSeason;
|
ViewModel.TransferPredecessorAreaComs = d.SuccessorSeason;
|
||||||
|
ViewModel.MaintainAreaComYearTo = d.MaintainYearTo;
|
||||||
if (IsEditing)
|
if (IsEditing)
|
||||||
SetOriginalValue(PredecessorMgNrInput, -1); // hack to allow user to save
|
SetOriginalValue(PredecessorMgNrInput, -1); // hack to allow user to save
|
||||||
UpdateButtons();
|
UpdateButtons();
|
||||||
|
Reference in New Issue
Block a user