private void btEdit_Click(object sender, EventArgs e) { if (dtgUser.SelectedRows.Count == 1) { string ID = dtgUser.SelectedRows[0].Cells["ID_User"].Value.ToString(); Form15 f = new Form15(ID, "edit"); f.d += new Form15.Mydel(Show); f.Show(); } }
private void btAdd_Click(object sender, EventArgs e) { int count = 0; foreach (User i in BLL_QLUser.Instance.GetListUser(null, null)) { count = Convert.ToInt32(i.ID_User); } Form15 s = new Form15((++count).ToString(), "add"); s.d += new Form15.Mydel(Show); s.Show(); }