Example #1
0
        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");
        }
Example #2
0
 protected virtual async Task UnBlockPage()
 {
     await JsInteropUtils.UnBlockPage(jsRuntime);
 }
Example #3
0
 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);
 }