프로젝트

일반

사용자정보

개정판 24a3178d

ID24a3178dec80dde63c608239554dc25b9d0a7f42
상위 5cbd5c21
하위 b421ac6b

김동진이(가) 약 6년 전에 추가함

issue #000 checklist modify

차이점 보기:

KCOM/Controls/CheckList.xaml.cs
22 22
using KCOM.Common;
23 23
using IKCOM;
24 24
using Excel = Microsoft.Office.Interop.Excel;
25

  
25
using System.Text.RegularExpressions;
26 26

  
27 27
namespace KCOM.Controls
28 28
{
......
68 68
        public string STATUS_DESC { get; set; }
69 69
        public string REPLY { get; set; }
70 70
        public DateTime CREATE_TIME { get; set; }
71
    } 
71
    }
72 72
    #endregion
73 73

  
74 74
    /// <summary>
......
83 83
        string old_DocID = "";
84 84
        string Current_Revision = "";
85 85
        string Current_DocNo = "";
86
        int Current_Slip = 0;
86
        string Current_Slip = "";
87 87
        bool Isinit = false;
88 88
        int rev_cnt = 1;
89 89
        bool isCheck_Status = false;
......
98 98
            this.Loaded += CheckList_Loaded;
99 99
            this.KeyDown += new KeyEventHandler(KeyEventDownAction);
100 100
            this.AddHandler(Image.MouseLeftButtonDownEvent, new MouseButtonEventHandler(mousedownOnImage), true);
101
            
101

  
102 102
        }
103 103
        #endregion
104 104

  
105 105
        public void DataBind()
106 106
        {
107
            Isinit = false;
108
            
109
            Lists = new List<Customer>();
110
            string doc_no = (Application.Current.MainWindow as MainWindow).dzMainMenu._DocItem.DOCUMENT_NO;
111
            string project_no = App.ViewInfo.ProjectNO;
112
            string user_id = App.ViewInfo.UserID;
107
            try
108
            {
109
                Isinit = false;
113 110

  
114
            Logger.sendReqLog("GetUserCheckList: ", project_no + "," + user_id + "," + doc_no , 1);
111
                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
                }
115 127

  
116
            items = Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.BaseClient.GetUserCheckList(project_no, user_id, doc_no);
117
            if(items.Count() > 0)
118
            {
119
                Logger.sendResLog("GetUserCheckList", "TRUE", 1);
120
            }
121
            else
122
            {
123
                Logger.sendResLog("GetUserCheckList", "FALSE", 1);
124
            }
125
            
126
            if (Lists.Count == 0)
127
            {
128 128
                foreach (var item in items)
129 129
                {
130 130
                    Customer customer = new Customer();
......
138 138
                    customer.REVISION = item.REVISION;
139 139

  
140 140
                    #region history
141
                    Logger.sendReqLog("GetCheckListHistory: ", project_no + "," + item.ID , 1);
141
                    Logger.sendReqLog("GetCheckListHistory: ", project_no + "," + item.ID, 1);
142 142
                    var history = Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.BaseClient.GetCheckListHistory(project_no, item.ID);
143 143

  
144 144
                    if (history.Count() > 0)
......
218 218

  
219 219
                    Lists.Add(customer);
220 220
                }
221
            }            
221
            }
222
            catch (Exception ex)
223
            {
224
                Logger.sendResLog("Checklist DataBind", ex.Message, 0);
225
            }
226

  
227

  
222 228
        }
223 229

  
224 230
        private void ChangeSize(double width, double height)
......
229 235

  
230 236
        private void SyncInit()
231 237
        {
232
            if (!ViewerDataModel.Instance.SystemMain.dzMainMenu.testPanel2.IsHidden)
238
            try
233 239
            {
234
                ViewerDataModel.Instance.SystemMain.dzMainMenu.testPanel2.IsHidden = true;
235
                ViewerDataModel.Instance.PageBalanceMode = false;
236
                ViewerDataModel.Instance.PageBalanceNumber = 0;
237
                ViewerDataModel.Instance.PageNumber = 0;
238
                ViewerDataModel.Instance.MarkupControls_Sync.Clear();
239
                ViewerDataModel.Instance.SystemMain.dzMainMenu.gridViewRevMarkup.Visibility = Visibility.Collapsed;
240
                ViewerDataModel.Instance.SystemMain.dzMainMenu.UserList.IsChecked = false;
241
                ViewerDataModel.Instance.SystemMain.dzMainMenu.BalanceMode.IsChecked = false;
240
                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
                }
242 251
            }
252
            catch (Exception ex)
253
            {
254
                Logger.sendResLog("SyncInit", ex.Message, 0);
255
            }
256

  
243 257
        }
244 258

  
245 259
        private void DialogMessage_Alert(string Msg)
246 260
        {
247
            RadWindow CheckPop = new RadWindow();
248
            Alert check = new Alert(Msg);
261
            try
262
            {
263
                RadWindow CheckPop = new RadWindow();
264
                Alert check = new Alert(Msg);
249 265

  
250
            CheckPop = new RadWindow
266
                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)
251 281
            {
252
                MinWidth = 400,
253
                MinHeight = 100,
254
                //Closed = (obj, args) => this.MarkupNamePromptClose(MarkupData, args),
255
                Header = "Alert",
256
                Content = check,
257
                ResizeMode = System.Windows.ResizeMode.NoResize,
258
                WindowStartupLocation = System.Windows.WindowStartupLocation.CenterScreen,
259
                IsTopmost = true,
260
            };
261
            StyleManager.SetTheme(CheckPop, new Office2013Theme());
262
            CheckPop.ShowDialog();
282
                Logger.sendResLog("DialogMessage_Alert", ex.Message, 0);
283
            }
284

  
263 285
        }
264 286

  
265 287
        private void History_Set()
