markus / KCOM / Events / ConsolidateCommand.cs @ 74abcf6f
이력 | 보기 | 이력해설 | 다운로드 (2.95 KB)
1 | 16a422d1 | humkyung | using IKCOM; |
---|---|---|---|
2 | using KCOM.Common; |
||
3 | using KCOMDataModel.Common; |
||
4 | using KCOMDataModel.DataModel; |
||
5 | using MarkupToPDF.Common; |
||
6 | using MarkupToPDF.Controls.Parsing; |
||
7 | using System; |
||
8 | using System.Collections.Generic; |
||
9 | using System.Linq; |
||
10 | using System.Text; |
||
11 | b42dd24d | taeseongkim | using System.Threading.Tasks; |
12 | 16a422d1 | humkyung | using System.Windows.Controls; |
13 | |||
14 | namespace KCOM.Events |
||
15 | { |
||
16 | public class ConsolidateCommand |
||
17 | { |
||
18 | private static readonly ConsolidateCommand _instance = new ConsolidateCommand(); |
||
19 | |||
20 | // Explicit static constructor to tell C# compiler |
||
21 | // not to mark type as beforefieldinit |
||
22 | static ConsolidateCommand() |
||
23 | { |
||
24 | } |
||
25 | |||
26 | private ConsolidateCommand() |
||
27 | { |
||
28 | } |
||
29 | |||
30 | public static ConsolidateCommand Instance |
||
31 | { |
||
32 | get |
||
33 | { |
||
34 | return _instance; |
||
35 | } |
||
36 | } |
||
37 | |||
38 | /// <summary> |
||
39 | /// save comments related to given markup information |
||
40 | /// </summary> |
||
41 | /// <param name="UserState"></param> |
||
42 | /// <param name="iPageNo"></param> |
||
43 | 1305c420 | taeseongkim | public bool Execute(List<MarkupInfoItem> InfoList, int iPageNo) |
44 | 16a422d1 | humkyung | { |
45 | b42dd24d | taeseongkim | bool result = false; |
46 | |||
47 | 16a422d1 | humkyung | try |
48 | { |
||
49 | b42dd24d | taeseongkim | SelectionSet.Instance.UnSelect(Common.ViewerDataModel.Instance.SystemMain.dzMainMenu); |
50 | // update mylist and gridview |
||
51 | Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.UpdateMyMarkupList(); |
||
52 | |||
53 | 1305c420 | taeseongkim | Common.ViewerDataModel.Instance.SystemMain.dzTopMenu.ExecuteSaveCommand(Common.ViewerDataModel.Instance.SystemMain.dzMainMenu); |
54 | b42dd24d | taeseongkim | |
55 | 8129f2a5 | ljiyeon | ViewerDataModel.Instance.IsConsolidate = true; |
56 | 16a422d1 | humkyung | string sDocID = Common.ViewerDataModel.Instance.SystemMain.dzMainMenu._DocInfo.ID; |
57 | d62c0439 | humkyung | /// 현재 작업 내용을 저장 |
58 | b42dd24d | taeseongkim | //Common.ViewerDataModel.Instance.SystemMain.dzTopMenu._SaveEvent(null, null); |
59 | |||
60 | |||
61 | 8ab0d0b1 | 송근호 | ViewerDataModel.Instance.IsConsolidate = false; |
62 | |||
63 | 664ea2e1 | taeseongkim | //Logger.sendReqLog("Consolidate", App.ViewInfo.ProjectNO + "," + App.ViewInfo.UserID + "," + sDocID + "," + InfoList, 1); |
64 | //Logger.sendResLog("Consolidate", Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.BaseClient.Consolidate(App.ViewInfo.ProjectNO, App.ViewInfo.UserID, sDocID, InfoList).ToString(), 1); |
||
65 | 16a422d1 | humkyung | |
66 | b42dd24d | taeseongkim | result = Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.BaseClient.Consolidate(App.ViewInfo.ProjectNO, App.ViewInfo.UserID, sDocID, InfoList); |
67 | 274cde11 | taeseongkim | |
68 | 664ea2e1 | taeseongkim | //Logger.sendReqLog("GetMarkupInfoItemsAsync", App.ViewInfo.ProjectNO + "," + sDocID, 1); |
69 | 16a422d1 | humkyung | Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.BaseClient.GetMarkupInfoItemsAsync(App.ViewInfo.ProjectNO, sDocID); |
70 | } |
||
71 | catch (Exception ex) |
||
72 | { |
||
73 | 274cde11 | taeseongkim | App.FileLogger.Error(ex); |
74 | |||
75 | 16a422d1 | humkyung | Common.ViewerDataModel.Instance.SystemMain.DialogMessage_Alert(string.Format("{0}", ex.StackTrace), "Alert"); |
76 | throw ex; |
||
77 | } |
||
78 | b42dd24d | taeseongkim | |
79 | return result; |
||
80 | 16a422d1 | humkyung | } |
81 | } |
||
82 | } |