Browse Source

CHG Maj modèle de données

olivier.massot 7 years ago
parent
commit
09e3774e42
30 changed files with 370 additions and 256 deletions
  1. 3 3
      CD67.FicheCollege.BDD/CD67.FicheCollege.BDD.sqlproj
  2. 2 2
      CD67.FicheCollege.BDD/dbo/Tables/ActionEduAxes.sql
  3. 15 0
      CD67.FicheCollege.BDD/dbo/Tables/ActionEduThematiques.sql
  4. 0 15
      CD67.FicheCollege.BDD/dbo/Tables/ActionThematiques.sql
  5. 0 16
      CD67.FicheCollege.BDD/dbo/Tables/Actions.sql
  6. 23 0
      CD67.FicheCollege.BDD/dbo/Tables/ActionsEdu.sql
  7. 4 3
      CD67.FicheCollege.Entity/ActionEdu.cs
  8. 4 4
      CD67.FicheCollege.Entity/ActionEduAxe.cs
  9. 6 6
      CD67.FicheCollege.Entity/ActionEduThematique.cs
  10. 3 0
      CD67.FicheCollege.Entity/Annee.cs
  11. 6 6
      CD67.FicheCollege.Entity/CD67.FicheCollege.Entity.csproj
  12. 3 3
      CD67.FicheCollege.Entity/EntityModel.Context.cs
  13. 102 67
      CD67.FicheCollege.Entity/EntityModel.edmx
  14. 6 5
      CD67.FicheCollege.Entity/EntityModel.edmx.diagram
  15. 62 46
      CD67.FicheCollege.Entity/EntityModel.edmx.sql
  16. 3 3
      CD67.FicheCollege.Entity/Extend/ActionEdu.cs
  17. 3 3
      CD67.FicheCollege.Entity/Extend/ActionEduAxe.cs
  18. 3 3
      CD67.FicheCollege.Entity/Extend/ActionEduThematique.cs
  19. 3 3
      CD67.FicheCollege.Factory/CD67.FicheCollege.Factory.csproj
  20. 2 2
      CD67.FicheCollege.Factory/Internal/ActionEduAxeFactory.cs
  21. 2 2
      CD67.FicheCollege.Factory/Internal/ActionEduFactory.cs
  22. 2 2
      CD67.FicheCollege.Factory/Internal/ActionEduThematiqueFactory.cs
  23. 8 1
      CD67.FicheCollege.MVC/CD67.FicheCollege.MVC.csproj
  24. 17 0
      CD67.FicheCollege.MVC/Controllers/ActionEduAxesController.cs
  25. 17 0
      CD67.FicheCollege.MVC/Controllers/ActionEduThematiquesController.cs
  26. 31 0
      CD67.FicheCollege.MVC/Controllers/ActionsEduController.cs
  27. 18 0
      CD67.FicheCollege.MVC/Models/ActionEduViewModel.cs
  28. 0 6
      CD67.FicheCollege.MVC/Mvc.sitemap
  29. 22 0
      CD67.FicheCollege.MVC/Views/ActionsEdu/Index.cshtml
  30. 0 55
      CD67.FicheCollege.MVC/Views/GestionActions/Index.cshtml

+ 3 - 3
CD67.FicheCollege.BDD/CD67.FicheCollege.BDD.sqlproj

@@ -69,8 +69,8 @@
     <Build Include="dbo\Tables\Colleges.sql" />
     <Build Include="dbo\Tables\Identites.sql" />
     <Build Include="dbo\Tables\Annees.sql" />
-    <Build Include="dbo\Tables\ActionAxes.sql" />
-    <Build Include="dbo\Tables\ActionThematiques.sql" />
-    <Build Include="dbo\Tables\Actions.sql" />
+    <Build Include="dbo\Tables\ActionEduAxes.sql" />
+    <Build Include="dbo\Tables\ActionEduThematiques.sql" />
+    <Build Include="dbo\Tables\ActionsEdu.sql" />
   </ItemGroup>
 </Project>

+ 2 - 2
CD67.FicheCollege.BDD/dbo/Tables/ActionAxes.sql → CD67.FicheCollege.BDD/dbo/Tables/ActionEduAxes.sql

@@ -1,8 +1,8 @@
-CREATE TABLE [dbo].[ActionAxes] (
+CREATE TABLE [dbo].[ActionEduAxes] (
     [Id]         INT            IDENTITY (1, 1) NOT NULL,
     [Nom]        NVARCHAR (MAX) NOT NULL,
     [Neutralise] BIT            NOT NULL,
     [Ordre]      INT            NOT NULL,
-    CONSTRAINT [PK_ActionAxes] PRIMARY KEY CLUSTERED ([Id] ASC)
+    CONSTRAINT [PK_ActionEduAxes] PRIMARY KEY CLUSTERED ([Id] ASC)
 );
 

+ 15 - 0
CD67.FicheCollege.BDD/dbo/Tables/ActionEduThematiques.sql

@@ -0,0 +1,15 @@
+CREATE TABLE [dbo].[ActionEduThematiques] (
+    [Id]             INT            IDENTITY (1, 1) NOT NULL,
+    [Nom]            NVARCHAR (MAX) NOT NULL,
+    [Neutralise]     BIT            NOT NULL,
+    [Ordre]          INT            NOT NULL,
+    [ActionEduAxeId] INT            NOT NULL,
+    CONSTRAINT [PK_ActionEduThematiques] PRIMARY KEY CLUSTERED ([Id] ASC),
+    CONSTRAINT [FK_ActionEduAxeActionEduThematique] FOREIGN KEY ([ActionEduAxeId]) REFERENCES [dbo].[ActionEduAxes] ([Id])
+);
+
+
+GO
+CREATE NONCLUSTERED INDEX [IX_FK_ActionEduAxeActionEduThematique]
+    ON [dbo].[ActionEduThematiques]([ActionEduAxeId] ASC);
+

+ 0 - 15
CD67.FicheCollege.BDD/dbo/Tables/ActionThematiques.sql

@@ -1,15 +0,0 @@
-CREATE TABLE [dbo].[ActionThematiques] (
-    [Id]          INT            IDENTITY (1, 1) NOT NULL,
-    [Nom]         NVARCHAR (MAX) NOT NULL,
-    [Neutralise]  BIT            NOT NULL,
-    [Ordre]       INT            NOT NULL,
-    [ActionAxeId] INT            NOT NULL,
-    CONSTRAINT [PK_ActionThematiques] PRIMARY KEY CLUSTERED ([Id] ASC),
-    CONSTRAINT [FK_ActionAxeActionThematique] FOREIGN KEY ([ActionAxeId]) REFERENCES [dbo].[ActionAxes] ([Id])
-);
-
-
-GO
-CREATE NONCLUSTERED INDEX [IX_FK_ActionAxeActionThematique]
-    ON [dbo].[ActionThematiques]([ActionAxeId] ASC);
-

+ 0 - 16
CD67.FicheCollege.BDD/dbo/Tables/Actions.sql

@@ -1,16 +0,0 @@
-CREATE TABLE [dbo].[Actions] (
-    [Id]                 INT            IDENTITY (1, 1) NOT NULL,
-    [Nom]                NVARCHAR (MAX) NOT NULL,
-    [Description]        NVARCHAR (MAX) NOT NULL,
-    [Neutralise]         BIT            NOT NULL,
-    [Ordre]              INT            NOT NULL,
-    [ActionThematiqueId] INT            NOT NULL,
-    CONSTRAINT [PK_Actions] PRIMARY KEY CLUSTERED ([Id] ASC),
-    CONSTRAINT [FK_ActionThematiqueAction] FOREIGN KEY ([ActionThematiqueId]) REFERENCES [dbo].[ActionThematiques] ([Id])
-);
-
-
-GO
-CREATE NONCLUSTERED INDEX [IX_FK_ActionThematiqueAction]
-    ON [dbo].[Actions]([ActionThematiqueId] ASC);
-

+ 23 - 0
CD67.FicheCollege.BDD/dbo/Tables/ActionsEdu.sql

@@ -0,0 +1,23 @@
+CREATE TABLE [dbo].[ActionsEdu] (
+    [Id]                    INT            IDENTITY (1, 1) NOT NULL,
+    [Nom]                   NVARCHAR (MAX) NOT NULL,
+    [Description]           NVARCHAR (MAX) NOT NULL,
+    [Neutralise]            BIT            NOT NULL,
+    [Ordre]                 INT            NOT NULL,
+    [ActionEduThematiqueId] INT            NOT NULL,
+    [Annee_Id]              INT            NOT NULL,
+    CONSTRAINT [PK_ActionsEdu] PRIMARY KEY CLUSTERED ([Id] ASC),
+    CONSTRAINT [FK_ActionEduAnnee] FOREIGN KEY ([Annee_Id]) REFERENCES [dbo].[Annees] ([Id]),
+    CONSTRAINT [FK_ActionEduThematiqueActionEdu] FOREIGN KEY ([ActionEduThematiqueId]) REFERENCES [dbo].[ActionEduThematiques] ([Id])
+);
+
+
+GO
+CREATE NONCLUSTERED INDEX [IX_FK_ActionEduThematiqueActionEdu]
+    ON [dbo].[ActionsEdu]([ActionEduThematiqueId] ASC);
+
+
+GO
+CREATE NONCLUSTERED INDEX [IX_FK_ActionEduAnnee]
+    ON [dbo].[ActionsEdu]([Annee_Id] ASC);
+

+ 4 - 3
CD67.FicheCollege.Entity/Action.cs → CD67.FicheCollege.Entity/ActionEdu.cs

@@ -12,15 +12,16 @@ namespace CD67.FicheCollege.Entity
     using System;
     using System.Collections.Generic;
     
-    public partial class Action
+    public partial class ActionEdu
     {
         public int Id { get; set; }
         public string Nom { get; set; }
         public string Description { get; set; }
         public bool Neutralise { get; set; }
         public int Ordre { get; set; }
-        public int ActionThematiqueId { get; set; }
+        public int ActionEduThematiqueId { get; set; }
     
-        public virtual ActionThematique ActionThematique { get; set; }
+        public virtual ActionEduThematique ActionEduThematique { get; set; }
+        public virtual Annee Annee { get; set; }
     }
 }

