async Task CreateOrEdit(int idBook = -1) { if (idBook > 0) { //var book = await booksService.Get(idBook); await BlockPage(); Book = books.Where(m => m.id == idBook).FirstOrDefault(); await UnBlockPage(); } else { this.Book = new Book(); } await JsInteropUtils.ShowModal(jsRuntime, "#ModalCreateOrEdit"); }
protected virtual async Task UnBlockPage() { await JsInteropUtils.UnBlockPage(jsRuntime); }
protected virtual async Task SweetMessageBox(string message = "", string icon = "info", string redirectTo = "", int delayMilliSeconds = 1500, bool Reload = false) { await JsInteropUtils.SweetMessageBox(jsRuntime, message, icon, redirectTo, delayMilliSeconds, Reload); }