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));
        }
Ejemplo n.º 2
0
        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));
        }
Ejemplo n.º 3
0
        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));
        }