private bool ShowCreateTask(ViewType typeView, TaskProxy task) { var taskWindow = new TaskWindow(service, task, typeView); taskWindow.Owner = this; return(taskWindow.ShowDialog().Value); }
private void btnTaskEdit_Click(object sender, RoutedEventArgs e) { var task = new TaskWindow(service, selectedTask, ViewType.Edit); if (task.ShowDialog() == true) { UpdateTaskList(currentProject.Id); } }
private void btnTaskAdd_Click(object sender, RoutedEventArgs e) { var t = service.CreateTask(User.Instance.Account.Id, new TaskProxy(0, "", "", currentProject, service.GetTaskStatusListByProjectId(currentProject.Id).FirstOrDefault())); selectedTask = t; var task = new TaskWindow(service, selectedTask, ViewType.Edit); if (task.ShowDialog() == true) { UpdateTaskList(currentProject.Id); } else { service.DeleteTaskById(User.Instance.Account.Id, t.Id); } }