Пример #1
0
        public ActionResult DeleteConfirmed(long id)
        {
            InvoicesPost invoices = _invoicesService.GetPost(id);

            invoices.UserName = User.Identity.Name;
            _invoicesService.Delete(invoices);
            return(RedirectToAction("Index"));
        }
Пример #2
0
        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()));
        }
Пример #3
0
        public async Task <InvoiceDto> Delete(long id)
        {
            var result = await _invoicesService.Delete(id);

            return(result);
        }