266 288
        {
267
            if (col1.Width != new GridLength(1200))
289
            try
268 290
            {
269
                Col_Remark.IsVisible = true;
270
                Col_Reply.IsVisible = true;
271
                Col_Vendor.IsVisible = true;
291
                if (col1.Width != new GridLength(1200))
292
                {
293
                    Col_Remark.IsVisible = true;
294
                    Col_Reply.IsVisible = true;
295
                    Col_Vendor.IsVisible = true;
272 296

  
273
                if (Lists.Where(info => info.REV_1 != null).FirstOrDefault() != null)
274
                    REV_1.IsVisible = true;
297
                    if (Lists.Where(info => info.REV_1 != null).FirstOrDefault() != null)
298
                        REV_1.IsVisible = true;
275 299

  
276
                #region history
277
                REV_0.IsVisible = true;
278
                if (Lists.Where(info => info.REV_1 != null).FirstOrDefault() != null)
300
                    #region history
301
                    REV_0.IsVisible = true;
302
                    if (Lists.Where(info => info.REV_1 != null).FirstOrDefault() != null)
279 303
                    { REV_1.IsVisible = true; REV_0.Width = 70; }
304
                    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
                }
280 345
                else
281
                { REV_0.Width = 140;}
282
                if (Lists.Where(info => info.REV_2 != null).FirstOrDefault() != null)
283
                    REV_2.IsVisible = true; REV_2.IsVisible = true;
284
                if (Lists.Where(info => info.REV_3 != null).FirstOrDefault() != null)
285
                    REV_3.IsVisible = true;
286
                if (Lists.Where(info => info.REV_4 != null).FirstOrDefault() != null)
287
                    REV_4.IsVisible = true;
288
                if (Lists.Where(info => info.REV_5 != null).FirstOrDefault() != null)
289
                    REV_5.IsVisible = true;
290
                if (Lists.Where(info => info.REV_6 != null).FirstOrDefault() != null)
291
                    REV_6.IsVisible = true;
292
                if (Lists.Where(info => info.REV_7 != null).FirstOrDefault() != null)
293
                    REV_7.IsVisible = true;
294
                if (Lists.Where(info => info.REV_8 != null).FirstOrDefault() != null)
295
                    REV_8.IsVisible = true;
296
                if (Lists.Where(info => info.REV_9 != null).FirstOrDefault() != null)
297
                    REV_9.IsVisible = true;
298
                if (Lists.Where(info => info.REV_10 != null).FirstOrDefault() != null)
299
                    REV_10.IsVisible = true;
300
                if (Lists.Where(info => info.REV_11 != null).FirstOrDefault() != null)
301
                    REV_11.IsVisible = true;
302
                if (Lists.Where(info => info.REV_12 != null).FirstOrDefault() != null)
303
                    REV_12.IsVisible = true;
304
                if (Lists.Where(info => info.REV_13 != null).FirstOrDefault() != null)
305
                    REV_13.IsVisible = true;
306
                if (Lists.Where(info => info.REV_14 != null).FirstOrDefault() != null)
307
                    REV_14.IsVisible = true;
308
                if (Lists.Where(info => info.REV_15 != null).FirstOrDefault() != null)
309
                    REV_15.IsVisible = true;
310
                if (Lists.Where(info => info.REV_16 != null).FirstOrDefault() != null)
311
                    REV_16.IsVisible = true;
312
                if (Lists.Where(info => info.REV_17 != null).FirstOrDefault() != null)
313
                    REV_17.IsVisible = true;
314
                if (Lists.Where(info => info.REV_18 != null).FirstOrDefault() != null)
315
                    REV_18.IsVisible = true;
316
                if (Lists.Where(info => info.REV_19 != null).FirstOrDefault() != null)
317
                    REV_19.IsVisible = true;
318
                #endregion
346
                {
347
                    Col_Remark.IsVisible = false;
348
                    Col_Reply.IsVisible = false;
349
                    Col_Vendor.IsVisible = false;
319 350

  
351
                    #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
                }
320 374
            }
321
            else
375
            catch (Exception ex)
322 376
            {
323
                Col_Remark.IsVisible = false;
324
                Col_Reply.IsVisible = false;
325
                Col_Vendor.IsVisible = false;
326

  
327
                #region history
328
                REV_0.IsVisible = false;
329
                REV_1.IsVisible = false;
330
                REV_2.IsVisible = false;
331
                REV_3.IsVisible = false;
332
                REV_4.IsVisible = false;
333
                REV_5.IsVisible = false;
334
                REV_6.IsVisible = false;
335
                REV_7.IsVisible = false;
336
                REV_8.IsVisible = false;
337
                REV_9.IsVisible = false;
338
                REV_10.IsVisible = false;
339
                REV_11.IsVisible = false;
340
                REV_12.IsVisible = false;
341
                REV_13.IsVisible = false;
342
                REV_14.IsVisible = false;
343
                REV_15.IsVisible = false;
344
                REV_16.IsVisible = false;
345
                REV_17.IsVisible = false;
346
                REV_18.IsVisible = false;
347
                REV_19.IsVisible = false;
348
                #endregion
377
                Logger.sendResLog("History_Set", ex.Message, 0);
349 378
            }
379

  
350 380
        }
351 381

  
352 382
        #region Excel Export
353 383

  
354 384
        private void ExportEvent(object sender, RoutedEventArgs e)
