예제 #1
0
        public ActionResult Delete(int?id)
        {
            try
            {
                colourService.Delete(id);

                TempData["Success"] = "Deleted successfully";

                return(RedirectToAction("Index"));
            }
            catch (Exception ex)
            {
                TempData["Danger"] = $"Something went wrong {ex.Message}";
            }
            return(RedirectToAction("Index"));
        }
예제 #2
0
        public ActionResult Delete(int?id)
        {
            try
            {
                designService.Delete(Convert.ToInt32(id));
                TempData["Success"] = "Deleted Designation !!";

                return(RedirectToAction("Index"));
            }
            catch (Exception e)
            {
                TempData["Danger"] = $"Opppsss Something went wrong {e.Message} !";
            }

            return(RedirectToAction("Index"));
        }
예제 #3
0
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            try
            {
                educationService.Delete(Convert.ToInt32(id));

                TempData["Success"] = "Education level deleted !";

                return(RedirectToAction("Index"));
            }
            catch (Exception e)
            {
                TempData["Danger"] = $"Oppps something went wrong {e.Message} ";

                throw;
            }
        }
예제 #4
0
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            try
            {
                officeTypeService.Delete(id);

                TempData["Success"] = "OfficeType Deleted Successfully !";

                return(RedirectToAction("Index"));
            }
            catch (Exception e)
            {
                TempData["Danger"] = $"Opps Something went wrong {e.Message}";

                throw;
            }
        }
예제 #5
0
        public ActionResult Delete(int?id)
        {
            try
            {
                if (id == null)
                {
                    return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
                }

                religionService.Delete(id);

                TempData["Success"] = $"Religion Deleted Successfully";

                return(RedirectToAction("Index"));
            }
            catch (Exception e)
            {
                TempData["Danger"] = $"Oppsss something {e.Message}";

                throw;
            }
        }