public ActionResult DeleteConfirmed(long id) { InvoicesPost invoices = _invoicesService.GetPost(id); invoices.UserName = User.Identity.Name; _invoicesService.Delete(invoices); return(RedirectToAction("Index")); }
public IActionResult Delete(int id) { string token = HttpContext.Session.GetString("InvoiceRegisterJWToken"); int clientId = _invoicesService.Delete(token, id); if (clientId == 0) { ModelState.AddModelError(string.Empty, "Server error. Please contact administrator."); } return(Redirect("~/clients/details/" + clientId.ToString())); }
public async Task <InvoiceDto> Delete(long id) { var result = await _invoicesService.Delete(id); return(result); }