+ 4 - 4
CD67.FicheCollege.Entity/ActionAxe.cs → CD67.FicheCollege.Entity/ActionEduAxe.cs

@@ -12,13 +12,13 @@ namespace CD67.FicheCollege.Entity
     using System;
     using System.Collections.Generic;
     
-    public partial class ActionAxe
+    public partial class ActionEduAxe
     {
         [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")]
-        public ActionAxe()
+        public ActionEduAxe()
         {
             this.Neutralise = false;
-            this.ActionThematiques = new HashSet<ActionThematique>();
+            this.ActionEduThematiques = new HashSet<ActionEduThematique>();
         }
     
         public int Id { get; set; }
@@ -27,6 +27,6 @@ namespace CD67.FicheCollege.Entity
         public int Ordre { get; set; }
     
         [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
-        public virtual ICollection<ActionThematique> ActionThematiques { get; set; }
+        public virtual ICollection<ActionEduThematique> ActionEduThematiques { get; set; }
     }
 }

+ 6 - 6
CD67.FicheCollege.Entity/ActionThematique.cs → CD67.FicheCollege.Entity/ActionEduThematique.cs

@@ -12,23 +12,23 @@ namespace CD67.FicheCollege.Entity
     using System;
     using System.Collections.Generic;
     
-    public partial class ActionThematique
+    public partial class ActionEduThematique
     {
         [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")]
-        public ActionThematique()
+        public ActionEduThematique()
         {
             this.Neutralise = false;
-            this.Actions = new HashSet<Action>();
+            this.ActionEdus = new HashSet<ActionEdu>();
         }
     
         public int Id { get; set; }
         public string Nom { get; set; }
         public bool Neutralise { get; set; }
         public int Ordre { get; set; }
-        public int ActionAxeId { get; set; }
+        public int ActionEduAxeId { get; set; }
     
-        public virtual ActionAxe ActionAxe { get; set; }
+        public virtual ActionEduAxe ActionEduAxe { get; set; }
         [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
-        public virtual ICollection<Action> Actions { get; set; }
+        public virtual ICollection<ActionEdu> ActionEdus { get; set; }
     }
 }

+ 3 - 0
CD67.FicheCollege.Entity/Annee.cs

@@ -18,6 +18,7 @@ namespace CD67.FicheCollege.Entity
         public Annee()
         {
             this.Colleges = new HashSet<College>();
+            this.ActionsEdu = new HashSet<ActionEdu>();
         }
     
         public int Id { get; set; }
@@ -25,5 +26,7 @@ namespace CD67.FicheCollege.Entity
     
         [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
         public virtual ICollection<College> Colleges { get; set; }
+        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
+        public virtual ICollection<ActionEdu> ActionsEdu { get; set; }
     }
 }

+ 6 - 6
CD67.FicheCollege.Entity/CD67.FicheCollege.Entity.csproj

@@ -59,13 +59,13 @@
     <Reference Include="System.Xml" />
   </ItemGroup>
   <ItemGroup>
-    <Compile Include="Action.cs">
+    <Compile Include="ActionEdu.cs">
       <DependentUpon>EntityModel.tt</DependentUpon>
     </Compile>
-    <Compile Include="ActionAxe.cs">
+    <Compile Include="ActionEduAxe.cs">
       <DependentUpon>EntityModel.tt</DependentUpon>
     </Compile>
-    <Compile Include="ActionThematique.cs">
+    <Compile Include="ActionEduThematique.cs">
       <DependentUpon>EntityModel.tt</DependentUpon>
     </Compile>
     <Compile Include="Annee.cs">
@@ -93,9 +93,9 @@
     <Compile Include="Extend\College.cs" />
     <Compile Include="Extend\Territoire.cs" />
     <Compile Include="Extend\Identite.cs" />
-    <Compile Include="Extend\ActionAxe.cs" />
-    <Compile Include="Extend\ActionThematique.cs" />
-    <Compile Include="Extend\Action.cs" />
+    <Compile Include="Extend\ActionEduAxe.cs" />
+    <Compile Include="Extend\ActionEduThematique.cs" />
+    <Compile Include="Extend\ActionEdu.cs" />
     <Compile Include="Extend\TypeCollege.cs" />
     <Compile Include="Identite.cs">
       <DependentUpon>EntityModel.tt</DependentUpon>

+ 3 - 3
CD67.FicheCollege.Entity/EntityModel.Context.cs

@@ -30,8 +30,8 @@ namespace CD67.FicheCollege.Entity
         public virtual DbSet<College> Colleges { get; set; }
         public virtual DbSet<Identite> Identites { get; set; }
         public virtual DbSet<Annee> Annees { get; set; }
-        public virtual DbSet<ActionAxe> ActionAxes { get; set; }
-        public virtual DbSet<ActionThematique> ActionThematiques { get; set; }
-        public virtual DbSet<Action> Actions { get; set; }
+        public virtual DbSet<ActionEduAxe> ActionEduAxes { get; set; }
+        public virtual DbSet<ActionEduThematique> ActionEduThematiques { get; set; }
+        public virtual DbSet<ActionEdu> ActionsEdu { get; set; }
     }
 }

+ 102 - 67
CD67.FicheCollege.Entity/EntityModel.edmx

@@ -11,9 +11,9 @@
     <EntitySet Name="Colleges" EntityType="CD67.FicheCollege.Store.Colleges" store:Type="Tables" Schema="dbo" />
     <EntitySet Name="Identites" EntityType="CD67.FicheCollege.Store.Identites" store:Type="Tables" Schema="dbo" />
     <EntitySet Name="Annees" EntityType="CD67.FicheCollege.Store.Annees" store:Type="Tables" Schema="dbo" />
