public ActionResult Create(FormCollection collection)
 {
     try
     {
         dc.Post_Insert(collection["Title"], collection["Abstract"], collection["Body"], Guid.Parse(collection["Group"]), Session["Username"].ToString());
         return(RedirectToAction("Index"));
     }
     catch
     {
         if (Request.IsAjaxRequest())
         {
             return(PartialView());
         }
         return(View());
     }
 }
Beispiel #2
0
 public ActionResult Create(FormCollection collection)
 {
     try
     {
         dc.Post_Insert(collection["Title"], collection["Abstract"], collection["Body"], Convert.ToInt32(collection["SubGroup"]));
         return(RedirectToAction("Index"));
     }
     catch
     {
         if (Request.IsAjaxRequest())
         {
             return(PartialView());
         }
         return(View());
     }
 }