Пример #1
0
        private void  menu_Click(object sender, EventArgs e)
        {
            CMenuItemAvecAlarme menu = sender as CMenuItemAvecAlarme;

            if (menu != null && m_navigateur != null)
            {
                m_navigateur.AffichePage(new CFormConsultationAlarmEvent(menu.InfoAlarme, m_baseVue.ContexteDonnee));
            }
        }
Пример #2
0
        private void  menu_Click(object sender, EventArgs e)
        {
            CMenuItemAvecAlarme menu = sender as CMenuItemAvecAlarme;

            if (menu != null && m_navigateur != null)
            {
                CAlarme alarme = new CAlarme(m_baseVue.ContexteDonnee);
                if (alarme.ReadIfExists(new CFiltreData(CAlarme.c_champAlarmId + "=@1", menu.Alarme.Id)))
                {
                    m_navigateur.AffichePage(new CFormEditionAlarme(alarme));
                }
            }
        }
Пример #3
0
        //-----------------------------------------------------------------------------------------------------
        private void m_menuAfficheDetailEtape_Click(object sender, EventArgs e)
        {
            CEtapeWorkflow etape = EtapeSelectionnee;

            if (etape != null)
            {
                CFormNavigateur navigateur = CFormNavigateur.FindNavigateur(this);
                if (navigateur != null)
                {
                    CReferenceTypeForm refForm = CFormFinder.GetRefFormToEdit(typeof(CEtapeWorkflow));
                    if (refForm != null)
                    {
                        CFormEditionStandard frm = refForm.GetForm(etape) as CFormEditionStandard;
                        if (frm != null)
                        {
                            navigateur.AffichePage(frm);
                        }
                    }
                }
            }
        }
Пример #4
0
 //------------------------------------------------------------------
 private void m_panelWorkflow_DoubleClicSurElement(object sender, EventArgs e)
 {
     if (!LockEdition)
     {
         EditeCurrentEtape();
     }
     else
     {
         CWorkflowEtapeDessin etape = m_panelWorkflow.EtapeSelectionnee;
         if (etape == null)
         {
             return;
         }
         CBlocWorkflow         bloc         = etape.TypeEtape != null ? etape.TypeEtape.Bloc : null;
         CBlocWorkflowWorkflow blocWorkflow = bloc as CBlocWorkflowWorkflow;
         if (blocWorkflow != null && blocWorkflow.DbKeyTypeWorkflow != null)
         {
             CTypeWorkflow typeWorkflow = new CTypeWorkflow(CSc2iWin32DataClient.ContexteCourant);
             if (typeWorkflow.ReadIfExists(blocWorkflow.DbKeyTypeWorkflow))
             {
                 CFormNavigateur navigateur = CFormNavigateur.FindNavigateur(this);
                 if (navigateur != null)
                 {
                     CReferenceTypeForm refFrm = CFormFinder.GetRefFormToEdit(typeof(CTypeWorkflow));
                     if (refFrm != null)
                     {
                         CFormEditionStandard frm = refFrm.GetForm(typeWorkflow) as CFormEditionStandard;
                         if (frm != null)
                         {
                             navigateur.AffichePage(frm);
                         }
                     }
                 }
             }
         }
     }
 }
Пример #5
0
        private void m_btnMaskAdmin_Click(object sender, EventArgs e)
        {
            CFormListeAcces_AccescMasqueAdmin form = new CFormListeAcces_AccescMasqueAdmin(GetAccesAccescMaskAdmin());

            m_navigateur.AffichePage(form);
        }
Пример #6
0
        //-------------------------------------------------------------------
        private void m_menuEditWorkflow_Click(object sender, EventArgs e)
        {
            CWorkflowEtapeDessin etape = EtapeSelectionnee;

            if (etape == null)
            {
                return;
            }
            CBlocWorkflowWorkflow blocwkf = etape != null && etape.TypeEtape != null ?
                                            etape.TypeEtape.Bloc as CBlocWorkflowWorkflow : null;

            if (blocwkf != null)
            {
                CReferenceTypeForm refFrm = CFormFinder.GetRefFormToEdit(typeof(CTypeWorkflow));
                if (refFrm != null)
                {
                    CTypeWorkflow typeWorkflow = null;
                    if (blocwkf.DbKeyTypeWorkflow == null)
                    {
                        if (!LockEdition)
                        {
                            typeWorkflow = new CTypeWorkflow(CSc2iWin32DataClient.ContexteCourant);
                            typeWorkflow.CreateNew();
                            typeWorkflow.Libelle = blocwkf.TypeEtape.Libelle;
                        }
                    }
                    else
                    {
                        typeWorkflow = new CTypeWorkflow(CSc2iWin32DataClient.ContexteCourant);
                        if (!typeWorkflow.ReadIfExists(blocwkf.DbKeyTypeWorkflow))
                        {
                            typeWorkflow = null;
                        }
                    }
                    if (typeWorkflow != null)
                    {
                        CFormNavigateur navigateur = null;
                        if (LockEdition)
                        {
                            Form frm = FindForm();
                            if (frm != null)
                            {
                                Control ctrl = frm.Parent;
                                while (ctrl != null && ctrl.Parent != null && !(ctrl is CFormNavigateur))
                                {
                                    ctrl = ctrl.Parent;
                                }
                                if (typeof(CFormNavigateur).IsAssignableFrom(ctrl.GetType()))
                                {
                                    navigateur = (CFormNavigateur)ctrl;
                                }
                            }
                        }
                        CFormEditionStandard frmEdition = refFrm.GetForm(typeWorkflow) as CFormEditionStandard;
                        if (navigateur == null && frmEdition != null)
                        {
                            CFormNavigateurPopup.Show(frmEdition);
                            if (!LockEdition && typeWorkflow.IsValide() && typeWorkflow.Id >= 0)
                            {
                                blocwkf.DbKeyTypeWorkflow = typeWorkflow.DbKey;
                                etape.TypeEtape.Bloc      = blocwkf;
                            }
                        }
                        else
                        {
                            navigateur.AffichePage(frmEdition);
                        }
                    }
                }
            }
        }