Dominique.freyd 16 năm trước cách đây
mục cha
commit
642fe11a96

+ 21 - 21
CG67.FicheCollege.root/CG67.FicheCollege/Core/CG67.FicheCollege.Domaine/Etablissement.cs

@@ -656,29 +656,29 @@ namespace CG67.FicheCollege.Domaine
         /// <summary>
         /// retourne la phrase concernant la programmation des travaux de l'établissement
         /// </summary>
-        public string PhraseProgTravaux
-        {
-            get
-            {
-                string retour = string.Empty;
+        //public string PhraseProgTravaux
+        //{
+        //    get
+        //    {
+        //        string retour = string.Empty;
 
-                string type = string.Empty;
-                //la requete trie déja par ordre de type d'opération.
-                foreach (ProgTravaux prog in LstTravaux)
-                {
-                    if (prog.TypeOperation == type)
-                    {
-                        retour += "\n\n" +  prog.TypeOperation + " :";
-                    }
-                    retour += "\n" + prog.Annee + " : " + prog.Libelle;
-                    type = prog.TypeOperation;
-                }
+        //        string type = string.Empty;
+        //        //la requete trie déja par ordre de type d'opération.
+        //        foreach (ProgTravaux prog in LstTravaux)
+        //        {
+        //            if (prog.TypeOperation == type)
+        //            {
+        //                retour += "\n\n" +  prog.TypeOperation + " :";
+        //            }
+        //            retour += "\n" + prog.Annee + " : " + prog.Libelle;
+        //            type = prog.TypeOperation;
+        //        }
 
-                if (retour == string.Empty)
-                    retour = "néant";
-                return retour;
-            }
-        }
+        //        if (retour == string.Empty)
+        //            retour = "néant";
+        //        return retour;
+        //    }
+        //}
         /// <summary>
         /// retourne la phrase concernant le secteur de recrutement de l'établissement
         /// </summary>

+ 4 - 1
CG67.FicheCollege.root/CG67.FicheCollege/Core/CG67.FicheCollege.Entrepot/EntrepotATC.cs

@@ -17,6 +17,7 @@ namespace CG67.FicheCollege.Entrepot
             {
                 try
                 {
+                    int nbJourFormation;
                     connexion.Open();
                     using (SqlCommand command = connexion.CreateCommand())
                     {
@@ -27,7 +28,9 @@ namespace CG67.FicheCollege.Entrepot
                         {
                             while (dr.Read())
                             {
-                                resultat.Add(new ATC(Convert.ToDouble(dr["ValeurETP"].ToString()), dr["Nom"].ToString(), dr["Prenom"].ToString(), dr["Fonction"].ToString(), dr["TypeContact"].ToString(), dr["Catégorie"].ToString(), dr["Grade"].ToString(), Convert.ToInt32(dr["NbJoursFormation"].ToString())));
+                                nbJourFormation = dr["NbJoursFormation"] == DBNull.Value ? 0 : Convert.ToInt32(dr["NbJoursFormation"].ToString());
+                                
+                                resultat.Add(new ATC(Convert.ToDouble(dr["ValeurETP"].ToString()), dr["Nom"].ToString(), dr["Prenom"].ToString(), dr["Fonction"].ToString(), dr["TypeContact"].ToString(), dr["Catégorie"].ToString(), dr["Grade"].ToString(), nbJourFormation ));
                             }
                         }
                     }

+ 41 - 2
CG67.FicheCollege.root/CG67.FicheCollege/Web/CG67.FicheCollege.Web/css/fichecollege.css

@@ -2,6 +2,8 @@ body
 {
 }
 
+
+
 #conteneur
 {
 	margin-left:10px;
@@ -35,7 +37,7 @@ body
 .mtn1
 {
 	width:80px;
-	text-align: right;
+	text-align: right;	 	
 }
 .bordure
 {
@@ -43,4 +45,41 @@ body
 	border-top: gray thin solid;
 	border-left: gray thin solid;
 	border-bottom: gray thin solid;
-}
+}
+
+#travaux
+{
+	table-layout: fixed;
+	border-collapse: collapse;
+}
+.travannee
+{
+ width: 50px; 
+}
+.travlibelle
+{
+ width:350px; 	
+}
+
+.travmontant
+{
+	 width:80px;
+	 text-align: right;
+}
+
+h2
+{
+	background-color: #ff9900;
+}
+table
+{
+	table-layout: fixed;
+	border-collapse: collapse;
+}
+td
+{
+	border-right: #ffcc33 thin solid;
+	border-top: #ffcc33 thin solid;
+	border-left: #ffcc33 thin solid;
+	border-bottom: #ffcc33 thin solid;
+}

+ 25 - 1
CG67.FicheCollege.root/CG67.FicheCollege/Web/CG67.FicheCollege.Web/xslt/FicheCollege.xslt

@@ -181,7 +181,31 @@
       <tr>
         <td>Programmation des travaux Maintenance de 2ième niveau (année n-1, n, n+1)</td>
         <td>
-          <xsl:value-of select="Etablissement/PhraseProgTravaux"/>
+          <table id="travaux">
+            <colgroup>
+              <col class="travannee"></col>
+              <col class="travlibelle"></col>
+              <col class="travmontant"></col>
+            </colgroup>
+            <tr>
+              <th class="bordure">Année</th>
+              <th class="bordure">Libelle</th>
+              <th class="bordure">Montant</th>
+            </tr>
+            <xsl:for-each select="Etablissement/LstTravaux/ProgTravaux">              
+              <tr>
+                <td class="bordure">
+                  <xsl:value-of select="Annee"/>
+                </td>
+                <td class="bordure">
+                  <xsl:value-of select ="Libelle"/>
+                </td>
+                <td class="bordure">
+                  <xsl:value-of select="Montant"/><xsl:text> €</xsl:text> 
+                </td>
+              </tr>
+            </xsl:for-each>
+          </table>
         </td>
       </tr>
       <tr>