Esempio n. 1
0
        public IActionResult Save(InvoiceViewModel invoice)
        {
            string token  = HttpContext.Session.GetString("InvoiceRegisterJWToken");
            bool   status = _invoicesService.Save(token, invoice);

            if (status)
            {
                return(Redirect("~/clients/details/" + invoice.ClientId.ToString()));
            }

            ModelState.AddModelError(string.Empty, "Server error. Please contact administrator.");

            return(View("EditInvoice", invoice));
        }