Selaa lähdekoodia

CRUD identites ok

olivier.massot 7 vuotta sitten
vanhempi
commit
1c85d54011

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

@@ -173,6 +173,7 @@
     <Compile Include="Internal\MvcHtmlHelpers.cs" />
     <Compile Include="Internal\Navigation.cs" />
     <Compile Include="Internal\UtilisateurConnecteFactory.cs" />
+    <Compile Include="Models\ContactViewModel.cs" />
     <Compile Include="Models\TopModel.cs" />
     <Compile Include="Models\UtilisateurConnecte.cs" />
     <Compile Include="Properties\AssemblyInfo.cs" />

+ 13 - 29
CD67.FicheCollege.MVC/Controllers/IdentitesController.cs

@@ -8,6 +8,7 @@ using System.Web;
 using System.Web.Mvc;
 using CD67.FicheCollege.Entity;
 using CD67.FicheCollege.Factory;
+using CD67.FicheCollege.MVC.Models;
 
 namespace CD67.FicheCollege.MVC.Controllers
 {
@@ -28,7 +29,10 @@ namespace CD67.FicheCollege.MVC.Controllers
             {
                 return HttpNotFound();
             }
-            return View(GetViewModel(identite, Models.ModeAcces.Lecture));
+
+            IdentiteViewModel model = new IdentiteViewModel(identite);
+
+            return View(model);
         }
 
         // GET: Identite/Edit/5
@@ -44,7 +48,9 @@ namespace CD67.FicheCollege.MVC.Controllers
             {
                 return HttpNotFound();
             }
-            return View(GetViewModel(identite, Models.ModeAcces.Modification));
+
+            IdentiteViewModel model = new IdentiteViewModel(identite, ModeAcces.Modification);
+            return View(model);
         }
 
         // POST: Identite/Edit/5
@@ -52,39 +58,17 @@ namespace CD67.FicheCollege.MVC.Controllers
         // plus de détails, voir  http://go.microsoft.com/fwlink/?LinkId=317598.
         [HttpPost]
         [ValidateAntiForgeryToken]
-        public ActionResult Edit(Entity.Identite Contenu)
+        public ActionResult Edit(Entity.Identite identite)
         {
             if (ModelState.IsValid)
             {
                 IdentiteFactory identiteFactory = new IdentiteFactory(db);
-                identiteFactory.update(ref Contenu);
-                return RedirectToAction("Details", new { Id = Contenu.College_Id });
+                identiteFactory.update(ref identite);
+                return RedirectToAction("Details", new { Id = identite.College_Id });
             }
-            return View(GetViewModel(Contenu, Models.ModeAcces.Modification));
-        }
 
-        private Models.CollegeViewModel_old GetViewModel(Entity.Identite entity, Models.ModeAcces Acces)
-        {
-            object contenu;
-            if (Acces == Models.ModeAcces.Lecture)
-            {
-                List<Models.ContactViewModel> listeContacts = new List<Models.ContactViewModel>();
-                if (entity.Principal_SID != null) listeContacts.Add(new Models.ContactViewModel("Principal", entity.Principal_SID, entity.Principal_Login, entity.Principal_Nom, entity.Principal_Prenom, entity.Principal_Email, entity.Principal_Tel, entity.Principal_Structure));
-                if (entity.Adjoint_SID != null) listeContacts.Add(new Models.ContactViewModel("Principal adjoint", entity.Adjoint_SID, entity.Adjoint_Login, entity.Adjoint_Nom, entity.Adjoint_Prenom, entity.Adjoint_Email, entity.Adjoint_Tel, entity.Adjoint_Structure));
-                if (entity.Gestionnaire_SID != null) listeContacts.Add(new Models.ContactViewModel("Gestionnaire", entity.Gestionnaire_SID, entity.Gestionnaire_Login, entity.Gestionnaire_Nom, entity.Gestionnaire_Prenom, entity.Gestionnaire_Email, entity.Gestionnaire_Tel, entity.Gestionnaire_Structure));
-                if (entity.Gestionnaire2_SID != null) listeContacts.Add(new Models.ContactViewModel("Gestionnaire n°2", entity.Gestionnaire2_SID, entity.Gestionnaire2_Login, entity.Gestionnaire2_Nom, entity.Gestionnaire2_Prenom, entity.Gestionnaire2_Email, entity.Gestionnaire2_Tel, entity.Gestionnaire2_Structure));
-                contenu = listeContacts;
-            }
-            else contenu = entity;
-
-            return new Models.CollegeViewModel_old()
-            {
-                College_Id = entity.College.Id,
-                College_Libelle = entity.College.Libelle,
-                Contenu = contenu,
-                Acces = Acces,
-                Listes = null
-            };
+            IdentiteViewModel model = new IdentiteViewModel(identite, ModeAcces.Modification);
+            return View(model);
         }
 
         protected override void Dispose(bool disposing)

