Beispiel #1
0
        async Task OnAddRowAsync()
        {
            var apiTenantResult = await _apiWrapper.Tenants.GetAllForUserAsync();

            if (apiTenantResult.IsSuccess && apiTenantResult.Error == null)
            {
                _tenants = apiTenantResult.Data.Tenants.ToList();
            }

            _editContext = new UserModel()
            {
                AppRole   = _lstRoles.Roles.Where(x => x.IsAdministrator == false).FirstOrDefault(),
                Language  = _lstCultures.FirstOrDefault(),
                IsEnabled = true
            };

            _EditContext = new EditContext(_editContext);

            _messages            = "";
            _enableCbxUserStatus = true;
            await EnableCbxUserRoles();
            await InvokeAsync(StateHasChanged);

            await _grid.StartRowEdit(null);

            await _jSRuntime.InvokeAsync <string>("focusEditor", "first-focus");
        }
Beispiel #2
0
 private void OnAddNewRow()
 {
     _editContext           = new PayTypeModel();
     _editContext.TenantId  = TenantId;
     _editContext.IsEnabled = true;
     _messages = "";
     grid.CancelRowEdit();
     grid.StartRowEdit(null);
 }
Beispiel #3
0
        async Task OnAddNewAsync()
        {
            ActiveTabIndex            = 0;
            EditContext               = new TenantModel();
            EditContext.ScheduleTimer = 1;
            EditContext.Number        = 1;
            EditContext.IsEnabled     = false;
            await grid.CancelRowEdit();

            message = "";
            await grid.StartRowEdit(null);

            await _jSRuntime.InvokeAsync <string>("focusEditor", "first-focus");
        }
        async Task AddNewGetDetailRowRender()
        {
            //This is lameshit right here. This will fix duplicate validate message of editcontext for now. Delete this if wasm updated and fix this bug.
            await _jSRuntime.InvokeVoidAsync("deleteAnotationErrorMessage");

            _editContext = new ExchangeSettingModel();
            await InvokeAsync(StateHasChanged);

            _editContext.TenantId       = TenantId;
            _editContext.IsEnabled      = true;
            _heathStatusexchangeSetting = _editContext.HealthStatus != null ? (_editContext.HealthStatus == true ? _localizer[LangKey.TEST_PASS] : _localizer[LangKey.TEST_FAIL]) : "";
            EditContext = new EditContext(_editContext);
            var apiVersionsResult = await _apiWrapper.ExchangeSettings.GetAllExchangeVersionsAsync();

            if (apiVersionsResult.IsSuccess && apiVersionsResult.Error == null)
            {
                _exchangeVersionModels = apiVersionsResult.Data;
            }

            var apiLoginTypesResult = await _apiWrapper.ExchangeSettings.GetAllLoginTypesAsync();

            if (apiLoginTypesResult.IsSuccess && apiLoginTypesResult.Error == null)
            {
                _exchangeLoginTypeModels = apiLoginTypesResult.Data;
            }

            await _grid.CancelRowEdit();

            _messages = "";
            await _grid.StartRowEdit(null);

            await _jSRuntime.InvokeAsync <string>("focusEditor", "first-focus");

            _isPassShowed = true;
            messageTestConnectionError = "";
        }