-    <EntitySet Name="ActionAxes" EntityType="CD67.FicheCollege.Store.ActionAxes" store:Type="Tables" Schema="dbo" />
-    <EntitySet Name="ActionThematiques" EntityType="CD67.FicheCollege.Store.ActionThematiques" store:Type="Tables" Schema="dbo" />
-    <EntitySet Name="Actions" EntityType="CD67.FicheCollege.Store.Actions" store:Type="Tables" Schema="dbo" />
+    <EntitySet Name="ActionEduAxes" EntityType="CD67.FicheCollege.Store.ActionEduAxes" store:Type="Tables" Schema="dbo" />
+    <EntitySet Name="ActionEduThematiques" EntityType="CD67.FicheCollege.Store.ActionEduThematiques" store:Type="Tables" Schema="dbo" />
+    <EntitySet Name="ActionsEdu" EntityType="CD67.FicheCollege.Store.ActionsEdu" store:Type="Tables" Schema="dbo" />
     <AssociationSet Name="FK_Colleges_Territoires" Association="CD67.FicheCollege.Store.FK_Colleges_Territoires">
       <End Role="Territoire" EntitySet="Territoires" />
       <End Role="College" EntitySet="Colleges" />
@@ -30,13 +30,17 @@
       <End Role="Annee" EntitySet="Annees" />
       <End Role="College" EntitySet="Colleges" />
     </AssociationSet>
-    <AssociationSet Name="ActionAxeActionThematique" Association="CD67.FicheCollege.Store.ActionAxeActionThematique">
-      <End Role="ActionAxe" EntitySet="ActionAxes" />
-      <End Role="ActionThematique" EntitySet="ActionThematiques" />
+    <AssociationSet Name="ActionEduAxeActionEduThematique" Association="CD67.FicheCollege.Store.ActionEduAxeActionEduThematique">
+      <End Role="ActionEduAxe" EntitySet="ActionEduAxes" />
+      <End Role="ActionEduThematique" EntitySet="ActionEduThematiques" />
     </AssociationSet>
-    <AssociationSet Name="ActionThematiqueAction" Association="CD67.FicheCollege.Store.ActionThematiqueAction">
-      <End Role="ActionThematique" EntitySet="ActionThematiques" />
-      <End Role="Action" EntitySet="Actions" />
+    <AssociationSet Name="ActionEduThematiqueActionEdu" Association="CD67.FicheCollege.Store.ActionEduThematiqueActionEdu">
+      <End Role="ActionEduThematique" EntitySet="ActionEduThematiques" />
+      <End Role="ActionEdu" EntitySet="ActionsEdu" />
+    </AssociationSet>
+    <AssociationSet Name="ActionEduAnnee" Association="CD67.FicheCollege.Store.ActionEduAnnee">
+      <End Role="ActionEdu" EntitySet="ActionsEdu" />
+      <End Role="Annee" EntitySet="Annees" />
     </AssociationSet>
   </EntityContainer>
   <EntityType Name="TypesCollege">
@@ -123,7 +127,7 @@
     <Property Name="Id" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
     <Property Name="Libelle" Type="nvarchar" Nullable="false" MaxLength="12" />
   </EntityType>
-  <EntityType Name="ActionAxes">
+  <EntityType Name="ActionEduAxes">
     <Key>
       <PropertyRef Name="Id" />
     </Key>
@@ -132,7 +136,7 @@
     <Property Name="Neutralise" Type="bit" Nullable="false" DefaultValue="false" />
     <Property Name="Ordre" Type="int" Nullable="false" />
   </EntityType>
-  <EntityType Name="ActionThematiques">
+  <EntityType Name="ActionEduThematiques">
     <Key>
       <PropertyRef Name="Id" />
     </Key>
@@ -140,9 +144,9 @@
     <Property Name="Nom" Type="nvarchar(max)" Nullable="false" />
     <Property Name="Neutralise" Type="bit" Nullable="false" DefaultValue="false" />
     <Property Name="Ordre" Type="int" Nullable="false" />
-    <Property Name="ActionAxeId" Type="int" Nullable="false" />
+    <Property Name="ActionEduAxeId" Type="int" Nullable="false" />
   </EntityType>
-  <EntityType Name="Actions">
+  <EntityType Name="ActionsEdu">
     <Key>
       <PropertyRef Name="Id" />
     </Key>
@@ -151,7 +155,8 @@
     <Property Name="Description" Type="nvarchar(max)" Nullable="false" />
     <Property Name="Neutralise" Type="bit" Nullable="false" />
     <Property Name="Ordre" Type="int" Nullable="false" />
-    <Property Name="ActionThematiqueId" Type="int" Nullable="false" />
+    <Property Name="ActionEduThematiqueId" Type="int" Nullable="false" />
+    <Property Name="Annee_Id" Type="int" Nullable="false" />
   </EntityType>
   <Association Name="FK_Colleges_Territoires">
     <End Role="Territoire" Type="CD67.FicheCollege.Store.Territoires" Multiplicity="0..1" />
@@ -201,27 +206,39 @@
       </Dependent>
     </ReferentialConstraint>
   </Association>
-  <Association Name="ActionAxeActionThematique">
-    <End Role="ActionAxe" Type="CD67.FicheCollege.Store.ActionAxes" Multiplicity="1" />
-    <End Role="ActionThematique" Type="CD67.FicheCollege.Store.ActionThematiques" Multiplicity="*" />
+  <Association Name="ActionEduAxeActionEduThematique">
+    <End Role="ActionEduAxe" Type="CD67.FicheCollege.Store.ActionEduAxes" Multiplicity="1" />
+    <End Role="ActionEduThematique" Type="CD67.FicheCollege.Store.ActionEduThematiques" Multiplicity="*" />
+    <ReferentialConstraint>
+      <Principal Role="ActionEduAxe">
+        <PropertyRef Name="Id" />
+      </Principal>
+      <Dependent Role="ActionEduThematique">
+        <PropertyRef Name="ActionEduAxeId" />
+      </Dependent>
+    </ReferentialConstraint>
+  </Association>
+  <Association Name="ActionEduThematiqueActionEdu">
+    <End Role="ActionEduThematique" Type="CD67.FicheCollege.Store.ActionEduThematiques" Multiplicity="1" />
+    <End Role="ActionEdu" Type="CD67.FicheCollege.Store.ActionsEdu" Multiplicity="*" />
     <ReferentialConstraint>
-      <Principal Role="ActionAxe">
+      <Principal Role="ActionEduThematique">
         <PropertyRef Name="Id" />
       </Principal>
-      <Dependent Role="ActionThematique">
-        <PropertyRef Name="ActionAxeId" />
+      <Dependent Role="ActionEdu">
+        <PropertyRef Name="ActionEduThematiqueId" />
       </Dependent>
     </ReferentialConstraint>
   </Association>
-  <Association Name="ActionThematiqueAction">
-    <End Role="ActionThematique" Type="CD67.FicheCollege.Store.ActionThematiques" Multiplicity="1" />
-    <End Role="Action" Type="CD67.FicheCollege.Store.Actions" Multiplicity="*" />
+  <Association Name="ActionEduAnnee">
+    <End Role="ActionEdu" Type="CD67.FicheCollege.Store.ActionsEdu" Multiplicity="*" />
+    <End Role="Annee" Type="CD67.FicheCollege.Store.Annees" Multiplicity="1" />
     <ReferentialConstraint>
-      <Principal Role="ActionThematique">
+      <Principal Role="Annee">
         <PropertyRef Name="Id" />
       </Principal>
-      <Dependent Role="Action">
-        <PropertyRef Name="ActionThematiqueId" />
+      <Dependent Role="ActionEdu">
+        <PropertyRef Name="Annee_Id" />
       </Dependent>
     </ReferentialConstraint>
   </Association>
@@ -251,16 +268,20 @@
             <End Role="Annee" EntitySet="Annees" />
             <End Role="College" EntitySet="Colleges" />
           </AssociationSet>
