...
This commit is contained in:
@@ -452,7 +452,7 @@ namespace Back.Controllers
|
|||||||
|
|
||||||
var CompanyID= user?.RolUsers.First().CompanyID;
|
var CompanyID= user?.RolUsers.First().CompanyID;
|
||||||
|
|
||||||
if (await _servInvoice.ExistInvoiceByInvoiceID(CompanyID.Value, InvoiceID))
|
if (!await _servInvoice.ExistInvoiceByInvoiceID(CompanyID.Value, InvoiceID))
|
||||||
return NotFound();
|
return NotFound();
|
||||||
|
|
||||||
// Start the child process.
|
// Start the child process.
|
||||||
|
@@ -332,7 +332,7 @@
|
|||||||
حذف
|
حذف
|
||||||
</Button>
|
</Button>
|
||||||
<Button class="mt-3" Color="ButtonColor.Primary" @onclick="ShowReport" Type="ButtonType.Button">
|
<Button class="mt-3" Color="ButtonColor.Primary" @onclick="ShowReport" Type="ButtonType.Button">
|
||||||
چاپ
|
pdf
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -476,19 +476,20 @@
|
|||||||
}
|
}
|
||||||
private async Task ShowReport()
|
private async Task ShowReport()
|
||||||
{
|
{
|
||||||
|
PreloadService.Show(SpinnerColor.Dark);
|
||||||
var rsp = await hc.Get($"Invoice/GetReport/{InvoiceID}");
|
var rsp = await hc.Get($"Invoice/GetReport/{InvoiceID}");
|
||||||
if (rsp.IsSuccessStatusCode)
|
if (rsp.IsSuccessStatusCode)
|
||||||
{
|
{
|
||||||
var str = await rsp.Content.ReadFromJsonAsync<string>();
|
var str = await rsp.Content.ReadAsStringAsync();
|
||||||
if (string.IsNullOrEmpty(str))
|
if (string.IsNullOrEmpty(str))
|
||||||
ShowDangerAlert("خطایی در ساخت فاکتور");
|
ShowDangerAlert("مشکلی در ساخت فایل رخ داده لطفا مجدد تلاش کنید");
|
||||||
else
|
else
|
||||||
await DownloadFileFromStream(str, $"{InvoiceID}.pdf");
|
await DownloadFileFromStream(str, $"{invoice.ID}.pdf");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
ShowDangerAlert("خطایی در چاپ فاکتور");
|
||||||
ShowDangerAlert("خطایی در ساخت فاکتور");
|
|
||||||
}
|
PreloadService.Hide();
|
||||||
}
|
}
|
||||||
private async Task LoadData()
|
private async Task LoadData()
|
||||||
{
|
{
|
||||||
@@ -779,4 +780,3 @@
|
|||||||
URL.revokeObjectURL(url);
|
URL.revokeObjectURL(url);
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
}
|
|
@@ -34,10 +34,10 @@ builder.Services.AddScoped(sp => new UserAuthenticationDTO()
|
|||||||
}) ;
|
}) ;
|
||||||
|
|
||||||
// Server
|
// Server
|
||||||
builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri("http://195.88.208.142:7075/api/") });
|
//builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri("http://195.88.208.142:7075/api/") });
|
||||||
|
|
||||||
//Home
|
//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
|
//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/") });
|
||||||
|
Reference in New Issue
Block a user