프로젝트

일반

사용자정보

통계
| 개정판:

hytos / ID2.Manager / ID2.Manager.Data / Models / Documents.cs @ 08499f5f

이력 | 보기 | 이력해설 | 다운로드 (11.3 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
using System.Runtime.Serialization;
9

    
10
namespace ID2.Manager.Data.Models
11
{
12
    [DataContract]
13
    public class Documents : IEquatable<Documents>, INotifyPropertyChanged
14
    {
15
        public event PropertyChangedEventHandler PropertyChanged;
16
        protected void OnPropertyChanged(string propName)
17
        {
18
            if (PropertyChanged != null)
19
            {
20
                PropertyChanged(this, new PropertyChangedEventArgs(propName));
21
            }
22
        }
23

    
24
        [DataMember]
25
        public int Seq { get; set; }
26
        [DataMember]
27
        public string DocID { get; set; }
28
        [DataMember]
29
        public string DocumentNo { get; set; }
30
        [DataMember]
31
        public string RevisonNo { get; set; }
32
        [DataMember]
33
        public string RefProjectCode { get; set; }
34
        [DataMember]
35
        public bool IsLatest { get; set; }
36
        [DataMember]
37
        public string AutoCADFilie { get; set; }
38
        [DataMember]
39
        public string PDFFile { get; set; }
40
        [DataMember]
41
        public string MarkupLink { get; set; }
42
        [DataMember]
43
        public string AVEVALink { get; set; }
44
        [DataMember]
45
        public string DocFilePath { get; set; }
46
        [DataMember]
47
        public string DocFileName { get; set; }
48
        [DataMember]
49
        public string JobLevel { get; set; }
50
        [DataMember]
51
        public string IsTypical { get; set; }
52
        [DataMember]
53
        public string PersonInCharge { get; set; }
54
        private string _Worker = string.Empty;
55
        [DataMember]
56
        public string Worker
57
        {
58
            get
59
            {
60
                return _Worker;
61
            }
62
            set
63
            {
64
                if (this._Worker != value)
65
                {
66
                    this._Worker = value;
67
                    OnPropertyChanged("Worker");
68
                }
69
            }
70
        }
71
        [DataMember]
72
        public bool IsDeleted { get; set; }
73
        [DataMember]
74
        public DateTime RegisteredDate { get; set; }
75
        [DataMember]
76
        public DateTime? ModifiedDate { get; set; }
77
        [DataMember]
78
        public DateTime? DeletedDate { get; set; }
79
        [DataMember]
80
        public string RegisteredUser { get; set; }
81
        [DataMember]
82
        public string ModifiedUser { get; set; }
83
        [DataMember]
84
        public string DeletedUser { get; set; }
85
        [DataMember]
86
        public string ToIsDiscussion { get; set; }
87
        [DataMember]
88
        public string ToRemarks { get; set; }
89
        [DataMember]
90
        public string ToCreator { get; set; }
91
        [DataMember]
92
        public string ToCapture { get; set; }
93
        [DataMember]
94
        public string ToIsMarkup { get; set; }
95
        [DataMember]
96
        public string FrReviewStatus { get; set; }
97
        [DataMember]
98
        public string FrRemarks { get; set; }
99
        [DataMember]
100
        public string FrCreator { get; set; }
101
        [DataMember]
102
        public string FrCapture { get; set; }
103
        [DataMember]
104
        public string FrIsMarkup { get; set; }
105
        [DataMember]
106
        public string IsID2Work { get; set; }
107
        [DataMember]
108
        public string ID2Connection { get; set; }
109
        [DataMember]
110
        public DateTime? ID2StartDate { get; set; }
111
        [DataMember]
112
        public DateTime? ID2EndDate { get; set; }
113
        [DataMember]
114
        public int ID2JobTime { get; set; }
115
        public string ID2JobTimetoString
116
        {
117
            get
118
            {
119
                StringBuilder sbTemp;
120
                if (ID2JobTime > 0)
121
                {
122
                    sbTemp = new StringBuilder(TimeSpan.FromSeconds(Convert.ToInt32(ID2JobTime)).ToString(@"dd\:hh\:mm\:ss"));
123
                }
124
                else if (ID2JobTime < 0)
125
                {
126
                    sbTemp = new StringBuilder(TimeSpan.FromSeconds(Convert.ToInt32(ID2JobTime)).ToString(@"dd\:hh\:mm\:ss"));
127
                    sbTemp.Insert(0, "-");
128
                }
129
                else
130
                {
131
                    sbTemp = new StringBuilder();
132
                }
133

    
134
                return sbTemp.ToString();
135
            }
136
        }
137
        [DataMember]
138
        public string ID2Status { get; set; }
139
        [DataMember]
140
        public string ID2Issues { get; set; }
141
        [DataMember]
142
        public string AVEVAConnection { get; set; }
143
        [DataMember]
144
        public DateTime? AVEVAConvertDate { get; set; }
145
        [DataMember]
146
        public DateTime? AVEVAReviewDate { get; set; }
147
        [DataMember]
148
        public string AVEVAStatus { get; set; }
149
        [DataMember]
150
        public string AVEVAIssues { get; set; }
151
        [DataMember]
152
        public string ReviewFilePath { get; set; }
153
        [DataMember]
154
        public string ReviewFileName { get; set; }
155
        [DataMember]
156
        public string ProdReviewer { get; set; }
157
        [DataMember]
158
        public string ProdIsResult { get; set; }
159
        [DataMember]
160
        public string ProdRemarks { get; set; }
161
        [DataMember]
162
        public string ClientReviewer { get; set; }
163
        [DataMember]
164
        public string ClientIsResult { get; set; }
165
        [DataMember]
166
        public string ClientRemarks { get; set; }
167
        [DataMember]
168
        public string DTIsGateWay { get; set; }
169
        [DataMember]
170
        public string DTIsImport { get; set; }
171
        [DataMember]
172
        public string DTIsRegSystem { get; set; }
173
        [DataMember]
174
        public string DTRemarks { get; set; }
175

    
176
        public List<MarkupText> Markups { get; set; }
177

    
178
        public List<AttFileInfo> AttFiles { get; set; }
179

    
180

    
181
        public override bool Equals(object obj)
182
        {
183
            return Equals(obj as Documents);
184
        }
185

    
186
        public bool Equals(Documents other)
187
        {
188
            return other != null && this.DocumentNo == other.DocumentNo && this.RevisonNo == other.RevisonNo && this.RefProjectCode == other.RefProjectCode && this.IsLatest == other.IsLatest
189
                && this.AutoCADFilie == other.AutoCADFilie && this.PDFFile == other.PDFFile && this.MarkupLink == other.MarkupLink && this.AVEVALink == other.AVEVALink
190
                && this.DocFilePath == other.DocFilePath && this.DocFileName == other.DocFileName && this.JobLevel == other.JobLevel && this.IsTypical == other.IsTypical
191
                && this.PersonInCharge == other.PersonInCharge && this.IsDeleted == other.IsDeleted && this.ToIsDiscussion == other.ToIsDiscussion && this.ToRemarks == other.ToRemarks
192
                && this.ToCreator == other.ToCreator && this.ToCapture == other.ToCapture && this.ToIsMarkup == other.ToIsMarkup
193
                && this.FrReviewStatus == other.FrReviewStatus && this.FrRemarks == other.FrRemarks && this.FrCreator == other.FrCreator
194
                && this.FrCapture == other.FrCapture && this.FrIsMarkup == other.FrIsMarkup && this.IsID2Work == other.IsID2Work && this.ID2Connection == other.ID2Connection
195
                && this.ID2StartDate == other.ID2StartDate && this.ID2EndDate == other.ID2EndDate && this.ID2JobTime == other.ID2JobTime && this.ID2Status == other.ID2Status
196
                && this.ID2Issues == other.ID2Issues && this.AVEVAConnection == other.AVEVAConnection && this.AVEVAConvertDate == other.AVEVAConvertDate && this.AVEVAReviewDate == other.AVEVAReviewDate
197
                && this.AVEVAStatus == other.AVEVAStatus && this.AVEVAIssues == other.AVEVAIssues && this.ReviewFilePath == other.ReviewFilePath && this.ReviewFileName == other.ReviewFileName
198
                && this.ProdReviewer == other.ProdReviewer && this.ProdIsResult == other.ProdIsResult && this.ProdRemarks == other.ProdRemarks && this.ClientReviewer == other.ClientReviewer
199
                && this.ClientIsResult == other.ClientIsResult && this.ClientRemarks == other.ClientRemarks && this.DTIsGateWay == other.DTIsGateWay && this.DTIsImport == other.DTIsImport
200
                && this.DTIsRegSystem == other.DTIsRegSystem && this.DTRemarks == other.DTRemarks
201
                && this.Markups == other.Markups;
202

    
203
        }
204
        public override int GetHashCode()
205
        {
206
            return this.DocumentNo.GetNullableHash() + this.RevisonNo.GetNullableHash() + this.RefProjectCode.GetNullableHash() + this.IsLatest.GetNullableHash()
207
                + this.AutoCADFilie.GetNullableHash() + this.PDFFile.GetNullableHash() + this.MarkupLink.GetNullableHash() + this.AVEVALink.GetNullableHash()
208
                + this.DocFilePath.GetNullableHash() + this.DocFileName.GetNullableHash() + this.JobLevel.GetNullableHash() + this.IsTypical.GetNullableHash()
209
                + this.PersonInCharge.GetNullableHash() + this.IsDeleted.GetNullableHash() + this.ToIsDiscussion.GetNullableHash() + this.ToRemarks.GetNullableHash()
210
                + this.ToCreator.GetNullableHash() + this.ToCapture.GetNullableHash() + this.ToIsMarkup.GetNullableHash()
211
                + this.FrReviewStatus.GetNullableHash() + this.FrRemarks.GetNullableHash() + this.FrCreator.GetNullableHash()
212
                + this.FrCapture.GetNullableHash() + this.FrIsMarkup.GetNullableHash() + this.IsID2Work.GetNullableHash() + this.ID2Connection.GetNullableHash()
213
                + this.ID2StartDate.GetNullableHash() + this.ID2EndDate.GetNullableHash() + this.ID2JobTime.GetNullableHash() + this.ID2Status.GetNullableHash()
214
                + this.ID2Issues.GetNullableHash() + this.AVEVAConnection.GetNullableHash() + this.AVEVAConvertDate.GetNullableHash() + this.AVEVAReviewDate.GetNullableHash()
215
                + this.AVEVAStatus.GetNullableHash() + this.AVEVAIssues.GetNullableHash() + this.ReviewFilePath.GetNullableHash() + this.ReviewFileName.GetNullableHash()
216
                + this.ProdReviewer.GetNullableHash() + this.ProdIsResult.GetNullableHash() + this.ProdRemarks.GetNullableHash() + this.ClientReviewer.GetNullableHash()
217
                + this.ClientIsResult.GetNullableHash() + this.ClientRemarks.GetNullableHash() + this.DTIsGateWay.GetNullableHash() + this.DTIsImport.GetNullableHash()
218
                + this.DTIsRegSystem.GetNullableHash() + this.DTRemarks.GetNullableHash()
219
                + this.Markups.GetNullableHash();
220
        }
221

    
222
        public class DocumentsKeyComparer : IEqualityComparer<Documents>
223
        {
224
            public bool Equals(Documents x, Documents y)
225
            {
226
                if (x == null && y == null)
227
                    return true;
228
                else if (x == null || y == null)
229
                    return false;
230
                else
231
                {
232
                    return x.DocID == y.DocID;
233
                }
234
            }
235

    
236
            public int GetHashCode(Documents obj)
237
            {
238
                return (obj.DocID != null ? obj.DocID.GetHashCode() : 0);
239
            }
240
        }
241
    }
242

    
243
    [DataContract]
244
    public class ID2Drawings
245
    {
246
        [DataMember]
247
        public string PROJECTNAME { get; set; }
248
        [DataMember]
249
        public string UID { get; set; }
250
        [DataMember]
251
        public string NAME { get; set; }
252
        [DataMember]
253
        public string DOCNAME { get; set; }
254
        [DataMember]
255
        public DateTime? DATETIME { get; set; }
256
        [DataMember]
257
        public string OCCUPIED { get; set; }
258
        [DataMember]
259
        public byte[] Image { get; set; }
260
    }
261

    
262
    public class DocumentsResult
263
    {
264
        public List<Documents> Dwgs { get; set; }
265
        public int TotalCount { get; set; }
266
    }
267
}
클립보드 이미지 추가 (최대 크기: 500 MB)