public JsonResult UpdateRewards(ChildRewardVM[] rewards)
        {
            if (rewards.Length > 0)
            {
                var      rewardslist = new List <ChildReward>();
                DateTime curtime     = DateTime.Now;
                foreach (var r in rewards)
                {
                    var reward = new ChildReward();
                    reward.GoalId             = r.GoalId;
                    reward.PointsAllocated    = r.GoalPoints;
                    reward.RewardRequested    = r.WantReward;
                    reward.ChildId            = r.ChildId;
                    reward.RewardReceivedDate = curtime;
                    rewardslist.Add(reward);
                }
                ;
                BL.AddorUpdateReward(rewardslist);
            }

            return(Json(rewards, JsonRequestBehavior.AllowGet));
        }