예제 #1
0
        //-------------------------------------------------------------------
        public override CResultAErreur VerifieDonnees(CObjetDonnee objet)
        {
            CResultAErreur result = CResultAErreur.True;

            try
            {
                CTypePhase typPhase = (CTypePhase)objet;

                if (typPhase.Libelle == "")
                {
                    result.EmpileErreur(I.T("The phase type label cannot be empty|236"));
                }

                // Vérifie le profil des Utilisateurs (Responsables de Phase) possibles
                if (typPhase.ProfilResponsableTicket != null)
                {
                    if (typPhase.ProfilResponsableTicket.TypeSource != typeof(CPhaseTicket))
                    {
                        result.EmpileErreur(I.T("The element type on the profile of the person in charge is not a 'phase type'|237"));
                    }
                    if (typPhase.ProfilResponsableTicket.TypeElements != typeof(CDonneesActeurUtilisateur))
                    {
                        result.EmpileErreur(I.T("The source type  on the profile of the person in charge is  is not a 'User'|238"));
                    }
                }


                //Recupération des contacts
                List <CActeursSelonProfil> lstContacts = typPhase.ProfilsContacts;
                //Verification de la coohérence des positions des Contacts
                //lstContacts.Tri = CContactsSelonProfil.c_champOrdre;
                for (int i = 0; i < lstContacts.Count; i++)
                {
                    CActeursSelonProfil contact = (CActeursSelonProfil)lstContacts[i];
                    if (contact.Ordre != i)
                    {
                        result.EmpileErreur(I.T("The Contact @1 is at position @2 instead of position @3|203", contact.Profil.Libelle, contact.Ordre.ToString(), i.ToString()));
                    }

                    //Verification qu'il n'y a pas de redondance
                    foreach (CActeursSelonProfil contactcompar in lstContacts)
                    {
                        if (contact.Equals(contactcompar))
                        {
                            continue;
                        }

                        if (contact.Profil == contactcompar.Profil)
                        {
                            result.EmpileErreur(I.T("The Contact Profile @1 already exists|204", contact.Profil.Libelle));
                        }
                    }
                }
            }
            catch (Exception e)
            {
                result.EmpileErreur(new CErreurException(e));
            }
            return(result);
        }
예제 #2
0
        //-----------------------------------------------------------------------------
        private void m_lnkTypePhase_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            // Affiche le formulaire d'édition du Type de phase
            CTypePhase typePh = m_phaseEdite.TypePhase;

            try
            {
                CTimosApp.Navigateur.AffichePage((IFormNavigable)Activator.CreateInstance(
                                                     typeof(CFormEditionTypePhaseTicket),
                                                     new object[] { typePh }));
            }
            catch (Exception)
            {
            }
        }
예제 #3
0
        //-----------------------------------------------------------------------------
        // Démarre la phase suivante du processus de résolution
        private void StartPhaseSuivante(CTypePhase typePhase)
        {
            m_extLinkField.FillObjetFromDialog(m_ticketEdite);
            CPhaseTicket   phasePrecedente = m_ticketEdite.PhaseEnCours;
            CResultAErreur result          = m_ticketEdite.StartPhaseSuivante(typePhase);

            if (result)
            {
                if (phasePrecedente != null)
                {
                    m_ticketEdite.CreerHistorique(phasePrecedente, I.T("Ending Phase:|680") + " " + phasePrecedente.Libelle);
                }
                m_ticketEdite.CreerHistorique(null, I.T("Creating Phase:|681") + " " + typePhase.Libelle);

                m_extLinkField.FillDialogFromObjet(m_ticketEdite);
            }
        }