Compare commits

..

3 Commits

3 changed files with 14 additions and 5 deletions
+3 -3
View File
@@ -7,10 +7,10 @@ using System.Threading.Tasks;
namespace Elwig.Helpers {
public class ClientParameters {
public enum Type { Matzen, GWK };
public enum Type { Matzen, Winzerkeller };
public bool IsMatzen => Client == Type.Matzen;
public bool IsGWK => Client == Type.GWK;
public bool IsWinzerkeller => Client == Type.Winzerkeller;
public string NameToken;
public string NameShort;
@@ -61,7 +61,7 @@ namespace Elwig.Helpers {
NameType = parameters["CLIENT_NAME_TYPE"] ?? throw new KeyNotFoundException();
switch (Name) {
case "Winzergenossenschaft für Matzen und Umgebung": Client = Type.Matzen; break;
case "Winzerkeller im Weinviertel": Client = Type.GWK; break;
case "Winzerkeller im Weinviertel": Client = Type.Winzerkeller; break;
};
Plz = int.Parse(parameters["CLIENT_PLZ"] ?? "");
+1 -1
View File
@@ -212,7 +212,7 @@ namespace Elwig.Windows {
p.Address = ClientAddressInput.Text;
p.Plz = int.Parse(ClientPlzInput.Text);
p.Ort = ClientOrtInput.Text;
p.Iban = ClientIbanInput.Text.Length > 0 ? ClientIbanInput.Text.Replace(" ", "") : null;
p.Iban = ClientIbanInput.Text.Length > 0 ? ClientIbanInput.Text : null;
p.Bic = ClientBicInput.Text.Length > 0 ? ClientBicInput.Text : null;
p.UstIdNr = ClientUstIdNrInput.Text.Length > 0 ? ClientUstIdNrInput.Text : null;
p.LfbisNr = ClientLfbisNrInput.Text.Length > 0 ? ClientLfbisNrInput.Text : null;
+10 -1
View File
@@ -231,6 +231,7 @@ namespace Elwig.Windows {
private void InitPlot() {
OechslePricePlotScatter = OechslePricePlot.Plot.AddScatter(Graph.DataX, Graph.DataY);
OechslePricePlot.Configuration.DoubleClickBenchmark = false;
OechslePricePlotScatter.LineColor = Color.Blue;
OechslePricePlotScatter.MarkerColor = Color.Blue;
OechslePricePlotScatter.MarkerSize = 9;
@@ -398,7 +399,7 @@ namespace Elwig.Windows {
PriceInput.Text = Graph.DataY[PrimaryMarkedPointIndex].ToString();
EnableActionButtons();
if (IsEditing || IsCreating) EnableActionButtons();
OechslePricePlot.Render();
return;
}
@@ -430,6 +431,8 @@ namespace Elwig.Windows {
return;
}
FlattenGraph(0, PrimaryMarkedPointIndex, Graph.DataY[PrimaryMarkedPointIndex]);
SaveButton.IsEnabled = true;
ResetButton.IsEnabled = true;
}
private void RightFlatButton_Click(object sender, RoutedEventArgs evt) {
@@ -437,6 +440,8 @@ namespace Elwig.Windows {
return;
}
FlattenGraph(PrimaryMarkedPointIndex, Graph.DataY.Length - 1, Graph.DataY[PrimaryMarkedPointIndex]);
SaveButton.IsEnabled = true;
ResetButton.IsEnabled = true;
}
private void InterpolateButton_Click(object sender, RoutedEventArgs evt) {
@@ -451,6 +456,8 @@ namespace Elwig.Windows {
for (int i = lowIndex; i < highIndex - 1; i++) {
Graph.DataY[i + 1] = Math.Round(Graph.DataY[i] + step, 4); // TODO richtig runden
}
SaveButton.IsEnabled = true;
ResetButton.IsEnabled = true;
}
private void LinearIncreaseButton_Click(object sender, RoutedEventArgs e) {
@@ -462,6 +469,8 @@ namespace Elwig.Windows {
return;
}
LinearIncreaseGraph(PrimaryMarkedPointIndex, Graph.DataY.Length - 1, priceIncrease.Value);
SaveButton.IsEnabled = true;
ResetButton.IsEnabled = true;
}
private void OechslePricePlot_MouseDown(object sender, MouseEventArgs e) {