프로젝트

일반

사용자정보

통계
| 브랜치(Branch): | 개정판:

markus / KCOM / Events / ConsolidateCommand.cs @ 1d79913e

이력 | 보기 | 이력해설 | 다운로드 (3.04 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 1d79913e taeseongkim
        public async Task<bool> ExecuteAsync(List<MarkupInfoItem> InfoList, int iPageNo)
44 16a422d1 humkyung
        {
45 1d79913e taeseongkim
            bool result = false;
46 b42dd24d taeseongkim
47 16a422d1 humkyung
            try
48
            {
49 77cdac33 taeseongkim
                //SelectionSet.Instance.UnSelect(Common.ViewerDataModel.Instance.SystemMain.dzMainMenu);
50
                //// update mylist and gridview
51
                //Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.UpdateMyMarkupList();
52 b42dd24d taeseongkim
53 77cdac33 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 1d79913e taeseongkim
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 1d79913e taeseongkim
                result = await Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.BaseTaskClient.ConsolidateAsync(App.ViewInfo.ProjectNO, App.ViewInfo.UserID, sDocID, InfoList);
67 274cde11 taeseongkim
68 664ea2e1 taeseongkim
                //Logger.sendReqLog("GetMarkupInfoItemsAsync", App.ViewInfo.ProjectNO + "," + sDocID, 1);
69 1d79913e taeseongkim
                if (result)
70
                {
71 a7bee7cf taeseongkim
                    Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.BaseClient.GetMarkupInfoItemsAsync(App.ViewInfo.ProjectNO, sDocID);
72 1d79913e taeseongkim
                }
73 16a422d1 humkyung
            }
74
            catch (Exception ex)
75
            {
76 274cde11 taeseongkim
                App.FileLogger.Error(ex);
77
78 16a422d1 humkyung
                Common.ViewerDataModel.Instance.SystemMain.DialogMessage_Alert(string.Format("{0}", ex.StackTrace), "Alert");
79
                throw ex;
80
            }
81 b42dd24d taeseongkim
82
            return result;
83 16a422d1 humkyung
        }
84
    }
85
}
클립보드 이미지 추가 (최대 크기: 500 MB)