private void cmdAdd_Click(object sender, EventArgs e) { UserDialogue d = new UserDialogue(Operation.Add, null, _userService); d.ShowDialog(); loadUser(); }
private void cmdEdit_Click(object sender, EventArgs e) { if (listView1.SelectedItems.Count == 0) { MessageBox.Show("Please select user from the list", "", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); return; } UserDialogue d = new UserDialogue(Operation.Edit, _selectedUser, _userService); d.ShowDialog(); loadUser(); }