Beispiel #1
0
        private void modifier()
        {
            if (dgvDevis.Rows.Count == 0)
            {
                MessageBox.Show("Liste vide!", "Erreur", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            else
            {
                int    v_code    = Convert.ToInt16(dgvDevis.CurrentRow.Cells[0].Value.ToString());
                int    v_cl_code = Convert.ToInt16(dgvDevis.CurrentRow.Cells[1].Value.ToString());
                string v_date    = Convert.ToString(dgvDevis.CurrentRow.Cells[2].Value.ToString());
                string v_statut  = Convert.ToString(dgvDevis.CurrentRow.Cells[3].Value.ToString());
                string v_adresse = Convert.ToString(dgvDevis.CurrentRow.Cells[4].Value.ToString());
                string v_ville   = Convert.ToString(dgvDevis.CurrentRow.Cells[5].Value.ToString());
                int    v_cp      = Convert.ToInt32(dgvDevis.CurrentRow.Cells[6].Value.ToString());
                string v_pays    = Convert.ToString(dgvDevis.CurrentRow.Cells[7].Value.ToString());
                int    v_fixe    = Convert.ToInt32(dgvDevis.CurrentRow.Cells[8].Value.ToString());
                int    v_fax     = Convert.ToInt32(dgvDevis.CurrentRow.Cells[9].Value.ToString());
                int    v_mobile  = Convert.ToInt32(dgvDevis.CurrentRow.Cells[10].Value.ToString());
                string v_email   = Convert.ToString(dgvDevis.CurrentRow.Cells[11].Value.ToString());
                string v_sitew   = Convert.ToString(dgvDevis.CurrentRow.Cells[12].Value.ToString());
                string v_note    = Convert.ToString(dgvDevis.CurrentRow.Cells[13].Value.ToString());

                Devis dv = new Devis(v_code, v_cl_code, v_date, v_statut, v_adresse, v_ville, v_cp, v_pays, v_fixe, v_mobile, v_fax, v_email, v_sitew, v_note);

                ModifierDevis md = new ModifierDevis(this, dv, ac);
                md.Show();
                ac.Enabled = false;
            }
        }
Beispiel #2
0
        private void modifier()
        {
            if (dgvDevis.Rows.Count == 0)
                MessageBox.Show("Liste vide!", "Erreur", MessageBoxButtons.OK, MessageBoxIcon.Error);
            else
            {
                int v_code = Convert.ToInt16(dgvDevis.CurrentRow.Cells[0].Value.ToString());
                int v_cl_code = Convert.ToInt16(dgvDevis.CurrentRow.Cells[1].Value.ToString());
                string v_date = Convert.ToString(dgvDevis.CurrentRow.Cells[2].Value.ToString());
                string v_statut = Convert.ToString(dgvDevis.CurrentRow.Cells[3].Value.ToString());
                string v_adresse = Convert.ToString(dgvDevis.CurrentRow.Cells[4].Value.ToString());
                string v_ville = Convert.ToString(dgvDevis.CurrentRow.Cells[5].Value.ToString());
                int v_cp = Convert.ToInt32(dgvDevis.CurrentRow.Cells[6].Value.ToString());
                string v_pays = Convert.ToString(dgvDevis.CurrentRow.Cells[7].Value.ToString());
                int v_fixe = Convert.ToInt32(dgvDevis.CurrentRow.Cells[8].Value.ToString());
                int v_fax = Convert.ToInt32(dgvDevis.CurrentRow.Cells[9].Value.ToString());
                int v_mobile = Convert.ToInt32(dgvDevis.CurrentRow.Cells[10].Value.ToString());
                string v_email = Convert.ToString(dgvDevis.CurrentRow.Cells[11].Value.ToString());
                string v_sitew = Convert.ToString(dgvDevis.CurrentRow.Cells[12].Value.ToString());
                string v_note = Convert.ToString(dgvDevis.CurrentRow.Cells[13].Value.ToString());

                Devis dv = new Devis(v_code, v_cl_code, v_date, v_statut, v_adresse, v_ville, v_cp, v_pays, v_fixe, v_mobile, v_fax, v_email, v_sitew, v_note);

                ModifierDevis md = new ModifierDevis(this, dv,ac);
                md.Show();
                ac.Enabled = false;
            }
        }