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

Activities of "mmukkara"

Hi aaron,

Here are the definitions as requested.

DependentEnrolmentRuleOutputDto

        public int TenantId { get; set; }
        public int BenefitEnrolmentRuleId { get; set; }
        public short Dependent { get; set; }
        public string WaitingPeriod { get; set; }
        public short StartDateCalc { get; set; }
        public int TerminationAge { get; set; }
        public short TerminationDateCalc { get; set; }
        public bool isEligible { get; set; }

EmploymentRuleOutputDto

     public int TenantId { get; set; }
        public int BenefitEnrolmentRuleId { get; set; }
        public short EmploymentType { get; set; }
        public decimal MinHours { get; set; }
        public short Frequency { get; set; }

TrappingRuleOutputDto

  public int TenantId { get; set; }
        public int BenefitEnrolmentRuleId { get; set; }
        public short TrappingCondition { get; set; }
        public short CovBeforeDecision { get; set; }

BenefitEnrolmentRuleId is propogated to the above entities from BenefitEnrolmentRuleOutputDto Id.

PS: It works if I changed the signature of the method (removed async Task) from public async Task BenefitOptionOutputDto GetBenefitOption(BenefitOptionGetInputDto input) to public BenefitOptionOutputDto GetBenefitOption(BenefitOptionGetInputDto input) I am not sure that it is the solution. It has to be a better way I guess.

Thanks for quick reply.

Hi aaron,

BenefitOptionOutputDto public int TenantId { get; set; } public long Id { get; set; } public string OptionCode { get; set; } public bool IsActive { get; set; } public List<BenefitOptionPlanOutputDto> BenefitOptionPlans { get; set; }

BenefitOptionPlanOutputDto public int TenantId { get; set; } public long Id { get; set; } public long BenefitOptionId { get; set; } public DateTime FromDate { get; set; } public short RuleType { get; set; } public int? RuleId { get; set; } public BenefitEnrolmentRuleOutputDto BenefitEnrolmentRule;

BenefitOptionPlanOutputDto is generic table we have where all the rules are attached. One of the rule is BenefitEnrolmentRuleOutputDto which is identfied by RuleType and RuleId. So there is no FK association defined between RuleId and BenefitEnrolmentRuleOutputDto.

BenefitEnrolmentRuleOutputDto public int TenantId { get; set; } public int Id { get; set; } public string GracePeriod { get; set; } public List<DependentEnrolmentRuleOutputDto> DependentEnrolmentRules { get; set; } public List<EmploymentRuleOutputDto> EmploymentRules { get; set; } public List<TrappingRuleOutputDto> TrappingRules { get; set; }

Hope this helps!

Thanks

I don't know why it didn't close. Is it because of first line in the code I posted.. var benefitOption = await _benefitOptionRepository.GetAsync(input.Id);

Thanks for the response though.

Hi Guys,

This issue may or may not be ANZ issue. Appreciate your help

        var benefitOption = await _benefitOptionRepository.GetAsync(input.Id);

         benefitOption.BenefitOptionPlans = _benefitOptionPlanRepository.GetAll()
            .Where(e => e.BenefitOptionId == input.Id && e.FromDate &lt;= input.AsOfDate)
            .OrderByDescending(e =&gt; e.FromDate)
            .ToList();

        BenefitOptionOutputDto benefitOptionOutputDto = ObjectMapper.Map&lt;BenefitOptionOutputDto&gt;(benefitOption);

        foreach (BenefitOptionPlanOutputDto d in BenefitOptionOutputDto.BenefitOptionPlans)
        {
                var benefitEnrolment = _benefitEnrolmentRepository.GetAll()
                                        .Include(e => e.DependentEnrolmentRules)
                                        .Include(e => e.EmploymentRules)
                                        .Include(e => e.TrappingRules)
                                        .Where(e => e.Id == d.RuleId)
                                        .FirstOrDefault&lt;BenefitEnrolmentRule&gt;();
                d.BenefitEnrolmentRule = ObjectMapper.Map&lt;BenefitEnrolmentRuleOutputDto&gt;(benefitEnrolment);
        }

return benefitOptionOutputDto;

I get "System.InvalidOperationException: There is already an open DataReader associated with this Command which must be closed first." in the foreach loop.

I googled and determined that this can happen if you execute a query while iterating over the results from another query. Couple of suggestions like

  1. Enabling Multiple Active Result Sets (MARS) - Not sure where I enable this in the ANZ.
  2. Use .ToList() instead of FirstOrDefault(). - I have tried this and all other methods still same issue

I tried different variations to fx this issue with no solution. Realy appreciate your help on this.

Thank you

I have responded in the other issue I started and closed...below is the response.

@tugrulkarakaya, where did you add these below lines?

I have added to the .module.ts file below lines... Import { BsDropdownModule } from 'ngx-bootstrap'; and in @NgModule({ imports: [ BsDropdownModule.forRoot()

@tugrulkarakaya, where did you add these below lines?

I have added to the .module.ts file below lines... Import { BsDropdownModule } from 'ngx-bootstrap'; and in @NgModule({ imports: [ BsDropdownModule.forRoot()

adding BsDropdownModule from 'ngx-bootstrap' to the module fixed the issue.

Hi Guys,

"Action" dropdown in the datatable works fine in users, tenants etc. but when incorporated in our components in the app/main path, the dropdown toggle doesn't work. I had to add this below code for the similar situation before v6.0.0 to main-routing.modules.ts to make it work.

constructor(private router: Router) {
        router.events.subscribe(() => {
            this.hideOpenDataTableDropdownMenus();
        });
    }
    hideOpenDataTableDropdownMenus(): void {
        let $dropdownMenus = $('.dropdown-menu.tether-element');
        $dropdownMenus.css({
            'display': 'none'

Now, after upgrade to 6.0.0 and $ clean up. seems like we cannot have this above code and removed it and added (which is in admin-routing.module.ts) below code.

    constructor(
        private router: Router
    ) {
        router.events.subscribe((event) => {
            if (event instanceof NavigationEnd) {
                window.scroll(0, 0);
            }
        });

Nothing seems to work. Please need some help as soon as possible.

fyi, I did copy the same "Action" code what was in users datatable. added all the references BsDropdownModule in main.module.ts.

What else is missing? Appreciate your click reply.

Thanks

Answer

@BobIngham, did you get metronic portlets working? I have the same issue when I tried to incorporate mWizard. I gave up finally. I feel Metronic is bloated to carry around in the project for limited usage overall. Wish I can completely get rid of it from ANZ and use just bootstrap.

Thanks for the pointer. I have looked at it and Metronic Angular Demo still used JS file and it is loaded as

this._script.loadScripts('app-wizard-wizard-4',
['assets/demo/default/custom/crud/wizard/wizard.js']);

Even then I don't see form on the right... [attachment=0:31jjo1wn]3.PNG[/attachment:31jjo1wn]

I was tried to recreate with typescript and getting following error... "mWizard is not defined at...."

I went through Metronic forums and found this....I implemented the same, but no use. [https://keenthemes.com/forums/topic/how-to-implement-form-wizard-in-my-angular-5-application-with-metronic-5-theme/ ])

Hope to solve this problem. Any help would be appreciated.

Thanks

Showing 31 to 40 of 76 entries