private void addButton_Click(object sender, EventArgs e) { var userDialog = new UserDialog(DialogState.Add); userDialog.ShowDialog(); updateTable(); }
private void editButton_Click(object sender, EventArgs e) { var selectedId = GetSelectedIdFromTable(grid); var userDialog = new UserDialog(DialogState.Edit, selectedId); userDialog.ShowDialog(); updateTable(); }