Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC

Activities of "kalidarscope"

Thanks

i can't geting EmailAddress

How can i use the session and get the injected values from session in Project.Application folder.

Noted : i am useing ASP.NET Core & Angular

i added UserClaimsPrincipalFactory.cs page

public override async Task<ClaimsPrincipal> CreateAsync(User user)
        {
            var claim = await base.CreateAsync(user);

            claim.Identities.First().AddClaim(new Claim("EmailAddress", user.EmailAddress));
           
            return claim;
        }

then Application.core page

    public ASAPSessions11(
        IPrincipalAccessor principalAccessor,
        IMultiTenancyConfig multiTenancy,
        ITenantResolver tenantResolver,
        IAmbientScopeProvider<SessionOverride> sessionOverrideScopeProvider) :
        base(principalAccessor, multiTenancy, tenantResolver, sessionOverrideScopeProvider)
    {

    }

    public string EmailAddress
        {
        get
        {
            var userEmailClaim = PrincipalAccessor.Principal?.Claims.FirstOrDefault(c => c.Type == "EmailAddress");
            if (string.IsNullOrEmpty(userEmailClaim?.Value))
            {
                return null;
            }

            return userEmailClaim.Value;
        }
    }

how to get EmailAddress value project.Applictaion page

I am loading multiple p-table in a form using LazyLoadEvent. First table loading Actions and second table loading sections. For example first table has no data and second table has data. It will load the empty rows in first table. The datas are not loaded properly too. I think, one LazyLoadEvent is loaded but other one loaded early. So the tables data is loading based on loaded LazyLoadEvent.

getActions(event?: LazyLoadEvent) {
        this._activatedRoute.params.subscribe((params: Params) => {
            if (params['id'] != '0') {
                this._scriptService.getScriptsForEdit(params['id']).subscribe((result) => {
                    this.filter = result.reC_ID;
                    this.primengTableHelper.showLoadingIndicator();
                    if (this.primengTableHelper.shouldResetPaging(event)) {
                        this.paginator.changePage(0);
                        return;
                    }

                    this._actionService.getActions(
                        this.filter,
                        this.primengTableHelper.getSorting(this.dataTable),
                        this.primengTableHelper.getMaxResultCount(this.paginator, event),
                        this.primengTableHelper.getSkipCount(this.paginator, event)
                    ).pipe(finalize(() => this.primengTableHelper.hideLoadingIndicator())).subscribe(result => {
                        this.primengTableHelper.totalRecordsCount = result.totalCount;
                        this.primengTableHelper.records = result.items;
                        this.primengTableHelper.hideLoadingIndicator();
                    });
                });
            }
        });
    }
getSections(event?: LazyLoadEvent) {
       
        this._activatedRoute.params.subscribe((params: Params) => {
            if (params['id'] != 'new')
            {
                this._tabService.getTabForEdit(params['id']).subscribe((result) => {
                    this.filter = result.reC_ID.toString().trim();
                    this.primengTableHelper.showLoadingIndicator();
                    if (this.primengTableHelper.shouldResetPaging(event)) {
                        this.paginator.changePage(0);
                        return;
            }

                    this._sectionService.getSections(
                        this.filter,
                        this.primengTableHelper.getSorting(this.dataTable),
                       this.primengTableHelper.getMaxResultCount(this.paginator, event),
                        this.primengTableHelper.getSkipCount(this.paginator, event)
                    ).pipe(finalize(() => this.primengTableHelper.hideLoadingIndicator())).subscribe(result => {
                        this.primengTableHelper.totalRecordsCount = result.totalCount;
                        this.primengTableHelper.records = result.items;
                        this.primengTableHelper.hideLoadingIndicator();
                    });
                });
            }
        });

    }

I have a scenario like below:

There is an one to many relationship with ObjectTable and FieldTable. When i edit the ObjectTable form, i can get the ObjectTable record. But i would like to get FieldTable records also. But it would be return the FieldTable records as PagedResultDto.

Anyone could help me to write the application-service for this scenario. Give me some example also.

Note: I am using ASP.NET Zero and Angular.

It is not fixed if we run the yarn. I have use "yarn add webpack" command to fix this.

Getting the below error while running the npm start command.

Cannot find module 'acorn-dynamic-import'
Error: Cannot find module 'acorn-dynamic-import'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:581:15)
    at Function.Module._load (internal/modules/cjs/loader.js:507:25)
    at Module.require (internal/modules/cjs/loader.js:637:17)
    at require (internal/modules/cjs/helpers.js:22:18)
    at Object.<anonymous> (D:\PROJECT\Project_11022019\src\Project.Web.Host\node_modules\webpack\lib\Parser.js:9:15)
    at Module._compile (internal/modules/cjs/loader.js:689:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
    at Module.load (internal/modules/cjs/loader.js:599:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
    at Function.Module._load (internal/modules/cjs/loader.js:530:3)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: `ng serve --host 0.0.0.0 --port 4200`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

UpdateAsync(obj)

Yes.

Showing 71 to 80 of 121 entries