+ 32 - 0
CD67.FicheCollege.MVC/Models/ContactViewModel.cs

@@ -0,0 +1,32 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+
+namespace CD67.FicheCollege.MVC.Models
+{
+    public class ContactViewModel
+    {
+        public string Role { get; set; }
+        public string SID { get; set; }
+        public string Login { get; set; }
+        public string Nom { get; set; }
+        public string Prenom { get; set; }
+        public string Email { get; set; }
+        public string Tel { get; set; }
+        public string Structure { get; set; }
+
+        public ContactViewModel(string Role, string SID, string Login, string Nom, string Prenom, string Email, string Tel, string Structure)
+        {
+            this.Role = Role;
+            this.SID = SID;
+            this.Login = Login;
+            this.Nom = Nom;
+            this.Prenom = Prenom;
+            this.Email = Email;
+            this.Tel = Tel;
+            this.Structure = Structure;
+        }
+
+    }
+}

+ 13 - 2
CD67.FicheCollege.MVC/Models/TopModel.cs

@@ -105,10 +105,21 @@ namespace CD67.FicheCollege.MVC.Models
         }
     }
 
-    public class ContactViewModel : TopModel
+    public class IdentiteViewModel : TopModel
     {
-        public ContactViewModel(object model, ModeAcces acces = ModeAcces.Lecture, Dictionary<string, object> bag = null) : base(model, acces, bag)
+        public List<ContactViewModel> Contacts;
+
+        public IdentiteViewModel(object model, ModeAcces acces = ModeAcces.Lecture, Dictionary<string, object> bag = null) : base(model, acces, bag)
         {
+            Contacts = new List<ContactViewModel>();
+            if (Obj.Principal_SID != null)
+                Contacts.Add(new ContactViewModel("Principal", Obj.Principal_SID, Obj.Principal_Login, Obj.Principal_Nom, Obj.Principal_Prenom, Obj.Principal_Email, Obj.Principal_Tel, Obj.Principal_Structure));
+            if (Obj.Adjoint_SID != null)
+                Contacts.Add(new ContactViewModel("Principal adjoint", Obj.Adjoint_SID, Obj.Adjoint_Login, Obj.Adjoint_Nom, Obj.Adjoint_Prenom, Obj.Adjoint_Email, Obj.Adjoint_Tel, Obj.Adjoint_Structure));
+            if (Obj.Gestionnaire_SID != null)
+                Contacts.Add(new ContactViewModel("Gestionnaire", Obj.Gestionnaire_SID, Obj.Gestionnaire_Login, Obj.Gestionnaire_Nom, Obj.Gestionnaire_Prenom, Obj.Gestionnaire_Email, Obj.Gestionnaire_Tel, Obj.Gestionnaire_Structure));
+            if (Obj.Gestionnaire2_SID != null)
+                Contacts.Add(new ContactViewModel("Gestionnaire n°2", Obj.Gestionnaire2_SID, Obj.Gestionnaire2_Login, Obj.Gestionnaire2_Nom, Obj.Gestionnaire2_Prenom, Obj.Gestionnaire2_Email, Obj.Gestionnaire2_Tel, Obj.Gestionnaire2_Structure));
         }
 
         public Identite Obj

+ 6 - 6
CD67.FicheCollege.MVC/Views/Identites/Details.cshtml

@@ -1,15 +1,15 @@
 @using CD67.FicheCollege.MVC.Models
-@model CollegeViewModel
+@model IdentiteViewModel
 
 @{
     ViewBag.Title = "Details";
     Layout = "~/Views/Shared/_Layout.cshtml";
-    List<ContactViewModel> contenu = Model.Contenu as List<ContactViewModel>;
+    Identite identite = Model.Obj;
 }
 
 <h1>
     Indentité
-    <br /><span>du @Model.College_Libelle</span>
+    <br /><span>du @identite.College.Libelle</span>
 </h1>
 
 <fieldset>
@@ -18,19 +18,19 @@
         @if (Model.Acces == ModeAcces.Lecture)
         {
             <div class="pull-right">
-                @Html.ActionLink("Modifier", "Edit", "Identites", new { Id = Model.College_Id }, new { @class = "btn btn-default" })
+                @Html.ActionLink("Modifier", "Edit", "Identites", new { Id = identite.College.Id }, new { @class = "btn btn-default" })
             </div>
         }
     </legend>
 
-    @if (contenu.Count == 0)
+    @if (Model.Contacts.Count == 0)
     {
         <text>Aucun contact défini</text>
     }
     else
     {
         <div class="flex-list">
-            @foreach (var item in contenu)
+            @foreach (var item in Model.Contacts)
             {
                 <div style="width:400px !important">
                     <div class="panel panel-default" style="overflow: hidden;">

+ 53 - 53
CD67.FicheCollege.MVC/Views/Identites/Edit.cshtml

@@ -1,13 +1,13 @@
 @using CD67.FicheCollege.MVC.Models
-@model CollegeViewModel
+@model IdentiteViewModel
 
 @{
     ViewBag.Title = "Edit";
     Layout = "~/Views/Shared/_Layout.cshtml";
-    Identite contenu = Model.Contenu as Identite;
+    Identite identite = Model.Obj;
 }
 
-<h1>@Model.College_Libelle</h1>
+<h1>@identite.College.Libelle</h1>
 
 @using (Html.BeginForm())
 {
@@ -19,22 +19,22 @@
         </legend>
         <div class="form-horizontal">
             @Html.ValidationSummary(true, "", new { @class = "text-danger" })
-            @Html.HiddenFor(model => contenu.College_Id)
+            @Html.HiddenFor(model => identite.College_Id)
 
             <div class="form-group">
                 @Html.Label("Principal et ajoint", htmlAttributes: new { @class = "control-label col-md-2" })
 
                 <div class="col-md-4" data-picker-type="principal">
-                    @Html.HiddenFor(model => contenu.Principal_SID, new { data_picker = "agent.id" })
-                    @Html.HiddenFor(model => contenu.Principal_Login, new { data_picker = "agent.login" })
-                    @Html.HiddenFor(model => contenu.Principal_Nom, new { data_picker = "agent.nom" })
-                    @Html.HiddenFor(model => contenu.Principal_Prenom, new { data_picker = "agent.prenom" })
-                    @Html.HiddenFor(model => contenu.Principal_Email, new { data_picker = "agent.mail" })
-                    @Html.HiddenFor(model => contenu.Principal_Structure, new { data_picker = "agent.chemin" })
-                    @Html.HiddenFor(model => contenu.Principal_Tel, new { data_picker = "agent.telephone" })
+                    @Html.HiddenFor(model => identite.Principal_SID, new { data_picker = "agent.id" })
+                    @Html.HiddenFor(model => identite.Principal_Login, new { data_picker = "agent.login" })
+                    @Html.HiddenFor(model => identite.Principal_Nom, new { data_picker = "agent.nom" })
+                    @Html.HiddenFor(model => identite.Principal_Prenom, new { data_picker = "agent.prenom" })
+                    @Html.HiddenFor(model => identite.Principal_Email, new { data_picker = "agent.mail" })
+                    @Html.HiddenFor(model => identite.Principal_Structure, new { data_picker = "agent.chemin" })
+                    @Html.HiddenFor(model => identite.Principal_Tel, new { data_picker = "agent.telephone" })
                     <a class='modal-window' href="http://referentiel.bas-rhin.fr/picker/cd67/ad67/?type=principal" title="Selection du principal (nouvelle fenetre)">Sélectionner un principal</a>
                     <br />
-                    <div class="panel panel-default" id="Principal_Panel" name="Principal_Panel" style="@if (contenu.Principal_SID == null) { <text>display: none;</text> }">
+                    <div class="panel panel-default" id="Principal_Panel" name="Principal_Panel" style="@if (identite.Principal_SID == null) { <text>display: none;</text> }">
                         <div class="panel-heading clearfix">
                             <h4 class="panel-title pull-left" style="padding-top: 7.5px;">
                                 <i class="fa fa-user color1" aria-hidden="true"></i>
@@ -45,25 +45,25 @@
                             </div>
                         </div>
                         <div class="panel-body" style="text-align: center;">
-                            <b><span data-picker="agent.prenom">@contenu.Principal_Prenom</span> <span data-picker="agent.nom">@contenu.Principal_Nom</span></b>
-                            <br /><span data-picker="agent.chemin">@contenu.Principal_Structure</span>
-                            <br /><span data-picker="agent.mail">@contenu.Principal_Email</span>
-                            <br />Tel : <span data-picker="agent.telephone">@contenu.Principal_Tel</span>
+                            <b><span data-picker="agent.prenom">@identite.Principal_Prenom</span> <span data-picker="agent.nom">@identite.Principal_Nom</span></b>
+                            <br /><span data-picker="agent.chemin">@identite.Principal_Structure</span>
+                            <br /><span data-picker="agent.mail">@identite.Principal_Email</span>
+                            <br />Tel : <span data-picker="agent.telephone">@identite.Principal_Tel</span>
                         </div>
                     </div>
                 </div>
 
                 <div class="col-md-4" data-picker-type="adjoint">
-                    @Html.HiddenFor(model => contenu.Adjoint_SID, new { data_picker = "agent.id" })
-                    @Html.HiddenFor(model => contenu.Adjoint_Login, new { data_picker = "agent.login" })
-                    @Html.HiddenFor(model => contenu.Adjoint_Nom, new { data_picker = "agent.nom" })
-                    @Html.HiddenFor(model => contenu.Adjoint_Prenom, new { data_picker = "agent.prenom" })
-                    @Html.HiddenFor(model => contenu.Adjoint_Email, new { data_picker = "agent.mail" })
-                    @Html.HiddenFor(model => contenu.Adjoint_Structure, new { data_picker = "agent.chemin" })
-                    @Html.HiddenFor(model => contenu.Adjoint_Tel, new { data_picker = "agent.telephone" })
+                    @Html.HiddenFor(model => identite.Adjoint_SID, new { data_picker = "agent.id" })
+                    @Html.HiddenFor(model => identite.Adjoint_Login, new { data_picker = "agent.login" })
+                    @Html.HiddenFor(model => identite.Adjoint_Nom, new { data_picker = "agent.nom" })
+                    @Html.HiddenFor(model => identite.Adjoint_Prenom, new { data_picker = "agent.prenom" })
+                    @Html.HiddenFor(model => identite.Adjoint_Email, new { data_picker = "agent.mail" })
+                    @Html.HiddenFor(model => identite.Adjoint_Structure, new { data_picker = "agent.chemin" })
+                    @Html.HiddenFor(model => identite.Adjoint_Tel, new { data_picker = "agent.telephone" })
                     <a class='modal-window' href="http://referentiel.bas-rhin.fr/picker/cd67/ad67/?type=adjoint" title="Selection du principal adjoint (nouvelle fenetre)">Sélectionner un principal adjoint</a>
                     <br />
-                    <div class="panel panel-default" id="Adjoint_Panel" name="Adjoint_Panel" style="@if (contenu.Adjoint_SID == null) { <text>display: none;</text> }">
+                    <div class="panel panel-default" id="Adjoint_Panel" name="Adjoint_Panel" style="@if (identite.Adjoint_SID == null) { <text>display: none;</text> }">
                         <div class="panel-heading clearfix">
                             <h4 class="panel-title pull-left" style="padding-top: 7.5px;">
                                 <i class="fa fa-user color1" aria-hidden="true"></i>
@@ -74,10 +74,10 @@
                             </div>
                         </div>
                         <div class="panel-body" style="text-align: center;">
-                            <b><span data-picker="agent.prenom">@contenu.Adjoint_Prenom</span> <span data-picker="agent.nom">@contenu.Adjoint_Nom</span></b>
-                            <br /><span data-picker="agent.chemin">@contenu.Adjoint_Structure</span>
-                            <br /><span data-picker="agent.mail">@contenu.Adjoint_Email</span>
-                            <br />Tel : <span data-picker="agent.telephone">@contenu.Adjoint_Tel</span>
+                            <b><span data-picker="agent.prenom">@identite.Adjoint_Prenom</span> <span data-picker="agent.nom">@identite.Adjoint_Nom</span></b>
+                            <br /><span data-picker="agent.chemin">@identite.Adjoint_Structure</span>
+                            <br /><span data-picker="agent.mail">@identite.Adjoint_Email</span>
+                            <br />Tel : <span data-picker="agent.telephone">@identite.Adjoint_Tel</span>
                         </div>
                     </div>
                 </div>
@@ -87,16 +87,16 @@
                 @Html.Label("Gestionnaire et ajoint", htmlAttributes: new { @class = "control-label col-md-2" })
 
                 <div class="col-md-4" data-picker-type="gestionnaire">
-                    @Html.HiddenFor(model => contenu.Gestionnaire_SID, new { data_picker = "agent.id" })
-                    @Html.HiddenFor(model => contenu.Gestionnaire_Login, new { data_picker = "agent.login" })
-                    @Html.HiddenFor(model => contenu.Gestionnaire_Nom, new { data_picker = "agent.nom" })
-                    @Html.HiddenFor(model => contenu.Gestionnaire_Prenom, new { data_picker = "agent.prenom" })
-                    @Html.HiddenFor(model => contenu.Gestionnaire_Email, new { data_picker = "agent.mail" })
-                    @Html.HiddenFor(model => contenu.Gestionnaire_Structure, new { data_picker = "agent.chemin" })
-                    @Html.HiddenFor(model => contenu.Gestionnaire_Tel, new { data_picker = "agent.telephone" })
+                    @Html.HiddenFor(model => identite.Gestionnaire_SID, new { data_picker = "agent.id" })
+                    @Html.HiddenFor(model => identite.Gestionnaire_Login, new { data_picker = "agent.login" })
+                    @Html.HiddenFor(model => identite.Gestionnaire_Nom, new { data_picker = "agent.nom" })
+                    @Html.HiddenFor(model => identite.Gestionnaire_Prenom, new { data_picker = "agent.prenom" })
+                    @Html.HiddenFor(model => identite.Gestionnaire_Email, new { data_picker = "agent.mail" })
+                    @Html.HiddenFor(model => identite.Gestionnaire_Structure, new { data_picker = "agent.chemin" })
+                    @Html.HiddenFor(model => identite.Gestionnaire_Tel, new { data_picker = "agent.telephone" })
                     <a class='modal-window' href="http://referentiel.bas-rhin.fr/picker/cd67/ad67/?type=gestionnaire" title="Selection du gestionnaire (nouvelle fenetre)">Sélectionner un gestionnaire</a>
                     <br />
-                    <div class="panel panel-default" id="Gestionnaire_Panel" name="Gestionnaire_Panel" style="@if (contenu.Gestionnaire_SID == null) { <text>display: none;</text> }">
+                    <div class="panel panel-default" id="Gestionnaire_Panel" name="Gestionnaire_Panel" style="@if (identite.Gestionnaire_SID == null) { <text>display: none;</text> }">
                         <div class="panel-heading clearfix">
                             <h4 class="panel-title pull-left" style="padding-top: 7.5px;">
                                 <i class="fa fa-user color1" aria-hidden="true"></i>
@@ -107,25 +107,25 @@
                             </div>
                         </div>
                         <div class="panel-body" style="text-align: center;">
-                            <b><span data-picker="agent.prenom">@contenu.Gestionnaire_Prenom</span> <span data-picker="agent.nom">@contenu.Gestionnaire_Nom</span></b>
-                            <br /><span data-picker="agent.chemin">@contenu.Gestionnaire_Structure</span>
-                            <br /><span data-picker="agent.mail">@contenu.Gestionnaire_Email</span>
-                            <br />Tel : <span data-picker="agent.telephone">@contenu.Gestionnaire_Tel</span>
+                            <b><span data-picker="agent.prenom">@identite.Gestionnaire_Prenom</span> <span data-picker="agent.nom">@identite.Gestionnaire_Nom</span></b>
+                            <br /><span data-picker="agent.chemin">@identite.Gestionnaire_Structure</span>
+                            <br /><span data-picker="agent.mail">@identite.Gestionnaire_Email</span>
+                            <br />Tel : <span data-picker="agent.telephone">@identite.Gestionnaire_Tel</span>
                         </div>
                     </div>
                 </div>
 
                 <div class="col-md-4" data-picker-type="gestionnaire2">
-                    @Html.HiddenFor(model => contenu.Gestionnaire2_SID, new { data_picker = "agent.id" })
-                    @Html.HiddenFor(model => contenu.Gestionnaire2_Login, new { data_picker = "agent.login" })
-                    @Html.HiddenFor(model => contenu.Gestionnaire2_Nom, new { data_picker = "agent.nom" })
-                    @Html.HiddenFor(model => contenu.Gestionnaire2_Prenom, new { data_picker = "agent.prenom" })
-                    @Html.HiddenFor(model => contenu.Gestionnaire2_Email, new { data_picker = "agent.mail" })
-                    @Html.HiddenFor(model => contenu.Gestionnaire2_Structure, new { data_picker = "agent.chemin" })
-                    @Html.HiddenFor(model => contenu.Gestionnaire2_Tel, new { data_picker = "agent.telephone" })
+                    @Html.HiddenFor(model => identite.Gestionnaire2_SID, new { data_picker = "agent.id" })
+                    @Html.HiddenFor(model => identite.Gestionnaire2_Login, new { data_picker = "agent.login" })
+                    @Html.HiddenFor(model => identite.Gestionnaire2_Nom, new { data_picker = "agent.nom" })
+                    @Html.HiddenFor(model => identite.Gestionnaire2_Prenom, new { data_picker = "agent.prenom" })
+                    @Html.HiddenFor(model => identite.Gestionnaire2_Email, new { data_picker = "agent.mail" })
+                    @Html.HiddenFor(model => identite.Gestionnaire2_Structure, new { data_picker = "agent.chemin" })
+                    @Html.HiddenFor(model => identite.Gestionnaire2_Tel, new { data_picker = "agent.telephone" })
                     <a class='modal-window' href="http://referentiel.bas-rhin.fr/picker/cd67/ad67/?type=gestionnaire2" title="Selection du gestionnaire n°2 (nouvelle fenetre)">Sélectionner un gestionnaire n°2</a>
                     <br />
-                    <div class="panel panel-default" id="Gestionnaire2_Panel" name="Gestionnaire2_Panel" style="@if (contenu.Gestionnaire2_SID == null) { <text>display: none;</text> }">
+                    <div class="panel panel-default" id="Gestionnaire2_Panel" name="Gestionnaire2_Panel" style="@if (identite.Gestionnaire2_SID == null) { <text>display: none;</text> }">
                         <div class="panel-heading clearfix">
                             <h4 class="panel-title pull-left" style="padding-top: 7.5px;">
                                 <i class="fa fa-user color1" aria-hidden="true"></i>
@@ -136,10 +136,10 @@
                             </div>
                         </div>
                         <div class="panel-body" style="text-align: center;">
-                            <b><span data-picker="agent.prenom">@contenu.Gestionnaire2_Prenom</span> <span data-picker="agent.nom">@contenu.Gestionnaire2_Nom</span></b>
-                            <br /><span data-picker="agent.chemin">@contenu.Gestionnaire2_Structure</span>
-                            <br /><span data-picker="agent.mail">@contenu.Gestionnaire2_Email</span>
-                            <br />Tel : <span data-picker="agent.telephone">@contenu.Gestionnaire2_Tel</span>
+                            <b><span data-picker="agent.prenom">@identite.Gestionnaire2_Prenom</span> <span data-picker="agent.nom">@identite.Gestionnaire2_Nom</span></b>
+                            <br /><span data-picker="agent.chemin">@identite.Gestionnaire2_Structure</span>
+                            <br /><span data-picker="agent.mail">@identite.Gestionnaire2_Email</span>
+                            <br />Tel : <span data-picker="agent.telephone">@identite.Gestionnaire2_Tel</span>
                         </div>
                     </div>
                 </div>
@@ -148,7 +148,7 @@
             <div class="form-group">
                 <div class="col-md-offset-2 col-md-10">
                     <input type="submit" value="@Model.Acces.EnumDisplayNameFor(MvcHtmlHelpers.DisplayValue.Prompt)" class="btn btn-default" /> |
-                    @Html.ActionLink("Annuler", "Details", new { Id = Model.College_Id })
+                    @Html.ActionLink("Annuler", "Details", new { Id = identite.College.Id })
                 </div>
             </div>
         </div>