hytos / ID2.Manager / ID2.Manager.Controller / Controllers / ProjectController.cs @ a23d0a0c
이력 | 보기 | 이력해설 | 다운로드 (1.86 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 ProjectController : BaseController |
13 |
{ |
14 |
public IEnumerable<ProjectInfo> GetAllProjectList() |
15 |
{ |
16 |
using (ProjectRepository rep = new ProjectRepository(this._DbConnectionStr)) |
17 |
{ |
18 |
return rep.GetAllProjectList(); |
19 |
} |
20 |
} |
21 |
|
22 |
public IEnumerable<ProjectInfo> GetProjectGroupList() |
23 |
{ |
24 |
using (ProjectRepository rep = new ProjectRepository(this._DbConnectionStr)) |
25 |
{ |
26 |
return rep.GetProjectGroupList(); |
27 |
} |
28 |
} |
29 |
|
30 |
public IEnumerable<ProjectInfo> GetProjectList(string ProjectID, bool IsGroup) |
31 |
{ |
32 |
using (ProjectRepository rep = new ProjectRepository(this._DbConnectionStr)) |
33 |
{ |
34 |
return rep.GetProjectList(ProjectID, IsGroup); |
35 |
} |
36 |
} |
37 |
|
38 |
public ProjectInfo GetProjectInfo(string ProjectID) |
39 |
{ |
40 |
using (ProjectRepository rep = new ProjectRepository(this._DbConnectionStr)) |
41 |
{ |
42 |
return rep.GetProjectInfo(ProjectID); |
43 |
} |
44 |
} |
45 |
|
46 |
public bool SetProjectData(ProjectInfo projectInfo, List<ID2ProjectInfo> id2ProjectList) |
47 |
{ |
48 |
using (ProjectRepository rep = new ProjectRepository(this._DbConnectionStr)) |
49 |
{ |
50 |
return rep.SetProjectData(projectInfo, id2ProjectList); |
51 |
} |
52 |
} |
53 |
|
54 |
public bool SetProjectGroupData(ProjectInfo projectInfo) |
55 |
{ |
56 |
using (ProjectRepository rep = new ProjectRepository(this._DbConnectionStr)) |
57 |
{ |
58 |
return rep.SetProjectGroupData(projectInfo); |
59 |
} |
60 |
} |
61 |
} |
62 |
} |