Example #1
0
        // GET: DashBoard/Especialidad/Delete/5
        public ActionResult Delete(int id)
        {
            ViewBag.menu = "Specialities";

            SessionInitialize();

            SpecialtyCAD cadPos = new SpecialtyCAD();
            SpecialtyCEN cen    = new SpecialtyCEN(cadPos);

            cen.Destroy(id);

            SpecialtyEN pos = cen.ReadOID(id);

            SessionClose();


            if (pos == null)
            {
                TempData["resultado"] = Resources.textos.deleteOK;
                TempData["ok"]        = "success";
            }
            else
            {
                TempData["resultado"] = Resources.textos.errorKO;
                TempData["ok"]        = "danger";
            }

            return(RedirectToAction("Index"));
        }