hytos / ID2.Manager / ID2.Manager.Controller / Controllers / FileController.cs @ dfb9a03c
이력 | 보기 | 이력해설 | 다운로드 (1.05 KB)
1 | 54796052 | yoush97 | using System; |
---|---|---|---|
2 | using System.Collections.Generic; |
||
3 | using System.Linq; |
||
4 | using System.Text; |
||
5 | using System.Threading.Tasks; |
||
6 | |||
7 | using ID2.Manager.Data.Models; |
||
8 | using ID2.Manager.Dapper.Repository; |
||
9 | |||
10 | namespace ID2.Manager.Controller.Controllers |
||
11 | { |
||
12 | public class FileController : BaseController |
||
13 | { |
||
14 | public IEnumerable<FileInfo> GetFileList(string documentID) |
||
15 | { |
||
16 | 82705273 | yoush97 | try |
17 | 54796052 | yoush97 | { |
18 | 82705273 | yoush97 | using (FileRepository rep = new FileRepository(this._MSSQLCONNSTR)) |
19 | { |
||
20 | return rep.GetFileList(documentID); |
||
21 | } |
||
22 | } |
||
23 | catch (Exception ex) |
||
24 | { |
||
25 | throw ex; |
||
26 | 54796052 | yoush97 | } |
27 | } |
||
28 | |||
29 | 37b10cc3 | yoush97 | public bool SetFileInfo(List<FileInfo> fileList) |
30 | 54796052 | yoush97 | { |
31 | 82705273 | yoush97 | try |
32 | { |
||
33 | using (FileRepository rep = new FileRepository(this._MSSQLCONNSTR)) |
||
34 | { |
||
35 | return rep.SetFileInfo(fileList); |
||
36 | } |
||
37 | } |
||
38 | catch (Exception ex) |
||
39 | 54796052 | yoush97 | { |
40 | 82705273 | yoush97 | throw ex; |
41 | 54796052 | yoush97 | } |
42 | } |
||
43 | } |
||
44 | } |