コード例 #1
0
 public ActionResult Remove(int id)
 {
     try
     {
         if (Session["ModId"] != null)
         {
             LanguageDAO dao = new LanguageDAO();
             Language    l   = dao.SearchById(id);
             dao.Remove(l);
             return(RedirectToAction("Index"));
         }
         else
         {
             return(RedirectToAction("../Home/Index"));
         }
     }
     catch
     {
         return(RedirectToAction("Index", "Home"));
     }
 }