355 385
        {
356
            this.ExportIndy.IsBusy = true;
357

  
358
            if (Lists.Count == 0)
359
            {
360
                DialogMessage_Alert("Data Not Found");
361
                this.ExportIndy.IsBusy = false;
362
                return;
363
            }
364

  
365
            string extension = "xlsx";
366
            //Uri url = new Uri("http://cloud.devdoftech.co.kr:5977/TileSource/Check_Test/CheckList.xlsx");
367
            Uri url = new Uri("http://cloud.devdoftech.co.kr:5977/TileSource/Check_Test/CheckList_T.xlsx");
368

  
369
            System.Windows.Forms.SaveFileDialog dialog = new System.Windows.Forms.SaveFileDialog()
386
            try
370 387
            {
371
                DefaultExt = extension,
372
                Filter = String.Format("{1} files (*.{0})|*.{0}|All files (*.*)|*.*", extension, "Excel"),
373
                FilterIndex = 1
374
            };
388
                if ((Application.Current.MainWindow as MainWindow).dzMainMenu.mouseHandlingMode == MouseHandlingMode.Capture)
389
                {
390
                    DialogMessage_Alert("Capture중 입니다.");
391
                    return;
392
                }
393
                this.ExportIndy.IsBusy = true;
375 394

  
376
            if (dialog.ShowDialog() == System.Windows.Forms.DialogResult.OK)
377
            {
378
                using (var client = new System.Net.WebClient())
395
                if (Lists.Count == 0)
379 396
                {
380
                    client.DownloadFile(url, dialog.FileName);
397
                    DialogMessage_Alert("Data Not Found");
398
                    this.ExportIndy.IsBusy = false;
399
                    return;
400
                }
381 401

  
382
                    Excel.Application application = null;
383
                    Excel.Workbook workbook = null;
384
                    Excel.Worksheet worksheet = null;
402
                string extension = "xlsx";
385 403

  
386
                    try
387
                    {
388
                        // Excel 첫번째 워크시트 가져오기                
389
                        application = new Excel.Application();
390
                        workbook = application.Workbooks.Open(dialog.FileName);
391
                        worksheet = (Excel.Worksheet)workbook.Worksheets.get_Item("Sheet1");
392

  
393
                        // 데이타 넣기
394
                        int h = 9;
395
                        int w = 2;
396
                        string project_no = App.ViewInfo.ProjectNO;
397
                        worksheet.Cells[2, w + 8] = project_no;
398
                        Logger.sendReqLog("GetProjectName: ", project_no , 1);
399

  
400
                        string project_name = Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.BaseClient.GetProjectName(project_no);
401
                        if (project_name != null || project_name != "")
402
                        {
403
                            Logger.sendResLog("GetProjectName", "TRUE", 1);
404
                        }
405
                        else
406
                        {
407
                            Logger.sendResLog("GetProjectName", "FALSE", 1);
408
                        }
409
                        worksheet.Cells[3, w + 8] = project_name;                        
404
                Uri url = new Uri("http://172.20.120.141:5977/TileSource/Check_Test/CheckList_T.xlsx");
410 405

  
411
                        worksheet.Cells[4, w + 8] = (Application.Current.MainWindow as MainWindow).dzMainMenu._DocItem.DOCUMENT_NO;
412
                        worksheet.Cells[5, w + 8] = (Application.Current.MainWindow as MainWindow).dzMainMenu.userData.NAME + " (" + App.ViewInfo.UserID + ")";
413
                        worksheet.Cells[6, w + 8] = DateTime.Now.ToString("yyyy.MM.dd");
406
                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
                };
414 412

  
415
                        Excel.Range Range_I = worksheet.Range["K9"];
416
                        Excel.Range Range_O = null;
417
                        Excel.Borders border_ = null;
413
                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 418

  
419
                        var Rev = Lists.Select(info => info.REVISION).Distinct();
420
                        string[] Cell = { "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T" };
421
                        string[] Range = { "L9", "M9", "N9", "O9", "P9", "Q9", "R9", "S9", "T9", "U9", "V9", "W9", "X9", "Y9", "Z9", "AA9", "AB9", "AC9", "AD9" };
422
                        string Ran = "K";
419
                        Excel.Application application = null;
420
                        Excel.Workbook workbook = null;
421
                        Excel.Worksheet worksheet = null;
423 422

  
424
                        for (int i = 0; i < rev_cnt - 1; i++)
423
                        try
425 424
                        {
426
                            worksheet.Cells[9, 12 + i] = Cell[i];
427
                            Range_O = worksheet.Range[Range[i]];
428
                            border_ = Range_O.Borders;
429
                            border_.LineStyle = Range_I.Borders.LineStyle;
430
                            border_.Weight = Range_I.Borders.Weight;
431
                            Range_O.Interior.Color = Range_I.Interior.Color;
432
                        }
425
                            // 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;
433 447

  
434
                        worksheet.Range[worksheet.Cells[8, 11], worksheet.Cells[8, 11 + rev_cnt - 1]].Merge();
448
                            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");
435 451

  
436
                        if (rev_cnt != 1)
437
                        {
438
                            Ran = Range[rev_cnt - 2].Substring(0, Range[rev_cnt - 2].Length - 1);
439
                        }
440
                        Excel.Range iRange = worksheet.Range["B10:" + Ran + "10"];
452
                            Excel.Range Range_I = worksheet.Range["K9"];
453
                            Excel.Range Range_O = null;
454
                            Excel.Borders border_ = null;
441 455

  
442
                        //필터 기능 추가
443
                        Excel.Range Filter_Range = worksheet.Range["B9:" + Ran + "9"];
444
                        Filter_Range.AutoFilter(1, Type.Missing, Excel.XlAutoFilterOperator.xlAnd, Type.Missing, true);
456
                            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";
445 460

  
446
                        Lists.ForEach(data =>
447
                        {
448
                            h++;
461
                            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
                            }
449 470

  
450
                            Excel.Range oRange = worksheet.Range["B" + h + ":" + Ran + h];
451
                            oRange.RowHeight = iRange.RowHeight;
452
                            Excel.Borders border = oRange.Borders;
453
                            border.LineStyle = Excel.XlLineStyle.xlContinuous;
454
                            border.Weight = 2d;
471
                            worksheet.Range[worksheet.Cells[8, 11], worksheet.Cells[8, 11 + rev_cnt - 1]].Merge();
455 472

  
456
                            if (data.IMAGE_PATH != null)
473
                            if (rev_cnt != 1)
457 474
                            {
458
                                Excel.Range ImageRange = worksheet.Cells[h, w + 2];
475
                                Ran = Range[rev_cnt - 2].Substring(0, Range[rev_cnt - 2].Length - 1);
476
                            }
477
                            Excel.Range iRange = worksheet.Range["B10:" + Ran + "10"];
459 478

  
460
                                System.Drawing.Image I_Image = byteArrayToImage(data.IMAGE_PATH);
461
                                System.Drawing.Image o_Image = Resize(I_Image, 80, 80);
462
                                System.Windows.Forms.Clipboard.SetDataObject(o_Image, true);
479
                            //필터 기능 추가
480
                            Excel.Range Filter_Range = worksheet.Range["B9:" + Ran + "9"];
481
                            Filter_Range.AutoFilter(1, Type.Missing, Excel.XlAutoFilterOperator.xlAnd, Type.Missing, true);
463 482

  
464
                                ImageRange.Cells.HorizontalAlignment = Excel.XlHAlign.xlHAlignCenterAcrossSelection;
465
                                ImageRange.Cells.VerticalAlignment = Excel.XlHAlign.xlHAlignCenter;
483
                            Lists.ForEach(data =>
484
                            {
485
                                h++;
466 486

  
467
                                worksheet.Paste(ImageRange.Cells, "TEST");
487
                                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;
468 492

  
469
                                foreach (Microsoft.Office.Interop.Excel.Shape shp in worksheet.Shapes)
493
                                if (data.IMAGE_PATH != null)
470 494
                                {
471
                                    if (shp.TopLeftCell.Address != ImageRange.Address)
472
                                        continue;
495
                                    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");
473 505

  
474
                                    double Left = shp.TopLeftCell.Left + (shp.TopLeftCell.Width - shp.Width) / 2;
475
                                    double Top = shp.TopLeftCell.Top + (shp.TopLeftCell.Height - shp.Height) / 2;
506
                                    foreach (Microsoft.Office.Interop.Excel.Shape shp in worksheet.Shapes)
507
                                    {
508
                                        if (shp.TopLeftCell.Address != ImageRange.Address)
509
                                            continue;
476 510

  
477
                                    shp.Left = float.Parse(Left.ToString());
478
                                    shp.Top = float.Parse(Top.ToString());
511
                                        double Left = shp.TopLeftCell.Left + (shp.TopLeftCell.Width - shp.Width) / 2;
512
                                        double Top = shp.TopLeftCell.Top + (shp.TopLeftCell.Height - shp.Height) / 2;
479 513

  
480
                                    break;
514
                                        shp.Left = float.Parse(Left.ToString());
515
                                        shp.Top = float.Parse(Top.ToString());
516

  
517
                                        break;
518
                                    }
481 519
                                }
482
                            }
483 520

  
484
                            #region Excel Bind
485
                            worksheet.Cells[h, w] = data.REVISION;
486
                            worksheet.Cells[h, w + 1] = data.PAGENUMBER;
487
                            worksheet.Cells[h, w + 3] = data.TODOLIST;
488
                            worksheet.Cells[h, w + 4] = data.STATUS.ToUpper() == "TRUE" ? "closed" : "open";
489
                            worksheet.Cells[h, w + 5] = data.STATUS_DESC;
490
                            worksheet.Cells[h, w + 6] = data.VENDOR;
491
                            worksheet.Cells[h, w + 7] = data.REMARK;
492
                            worksheet.Cells[h, w + 8] = data.REPLY;
493
                            worksheet.Cells[h, w + 9] = data.REV_0 == null ? "" : data.REV_0.Replace("", " / ");
494
                            worksheet.Cells[h, w + 10] = data.REV_1 == null ? "" : data.REV_1.Replace("", " / ");
495
                            worksheet.Cells[h, w + 11] = data.REV_2 == null ? "" : data.REV_2.Replace("", " / ");
496
                            worksheet.Cells[h, w + 12] = data.REV_3 == null ? "" : data.REV_3.Replace("", " / ");
497
                            worksheet.Cells[h, w + 13] = data.REV_4 == null ? "" : data.REV_4.Replace("", " / ");
498
                            worksheet.Cells[h, w + 14] = data.REV_5 == null ? "" : data.REV_5.Replace("", " / ");
499
                            worksheet.Cells[h, w + 15] = data.REV_6 == null ? "" : data.REV_6.Replace("", " / ");
500
                            worksheet.Cells[h, w + 16] = data.REV_7 == null ? "" : data.REV_7.Replace("", " / ");
501
                            worksheet.Cells[h, w + 17] = data.REV_8 == null ? "" : data.REV_8.Replace("", " / ");
502
                            worksheet.Cells[h, w + 18] = data.REV_9 == null ? "" : data.REV_9.Replace("", " / ");
503
                            worksheet.Cells[h, w + 19] = data.REV_10 == null ? "" : data.REV_10.Replace("", " / ");
504
                            worksheet.Cells[h, w + 20] = data.REV_11 == null ? "" : data.REV_11.Replace("", " / ");
505
                            worksheet.Cells[h, w + 21] = data.REV_12 == null ? "" : data.REV_12.Replace("", " / ");
506
                            worksheet.Cells[h, w + 22] = data.REV_13 == null ? "" : data.REV_13.Replace("", " / ");
507
                            worksheet.Cells[h, w + 23] = data.REV_14 == null ? "" : data.REV_14.Replace("", " / ");
508
                            worksheet.Cells[h, w + 24] = data.REV_15 == null ? "" : data.REV_15.Replace("", " / ");
509
                            worksheet.Cells[h, w + 25] = data.REV_16 == null ? "" : data.REV_16.Replace("", " / ");
510
                            worksheet.Cells[h, w + 26] = data.REV_17 == null ? "" : data.REV_17.Replace("", " / ");
511
                            worksheet.Cells[h, w + 27] = data.REV_18 == null ? "" : data.REV_18.Replace("", " / ");
512
                            worksheet.Cells[h, w + 28] = data.REV_19 == null ? "" : data.REV_19.Replace("", " / ");
513
                            #endregion
514
                        });
515

  
516
                        worksheet.Columns.AutoFit();
517
                        // 엑셀파일 저장
518
                        workbook.Save();
519
                        workbook.Close(true);
520
                        application.Quit();
521
                    }
522
                    finally
523
                    {
524
                        System.Diagnostics.Process[] ExCel = System.Diagnostics.Process.GetProcessesByName("EXCEL");
525
                        if (ExCel.Count() != 0)
526
                        {
527
                            ExCel[0].Kill();
521
                                #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();
528 558
                        }
559
                        finally
560
                        {
561
                            System.Diagnostics.Process[] ExCel = System.Diagnostics.Process.GetProcessesByName("EXCEL");
562
                            if (ExCel.Count() != 0)
563
                            {
564
                                ExCel[0].Kill();
565
                            }
529 566

  
530
                        // Clean up
531
                        ReleaseExcelObject(worksheet);
532
                        ReleaseExcelObject(workbook);
533
                        ReleaseExcelObject(application);
567
                            // Clean up
568
                            ReleaseExcelObject(worksheet);
569
                            ReleaseExcelObject(workbook);
570
                            ReleaseExcelObject(application);
571
                        }
534 572
                    }
573
                    DialogMessage_Alert("Success");
535 574
                }
