public ActionResult DeleteApproval(int approvalTableId) { var acResponse = new ActivityResponse(); try { if (approvalTableId < 1) { acResponse.Code = -1; acResponse.Message = "Invalid selection."; return(Json(acResponse, JsonRequestBehavior.AllowGet)); } _approvalService.Delete(approvalTableId); _unitOfWork.SaveChanges(); acResponse.Code = 5; acResponse.Message = "Base Data was successfully deleted."; return(Json(acResponse, JsonRequestBehavior.AllowGet)); } catch (Exception e) { acResponse.Code = -1; acResponse.Message = "An unknown error was encountered. Please try again."; return(Json(acResponse, JsonRequestBehavior.AllowGet)); } }