コード例 #1
0
ファイル: newClient.cs プロジェクト: TonyBASHIZI/Storm-
        private void pictureBox3_Click(object sender, EventArgs e)
        {
            try
            {
                int r = glos.countARB(comboR.Text);
                if (r == 10)
                {
                    MessageBox.Show("Le nombre d'enfant est deja atteint pour cette persconne!!");
                }
                else
                {
                    int y;

                    try
                    {
                        //byte[] images = null;
                        //FileStream stream = new FileStream(imglocation, FileMode.Open, FileAccess.Read);
                        //BinaryReader brs = new BinaryReader(stream);
                        //images = brs.ReadBytes((int)stream.Length);

                        ClassClient cl = new ClassClient();
                        cl.Mat     = txtmat.Text;
                        cl.Nom     = txtnom.Text;
                        cl.Postnom = txtpost.Text;
                        cl.Prenom  = txtprenom.Text;
                        cl.Refcat  = comboCat.Text;
                        cl.Reseaux = comboR.Text;
                        cl.Sexe    = comboSexe.Text;
                        cl.Tel     = txtphone.Text;
                        //cl.Photo = convertImagePicEdit(pictureEdit1);
                        cl.Qr          = convertImageTobyte(pictureBox2);
                        cl.Affiliation = txtAffilier.Text;
                        cl.Adresse     = txtadres.Text;
                        cl.Etatcivil   = comboEtat.Text;
                        // cl.Age = int.Parse(txtage.Text);
                        cl.Id = searchControl2.Text;

                        //y = glos.countARB(comboR.Text);
                        glos.InsertClient(cl);
                        glos.GetDatas(gridControl1, "id,matr_client,nom,postnom,prenom,tel,adresse,reseaux,affiliation,id_carte", "t_client");
                        //glos.chargerMat(comboR);
                        initialise();
                    }
                    catch (Exception ax)
                    {
                        MessageBox.Show(ax.Message);
                    }
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
コード例 #2
0
        public void inserEng()
        {
            try
            {
                int r = glos.countARB(comboR.Text);
                if (r == 10)
                {
                    MessageBox.Show("Le nombre d'enfant est deja atteint pour cette persconne!!");
                }
                else
                {
                    ClassClient cl = new ClassClient();
                    cl.Mat     = txtmat.Text;
                    cl.Nom     = txtnom.Text;
                    cl.Postnom = txtpost.Text;
                    cl.Prenom  = txtprenom.Text;
                    //cl.Refcat = comboCat.Text;
                    cl.Reseaux = comboR.Text;
                    cl.Sexe    = comboSexe.Text;
                    cl.Tel     = txtphone.Text;
                    //cl.Photo = convertImagePicEdit(pictureEdit1);
                    cl.Qr          = convertImageTobyte(pictureBox2);
                    cl.Affiliation = txtAffilier.Text;
                    cl.Adresse     = txtadres.Text;
                    cl.Etatcivil   = comboEtat.Text;
                    //cl.Age = int.Parse(txtage.Text);
                    cl.Idcarte = txtID.Text;

                    //y = glos.countARB(comboR.Text);
                    glos.InsertClientEnregi(cl);
                    glos.GetDatasEnregis(gridControl1, "*", "Enregistrement");
                    initialise();
                }
            }

            // MessageBox.Show("Le nombre des insertions  et des modifications avec succes ");
            //glos.speakeer("FIN DE PROCESSUS");


            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
コード例 #3
0
ファイル: newClient.cs プロジェクト: TonyBASHIZI/Storm-
        private void panel9_Paint(object sender, PaintEventArgs e)
        {
            try
            {
                byte[]       images = null;
                FileStream   stream = new FileStream(imglocation, FileMode.Open, FileAccess.Read);
                BinaryReader brs    = new BinaryReader(stream);
                images = brs.ReadBytes((int)stream.Length);



                ClassClient cl = new ClassClient();
                cl.Idcarte = txtIdcl.Text;
                cl.Mat     = txtmat.Text;
                cl.Nom     = txtnom.Text;
                cl.Postnom = txtpost.Text;
                cl.Prenom  = txtprenom.Text;
                cl.Refcat  = comboCat.Text;
                cl.Reseaux = comboR.Text;
                cl.Sexe    = comboSexe.Text;
                cl.Tel     = txtphone.Text;
                //cl.Photo = convertImagePicEdit(pictureEdit1);
                cl.Qr          = convertImageTobyte(pictureBox2);
                cl.Affiliation = txtAffilier.Text;
                cl.Adresse     = txtadres.Text;
                cl.Etatcivil   = comboEtat.Text;
                //cl.Age = int.Parse(txtage.Text);

                glos.UpdateClient(cl);
                glos.GetDatas(gridControl1, "id,matr_client,nom,postnom,prenom,tel,adresse,reseaux,affiliation,id_carte", "t_client");
                // glos.chargerMat(comboR);
                initialise();
            }
            catch (Exception ax)
            {
                MessageBox.Show(ax.Message);
            }
        }
コード例 #4
0
ファイル: newClient.cs プロジェクト: TonyBASHIZI/Storm-
 private void pictureBox5_Click(object sender, EventArgs e)
 {
     try
     {
         if (txtmat.Text == "")
         {
             MessageBox.Show("Vous devez selectionner un client dans la table client en bas!");
         }
         else
         {
             ClassClient c = new ClassClient();
             c.Mat = txtmat.Text;
             c.Id  = txtIdcarte.Text;
             glos.deleteClient(c);
             glos.GetDatas(gridControl1, "id,matr_client,nom,postnom,prenom,tel,adresse,reseaux,affiliation,id_carte", "t_client");
             initialise();
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }