Exemple #1
0
        public CResultAErreur SetParametres(System.Collections.Generic.Dictionary <string, object> dicParametres)
        {
            CResultAErreur result = CResultAErreur.True;

            object obj = null;

            if (dicParametres.TryGetValue(c_nomParametreId, out obj))
            {
                if (obj is int)
                {
                    int     nId    = (int)obj;
                    CTicket ticket = new CTicket(CSc2iWin32DataClient.ContexteCourant);

                    if (nId == -1)
                    {
                        ticket.CreateNew();
                    }
                    else if (!ticket.ReadIfExists(nId))
                    {
                        result.EmpileErreur(I.T("There is no Crystal Report Model corresponding to the Id: @1|10006", nId.ToString()));
                        return(result);
                    }

                    // Affecte le ticket édité
                    this.ObjetEdite = ticket;
                }
                else
                {
                    result.EmpileErreur(I.T("The Ticket ID parameter must be an integer value|10007"));
                }
            }

            return(result);
        }
Exemple #2
0
        public void Init()
        {
            m_contexte      = sc2i.win32.data.CSc2iWin32DataClient.ContexteCourant;
            m_nouveauTicket = new CTicket(m_contexte);
            m_nouveauTicket.CreateNew();

            m_panelEditionTicket.InitPanel(m_nouveauTicket);
        }
Exemple #3
0
        //--------------------------------------------------------------------------
        private void m_lnkNouveauTicket_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            // Créer un nouveau ticket
            CTicket ticket = new CTicket(m_listeObjets.ContexteDonnee);

            ticket.CreateNew();
            // Edition dans un nouvel onglet

            CReferenceTypeForm rTpForm = CFormFinder.GetRefFormToEdit(typeof(CTicket));

            if (rTpForm != null)
            {
                IFormNavigable form = rTpForm.GetForm(ticket) as IFormNavigable;
                if (form != null)
                {
                    CTimosApp.Navigateur.AffichePageDansNouvelOnglet(form);
                }
            }

            //CFormNavigateurPopup.Show(new CFormEditionTicket(ticket),FormWindowState.Maximized);

            InitPanel();
        }