private void btnEdit_Click_1(object sender, EventArgs e) { EditTask et = new EditTask(task); et.DataUpdated += new EventHandler(EditTask_DataUpdated); et.Show(); }
private void EditTaskCommandExecute() { AddTaskVM dataContext = new AddTaskVM(changeCanAddTaskToTrue, logedUser, SelectedJob); EditTask dialog = new EditTask(); dialog.DataContext = dataContext; dialog.Show(); }
private void Edit_Task_Click(object sender, RoutedEventArgs e) { String EnvName = Environment.UserName; DataRowView row = AddTaskData.SelectedItem as DataRowView; if (row != null) { string EditTaskName = row.Row["TaskName"].ToString(); string EditTaskDate = row.Row["TaskDate"].ToString(); EditTask EditTaskWindow = new EditTask(EditTaskName, EditTaskDate); EditTaskWindow.Show(); } else { MessageBox.Show("No row has been selected"); } }