ソースを参照

#36 Suppression du champ Tiers des actions educatives

olivier.massot 7 年 前
コミット
9449974d6b

+ 0 - 1
CD67.FicheCollege.Entity/ActionEdu.cs

@@ -25,7 +25,6 @@ namespace CD67.FicheCollege.Entity
         public string Numero { get; set; }
         public string Nom { get; set; }
         public Nullable<decimal> Montant { get; set; }
-        public string TiersSid { get; set; }
         public string Description { get; set; }
         public string CommentairePublic { get; set; }
         public string CommentaireInterne { get; set; }

+ 0 - 2
CD67.FicheCollege.Entity/EntityModel.edmx

@@ -516,7 +516,6 @@
           <Property Name="Numero" Type="String" Nullable="false" MaxLength="Max" Unicode="true" FixedLength="false" />
           <Property Name="Nom" Type="String" Nullable="false" MaxLength="Max" Unicode="true" FixedLength="false" />
           <Property Name="Montant" Type="Decimal" Precision="18" Scale="0" Nullable="true" />
-          <Property Name="TiersSid" Type="String" MaxLength="7" Unicode="true" FixedLength="false" />
           <Property Name="Description" Type="String" Nullable="true" MaxLength="Max" Unicode="true" FixedLength="false" />
           <Property Name="CommentairePublic" Type="String" MaxLength="Max" FixedLength="false" Unicode="true" />
           <Property Name="CommentaireInterne" Type="String" MaxLength="Max" FixedLength="false" Unicode="true" />
@@ -765,7 +764,6 @@
                 <ScalarProperty Name="TokenId" ColumnName="TokenId" />
                 <ScalarProperty Name="CommentairePublic" ColumnName="CommentairePublic" />
                 <ScalarProperty Name="CommentaireInterne" ColumnName="CommentaireInterne" />
-                <ScalarProperty Name="TiersSid" ColumnName="TiersSid" />
                 <ScalarProperty Name="Montant" ColumnName="Montant" />
                 <ScalarProperty Name="Id" ColumnName="Id" />
           <ScalarProperty Name="Numero" ColumnName="Numero" />

+ 1 - 12
CD67.FicheCollege.Entity/Extend/ActionEdu.cs

@@ -20,17 +20,6 @@ namespace CD67.FicheCollege.Entity
         }
 
         public Tiers tiers;
-        // Charge les données du tiers depuis le web-service
-        public void hydrate()
-        {
-            WsTiers.WsTiers wsTiers = new WsTiers.WsTiers();
-            wsTiers.UseDefaultCredentials = true;
-
-            if (!String.IsNullOrEmpty(TiersSid))
-            {
-                tiers = wsTiers.GetById(TiersSid);
-            }
-        }
 
         public ActionEdu flat()
         {
@@ -40,13 +29,13 @@ namespace CD67.FicheCollege.Entity
                 Numero = Numero,
                 Nom = Nom,
                 Montant = Montant,
-                TiersSid = TiersSid,
                 Description = Description,
                 CommentaireInterne = CommentaireInterne,
                 CommentairePublic = CommentairePublic,
                 Neutralise = Neutralise,
                 Ordre = Ordre,
                 ActionEduThematiqueId = ActionEduThematiqueId,
+                StatutId = StatutId,
                 AnneeId = AnneeId,
                 TokenId = TokenId
             };

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

@@ -40,7 +40,6 @@ namespace CD67.FicheCollege.MVC.Controllers
             {
                 return HttpNotFound();
             }
-            actionEdu.hydrate();
             ActionEduViewModel model = new ActionEduViewModel(actionEdu, db);
 
             return View(model);
@@ -58,7 +57,6 @@ namespace CD67.FicheCollege.MVC.Controllers
             actionEdu.AnneeId = annee_id.Value;
             AnneeFactory fact = new AnneeFactory(db);
             actionEdu.Annee = fact.getById(annee_id);
-            actionEdu.hydrate();
 
             actionEdu.TokenId = Guid.NewGuid();
 
@@ -79,7 +77,6 @@ namespace CD67.FicheCollege.MVC.Controllers
                 fact.add(ref actionEdu);
                 return RedirectToAction("Index", new { annee_id = actionEdu.AnneeId });
             }
-            actionEdu.hydrate();
             ActionEduViewModel model = new ActionEduViewModel(actionEdu, db, ModeAcces.Creation);
             return View(model);
         }
@@ -97,7 +94,6 @@ namespace CD67.FicheCollege.MVC.Controllers
             {
                 return HttpNotFound();
             }
-            action.hydrate();
             ActionEduViewModel model = new ActionEduViewModel(action, db, ModeAcces.Modification);
             return View(model);
         }
@@ -120,7 +116,6 @@ namespace CD67.FicheCollege.MVC.Controllers
                 db.ActionsEdu.Attach(actionEdu);
                 db.Entry(actionEdu).Reference(i => i.Annee).Load();
             }
-            actionEdu.hydrate();
             ActionEduViewModel model = new ActionEduViewModel(actionEdu, db, ModeAcces.Modification);
             return View(model);
         }
@@ -138,7 +133,6 @@ namespace CD67.FicheCollege.MVC.Controllers
             {
                 return HttpNotFound();
             }
-            actionEdu.hydrate();
             ActionEduViewModel model = new ActionEduViewModel(actionEdu, db);
             return View(model);
         }

+ 0 - 10
CD67.FicheCollege.MVC/Views/ActionsEdu/Create.cshtml

@@ -55,16 +55,6 @@
             </div>
         </div>
 
-        <div class="form-group">
-            @Html.LabelFor(model => actionEdu.TiersSid, htmlAttributes: new { @class = "control-label col-md-2" })
-            @Html.HiddenFor(model => actionEdu.TiersSid, new { data_picker = "tiers.id" })
-            <div class="col-md-10">
-                <span data-picker="tiers.id">@Html.DisplayFor(model => actionEdu.tiers.Id)</span> - <span data-picker="tiers.nom">@Html.DisplayFor(model => actionEdu.tiers.Nom)</span>
-            </div>
-            <span class="glyphicon glyphicon-trash removeItem btn btn-danger btn-sm" aria-hidden="true" data-type="tiers"></span>
-            <a class="modal-window cboxElement" href="http://referentiel.bas-rhin.fr/picker/cd67/tier67/" title="Selection tiers (nouvelle fenetre)">Sélectionner un tiers</a>
-        </div>
-
         <div class="form-group">
             @Html.LabelFor(model => actionEdu.Description, htmlAttributes: new { @class = "control-label col-md-2" })
             <div class="col-md-10">