コード例 #1
0
 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());
     }
 }
コード例 #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());
     }
 }