Пример #1
0
        private void button2_Click(object sender, EventArgs e)
        {
            int    mabenhnhan     = Convert.ToInt32(dataGridView1.Rows[0].Cells[0].Value);
            string ten            = dataGridView1.Rows[0].Cells[1].Value.ToString();
            int    namsinh        = Convert.ToInt32(dataGridView1.Rows[0].Cells[2].Value);
            string diachilienlac  = dataGridView1.Rows[0].Cells[3].Value.ToString();
            int    sdt            = Convert.ToInt32(dataGridView1.Rows[0].Cells[4].Value);
            string trieuchungbenh = dataGridView1.Rows[0].Cells[5].Value.ToString();

            Console.Write("ten:" + ten);
            TiepTan.updateBenhNhan(conn, mabenhnhan, ten, namsinh, diachilienlac, sdt, trieuchungbenh);
        }