//les Customers:
 #region "les Customers"
 private void button20_Click(object sender, EventArgs e)
 {
     A3.A3_add_cust frm1 = new A3.A3_add_cust();
     frm1.btnSave.Text = "Enregistrer";
     frm1.ShowDialog();
     DG_Cust.DataSource = cust.GET_ALL_CUSTOMERS();
 }
        private void button18_Click(object sender, EventArgs e)
        {
            try
            {
                A3.A3_add_cust frm = new A3.A3_add_cust();
                frm.btnSave.Text = "Modifier";

                frm.id = Convert.ToInt32(DG_Cust.CurrentRow.Cells[0].Value);

                frm.txtLastName.Text  = DG_Cust.CurrentRow.Cells[1].Value.ToString();
                frm.txtFirstName.Text = DG_Cust.CurrentRow.Cells[2].Value.ToString();
                frm.txtTel.Text       = DG_Cust.CurrentRow.Cells[3].Value.ToString();
                frm.txtEmail.Text     = DG_Cust.CurrentRow.Cells[4].Value.ToString();

                byte[]       Picture = (byte[])DG_Cust.CurrentRow.Cells[5].Value;
                MemoryStream ms      = new MemoryStream(Picture);
                frm.pbox.Image = Image.FromStream(ms);

                frm.ShowDialog();
            }
            catch
            {
                A3.A3_add_cust frm = new A3.A3_add_cust();
                frm.id = Convert.ToInt32(DG_Cust.CurrentRow.Cells[0].Value);

                frm.txtLastName.Text  = DG_Cust.CurrentRow.Cells[1].Value.ToString();
                frm.txtFirstName.Text = DG_Cust.CurrentRow.Cells[2].Value.ToString();
                frm.txtTel.Text       = DG_Cust.CurrentRow.Cells[3].Value.ToString();
                frm.txtEmail.Text     = DG_Cust.CurrentRow.Cells[4].Value.ToString();

                frm.btnSave.Text = "Modifier";
                frm.ShowDialog();
            }

            DG_Cust.DataSource = cust.GET_ALL_CUSTOMERS();
        }