-          <EntitySet Name="ActionAxes" EntityType="CD67.FicheCollege.ActionAxe" />
-          <EntitySet Name="ActionThematiques" EntityType="CD67.FicheCollege.ActionThematique" />
-          <EntitySet Name="Actions" EntityType="CD67.FicheCollege.Action" />
-          <AssociationSet Name="ActionAxeActionThematique" Association="CD67.FicheCollege.ActionAxeActionThematique">
-            <End Role="ActionAxe" EntitySet="ActionAxes" />
-            <End Role="ActionThematique" EntitySet="ActionThematiques" />
+          <EntitySet Name="ActionEduAxes" EntityType="CD67.FicheCollege.ActionEduAxe" />
+          <EntitySet Name="ActionEduThematiques" EntityType="CD67.FicheCollege.ActionEduThematique" />
+          <EntitySet Name="ActionsEdu" EntityType="CD67.FicheCollege.ActionEdu" />
+          <AssociationSet Name="ActionEduAxeActionEduThematique" Association="CD67.FicheCollege.ActionEduAxeActionEduThematique">
+            <End Role="ActionEduAxe" EntitySet="ActionEduAxes" />
+            <End Role="ActionEduThematique" EntitySet="ActionEduThematiques" />
           </AssociationSet>
-          <AssociationSet Name="ActionThematiqueAction" Association="CD67.FicheCollege.ActionThematiqueAction">
-            <End Role="ActionThematique" EntitySet="ActionThematiques" />
-            <End Role="Action" EntitySet="Actions" />
+          <AssociationSet Name="ActionEduThematiqueActionEdu" Association="CD67.FicheCollege.ActionEduThematiqueActionEdu">
+            <End Role="ActionEduThematique" EntitySet="ActionEduThematiques" />
+            <End Role="ActionEdu" EntitySet="ActionsEdu" />
+          </AssociationSet>
+          <AssociationSet Name="ActionEduAnnee" Association="CD67.FicheCollege.ActionEduAnnee">
+            <End Role="ActionEdu" EntitySet="ActionsEdu" />
+            <End Role="Annee" EntitySet="Annees" />
           </AssociationSet>
           </EntityContainer>
         <EntityType Name="TypeCollege">
@@ -390,6 +411,7 @@
           <Property Name="Id" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
           <NavigationProperty Name="Colleges" Relationship="CD67.FicheCollege.AnneeCollege" FromRole="Annee" ToRole="College" />
           <Property Name="Libelle" Type="String" Nullable="false" MaxLength="12" FixedLength="false" Unicode="true" />
+          <NavigationProperty Name="ActionsEdu" Relationship="CD67.FicheCollege.ActionEduAnnee" FromRole="Annee" ToRole="ActionEdu" />
         </EntityType>
         <Association Name="AnneeCollege">
           <End Type="CD67.FicheCollege.Annee" Role="Annee" Multiplicity="1" />
@@ -403,7 +425,7 @@
             </Dependent>
           </ReferentialConstraint>
         </Association>
-        <EntityType Name="ActionAxe">
+        <EntityType Name="ActionEduAxe">
           <Key>
             <PropertyRef Name="Id" />
           </Key>
@@ -411,9 +433,9 @@
           <Property Name="Nom" Type="String" Nullable="false" />
           <Property Name="Neutralise" Type="Boolean" Nullable="false" DefaultValue="False" />
           <Property Name="Ordre" Type="Int32" Nullable="false" />
-          <NavigationProperty Name="ActionThematiques" Relationship="CD67.FicheCollege.ActionAxeActionThematique" FromRole="ActionAxe" ToRole="ActionThematique" />
+          <NavigationProperty Name="ActionEduThematiques" Relationship="CD67.FicheCollege.ActionEduAxeActionEduThematique" FromRole="ActionEduAxe" ToRole="ActionEduThematique" />
         </EntityType>
-        <EntityType Name="ActionThematique">
+        <EntityType Name="ActionEduThematique">
           <Key>
             <PropertyRef Name="Id" />
           </Key>
@@ -421,11 +443,11 @@
           <Property Name="Nom" Type="String" Nullable="false" />
           <Property Name="Neutralise" Type="Boolean" Nullable="false" DefaultValue="False" />
           <Property Name="Ordre" Type="Int32" Nullable="false" />
-          <NavigationProperty Name="ActionAxe" Relationship="CD67.FicheCollege.ActionAxeActionThematique" FromRole="ActionThematique" ToRole="ActionAxe" />
-          <Property Name="ActionAxeId" Type="Int32" Nullable="false" />
-          <NavigationProperty Name="Actions" Relationship="CD67.FicheCollege.ActionThematiqueAction" FromRole="ActionThematique" ToRole="Action" />
+          <NavigationProperty Name="ActionEduAxe" Relationship="CD67.FicheCollege.ActionEduAxeActionEduThematique" FromRole="ActionEduThematique" ToRole="ActionEduAxe" />
+          <Property Name="ActionEduAxeId" Type="Int32" Nullable="false" />
+          <NavigationProperty Name="ActionEdus" Relationship="CD67.FicheCollege.ActionEduThematiqueActionEdu" FromRole="ActionEduThematique" ToRole="ActionEdu" />
         </EntityType>
-        <EntityType Name="Action">
+        <EntityType Name="ActionEdu">
           <Key>
             <PropertyRef Name="Id" />
           </Key>
@@ -434,33 +456,38 @@
           <Property Name="Description" Type="String" Nullable="false" MaxLength="Max" />
           <Property Name="Neutralise" Type="Boolean" Nullable="false" />
           <Property Name="Ordre" Type="Int32" Nullable="false" />
-          <NavigationProperty Name="ActionThematique" Relationship="CD67.FicheCollege.ActionThematiqueAction" FromRole="Action" ToRole="ActionThematique" />
-          <Property Name="ActionThematiqueId" Type="Int32" Nullable="false" />
+          <NavigationProperty Name="ActionEduThematique" Relationship="CD67.FicheCollege.ActionEduThematiqueActionEdu" FromRole="ActionEdu" ToRole="ActionEduThematique" />
+          <Property Name="ActionEduThematiqueId" Type="Int32" Nullable="false" />
+          <NavigationProperty Name="Annee" Relationship="CD67.FicheCollege.ActionEduAnnee" FromRole="ActionEdu" ToRole="Annee" />
         </EntityType>
-        <Association Name="ActionAxeActionThematique">
-          <End Type="CD67.FicheCollege.ActionAxe" Role="ActionAxe" Multiplicity="1" />
-          <End Type="CD67.FicheCollege.ActionThematique" Role="ActionThematique" Multiplicity="*" />
+        <Association Name="ActionEduAxeActionEduThematique">
+          <End Type="CD67.FicheCollege.ActionEduAxe" Role="ActionEduAxe" Multiplicity="1" />
+          <End Type="CD67.FicheCollege.ActionEduThematique" Role="ActionEduThematique" Multiplicity="*" />
           <ReferentialConstraint>
-            <Principal Role="ActionAxe">
+            <Principal Role="ActionEduAxe">
               <PropertyRef Name="Id" />
             </Principal>
-            <Dependent Role="ActionThematique">
-              <PropertyRef Name="ActionAxeId" />
+            <Dependent Role="ActionEduThematique">
+              <PropertyRef Name="ActionEduAxeId" />
             </Dependent>
           </ReferentialConstraint>
         </Association>
-        <Association Name="ActionThematiqueAction">
-          <End Type="CD67.FicheCollege.ActionThematique" Role="ActionThematique" Multiplicity="1" />
-          <End Type="CD67.FicheCollege.Action" Role="Action" Multiplicity="*" />
+        <Association Name="ActionEduThematiqueActionEdu">
+          <End Type="CD67.FicheCollege.ActionEduThematique" Role="ActionEduThematique" Multiplicity="1" />
+          <End Type="CD67.FicheCollege.ActionEdu" Role="ActionEdu" Multiplicity="*" />
           <ReferentialConstraint>
