public FundDetailsController( IEntityDetailsService service, IFundService fundService, SharedLocalizationService sharedLocalizer) { this.service = service; this.fundService = fundService; this.sharedLocalizer = sharedLocalizer; }
public ShareClassDetailsController( IEntityDetailsService service, IShareClassService shareClassService, SharedLocalizationService sharedLocalizer) { this.service = service; this.shareClassService = shareClassService; this.sharedLocalizer = sharedLocalizer; }
public SubFundDetailsController( IRecentService recentService, IEntityDetailsService service, ISubFundService subFundService, SharedLocalizationService sharedLocalizer) { this.recentService = recentService; this.service = service; this.subFundService = subFundService; this.sharedLocalizer = sharedLocalizer; }
public static async Task <T> SetGet <T>(int id, string date, IEntityDetailsService service, IEntityException exceptionService, QueriesToPassDto queryDto) { exceptionService.DoesExist(id); var dateParsed = DateTimeExtensions.FromWebFormat(date); var entity = await service.ByIdAndDate(queryDto.SqlFunctionById, id, dateParsed).ToListAsync(); string startConnectionString = entity.ToList()[1][IndexStartConnectionInSQLTable]; string endConnectionString = entity.ToList()[1][IndexEndConnectionInSQLTable]; DateTime?endConnection = null; if (!string.IsNullOrWhiteSpace(endConnectionString) && endConnectionString != GlobalConstants.EmptyEndConnectionDisplay) { endConnection = DateTimeExtensions.FromSqlFormat(endConnectionString); } var dto = new DetailsDto() { Id = id, Date = date, Entity = entity, StartConnection = DateTimeExtensions.FromSqlFormat(startConnectionString), EndConnection = endConnection, }; if (queryDto.SqlFunctionContainer != null) { dto.Container = service.GetContainer(queryDto.SqlFunctionContainer, id, dateParsed); } if (queryDto.SqlFunctionActiveSE != null) { var subEntities = await service.GetSubEntities(queryDto.SqlFunctionActiveSE, id, dateParsed, 1).ToListAsync(); dto.SubEntityCount = subEntities.Count; } return(AutoMapperConfig.MapperInstance.Map <T>(dto)); }