개정판 102476f6
issue #923: add TeamConsolidateCommand
Change-Id: I2426013772bd3f7f129287c33024fc3fa7ef36d9
KCOM/Events/TeamConsolidateCommand.cs | ||
---|---|---|
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.Windows.Controls; |
|
12 |
|
|
13 |
namespace KCOM.Events |
|
14 |
{ |
|
15 |
public class TeamConsolidateCommand |
|
16 |
{ |
|
17 |
private static readonly TeamConsolidateCommand _instance = new TeamConsolidateCommand(); |
|
18 |
|
|
19 |
// Explicit static constructor to tell C# compiler |
|
20 |
// not to mark type as beforefieldinit |
|
21 |
static TeamConsolidateCommand() |
|
22 |
{ |
|
23 |
} |
|
24 |
|
|
25 |
private TeamConsolidateCommand() |
|
26 |
{ |
|
27 |
} |
|
28 |
|
|
29 |
public static TeamConsolidateCommand Instance |
|
30 |
{ |
|
31 |
get |
|
32 |
{ |
|
33 |
return _instance; |
|
34 |
} |
|
35 |
} |
|
36 |
|
|
37 |
/// <summary> |
|
38 |
/// save comments related to given markup information |
|
39 |
/// </summary> |
|
40 |
/// <param name="UserState"></param> |
|
41 |
public void Execute(List<MarkupInfoItem> MarkupInfoList) |
|
42 |
{ |
|
43 |
try |
|
44 |
{ |
|
45 |
ViewerDataModel.Instance.IsConsolidate = true; |
|
46 |
/// save current working controls |
|
47 |
Common.ViewerDataModel.Instance.SystemMain.dzTopMenu._SaveEvent(null, null); |
|
48 |
|
|
49 |
string project_no = App.ViewInfo.ProjectNO; |
|
50 |
string doc_id = Common.ViewerDataModel.Instance.SystemMain.dzMainMenu._DocInfo.ID; |
|
51 |
string user_id = App.ViewInfo.UserID; |
|
52 |
Logger.sendReqLog("TeamConsolidate", project_no + "," + user_id + "," + doc_id + "," + MarkupInfoList, 1); |
|
53 |
Logger.sendResLog("TeamConsolidate", Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.BaseClient.TeamConsolidate(project_no, user_id, doc_id, MarkupInfoList).ToString(), 1); |
|
54 |
|
|
55 |
Logger.sendReqLog("GetMarkupInfoItemsAsync", App.ViewInfo.ProjectNO + "," + doc_id, 1); |
|
56 |
Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.BaseClient.GetMarkupInfoItemsAsync(App.ViewInfo.ProjectNO, doc_id); |
|
57 |
} |
|
58 |
catch(Exception ex) |
|
59 |
{ |
|
60 |
Common.ViewerDataModel.Instance.SystemMain.DialogMessage_Alert(string.Format("{0}", ex.StackTrace), "Alert"); |
|
61 |
throw ex; |
|
62 |
} |
|
63 |
} |
|
64 |
} |
|
65 |
} |
KCOM/KCOM.csproj.user | ||
---|---|---|
2 | 2 |
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
3 | 3 |
<PropertyGroup> |
4 | 4 |
<ReferencePath>C:\Users\Admin\Downloads\KCOM 2018-02-04(통합)\KCOM\x64\;C:\Users\Admin\Downloads\KCOM 2018-02-04(통합)\KCOM\x86\</ReferencePath> |
5 |
<ProjectView>ProjectFiles</ProjectView>
|
|
5 |
<ProjectView>ShowAllFiles</ProjectView>
|
|
6 | 6 |
</PropertyGroup> |
7 | 7 |
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'"> |
8 |
<StartArguments>eyJEb2N1bWVudEl0ZW1JRCI6IjQwMDAwMTQyIiwiYlBhcnRuZXIiOmZhbHNlLCJDcmVhdGVGaW5hbFBERlBlcm1pc3Npb24iOnRydWUsIk5ld0NvbW1lbnRQZXJtaXNzaW9uIjp0cnVlLCJQcm9qZWN0Tk8iOiIwMDAwMDAiLCJVc2VySUQiOiJkb2Z0ZWNoIiwiTW9kZSI6MH0=</StartArguments>
|
|
8 |
<StartArguments>eyJEb2N1bWVudEl0ZW1JRCI6IjQwMDAwMTQyIiwiYlBhcnRuZXIiOmZhbHNlLCJDcmVhdGVGaW5hbFBERlBlcm1pc3Npb24iOnRydWUsIk5ld0NvbW1lbnRQZXJtaXNzaW9uIjp0cnVlLCJQcm9qZWN0Tk8iOiIwMDAwMDAiLCJVc2VySUQiOiJhZG1pbiIsIk1vZGUiOjB9</StartArguments>
|
|
9 | 9 |
</PropertyGroup> |
10 | 10 |
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'"> |
11 | 11 |
<StartArguments>eyJEb2N1bWVudEl0ZW1JRCI6IjQwMDAwMTQwIiwiYlBhcnRuZXIiOmZhbHNlLCJDcmVhdGVGaW5hbFBERlBlcm1pc3Npb24iOnRydWUsIk5ld0NvbW1lbnRQZXJtaXNzaW9uIjp0cnVlLCJQcm9qZWN0Tk8iOiIwMDAwMDAiLCJVc2VySUQiOiJIMjAxMTM1NyIsIk1vZGUiOjB9</StartArguments> |
KCOM/Views/MainMenu.xaml.cs | ||
---|---|---|
5085 | 5085 |
ConsolidationMethod(); |
5086 | 5086 |
} |
5087 | 5087 |
|
5088 |
/// <summary> |
|
5089 |
/// execute TeamConsolidationCommand |
|
5090 |
/// </summary> |
|
5088 | 5091 |
public void TeamConsolidationMethod() |
5089 | 5092 |
{ |
5090 |
UpdateMyMarkupList(); |
|
5093 |
this.UpdateMyMarkupList();
|
|
5091 | 5094 |
if (this.gridViewMarkup.SelectedItems.Count == 0) |
5092 | 5095 |
{ |
5093 | 5096 |
this.ParentOfType<MainWindow>().DialogMessage_Alert("Please select at least one user", "Alert"); |
... | ... | |
5102 | 5105 |
return; |
5103 | 5106 |
} |
5104 | 5107 |
} |
5105 |
ViewerDataModel.Instance.IsConsolidate = true; |
|
5106 |
this.ParentOfType<MainWindow>().dzTopMenu._SaveEvent(null, null); |
|
5107 |
List<KCOMDataModel.DataModel.MARKUP_DATA> instanceDataSet = new List<KCOMDataModel.DataModel.MARKUP_DATA>(); |
|
5108 |
|
|
5109 |
string project_no = App.ViewInfo.ProjectNO; |
|
5110 |
string doc_id = _DocInfo.ID; |
|
5111 |
string user_id = App.ViewInfo.UserID; |
|
5112 |
List<MarkupInfoItem> markupInfoItems = new List<MarkupInfoItem>(); |
|
5108 |
List<MarkupInfoItem> MarkupInfoList = new List<MarkupInfoItem>(); |
|
5113 | 5109 |
foreach (MarkupInfoItem item in this.gridViewMarkup.SelectedItems) |
5114 | 5110 |
{ |
5115 |
markupInfoItems.Add(item);
|
|
5111 |
MarkupInfoList.Add(item);
|
|
5116 | 5112 |
} |
5117 |
Logger.sendReqLog("TeamConsolidate", project_no + "," + user_id + "," + doc_id + "," + markupInfoItems, 1); |
|
5118 |
Logger.sendResLog("TeamConsolidate", this.BaseClient.TeamConsolidate(project_no, user_id, doc_id, markupInfoItems).ToString(), 1); |
|
5119 |
//this.BaseClient.TeamConsolidate(project_no, user_id, doc_id, markupInfoItems); |
|
5120 |
|
|
5121 |
Logger.sendReqLog("GetMarkupInfoItemsAsync", App.ViewInfo.ProjectNO + "," + _DocInfo.ID, 1); |
|
5122 |
this.BaseClient.GetMarkupInfoItemsAsync(App.ViewInfo.ProjectNO, _DocInfo.ID); |
|
5113 |
TeamConsolidateCommand.Instance.Execute(MarkupInfoList); |
|
5123 | 5114 |
} |
5124 | 5115 |
} |
5116 |
|
|
5125 | 5117 |
public void ConsolidationMethod() |
5126 | 5118 |
{ |
5127 | 5119 |
if (this.gridViewMarkup.SelectedItems.Count == 0) |
... | ... | |
5130 | 5122 |
} |
5131 | 5123 |
else |
5132 | 5124 |
{ |
5133 |
/* |
|
5134 |
ViewerDataModel.Instance.IsConsolidate = true; |
|
5135 |
this.ParentOfType<MainWindow>().dzTopMenu._SaveEvent(null, null); |
|
5136 |
|
|
5137 |
string project_no = App.ViewInfo.ProjectNO; |
|
5138 |
string doc_id = _DocInfo.ID; |
|
5139 |
string user_id = App.ViewInfo.UserID; |
|
5140 |
List<MarkupInfoItem> markupInfoItems = new List<MarkupInfoItem>(); |
|
5141 |
foreach (MarkupInfoItem item in this.gridViewMarkup.SelectedItems) |
|
5142 |
{ |
|
5143 |
markupInfoItems.Add(item); |
|
5144 |
} |
|
5145 |
Logger.sendReqLog("Consolidate", project_no + "," + user_id + "," + doc_id + "," + markupInfoItems, 1); |
|
5146 |
Logger.sendResLog("Consolidate", this.BaseClient.Consolidate(project_no, user_id, doc_id, markupInfoItems).ToString(), 1); |
|
5147 |
|
|
5148 |
Logger.sendReqLog("GetMarkupInfoItemsAsync", App.ViewInfo.ProjectNO + "," + _DocInfo.ID, 1); |
|
5149 |
this.BaseClient.GetMarkupInfoItemsAsync(App.ViewInfo.ProjectNO, _DocInfo.ID); |
|
5150 |
*/ |
|
5151 |
|
|
5152 | 5125 |
List<IKCOM.MarkupInfoItem> MySelectItem = new List<IKCOM.MarkupInfoItem>(); |
5153 | 5126 |
foreach (var item in this.gridViewMarkup.SelectedItems) |
5154 | 5127 |
{ |
내보내기 Unified diff