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")); }
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)); }