Beispiel #1
0
        private void button3_Click_1(object sender, EventArgs e)
        {
            if (listView1.SelectedItems.Count != 1)
            {
                MessageBox.Show("On ne peut modifier qu'un seul élément à la fois", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }

            else
            {
                FormEtudiant f = new FormEtudiant();
                f.FormBorderStyle = FormBorderStyle.FixedSingle;
                f.Show();
                f.button1.Text     = "Edit";
                f.lblBarre.Visible = true;

                for (i = 0; i < listView1.Items.Count; i++)
                {
                    if (listView1.Items[i].Selected)
                    {
                        f.txtNom.Text               = Class1.Tab1[i][0];
                        f.txtPrenom.Text            = Class1.Tab1[i][1];
                        f.txtIdentifiant.Text       = Class1.Tab1[i][2];
                        f.dateTimePicker1.Text      = Class1.Tab1[i][3];
                        f.txtEmail.Text             = Class1.Tab1[i][4];
                        f.txtContact.Text           = Class1.Tab1[i][5];
                        f.pictureBox4.ImageLocation = Class1.Tab1[i][6];
                        CodeQrBarcodeDraw barcode = BarcodeDrawFactory.CodeQr;
                        f.pictureBox1.Image = barcode.Draw(Class1.Tab1[i][2], 50);
                        f.lblPhoto.Visible  = false;

                        Class1.temp = i;
                    }
                }
            }
        }
Beispiel #2
0
        private void formEtudiantToolStripMenuItem_Click(object sender, EventArgs e)
        {
            panel1.Controls.Clear();
            FormEtudiant f = new FormEtudiant();

            f.panel1.Visible = true;
            panel1.Controls.Add(f.panel1);
        }