refactoring
This commit is contained in:
parent
e5d945ab91
commit
fb044dabcb
16 changed files with 11 additions and 53 deletions
|
|
@ -18,7 +18,7 @@ namespace Yavsc.Models.Billing
|
|||
public string GetInvoiceId() { return GetType().Name + "/" + Id; }
|
||||
|
||||
public abstract long Id { get; set; }
|
||||
public abstract string GetDescription ();
|
||||
public abstract string Description { get; }
|
||||
|
||||
[Required()]
|
||||
public bool Consent { get; set; }
|
||||
|
|
|
|||
|
|
@ -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() : "")));
|
||||
|
|
|
|||
|
|
@ -25,10 +25,7 @@ namespace Yavsc.Models.Haircut
|
|||
public class HairMultiCutQuery : NominativeServiceCommand
|
||||
{
|
||||
// Bill description
|
||||
public override string GetDescription()
|
||||
{
|
||||
return "Prestation en coiffure à domicile [commande groupée]";
|
||||
}
|
||||
public override string Description => "Prestation en coiffure à domicile [commande groupée]" ;
|
||||
|
||||
[Key(), DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
override public long Id { get; set; }
|
||||
|
|
|
|||
|
|
@ -61,15 +61,8 @@ namespace Yavsc.Server.Models.IT
|
|||
{
|
||||
return bill;
|
||||
}
|
||||
|
||||
public string Description { get; set; }
|
||||
|
||||
public override string GetDescription()
|
||||
{
|
||||
return Description;
|
||||
}
|
||||
|
||||
|
||||
string description;
|
||||
public override string Description => description;
|
||||
|
||||
public Project()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -42,10 +42,7 @@ namespace Yavsc.Models.Workflow
|
|||
[Display(Name="GiveAnExplicitReason")]
|
||||
public string Reason { get; set; }
|
||||
|
||||
public override string GetDescription ()
|
||||
{
|
||||
return "Rendez-vous";
|
||||
}
|
||||
public override string Description => "Rendez-vous";
|
||||
|
||||
public RdvQuery()
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue