Add DeliveryAdminWindow

This commit is contained in:
2023-05-22 21:32:06 +02:00
parent 3bf7d65dea
commit dc236bab62
13 changed files with 534 additions and 35 deletions

@ -1,4 +1,5 @@
using Microsoft.EntityFrameworkCore;
using System;
using System.ComponentModel.DataAnnotations.Schema;
namespace Elwig.Models {
@ -38,5 +39,12 @@ namespace Elwig.Models {
[ForeignKey("Year")]
public virtual Season Season { get; private set; }
public string ValueStr => (Abs != null) ?
$"{(Abs < 0 ? " -" : "+")}{Math.Abs(Abs.Value)} {Season.Currency.Symbol}/kg" :
$"{(Rel < 0 ? " -" : "+")}{Math.Abs(Rel.Value):P2}";
public override string ToString() {
return Name;
}
}
}