-            <Principal Role="ActionThematique">
+            <Principal Role="ActionEduThematique">
               <PropertyRef Name="Id" />
             </Principal>
-            <Dependent Role="Action">
-              <PropertyRef Name="ActionThematiqueId" />
+            <Dependent Role="ActionEdu">
+              <PropertyRef Name="ActionEduThematiqueId" />
             </Dependent>
           </ReferentialConstraint>
         </Association>
+        <Association Name="ActionEduAnnee">
+          <End Type="CD67.FicheCollege.ActionEdu" Role="ActionEdu" Multiplicity="*" />
+          <End Type="CD67.FicheCollege.Annee" Role="Annee" Multiplicity="1" />
+        </Association>
         </Schema>
     </edmx:ConceptualModels>
     <!-- C-S mapping content -->
@@ -556,9 +583,9 @@
         </MappingFragment>
       </EntityTypeMapping>
     </EntitySetMapping>
-    <EntitySetMapping Name="ActionAxes">
-      <EntityTypeMapping TypeName="IsTypeOf(CD67.FicheCollege.ActionAxe)">
-        <MappingFragment StoreEntitySet="ActionAxes">
+    <EntitySetMapping Name="ActionEduAxes">
+      <EntityTypeMapping TypeName="IsTypeOf(CD67.FicheCollege.ActionEduAxe)">
+        <MappingFragment StoreEntitySet="ActionEduAxes">
           <ScalarProperty Name="Id" ColumnName="Id" />
           <ScalarProperty Name="Nom" ColumnName="Nom" />
           <ScalarProperty Name="Neutralise" ColumnName="Neutralise" />
@@ -566,29 +593,37 @@
         </MappingFragment>
       </EntityTypeMapping>
     </EntitySetMapping>
-    <EntitySetMapping Name="ActionThematiques">
-      <EntityTypeMapping TypeName="IsTypeOf(CD67.FicheCollege.ActionThematique)">
-        <MappingFragment StoreEntitySet="ActionThematiques">
+    <EntitySetMapping Name="ActionEduThematiques">
+      <EntityTypeMapping TypeName="IsTypeOf(CD67.FicheCollege.ActionEduThematique)">
+        <MappingFragment StoreEntitySet="ActionEduThematiques">
           <ScalarProperty Name="Id" ColumnName="Id" />
           <ScalarProperty Name="Nom" ColumnName="Nom" />
           <ScalarProperty Name="Neutralise" ColumnName="Neutralise" />
           <ScalarProperty Name="Ordre" ColumnName="Ordre" />
-          <ScalarProperty Name="ActionAxeId" ColumnName="ActionAxeId" />
+          <ScalarProperty Name="ActionEduAxeId" ColumnName="ActionEduAxeId" />
         </MappingFragment>
       </EntityTypeMapping>
     </EntitySetMapping>
-    <EntitySetMapping Name="Actions">
-      <EntityTypeMapping TypeName="IsTypeOf(CD67.FicheCollege.Action)">
-        <MappingFragment StoreEntitySet="Actions">
+    <EntitySetMapping Name="ActionsEdu">
+      <EntityTypeMapping TypeName="IsTypeOf(CD67.FicheCollege.ActionEdu)">
+        <MappingFragment StoreEntitySet="ActionsEdu">
           <ScalarProperty Name="Id" ColumnName="Id" />
           <ScalarProperty Name="Nom" ColumnName="Nom" />
           <ScalarProperty Name="Description" ColumnName="Description" />
           <ScalarProperty Name="Neutralise" ColumnName="Neutralise" />
           <ScalarProperty Name="Ordre" ColumnName="Ordre" />
-          <ScalarProperty Name="ActionThematiqueId" ColumnName="ActionThematiqueId" />
+          <ScalarProperty Name="ActionEduThematiqueId" ColumnName="ActionEduThematiqueId" />
         </MappingFragment>
       </EntityTypeMapping>
     </EntitySetMapping>
+    <AssociationSetMapping Name="ActionEduAnnee" TypeName="CD67.FicheCollege.ActionEduAnnee" StoreEntitySet="ActionsEdu">
+      <EndProperty Name="Annee">
+        <ScalarProperty Name="Id" ColumnName="Annee_Id" />
+      </EndProperty>
+      <EndProperty Name="ActionEdu">
+        <ScalarProperty Name="Id" ColumnName="Id" />
+      </EndProperty>
+    </AssociationSetMapping>
   </EntityContainerMapping>
 </Mapping></edmx:Mappings>
   </edmx:Runtime>

+ 6 - 5
CD67.FicheCollege.Entity/EntityModel.edmx.diagram

@@ -14,11 +14,12 @@
         <AssociationConnector Association="CD67.FicheCollege.FK_FicheIdentite_College" />
         <EntityTypeShape EntityType="CD67.FicheCollege.Annee" Width="1.5" PointX="3" PointY="0.5" />
         <AssociationConnector Association="CD67.FicheCollege.AnneeCollege" />
-        <EntityTypeShape EntityType="CD67.FicheCollege.ActionAxe" Width="1.5" PointX="11.125" PointY="3.125" />
-        <EntityTypeShape EntityType="CD67.FicheCollege.ActionThematique" Width="1.875" PointX="8.375" PointY="3.25" />
-        <EntityTypeShape EntityType="CD67.FicheCollege.Action" Width="1.5" PointX="5.875" PointY="3.25" />
-        <AssociationConnector Association="CD67.FicheCollege.ActionAxeActionThematique" />
-        <AssociationConnector Association="CD67.FicheCollege.ActionThematiqueAction" />
+        <EntityTypeShape EntityType="CD67.FicheCollege.ActionEduAxe" Width="1.5" PointX="11.125" PointY="3.125" />
+        <EntityTypeShape EntityType="CD67.FicheCollege.ActionEduThematique" Width="1.875" PointX="8.875" PointY="3.25" />
+        <EntityTypeShape EntityType="CD67.FicheCollege.ActionEdu" Width="1.5" PointX="6.75" PointY="3.25" />
+        <AssociationConnector Association="CD67.FicheCollege.ActionEduAxeActionEduThematique" />
+        <AssociationConnector Association="CD67.FicheCollege.ActionEduThematiqueActionEdu" />
+        <AssociationConnector Association="CD67.FicheCollege.ActionEduAnnee" />
         </Diagram>
     </edmx:Diagrams>
   </edmx:Designer>

+ 62 - 46
CD67.FicheCollege.Entity/EntityModel.edmx.sql

@@ -2,7 +2,7 @@
 -- --------------------------------------------------
 -- Entity Designer DDL Script for SQL Server 2005, 2008, 2012 and Azure
 -- --------------------------------------------------
--- Date Created: 02/28/2018 15:05:10
+-- Date Created: 02/28/2018 15:56:26
 -- Generated from EDMX file: C:\dev\dotnet\FicheCollege\CD67.FicheCollege.Entity\EntityModel.edmx
 -- --------------------------------------------------
 
@@ -29,11 +29,11 @@ GO
 IF OBJECT_ID(N'[dbo].[FK_AnneeCollege]', 'F') IS NOT NULL
     ALTER TABLE [dbo].[Colleges] DROP CONSTRAINT [FK_AnneeCollege];
 GO
-IF OBJECT_ID(N'[dbo].[FK_AxeThematique]', 'F') IS NOT NULL
-    ALTER TABLE [dbo].[Thematiques] DROP CONSTRAINT [FK_AxeThematique];
+IF OBJECT_ID(N'[dbo].[FK_ActionEduAxeActionEduThematique]', 'F') IS NOT NULL
+    ALTER TABLE [dbo].[ActionEduThematiques] DROP CONSTRAINT [FK_ActionEduAxeActionEduThematique];
 GO
