From d5c6a2510ba1fe3e510aeb4b5fa34c0fe486cf1c Mon Sep 17 00:00:00 2001 From: Paul Schneider Date: Thu, 23 Mar 2017 00:44:27 +0100 Subject: [PATCH] export de la commande coiffure --- Yavsc/Models/Haircut/HairCutQuery.cs | 14 ++++++++++--- Yavsc/Models/Haircut/HairLength.cs | 2 +- Yavsc/Models/Haircut/HairPrestation.cs | 28 +++++++++++++------------- Yavsc/Yavsc.csproj | 8 ++++++++ YavscLib/HairCut/IHairCutQuery.cs | 10 +++++++++ YavscLib/HairCut/IPrestation.cs | 9 +++++++++ YavscLib/YavscLib.csproj | 2 ++ 7 files changed, 55 insertions(+), 18 deletions(-) create mode 100644 YavscLib/HairCut/IHairCutQuery.cs create mode 100644 YavscLib/HairCut/IPrestation.cs diff --git a/Yavsc/Models/Haircut/HairCutQuery.cs b/Yavsc/Models/Haircut/HairCutQuery.cs index 1d086e15..d59cce7e 100644 --- a/Yavsc/Models/Haircut/HairCutQuery.cs +++ b/Yavsc/Models/Haircut/HairCutQuery.cs @@ -4,10 +4,11 @@ using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; using Yavsc.Models.Billing; using Yavsc.Models.Relationship; +using YavscLib.HairCut; namespace Yavsc.Models.Haircut { - public class HairCutQuery : NominativeServiceCommand + public class HairCutQuery : NominativeServiceCommand, IHairCutQuery { [Key(), DatabaseGenerated(DatabaseGeneratedOption.Identity)] public long Id { get; set; } @@ -18,7 +19,7 @@ namespace Yavsc.Models.Haircut [ForeignKey("PrestationId")] public virtual HairPrestation Prestation { get; set; } - [Required] + [Required][ForeignKey("LocationId")] public Location Location { get; set; } @@ -27,5 +28,12 @@ namespace Yavsc.Models.Haircut get; set; } + + public long LocationId + { + get; + + set; + } } -} \ No newline at end of file +} diff --git a/Yavsc/Models/Haircut/HairLength.cs b/Yavsc/Models/Haircut/HairLength.cs index 063d4171..e79ba8c5 100644 --- a/Yavsc/Models/Haircut/HairLength.cs +++ b/Yavsc/Models/Haircut/HairLength.cs @@ -13,4 +13,4 @@ namespace Yavsc.Models.Haircut [Display(Name="Longs")] Long } -} \ No newline at end of file +} diff --git a/Yavsc/Models/Haircut/HairPrestation.cs b/Yavsc/Models/Haircut/HairPrestation.cs index 0a6a601a..6e30a19d 100644 --- a/Yavsc/Models/Haircut/HairPrestation.cs +++ b/Yavsc/Models/Haircut/HairPrestation.cs @@ -5,10 +5,10 @@ using System.ComponentModel.DataAnnotations.Schema; namespace Yavsc.Models.Haircut { - public class HairPrestation - { + public class HairPrestation + { // Homme ou enfant => Coupe seule - // Couleur => Shampoing + // Couleur => Shampoing // Forfaits : Coupe + Technique // pas de coupe => technique @@ -16,30 +16,30 @@ namespace Yavsc.Models.Haircut public long Id { get; set; } [Display(Name="Longueur de cheveux")] - public HairLength Length { get; set; } + public Haircut.HairLength Length { get; set; } [Display(Name="Pour qui")] - public HairCutGenders Gender { get; set; } + public HairCutGenders Gender { get; set; } [Display(Name="Coupe")] - public bool Cut { get; set; } + public bool Cut { get; set; } [Display(Name="Coiffage")] - public HairDressings Dressing { get; set; } + public HairDressings Dressing { get; set; } [Display(Name="Technique")] - public HairTechnos Tech { get; set; } + public HairTechnos Tech { get; set; } [Display(Name="Shampoing")] - public bool Shampoo { get; set; } + public bool Shampoo { get; set; } [Display(Name="Couleurs")] - - public virtual List Taints { get; set; } + + public virtual List Taints { get; set; } [Display(Name="Soins")] - public bool Cares { get; set; } - + public bool Cares { get; set; } + } -} \ No newline at end of file +} diff --git a/Yavsc/Yavsc.csproj b/Yavsc/Yavsc.csproj index 58bbf63c..a17932ef 100644 --- a/Yavsc/Yavsc.csproj +++ b/Yavsc/Yavsc.csproj @@ -19,5 +19,13 @@ + + + + + + + + \ No newline at end of file diff --git a/YavscLib/HairCut/IHairCutQuery.cs b/YavscLib/HairCut/IHairCutQuery.cs new file mode 100644 index 00000000..9004d649 --- /dev/null +++ b/YavscLib/HairCut/IHairCutQuery.cs @@ -0,0 +1,10 @@ +namespace YavscLib.HairCut +{ + public interface IHairCutQuery + { + long Id { get; set; } + long PrestationId { get; set; } + + long LocationId { get; set; } + } +} diff --git a/YavscLib/HairCut/IPrestation.cs b/YavscLib/HairCut/IPrestation.cs new file mode 100644 index 00000000..b01ed9f9 --- /dev/null +++ b/YavscLib/HairCut/IPrestation.cs @@ -0,0 +1,9 @@ +namespace YavscLib.HairCut +{ + public interface IPrestation + { + long Id { get; set; } + int Length { get; set; } + + } +} diff --git a/YavscLib/YavscLib.csproj b/YavscLib/YavscLib.csproj index e1c475a4..29043a44 100644 --- a/YavscLib/YavscLib.csproj +++ b/YavscLib/YavscLib.csproj @@ -110,6 +110,8 @@ + +