public IEnumerable <OverViewDataRow> SpData(CC.Data.ccEntities db, CC.Data.Services.IPermissionsBase permissions) { var data = db.spFinancialSummaryOverview(this.CurId, this.StartDate, this.EndDate , !this.IncludeNotSubmittedReports , !this.HideEstimatedAmounts , this.AgencyId , this.RegionId , this.CountryId , this.StateId , this.ServiceTypeId , this.ServiceId , this.MasterFundId , this.FundId , this.AppId , this.ClientId , this.sSearch , this.sSortCol_0 , this.sSortDir_0 == "asc" , this.iDisplayLength == int.MaxValue ? int.MaxValue : this.iDisplayLength + 1 , this.iDisplayStart , permissions.User.Id); return(data.Select(f => new OverViewDataRow { AgencyId = f.AgencyId, AgencyName = f.AgencyName, ServiceId = f.ServiceId, ServiceName = f.ServiceName, ServiceTypeName = f.ServiceTypeName, Amount = f.Amount ?? 0, ClientsCount = f.ClientsCount, UniqueClientsCount = f.UniqueClientsCount, AvgAmountPerMaster = f.AverageCostPerUnduplicatedClient ?? 0, CurId = this.CurId, FundsCount = f.FundsCount ?? 0, MasterFundName = f.MasterFundName, CcGrant = f.CcGrant, }).ToList()); }