示例#1
0
        public JsonResult PopulateTask(string projectType, string prjectId, string taskId)
        {
            ToDoTask toDoTask = new ToDoTask();

            if (Convert.ToInt32(projectType) == (int)ProjectType.Agile)
            {
                toDoTask.SetToDoTaskStrategy(new AgileTask());
            }
            else if (Convert.ToInt32(projectType) == (int)ProjectType.Normal)
            {
                toDoTask.SetToDoTaskStrategy(new NormalTask());
            }

            TodoTaskModel todoTaskModel = toDoTask.GetById(new Guid(taskId));

            return(Json(todoTaskModel, JsonRequestBehavior.AllowGet));
        }