Esempio n. 1
0
        public async Task <PagedResultDto <GetDataChamCongForViewDto> > GetAll(GetAllDataChamCongsInput input)
        {
            var result = await _sqlServerStoreRepository.SelectDataList <GetDataChamCongForViewDto>(StoreProcedureName.Schema, StoreProcedureName.GetAllChamCongByFilter, input);

            return(new PagedResultDto <GetDataChamCongForViewDto>(
                       input.TotalCount,
                       result
                       ));
        }
Esempio n. 2
0
        public async Task <FileDto> GetDataChamCongsFilterToExcel(GetAllDataChamCongsInput input)
        {
            input.IsExportExcel = true;
            var dsResult = await _sqlServerStoreRepository.SelectDataSet(StoreProcedureName.Schema, StoreProcedureName.GetAllChamCongByFilter, input);

            if (dsResult != null && dsResult.Tables.Count > 0)
            {
                for (var idx = 0; idx < dsResult.Tables.Count; idx++)
                {
                    dsResult.Tables[idx].TableName = AppConsts.PrefixTableReport + idx;
                }
            }
            return(_dataChamCongsExcelExporter.ExportToFile(dsResult));
        }