예제 #1
0
 public ActionResult AgregarCat(string Cat, string tipo)
 {
     try
     {
         if (Session["Admin"].ToString() != "Admin")
         {
             return RedirectToAction("AD", "BackOffice");
         }
         else
         {
             Session["Msg"] = BD.AgregarCat(Cat, Convert.ToBoolean(tipo));
             return RedirectToAction("ABMCat", "BackOffice");
         }
     }
     catch (NullReferenceException)
     {
         return RedirectToAction("AD", "BackOffice");
     }
 }