hytos / ID2.Manager / ID2.Manager.Controller / Controllers / ExcelDataController.cs @ dfb9a03c
이력 | 보기 | 이력해설 | 다운로드 (1.3 KB)
1 | 8eca8767 | taeseongkim | 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 | 2201f8c4 | yoush97 | |
37 | public bool DeleteExcelData(string FileName, string WorksheetName) |
||
38 | { |
||
39 | using (ExcelDataRepository repository = new ExcelDataRepository(this._MSSQLCONNSTR)) |
||
40 | { |
||
41 | return repository.DeleteExcelData(FileName, WorksheetName); |
||
42 | } |
||
43 | } |
||
44 | 8eca8767 | taeseongkim | } |
45 | } |