-IF OBJECT_ID(N'[dbo].[FK_ThematiqueAction]', 'F') IS NOT NULL
-    ALTER TABLE [dbo].[Actions] DROP CONSTRAINT [FK_ThematiqueAction];
+IF OBJECT_ID(N'[dbo].[FK_ActionEduThematiqueActionEdu]', 'F') IS NOT NULL
+    ALTER TABLE [dbo].[ActionsEdu] DROP CONSTRAINT [FK_ActionEduThematiqueActionEdu];
 GO
 
 -- --------------------------------------------------
@@ -55,14 +55,14 @@ GO
 IF OBJECT_ID(N'[dbo].[Annees]', 'U') IS NOT NULL
     DROP TABLE [dbo].[Annees];
 GO
-IF OBJECT_ID(N'[dbo].[Axes]', 'U') IS NOT NULL
-    DROP TABLE [dbo].[Axes];
+IF OBJECT_ID(N'[dbo].[ActionEduAxes]', 'U') IS NOT NULL
+    DROP TABLE [dbo].[ActionEduAxes];
 GO
-IF OBJECT_ID(N'[dbo].[Thematiques]', 'U') IS NOT NULL
-    DROP TABLE [dbo].[Thematiques];
+IF OBJECT_ID(N'[dbo].[ActionEduThematiques]', 'U') IS NOT NULL
+    DROP TABLE [dbo].[ActionEduThematiques];
 GO
-IF OBJECT_ID(N'[dbo].[Actions]', 'U') IS NOT NULL
-    DROP TABLE [dbo].[Actions];
+IF OBJECT_ID(N'[dbo].[ActionsEdu]', 'U') IS NOT NULL
+    DROP TABLE [dbo].[ActionsEdu];
 GO
 
 -- --------------------------------------------------
@@ -153,8 +153,8 @@ CREATE TABLE [dbo].[Annees] (
 );
 GO
 
