Example #1
0
        public ActionResult CreateTask(Problem _Task, string Status)
        {
            _Task.Status = Status;
            _Task.StartDate = DateTime.Now;

            repository.CreateTask(_Task);

            return RedirectToAction("Index");
        }
Example #2
0
        public ActionResult CreateChildTask(Problem _Task, string Status, string ParentTaskId)
        {
            Problem ParentTask = repository.FindTask(Convert.ToInt32(ParentTaskId));

            _Task.Status = Status;
            _Task.StartDate = DateTime.Now;
            _Task.ParentTasks.Add(ParentTask);

            repository.CreateTask(_Task);

            return RedirectToAction("Index");
        }
Example #3
0
        public void EditTask(Problem _Task)
        {
            Problem Task = FindTask(_Task.Id);

            Task.Title = _Task.Title;
            Task.Description = _Task.Description;
            Task.Laboriousness = _Task.Laboriousness;
            Task.ActualExecutiontime = _Task.ActualExecutiontime;
            Task.EndDate = _Task.EndDate;
            Task.Status = _Task.Status;
            Task.Performers = _Task.Performers;

            dbcontex.Entry(Task).State = EntityState.Modified;
            dbcontex.SaveChanges();
        }
Example #4
0
 public void CreateTask(Problem _Task)
 {
     dbcontex.Problems.Add(_Task);
     dbcontex.SaveChanges();
 }
Example #5
0
 private void AddCht(List<int> Cht, Problem task)
 {
     //Cht.Add(task.Id);
     if (task.ChildTasks.Count!=0)
         foreach (Problem Childtask in task.ChildTasks)
         {
             Cht.Add(Childtask.Id);
             Problem v = FindTask(Childtask.Id);
             AddCht(Cht, v);
         }
 }
Example #6
0
 public ActionResult EditTask(Problem _Task)
 {
     repository.EditTask(_Task);
     return RedirectToAction("Index");
 }