예제 #1
0
        public CResultAErreur InitPanel(CPhaseTicket phase)
        {
            m_bIsInitialising = true;

            if (phase == null)
            {
                return(CResultAErreur.False);
            }

            if (phase.TypePhase == null)
            {
                return(CResultAErreur.False);
            }

            if (phase.Ticket == null)
            {
                return(CResultAErreur.False);
            }


            CResultAErreur result = CResultAErreur.True;

            m_phaseEdite = phase;

            result = m_extLinkField.FillDialogFromObjet(m_phaseEdite);

            if (result)
            {
                result = InitListeInterventions();
            }
            if (result)
            {
                result = InitPanelFormulaire();
            }

            InitInfosGel();

            m_ctrlSaisiesOperations.Init(m_phaseEdite);
            m_controlSaisieInfosCloture.Init(m_phaseEdite.Ticket);

            if (!m_phaseEdite.CanEdit())
            {
                m_lblMessageEntete.Text = I.T("You do not have permission to edit this Phase|532");
            }
            else
            {
                m_lblMessageEntete.Text = "";
            }

            UpdateVisuelBoutons();

            m_bIsInitialising = false;

            return(result);
        }
예제 #2
0
 //-------------------------------------------------------------------------
 private void InitPanelPhases(CPhaseTicket phase)
 {
     if (phase == null)
     {
         m_panelEditionPhase.Visible = false;
     }
     else
     {
         m_panelEditionPhase.Visible = true;
         if (phase != m_ticketEdite.PhaseEnCours || !phase.CanEdit())
         {
             m_panelEditionPhase.LockEdition = true;
         }
         else
         {
             m_panelEditionPhase.LockEdition = !m_gestionnaireModeEdition.ModeEdition;
         }
         m_panelEditionPhase.InitPanel(phase);
     }
 }