//////////////////////////////////////////////////////////////////////
        public override CResultAErreur VerifieDonnees(CObjetDonnee objet)
        {
            CResultAErreur result = CResultAErreur.True;

            try
            {
                CRelationTypeEntreeAgenda_TypeElementAAgenda relation = (CRelationTypeEntreeAgenda_TypeElementAAgenda)objet;
                if (relation.Libelle == "")
                {
                    result.EmpileErreur(I.T("The label cannot be empty|327"));
                }
                CFiltreData filtre = new CFiltreData(
                    CRelationTypeEntreeAgenda_TypeElementAAgenda.c_champLibelle + "=@1 and " +
                    CRelationTypeEntreeAgenda_TypeElementAAgenda.c_champId + "<>@2 and " +
                    CTypeEntreeAgenda.c_champId + "=@3",
                    relation.Libelle,
                    relation.Id,
                    relation.TypeEntree.Id);
                if (CountRecords(CRelationTypeEntreeAgenda_TypeElementAAgenda.c_nomTable,
                                 filtre) > 0)
                {
                    result.EmpileErreur(I.T("The label '@1' already exists|326", relation.Libelle));
                }


                return(result);
            }
            catch (Exception e)
            {
                result.EmpileErreur(new CErreurException(e));
            }
            return(result);
        }
 /// ///////////////////////////////////////////////
 public void Init(CRelationTypeEntreeAgenda_TypeElementAAgenda typeRelation, CEntreeAgenda entree)
 {
     m_typeRelation    = typeRelation;
     m_entreeAgenda    = entree;
     m_lblLibelle.Text = typeRelation.Libelle;
     RefreshText();
 }
Esempio n. 3
0
        public CFormSelectLiensAgendaMultiples(CRelationTypeEntreeAgenda_TypeElementAAgenda typeLien)
        {
            //
            // Requis pour la prise en charge du Concepteur Windows Forms
            //
            InitializeComponent();

            m_typeLien = typeLien;
        }
Esempio n. 4
0
        public static bool GetListeElements(CEntreeAgenda entree,
                                            CRelationTypeEntreeAgenda_TypeElementAAgenda typeLien)
        {
            CFormSelectLiensAgendaMultiples form = new CFormSelectLiensAgendaMultiples(typeLien);

            form.m_entreeAgenda = entree;
            bool bResult = form.ShowDialog() == DialogResult.OK;

            form.Dispose();
            return(bResult);
        }