예제 #1
0
 public ActionResult Edit(Guid id, FormCollection collection)
 {
     try
     {
         dc.Post_Update(id, collection["Title"], collection["Abstract"], collection["Body"], Guid.Parse(collection["Group"]));
         return(RedirectToAction("Index"));
     }
     catch
     {
         var Post = dc.Posts.Where(x => x.Id == id).FirstOrDefault();
         if (Request.IsAjaxRequest())
         {
             return(PartialView(Post));
         }
         return(View(Post));
     }
 }