private async Task <bool> MilestoneSaveAsync() { if (!GoalAchieved || AchievedMilestone == null) { if (AchievedMilestonePercentage != null) { await MilestonePercentSaveAsync(); } return(true); } var response = await _userMilestoneService.SaveUserMilestoneAsync(new UserMilestone() { AchieveDate = DateTime.Now, MilestoneID = AchievedMilestone.ID }); if (response == HttpConstants.SUCCESS) { if (AchievedMilestonePercentage != null) { await MilestonePercentSaveAsync(); } else { return(true); } } return(response == HttpConstants.SUCCESS); }
private async Task <bool> MilestoneSaveAsync() { if (!GoalAchieved || AchievedMilestone == null) { return(true); } var userMilestone = new UserMilestone() { AchieveDate = DateTime.Now, MilestoneID = AchievedMilestone.ID }; var response = await userMilestoneService.SaveUserMilestoneAsync(userMilestone); return(response == HttpConstants.SUCCESS); }