Example #1
0
        // GET: LeaveTypes/Delete/5
        public ActionResult Delete(int id)
        {
            var leavetype = _repo.FindById(id);

            if (leavetype == null)
            {
                return(NotFound());
            }
            var isSuccess = _repo.Delite(leavetype);

            if (!isSuccess)
            {
                return(BadRequest());
            }
            return(RedirectToAction(nameof(Index)));
        }