public ActionResult Edit(EditModel model, int projectId, bool hasParent)
        {
            model.Id = projectId;
            if (!hasParent)
            {
                model.ParentId = null;
            }

            if (!ModelState.IsValid)
            {
                return View(model);
            }

            if (!_authService.GetTokens(userHelper.CurrentUserId.Value, model.Id).Contains(Token.Founder))
            {
                ViewBag.IsFounder = false;
                return View();
            }

            _projectService.Modify(model);

            return RedirectToAction("Edit", new { projectId = projectId });
        }
        public void Modify(EditModel model)
        {
            Project project = session.Load<Project>(model.Id);
            Project newParent = model.ParentId.HasValue ? 
                session.Load<Project>(model.ParentId) : 
                null;

            project.Name = model.Name;
            project.Description = model.Description;
            project.ChangeParent(newParent);
        }
 public void Modify(EditModel model)
 {
 }
        public EditModel GetEdit(int projectId)
        {
            Project project = session.Load<Project>(projectId);

            EditModel model = new EditModel();
            model.FilledBy(project);

            return model;
        }
        public EditModel GetEdit(int projectId)
        {
            EditModel model = new EditModel
            {
                Id = projectId,
                Name = "自由飞",
                Description = "让你的梦想只有的飞起来吧"
            };

            return model;
        }