536
                DialogMessage_Alert("Success");
575

  
576
                this.ExportIndy.IsBusy = false;
577
            }
578
            catch (Exception ex)
579
            {
580
                Logger.sendResLog("CheckList ExportEvent", ex.Message, 0);
537 581
            }
538 582

  
539
            this.ExportIndy.IsBusy = false;
540 583
        }
541 584

  
542 585
        public System.Drawing.Image byteArrayToImage(byte[] byteArrayIn)
......
551 594
        {
552 595
            //if (onlyResizeIfWider && image.Width <= newWidth) newWidth = image.Width;
553 596

  
554
            var newHeight = image.Height * newWidth / image.Width;
555
            if (newHeight > maxHeight)
597
            try
556 598
            {
557
                // Resize with height instead  
558
                newWidth = image.Width * maxHeight / image.Height;
559
                newHeight = maxHeight;
560
            }
599
                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
                }
561 606

  
562
            var res = new System.Drawing.Bitmap(newWidth, newHeight);
607
                var res = new System.Drawing.Bitmap(newWidth, newHeight);
563 608

  
564
            using (var graphic = System.Drawing.Graphics.FromImage(res))
609
                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)
565 620
            {
566
                graphic.InterpolationMode = System.Drawing.Drawing2D.InterpolationMode.HighQualityBicubic;
567
                graphic.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.HighQuality;
568
                graphic.PixelOffsetMode = System.Drawing.Drawing2D.PixelOffsetMode.HighQuality;
569
                graphic.CompositingQuality = System.Drawing.Drawing2D.CompositingQuality.HighQuality;
570
                graphic.DrawImage(image, 0, 0, newWidth, newHeight);
621
                Logger.sendResLog("Resize", ex.Message, 0);
622
                return null;
571 623
            }
572 624

  
573
            return res;
625

  
626

  
574 627
        }
575 628

  
576 629
        private static void ReleaseExcelObject(object obj)
......
604 657

  
605 658
        private void CheckList_Loaded(object sender, RoutedEventArgs e)
