hytos / ID2.Manager / ID2.Manager.Controller / Controllers / AttFileController.cs @ 2fb63a42
이력 | 보기 | 이력해설 | 다운로드 (1.52 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 AttFileController : BaseController |
13 |
{ |
14 |
public IEnumerable<AttFileInfo> GetFileList(string refID, string category) |
15 |
{ |
16 |
try |
17 |
{ |
18 |
using (AttFileRepository rep = new AttFileRepository(this._MSSQLCONNSTR)) |
19 |
{ |
20 |
return rep.GetAttFileList(refID, category); |
21 |
} |
22 |
} |
23 |
catch (Exception ex) |
24 |
{ |
25 |
throw ex; |
26 |
} |
27 |
} |
28 |
|
29 |
public AttFileInfo GetAttFileInfo(string refID, string category) |
30 |
{ |
31 |
try |
32 |
{ |
33 |
using (AttFileRepository rep = new AttFileRepository(this._MSSQLCONNSTR)) |
34 |
{ |
35 |
return rep.GetAttFileInfo(refID, category); |
36 |
} |
37 |
} |
38 |
catch (Exception ex) |
39 |
{ |
40 |
throw ex; |
41 |
} |
42 |
} |
43 |
|
44 |
public bool SetAttFiles(List<AttFileInfo> attFiles, string userId) |
45 |
{ |
46 |
try |
47 |
{ |
48 |
using (AttFileRepository rep = new AttFileRepository(this._MSSQLCONNSTR)) |
49 |
{ |
50 |
return rep.SetAttFiles(attFiles, userId); |
51 |
} |
52 |
} |
53 |
catch (Exception ex) |
54 |
{ |
55 |
throw ex; |
56 |
} |
57 |
} |
58 |
} |
59 |
} |