public async Task <IActionResult> Delete(long?id, long importId, int page) { if (id == null) { return(NotFound()); } await ApiClientHelper.ExecuteDeleteAsync($"{ApiClientHelper.LogRowUrl}/{id}"); ((Controller)this).DisplayTempData("warning", $"Log row deleted successfuly."); return(RedirectToAction("index", new { importId = importId, page = page })); }
// GET: LogRowMismatches/Delete/5?importId={0}&page={1} public async Task <IActionResult> Delete(long?id, long importId, int page) { if (id == null) { ((Controller)this).DisplayTempData("warning", "Sorry! We can't find this Log Error you are trying to delete! Maybe you've already deleted it, didn't you?"); return(Redirect(Request.Headers["Referer"].ToString())); } await ApiClientHelper.ExecuteDeleteAsync($"{ApiClientHelper.LogRowMismatchesUrl}/{id}"); ((Controller)this).DisplayTempData("warning", $"Log row with error deleted successfuly."); return(RedirectToAction("index", new { importId = importId, page = page })); }