Beispiel #1
0
 //------------------------------------------------------
 public double CalculeTonCoutPuisqueTuNeCalculePasAPartirDesSourcesDeCout(bool bCoutReel)
 {
     if (bCoutReel)
     {
         if (FractionIntervention != null)
         {
             if (Duree != null)
             {
                 if (FractionIntervention.Intervention != null)
                 {
                     return(Duree.Value * FractionIntervention.Intervention.GetCoutHeureMainOeuvre());
                 }
             }
         }
         return(0);
     }
     else
     {
         if (Intervention != null)
         {
             if (Duree != null)
             {
                 return(Duree.Value * Intervention.GetCoutHeureMainOeuvre());
             }
             if (TypeOperation != null)
             {
                 return(TypeOperation.DureeStandardHeures * Intervention.GetCoutHeureMainOeuvre());
             }
         }
     }
     return(0);
 }
 //------------------------------------------------
 public double CalculeTonCoutPuisqueTuNeCalculePasAPartirDesSourcesDeCout(bool bCoutReel)
 {
     if (bCoutReel)
     {
         if (DureeSaisie != null)
         {
             if (Intervention != null)
             {
                 return(Intervention.GetCoutHeureMainOeuvre() * DureeSaisie.Value);
             }
         }
         CListeObjetsDonnees operations = Operations;
         operations.Filtre = new CFiltreData(COperation.c_champIdOpParente + " is null");
         double fCout = 0;
         foreach (COperation operation in operations)
         {
             fCout += operation.CoutReel;
         }
         return(fCout);
     }
     else
     {
         return(0);
     }
 }