--- Creating table 'ActionAxes'
-CREATE TABLE [dbo].[ActionAxes] (
+-- Creating table 'ActionEduAxes'
+CREATE TABLE [dbo].[ActionEduAxes] (
     [Id] int IDENTITY(1,1) NOT NULL,
     [Nom] nvarchar(max)  NOT NULL,
     [Neutralise] bit  NOT NULL,
@@ -162,24 +162,25 @@ CREATE TABLE [dbo].[ActionAxes] (
 );
 GO
 
--- Creating table 'ActionThematiques'
-CREATE TABLE [dbo].[ActionThematiques] (
+-- Creating table 'ActionEduThematiques'
+CREATE TABLE [dbo].[ActionEduThematiques] (
     [Id] int IDENTITY(1,1) NOT NULL,
     [Nom] nvarchar(max)  NOT NULL,
     [Neutralise] bit  NOT NULL,
     [Ordre] int  NOT NULL,
-    [ActionAxeId] int  NOT NULL
+    [ActionEduAxeId] int  NOT NULL
 );
 GO
 
--- Creating table 'Actions'
-CREATE TABLE [dbo].[Actions] (
+-- Creating table 'ActionsEdu'
+CREATE TABLE [dbo].[ActionsEdu] (
     [Id] int IDENTITY(1,1) NOT NULL,
     [Nom] nvarchar(max)  NOT NULL,
     [Description] nvarchar(max)  NOT NULL,
     [Neutralise] bit  NOT NULL,
     [Ordre] int  NOT NULL,
-    [ActionThematiqueId] int  NOT NULL
+    [ActionEduThematiqueId] int  NOT NULL,
+    [Annee_Id] int  NOT NULL
 );
 GO
 
@@ -217,21 +218,21 @@ ADD CONSTRAINT [PK_Annees]
     PRIMARY KEY CLUSTERED ([Id] ASC);
 GO
 
--- Creating primary key on [Id] in table 'ActionAxes'
-ALTER TABLE [dbo].[ActionAxes]
-ADD CONSTRAINT [PK_ActionAxes]
+-- Creating primary key on [Id] in table 'ActionEduAxes'
+ALTER TABLE [dbo].[ActionEduAxes]
+ADD CONSTRAINT [PK_ActionEduAxes]
     PRIMARY KEY CLUSTERED ([Id] ASC);
 GO
 
--- Creating primary key on [Id] in table 'ActionThematiques'
-ALTER TABLE [dbo].[ActionThematiques]
-ADD CONSTRAINT [PK_ActionThematiques]
+-- Creating primary key on [Id] in table 'ActionEduThematiques'
+ALTER TABLE [dbo].[ActionEduThematiques]
+ADD CONSTRAINT [PK_ActionEduThematiques]
     PRIMARY KEY CLUSTERED ([Id] ASC);
 GO
 
--- Creating primary key on [Id] in table 'Actions'
-ALTER TABLE [dbo].[Actions]
-ADD CONSTRAINT [PK_Actions]
+-- Creating primary key on [Id] in table 'ActionsEdu'
+ALTER TABLE [dbo].[ActionsEdu]
+ADD CONSTRAINT [PK_ActionsEdu]
     PRIMARY KEY CLUSTERED ([Id] ASC);
 GO
 
@@ -293,34 +294,49 @@ ON [dbo].[Colleges]
     ([Annee_Id]);
 GO
 
--- Creating foreign key on [ActionAxeId] in table 'ActionThematiques'
-ALTER TABLE [dbo].[ActionThematiques]
-ADD CONSTRAINT [FK_ActionAxeActionThematique]
-    FOREIGN KEY ([ActionAxeId])
-    REFERENCES [dbo].[ActionAxes]
+-- Creating foreign key on [ActionEduAxeId] in table 'ActionEduThematiques'
+ALTER TABLE [dbo].[ActionEduThematiques]
+ADD CONSTRAINT [FK_ActionEduAxeActionEduThematique]
+    FOREIGN KEY ([ActionEduAxeId])
+    REFERENCES [dbo].[ActionEduAxes]
         ([Id])
     ON DELETE NO ACTION ON UPDATE NO ACTION;
 GO
 
--- Creating non-clustered index for FOREIGN KEY 'FK_ActionAxeActionThematique'
-CREATE INDEX [IX_FK_ActionAxeActionThematique]
-ON [dbo].[ActionThematiques]
-    ([ActionAxeId]);
+-- Creating non-clustered index for FOREIGN KEY 'FK_ActionEduAxeActionEduThematique'
+CREATE INDEX [IX_FK_ActionEduAxeActionEduThematique]
+ON [dbo].[ActionEduThematiques]
+    ([ActionEduAxeId]);
 GO
 
--- Creating foreign key on [ActionThematiqueId] in table 'Actions'
-ALTER TABLE [dbo].[Actions]
-ADD CONSTRAINT [FK_ActionThematiqueAction]
-    FOREIGN KEY ([ActionThematiqueId])
-    REFERENCES [dbo].[ActionThematiques]
+-- Creating foreign key on [ActionEduThematiqueId] in table 'ActionsEdu'
+ALTER TABLE [dbo].[ActionsEdu]
+ADD CONSTRAINT [FK_ActionEduThematiqueActionEdu]
+    FOREIGN KEY ([ActionEduThematiqueId])
+    REFERENCES [dbo].[ActionEduThematiques]
         ([Id])
     ON DELETE NO ACTION ON UPDATE NO ACTION;
 GO
 
--- Creating non-clustered index for FOREIGN KEY 'FK_ActionThematiqueAction'
-CREATE INDEX [IX_FK_ActionThematiqueAction]
-ON [dbo].[Actions]
-    ([ActionThematiqueId]);
+-- Creating non-clustered index for FOREIGN KEY 'FK_ActionEduThematiqueActionEdu'
+CREATE INDEX [IX_FK_ActionEduThematiqueActionEdu]
+ON [dbo].[ActionsEdu]
+    ([ActionEduThematiqueId]);
+GO
+
+-- Creating foreign key on [Annee_Id] in table 'ActionsEdu'
+ALTER TABLE [dbo].[ActionsEdu]
+ADD CONSTRAINT [FK_ActionEduAnnee]
+    FOREIGN KEY ([Annee_Id])
+    REFERENCES [dbo].[Annees]
+        ([Id])
+    ON DELETE NO ACTION ON UPDATE NO ACTION;
+GO
+
+-- Creating non-clustered index for FOREIGN KEY 'FK_ActionEduAnnee'
+CREATE INDEX [IX_FK_ActionEduAnnee]
+ON [dbo].[ActionsEdu]
+    ([Annee_Id]);
 GO
 
 -- --------------------------------------------------

+ 3 - 3
CD67.FicheCollege.Entity/Extend/Action.cs → CD67.FicheCollege.Entity/Extend/ActionEdu.cs

@@ -10,15 +10,15 @@ namespace CD67.FicheCollege.Entity
     /// <summary>
     /// Classe d'extension de celle d'Entity, nécessaire pour y associer les Metadata
     /// </summary>
-    [MetadataType(typeof(Action_Metadata))]
-    public partial class Action
+    [MetadataType(typeof(ActionEdu_Metadata))]
+    public partial class ActionEdu
     {
     }
 
     /// <summary>
     /// Classe contenant les DataAnnotations pour chaque champ
     /// </summary>
-    public class Action_Metadata
+    public class ActionEdu_Metadata
     {
         [Required(ErrorMessage = "Obligatoire")]
         public int Id { get; set; }

+ 3 - 3
CD67.FicheCollege.Entity/Extend/ActionAxe.cs → CD67.FicheCollege.Entity/Extend/ActionEduAxe.cs

@@ -10,15 +10,15 @@ namespace CD67.FicheCollege.Entity
     /// <summary>
     /// Classe d'extension de celle d'Entity, nécessaire pour y associer les Metadata
     /// </summary>
-    [MetadataType(typeof(ActionAxe_Metadata))]
-    public partial class ActionAxe
+    [MetadataType(typeof(ActionEduAxe_Metadata))]
+    public partial class ActionEduAxe
     {
     }
 
     /// <summary>
     /// Classe contenant les DataAnnotations pour chaque champ
     /// </summary>
-    public class ActionAxe_Metadata
+    public class ActionEduAxe_Metadata
     {
         [Required(ErrorMessage = "Obligatoire")]
         public int Id { get; set; }

+ 3 - 3
CD67.FicheCollege.Entity/Extend/ActionThematique.cs → CD67.FicheCollege.Entity/Extend/ActionEduThematique.cs

@@ -10,15 +10,15 @@ namespace CD67.FicheCollege.Entity
     /// <summary>
     /// Classe d'extension de celle d'Entity, nécessaire pour y associer les Metadata
     /// </summary>
-    [MetadataType(typeof(ActionThematique_Metadata))]
-    public partial class ActionThematique
+    [MetadataType(typeof(ActionEduThematique_Metadata))]
+    public partial class ActionEduThematique
     {
     }
 
     /// <summary>
     /// Classe contenant les DataAnnotations pour chaque champ
     /// </summary>
-    public class ActionThematique_Metadata
+    public class ActionEduThematique_Metadata
     {
         [Required(ErrorMessage = "Obligatoire")]
         public int Id { get; set; }

+ 3 - 3
CD67.FicheCollege.Factory/CD67.FicheCollege.Factory.csproj

@@ -57,13 +57,13 @@
     <Compile Include="AnneeFactory.cs" />
     <Compile Include="CollegeFactory.cs" />
     <Compile Include="IdentiteFactory.cs" />
-    <Compile Include="Internal\ActionAxeFactory.cs">
+    <Compile Include="Internal\ActionEduAxeFactory.cs">
       <DependentUpon>GenericFactories.tt</DependentUpon>
     </Compile>
-    <Compile Include="Internal\ActionFactory.cs">
+    <Compile Include="Internal\ActionEduFactory.cs">
       <DependentUpon>GenericFactories.tt</DependentUpon>
     </Compile>
-    <Compile Include="Internal\ActionThematiqueFactory.cs">
+    <Compile Include="Internal\ActionEduThematiqueFactory.cs">
       <DependentUpon>GenericFactories.tt</DependentUpon>
     </Compile>
     <Compile Include="Internal\AnneeFactory.cs">

+ 2 - 2
CD67.FicheCollege.Factory/Internal/ActionFactory.cs → CD67.FicheCollege.Factory/Internal/ActionEduAxeFactory.cs

@@ -9,13 +9,13 @@ namespace CD67.FicheCollege.Factory
     /// Factory générée automatiquement à l'aide du fichier GenericFactories.tt
     /// pour toutes les entités du fichier entity : /CD67.FicheCollege.Entity/EntityModel.edmx
     /// </summary>
-	public partial class ActionFactory : Internal.BaseFactory<Entity.Action>
+	public partial class ActionEduAxeFactory : Internal.BaseFactory<Entity.ActionEduAxe>
 	{
 		/// <summary>
         /// Constructeur public lié au constructeur de base
         /// </summary>
         /// <param name="dbContext">Context Entity Framework utilisé dans la classe</param>
-		public ActionFactory(Entities dbContext) : base(dbContext) { }
+		public ActionEduAxeFactory(Entities dbContext) : base(dbContext) { }
 	}
 }
 	

+ 2 - 2
CD67.FicheCollege.Factory/Internal/ActionAxeFactory.cs → CD67.FicheCollege.Factory/Internal/ActionEduFactory.cs

@@ -9,13 +9,13 @@ namespace CD67.FicheCollege.Factory
     /// Factory générée automatiquement à l'aide du fichier GenericFactories.tt
     /// pour toutes les entités du fichier entity : /CD67.FicheCollege.Entity/EntityModel.edmx
     /// </summary>
-	public partial class ActionAxeFactory : Internal.BaseFactory<Entity.ActionAxe>
+	public partial class ActionEduFactory : Internal.BaseFactory<Entity.ActionEdu>
 	{
 		/// <summary>
         /// Constructeur public lié au constructeur de base
         /// </summary>
         /// <param name="dbContext">Context Entity Framework utilisé dans la classe</param>
-		public ActionAxeFactory(Entities dbContext) : base(dbContext) { }
+		public ActionEduFactory(Entities dbContext) : base(dbContext) { }
 	}
 }
 	

+ 2 - 2
CD67.FicheCollege.Factory/Internal/ActionThematiqueFactory.cs → CD67.FicheCollege.Factory/Internal/ActionEduThematiqueFactory.cs

@@ -9,13 +9,13 @@ namespace CD67.FicheCollege.Factory
     /// Factory générée automatiquement à l'aide du fichier GenericFactories.tt
     /// pour toutes les entités du fichier entity : /CD67.FicheCollege.Entity/EntityModel.edmx
     /// </summary>
-	public partial class ActionThematiqueFactory : Internal.BaseFactory<Entity.ActionThematique>
+	public partial class ActionEduThematiqueFactory : Internal.BaseFactory<Entity.ActionEduThematique>
 	{
 		/// <summary>
         /// Constructeur public lié au constructeur de base
         /// </summary>
         /// <param name="dbContext">Context Entity Framework utilisé dans la classe</param>
-		public ActionThematiqueFactory(Entities dbContext) : base(dbContext) { }
+		public ActionEduThematiqueFactory(Entities dbContext) : base(dbContext) { }
 	}
 }
 	

+ 8 - 1
CD67.FicheCollege.MVC/CD67.FicheCollege.MVC.csproj

@@ -156,6 +156,9 @@
   </ItemGroup>
   <ItemGroup>
     <Compile Include="App_Start\BundleConfig.cs" />
+    <Compile Include="Controllers\ActionEduAxesController.cs" />
+    <Compile Include="Controllers\ActionsEduController.cs" />
+    <Compile Include="Controllers\ActionEduThematiquesController.cs" />
     <Compile Include="Controllers\AdminController.cs" />
     <Compile Include="Controllers\CollegesController.cs" />
     <Compile Include="Controllers\GestionActionsController.cs" />
@@ -172,6 +175,8 @@
     <Compile Include="Internal\MvcHtmlHelpers.cs" />
     <Compile Include="Internal\Navigation.cs" />
     <Compile Include="Internal\UtilisateurConnecteFactory.cs" />
+    <Compile Include="Models\TypeCollegeViewModel.cs" />
+    <Compile Include="Models\ActionEduViewModel.cs" />
     <Compile Include="Models\IdentiteViewModel.cs" />
     <Compile Include="Models\CollegeViewModel.cs" />
     <Compile Include="Models\AnneeViewModel.cs" />
@@ -390,13 +395,15 @@
     <Content Include="Views\Colleges\Edit.cshtml" />
     <Content Include="Views\Identites\Details.cshtml" />
     <Content Include="Views\Identites\Edit.cshtml" />
-    <Content Include="Views\GestionActions\Index.cshtml" />
     <Content Include="Views\Annees\Details.cshtml" />
     <Content Include="Views\Annees\Index.cshtml" />
     <Content Include="Views\Colleges\Index.cshtml" />
+    <Content Include="Views\ActionsEdu\Index.cshtml" />
   </ItemGroup>
   <ItemGroup>
     <Folder Include="App_Data\" />
+    <Folder Include="Views\ActionEduAxes\" />
+    <Folder Include="Views\ActionEduThematiques\" />
   </ItemGroup>
   <ItemGroup>
     <Content Include="packages.config">

+ 17 - 0
CD67.FicheCollege.MVC/Controllers/ActionEduAxesController.cs

@@ -0,0 +1,17 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+using System.Web.Mvc;
+
+namespace CD67.FicheCollege.MVC.Controllers
+{
+    public class ActionEduAxesController : Controller
+    {
+        // GET: ActionAxes
+        public ActionResult Index()
+        {
+            return View();
+        }
+    }
+}

+ 17 - 0
CD67.FicheCollege.MVC/Controllers/ActionEduThematiquesController.cs

@@ -0,0 +1,17 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+using System.Web.Mvc;
+
+namespace CD67.FicheCollege.MVC.Controllers
+{
+    public class ActionEduThematiquesController : Controller
+    {
+        // GET: ActionThematiques
+        public ActionResult Index()
+        {
+            return View();
+        }
+    }
+}

+ 31 - 0
CD67.FicheCollege.MVC/Controllers/ActionsEduController.cs

@@ -0,0 +1,31 @@
+using CD67.FicheCollege.Entity;
+using CD67.FicheCollege.Factory;
+using CD67.FicheCollege.MVC.Models;
+using System.Collections.Generic;
+using System.Linq;
+using System.Net;
+using System.Web;
+using System.Web.Mvc;
+
+namespace CD67.FicheCollege.MVC.Controllers
+{
+    public class ActionsEduController : Controller
+    {
+        private Entities db = new Entities();
+
+        // GET: Actions
+        public ActionResult Index(int? annee_id)
+        {
+            if (annee_id == null)
+            {
+                return new HttpStatusCodeResult(HttpStatusCode.BadRequest);
+            }
+
+            AnneeFactory fact = new AnneeFactory(db);
+            Annee annee = fact.getById(annee_id);
+            AnneeViewModel model = new AnneeViewModel(annee, ModeAcces.Lecture);
+            return View(model);
+        }
+
+    }
+}

+ 18 - 0
CD67.FicheCollege.MVC/Models/ActionEduViewModel.cs

@@ -0,0 +1,18 @@
+using CD67.FicheCollege.Entity;
+using CD67.FicheCollege.Factory;
+using CD67.FicheCollege.MVC.Internal;
+using System.Collections.Generic;
+using System.Web.Mvc;
+
+namespace CD67.FicheCollege.MVC.Models
+{
+    public class ActionEduViewModel : BaseViewModel<ActionEdu>
+    {
+        public ActionEduViewModel(ActionEdu model, ModeAcces acces = ModeAcces.Lecture, Dictionary<string, object> bag = null) : base(model, acces, bag)
+        {
+        }
+
+        public override string Annee_Lib { get { return Obj.Annee.Libelle; } }
+
+    }
+}

+ 0 - 6
CD67.FicheCollege.MVC/Mvc.sitemap

@@ -14,16 +14,10 @@
         <mvcSiteMapNode title="Identité" controller="Identites" action="Details" preservedRouteParameters="id" >
           <mvcSiteMapNode title="Edition de l'identité" controller="Identites" action="Edit" preservedRouteParameters="id" />
         </mvcSiteMapNode>
-
-        <mvcSiteMapNode title="Actions" controller="ActionsCLAS" action="Details" preservedRouteParameters="id" >
-          <mvcSiteMapNode title="Edition d'une action CLAS" controller="ActionsCLAS" action="Edit" preservedRouteParameters="id" />
-        </mvcSiteMapNode>
           
       </mvcSiteMapNode>
     </mvcSiteMapNode>
 
-    <mvcSiteMapNode title="Gestion des Actions" controller="GestionActions" action="Index" />
-    
     <mvcSiteMapNode title="Administration" controller="Admin" action="Index">
       <mvcSiteMapNode title="Types de collège" controller="TypeCollege" action="Index">
         <mvcSiteMapNode title="Création d'un type de collège" controller="TypeCollege" action="Create" />

+ 22 - 0
CD67.FicheCollege.MVC/Views/ActionsEdu/Index.cshtml

@@ -0,0 +1,22 @@
+@using CD67.FicheCollege.MVC.Models
+@model AnneeViewModel
+
+<title>Actions @Model.Annee_Lib</title>
+
+@{
+    ViewBag.Title = "Actions " + @Model.Annee_Lib;
+    Layout = "~/Views/Shared/_Layout.cshtml";
+}
+
+<h2>Index</h2>
+
+<h3>Affectation</h3>
+<br/>
+
+<h3>Administration</h3>
+
+<ul>
+    <li>@Html.ActionLink("Les axes", "Index", "ActionAxes")</li>
+    <li>@Html.ActionLink("Les thématiques", "Index", "ActionThematiques")</li>
+    <li>@Html.ActionLink("Les actions " + @Model.Annee_Lib, "Index", "Admin", new { annee_id = Model.Obj.Id }, null)</li>
+</ul>

+ 0 - 55
CD67.FicheCollege.MVC/Views/GestionActions/Index.cshtml

@@ -1,55 +0,0 @@
-@model IEnumerable<CD67.FicheCollege.Entity.College>
-
-@{
-    ViewBag.Title = "Liste";
-    Layout = "~/Views/Shared/_Layout.cshtml";
-}
-
-
-<h1>Actions</h1>
-
-<fieldset>
-    <legend>
-        Gestion des actions éducatives, sportives et Culturelles
-    </legend>
-
-    @Model.Count(i => i.Actions_CLAS.Action == true) collège(s) avec une action CLAS
-    <br /><br />
-    <table class="table">
-        <tr>
-            <th>
-                @Html.DisplayNameFor(model => model.Id)
-            </th>
-            <th>
-                @Html.DisplayNameFor(model => model.Libelle)
-            </th>
-            <th>
-                CLAS
-            </th>
-            <th>
-                Commentaire CLAS
-            </th>
-            <th></th>
-        </tr>
-
-        @foreach (var item in Model)
-        {
-            <tr>
-                <td>
-                    @Html.DisplayFor(modelItem => item.Id)
-                </td>
-                <td>
-                    @Html.DisplayFor(modelItem => item.Libelle)
-                </td>
-                <td>
-                    @Html.DisplayFor(modelItem => item.Actions_CLAS.Action)
-                </td>
-                <td style="white-space: pre-line;">@Html.DisplayFor(modelItem => item.Actions_CLAS.Commentaire)</td>
-                <td>
-                    @Html.ActionLink("Modifier", "Details", "ActionsCLAS", new { id = item.Id }, null)
-                </td>
-            </tr>
-        }
-
-    </table>
-</fieldset>