markus / KCOM / Events / TeamConsolidateCommand.cs @ a1cc6e1f
이력 | 보기 | 이력해설 | 다운로드 (2.84 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 TeamConsolidateCommand |
17 |
{ |
18 |
private static readonly TeamConsolidateCommand _instance = new TeamConsolidateCommand(); |
19 |
|
20 |
// Explicit static constructor to tell C# compiler |
21 |
// not to mark type as beforefieldinit |
22 |
static TeamConsolidateCommand() |
23 |
{ |
24 |
} |
25 |
|
26 |
private TeamConsolidateCommand() |
27 |
{ |
28 |
} |
29 |
|
30 |
public static TeamConsolidateCommand 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 |
public void Execute(List<MarkupInfoItem> MarkupInfoList) |
43 |
{ |
44 |
try |
45 |
{ |
46 |
|
47 |
ViewerDataModel.Instance.IsConsolidate = true; |
48 |
/// save current working controls |
49 |
//Common.ViewerDataModel.Instance.SystemMain.dzTopMenu._SaveEvent(null, null); |
50 |
//Common.ViewerDataModel.Instance.SystemMain.dzTopMenu.ExecuteSaveCommand(Common.ViewerDataModel.Instance.SystemMain.dzMainMenu); |
51 |
|
52 |
ViewerDataModel.Instance.IsConsolidate = false; |
53 |
|
54 |
string doc_id = Common.ViewerDataModel.Instance.SystemMain.dzMainMenu._DocInfo.ID; |
55 |
string user_id = App.ViewInfo.UserID; |
56 |
//Logger.sendReqLog("TeamConsolidate", project_no + "," + user_id + "," + doc_id + "," + MarkupInfoList, 1); |
57 |
//Logger.sendResLog("TeamConsolidate", Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.BaseClient.TeamConsolidate(project_no, user_id, doc_id, MarkupInfoList).ToString(), 1); |
58 |
var result = Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.BaseClient.TeamConsolidate(App.ViewInfo.ProjectNO, user_id, doc_id, MarkupInfoList); |
59 |
//Logger.sendReqLog("GetMarkupInfoItemsAsync", App.ViewInfo.ProjectNO + "," + doc_id, 1); |
60 |
|
61 |
if (result) |
62 |
{ |
63 |
Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.BaseClient.GetMarkupInfoItemsAsync(App.ViewInfo.ProjectNO, doc_id); |
64 |
} |
65 |
else |
66 |
{ |
67 |
Common.ViewerDataModel.Instance.SystemMain.DialogMessage_Alert("System Error", "Alert"); |
68 |
} |
69 |
} |
70 |
catch(Exception ex) |
71 |
{ |
72 |
Common.ViewerDataModel.Instance.SystemMain.DialogMessage_Alert(string.Format("{0}", ex.StackTrace), "Alert"); |
73 |
throw ex; |
74 |
} |
75 |
} |
76 |
} |
77 |
} |