...
This commit is contained in:
@@ -332,7 +332,7 @@
|
||||
حذف
|
||||
</Button>
|
||||
<Button class="mt-3" Color="ButtonColor.Primary" @onclick="ShowReport" Type="ButtonType.Button">
|
||||
چاپ
|
||||
pdf
|
||||
</Button>
|
||||
|
||||
}
|
||||
@@ -476,19 +476,20 @@
|
||||
}
|
||||
private async Task ShowReport()
|
||||
{
|
||||
PreloadService.Show(SpinnerColor.Dark);
|
||||
var rsp = await hc.Get($"Invoice/GetReport/{InvoiceID}");
|
||||
if (rsp.IsSuccessStatusCode)
|
||||
{
|
||||
var str = await rsp.Content.ReadFromJsonAsync<string>();
|
||||
var str = await rsp.Content.ReadAsStringAsync();
|
||||
if (string.IsNullOrEmpty(str))
|
||||
ShowDangerAlert("خطایی در ساخت فاکتور");
|
||||
ShowDangerAlert("مشکلی در ساخت فایل رخ داده لطفا مجدد تلاش کنید");
|
||||
else
|
||||
await DownloadFileFromStream(str, $"{InvoiceID}.pdf");
|
||||
await DownloadFileFromStream(str, $"{invoice.ID}.pdf");
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowDangerAlert("خطایی در ساخت فاکتور");
|
||||
}
|
||||
ShowDangerAlert("خطایی در چاپ فاکتور");
|
||||
|
||||
PreloadService.Hide();
|
||||
}
|
||||
private async Task LoadData()
|
||||
{
|
||||
@@ -779,4 +780,3 @@
|
||||
URL.revokeObjectURL(url);
|
||||
}
|
||||
</script>
|
||||
}
|
Reference in New Issue
Block a user