コード例 #1
0
 public ActionResult EditBasicInfo([Bind(Include = "Id,Name,Description,RowVersion")] ViewProject vproject)
 {
     if (ModelState.IsValid)
     {
         Project project = vproject.ExportToModel();
         this.mngr.Edit(project);
         return(RedirectToAction("Index"));
     }
     return(View(vproject));
 }
コード例 #2
0
        public ActionResult Create([Bind(Include = "Id,Name,Description")] ViewProject vproject)
        {
            //if (ModelState.IsValid)
            {  //project.Admininstrator = Statics.usrmng.GetUser(this.User.Identity.Name);
                Project project = vproject.ExportToModel();
                this.mngr.Create(project, this.User.Identity.Name);
                // RouteValueDictionary vals = new RouteValueDictionary();
                // vals.Add("newwikiname", project.Name);
                //return RedirectToAction("Create", "HomeWiki",vals);
                return(RedirectToAction("Index"));
            }

            //return View(project);
        }