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

                CommandeAchat         cma = new CommandeAchat(v_code, v_fr_code, v_statut, v_date, v_date_liv, v_adresse, v_ville, v_cp, v_pays, v_fixe, v_mobile, v_fax, v_email, v_sitew, v_note);
                ModifierCommandeAchat mca = new ModifierCommandeAchat(this, cma, ac);
                mca.Show();
                ac.Enabled = false;
            }
        }
コード例 #2
0
        public void modifier()
        {
            if (dgvCommAchat.Rows.Count == 0)
                MessageBox.Show("Liste vide!", "Erreur", MessageBoxButtons.OK, MessageBoxIcon.Error);
            else
            {
                int v_code = Convert.ToInt16(dgvCommAchat.CurrentRow.Cells[0].Value.ToString());
                int v_fr_code = Convert.ToInt16(dgvCommAchat.CurrentRow.Cells[1].Value.ToString());
                string v_statut = Convert.ToString(dgvCommAchat.CurrentRow.Cells[2].Value.ToString());
                string v_date = Convert.ToString(dgvCommAchat.CurrentRow.Cells[3].Value.ToString());
                string v_date_liv = Convert.ToString(dgvCommAchat.CurrentRow.Cells[4].Value.ToString());
                string v_adresse = Convert.ToString(dgvCommAchat.CurrentRow.Cells[5].Value.ToString());
                string v_ville = Convert.ToString(dgvCommAchat.CurrentRow.Cells[6].Value.ToString());
                int v_cp = Convert.ToInt32(dgvCommAchat.CurrentRow.Cells[7].Value.ToString());
                string v_pays = Convert.ToString(dgvCommAchat.CurrentRow.Cells[8].Value.ToString());
                int v_fixe = Convert.ToInt32(dgvCommAchat.CurrentRow.Cells[9].Value.ToString());
                int v_mobile = Convert.ToInt32(dgvCommAchat.CurrentRow.Cells[10].Value.ToString());
                int v_fax = Convert.ToInt32(dgvCommAchat.CurrentRow.Cells[11].Value.ToString());
                string v_email = Convert.ToString(dgvCommAchat.CurrentRow.Cells[12].Value.ToString());
                string v_sitew = Convert.ToString(dgvCommAchat.CurrentRow.Cells[13].Value.ToString());
                string v_note = Convert.ToString(dgvCommAchat.CurrentRow.Cells[14].Value.ToString());

                CommandeAchat cma = new CommandeAchat(v_code, v_fr_code, v_statut, v_date, v_date_liv, v_adresse, v_ville, v_cp, v_pays, v_fixe, v_mobile, v_fax, v_email, v_sitew, v_note);
                ModifierCommandeAchat mca = new ModifierCommandeAchat(this, cma,ac);
                mca.Show();
                ac.Enabled = false;
            }
        }