SHA256
feat StayExport - Added common Interface "IResult" for Result so both (generic and non-generic one) can be used easier.
This commit is contained in:
1 parent
313a714a99
commit
058352b7f3
5 files changed
+34
-15
No files matched your search
@@ -148,6 +148,7 @@
|
||||
|
||||
var fileName = Path.GetFileName(item.ExportedPath);
|
||||
await JS.InvokeVoidAsync("downloadFileFromStream", fileName, streamRef);
|
||||
userMessage.ShowMessage("Exported File downloaded!", MessageKind.Success);
|
||||
}
|
||||
|
||||
private async Task BtnDeleteItem(StayExportFileDTO item)
|
||||
|
||||
@@ -125,18 +125,17 @@
|
||||
var exportResult = await exportService.ExportStaysByParams(exportParams);
|
||||
|
||||
exportedFile = exportResult.Value;
|
||||
userMessage.ShowMessage(
|
||||
$"Stay exported: {exportResult.ResultCode} with export result: {exportedFile?.ExportResult} to '{exportedFile?.ExportedPath ?? "???"}'",
|
||||
MessageKind.Info);
|
||||
|
||||
loadingDialog.Close();
|
||||
|
||||
@* Result createResult = await stayService.CreateEntryAsync(model);
|
||||
if (!createResult.IsSuccess)
|
||||
if (!exportResult.IsSuccess)
|
||||
{
|
||||
userMessage.ShowResultWithMessage(createResult, $"Error creating StayEntry");
|
||||
userMessage.ShowResultWithMessage(exportResult, $"Error exporting stays");
|
||||
return;
|
||||
} *@
|
||||
}
|
||||
|
||||
userMessage.ShowMessage(
|
||||
$"Stay exported: {exportResult.ResultCode} with export result: {exportedFile?.ExportResult}",
|
||||
MessageKind.Success);
|
||||
}
|
||||
|
||||
private async Task BtnDownloadExportedFile()
|
||||
@@ -161,6 +160,8 @@
|
||||
using var streamRef = new DotNetStreamReference(stream: objectStream);
|
||||
|
||||
await JS.InvokeVoidAsync("downloadFileFromStream", fileName, streamRef);
|
||||
|
||||
userMessage.ShowMessage("Exported File downloaded!", MessageKind.Success);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user