public async Task <IActionResult> ShareClasses(int id, string date, string container) { var dto = new SubEntitiesGetDto() { Id = id, Date = date, Container = container, }; var viewModel = await SubEntitiesVMSetup .SetGet <SubEntitiesViewModel>(this.service, this.subFundService, dto, SqlFunctionDictionary.SubFundShareClasses); return(this.View(viewModel)); }
public static async Task <T> SetGet <T>(IEntityService service, IEntityException exceptionService, SubEntitiesGetDto dto, string function) { exceptionService.ThrowEntityNotFoundExceptionIfIdDoesNotExist(dto.Id); var date = DateTimeParser.FromWebFormat(dto.Date); var values = await service.GetAll(function, dto.Id, date, 1).ToListAsync(); var headers = await service.GetAll(function, dto.Id, date).FirstOrDefaultAsync(); dto.Values = values; dto.Headers = headers; dto.HeadersSelection = headers; return(AutoMapperConfig.MapperInstance.Map <T>(dto)); }
public async Task <IActionResult> SubFunds(int id, string date, string container) { var dto = new SubEntitiesGetDto() { Id = id, Date = date, Container = container, }; var viewModel = await SubEntitiesVMSetup .SetGet <SubEntitiesViewModel>(this.service, this.fundService, dto, SqlFunctionDictionary.FundSubFunds); await this.recentService.Save(this.User, this.Request.Path); return(this.View(viewModel)); }