コード例 #1
0
ファイル: CLotValorisation.cs プロジェクト: ykebaili/Timos
        //--------------------------------------------------------------------
        public void AjouterEquipementsDepuisCommandeInCurrentContext(CCommande commande)
        {
            if (commande == null)
            {
                return;
            }
            HashSet <IElementCommandable> setCommandablesPresents = new HashSet <IElementCommandable>();

            foreach (CValorisationElement val in Valorisations)
            {
                IElementCommandable eltCom = val.ElementValorisé as IElementCommandable;
                if (eltCom != null)
                {
                    setCommandablesPresents.Add(eltCom);
                }
            }
            foreach (CLigneCommande ligne in commande.Lignes)
            {
                if (ligne.ElementCommandé != null &&
                    !setCommandablesPresents.Contains(ligne.ElementCommandé))
                {
                    CValorisationElement valo = new CValorisationElement(ContexteDonnee);
                    valo.CreateNewInCurrentContexte();
                    valo.ElementValorisé = ligne.ElementCommandé;
                    valo.LotValorisation = this;
                    setCommandablesPresents.Add(ligne.ElementCommandé);
                }
            }
        }
コード例 #2
0
ファイル: CLotValorisation.cs プロジェクト: ykebaili/Timos
        //-------------------------------------------------------------------
        public void TiagSetOrderIds(object[] cles)
        {
            CCommande cde = new CCommande(ContexteDonnee);

            if (cde.ReadIfExists(cles))
            {
                Commande = cde;
            }
        }
コード例 #3
0
        //----------------------------------------------------------------------------------
        /// <summary>
        /// Utilisé par TIAG pour affecter le type de site par ses clés
        /// </summary>
        /// <param name="lstCles"></param>
        public void TiagSetOrderKeys(object[] lstCles)
        {
            CCommande commande = new CCommande(ContexteDonnee);

            if (commande.ReadIfExists(lstCles))
            {
                Commande = commande;
            }
        }