hytos / ID2.Manager / ID2.Manager.Controller / Controllers / FileController.cs @ dfb9a03c
이력 | 보기 | 이력해설 | 다운로드 (1.05 KB)
1 |
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 |
try |
17 |
{ |
18 |
using (FileRepository rep = new FileRepository(this._MSSQLCONNSTR)) |
19 |
{ |
20 |
return rep.GetFileList(documentID); |
21 |
} |
22 |
} |
23 |
catch (Exception ex) |
24 |
{ |
25 |
throw ex; |
26 |
} |
27 |
} |
28 |
|
29 |
public bool SetFileInfo(List<FileInfo> fileList) |
30 |
{ |
31 |
try |
32 |
{ |
33 |
using (FileRepository rep = new FileRepository(this._MSSQLCONNSTR)) |
34 |
{ |
35 |
return rep.SetFileInfo(fileList); |
36 |
} |
37 |
} |
38 |
catch (Exception ex) |
39 |
{ |
40 |
throw ex; |
41 |
} |
42 |
} |
43 |
} |
44 |
} |