public async Task <IActionResult> DeleteHistoryItem(int SOHistoryID) { if (SOHistoryID < 0) { return(RedirectToAction("WorkOrderHistory")); } var history = await _workorderService.GetSOHistoryById(SOHistoryID); if (history == null) { return(RedirectToAction("WorkOrderHistory")); } await _workorderService.DeleteSoHistory(history); SuccessNotification("The selected order history has been delete successfully."); return(RedirectToAction("WorkOrderHistory")); }