/// //////////////////////////////////////////
        private void UpdatePointsEntree()
        {
            m_panelPointEntree.Visible = false;
            m_cmbPointEntree.TextNull  = I.T("Default|20012");
            m_cmbPointEntree.Fill(new CActionPointEntree[0], "Libelle", true);
            if (!(m_cmbProcess.SelectedValue is CProcessInDb))
            {
                m_cmbPointEntree.SelectedValue = null;
                return;
            }
            CProcessInDb processInDB = (CProcessInDb)m_cmbProcess.SelectedValue;
            CProcess     process     = processInDB.Process;

            if (process == null)
            {
                return;
            }
            CActionPointEntree[] entrees = process.PointsEntreeAlternatifs;

            m_cmbPointEntree.Fill(entrees, "Libelle", true);
            if (entrees.Length == 0)
            {
                m_panelPointEntree.Visible     = false;
                m_cmbPointEntree.SelectedValue = null;
            }
            else
            {
                m_panelPointEntree.Visible     = true;
                m_cmbPointEntree.SelectedValue = process.GetActionFromId(ActionLancerProcess.IdPointEntree);
            }
        }
Exemple #2
0
        //-------------------------------------------------------------------------
        protected override CResultAErreur MyInitChamps()
        {
            DisplayOrHidePanelChamps();
            CResultAErreur result = base.MyInitChamps();

            AffecterTitre(I.T("Consumable Type|10384") + " " + TypeConsommable.Libelle);

            m_cmbSelectFamilleHierarchique.Init(
                typeof(CFamilleEquipement),
                "FamillesFilles",
                CFamilleEquipement.c_champIdParent,
                "Libelle",
                null,
                new CFiltreData(CFamilleEquipement.c_champNoConsommable + "=@1", false));
            m_cmbSelectUnite.Fill(CGestionnaireUnites.Unites, "LibelleLong", true);
            m_cmbSelectUnite.TextNull = I.T("(None|10377");

            if (TypeConsommable != null)
            {
                m_cmbSelectFamilleHierarchique.ElementSelectionne = TypeConsommable.Famille;
                m_cmbSelectUnite.SelectedValue = TypeConsommable.Unite;
            }
            m_panelSetupLot.Visible = m_chkGestionParLot.Checked;

            return(result);
        }
        //-------------------------------------------------------------------------
        protected override CResultAErreur MyInitChamps()
        {
            CResultAErreur result = base.MyInitChamps();

            AffecterTitre(I.T("Closing state|671") + ": " + EtatCloture.Libelle);

            // Init Code état
            CListeObjetsDonnees lst = new CListeObjetsDonnees(EtatCloture.ContexteDonnee, typeof(CEtatCloture));

            lst.Tri = CEtatCloture.c_champCode;
            int count = lst.Count;

            if (count > 0 && EtatCloture.IsNew())
            {
                int lastCode = ((CEtatCloture)lst[count - 1]).Code;
                m_txtNumCode.IntValue = ++lastCode;
            }
            else
            {
                m_txtNumCode.IntValue = EtatCloture.Code;
            }

            // Combo Etat de Base
            m_cmbxSelectEtatDeBase.Fill(
                CUtilSurEnum.GetEnumsALibelle(typeof(CEtatClotureBase)),
                "Libelle",
                false);
            m_cmbxSelectEtatDeBase.SelectedValue = (CEtatClotureBase)EtatCloture.EtatBase;

            return(result);
        }
        //-------------------------------------------------------------------------
        protected override CResultAErreur MyInitChamps()
        {
            CResultAErreur result = base.MyInitChamps();

            AffecterTitre(I.T("Equipment status|230") + " " + StatutEquipement.Libelle);

            m_cmbStatutDeBase.Fill(
                CUtilSurEnum.GetEnumsALibelle(typeof(CStatutBaseEquipement)),
                "Libelle",
                false);

            m_cmbStatutDeBase.SelectedValue = (CStatutBaseEquipement)StatutEquipement.StatutDeBase;



            return(result);
        }