Results 1 to 1 of 1

Thread: variable value set in MVVM in WPF

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jan 2020
    Posts
    120

    variable value set in MVVM in WPF

    I have a Dto File in which I get the value. Now I need it in another file in the variable that I access from the get-set but the value is 0. The original value does not come. My code is as follows.

    Dto.cs
    Code:
     public int RemainingVisits => NoOfVisit - UsageCount ;
    File0ne.cs
    constructor
    Code:
    SelectedPlan = new PlanDto();
    get-set
    Code:
    private PatientPlanDto selectedPlan;
    
            public PatientPlanDto SelectedPlan
            {
                get => selectedPlan;
                set
                {
                    selectedPlan = value;                                
                }
            }

    pass 0(error code)
    Code:
    if (SelectedPlan.RemainingVisits>0)
                {
                    //code
                }
    Any one help...
    Last edited by Prahlad; Feb 22nd, 2021 at 11:20 PM.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width