Example #1
0
        public JsonResult GetWeightForLastThirtyDays(string personId, string currentDateTime)
        {
            DateTime      endDate   = DateTime.Parse(currentDateTime);
            DateTime      startDate = endDate.AddDays(-30);
            WeightHandler handler   = new WeightHandler();

            List <XYModel> weightAndDateModel = handler.GetWeightsAndDatesAsXAndY(Convert.ToInt32(personId), startDate, endDate);

            return(Json(weightAndDateModel));
        }