hytos / ID2.Manager / ID2.Manager.Controller / Controllers / ExcelDataController.cs @ 8eca8767
이력 | 보기 | 이력해설 | 다운로드 (1.01 KB)
1 |
using ID2.Manager.Dapper.Repository; |
---|---|
2 |
using ID2.Manager.Data.Models; |
3 |
using System; |
4 |
using System.Collections.Generic; |
5 |
using System.Linq; |
6 |
using System.Text; |
7 |
using System.Threading.Tasks; |
8 |
|
9 |
namespace ID2.Manager.Controller.Controllers |
10 |
{ |
11 |
public class ExcelDataController : BaseController |
12 |
{ |
13 |
public IEnumerable<ExcelData> GetExcelData(string FileName, string WorksheetName) |
14 |
{ |
15 |
IEnumerable<ExcelData> result = null; |
16 |
|
17 |
using (ExcelDataRepository repository = new ExcelDataRepository(this._MSSQLCONNSTR)) |
18 |
{ |
19 |
result = repository.GetExcelData(FileName, WorksheetName); |
20 |
} |
21 |
|
22 |
return result; |
23 |
} |
24 |
|
25 |
public IEnumerable<ExcelDataInfo> GetExcelDataInfo() |
26 |
{ |
27 |
IEnumerable<ExcelDataInfo> result = null; |
28 |
|
29 |
using (ExcelDataRepository repository = new ExcelDataRepository(this._MSSQLCONNSTR)) |
30 |
{ |
31 |
result = repository.GetExcelDataInfo(); |
32 |
} |
33 |
|
34 |
return result; |
35 |
} |
36 |
} |
37 |
} |