...
This commit is contained in:
@@ -17,15 +17,19 @@ namespace Back.Controllers
|
||||
[ApiController]
|
||||
public class InvoiceController : ControllerBase
|
||||
{
|
||||
private readonly IConfiguration _configuration;
|
||||
private readonly servInvoice _servInvoice;
|
||||
private readonly servUser _servUser;
|
||||
private readonly AddOrUpdateInvoiceValidation _validationInvoice;
|
||||
private readonly servTaxPayer _servTaxPayer;
|
||||
public InvoiceController(servInvoice servInvoice, servUser servUser, AddOrUpdateInvoiceValidation validationInvoice, servTaxPayer servTaxPayer)
|
||||
public InvoiceController(servInvoice servInvoice, servUser servUser
|
||||
, AddOrUpdateInvoiceValidation validationInvoice
|
||||
, servTaxPayer servTaxPayer, IConfiguration configuration)
|
||||
{
|
||||
_servInvoice = servInvoice;
|
||||
_servUser = servUser;
|
||||
_validationInvoice = validationInvoice;
|
||||
_configuration=configuration;
|
||||
_servTaxPayer = servTaxPayer;
|
||||
|
||||
}
|
||||
@@ -454,17 +458,18 @@ namespace Back.Controllers
|
||||
|
||||
if (!await _servInvoice.ExistInvoiceByInvoiceID(CompanyID.Value, InvoiceID))
|
||||
return NotFound();
|
||||
|
||||
|
||||
// Start the child process.
|
||||
Process p = new Process();
|
||||
// Redirect the output stream of the child process.
|
||||
p.StartInfo.UseShellExecute = false;
|
||||
p.StartInfo.RedirectStandardOutput = true;
|
||||
p.StartInfo.FileName = "C:\\CreateReport\\CreateReport.exe";
|
||||
p.StartInfo.FileName = _configuration["CreateReportFileName"].ToString();
|
||||
p.StartInfo.Arguments = $"{CompanyID} {InvoiceID}";
|
||||
p.Start();
|
||||
output = p.StandardOutput.ReadToEnd();
|
||||
p.WaitForExit();
|
||||
output =await p.StandardOutput.ReadToEndAsync();
|
||||
await p.WaitForExitAsync();
|
||||
return Ok(output);
|
||||
}
|
||||
[HttpPut("SetExternalAccessCode/{InvoiceID}")]
|
||||
|
Reference in New Issue
Block a user