hytos / ID2.Manager / ID2.Manager.Common / Informations.cs @ d8bd4799
이력 | 보기 | 이력해설 | 다운로드 (3.43 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 System.ComponentModel; |
8 | |
9 |
using ID2.Manager.Data; |
10 |
using ID2.Manager.Data.Models; |
11 | |
12 |
namespace ID2.Manager.Common |
13 |
{ |
14 |
public class Informations |
15 |
{ |
16 |
private static readonly Lazy<Informations> lazy = new Lazy<Informations>(() => new Informations()); |
17 | |
18 |
public static Informations Instance |
19 |
{ |
20 |
get { return lazy.Value; } |
21 |
} |
22 | |
23 |
private Informations() |
24 |
{ |
25 | |
26 |
} |
27 | |
28 |
public UserInfo ActiveUser { get; set; } |
29 |
public ProjectInfo ActiveProject { get; set; } |
30 | |
31 |
public List<UserInfo> UserList { get; set; } = new List<UserInfo>(); |
32 |
public List<ProjectInfo> ProjectList { get; set; } = new List<ProjectInfo>(); |
33 | |
34 |
public string FindID2LocalPath(string ProjectCode) |
35 |
{ |
36 |
var proj = this.ProjectList.Where(x => |
37 |
{ |
38 |
return x.Code.Equals(ProjectCode); |
39 |
}).FirstOrDefault(); |
40 | |
41 |
return proj == null ? string.Empty : proj.ID2Info.Path; |
42 |
} |
43 | |
44 |
public int? FindID2Port(string ProjectCode) |
45 |
{ |
46 |
var proj = this.ProjectList.Where(x => |
47 |
{ |
48 |
return x.Code.Equals(ProjectCode); |
49 |
}).FirstOrDefault(); |
50 | |
51 |
return proj?.Port; |
52 |
} |
53 | |
54 |
public string FindID2PrjTeam(string ProjectCode) |
55 |
{ |
56 |
var proj = this.ProjectList.Where(x => |
57 |
{ |
58 |
return x.Code.Equals(ProjectCode); |
59 |
}).FirstOrDefault(); |
60 | |
61 |
return proj?.Team; |
62 |
} |
63 | |
64 |
private readonly List<string> _JobLevel = new List<string>() { "1", "2", "3", "4", "5" }; |
65 |
public List<string> JobLevel |
66 |
{ |
67 |
get { return _JobLevel; } |
68 |
} |
69 | |
70 |
private readonly List<string> _IsYesNo = new List<string>() { "Yes", "No" }; |
71 |
public List<string> IsYesNo |
72 |
{ |
73 |
get { return _IsYesNo; } |
74 |
} |
75 | |
76 |
private readonly List<string> _ClientStatus = new List<string>() { "Waiting", "검토중", "회신완료" }; |
77 |
public List<string> ClientStatus |
78 |
{ |
79 |
get { return _ClientStatus; } |
80 |
} |
81 | |
82 |
private readonly List<string> _ValidationResult = new List<string>() { "O", "X" }; |
83 |
public List<string> ValidationResult |
84 |
{ |
85 |
get { return _ValidationResult; } |
86 |
} |
87 | |
88 |
private readonly List<string> _JobStatus = new List<string>() { "시작전", "진행중", "완료", "기타" }; |
89 |
public List<string> JobStatus |
90 |
{ |
91 |
get { return _JobStatus; } |
92 |
} |
93 | |
94 |
private readonly List<string> _UserRole = new List<string>() { "Admin", "Manager", "User" }; |
95 |
public List<string> UserRole |
96 |
{ |
97 |
get { return _UserRole; } |
98 |
} |
99 | |
100 |
private readonly List<string> _IsSuccess = new List<string>() { "성공", "실패" }; |
101 |
public List<string> IsSuccess |
102 |
{ |
103 |
get { return _IsSuccess; } |
104 |
} |
105 | |
106 |
private readonly Dictionary<string, string> _DateType = new Dictionary<string, string>() |
107 |
{ |
108 |
{ "ID2StartDate", "ID2 시작일" }, |
109 |
{ "ID2EndDate", "ID2 완료일" }, |
110 |
{ "AVEVAConvertDate", "AVEVA 변환일" }, |
111 |
{ "AVEVAWorkDate", "AVEVA 작업일" }, |
112 |
{ "AVEVAReviewDate", "검토일" } |
113 |
}; |
114 |
public Dictionary<string, string> DateType |
115 |
{ |
116 |
get { return _DateType; } |
117 |
} |
118 |
} |
119 |
} |