606 659
        {
607
            Current_DocNo = (Application.Current.MainWindow as MainWindow).dzMainMenu._DocItem.DOCUMENT_NO;
608
            Current_Revision = (Application.Current.MainWindow as MainWindow).dzMainMenu._DocItem.REVISION;
609
            Current_Slip = int.Parse((Application.Current.MainWindow as MainWindow).dzMainMenu._DocItem.GROUP_NO);
610

  
611
            string project_no = App.ViewInfo.ProjectNO;
612

  
613
            Logger.sendReqLog("GetPreRevSelect: ", project_no + "," + Current_DocNo + "," + Current_Revision, 1);
614

  
615
            List<DOCUMENT_ITEM> list = Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.BaseClient.GetPreRevSelect(project_no, Current_DocNo, Current_Revision);
616
            if (list.Count() > 0)
617
            {
618
                Logger.sendResLog("GetPreRevSelect", "TRUE", 1);
619
            }
620
            else
621
            {
622
                Logger.sendResLog("GetPreRevSelect", "FALSE", 1);
623
            }
624
            foreach (var I in list)
625
            {
626
                if (int.Parse(I.GROUP_NO) < Current_Slip)
627
                {
628
                    old_Revision = I.REVISION;
629
                    old_DocID = I.DOCUMENT_ID;
630
                    return;
631
                }
632
            }            
660
            DataBind();
661
            this.tb.ItemsSource = null;
662
            this.tb.ItemsSource = Lists;
663
            History_Set();
633 664
        }
634 665

  
635 666
        private void RadGridView_Loaded(object sender, RoutedEventArgs e)
......
644 675

  
645 676
        private void AddEvent(object sender, RoutedEventArgs e)
646 677
        {
647
            Application.Current.MainWindow.Focus();
678
            try
679
            {
680
                Application.Current.MainWindow.Focus();
681

  
682
                Common.ViewerDataModel.Instance.CheckList_ID = KCOM.Events.Save.shortGuid();
683
                Common.ViewerDataModel.Instance.Capture_Opacity = 0.5;
684
                (Application.Current.MainWindow as MainWindow).dzMainMenu.mouseHandlingMode = IKCOM.MouseHandlingMode.Capture;
685
            }
686
            catch (Exception ex)
687
            {
688
                Logger.sendResLog("Checklist Addevent", ex.Message, 0);
689
            }
648 690

  
649
            Common.ViewerDataModel.Instance.CheckList_ID = KCOM.Events.Save.shortGuid();
650
            Common.ViewerDataModel.Instance.Capture_Opacity = 0.5;
651
            (Application.Current.MainWindow as MainWindow).dzMainMenu.mouseHandlingMode = IKCOM.MouseHandlingMode.Capture;
652 691
        }
653 692

  
654 693
        private void SaveEvent(object sender, RoutedEventArgs e)
