예제 #1
0
        public FilePathResult GetExelFromWeekPaimentstDto([FromBody] ForExcelDataDto feDto)
        {
            WeekPaimentDto dto      = WeekPaimentDto.GetMapDto(_unitOfWork.RepositoryAsync <WeekPaiment>(), feDto.WeekYear);
            string         filename = _getExcelService.GetExcelFileFromPaimentsModel(feDto);
            string         _path    = string.Format("/ExcelFiles/{0}",
                                                    filename.Substring(filename.LastIndexOf(@"\", StringComparison.Ordinal) + 1));

            return(new FilePathResult(_path, "multipart/form-data"));
        }
예제 #2
0
        public async Task <WeekPaimentDto> GetWeekPaiments([FromBody] WeekYearDto wyDto)
        {
            if (wyDto == null)
            {
                wyDto = YearWeekHelp.GetCurrentWeekYearDto();
            }

            WeekPaimentDto dto = WeekPaimentDto.GetMapDto(_unitOfWork.RepositoryAsync <WeekPaiment>(), wyDto);

            return(await Task.FromResult(dto));
        }