Пример #1
0
 public ActionResult AddFolder(AddFolderViewModel Model)
 {
     if (Pservice.CanUserOpenProject(Model.ProjectID, User.Identity.Name))
     {
         if (ModelState.IsValid)
         {
             // We add the folder and redirect to the Editor.
             FoService.AddFolder(Model);
             return(RedirectToAction("Index", new { id = Model.ProjectID }));
         }
         else if (Model.Name == null)
         {
             return(Json("EmptyString", JsonRequestBehavior.AllowGet));
         }
     }
     throw new ArgumentException();
 }