diff --git a/Back/Back.csproj b/Back/Back.csproj index 899d7e4..fd97cd7 100644 --- a/Back/Back.csproj +++ b/Back/Back.csproj @@ -36,7 +36,7 @@ - ..\..\..\LocalGit\TaxPayerTools\Service\bin\Debug\Service.dll + ..\..\Dlls\Service.dll diff --git a/Back/Controllers/InvoiceController.cs b/Back/Controllers/InvoiceController.cs index 6153852..b58a145 100644 --- a/Back/Controllers/InvoiceController.cs +++ b/Back/Controllers/InvoiceController.cs @@ -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}")] diff --git a/Back/appsettings.Development.json b/Back/appsettings.Development.json index eedadbc..f0ec28c 100644 --- a/Back/appsettings.Development.json +++ b/Back/appsettings.Development.json @@ -11,5 +11,6 @@ }, "Fixedvalues": { "Jwt_Lifetime_Minutes": "144000" - } + }, + "CreateReportFileName": "E:\\CreateReport\\CreateReport.exe" } diff --git a/Back/appsettings.production.json b/Back/appsettings.production.json new file mode 100644 index 0000000..7789554 --- /dev/null +++ b/Back/appsettings.production.json @@ -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" +} diff --git a/Shared/Shared.csproj b/Shared/Shared.csproj index fa71b7a..51b062c 100644 --- a/Shared/Shared.csproj +++ b/Shared/Shared.csproj @@ -6,4 +6,13 @@ enable + + + ..\..\Dlls\stimull\Stimulsoft.Base.dll + + + ..\..\Dlls\stimull\Stimulsoft.Report.dll + + + diff --git a/TaxPayerFull/Pages/InvoiceReport.razor b/TaxPayerFull/Pages/InvoiceReport.razor index dd9b2fb..68b00f6 100644 --- a/TaxPayerFull/Pages/InvoiceReport.razor +++ b/TaxPayerFull/Pages/InvoiceReport.razor @@ -3,6 +3,7 @@ @inject HttpClientController hc; +@layout EmptyLayout @page "/InvoiceReport/{ExternalAccessCode}" @using Front.Services @@ -13,7 +14,7 @@ protected async override Task OnParametersSetAsync() { if (!string.IsNullOrEmpty(ExternalAccessCode)) - ShowReport(); + await ShowReport(); await base.OnParametersSetAsync(); } diff --git a/TaxPayerFull/Pages/UserPanel/InvoiceItem.razor b/TaxPayerFull/Pages/UserPanel/InvoiceItem.razor index ba175ce..087d0f0 100644 --- a/TaxPayerFull/Pages/UserPanel/InvoiceItem.razor +++ b/TaxPayerFull/Pages/UserPanel/InvoiceItem.razor @@ -16,7 +16,8 @@ - @ExUrl +
با لینک زیر دیگران میتوانند به این صورتحساب دسترسی داشته باشند
+ @ExUrl
@@ -342,7 +343,7 @@ - } diff --git a/TaxPayerFull/Program.cs b/TaxPayerFull/Program.cs index 670070e..ea0270a 100644 --- a/TaxPayerFull/Program.cs +++ b/TaxPayerFull/Program.cs @@ -37,10 +37,10 @@ builder.Services.AddScoped(sp => new UserAuthenticationDTO() //builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri("http://195.88.208.142:7075/api/") }); //Home -//builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri("https://localhost:7075/api/") }); +builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri("https://localhost:7075/api/") }); //farzan -builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri("http://localhost:5271/api/") }); +//builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri("http://localhost:5271/api/") }); CultureInfo.DefaultThreadCurrentCulture = new CultureInfo("fa-Ir");