프로젝트

일반

사용자정보

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

markus / KCOM / Events / ConsolidateCommand.cs @ e31e5b1b

이력 | 보기 | 이력해설 | 다운로드 (3.04 KB)

1
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
using System.Threading.Tasks;
12
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
        public async Task<bool> ExecuteAsync(List<MarkupInfoItem> InfoList, int iPageNo)
44
        {
45
            bool result = false;
46

    
47
            try
48
            {
49
                //SelectionSet.Instance.UnSelect(Common.ViewerDataModel.Instance.SystemMain.dzMainMenu);
50
                //// update mylist and gridview
51
                //Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.UpdateMyMarkupList();
52

    
53
                //Common.ViewerDataModel.Instance.SystemMain.dzTopMenu.ExecuteSaveCommand(Common.ViewerDataModel.Instance.SystemMain.dzMainMenu);
54

    
55
                ViewerDataModel.Instance.IsConsolidate = true;
56
                string sDocID = Common.ViewerDataModel.Instance.SystemMain.dzMainMenu._DocInfo.ID;
57
                /// 현재 작업 내용을 저장
58
                //Common.ViewerDataModel.Instance.SystemMain.dzTopMenu._SaveEvent(null, null);
59

    
60

    
61
                ViewerDataModel.Instance.IsConsolidate = false;
62

    
63
                //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

    
66
                result = await Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.BaseTaskClient.ConsolidateAsync(App.ViewInfo.ProjectNO, App.ViewInfo.UserID, sDocID, InfoList);
67

    
68
                //Logger.sendReqLog("GetMarkupInfoItemsAsync", App.ViewInfo.ProjectNO + "," + sDocID, 1);
69
                if (result)
70
                {
71
                    Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.BaseClient.GetMarkupInfoItemsAsync(App.ViewInfo.ProjectNO, sDocID);
72
                }
73
            }
74
            catch (Exception ex)
75
            {
76
                App.FileLogger.Error(ex);
77

    
78
                Common.ViewerDataModel.Instance.SystemMain.DialogMessage_Alert(string.Format("{0}", ex.StackTrace), "Alert");
79
                throw ex;
80
            }
81

    
82
            return result;
83
        }
84
    }
85
}
클립보드 이미지 추가 (최대 크기: 500 MB)