655 694
        {
656
            CHECK_LIST Check_value = new CHECK_LIST();
657
            CHECK_LIST_HISTORY Check_History = new CHECK_LIST_HISTORY();
658

  
659
            foreach (var item in tb.Items)
695
            try
660 696
            {
661
                string Check_ID = (item as Customer).ID.ToString();
662
                string state = "";
663

  
664
                Logger.sendReqLog("GetCheckList: ", App.ViewInfo.ProjectNO + "," + Check_ID , 1);
665
                Check_value = Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.BaseClient.GetCheckList(App.ViewInfo.ProjectNO, Check_ID);
666
                if (Check_value != null)
697
                if ((Application.Current.MainWindow as MainWindow).dzMainMenu.mouseHandlingMode == MouseHandlingMode.Capture)
667 698
                {
668
                    Logger.sendResLog("GetCheckList", "TRUE", 1);
669
                }
670
                else
671
                {
672
                    Logger.sendResLog("GetCheckList", "FALSE", 1);
699
                    DialogMessage_Alert("Capture중 입니다.");
700
                    return;
673 701
                }
702
                CHECK_LIST Check_value = new CHECK_LIST();
703
                CHECK_LIST_HISTORY Check_History = new CHECK_LIST_HISTORY();
674 704

  
675
                if (Check_value != null)
705
                foreach (var item in tb.Items)
676 706
                {
677
                    if ((item as Customer).STATUS.ToUpper() == "TRUE")
707
                    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)
678 713
                    {
679
                        state = "Closed";
680
                        Check_value.STATUS_DESC_CLOSE = (item as Customer).STATUS_DESC;
681
                     }
714
                        Logger.sendResLog("GetCheckList", "TRUE", 1);
715
                    }
682 716
                    else
683 717
                    {
684
                        state = "Open";
685
                        Check_value.STATUS_DESC_OPEN = (item as Customer).STATUS_DESC;
718
                        Logger.sendResLog("GetCheckList", "FALSE", 1);
686 719
                    }
687 720

  
688
                    string Rev = state + "" + DateTime.Now.ToString("yyyy.MM.dd");
689
                    string description = "";
690

  
691
                    if (char.Parse(ViewerDataModel.Instance.SystemMain.dzMainMenu.CurrentDoc.Revision) >= char.Parse(Check_value.REVISION))
721
                    if (Check_value != null)
692 722
                    {
693
                        Check_value.REMARK = (item as Customer).REMARK;
694
                        Check_value.STATUS = (item as Customer).STATUS;
695
                        Check_value.TODOLIST = (item as Customer).TODOLIST;
696
                        Check_value.VENDOR = (item as Customer).VENDOR;
697
                        Check_value.REPLY = (item as Customer).REPLY;
698

  
699
                        if ((item as Customer).STATUS == "False")
700
                            description = Check_value.STATUS_DESC_OPEN;
701
                        else
702
                            description = Check_value.STATUS_DESC_CLOSE;
703

  
704
                        Logger.sendReqLog("GetCheckListHistory: ", App.ViewInfo.ProjectNO + "," + Check_ID, 1);
705
                        var history = Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.BaseClient.GetCheckListHistory(App.ViewInfo.ProjectNO, Check_ID);                        
706
                        if (history.Count() > 0)
723
                        if ((item as Customer).STATUS.ToUpper() == "TRUE")
707 724
                        {
708
                            Logger.sendResLog("GetCheckList", "TRUE", 1);
725
                            state = "Closed";
726
                            Check_value.STATUS_DESC_CLOSE = (item as Customer).STATUS_DESC;
709 727
                        }
710 728
                        else
711 729
                        {
712
                            Logger.sendResLog("GetCheckList", "FALSE", 1);
730
                            state = "Open";
731
                            Check_value.STATUS_DESC_OPEN = (item as Customer).STATUS_DESC;
713 732
                        }
714
                        Check_History = history.Where(info => info.REVISION == ViewerDataModel.Instance.SystemMain.dzMainMenu.CurrentDoc.Revision).FirstOrDefault();
715 733

  
716
                        List<string> validation = new List<string>();
734
                        string Rev = state + "" + DateTime.Now.ToString("yyyy.MM.dd");
735
                        string description = "";
717 736

  
718
                        foreach (var his in history)
737
                        if (char.Parse(ViewerDataModel.Instance.SystemMain.dzMainMenu.CurrentDoc.Revision) >= char.Parse(Check_value.REVISION))
719 738
                        {
720
                            if (his.TODOLIST == Check_value.TODOLIST)
721
                                validation.Add("TODOLIST");
722
                            if (his.STATUS_DESC == description)
723
                                validation.Add("STATUS_DESC");
724
                            if (his.VENDOR == Check_value.VENDOR)
725
                                validation.Add("VENDOR");
726
                            if (his.REMARK == Check_value.REMARK)
727
                                validation.Add("REMARK");
728
                            if (his.REPLY == Check_value.REPLY)
729
                                validation.Add("REPLY");
730
                        }
739
                            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;
731 749

  
732
                        if (validation.Count < 5)
733
                        {
734
                            if (Check_History == null)
750
                            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)
735 753
                            {
736
                                Check_History = new CHECK_LIST_HISTORY()
737
                                {
738
                                    ID = Events.Save.shortGuid(),
739
                                    CHECKLIST_ID = Check_ID,
740
                                    REVISION = ViewerDataModel.Instance.SystemMain.dzMainMenu.CurrentDoc.Revision,
741
                                    STATUS = state,
742
                                    IMAGE_URL = Check_value.IMAGE_URL,
743
                                    STATUS_DESC = validation.Where(i => i.ToString() == "STATUS_DESC").FirstOrDefault() == null ? description : "",
744
                                    TODOLIST = validation.Where(i => i.ToString() == "TODOLIST").FirstOrDefault() == null ? Check_value.TODOLIST : "",
745
                                    VENDOR = validation.Where(i => i.ToString() == "VENDOR").FirstOrDefault() == null ? Check_value.VENDOR : "",
746
                                    REMARK = validation.Where(i => i.ToString() == "REMARK").FirstOrDefault() == null ? Check_value.REMARK : "",
747
                                    REPLY = validation.Where(i => i.ToString() == "REPLY").FirstOrDefault() == null ? Check_value.REPLY : "",
748
                                    CREATE_TIME = DateTime.Now,
749
                                    UPDATE_TIME = DateTime.Now
750
                                };
751

  
752
                                Logger.sendReqLog("AddCheckListHistory: ", App.ViewInfo.ProjectNO + "," + Check_History, 1);                              
753
                                Logger.sendResLog("AddCheckListHistory", Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.BaseClient.AddCheckListHistory(App.ViewInfo.ProjectNO, Check_History).ToString(), 1);                                
754
                                //Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.BaseClient.AddCheckListHistory(App.ViewInfo.ProjectNO, Check_History);
755
                                
756
                                Check_value.REVISION = Current_Revision;
754
                                Logger.sendResLog("GetCheckList", "TRUE", 1);
757 755
                            }
758 756
                            else
759 757
                            {
760
                                Check_History.IMAGE_URL = Check_value.IMAGE_URL;
761
                                Check_History.STATUS = state;
762
                                Check_History.TODOLIST = Check_value.TODOLIST;
763
                                Check_History.VENDOR = Check_value.VENDOR;
764
                                Check_History.REMARK = Check_value.REMARK;
765
                                Check_History.REPLY = Check_value.REPLY;
766
                                Check_History.UPDATE_TIME = DateTime.Now;
767
                                if(state == "Open")
758
                                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)
768 781
                                {
769
                                    Check_History.STATUS_DESC = Check_value.STATUS_DESC_OPEN;
782
                                    Check_History = new CHECK_LIST_HISTORY()
783
                                    {
784
                                        ID = Events.Save.shortGuid(),
785
                                        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;
770 803
                                }
771 804
                                else
772 805
                                {
773
                                    Check_History.STATUS_DESC = Check_value.STATUS_DESC_CLOSE;
806
                                    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);
774 826
                                }
775
                                
776
                                Logger.sendReqLog("SaveCheckListHistory: ", App.ViewInfo.ProjectNO + "," + ViewerDataModel.Instance.SystemMain.dzMainMenu.CurrentDoc.Revision + "," + Check_History, 1);
777
                                Logger.sendResLog("SaveCheckListHistory", Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.BaseClient.SaveCheckListHistory(App.ViewInfo.ProjectNO, ViewerDataModel.Instance.SystemMain.dzMainMenu.CurrentDoc.Revision, Check_History).ToString(), 1);
778
                                
779
                                //Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.BaseClient.SaveCheckListHistory(App.ViewInfo.ProjectNO, ViewerDataModel.Instance.SystemMain.dzMainMenu.CurrentDoc.Revision, Check_History);
780 827
                            }
828
                            validation = new List<string>();
781 829
                        }
782
                        validation = new List<string>();
783 830
                    }
831

  
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);
784 835
                }
785 836

  
786
                Logger.sendReqLog("SaveCheckList: ", App.ViewInfo.ProjectNO + "," + Check_ID + "," + Check_value, 1);
787
                Logger.sendResLog("SaveCheckList", Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.BaseClient.SaveCheckList(App.ViewInfo.ProjectNO, Check_ID, Check_value).ToString(), 1);
788
                //Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.BaseClient.SaveCheckList(App.ViewInfo.ProjectNO, Check_ID, Check_value);
837
                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);
789 847
            }
790
            
791
            DataBind();
792
            tb.ItemsSource = null;
793
            tb.ItemsSource = Lists;
794
            History_Set();
795 848

  
796
            DialogMessage_Alert("Success");            
797 849
        }
798 850

  
799 851
        private void CheckListEvent(object sender, RoutedEventArgs e)
......
852 904

  
853 905
            //Common.ViewerDataModel.Instance.CheckList_ID = ((e.Source as Telerik.Windows.Controls.RadButton).DataContext as Customer).ID;
854 906
            Common.ViewerDataModel.Instance.CheckList_ID = ((e.Source as Image).DataContext as Customer).ID;
907
            //Common.ViewerDataModel.Instance.PageNumber = ((e.Source as Image).DataContext as Customer).PAGENUMBER;
855 908
            Application.Current.MainWindow.Focus();
856 909
            Common.ViewerDataModel.Instance.Capture_Opacity = 0.49;
857 910
            (Application.Current.MainWindow as MainWindow).dzMainMenu.mouseHandlingMode = IKCOM.MouseHandlingMode.Capture;
......
872 925

  
873 926
        private void tb_IsVisibleChanged(object sender, DependencyPropertyChangedEventArgs e)
