示例#1
0
        private async void GetMilestoneExtendedAsync()
        {
            MilestoneExtended =
                await _userMilestoneService.GetExtendedAsync(App.Configuration.AppConfig.DefaultLanguage);

            if (MilestoneExtended != null)
            {
                if (MilestoneExtended.Milestones != null)
                {
                    var miles = MilestoneExtended.Milestones.ToList();
                    foreach (var mile in miles)
                    {
                        mile.TargetValue = (int)_converter.DisplayWeightVolume(mile.TargetValue);
                        Milestones.Add(mile);
                    }
                }

                if (MilestoneExtended.UserMilestones != null)
                {
                    UserMilestones = MilestoneExtended.UserMilestones.ToList();
                }
                if (MilestoneExtended.MilestonePercentages != null)
                {
                    MilestonePercentage = MilestoneExtended.MilestonePercentages.ToList();
                }
            }
        }
示例#2
0
        private async Task GetMilestoneExtendedAsync()
        {
            MilestoneExtended =
                await userMilestoneService.GetExtendedAsync(App.Configuration.AppConfig.DefaultLanguage);

            if (MilestoneExtended != null)
            {
                if (MilestoneExtended.MilestonePercentages != null)
                {
                    Milestones = MilestoneExtended.MilestonePercentages.ToList();
                }
                if (MilestoneExtended.UserMilestones != null)
                {
                    UserMilestones = MilestoneExtended.UserMilestones.ToList();
                }
            }
        }