private void add()
        {
            Formulaire personne = new Formulaire();

            personne.Check += personne_Check;
            personne.Show();
        }
Exemple #2
0
        private void RafraichirService()
        {
            ConditionRequete condReqSel = new ConditionRequete(Operateur.EGAL, "perId", BeneficiaireCourant.GetChamp("perId").ValeurSQL);

            condReqSel.LierCondition(new ConditionRequete(Operateur.EGAL, "serId", (cmbService.SelectedItem as ComboBoxItem).Value.ToString()), true);

            RequeteSelection reqSel = new RequeteSelection(NomTable.inscriptionservice);

            reqSel.Condition = condReqSel;

            Table  inscription   = Global.BaseDonneesCABS.EnvoyerRequeteSelection(reqSel);
            string nomFormulaire = Global.GetNomFormulaireInscription(cmbService.Text);

            panFormulaireInscription.Controls.Clear();

            Type typeFormulaire = Type.GetType(nomFormulaire);

            try
            {
                FormulaireCourant = (Formulaire)Activator.CreateInstance(typeFormulaire);
            }
            catch (Exception)
            {
                FormulaireCourant = null;
                return;
            }

            if (!inscription.EstVide)
            {
                ChangerAccesControle(ModeFormulaire.CONSULTATION);

                LigneTable infosInscription = inscription.Lignes[0];

                dtpDateDemande.Value = infosInscription.GetValeurChamp <DateTime>("insDateDemande");
                cbSuspendu.Checked   = infosInscription.GetValeurChamp <bool>("insSuspendu");
                txtCommentaires.Text = infosInscription.GetValeurChamp <string>("insCommentaires");
            }
            else
            {
                ChangerAccesControle(ModeFormulaire.AJOUT);
                Vider();
                FormulaireCourant.Vider();
            }

            FormulaireCourant.Name       = nomFormulaire;
            FormulaireCourant.Dock       = DockStyle.Fill;
            FormulaireCourant.TopLevel   = false;
            FormulaireCourant.AutoScroll = true;
            FormulaireCourant.EnvoyerMessages(BeneficiaireCourant.GetValeurChamp <int>("perId"));

            panFormulaireInscription.Controls.Add(FormulaireCourant);
            FormulaireCourant.Show();
        }
Exemple #3
0
        public Page(string nomPage, string nomFormulaire)
            : base(nomPage)
        {
            Type typeFormulaire = Type.GetType(nomFormulaire);

            try
            {
                Contenu = (Formulaire)Activator.CreateInstance(typeFormulaire);
            }
            catch (Exception)
            {
                Contenu = new Formulaire(true, true);
            }

            Contenu.Dock       = DockStyle.Fill;
            Contenu.TopLevel   = false;
            Contenu.Name       = nomFormulaire;
            Contenu.AutoScroll = true;

            Controls.Add(Contenu);
            Name = nomFormulaire;

            Contenu.Show();
        }