...
This commit is contained in:
@@ -36,7 +36,7 @@
|
||||
|
||||
<ItemGroup>
|
||||
<Reference Include="Service">
|
||||
<HintPath>..\..\..\LocalGit\TaxPayerTools\Service\bin\Debug\Service.dll</HintPath>
|
||||
<HintPath>..\..\Dlls\Service.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
|
||||
|
@@ -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}")]
|
||||
|
@@ -11,5 +11,6 @@
|
||||
},
|
||||
"Fixedvalues": {
|
||||
"Jwt_Lifetime_Minutes": "144000"
|
||||
}
|
||||
},
|
||||
"CreateReportFileName": "E:\\CreateReport\\CreateReport.exe"
|
||||
}
|
||||
|
16
Back/appsettings.production.json
Normal file
16
Back/appsettings.production.json
Normal file
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
"Default": "Information",
|
||||
"Microsoft.AspNetCore": "Warning"
|
||||
}
|
||||
},
|
||||
"ConnectionStrings": {
|
||||
"Base": "Data Source=.;Initial Catalog=TaxPayer020713;User ID=sa;Password=M439610m@;TrustServerCertificate=True"
|
||||
|
||||
},
|
||||
"Fixedvalues": {
|
||||
"Jwt_Lifetime_Minutes": "144000"
|
||||
},
|
||||
"CreateReportFileName": "E:\\CreateReport\\CreateReport.exe"
|
||||
}
|
Reference in New Issue
Block a user