Quantcast
Channel: VBForums - WPF, WCF, WF
Viewing all articles
Browse latest Browse all 256

variable value set in MVVM in WPF

$
0
0
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.:blush:

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...

Viewing all articles
Browse latest Browse all 256

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>