public JsonResult GetBookingTargets(string startDate, string endDate)
 {
     var dataSeries = new List<object>();
     var targetManager = new DataAccess.TargetManager();
     var audienceManager = new DataAccess.AudienceManager();
     var offices = new DataAccess.OfficeMananer().GetOfficeIDs(IsAdmin ? 0 : UserDetail.UserId);
     var startDateTime = Convert.ToDateTime(startDate);
     var endDateTime = Convert.ToDateTime(endDate);
     var targets = targetManager.GetBookingTargets(offices, startDateTime, endDateTime);
     var achievedTargets = audienceManager.GetBookingTargetsAchived(offices, startDateTime, endDateTime);
     dataSeries.Add(targets);
     dataSeries.Add(achievedTargets);
     var totalTargets = targets.data.Sum(model => model.y);
     var totalAchievedTargets = achievedTargets.data.Sum(model => model.y);
     var chartWidgetData = new { TotalTarget = totalTargets, TotalTargetAchieved = totalAchievedTargets, AchivedTarget = 0, ChartData = dataSeries };
     return Json(chartWidgetData);
 }
 public object GetBookingTargets(int id, DateTime startDate, DateTime endDate)
 {
     var dataSeries = new List<object>();
     var targetManager = new DataAccess.TargetManager();
     var audienceManager = new DataAccess.AudienceManager();
     var targets = targetManager.GetBookingTargets(new List<int> { id }, startDate, endDate);
     var achievedTargets = audienceManager.GetBookingTargetsAchived(new List<int> { id }, startDate, endDate);
     var totalTargets = targets.data.Sum(model => model.y);
     var totalAchievedTargets = achievedTargets.data.Sum(model => model.y);
     return new { Total = totalTargets, ActTotal = totalAchievedTargets };
 }