private void BtnAddAdmin_Click(object sender, EventArgs e) { DialogUserAdd addOp = new DialogUserAdd(0); addOp.ShowDialog(); listViewRefresh(); }
private void BtnModAdmin_Click(object sender, EventArgs e) { int ID = 0; int nCount = listViewAdmin.Items.Count; for (int i = 0; i < nCount; i++) { if (listViewAdmin.Items[i].Checked) { ID = int.Parse(listViewAdmin.Items[i].SubItems[2].Text); } } if (ID != 0) { DialogUserAdd ModOp = new DialogUserAdd(ID); ModOp.ShowDialog(); listViewRefresh(); } else { MessageBox.Show("Choose the item you want to modify"); } }