コード例 #1
0
        //
        // GET: /Project/

        public ActionResult Index(int id)
        {
            Project p = CurrentUserModel.GetProject(id);

            if (p == null)
            {
                throw new Exception("Project not found");
            }
            return(View(p));
        }
コード例 #2
0
 public ActionResult Edit(Project project)
 {
     try
     {
         Project p = CurrentUserModel.GetProject(project.Id);
         p.Name        = project.Name;
         p.Description = project.Description;
         CurrentUserModel.UpdateProject(p);
         return(RedirectToAction("Index", new { id = project.Id }));
     }
     catch (Exception ex)
     {
         return(Content(ex.ToString()));
     }
 }
コード例 #3
0
 public ActionResult Edit(int id)
 {
     CurrentUserModel.ValidateProject(id);
     ViewData["Creating"] = false;
     return(View("Create", CurrentUserModel.GetProject(id)));
 }
コード例 #4
0
        public ActionResult ConfirmDelete(int id)
        {
            Project p = CurrentUserModel.GetProject(id);

            return(View(p));
        }
コード例 #5
0
        public ActionResult UploadRelease(int projectId)
        {
            Project p = CurrentUserModel.GetProject(projectId);

            return(View(p));
        }