public JsonResult GetFundRaisingTargets(string startDate, string endDate)
 {
     var dataSeries = new List<DataModel.Modal.ChartSeries>();
     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.GetFundingTargets(offices, startDateTime, endDateTime);
     var achievedTargets = audienceManager.GetFundingTargetsAchived(offices.ToList(), 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);
 }
 // Fund Raising Target For CurrentYear
 public object GetFundRaisingTargetsChart(int id, DateTime startDate, DateTime endDate)
 {
     var dataSeries = new List<DataModel.Modal.ChartSeries>();
     var targetManager = new DataAccess.TargetManager();
     var audienceManager = new DataAccess.AudienceManager();
     var targets = targetManager.GetFundingTargets(new List<int> { id }, startDate, endDate);
     var achievedTargets = audienceManager.GetFundingTargetsAchived(new List<int> { id }, startDate, endDate);
     dataSeries.Add(targets);
     dataSeries.Add(achievedTargets);
     var totalTargets = targets.data.Sum(model => model.y);
     var totalAchievedTargets = achievedTargets.data.Sum(model => model.y);
     return new { TotalTarget = totalTargets, TotalTargetAchieved = totalAchievedTargets, AchivedTarget = 0, ChartData = dataSeries };
 }
 public object GetFundRaisingTargets(int id, DateTime startDate, DateTime endDate)
 {
     var targetManager = new DataAccess.TargetManager();
     var audienceManager = new DataAccess.AudienceManager();
     var targets = targetManager.GetFundingTargets(new List<int> { id }, startDate, endDate);
     var achievedTargets = audienceManager.GetFundingTargetsAchived(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 };
 }