private void EditTaskButtonClick(object sender, EventArgs e) { var projectTask = (ProjectTask) taskList.SelectedItem; if(projectTask == null) { throw new Exception("No task selected to edit"); } var editTaskForm = new EditTaskForm(projectTask, this, Session); editTaskForm.UpdateAndShow(); Hide(); }
private void EditTaskButtonClick(object sender, EventArgs e) { var projectTask = (ProjectTask)taskList.SelectedItem; if (projectTask == null) { throw new Exception("No task selected to edit"); } var editTaskForm = new EditTaskForm(projectTask, this, Session); editTaskForm.UpdateAndShow(); Hide(); }