public ActionResult _DeleteCrew(int conveyanceInOutId, bool isCrew, int id) { Crew crew = crewRepo.GetOne(conveyanceInOutId, isCrew, id); if (crew != null) { try { //Delete the record crewRepo.DoDelete(crew); new RecordDeletedEvent("Crew", crew.Id, conveyanceInOutId, crew.Code, null, null).Raise(); } catch { return(RedirectToAction("_EditCrew", new { conveyanceInOutId, id })); } } return(Content(Globals.ModalDetailUpdateOK)); }