1 |
787a4489
|
KangIngu
|
using KCOMDataModel.Common;
|
2 |
|
|
using KCOMDataModel.DataModel;
|
3 |
|
|
using System;
|
4 |
|
|
using System.Collections.Generic;
|
5 |
|
|
using System.Collections.ObjectModel;
|
6 |
|
|
using System.Linq;
|
7 |
|
|
using System.Text;
|
8 |
|
|
using System.Windows;
|
9 |
|
|
using System.Windows.Controls;
|
10 |
|
|
using System.Windows.Data;
|
11 |
|
|
using System.Windows.Documents;
|
12 |
|
|
using System.Windows.Input;
|
13 |
|
|
using System.Windows.Media;
|
14 |
|
|
using System.Windows.Media.Imaging;
|
15 |
|
|
using System.Windows.Navigation;
|
16 |
|
|
using System.Windows.Shapes;
|
17 |
|
|
using Telerik.Windows.Controls;
|
18 |
|
|
using KCOM.Common.Converter;
|
19 |
|
|
using System.ComponentModel;
|
20 |
|
|
using Telerik.Windows.Controls.GridView;
|
21 |
|
|
using KCOM.Controls;
|
22 |
|
|
using KCOM.Common;
|
23 |
|
|
using IKCOM;
|
24 |
|
|
using Excel = Microsoft.Office.Interop.Excel;
|
25 |
24a3178d
|
djkim
|
using System.Text.RegularExpressions;
|
26 |
787a4489
|
KangIngu
|
|
27 |
|
|
namespace KCOM.Controls
|
28 |
|
|
{
|
29 |
|
|
|
30 |
|
|
#region Customer
|
31 |
|
|
public class Customer
|
32 |
|
|
{
|
33 |
|
|
public string ID { get; set; }
|
34 |
|
|
public string DOCUMENT_ID { get; set; }
|
35 |
|
|
public string USER_ID { get; set; }
|
36 |
|
|
public string REVISION { get; set; }
|
37 |
|
|
public int PAGENUMBER { get; set; }
|
38 |
|
|
public string TODOLIST { get; set; }
|
39 |
|
|
public string IMAGE_URL { get; set; }
|
40 |
|
|
public string STATUS { get; set; }
|
41 |
|
|
public string STATUS_ { get; set; }
|
42 |
|
|
public string _STATUS { get; set; }
|
43 |
|
|
public string VENDOR { get; set; }
|
44 |
|
|
public string REMARK { get; set; }
|
45 |
|
|
public string PROJECT_NO { get; set; }
|
46 |
|
|
public string REV_19 { get; set; }
|
47 |
|
|
public string REV_18 { get; set; }
|
48 |
|
|
public string REV_17 { get; set; }
|
49 |
|
|
public string REV_16 { get; set; }
|
50 |
|
|
public string REV_15 { get; set; }
|
51 |
|
|
public string REV_14 { get; set; }
|
52 |
|
|
public string REV_13 { get; set; }
|
53 |
|
|
public string REV_12 { get; set; }
|
54 |
|
|
public string REV_11 { get; set; }
|
55 |
|
|
public string REV_10 { get; set; }
|
56 |
|
|
public string REV_9 { get; set; }
|
57 |
|
|
public string REV_8 { get; set; }
|
58 |
|
|
public string REV_7 { get; set; }
|
59 |
|
|
public string REV_6 { get; set; }
|
60 |
|
|
public string REV_5 { get; set; }
|
61 |
|
|
public string REV_4 { get; set; }
|
62 |
|
|
public string REV_3 { get; set; }
|
63 |
|
|
public string REV_2 { get; set; }
|
64 |
|
|
public string REV_1 { get; set; }
|
65 |
|
|
public string REV_0 { get; set; }
|
66 |
|
|
public string IMAGE_ANCHOR { get; set; }
|
67 |
|
|
public byte[] IMAGE_PATH { get; set; }
|
68 |
|
|
public string STATUS_DESC { get; set; }
|
69 |
|
|
public string REPLY { get; set; }
|
70 |
|
|
public DateTime CREATE_TIME { get; set; }
|
71 |
90e7968d
|
ljiyeon
|
}
|
72 |
787a4489
|
KangIngu
|
#endregion
|
73 |
|
|
|
74 |
|
|
/// <summary>
|
75 |
|
|
/// Interaction logic for CheckList.xaml
|
76 |
|
|
/// </summary>
|
77 |
|
|
public partial class CheckList : UserControl
|
78 |
|
|
{
|
79 |
|
|
#region 프로퍼티
|
80 |
|
|
List<CHECK_LIST> items = new List<CHECK_LIST>();
|
81 |
|
|
List<Customer> Lists = new List<Customer>();
|
82 |
53880c83
|
ljiyeon
|
//string old_Revision = "";
|
83 |
787a4489
|
KangIngu
|
string old_DocID = "";
|
84 |
|
|
string Current_Revision = "";
|
85 |
53880c83
|
ljiyeon
|
//string Current_DocNo = "";
|
86 |
|
|
//string Current_Slip = "";
|
87 |
787a4489
|
KangIngu
|
bool Isinit = false;
|
88 |
|
|
int rev_cnt = 1;
|
89 |
69ef0800
|
KangIngu
|
bool isCheck_Status = false;
|
90 |
|
|
string Select_StatusID = "";
|
91 |
787a4489
|
KangIngu
|
#endregion
|
92 |
|
|
|
93 |
|
|
#region 생성자
|
94 |
|
|
public CheckList()
|
95 |
|
|
{
|
96 |
|
|
Common.ViewerDataModel.Instance.ViewVisible = Visibility.Visible;
|
97 |
|
|
InitializeComponent();
|
98 |
|
|
this.Loaded += CheckList_Loaded;
|
99 |
|
|
this.KeyDown += new KeyEventHandler(KeyEventDownAction);
|
100 |
|
|
this.AddHandler(Image.MouseLeftButtonDownEvent, new MouseButtonEventHandler(mousedownOnImage), true);
|
101 |
90e7968d
|
ljiyeon
|
|
102 |
787a4489
|
KangIngu
|
}
|
103 |
|
|
#endregion
|
104 |
|
|
|
105 |
|
|
public void DataBind()
|
106 |
|
|
{
|
107 |
24a3178d
|
djkim
|
try
|
108 |
|
|
{
|
109 |
|
|
Isinit = false;
|
110 |
0f065e57
|
ljiyeon
|
|
111 |
24a3178d
|
djkim
|
Lists = new List<Customer>();
|
112 |
|
|
string doc_no = (Application.Current.MainWindow as MainWindow).dzMainMenu._DocItem.DOCUMENT_NO;
|
113 |
|
|
string project_no = App.ViewInfo.ProjectNO;
|
114 |
|
|
string user_id = App.ViewInfo.UserID;
|
115 |
|
|
|
116 |
|
|
Logger.sendReqLog("GetUserCheckList: ", project_no + "," + user_id + "," + doc_no, 1);
|
117 |
|
|
|
118 |
|
|
items = Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.BaseClient.GetUserCheckList(project_no, user_id, doc_no);
|
119 |
|
|
if (items.Count() > 0)
|
120 |
|
|
{
|
121 |
|
|
Logger.sendResLog("GetUserCheckList", "TRUE", 1);
|
122 |
|
|
}
|
123 |
|
|
else
|
124 |
|
|
{
|
125 |
|
|
Logger.sendResLog("GetUserCheckList", "FALSE", 1);
|
126 |
|
|
}
|
127 |
0f065e57
|
ljiyeon
|
|
128 |
6c781c0c
|
djkim
|
foreach (var item in items)
|
129 |
787a4489
|
KangIngu
|
{
|
130 |
6c781c0c
|
djkim
|
Customer customer = new Customer();
|
131 |
|
|
customer.ID = item.ID;
|
132 |
|
|
customer.IMAGE_ANCHOR = item.IMAGE_ANCHOR;
|
133 |
|
|
if (item.IMAGE_URL != null && item.IMAGE_URL != "")
|
134 |
|
|
customer.IMAGE_PATH = Convert.FromBase64String(item.IMAGE_URL);
|
135 |
|
|
customer.PAGENUMBER = item.PAGENUMBER;
|
136 |
|
|
customer.PROJECT_NO = item.PROJECT_NO;
|
137 |
|
|
customer.REMARK = item.REMARK;
|
138 |
|
|
customer.REVISION = item.REVISION;
|
139 |
|
|
|
140 |
|
|
#region history
|
141 |
24a3178d
|
djkim
|
Logger.sendReqLog("GetCheckListHistory: ", project_no + "," + item.ID, 1);
|
142 |
0f065e57
|
ljiyeon
|
var history = Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.BaseClient.GetCheckListHistory(project_no, item.ID);
|
143 |
|
|
|
144 |
|
|
if (history.Count() > 0)
|
145 |
|
|
{
|
146 |
|
|
Logger.sendResLog("GetCheckListHistory", "TRUE", 1);
|
147 |
|
|
}
|
148 |
|
|
else
|
149 |
|
|
{
|
150 |
|
|
Logger.sendResLog("GetCheckListHistory", "FALSE", 1);
|
151 |
|
|
}
|
152 |
|
|
|
153 |
6c781c0c
|
djkim
|
foreach (var rev in history)
|
154 |
787a4489
|
KangIngu
|
{
|
155 |
6c781c0c
|
djkim
|
if (rev.REVISION == "A")
|
156 |
|
|
{ customer.REV_0 = rev.STATUS + "" + rev.CREATE_TIME.ToString("yyyy.MM.dd"); }
|
157 |
|
|
if (rev.REVISION == "B")
|
158 |
|
|
{ customer.REV_1 = rev.STATUS + "" + rev.CREATE_TIME.ToString("yyyy.MM.dd"); rev_cnt = rev_cnt < 2 ? 2 : rev_cnt; }
|
159 |
|
|
if (rev.REVISION == "C")
|
160 |
|
|
{ customer.REV_2 = rev.STATUS + "" + rev.CREATE_TIME.ToString("yyyy.MM.dd"); rev_cnt = rev_cnt < 3 ? 3 : rev_cnt; }
|
161 |
|
|
if (rev.REVISION == "D")
|
162 |
|
|
{ customer.REV_3 = rev.STATUS + "" + rev.CREATE_TIME.ToString("yyyy.MM.dd"); rev_cnt = rev_cnt < 4 ? 4 : rev_cnt; }
|
163 |
|
|
if (rev.REVISION == "E")
|
164 |
|
|
{ customer.REV_4 = rev.STATUS + "" + rev.CREATE_TIME.ToString("yyyy.MM.dd"); rev_cnt = rev_cnt < 5 ? 5 : rev_cnt; }
|
165 |
|
|
if (rev.REVISION == "F")
|
166 |
|
|
{ customer.REV_5 = rev.STATUS + "" + rev.CREATE_TIME.ToString("yyyy.MM.dd"); rev_cnt = rev_cnt < 6 ? 6 : rev_cnt; }
|
167 |
|
|
if (rev.REVISION == "G")
|
168 |
|
|
{ customer.REV_6 = rev.STATUS + "" + rev.CREATE_TIME.ToString("yyyy.MM.dd"); rev_cnt = rev_cnt < 7 ? 7 : rev_cnt; }
|
169 |
|
|
if (rev.REVISION == "H")
|
170 |
|
|
{ customer.REV_7 = rev.STATUS + "" + rev.CREATE_TIME.ToString("yyyy.MM.dd"); rev_cnt = rev_cnt < 8 ? 8 : rev_cnt; }
|
171 |
|
|
if (rev.REVISION == "I")
|
172 |
|
|
{ customer.REV_8 = rev.STATUS + "" + rev.CREATE_TIME.ToString("yyyy.MM.dd"); rev_cnt = rev_cnt < 9 ? 9 : rev_cnt; }
|
173 |
|
|
if (rev.REVISION == "J")
|
174 |
|
|
{ customer.REV_9 = rev.STATUS + "" + rev.CREATE_TIME.ToString("yyyy.MM.dd"); rev_cnt = rev_cnt < 10 ? 10 : rev_cnt; }
|
175 |
|
|
if (rev.REVISION == "K")
|
176 |
|
|
{ customer.REV_10 = rev.STATUS + "" + rev.CREATE_TIME.ToString("yyyy.MM.dd"); rev_cnt = rev_cnt < 11 ? 11 : rev_cnt; }
|
177 |
|
|
if (rev.REVISION == "L")
|
178 |
|
|
{ customer.REV_11 = rev.STATUS + "" + rev.CREATE_TIME.ToString("yyyy.MM.dd"); rev_cnt = rev_cnt < 12 ? 12 : rev_cnt; }
|
179 |
|
|
if (rev.REVISION == "M")
|
180 |
|
|
{ customer.REV_12 = rev.STATUS + "" + rev.CREATE_TIME.ToString("yyyy.MM.dd"); rev_cnt = rev_cnt < 13 ? 13 : rev_cnt; }
|
181 |
|
|
if (rev.REVISION == "N")
|
182 |
|
|
{ customer.REV_13 = rev.STATUS + "" + rev.CREATE_TIME.ToString("yyyy.MM.dd"); rev_cnt = rev_cnt < 14 ? 14 : rev_cnt; }
|
183 |
|
|
if (rev.REVISION == "O")
|
184 |
|
|
{ customer.REV_14 = rev.STATUS + "" + rev.CREATE_TIME.ToString("yyyy.MM.dd"); rev_cnt = rev_cnt < 15 ? 15 : rev_cnt; }
|
185 |
|
|
if (rev.REVISION == "P")
|
186 |
|
|
{ customer.REV_15 = rev.STATUS + "" + rev.CREATE_TIME.ToString("yyyy.MM.dd"); rev_cnt = rev_cnt < 16 ? 16 : rev_cnt; }
|
187 |
|
|
if (rev.REVISION == "Q")
|
188 |
|
|
{ customer.REV_16 = rev.STATUS + "" + rev.CREATE_TIME.ToString("yyyy.MM.dd"); rev_cnt = rev_cnt < 17 ? 17 : rev_cnt; }
|
189 |
|
|
if (rev.REVISION == "R")
|
190 |
|
|
{ customer.REV_17 = rev.STATUS + "" + rev.CREATE_TIME.ToString("yyyy.MM.dd"); rev_cnt = rev_cnt < 18 ? 18 : rev_cnt; }
|
191 |
|
|
if (rev.REVISION == "S")
|
192 |
|
|
{ customer.REV_18 = rev.STATUS + "" + rev.CREATE_TIME.ToString("yyyy.MM.dd"); rev_cnt = rev_cnt < 19 ? 19 : rev_cnt; }
|
193 |
|
|
if (rev.REVISION == "T")
|
194 |
|
|
{ customer.REV_19 = rev.STATUS + "" + rev.CREATE_TIME.ToString("yyyy.MM.dd"); rev_cnt = rev_cnt < 20 ? 20 : rev_cnt; }
|
195 |
|
|
}
|
196 |
|
|
#endregion
|
197 |
787a4489
|
KangIngu
|
|
198 |
6c781c0c
|
djkim
|
customer.STATUS = item.STATUS;
|
199 |
|
|
customer.REPLY = item.REPLY;
|
200 |
|
|
customer.TODOLIST = item.TODOLIST;
|
201 |
|
|
customer.USER_ID = item.USER_ID;
|
202 |
|
|
customer.VENDOR = item.VENDOR;
|
203 |
|
|
customer.DOCUMENT_ID = item.DOCUMENT_ID;
|
204 |
|
|
customer.CREATE_TIME = DateTime.Parse(item.CREATE_TIME.ToString());
|
205 |
787a4489
|
KangIngu
|
|
206 |
6c781c0c
|
djkim
|
if (item.STATUS == "True")
|
207 |
|
|
{
|
208 |
|
|
customer._STATUS = "Close";
|
209 |
|
|
customer.STATUS_ = "False";
|
210 |
|
|
customer.STATUS_DESC = item.STATUS_DESC_CLOSE;
|
211 |
787a4489
|
KangIngu
|
}
|
212 |
6c781c0c
|
djkim
|
else
|
213 |
|
|
{
|
214 |
|
|
customer._STATUS = "Open";
|
215 |
|
|
customer.STATUS_ = "True";
|
216 |
|
|
customer.STATUS_DESC = item.STATUS_DESC_OPEN;
|
217 |
|
|
}
|
218 |
|
|
|
219 |
|
|
Lists.Add(customer);
|
220 |
787a4489
|
KangIngu
|
}
|
221 |
24a3178d
|
djkim
|
}
|
222 |
|
|
catch (Exception ex)
|
223 |
|
|
{
|
224 |
|
|
Logger.sendResLog("Checklist DataBind", ex.Message, 0);
|
225 |
|
|
}
|
226 |
|
|
|
227 |
|
|
|
228 |
787a4489
|
KangIngu
|
}
|
229 |
|
|
|
230 |
|
|
private void ChangeSize(double width, double height)
|
231 |
|
|
{
|
232 |
|
|
this.Width = width;
|
233 |
|
|
this.Height = height;
|
234 |
|
|
}
|
235 |
|
|
|
236 |
|
|
private void SyncInit()
|
237 |
|
|
{
|
238 |
24a3178d
|
djkim
|
try
|
239 |
787a4489
|
KangIngu
|
{
|
240 |
24a3178d
|
djkim
|
if (!ViewerDataModel.Instance.SystemMain.dzMainMenu.testPanel2.IsHidden)
|
241 |
|
|
{
|
242 |
|
|
ViewerDataModel.Instance.SystemMain.dzMainMenu.testPanel2.IsHidden = true;
|
243 |
|
|
ViewerDataModel.Instance.PageBalanceMode = false;
|
244 |
|
|
ViewerDataModel.Instance.PageBalanceNumber = 0;
|
245 |
|
|
ViewerDataModel.Instance.PageNumber = 0;
|
246 |
|
|
ViewerDataModel.Instance.MarkupControls_Sync.Clear();
|
247 |
|
|
ViewerDataModel.Instance.SystemMain.dzMainMenu.gridViewRevMarkup.Visibility = Visibility.Collapsed;
|
248 |
|
|
ViewerDataModel.Instance.SystemMain.dzMainMenu.UserList.IsChecked = false;
|
249 |
|
|
ViewerDataModel.Instance.SystemMain.dzMainMenu.BalanceMode.IsChecked = false;
|
250 |
|
|
}
|
251 |
787a4489
|
KangIngu
|
}
|
252 |
90e7968d
|
ljiyeon
|
catch(Exception ex)
|
253 |
24a3178d
|
djkim
|
{
|
254 |
|
|
Logger.sendResLog("SyncInit", ex.Message, 0);
|
255 |
|
|
}
|
256 |
90e7968d
|
ljiyeon
|
|
257 |
787a4489
|
KangIngu
|
}
|
258 |
|
|
|
259 |
|
|
private void DialogMessage_Alert(string Msg)
|
260 |
|
|
{
|
261 |
24a3178d
|
djkim
|
try
|
262 |
|
|
{
|
263 |
|
|
RadWindow CheckPop = new RadWindow();
|
264 |
|
|
Alert check = new Alert(Msg);
|
265 |
787a4489
|
KangIngu
|
|
266 |
24a3178d
|
djkim
|
CheckPop = new RadWindow
|
267 |
|
|
{
|
268 |
|
|
MinWidth = 400,
|
269 |
|
|
MinHeight = 100,
|
270 |
|
|
//Closed = (obj, args) => this.MarkupNamePromptClose(MarkupData, args),
|
271 |
|
|
Header = "Alert",
|
272 |
|
|
Content = check,
|
273 |
|
|
ResizeMode = System.Windows.ResizeMode.NoResize,
|
274 |
|
|
WindowStartupLocation = System.Windows.WindowStartupLocation.CenterScreen,
|
275 |
|
|
IsTopmost = true,
|
276 |
|
|
};
|
277 |
|
|
StyleManager.SetTheme(CheckPop, new Office2013Theme());
|
278 |
|
|
CheckPop.ShowDialog();
|
279 |
|
|
}
|
280 |
|
|
catch (Exception ex)
|
281 |
787a4489
|
KangIngu
|
{
|
282 |
24a3178d
|
djkim
|
Logger.sendResLog("DialogMessage_Alert", ex.Message, 0);
|
283 |
|
|
}
|
284 |
|
|
|
285 |
787a4489
|
KangIngu
|
}
|
286 |
|
|
|
287 |
|
|
private void History_Set()
|
288 |
|
|
{
|
289 |
24a3178d
|
djkim
|
try
|
290 |
787a4489
|
KangIngu
|
{
|
291 |
24a3178d
|
djkim
|
if (col1.Width != new GridLength(1200))
|
292 |
|
|
{
|
293 |
|
|
Col_Remark.IsVisible = true;
|
294 |
|
|
Col_Reply.IsVisible = true;
|
295 |
|
|
Col_Vendor.IsVisible = true;
|
296 |
787a4489
|
KangIngu
|
|
297 |
24a3178d
|
djkim
|
if (Lists.Where(info => info.REV_1 != null).FirstOrDefault() != null)
|
298 |
|
|
REV_1.IsVisible = true;
|
299 |
787a4489
|
KangIngu
|
|
300 |
24a3178d
|
djkim
|
#region history
|
301 |
|
|
REV_0.IsVisible = true;
|
302 |
|
|
if (Lists.Where(info => info.REV_1 != null).FirstOrDefault() != null)
|
303 |
787a4489
|
KangIngu
|
{ REV_1.IsVisible = true; REV_0.Width = 70; }
|
304 |
24a3178d
|
djkim
|
else
|
305 |
|
|
{ REV_0.Width = 140; }
|
306 |
|
|
if (Lists.Where(info => info.REV_2 != null).FirstOrDefault() != null)
|
307 |
|
|
REV_2.IsVisible = true; REV_2.IsVisible = true;
|
308 |
|
|
if (Lists.Where(info => info.REV_3 != null).FirstOrDefault() != null)
|
309 |
|
|
REV_3.IsVisible = true;
|
310 |
|
|
if (Lists.Where(info => info.REV_4 != null).FirstOrDefault() != null)
|
311 |
|
|
REV_4.IsVisible = true;
|
312 |
|
|
if (Lists.Where(info => info.REV_5 != null).FirstOrDefault() != null)
|
313 |
|
|
REV_5.IsVisible = true;
|
314 |
|
|
if (Lists.Where(info => info.REV_6 != null).FirstOrDefault() != null)
|
315 |
|
|
REV_6.IsVisible = true;
|
316 |
|
|
if (Lists.Where(info => info.REV_7 != null).FirstOrDefault() != null)
|
317 |
|
|
REV_7.IsVisible = true;
|
318 |
|
|
if (Lists.Where(info => info.REV_8 != null).FirstOrDefault() != null)
|
319 |
|
|
REV_8.IsVisible = true;
|
320 |
|
|
if (Lists.Where(info => info.REV_9 != null).FirstOrDefault() != null)
|
321 |
|
|
REV_9.IsVisible = true;
|
322 |
|
|
if (Lists.Where(info => info.REV_10 != null).FirstOrDefault() != null)
|
323 |
|
|
REV_10.IsVisible = true;
|
324 |
|
|
if (Lists.Where(info => info.REV_11 != null).FirstOrDefault() != null)
|
325 |
|
|
REV_11.IsVisible = true;
|
326 |
|
|
if (Lists.Where(info => info.REV_12 != null).FirstOrDefault() != null)
|
327 |
|
|
REV_12.IsVisible = true;
|
328 |
|
|
if (Lists.Where(info => info.REV_13 != null).FirstOrDefault() != null)
|
329 |
|
|
REV_13.IsVisible = true;
|
330 |
|
|
if (Lists.Where(info => info.REV_14 != null).FirstOrDefault() != null)
|
331 |
|
|
REV_14.IsVisible = true;
|
332 |
|
|
if (Lists.Where(info => info.REV_15 != null).FirstOrDefault() != null)
|
333 |
|
|
REV_15.IsVisible = true;
|
334 |
|
|
if (Lists.Where(info => info.REV_16 != null).FirstOrDefault() != null)
|
335 |
|
|
REV_16.IsVisible = true;
|
336 |
|
|
if (Lists.Where(info => info.REV_17 != null).FirstOrDefault() != null)
|
337 |
|
|
REV_17.IsVisible = true;
|
338 |
|
|
if (Lists.Where(info => info.REV_18 != null).FirstOrDefault() != null)
|
339 |
|
|
REV_18.IsVisible = true;
|
340 |
|
|
if (Lists.Where(info => info.REV_19 != null).FirstOrDefault() != null)
|
341 |
|
|
REV_19.IsVisible = true;
|
342 |
|
|
#endregion
|
343 |
|
|
|
344 |
|
|
}
|
345 |
787a4489
|
KangIngu
|
else
|
346 |
24a3178d
|
djkim
|
{
|
347 |
|
|
Col_Remark.IsVisible = false;
|
348 |
|
|
Col_Reply.IsVisible = false;
|
349 |
|
|
Col_Vendor.IsVisible = false;
|
350 |
787a4489
|
KangIngu
|
|
351 |
24a3178d
|
djkim
|
#region history
|
352 |
|
|
REV_0.IsVisible = false;
|
353 |
|
|
REV_1.IsVisible = false;
|
354 |
|
|
REV_2.IsVisible = false;
|
355 |
|
|
REV_3.IsVisible = false;
|
356 |
|
|
REV_4.IsVisible = false;
|
357 |
|
|
REV_5.IsVisible = false;
|
358 |
|
|
REV_6.IsVisible = false;
|
359 |
|
|
REV_7.IsVisible = false;
|
360 |
|
|
REV_8.IsVisible = false;
|
361 |
|
|
REV_9.IsVisible = false;
|
362 |
|
|
REV_10.IsVisible = false;
|
363 |
|
|
REV_11.IsVisible = false;
|
364 |
|
|
REV_12.IsVisible = false;
|
365 |
|
|
REV_13.IsVisible = false;
|
366 |
|
|
REV_14.IsVisible = false;
|
367 |
|
|
REV_15.IsVisible = false;
|
368 |
|
|
REV_16.IsVisible = false;
|
369 |
|
|
REV_17.IsVisible = false;
|
370 |
|
|
REV_18.IsVisible = false;
|
371 |
|
|
REV_19.IsVisible = false;
|
372 |
|
|
#endregion
|
373 |
|
|
}
|
374 |
787a4489
|
KangIngu
|
}
|
375 |
24a3178d
|
djkim
|
catch (Exception ex)
|
376 |
787a4489
|
KangIngu
|
{
|
377 |
24a3178d
|
djkim
|
Logger.sendResLog("History_Set", ex.Message, 0);
|
378 |
787a4489
|
KangIngu
|
}
|
379 |
24a3178d
|
djkim
|
|
380 |
787a4489
|
KangIngu
|
}
|
381 |
|
|
|
382 |
|
|
#region Excel Export
|
383 |
|
|
|
384 |
|
|
private void ExportEvent(object sender, RoutedEventArgs e)
|
385 |
|
|
{
|
386 |
24a3178d
|
djkim
|
try
|
387 |
787a4489
|
KangIngu
|
{
|
388 |
24a3178d
|
djkim
|
if ((Application.Current.MainWindow as MainWindow).dzMainMenu.mouseHandlingMode == MouseHandlingMode.Capture)
|
389 |
|
|
{
|
390 |
|
|
DialogMessage_Alert("Capture중 입니다.");
|
391 |
|
|
return;
|
392 |
|
|
}
|
393 |
|
|
this.ExportIndy.IsBusy = true;
|
394 |
787a4489
|
KangIngu
|
|
395 |
24a3178d
|
djkim
|
if (Lists.Count == 0)
|
396 |
787a4489
|
KangIngu
|
{
|
397 |
24a3178d
|
djkim
|
DialogMessage_Alert("Data Not Found");
|
398 |
|
|
this.ExportIndy.IsBusy = false;
|
399 |
|
|
return;
|
400 |
|
|
}
|
401 |
787a4489
|
KangIngu
|
|
402 |
24a3178d
|
djkim
|
string extension = "xlsx";
|
403 |
84c48033
|
djkim
|
string excelpath = CommonLib.Common.GetConfigString("excelFilePath", "URL", "", App.isExternal);
|
404 |
b7637656
|
djkim
|
Uri url = new Uri(excelpath);
|
405 |
787a4489
|
KangIngu
|
|
406 |
24a3178d
|
djkim
|
System.Windows.Forms.SaveFileDialog dialog = new System.Windows.Forms.SaveFileDialog()
|
407 |
|
|
{
|
408 |
|
|
DefaultExt = extension,
|
409 |
|
|
Filter = String.Format("{1} files (*.{0})|*.{0}|All files (*.*)|*.*", extension, "Excel"),
|
410 |
|
|
FilterIndex = 1
|
411 |
|
|
};
|
412 |
787a4489
|
KangIngu
|
|
413 |
24a3178d
|
djkim
|
if (dialog.ShowDialog() == System.Windows.Forms.DialogResult.OK)
|
414 |
|
|
{
|
415 |
|
|
using (var client = new System.Net.WebClient())
|
416 |
|
|
{
|
417 |
|
|
client.DownloadFile(url, dialog.FileName);
|
418 |
787a4489
|
KangIngu
|
|
419 |
24a3178d
|
djkim
|
Excel.Application application = null;
|
420 |
|
|
Excel.Workbook workbook = null;
|
421 |
|
|
Excel.Worksheet worksheet = null;
|
422 |
787a4489
|
KangIngu
|
|
423 |
24a3178d
|
djkim
|
try
|
424 |
787a4489
|
KangIngu
|
{
|
425 |
24a3178d
|
djkim
|
// Excel 첫번째 워크시트 가져오기
|
426 |
|
|
application = new Excel.Application();
|
427 |
|
|
workbook = application.Workbooks.Open(dialog.FileName);
|
428 |
|
|
worksheet = (Excel.Worksheet)workbook.Worksheets.get_Item("Sheet1");
|
429 |
|
|
|
430 |
|
|
// 데이타 넣기
|
431 |
|
|
int h = 9;
|
432 |
|
|
int w = 2;
|
433 |
|
|
string project_no = App.ViewInfo.ProjectNO;
|
434 |
|
|
worksheet.Cells[2, w + 8] = project_no;
|
435 |
|
|
Logger.sendReqLog("GetProjectName: ", project_no, 1);
|
436 |
|
|
|
437 |
|
|
string project_name = Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.BaseClient.GetProjectName(project_no);
|
438 |
|
|
if (project_name != null || project_name != "")
|
439 |
|
|
{
|
440 |
|
|
Logger.sendResLog("GetProjectName", "TRUE", 1);
|
441 |
|
|
}
|
442 |
|
|
else
|
443 |
|
|
{
|
444 |
|
|
Logger.sendResLog("GetProjectName", "FALSE", 1);
|
445 |
|
|
}
|
446 |
|
|
worksheet.Cells[3, w + 8] = project_name;
|
447 |
787a4489
|
KangIngu
|
|
448 |
24a3178d
|
djkim
|
worksheet.Cells[4, w + 8] = (Application.Current.MainWindow as MainWindow).dzMainMenu._DocItem.DOCUMENT_NO;
|
449 |
|
|
worksheet.Cells[5, w + 8] = (Application.Current.MainWindow as MainWindow).dzMainMenu.userData.NAME + " (" + App.ViewInfo.UserID + ")";
|
450 |
|
|
worksheet.Cells[6, w + 8] = DateTime.Now.ToString("yyyy.MM.dd");
|
451 |
787a4489
|
KangIngu
|
|
452 |
24a3178d
|
djkim
|
Excel.Range Range_I = worksheet.Range["K9"];
|
453 |
|
|
Excel.Range Range_O = null;
|
454 |
|
|
Excel.Borders border_ = null;
|
455 |
787a4489
|
KangIngu
|
|
456 |
24a3178d
|
djkim
|
var Rev = Lists.Select(info => info.REVISION).Distinct();
|
457 |
|
|
string[] Cell = { "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T" };
|
458 |
|
|
string[] Range = { "L9", "M9", "N9", "O9", "P9", "Q9", "R9", "S9", "T9", "U9", "V9", "W9", "X9", "Y9", "Z9", "AA9", "AB9", "AC9", "AD9" };
|
459 |
|
|
string Ran = "K";
|
460 |
787a4489
|
KangIngu
|
|
461 |
24a3178d
|
djkim
|
for (int i = 0; i < rev_cnt - 1; i++)
|
462 |
|
|
{
|
463 |
|
|
worksheet.Cells[9, 12 + i] = Cell[i];
|
464 |
|
|
Range_O = worksheet.Range[Range[i]];
|
465 |
|
|
border_ = Range_O.Borders;
|
466 |
|
|
border_.LineStyle = Range_I.Borders.LineStyle;
|
467 |
|
|
border_.Weight = Range_I.Borders.Weight;
|
468 |
|
|
Range_O.Interior.Color = Range_I.Interior.Color;
|
469 |
|
|
}
|
470 |
787a4489
|
KangIngu
|
|
471 |
24a3178d
|
djkim
|
worksheet.Range[worksheet.Cells[8, 11], worksheet.Cells[8, 11 + rev_cnt - 1]].Merge();
|
472 |
787a4489
|
KangIngu
|
|
473 |
24a3178d
|
djkim
|
if (rev_cnt != 1)
|
474 |
787a4489
|
KangIngu
|
{
|
475 |
24a3178d
|
djkim
|
Ran = Range[rev_cnt - 2].Substring(0, Range[rev_cnt - 2].Length - 1);
|
476 |
|
|
}
|
477 |
|
|
Excel.Range iRange = worksheet.Range["B10:" + Ran + "10"];
|
478 |
787a4489
|
KangIngu
|
|
479 |
24a3178d
|
djkim
|
//필터 기능 추가
|
480 |
|
|
Excel.Range Filter_Range = worksheet.Range["B9:" + Ran + "9"];
|
481 |
|
|
Filter_Range.AutoFilter(1, Type.Missing, Excel.XlAutoFilterOperator.xlAnd, Type.Missing, true);
|
482 |
787a4489
|
KangIngu
|
|
483 |
24a3178d
|
djkim
|
Lists.ForEach(data =>
|
484 |
|
|
{
|
485 |
|
|
h++;
|
486 |
787a4489
|
KangIngu
|
|
487 |
24a3178d
|
djkim
|
Excel.Range oRange = worksheet.Range["B" + h + ":" + Ran + h];
|
488 |
|
|
oRange.RowHeight = iRange.RowHeight;
|
489 |
|
|
Excel.Borders border = oRange.Borders;
|
490 |
|
|
border.LineStyle = Excel.XlLineStyle.xlContinuous;
|
491 |
|
|
border.Weight = 2d;
|
492 |
787a4489
|
KangIngu
|
|
493 |
24a3178d
|
djkim
|
if (data.IMAGE_PATH != null)
|
494 |
787a4489
|
KangIngu
|
{
|
495 |
24a3178d
|
djkim
|
Excel.Range ImageRange = worksheet.Cells[h, w + 2];
|
496 |
|
|
|
497 |
|
|
System.Drawing.Image I_Image = byteArrayToImage(data.IMAGE_PATH);
|
498 |
|
|
System.Drawing.Image o_Image = Resize(I_Image, 80, 80);
|
499 |
|
|
System.Windows.Forms.Clipboard.SetDataObject(o_Image, true);
|
500 |
|
|
|
501 |
|
|
ImageRange.Cells.HorizontalAlignment = Excel.XlHAlign.xlHAlignCenterAcrossSelection;
|
502 |
|
|
ImageRange.Cells.VerticalAlignment = Excel.XlHAlign.xlHAlignCenter;
|
503 |
|
|
|
504 |
|
|
worksheet.Paste(ImageRange.Cells, "TEST");
|
505 |
787a4489
|
KangIngu
|
|
506 |
24a3178d
|
djkim
|
foreach (Microsoft.Office.Interop.Excel.Shape shp in worksheet.Shapes)
|
507 |
|
|
{
|
508 |
|
|
if (shp.TopLeftCell.Address != ImageRange.Address)
|
509 |
|
|
continue;
|
510 |
787a4489
|
KangIngu
|
|
511 |
24a3178d
|
djkim
|
double Left = shp.TopLeftCell.Left + (shp.TopLeftCell.Width - shp.Width) / 2;
|
512 |
|
|
double Top = shp.TopLeftCell.Top + (shp.TopLeftCell.Height - shp.Height) / 2;
|
513 |
787a4489
|
KangIngu
|
|
514 |
24a3178d
|
djkim
|
shp.Left = float.Parse(Left.ToString());
|
515 |
|
|
shp.Top = float.Parse(Top.ToString());
|
516 |
|
|
|
517 |
|
|
break;
|
518 |
|
|
}
|
519 |
787a4489
|
KangIngu
|
}
|
520 |
|
|
|
521 |
24a3178d
|
djkim
|
#region Excel Bind
|
522 |
|
|
worksheet.Cells[h, w] = data.REVISION;
|
523 |
|
|
worksheet.Cells[h, w + 1] = data.PAGENUMBER;
|
524 |
|
|
worksheet.Cells[h, w + 3] = data.TODOLIST;
|
525 |
|
|
worksheet.Cells[h, w + 4] = data.STATUS.ToUpper() == "TRUE" ? "closed" : "open";
|
526 |
|
|
worksheet.Cells[h, w + 5] = data.STATUS_DESC;
|
527 |
|
|
worksheet.Cells[h, w + 6] = data.VENDOR;
|
528 |
|
|
worksheet.Cells[h, w + 7] = data.REMARK;
|
529 |
|
|
worksheet.Cells[h, w + 8] = data.REPLY;
|
530 |
|
|
worksheet.Cells[h, w + 9] = data.REV_0 == null ? "" : data.REV_0.Replace("", " / ");
|
531 |
|
|
worksheet.Cells[h, w + 10] = data.REV_1 == null ? "" : data.REV_1.Replace("", " / ");
|
532 |
|
|
worksheet.Cells[h, w + 11] = data.REV_2 == null ? "" : data.REV_2.Replace("", " / ");
|
533 |
|
|
worksheet.Cells[h, w + 12] = data.REV_3 == null ? "" : data.REV_3.Replace("", " / ");
|
534 |
|
|
worksheet.Cells[h, w + 13] = data.REV_4 == null ? "" : data.REV_4.Replace("", " / ");
|
535 |
|
|
worksheet.Cells[h, w + 14] = data.REV_5 == null ? "" : data.REV_5.Replace("", " / ");
|
536 |
|
|
worksheet.Cells[h, w + 15] = data.REV_6 == null ? "" : data.REV_6.Replace("", " / ");
|
537 |
|
|
worksheet.Cells[h, w + 16] = data.REV_7 == null ? "" : data.REV_7.Replace("", " / ");
|
538 |
|
|
worksheet.Cells[h, w + 17] = data.REV_8 == null ? "" : data.REV_8.Replace("", " / ");
|
539 |
|
|
worksheet.Cells[h, w + 18] = data.REV_9 == null ? "" : data.REV_9.Replace("", " / ");
|
540 |
|
|
worksheet.Cells[h, w + 19] = data.REV_10 == null ? "" : data.REV_10.Replace("", " / ");
|
541 |
|
|
worksheet.Cells[h, w + 20] = data.REV_11 == null ? "" : data.REV_11.Replace("", " / ");
|
542 |
|
|
worksheet.Cells[h, w + 21] = data.REV_12 == null ? "" : data.REV_12.Replace("", " / ");
|
543 |
|
|
worksheet.Cells[h, w + 22] = data.REV_13 == null ? "" : data.REV_13.Replace("", " / ");
|
544 |
|
|
worksheet.Cells[h, w + 23] = data.REV_14 == null ? "" : data.REV_14.Replace("", " / ");
|
545 |
|
|
worksheet.Cells[h, w + 24] = data.REV_15 == null ? "" : data.REV_15.Replace("", " / ");
|
546 |
|
|
worksheet.Cells[h, w + 25] = data.REV_16 == null ? "" : data.REV_16.Replace("", " / ");
|
547 |
|
|
worksheet.Cells[h, w + 26] = data.REV_17 == null ? "" : data.REV_17.Replace("", " / ");
|
548 |
|
|
worksheet.Cells[h, w + 27] = data.REV_18 == null ? "" : data.REV_18.Replace("", " / ");
|
549 |
|
|
worksheet.Cells[h, w + 28] = data.REV_19 == null ? "" : data.REV_19.Replace("", " / ");
|
550 |
|
|
#endregion
|
551 |
|
|
});
|
552 |
|
|
|
553 |
|
|
worksheet.Columns.AutoFit();
|
554 |
|
|
// 엑셀파일 저장
|
555 |
|
|
workbook.Save();
|
556 |
|
|
workbook.Close(true);
|
557 |
|
|
application.Quit();
|
558 |
787a4489
|
KangIngu
|
}
|
559 |
24a3178d
|
djkim
|
finally
|
560 |
|
|
{
|
561 |
|
|
System.Diagnostics.Process[] ExCel = System.Diagnostics.Process.GetProcessesByName("EXCEL");
|
562 |
|
|
if (ExCel.Count() != 0)
|
563 |
|
|
{
|
564 |
|
|
ExCel[0].Kill();
|
565 |
|
|
}
|
566 |
787a4489
|
KangIngu
|
|
567 |
24a3178d
|
djkim
|
// Clean up
|
568 |
|
|
ReleaseExcelObject(worksheet);
|
569 |
|
|
ReleaseExcelObject(workbook);
|
570 |
|
|
ReleaseExcelObject(application);
|
571 |
|
|
}
|
572 |
787a4489
|
KangIngu
|
}
|
573 |
24a3178d
|
djkim
|
DialogMessage_Alert("Success");
|
574 |
787a4489
|
KangIngu
|
}
|
575 |
24a3178d
|
djkim
|
|
576 |
|
|
this.ExportIndy.IsBusy = false;
|
577 |
|
|
}
|
578 |
|
|
catch (Exception ex)
|
579 |
|
|
{
|
580 |
|
|
Logger.sendResLog("CheckList ExportEvent", ex.Message, 0);
|
581 |
787a4489
|
KangIngu
|
}
|
582 |
|
|
|
583 |
|
|
}
|
584 |
|
|
|
585 |
|
|
public System.Drawing.Image byteArrayToImage(byte[] byteArrayIn)
|
586 |
|
|
{
|
587 |
|
|
using (var ms = new System.IO.MemoryStream(byteArrayIn))
|
588 |
|
|
{
|
589 |
|
|
return System.Drawing.Image.FromStream(ms);
|
590 |
|
|
}
|
591 |
|
|
}
|
592 |
|
|
|
593 |
|
|
public System.Drawing.Image Resize(System.Drawing.Image image, int newWidth, int maxHeight)
|
594 |
|
|
{
|
595 |
|
|
//if (onlyResizeIfWider && image.Width <= newWidth) newWidth = image.Width;
|
596 |
|
|
|
597 |
24a3178d
|
djkim
|
try
|
598 |
787a4489
|
KangIngu
|
{
|
599 |
24a3178d
|
djkim
|
var newHeight = image.Height * newWidth / image.Width;
|
600 |
|
|
if (newHeight > maxHeight)
|
601 |
|
|
{
|
602 |
|
|
// Resize with height instead
|
603 |
|
|
newWidth = image.Width * maxHeight / image.Height;
|
604 |
|
|
newHeight = maxHeight;
|
605 |
|
|
}
|
606 |
787a4489
|
KangIngu
|
|
607 |
24a3178d
|
djkim
|
var res = new System.Drawing.Bitmap(newWidth, newHeight);
|
608 |
787a4489
|
KangIngu
|
|
609 |
24a3178d
|
djkim
|
using (var graphic = System.Drawing.Graphics.FromImage(res))
|
610 |
|
|
{
|
611 |
|
|
graphic.InterpolationMode = System.Drawing.Drawing2D.InterpolationMode.HighQualityBicubic;
|
612 |
|
|
graphic.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.HighQuality;
|
613 |
|
|
graphic.PixelOffsetMode = System.Drawing.Drawing2D.PixelOffsetMode.HighQuality;
|
614 |
|
|
graphic.CompositingQuality = System.Drawing.Drawing2D.CompositingQuality.HighQuality;
|
615 |
|
|
graphic.DrawImage(image, 0, 0, newWidth, newHeight);
|
616 |
|
|
}
|
617 |
|
|
return res;
|
618 |
|
|
}
|
619 |
|
|
catch (Exception ex)
|
620 |
787a4489
|
KangIngu
|
{
|
621 |
24a3178d
|
djkim
|
Logger.sendResLog("Resize", ex.Message, 0);
|
622 |
|
|
return null;
|
623 |
787a4489
|
KangIngu
|
}
|
624 |
90e7968d
|
ljiyeon
|
|
625 |
787a4489
|
KangIngu
|
|
626 |
90e7968d
|
ljiyeon
|
|
627 |
787a4489
|
KangIngu
|
}
|
628 |
|
|
|
629 |
|
|
private static void ReleaseExcelObject(object obj)
|
630 |
|
|
{
|
631 |
|
|
try
|
632 |
|
|
{
|
633 |
|
|
if (obj != null)
|
634 |
|
|
{
|
635 |
|
|
obj = null;
|
636 |
|
|
}
|
637 |
|
|
}
|
638 |
|
|
catch (Exception ex)
|
639 |
|
|
{
|
640 |
|
|
obj = null;
|
641 |
|
|
throw ex;
|
642 |
|
|
}
|
643 |
|
|
finally
|
644 |
|
|
{
|
645 |
|
|
GC.Collect();
|
646 |
|
|
}
|
647 |
|
|
}
|
648 |
|
|
|
649 |
|
|
#endregion
|
650 |
|
|
|
651 |
|
|
#region 이벤트
|
652 |
|
|
|
653 |
|
|
void MainWindow_SizeChanged(object sender, SizeChangedEventArgs e)
|
654 |
|
|
{
|
655 |
|
|
ChangeSize(e.NewSize.Width, e.NewSize.Height);
|
656 |
|
|
}
|
657 |
|
|
|
658 |
|
|
private void CheckList_Loaded(object sender, RoutedEventArgs e)
|
659 |
|
|
{
|
660 |
24a3178d
|
djkim
|
DataBind();
|
661 |
|
|
this.tb.ItemsSource = null;
|
662 |
|
|
this.tb.ItemsSource = Lists;
|
663 |
|
|
History_Set();
|
664 |
787a4489
|
KangIngu
|
}
|
665 |
90e7968d
|
ljiyeon
|
|
666 |
787a4489
|
KangIngu
|
private void RadGridView_Loaded(object sender, RoutedEventArgs e)
|
667 |
|
|
{
|
668 |
|
|
DataBind();
|
669 |
|
|
(sender as Telerik.Windows.Controls.RadGridView).ItemsSource = null;
|
670 |
|
|
(sender as Telerik.Windows.Controls.RadGridView).ItemsSource = Lists;
|
671 |
|
|
|
672 |
|
|
ChangeSize(this.ActualWidth, this.ActualHeight);
|
673 |
|
|
this.SizeChanged += new SizeChangedEventHandler(MainWindow_SizeChanged);
|
674 |
|
|
}
|
675 |
|
|
|
676 |
|
|
private void AddEvent(object sender, RoutedEventArgs e)
|
677 |
|
|
{
|
678 |
24a3178d
|
djkim
|
try
|
679 |
|
|
{
|
680 |
|
|
Application.Current.MainWindow.Focus();
|
681 |
|
|
|
682 |
24678e06
|
humkyung
|
Common.ViewerDataModel.Instance.CheckList_ID = Commons.shortGuid();
|
683 |
24a3178d
|
djkim
|
Common.ViewerDataModel.Instance.Capture_Opacity = 0.5;
|
684 |
|
|
(Application.Current.MainWindow as MainWindow).dzMainMenu.mouseHandlingMode = IKCOM.MouseHandlingMode.Capture;
|
685 |
|
|
}
|
686 |
90e7968d
|
ljiyeon
|
catch(Exception ex)
|
687 |
24a3178d
|
djkim
|
{
|
688 |
|
|
Logger.sendResLog("Checklist Addevent", ex.Message, 0);
|
689 |
|
|
}
|
690 |
90e7968d
|
ljiyeon
|
|
691 |
787a4489
|
KangIngu
|
}
|
692 |
|
|
|
693 |
|
|
private void SaveEvent(object sender, RoutedEventArgs e)
|
694 |
|
|
{
|
695 |
24a3178d
|
djkim
|
try
|
696 |
787a4489
|
KangIngu
|
{
|
697 |
24a3178d
|
djkim
|
if ((Application.Current.MainWindow as MainWindow).dzMainMenu.mouseHandlingMode == MouseHandlingMode.Capture)
|
698 |
0f065e57
|
ljiyeon
|
{
|
699 |
24a3178d
|
djkim
|
DialogMessage_Alert("Capture중 입니다.");
|
700 |
|
|
return;
|
701 |
0f065e57
|
ljiyeon
|
}
|
702 |
24a3178d
|
djkim
|
CHECK_LIST Check_value = new CHECK_LIST();
|
703 |
|
|
CHECK_LIST_HISTORY Check_History = new CHECK_LIST_HISTORY();
|
704 |
0f065e57
|
ljiyeon
|
|
705 |
24a3178d
|
djkim
|
foreach (var item in tb.Items)
|
706 |
787a4489
|
KangIngu
|
{
|
707 |
24a3178d
|
djkim
|
string Check_ID = (item as Customer).ID.ToString();
|
708 |
|
|
string state = "";
|
709 |
|
|
|
710 |
|
|
Logger.sendReqLog("GetCheckList: ", App.ViewInfo.ProjectNO + "," + Check_ID, 1);
|
711 |
|
|
Check_value = Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.BaseClient.GetCheckList(App.ViewInfo.ProjectNO, Check_ID);
|
712 |
|
|
if (Check_value != null)
|
713 |
6c781c0c
|
djkim
|
{
|
714 |
24a3178d
|
djkim
|
Logger.sendResLog("GetCheckList", "TRUE", 1);
|
715 |
|
|
}
|
716 |
6c781c0c
|
djkim
|
else
|
717 |
|
|
{
|
718 |
24a3178d
|
djkim
|
Logger.sendResLog("GetCheckList", "FALSE", 1);
|
719 |
6c781c0c
|
djkim
|
}
|
720 |
787a4489
|
KangIngu
|
|
721 |
24a3178d
|
djkim
|
if (Check_value != null)
|
722 |
787a4489
|
KangIngu
|
{
|
723 |
24a3178d
|
djkim
|
if ((item as Customer).STATUS.ToUpper() == "TRUE")
|
724 |
0f065e57
|
ljiyeon
|
{
|
725 |
24a3178d
|
djkim
|
state = "Closed";
|
726 |
|
|
Check_value.STATUS_DESC_CLOSE = (item as Customer).STATUS_DESC;
|
727 |
0f065e57
|
ljiyeon
|
}
|
728 |
|
|
else
|
729 |
|
|
{
|
730 |
24a3178d
|
djkim
|
state = "Open";
|
731 |
|
|
Check_value.STATUS_DESC_OPEN = (item as Customer).STATUS_DESC;
|
732 |
0f065e57
|
ljiyeon
|
}
|
733 |
787a4489
|
KangIngu
|
|
734 |
24a3178d
|
djkim
|
string Rev = state + "" + DateTime.Now.ToString("yyyy.MM.dd");
|
735 |
|
|
string description = "";
|
736 |
787a4489
|
KangIngu
|
|
737 |
24a3178d
|
djkim
|
if (char.Parse(ViewerDataModel.Instance.SystemMain.dzMainMenu.CurrentDoc.Revision) >= char.Parse(Check_value.REVISION))
|
738 |
6c781c0c
|
djkim
|
{
|
739 |
24a3178d
|
djkim
|
Check_value.REMARK = (item as Customer).REMARK;
|
740 |
|
|
Check_value.STATUS = (item as Customer).STATUS;
|
741 |
|
|
Check_value.TODOLIST = (item as Customer).TODOLIST;
|
742 |
|
|
Check_value.VENDOR = (item as Customer).VENDOR;
|
743 |
|
|
Check_value.REPLY = (item as Customer).REPLY;
|
744 |
|
|
|
745 |
|
|
if ((item as Customer).STATUS == "False")
|
746 |
|
|
description = Check_value.STATUS_DESC_OPEN;
|
747 |
|
|
else
|
748 |
|
|
description = Check_value.STATUS_DESC_CLOSE;
|
749 |
787a4489
|
KangIngu
|
|
750 |
24a3178d
|
djkim
|
Logger.sendReqLog("GetCheckListHistory: ", App.ViewInfo.ProjectNO + "," + Check_ID, 1);
|
751 |
|
|
var history = Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.BaseClient.GetCheckListHistory(App.ViewInfo.ProjectNO, Check_ID);
|
752 |
|
|
if (history.Count() > 0)
|
753 |
787a4489
|
KangIngu
|
{
|
754 |
24a3178d
|
djkim
|
Logger.sendResLog("GetCheckList", "TRUE", 1);
|
755 |
787a4489
|
KangIngu
|
}
|
756 |
6c781c0c
|
djkim
|
else
|
757 |
787a4489
|
KangIngu
|
{
|
758 |
24a3178d
|
djkim
|
Logger.sendResLog("GetCheckList", "FALSE", 1);
|
759 |
|
|
}
|
760 |
|
|
Check_History = history.Where(info => info.REVISION == ViewerDataModel.Instance.SystemMain.dzMainMenu.CurrentDoc.Revision).FirstOrDefault();
|
761 |
|
|
|
762 |
|
|
List<string> validation = new List<string>();
|
763 |
|
|
|
764 |
|
|
foreach (var his in history)
|
765 |
|
|
{
|
766 |
|
|
if (his.TODOLIST == Check_value.TODOLIST)
|
767 |
|
|
validation.Add("TODOLIST");
|
768 |
|
|
if (his.STATUS_DESC == description)
|
769 |
|
|
validation.Add("STATUS_DESC");
|
770 |
|
|
if (his.VENDOR == Check_value.VENDOR)
|
771 |
|
|
validation.Add("VENDOR");
|
772 |
|
|
if (his.REMARK == Check_value.REMARK)
|
773 |
|
|
validation.Add("REMARK");
|
774 |
|
|
if (his.REPLY == Check_value.REPLY)
|
775 |
|
|
validation.Add("REPLY");
|
776 |
|
|
}
|
777 |
|
|
|
778 |
|
|
if (validation.Count < 5)
|
779 |
|
|
{
|
780 |
|
|
if (Check_History == null)
|
781 |
5de0c110
|
ljiyeon
|
{
|
782 |
24a3178d
|
djkim
|
Check_History = new CHECK_LIST_HISTORY()
|
783 |
|
|
{
|
784 |
24678e06
|
humkyung
|
ID = Commons.shortGuid(),
|
785 |
24a3178d
|
djkim
|
CHECKLIST_ID = Check_ID,
|
786 |
|
|
REVISION = ViewerDataModel.Instance.SystemMain.dzMainMenu.CurrentDoc.Revision,
|
787 |
|
|
STATUS = state,
|
788 |
|
|
IMAGE_URL = Check_value.IMAGE_URL,
|
789 |
|
|
STATUS_DESC = validation.Where(i => i.ToString() == "STATUS_DESC").FirstOrDefault() == null ? description : "",
|
790 |
|
|
TODOLIST = validation.Where(i => i.ToString() == "TODOLIST").FirstOrDefault() == null ? Check_value.TODOLIST : "",
|
791 |
|
|
VENDOR = validation.Where(i => i.ToString() == "VENDOR").FirstOrDefault() == null ? Check_value.VENDOR : "",
|
792 |
|
|
REMARK = validation.Where(i => i.ToString() == "REMARK").FirstOrDefault() == null ? Check_value.REMARK : "",
|
793 |
|
|
REPLY = validation.Where(i => i.ToString() == "REPLY").FirstOrDefault() == null ? Check_value.REPLY : "",
|
794 |
|
|
CREATE_TIME = DateTime.Now,
|
795 |
|
|
UPDATE_TIME = DateTime.Now
|
796 |
|
|
};
|
797 |
|
|
|
798 |
|
|
Logger.sendReqLog("AddCheckListHistory: ", App.ViewInfo.ProjectNO + "," + Check_History, 1);
|
799 |
|
|
Logger.sendResLog("AddCheckListHistory", Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.BaseClient.AddCheckListHistory(App.ViewInfo.ProjectNO, Check_History).ToString(), 1);
|
800 |
|
|
//Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.BaseClient.AddCheckListHistory(App.ViewInfo.ProjectNO, Check_History);
|
801 |
|
|
|
802 |
|
|
Check_value.REVISION = Current_Revision;
|
803 |
5de0c110
|
ljiyeon
|
}
|
804 |
|
|
else
|
805 |
|
|
{
|
806 |
24a3178d
|
djkim
|
Check_History.IMAGE_URL = Check_value.IMAGE_URL;
|
807 |
|
|
Check_History.STATUS = state;
|
808 |
|
|
Check_History.TODOLIST = Check_value.TODOLIST;
|
809 |
|
|
Check_History.VENDOR = Check_value.VENDOR;
|
810 |
|
|
Check_History.REMARK = Check_value.REMARK;
|
811 |
|
|
Check_History.REPLY = Check_value.REPLY;
|
812 |
|
|
Check_History.UPDATE_TIME = DateTime.Now;
|
813 |
|
|
if (state == "Open")
|
814 |
|
|
{
|
815 |
|
|
Check_History.STATUS_DESC = Check_value.STATUS_DESC_OPEN;
|
816 |
|
|
}
|
817 |
|
|
else
|
818 |
|
|
{
|
819 |
|
|
Check_History.STATUS_DESC = Check_value.STATUS_DESC_CLOSE;
|
820 |
|
|
}
|
821 |
|
|
|
822 |
|
|
Logger.sendReqLog("SaveCheckListHistory: ", App.ViewInfo.ProjectNO + "," + ViewerDataModel.Instance.SystemMain.dzMainMenu.CurrentDoc.Revision + "," + Check_History, 1);
|
823 |
|
|
Logger.sendResLog("SaveCheckListHistory", Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.BaseClient.SaveCheckListHistory(App.ViewInfo.ProjectNO, ViewerDataModel.Instance.SystemMain.dzMainMenu.CurrentDoc.Revision, Check_History).ToString(), 1);
|
824 |
|
|
|
825 |
|
|
//Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.BaseClient.SaveCheckListHistory(App.ViewInfo.ProjectNO, ViewerDataModel.Instance.SystemMain.dzMainMenu.CurrentDoc.Revision, Check_History);
|
826 |
5de0c110
|
ljiyeon
|
}
|
827 |
787a4489
|
KangIngu
|
}
|
828 |
24a3178d
|
djkim
|
validation = new List<string>();
|
829 |
787a4489
|
KangIngu
|
}
|
830 |
|
|
}
|
831 |
24a3178d
|
djkim
|
|
832 |
|
|
Logger.sendReqLog("SaveCheckList: ", App.ViewInfo.ProjectNO + "," + Check_ID + "," + Check_value, 1);
|
833 |
|
|
Logger.sendResLog("SaveCheckList", Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.BaseClient.SaveCheckList(App.ViewInfo.ProjectNO, Check_ID, Check_value).ToString(), 1);
|
834 |
|
|
//Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.BaseClient.SaveCheckList(App.ViewInfo.ProjectNO, Check_ID, Check_value);
|
835 |
787a4489
|
KangIngu
|
}
|
836 |
0f065e57
|
ljiyeon
|
|
837 |
24a3178d
|
djkim
|
DataBind();
|
838 |
|
|
tb.ItemsSource = null;
|
839 |
|
|
tb.ItemsSource = Lists;
|
840 |
|
|
History_Set();
|
841 |
|
|
|
842 |
|
|
DialogMessage_Alert("Success");
|
843 |
|
|
}
|
844 |
|
|
catch (Exception ex)
|
845 |
|
|
{
|
846 |
|
|
Logger.sendResLog("Checklist SaveEvent", ex.Message, 0);
|
847 |
787a4489
|
KangIngu
|
}
|
848 |
90e7968d
|
ljiyeon
|
|
849 |
787a4489
|
KangIngu
|
}
|
850 |
|
|
|
851 |
|
|
private void CheckListEvent(object sender, RoutedEventArgs e)
|
852 |
|
|
{
|
853 |
|
|
if (col1.Width == new GridLength(1200))
|
854 |
|
|
{
|
855 |
|
|
this.Width += 600;
|
856 |
|
|
col1.Width = new GridLength(1800);
|
857 |
|
|
}
|
858 |
|
|
else
|
859 |
|
|
{
|
860 |
|
|
this.Width -= 600;
|
861 |
|
|
col1.Width = new GridLength(1200);
|
862 |
|
|
}
|
863 |
|
|
History_Set();
|
864 |
|
|
}
|
865 |
|
|
|
866 |
|
|
private void CommentMoveEvent(object sender, MouseButtonEventArgs e)
|
867 |
|
|
{
|
868 |
|
|
SyncInit();
|
869 |
|
|
|
870 |
|
|
Rect rect = new Rect();
|
871 |
|
|
string[] RectPoint = ((e.Source as Image).DataContext as Customer).IMAGE_ANCHOR.Split(',');
|
872 |
|
|
//string[] RectPoint = ((e.Source as Telerik.Windows.Controls.RadButton).DataContext as Customer).IMAGE_ANCHOR.Split(',');
|
873 |
|
|
|
874 |
|
|
rect = new Rect(new Point(double.Parse(RectPoint[0]), double.Parse(RectPoint[1])), new Point(double.Parse(RectPoint[0]) + double.Parse(RectPoint[2]), double.Parse(RectPoint[1]) + double.Parse(RectPoint[3])));
|
875 |
|
|
|
876 |
|
|
//Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.pageNavigator.GotoPage(((e.Source as Telerik.Windows.Controls.RadButton).DataContext as Customer).PAGENUMBER);
|
877 |
|
|
Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.pageNavigator.GotoPage(((e.Source as Image).DataContext as Customer).PAGENUMBER);
|
878 |
|
|
Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.zoomAndPanControl.ZoomTo(rect);
|
879 |
|
|
Application.Current.MainWindow.Focus();
|
880 |
|
|
}
|
881 |
|
|
|
882 |
|
|
private void CaptureEvent(object sender, MouseButtonEventArgs e)
|
883 |
|
|
{
|
884 |
|
|
SyncInit();
|
885 |
|
|
|
886 |
|
|
//캡쳐 하기 전에 코멘트 저장
|
887 |
|
|
if (Common.ViewerDataModel.Instance.MarkupControls_USER.Count > 0 || (Application.Current.MainWindow as MainWindow).dzMainMenu.SelectLayer.Children.Count > 0)
|
888 |
|
|
{
|
889 |
|
|
var menu = (Application.Current.MainWindow as MainWindow).dzMainMenu;
|
890 |
077896be
|
humkyung
|
SelectionSet.Instance.UnSelect(menu);
|
891 |
787a4489
|
KangIngu
|
if (menu.PreviewUserMarkupInfoItem != null && menu.PreviewUserMarkupInfoItem.IsPreviewUser == true)
|
892 |
|
|
{
|
893 |
cb5c7f06
|
humkyung
|
(Application.Current.MainWindow as MainWindow).dzTopMenu.SaveEventCallback(null, null);
|
894 |
787a4489
|
KangIngu
|
}
|
895 |
|
|
else if (menu.gridViewMarkup.SelectedItems.Count == 0 || (menu.gridViewMarkup.SelectedItems.FirstOrDefault() as IKCOM.MarkupInfoItem).UserID != App.ViewInfo.UserID)
|
896 |
|
|
{
|
897 |
|
|
|
898 |
|
|
}
|
899 |
|
|
else
|
900 |
|
|
{
|
901 |
cb5c7f06
|
humkyung
|
(Application.Current.MainWindow as MainWindow).dzTopMenu.SaveEventCallback(null, null);
|
902 |
787a4489
|
KangIngu
|
}
|
903 |
|
|
}
|
904 |
|
|
|
905 |
|
|
//Common.ViewerDataModel.Instance.CheckList_ID = ((e.Source as Telerik.Windows.Controls.RadButton).DataContext as Customer).ID;
|
906 |
|
|
Common.ViewerDataModel.Instance.CheckList_ID = ((e.Source as Image).DataContext as Customer).ID;
|
907 |
24a3178d
|
djkim
|
//Common.ViewerDataModel.Instance.PageNumber = ((e.Source as Image).DataContext as Customer).PAGENUMBER;
|
908 |
787a4489
|
KangIngu
|
Application.Current.MainWindow.Focus();
|
909 |
|
|
Common.ViewerDataModel.Instance.Capture_Opacity = 0.49;
|
910 |
|
|
(Application.Current.MainWindow as MainWindow).dzMainMenu.mouseHandlingMode = IKCOM.MouseHandlingMode.Capture;
|
911 |
|
|
}
|
912 |
|
|
|
913 |
|
|
public void KeyEventDownAction(object sender, KeyEventArgs e)
|
914 |
|
|
{
|
915 |
|
|
switch (e.Key)
|
916 |
|
|
{
|
917 |
|
|
case Key.Escape:
|
918 |
|
|
{
|
919 |
|
|
(Application.Current.MainWindow as MainWindow).dzMainMenu.mouseHandlingMode = IKCOM.MouseHandlingMode.None;
|
920 |
|
|
Common.ViewerDataModel.Instance.Capture_Opacity = 0;
|
921 |
|
|
}
|
922 |
|
|
break;
|
923 |
|
|
}
|
924 |
|
|
}
|
925 |
|
|
|
926 |
|
|
private void tb_IsVisibleChanged(object sender, DependencyPropertyChangedEventArgs e)
|
927 |
|
|
{
|
928 |
24a3178d
|
djkim
|
try
|
929 |
787a4489
|
KangIngu
|
{
|
930 |
24a3178d
|
djkim
|
if (ViewerDataModel.Instance.Capture_Opacity == 0)
|
931 |
|
|
return;
|
932 |
|
|
|
933 |
|
|
DataBind();
|
934 |
|
|
tb.ItemsSource = null;
|
935 |
|
|
tb.ItemsSource = Lists.OrderBy(info => info.CREATE_TIME);
|
936 |
|
|
//tb1.ItemsSource = Lists.OrderBy(info => info.CREATE_TIME);
|
937 |
787a4489
|
KangIngu
|
|
938 |
24a3178d
|
djkim
|
if (ViewerDataModel.Instance.Capture_Opacity == 0.5)
|
939 |
787a4489
|
KangIngu
|
{
|
940 |
24a3178d
|
djkim
|
tb.SortDescriptors.Clear();
|
941 |
|
|
tb.FilterDescriptors.Clear();
|
942 |
787a4489
|
KangIngu
|
|
943 |
24a3178d
|
djkim
|
var scrollViewer = this.tb.ChildrenOfType<GridViewScrollViewer>().FirstOrDefault();
|
944 |
|
|
if (scrollViewer != null)
|
945 |
|
|
{
|
946 |
|
|
//this.tb.ChildrenOfType<GridViewScrollViewer>().FirstOrDefault().ScrollToVerticalOffset(this.tb.ChildrenOfType<GridViewScrollViewer>().FirstOrDefault().ExtentHeight);
|
947 |
|
|
//this.tb1.ChildrenOfType<GridViewScrollViewer>().FirstOrDefault().ScrollToVerticalOffset(this.tb.ChildrenOfType<GridViewScrollViewer>().FirstOrDefault().ExtentHeight);
|
948 |
787a4489
|
KangIngu
|
|
949 |
24a3178d
|
djkim
|
tb.ScrollIndexIntoView(tb.Items.Count - 1);
|
950 |
|
|
tb.CurrentCellInfo = new GridViewCellInfo(tb.Items[tb.Items.Count - 1], tb.Columns["TODOLIST"]);
|
951 |
|
|
tb.Focus();
|
952 |
|
|
|
953 |
|
|
}
|
954 |
787a4489
|
KangIngu
|
}
|
955 |
|
|
}
|
956 |
90e7968d
|
ljiyeon
|
catch(Exception ex)
|
957 |
24a3178d
|
djkim
|
{
|
958 |
|
|
Logger.sendResLog("tb_IsVisibleChanged", ex.Message, 0);
|
959 |
|
|
}
|
960 |
90e7968d
|
ljiyeon
|
|
961 |
787a4489
|
KangIngu
|
}
|
962 |
|
|
|
963 |
|
|
private void Radio_Open_Checked(object sender, RoutedEventArgs e)
|
964 |
|
|
{
|
965 |
24a3178d
|
djkim
|
try
|
966 |
787a4489
|
KangIngu
|
{
|
967 |
24a3178d
|
djkim
|
(e.Source as RadioButton).Foreground = Brushes.Red;
|
968 |
|
|
(e.Source as RadioButton).FontWeight = FontWeights.Bold;
|
969 |
787a4489
|
KangIngu
|
|
970 |
24a3178d
|
djkim
|
if ((((e.OriginalSource as RadioButton).Parent as StackPanel).Parent as GridViewCell).ParentRow.Item != null)
|
971 |
787a4489
|
KangIngu
|
{
|
972 |
24a3178d
|
djkim
|
((((e.OriginalSource as RadioButton).Parent as StackPanel).Parent as GridViewCell).ParentRow.Item as Customer)._STATUS = "Open";
|
973 |
|
|
}
|
974 |
|
|
|
975 |
|
|
if (Isinit)
|
976 |
|
|
{
|
977 |
|
|
Isinit = false;
|
978 |
|
|
if ((e.Source as RadioButton).DataContext != null)
|
979 |
787a4489
|
KangIngu
|
{
|
980 |
24a3178d
|
djkim
|
if (((e.Source as RadioButton).DataContext as Customer).STATUS_DESC != "Vendor 반영 필요")
|
981 |
|
|
{
|
982 |
|
|
((e.Source as RadioButton).DataContext as Customer).STATUS_DESC = "Vendor 반영 필요";
|
983 |
787a4489
|
KangIngu
|
|
984 |
24a3178d
|
djkim
|
tb.Rebind();
|
985 |
|
|
}
|
986 |
787a4489
|
KangIngu
|
}
|
987 |
|
|
}
|
988 |
|
|
}
|
989 |
90e7968d
|
ljiyeon
|
catch(Exception ex)
|
990 |
24a3178d
|
djkim
|
{
|
991 |
|
|
Logger.sendResLog("Radio_Open_Checked", ex.Message, 0);
|
992 |
|
|
}
|
993 |
90e7968d
|
ljiyeon
|
|
994 |
787a4489
|
KangIngu
|
}
|
995 |
|
|
|
996 |
|
|
private void Radio_Close_Checked(object sender, RoutedEventArgs e)
|
997 |
|
|
{
|
998 |
24a3178d
|
djkim
|
try
|
999 |
69ef0800
|
KangIngu
|
{
|
1000 |
24a3178d
|
djkim
|
if (Isinit)
|
1001 |
69ef0800
|
KangIngu
|
{
|
1002 |
24a3178d
|
djkim
|
if (!isCheck_Status)
|
1003 |
|
|
{
|
1004 |
|
|
Select_StatusID = ((e.Source as RadioButton).DataContext as Customer).ID;
|
1005 |
69ef0800
|
KangIngu
|
|
1006 |
24a3178d
|
djkim
|
isCheck_Status = true;
|
1007 |
69ef0800
|
KangIngu
|
|
1008 |
24a3178d
|
djkim
|
RadWindow CheckPop = new RadWindow();
|
1009 |
69ef0800
|
KangIngu
|
|
1010 |
24a3178d
|
djkim
|
CheckList_Status check = new CheckList_Status();
|
1011 |
69ef0800
|
KangIngu
|
|
1012 |
24a3178d
|
djkim
|
CheckPop = new RadWindow
|
1013 |
|
|
{
|
1014 |
|
|
MinWidth = 350,
|
1015 |
|
|
MinHeight = 150,
|
1016 |
|
|
Header = "Status Description을 입력하세요",
|
1017 |
|
|
Content = check,
|
1018 |
|
|
ResizeMode = System.Windows.ResizeMode.NoResize,
|
1019 |
|
|
WindowStartupLocation = System.Windows.WindowStartupLocation.CenterScreen,
|
1020 |
|
|
IsTopmost = true,
|
1021 |
|
|
};
|
1022 |
|
|
StyleManager.SetTheme(CheckPop, new Office2013Theme());
|
1023 |
|
|
CheckPop.Closed += CheckPop_Closed;
|
1024 |
|
|
CheckPop.Show();
|
1025 |
|
|
|
1026 |
|
|
Isinit = false;
|
1027 |
|
|
tb.Rebind();
|
1028 |
|
|
}
|
1029 |
69ef0800
|
KangIngu
|
}
|
1030 |
787a4489
|
KangIngu
|
|
1031 |
|
|
(e.Source as RadioButton).FontWeight = FontWeights.Bold;
|
1032 |
|
|
|
1033 |
24a3178d
|
djkim
|
if ((((e.OriginalSource as RadioButton).Parent as StackPanel).Parent as GridViewCell).ParentRow.Item != null)
|
1034 |
|
|
{
|
1035 |
|
|
((((e.OriginalSource as RadioButton).Parent as StackPanel).Parent as GridViewCell).ParentRow.Item as Customer)._STATUS = "Close";
|
1036 |
|
|
}
|
1037 |
|
|
}
|
1038 |
90e7968d
|
ljiyeon
|
catch(Exception ex)
|
1039 |
787a4489
|
KangIngu
|
{
|
1040 |
24a3178d
|
djkim
|
Logger.sendResLog("Radio_Close_Checked", ex.Message, 0);
|
1041 |
787a4489
|
KangIngu
|
}
|
1042 |
90e7968d
|
ljiyeon
|
|
1043 |
69ef0800
|
KangIngu
|
}
|
1044 |
787a4489
|
KangIngu
|
|
1045 |
69ef0800
|
KangIngu
|
private void CheckPop_Closed(object sender, WindowClosedEventArgs e)
|
1046 |
|
|
{
|
1047 |
24a3178d
|
djkim
|
try
|
1048 |
787a4489
|
KangIngu
|
{
|
1049 |
24a3178d
|
djkim
|
isCheck_Status = false;
|
1050 |
|
|
|
1051 |
|
|
foreach (var item in tb.Items)
|
1052 |
787a4489
|
KangIngu
|
{
|
1053 |
24a3178d
|
djkim
|
if (Select_StatusID == (item as Customer).ID.ToString())
|
1054 |
69ef0800
|
KangIngu
|
{
|
1055 |
24a3178d
|
djkim
|
if (ViewerDataModel.Instance.CheckStatus != "" && ViewerDataModel.Instance.CheckStatus != null)
|
1056 |
|
|
{
|
1057 |
|
|
(item as Customer).STATUS_DESC = ViewerDataModel.Instance.CheckStatus;
|
1058 |
|
|
}
|
1059 |
|
|
else
|
1060 |
|
|
{
|
1061 |
|
|
(item as Customer).STATUS = "False";
|
1062 |
|
|
(item as Customer)._STATUS = "Open";
|
1063 |
|
|
(item as Customer).STATUS_ = "True";
|
1064 |
|
|
}
|
1065 |
69ef0800
|
KangIngu
|
|
1066 |
24a3178d
|
djkim
|
ViewerDataModel.Instance.CheckStatus = "";
|
1067 |
|
|
Select_StatusID = "";
|
1068 |
|
|
tb.Rebind();
|
1069 |
|
|
return;
|
1070 |
|
|
}
|
1071 |
787a4489
|
KangIngu
|
}
|
1072 |
|
|
}
|
1073 |
90e7968d
|
ljiyeon
|
catch(Exception ex)
|
1074 |
24a3178d
|
djkim
|
{
|
1075 |
|
|
Logger.sendResLog("CheckPop_Closed", ex.Message, 0);
|
1076 |
|
|
}
|
1077 |
90e7968d
|
ljiyeon
|
|
1078 |
69ef0800
|
KangIngu
|
|
1079 |
787a4489
|
KangIngu
|
}
|
1080 |
|
|
|
1081 |
|
|
private void Radio_Unchecked(object sender, RoutedEventArgs e)
|
1082 |
|
|
{
|
1083 |
24a3178d
|
djkim
|
try
|
1084 |
|
|
{
|
1085 |
|
|
(e.Source as RadioButton).Foreground = Brushes.Black;
|
1086 |
|
|
(e.Source as RadioButton).FontWeight = FontWeights.Normal;
|
1087 |
|
|
}
|
1088 |
90e7968d
|
ljiyeon
|
catch(Exception ex)
|
1089 |
24a3178d
|
djkim
|
{
|
1090 |
|
|
Logger.sendResLog("Radio_Unchecked", ex.Message, 0);
|
1091 |
|
|
}
|
1092 |
90e7968d
|
ljiyeon
|
|
1093 |
787a4489
|
KangIngu
|
}
|
1094 |
|
|
|
1095 |
|
|
private void mousedownOnImage(object sender, MouseButtonEventArgs args)
|
1096 |
|
|
{
|
1097 |
24a3178d
|
djkim
|
try
|
1098 |
787a4489
|
KangIngu
|
{
|
1099 |
24a3178d
|
djkim
|
if (args.OriginalSource as TextBlock != null && (args.OriginalSource as TextBlock).Parent != null)
|
1100 |
787a4489
|
KangIngu
|
{
|
1101 |
24a3178d
|
djkim
|
if ((args.OriginalSource as TextBlock).Parent.GetType().Name == "GridViewHeaderCell")
|
1102 |
|
|
{
|
1103 |
|
|
Isinit = false;
|
1104 |
|
|
return;
|
1105 |
|
|
}
|
1106 |
787a4489
|
KangIngu
|
}
|
1107 |
|
|
|
1108 |
24a3178d
|
djkim
|
Isinit = true;
|
1109 |
787a4489
|
KangIngu
|
|
1110 |
24a3178d
|
djkim
|
RadWindow CheckPop = new RadWindow();
|
1111 |
787a4489
|
KangIngu
|
|
1112 |
24a3178d
|
djkim
|
if (args.OriginalSource is Image)
|
1113 |
|
|
{
|
1114 |
|
|
Image img = (args.OriginalSource as Image);
|
1115 |
|
|
if (img.Height != 45)
|
1116 |
|
|
return;
|
1117 |
787a4489
|
KangIngu
|
|
1118 |
24a3178d
|
djkim
|
CommantImage check = new CommantImage(img);
|
1119 |
787a4489
|
KangIngu
|
|
1120 |
24a3178d
|
djkim
|
CheckPop = new RadWindow
|
1121 |
|
|
{
|
1122 |
|
|
MinWidth = 500,
|
1123 |
|
|
MinHeight = 500,
|
1124 |
|
|
Header = "Image",
|
1125 |
|
|
Content = check,
|
1126 |
|
|
ResizeMode = System.Windows.ResizeMode.NoResize,
|
1127 |
|
|
WindowStartupLocation = System.Windows.WindowStartupLocation.CenterScreen,
|
1128 |
|
|
IsTopmost = true,
|
1129 |
|
|
};
|
1130 |
|
|
StyleManager.SetTheme(CheckPop, new Office2013Theme());
|
1131 |
|
|
CheckPop.Show();
|
1132 |
|
|
}
|
1133 |
|
|
|
1134 |
|
|
if (args.OriginalSource as TextBlock == null || (args.OriginalSource as TextBlock).Parent == null || ((args.OriginalSource as TextBlock).Parent) as GridViewCell == null)
|
1135 |
787a4489
|
KangIngu
|
{
|
1136 |
24a3178d
|
djkim
|
return;
|
1137 |
|
|
}
|
1138 |
787a4489
|
KangIngu
|
|
1139 |
24a3178d
|
djkim
|
if ((((args.OriginalSource as TextBlock).Parent) as GridViewCell).DataColumn.ColumnGroupName.ToString() == "History")
|
1140 |
|
|
{
|
1141 |
787a4489
|
KangIngu
|
|
1142 |
24a3178d
|
djkim
|
CheckList_Detail Detail = new CheckList_Detail((((args.OriginalSource as TextBlock).Parent as GridViewCell).ParentRow.Item as KCOM.Controls.Customer).ID, (((args.OriginalSource as TextBlock).Parent) as GridViewCell).DataColumn.Header.ToString());
|
1143 |
787a4489
|
KangIngu
|
|
1144 |
24a3178d
|
djkim
|
CheckPop = new RadWindow
|
1145 |
|
|
{
|
1146 |
|
|
MinWidth = 800,
|
1147 |
|
|
MinHeight = 400,
|
1148 |
|
|
Header = "Detail",
|
1149 |
|
|
Content = Detail,
|
1150 |
|
|
//ResizeMode = System.Windows.ResizeMode.CanResizeWithGrip,
|
1151 |
|
|
ResizeMode = System.Windows.ResizeMode.NoResize,
|
1152 |
|
|
WindowStartupLocation = System.Windows.WindowStartupLocation.CenterScreen,
|
1153 |
|
|
IsTopmost = true,
|
1154 |
|
|
};
|
1155 |
|
|
StyleManager.SetTheme(CheckPop, new Office2013Theme());
|
1156 |
|
|
//CheckPop.ShowDialog();
|
1157 |
|
|
CheckPop.Show();
|
1158 |
|
|
}
|
1159 |
|
|
}
|
1160 |
90e7968d
|
ljiyeon
|
catch(Exception ex)
|
1161 |
24a3178d
|
djkim
|
{
|
1162 |
|
|
Logger.sendResLog("mousedownOnImage", ex.Message, 0);
|
1163 |
787a4489
|
KangIngu
|
}
|
1164 |
90e7968d
|
ljiyeon
|
|
1165 |
24a3178d
|
djkim
|
|
1166 |
787a4489
|
KangIngu
|
}
|
1167 |
|
|
|
1168 |
|
|
private void SyncEvent(object sender, MouseButtonEventArgs e)
|
1169 |
|
|
{
|
1170 |
24a3178d
|
djkim
|
try
|
1171 |
0f065e57
|
ljiyeon
|
{
|
1172 |
24a3178d
|
djkim
|
old_DocID = ((e.Source as Image).DataContext as Customer).DOCUMENT_ID;
|
1173 |
|
|
if (old_DocID.Equals(Current_Revision))
|
1174 |
|
|
{
|
1175 |
|
|
DialogMessage_Alert("같은 Revision 은 비교할 수 없습니다.");
|
1176 |
|
|
return;
|
1177 |
|
|
}
|
1178 |
|
|
Logger.sendReqLog("GetVPRevisionFirstOrDefault: ", App.ViewInfo.ProjectNO + "," + old_DocID, 1);
|
1179 |
|
|
var _vpList = Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.BaseClient.GetVPRevisionFirstOrDefault(App.ViewInfo.ProjectNO, old_DocID);
|
1180 |
|
|
if (_vpList != null)
|
1181 |
|
|
{
|
1182 |
|
|
Logger.sendResLog("GetVPRevisionFirstOrDefault", "TRUE", 1);
|
1183 |
|
|
}
|
1184 |
|
|
else
|
1185 |
|
|
{
|
1186 |
|
|
Logger.sendResLog("GetVPRevisionFirstOrDefault", "FALSE", 1);
|
1187 |
|
|
}
|
1188 |
|
|
|
1189 |
0f065e57
|
ljiyeon
|
|
1190 |
787a4489
|
KangIngu
|
|
1191 |
24a3178d
|
djkim
|
SyncInit();
|
1192 |
|
|
Rect rect = new Rect();
|
1193 |
|
|
string[] RectPoint = ((e.Source as Image).DataContext as Customer).IMAGE_ANCHOR.Split(',');
|
1194 |
|
|
rect = new Rect(new Point(double.Parse(RectPoint[0]), double.Parse(RectPoint[1])), new Point(double.Parse(RectPoint[0]) + double.Parse(RectPoint[2]), double.Parse(RectPoint[1]) + double.Parse(RectPoint[3])));
|
1195 |
|
|
ViewerDataModel.Instance.SystemMain.dzMainMenu.pageNavigator.GotoPage(((e.Source as Image).DataContext as Customer).PAGENUMBER);
|
1196 |
|
|
ViewerDataModel.Instance.SystemMain.dzMainMenu.zoomAndPanControl.Sync_ZoomTo(rect);
|
1197 |
|
|
(Application.Current.MainWindow as MainWindow).dzMainMenu.Sync_Event(_vpList);
|
1198 |
|
|
|
1199 |
|
|
}
|
1200 |
|
|
catch (Exception ex)
|
1201 |
787a4489
|
KangIngu
|
{
|
1202 |
24a3178d
|
djkim
|
Logger.sendResLog("SyncEvent", ex.Message, 0);
|
1203 |
787a4489
|
KangIngu
|
}
|
1204 |
90e7968d
|
ljiyeon
|
|
1205 |
787a4489
|
KangIngu
|
}
|
1206 |
|
|
|
1207 |
|
|
#endregion
|
1208 |
|
|
}
|
1209 |
|
|
} |