예제 #1
0
        //Crée une opération réalisée à partir d'une opération prévisionnelle
        public CResultAErreur CreateRealisee(CFractionIntervention fractionDest, COperation opParente)
        {
            COperation newOperation = new COperation(fractionDest.ContexteDonnee);

            newOperation.CreateNewInCurrentContexte();
            newOperation.TypeOperation        = TypeOperation;
            newOperation.FractionIntervention = fractionDest;
            newOperation.Commentaires         = Commentaires;
            newOperation.TypeEquipement       = TypeEquipement;
            newOperation.Equipement           = Equipement;
            newOperation.OperationParente     = opParente;

            if (TypeOperation.FormulaireOpPrevisionnelle != null)
            {
                foreach (CRelationOperation_ChampCustom relChamp in this.RelationsChampsCustom)
                {
                    CRelationOperation_ChampCustom relClone = (CRelationOperation_ChampCustom)relChamp.Clone(false);
                    relClone.ElementAChamps = newOperation;
                }
            }

            foreach (COperation opFille in OperationsFilles)
            {
                opFille.CreateRealisee(fractionDest, newOperation);
            }
            CResultAErreur result = CResultAErreur.True;

            result.Data = newOperation;
            return(result);
        }
예제 #2
0
        public void TiagSetFractionKeys(object[] lstCles)
        {
            CFractionIntervention frac = new CFractionIntervention(ContexteDonnee);

            if (frac.ReadIfExists(lstCles))
            {
                FractionIntervention = frac;
            }
        }
예제 #3
0
 public CResultAErreur CreatePerformedOperation(CFractionIntervention interventionPart, COperation parentOperation)
 {
     return(CreateRealisee(interventionPart, parentOperation));
 }