Exemplo n.º 1
0
        protected async Task FormSubmitted()
        {
            var model = Converter.Convert(View);
            await repository.Update(Id, model);

            await BlazoredModal.CloseAsync(ModalResult.Ok <TModel>(model));
        }
Exemplo n.º 2
0
 public async void Save()
 {
     Product.UnitQuantity     = NewProductQuantity.UnitQuantityTypeVolume;
     Product.UnitQuantityType = NewProductQuantity.MeasurementType;
     //await ProductService.AddProduct(Product);
     await BlazoredModal.CloseAsync(ModalResult.Ok(Product));
 }
Exemplo n.º 3
0
        public async Task FormSubmitted()
        {
            var model = Converter.Convert(View);
            await Repository.Insert(model);

            await BlazoredModal.CloseAsync(ModalResult.Ok <TModel>(model));
        }
Exemplo n.º 4
0
        private async void Finish()
        {
            await JSRuntime.InvokeVoidAsync("stopScanner");

            await BlazoredModal.CloseAsync(ModalResult.Ok(new BarcodeResult
            {
                Barcode = BarcodeValue
            }));
        }
Exemplo n.º 5
0
        protected async Task Submit()
        {
            var options = new JsonSerializerOptions {
                Converters = { new HardwareConverter() }
            };

            await HttpClient.PutAsJsonAsync("api/hardware", Command, options);

            await BlazoredModal.CloseAsync(ModalResult.Ok(Hardware.Id));
        }
Exemplo n.º 6
0
        private async Task Submit()
        {
            var hardwareId = await HttpClient.PostJsonAsync <int>("api/hardware", Command);

            await BlazoredModal.CloseAsync(ModalResult.Ok(hardwareId));
        }
Exemplo n.º 7
0
        protected async Task Submit()
        {
            await HttpClient.PutJsonAsync("api/contract", Command);

            await BlazoredModal.CloseAsync(ModalResult.Ok(Contract.Id));
        }
Exemplo n.º 8
0
        public async void Save()
        {
            await ProductService.AddQuantityToProduct(NewProductQuantity, Product);

            await BlazoredModal.CloseAsync(ModalResult.Ok(NewProductQuantity));
        }
Exemplo n.º 9
0
 private async Task Close() => await BlazoredModal.CloseAsync(ModalResult.Ok(true));
Exemplo n.º 10
0
        public async void Ok()
        {
            await RecipeService.InsertIngredients(myProductsToAdd);

            await BlazoredModal.CloseAsync(ModalResult.Ok(myProductsToAdd));
        }
Exemplo n.º 11
0
 public async void Save()
 {
     await BlazoredModal.CloseAsync(ModalResult.Ok(Value));
 }
Exemplo n.º 12
0
 private async Task Close(bool response)
 {
     await BlazoredModal.CloseAsync(ModalResult.Ok(response));
 }