refactoring
This commit is contained in:
parent
e5d945ab91
commit
fb044dabcb
16 changed files with 11 additions and 53 deletions
|
|
@ -20,13 +20,13 @@ namespace Yavsc.Models.Haircut
|
|||
{
|
||||
|
||||
// Bill description
|
||||
public override string GetDescription()
|
||||
public override string Description { get
|
||||
{
|
||||
string type = ResourcesHelpers.GlobalLocalizer[this.GetType().Name];
|
||||
string gender = ResourcesHelpers.GlobalLocalizer[this.Prestation.Gender.ToString()];
|
||||
|
||||
return $"{type} ({gender})";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
[Key(), DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
|
|
@ -387,7 +387,7 @@ Prestation.Gender == HairCutGenders.Women ?
|
|||
string address = Location?.Address??"[pas de lieu spécifié]";
|
||||
var p = Prestation;
|
||||
string total = GetBillItems().Addition().ToString("C",CultureInfo.CurrentUICulture);
|
||||
string strprestation = GetDescription();
|
||||
string strprestation = Description;
|
||||
string bill = string.Join("\n", GetBillItems().Select(
|
||||
l=> $"{l.Name} {l.Description} {l.UnitaryCost} € " +
|
||||
((l.Count != 1) ? "*"+l.Count.ToString() : "")));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue