/* * 修改当前行用户信息, 传数据?需要各种修改啦 */ private void btn_UpUsr_Click(object sender, EventArgs e) { for (int i = 0; i < dataGridView1.Rows.Count; i++) { if (dataGridView1.Rows[i].Selected == true) { Updatezhanghao = dataGridView1.Rows[i].Cells[0].Value.ToString(); Updatemima = dataGridView1.Rows[i].Cells[1].Value.ToString(); Updatename = dataGridView1.Rows[i].Cells[2].Value.ToString(); Updatenum = dataGridView1.Rows[i].Cells[3].Value.ToString(); } } Console.WriteLine(Updatezhanghao + Updatemima + ";" + Updatename + Updatenum); f_upU = new UpdateUser(); // f_upU.Owner = this; f_upU.Show(); }
/* * 修改当前行用户信息 */ private void btn_UpUsr_Click(object sender, EventArgs e) { string num = null; string zhanghao = null; string mima = null; string name = null; for (int i = 0; i < dataGridView1.Rows.Count; i++) { if (dataGridView1.Rows[i].Selected == true) { zhanghao = dataGridView1.Rows[i].Cells[0].Value.ToString(); mima = dataGridView1.Rows[i].Cells[1].Value.ToString(); name = dataGridView1.Rows[i].Cells[2].Value.ToString(); num = dataGridView1.Rows[i].Cells[3].Value.ToString(); } } f_upU = new UpdateUser(); // f_upU.Owner = this; f_upU.Show(); }
private void updateuserbtn_Click(object sender, EventArgs e) { UpdateUser frm = new UpdateUser(); frm.Show(); }