Пример #1
0
        public PartialViewResult Edit(int taskId)
        {
            TaskRepo taskRepo = new TaskRepo(context);
            Tasks    tasks    = taskRepo.Get(taskId);

            ViewBag.Users = context.Users.Select(r => new SelectListItem {
                Value = r.Id, Text = r.UserName, Selected = r.Id == tasks.AssignTo
            }).ToList();

            return(PartialView(tasks));
        }
Пример #2
0
        public JsonResult Edit(Tasks task)
        {
            TaskRepo taskRepo = new TaskRepo(context);
            Tasks    data     = taskRepo.Get(task.Id);
            Tasks    tasks    = new Tasks()
            {
                Id        = data.Id,
                ActvityId = data.ActvityId,
                Name      = data.Name,
                AssignTo  = data.AssignTo,
                Status    = data.Status,
                Priority  = data.Priority
            };



            return(Json(data, JsonRequestBehavior.AllowGet));
        }
Пример #3
0
        public string getTask(int id)
        {
            TaskRepo taskRepo = new TaskRepo(context);

            return(taskRepo.Get(id).Name);
        }