874 927
        {
875
            if(ViewerDataModel.Instance.Capture_Opacity == 0)
876
                return;
877
            
878
            DataBind();
879
            tb.ItemsSource = null;
880
            tb.ItemsSource = Lists.OrderBy(info => info.CREATE_TIME);
881
            //tb1.ItemsSource = Lists.OrderBy(info => info.CREATE_TIME);
882

  
883
            if (ViewerDataModel.Instance.Capture_Opacity == 0.5)
928
            try
884 929
            {
885
                tb.SortDescriptors.Clear();
886
                tb.FilterDescriptors.Clear();
930
                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);
887 937

  
888
                var scrollViewer = this.tb.ChildrenOfType<GridViewScrollViewer>().FirstOrDefault();
889
                if (scrollViewer != null)
938
                if (ViewerDataModel.Instance.Capture_Opacity == 0.5)
890 939
                {
891
                    //this.tb.ChildrenOfType<GridViewScrollViewer>().FirstOrDefault().ScrollToVerticalOffset(this.tb.ChildrenOfType<GridViewScrollViewer>().FirstOrDefault().ExtentHeight);
892
                    //this.tb1.ChildrenOfType<GridViewScrollViewer>().FirstOrDefault().ScrollToVerticalOffset(this.tb.ChildrenOfType<GridViewScrollViewer>().FirstOrDefault().ExtentHeight);
940
                    tb.SortDescriptors.Clear();
941
                    tb.FilterDescriptors.Clear();
893 942

  
894
                    tb.ScrollIndexIntoView(tb.Items.Count - 1);
895
                    tb.CurrentCellInfo = new GridViewCellInfo(tb.Items[tb.Items.Count - 1], tb.Columns["TODOLIST"]);
896
                    tb.Focus();
943
                    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);
897 948

  
949
                        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
                    }
898 954
                }
899 955
            }
956
            catch (Exception ex)
957
            {
958
                Logger.sendResLog("tb_IsVisibleChanged", ex.Message, 0);
959
            }
960

  
900 961
        }
901 962

  
902 963
        private void Radio_Open_Checked(object sender, RoutedEventArgs e)
