示例#1
0
        public ActionResult BorrarCar(string Confirmacion, int id)
        {
            try
            {
                if (Session["Admin"].ToString() != "Admin")
                {
                    return RedirectToAction("AD", "BackOffice");
                }
                else
                {
                    if (Confirmacion == "Si")
                    {
                        Session["Msg"] = BD.BorrarCar(BD.BuscarPregunta(id));
                    }
                    else
                    {
                        Session["Msg"] = "Ha decidido no Eliminar Personajes";

                    }
                    return RedirectToAction("ABMCar", "BackOffice");
                }
            }

            catch (NullReferenceException)
            {
                return RedirectToAction("AD", "BackOffice");
            }
        }