Пример #1
0
 public ActionResult Edit(Task Task, string UsersList, string Version)
 {
     Task.AssigneeId = _userServise.GetUser(UsersList).UserId;
     InoSoft.TeamStudio.Core.Entities.Version Versions = _versionServise.GetVersion(Version);
     if (Versions != null)
     {
         Task.VersionId = Versions.VersionId;
     }
     else
     {
         //create version.....
     }
     if (ModelState.IsValid)
     {
         _tasksServise.EditTask(Task);
         return(RedirectToAction("Index"));
     }
     return(View(Task));
 }
Пример #2
0
        public ActionResult Edit(int TaskId)
        {
            Task    Task    = _tasksServise.GetTask(TaskId);
            Project Project = _projectServise.GetProjectAboutId(Task.ProjectId);
            Team    Team    = new Team();

            InoSoft.TeamStudio.Core.Entities.Version Version = _versionServise.GetVersion(Convert.ToInt32(Task.VersionId));
            List <User> UsersTeam = new List <Core.Entities.User>();

            UsersTeam = _userServise.GetUsersAboutTeam(Project.TeamId);
            List <string> UsersName = new List <string>();

            foreach (var item in UsersTeam)
            {
                UsersName.Add(item.UserName);
            }
            ViewData["UsersList"] = new SelectList(UsersName);
            ViewData["Project"]   = Project.Name;
            ViewData["Version"]   = Version.VersionNum;
            return(View(Task));
        }