903 964
        {
904
            (e.Source as RadioButton).Foreground = Brushes.Red;
905
            (e.Source as RadioButton).FontWeight = FontWeights.Bold;
906

  
907
            if ((((e.OriginalSource as RadioButton).Parent as StackPanel).Parent as GridViewCell).ParentRow.Item != null)
965
            try
908 966
            {
909
                ((((e.OriginalSource as RadioButton).Parent as StackPanel).Parent as GridViewCell).ParentRow.Item as Customer)._STATUS = "Open";
910
            }
967
                (e.Source as RadioButton).Foreground = Brushes.Red;
968
                (e.Source as RadioButton).FontWeight = FontWeights.Bold;
911 969

  
912
            if (Isinit)
913
            {
914
                Isinit = false;
915
                if ((e.Source as RadioButton).DataContext != null)
970
                if ((((e.OriginalSource as RadioButton).Parent as StackPanel).Parent as GridViewCell).ParentRow.Item != null)
916 971
                {
917
                    if (((e.Source as RadioButton).DataContext as Customer).STATUS_DESC != "Vendor 반영 필요")
972
                    ((((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)
918 979
                    {
919
                        ((e.Source as RadioButton).DataContext as Customer).STATUS_DESC = "Vendor 반영 필요";
980
                        if (((e.Source as RadioButton).DataContext as Customer).STATUS_DESC != "Vendor 반영 필요")
981
                        {
982
                            ((e.Source as RadioButton).DataContext as Customer).STATUS_DESC = "Vendor 반영 필요";
920 983

  
921
                        tb.Rebind();
984
                            tb.Rebind();
985
                        }
922 986
                    }
923 987
                }
924 988
            }
989
            catch (Exception ex)
990
            {
991
                Logger.sendResLog("Radio_Open_Checked", ex.Message, 0);
992
            }
993

  
925 994
        }
926 995

  
927 996
        private void Radio_Close_Checked(object sender, RoutedEventArgs e)
928 997
        {
929
            if (Isinit)
998
            try
930 999
            {
931
                if (!isCheck_Status)
1000
                if (Isinit)
932 1001
                {
933
                    Select_StatusID = ((e.Source as RadioButton).DataContext as Customer).ID;
1002
                    if (!isCheck_Status)
1003
                    {
1004
                        Select_StatusID = ((e.Source as RadioButton).DataContext as Customer).ID;
934 1005

  
935
                    isCheck_Status = true;
1006
                        isCheck_Status = true;
936 1007

  
937
                    RadWindow CheckPop = new RadWindow();
1008
                        RadWindow CheckPop = new RadWindow();
938 1009

  
939
                    CheckList_Status check = new CheckList_Status();
1010
                        CheckList_Status check = new CheckList_Status();
940 1011

  
941
                    CheckPop = new RadWindow
942
                    {
943
                        MinWidth = 350,
944
                        MinHeight = 150,
945
                        Header = "Status Description을 입력하세요",
946
                        Content = check,
947
                        ResizeMode = System.Windows.ResizeMode.NoResize,
948
                        WindowStartupLocation = System.Windows.WindowStartupLocation.CenterScreen,
949
                        IsTopmost = true,
950
                    };
951
                    StyleManager.SetTheme(CheckPop, new Office2013Theme());
952
                    CheckPop.Closed += CheckPop_Closed;
953
                    CheckPop.Show();
954

  
955
                    Isinit = false;
956
                    tb.Rebind();
1012
                        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
                    }
957 1029
                }
958
            }
959 1030

  
960 1031
            (e.Source as RadioButton).FontWeight = FontWeights.Bold;
961 1032

  
962
            if ((((e.OriginalSource as RadioButton).Parent as StackPanel).Parent as GridViewCell).ParentRow.Item != null)
1033
                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
            catch (Exception ex)
963 1039
            {
964
                ((((e.OriginalSource as RadioButton).Parent as StackPanel).Parent as GridViewCell).ParentRow.Item as Customer)._STATUS = "Close";
1040
                Logger.sendResLog("Radio_Close_Checked", ex.Message, 0);
965 1041
            }
1042

  
966 1043
        }
967 1044

  
968 1045
        private void CheckPop_Closed(object sender, WindowClosedEventArgs e)
969 1046
        {
970
            isCheck_Status = false;
971

  
972
            foreach(var item in tb.Items)
1047
            try
973 1048
            {
974
                if(Select_StatusID == (item as Customer).ID.ToString())
1049
                isCheck_Status = false;
1050

  
1051
                foreach (var item in tb.Items)
975 1052
                {
976
                    if (ViewerDataModel.Instance.CheckStatus != "" && ViewerDataModel.Instance.CheckStatus != null)
977
                    {
978
                        (item as Customer).STATUS_DESC = ViewerDataModel.Instance.CheckStatus;
979
                    }
980
                    else
1053
                    if (Select_StatusID == (item as Customer).ID.ToString())
981 1054
                    {
982
                        (item as Customer).STATUS = "False";
983
                        (item as Customer)._STATUS = "Open";
984
                        (item as Customer).STATUS_ = "True";
985
                    }
1055
                        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
                        }
986 1065

  
987
                    ViewerDataModel.Instance.CheckStatus = "";
988
                    Select_StatusID = "";
989
                    tb.Rebind();
990
                    return;
1066
                        ViewerDataModel.Instance.CheckStatus = "";
1067
                        Select_StatusID = "";
1068
                        tb.Rebind();
1069
                        return;
1070
                    }
991 1071
                }
992 1072
            }
1073
            catch (Exception ex)
1074
            {
1075
                Logger.sendResLog("CheckPop_Closed", ex.Message, 0);
1076
            }
1077

  
993 1078

  
994 1079
        }
995 1080

  
996 1081
        private void Radio_Unchecked(object sender, RoutedEventArgs e)
997 1082
        {
998
            (e.Source as RadioButton).Foreground = Brushes.Black;
999
            (e.Source as RadioButton).FontWeight = FontWeights.Normal;
1083
            try
1084
            {
1085
                (e.Source as RadioButton).Foreground = Brushes.Black;
1086
                (e.Source as RadioButton).FontWeight = FontWeights.Normal;
1087
            }
1088
            catch (Exception ex)
1089
            {
1090
                Logger.sendResLog("Radio_Unchecked", ex.Message, 0);
1091
            }
1092

  
1000 1093
        }
1001 1094

  
1002 1095
        private void mousedownOnImage(object sender, MouseButtonEventArgs args)
1003 1096
        {
1004
            if(args.OriginalSource as TextBlock != null && (args.OriginalSource as TextBlock).Parent != null)
1097
            try
1005 1098
            {
1006
                if((args.OriginalSource as TextBlock).Parent.GetType().Name == "GridViewHeaderCell")
1099
                if (args.OriginalSource as TextBlock != null && (args.OriginalSource as TextBlock).Parent != null)
1007 1100
                {
1008
                    Isinit = false;
1009
                    return;
1101
                    if ((args.OriginalSource as TextBlock).Parent.GetType().Name == "GridViewHeaderCell")
1102
                    {
1103
                        Isinit = false;
1104
                        return;
1105
                    }
1010 1106
                }
1011
            }
1012 1107

  
1013
            Isinit = true;
1108
                Isinit = true;
1014 1109

  
1015
            RadWindow CheckPop = new RadWindow();
1110
                RadWindow CheckPop = new RadWindow();
1016 1111

  
1017
            if (args.OriginalSource is Image)
1018
            {
1019
                Image img = (args.OriginalSource as Image);
1020
                if (img.Height != 45)
1021
                    return;
1112
                if (args.OriginalSource is Image)
1113
                {
1114
                    Image img = (args.OriginalSource as Image);
1115
                    if (img.Height != 45)
1116
                        return;
1022 1117

  
1023
                CommantImage check = new CommantImage(img);
1118
                    CommantImage check = new CommantImage(img);
1024 1119

  
1025
                CheckPop = new RadWindow
1120
                    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)
1026 1135
                {
1027
                    MinWidth = 500,
1028
                    MinHeight = 500,
1029
                    Header = "Image",
1030
                    Content = check,
1031
                    ResizeMode = System.Windows.ResizeMode.NoResize,
1032
                    WindowStartupLocation = System.Windows.WindowStartupLocation.CenterScreen,
1033
                    IsTopmost = true,
1034
                };
1035
                StyleManager.SetTheme(CheckPop, new Office2013Theme());
1036
                CheckPop.Show();
1037
            }
1038
            
1039
            if (args.OriginalSource as TextBlock == null || (args.OriginalSource as TextBlock).Parent == null || ((args.OriginalSource as TextBlock).Parent) as GridViewCell == null)
1040
            {
1041
                return;
1042
            }
1136
                    return;
1137
                }
1043 1138

  
1044
            if ((((args.OriginalSource as TextBlock).Parent) as GridViewCell).DataColumn.ColumnGroupName.ToString() == "History")
1045
            {
1139
                if ((((args.OriginalSource as TextBlock).Parent) as GridViewCell).DataColumn.ColumnGroupName.ToString() == "History")
1140
                {
1046 1141

  
1047
                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());
1142
                    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());
1048 1143

  
1049
                CheckPop = new RadWindow
1050
                {
1051
                    MinWidth = 800,
1052
                    MinHeight = 400,
1053
                    Header = "Detail",
1054
                    Content = Detail,
1055
                    //ResizeMode = System.Windows.ResizeMode.CanResizeWithGrip,
1056
                    ResizeMode = System.Windows.ResizeMode.NoResize,
1057
                    WindowStartupLocation = System.Windows.WindowStartupLocation.CenterScreen,
1058
                    IsTopmost = true,
1059
                };
1060
                StyleManager.SetTheme(CheckPop, new Office2013Theme());
1061
                //CheckPop.ShowDialog();
1062
                CheckPop.Show();
1144
                    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
            catch (Exception ex)
1161
            {
1162
                Logger.sendResLog("mousedownOnImage", ex.Message, 0);
1063 1163
            }
1064 1164

  
1165

  
1065 1166
        }
1066 1167

  
1067 1168
        private void SyncEvent(object sender, MouseButtonEventArgs e)
1068 1169
        {
1069
            old_DocID = ((e.Source as Image).DataContext as Customer).DOCUMENT_ID;
1070
            Logger.sendReqLog("GetVPRevisionFirstOrDefault: ", App.ViewInfo.ProjectNO + "," + old_DocID, 1);         
1071
            var _vpList = Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.BaseClient.GetVPRevisionFirstOrDefault(App.ViewInfo.ProjectNO, old_DocID);
1072
            if(_vpList != null)
1073
            {
1074
                Logger.sendResLog("GetVPRevisionFirstOrDefault", "TRUE", 1);
1075
            }
1076
            else
1170
            try
1077 1171
            {
1078
                Logger.sendResLog("GetVPRevisionFirstOrDefault", "FALSE", 1);
1079
            }
1172
                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

  
1080 1189

  
1081 1190

  
1082
            if (old_DocID == "")
1191
                SyncInit();
1192
                Rect rect = new Rect();
1193
                string[] RectPoint = ((e.Source as Image).DataContext as Customer).IMAGE_ANCHOR.Split(',');
... 이 차이점은 표시할 수 있는 최대 줄수를 초과해서 이 차이점은 잘렸습니다.

내보내기 Unified diff

클립보드 이미지 추가 (최대 크기: 500 MB)