Esempio n. 1
0
        private bool ShowCreateTask(ViewType typeView, TaskProxy task)
        {
            var taskWindow = new TaskWindow(service, task, typeView);

            taskWindow.Owner = this;
            return(taskWindow.ShowDialog().Value);
        }
Esempio n. 2
0
        private void btnTaskEdit_Click(object sender, RoutedEventArgs e)
        {
            var task = new TaskWindow(service, selectedTask, ViewType.Edit);

            if (task.ShowDialog() == true)
            {
                UpdateTaskList(currentProject.Id);
            }
        }
Esempio n. 3
0
        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);
            }
        }