Exemplo n.º 1
0
        public IActionResult Edit(int id)
        {
            ClientViewModelWithInvoices results = new ClientViewModelWithInvoices();

            results.InvoiceId = id;

            string token  = HttpContext.Session.GetString("InvoiceRegisterJWToken");
            bool   status = _invoicesService.List(token, results);

            if (!(status || results.Invoices.Any()))
            {
                ModelState.AddModelError(string.Empty, "Server error. Please contact administrator.");
            }

            return(View("EditInvoice", results.Invoices[0]));
        }