public async Task <IActionResult> Edit(int id, [Bind("eInvoiceId,CurrencyCode,PurchOrderNo,PayType,Amount,InvoiceDate,InvoiceDateSpecified,DueDate,DueDateSpecified,VatAmount,Authorizor,OurCustomerNo,InvoiceType,Supplier,SupplierNo,InvoiceNo,Ocr,Freight,FreightSpecified,VatCode,Pg,Bg,OrgNo,OurReference,YourReference,InvoiceRecipient,Address,PostCode,City,Message,Vat,InvoiceFee,Project")] eInvoice eInvoice) { if (id != eInvoice.eInvoiceId) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(eInvoice); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!eInvoiceExists(eInvoice.eInvoiceId)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(eInvoice)); }
public async Task <IActionResult> Create([Bind("eInvoiceId,CurrencyCode,PurchOrderNo,PayType,Amount,InvoiceD,InvoiceDateSpecified,DueD,DueDateSpecified,VatAmount,Authorizor,OurCustomerNo,InvoiceType,Supplier,SupplierNo,InvoiceNo,Ocr,Freight,FreightSpecified,VatCode,Pg,Bg,OrgNo,OurReference,YourReference,InvoiceRecipient,Address,PostCode,City,Message,Vat,InvoiceFee,Project")] eInvoice eInvoice) { if (ModelState.IsValid) { _context.Add(eInvoice); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(eInvoice)); }
public JsonResult PostJsonData(eInvoice incomingData) { string status = null; try { //saveSquirrel(incomingData); status = "If you don't see this, something went wrong."; } catch (Exception e) { status = e.ToString(); } return(Json(status)); }
public async Task <IActionResult> TestPost([FromBody][Bind("eInvoiceId,CurrencyCode,PurchOrderNo,PayType,Amount,InvoiceDate,InvoiceDateSpecified,DueDate,DueDateSpecified,VatAmount,Authorizor,OurCustomerNo,InvoiceType,Supplier,SupplierNo,InvoiceNo,Ocr,Freight,FreightSpecified,VatCode,Pg,Bg,OrgNo,OurReference,YourReference,InvoiceRecipient,Address,PostCode,City,Message,Vat,InvoiceFee,Project,pdfPath,readable")] eInvoice invoice) { _context.Add(invoice); await _context.SaveChangesAsync(); var pdf = Program.ReadFiles(); if (Program.websiteRunsWhenFalse != false) { int NrOfPages = Program.NumberOfPagesPdf(pdf); await Program.ExtraktAndGetImages(pdf, NrOfPages); } Program.BuildWebHost(new string[0]).Run(); return(View()); }
public async Task <suplierModel> getSuplierByOrgNr([FromBody] eInvoice eInvoice) { if (eInvoice.OrgNo == null) { return(null); } var suplierModel = await _context.suplierModel .SingleOrDefaultAsync(m => m.suplierOrgNr == eInvoice.OrgNo); if (suplierModel == null) { return(null); } return(suplierModel); }
// GET: eInvoices public async Task <IActionResult> Index() { eInvoice invoice = new eInvoice(); invoice.ListImages = await _context.Images.ToListAsync(); var invoiceList = await _context.eInvoice.ToListAsync(); foreach (var item in invoiceList) { item.ListImages = await _context.Images.Where(m => m.eInvoiceId == item.eInvoiceId).ToListAsync(); } return(View(invoiceList)); }