Beispiel #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));
        }
Beispiel #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()));
     }
 }
Beispiel #3
0
 public ActionResult Edit(int id)
 {
     CurrentUserModel.ValidateProject(id);
     ViewData["Creating"] = false;
     return(View("Create", CurrentUserModel.GetProject(id)));
 }
Beispiel #4
0
        public ActionResult ConfirmDelete(int id)
        {
            Project p = CurrentUserModel.GetProject(id);

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

            return(View(p));
        }