개정판 6c781c0c
issue #573 : Direct DB Connection Modify
Client Method Modify
KCOM/Services/BaseServices.cs | ||
---|---|---|
18 | 18 |
|
19 | 19 |
namespace KCOM.Views |
20 | 20 |
{ |
21 |
//public partial class MainWindow : Window , INotifyPropertyChanged |
|
22 |
//{ |
|
23 |
// private Common.DocumentSet _CurrentDoc { get; set; } |
|
24 |
// public Common.DocumentSet CurrentDoc |
|
25 |
// { |
|
26 |
// get |
|
27 |
// { |
|
28 |
// return _CurrentDoc; |
|
29 |
// } |
|
30 |
// set |
|
31 |
// { |
|
32 |
// if (value != CurrentDoc) |
|
33 |
// { |
|
34 |
// _CurrentDoc = value; |
|
35 |
// NotifyPropertyChanged(); |
|
36 |
// } |
|
37 |
// } |
|
38 |
// } |
|
39 |
|
|
40 |
// const string DeepZoomUrl = @"http://{baseUrl}/Pages/{TileSourcePath}/{ItemsPath}/{SharepointItemID}/{PageNo}.jpg"; |
|
41 |
|
|
42 |
// public event PropertyChangedEventHandler PropertyChanged; |
|
43 |
// // This method is called by the Set accessor of each property. |
|
44 |
// // The CallerMemberName attribute that is applied to the optional propertyName |
|
45 |
// // parameter causes the property name of the caller to be substituted as an argument. |
|
46 |
// private void NotifyPropertyChanged([CallerMemberName] String propertyName = "") |
|
47 |
// { |
|
48 |
// if (PropertyChanged != null) |
|
49 |
// { |
|
50 |
// PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); |
|
51 |
// } |
|
52 |
// } |
|
53 |
// public void InitilizeSystem() |
|
54 |
// { |
|
55 |
// App.BaseClient = new RestClient(Properties.Settings.Default.BaseClientAddress); |
|
56 |
// var request = new RestRequest("api/Basic/GetSystemData", Method.GET); |
|
57 |
// //request.AddParameter("some_param_name", "some_param_value", ParameterType.QueryString); |
|
58 |
// IRestResponse response = App.BaseClient.Execute(request); |
|
59 |
// if (response.StatusCode == System.Net.HttpStatusCode.OK) |
|
60 |
// { |
|
61 |
// App.SystemInfo = JsonConvert.DeserializeObject<KCOM_SystemInfo>(response.Content); |
|
62 |
// } |
|
63 |
// else |
|
64 |
// { |
|
65 |
// MessageBox.Show("시스템에서 정보를 받아 올 수 없었습니다. 다시 확인해주세요"); |
|
66 |
// } |
|
67 |
// } |
|
68 |
|
|
69 |
// public bool Check_DocConvert(string projectNo, string documentID) |
|
70 |
// { |
|
71 |
// var request = new RestRequest("api/Basic/GetConversionState", Method.GET); |
|
72 |
// request.AddParameter("projectNo", projectNo); |
|
73 |
// request.AddParameter("documentID", documentID); |
|
74 |
|
|
75 |
// IRestResponse response = App.BaseClient.Execute(request); |
|
76 |
// if (response.StatusCode == System.Net.HttpStatusCode.OK) |
|
77 |
// { |
|
78 |
// return JsonConvert.DeserializeObject<bool>(response.Content); |
|
79 |
// } |
|
80 |
// else |
|
81 |
// { |
|
82 |
// return false; |
|
83 |
// } |
|
84 |
// } |
|
85 |
|
|
86 |
// public KCOMDataModel.DataModel.DOCUMENT_ITEM Check_DocItem(string projectNo, string documentID) |
|
87 |
// { |
|
88 |
// var request = new RestRequest("api/Basic/GetDocumentItemInfo", Method.GET); |
|
89 |
// request.AddParameter("projectNo", projectNo); |
|
90 |
// request.AddParameter("documentID", documentID); |
|
91 |
|
|
92 |
// IRestResponse response = App.BaseClient.Execute(request); |
|
93 |
// if (response.StatusCode == System.Net.HttpStatusCode.OK) |
|
94 |
// { |
|
95 |
// return JsonConvert.DeserializeObject<KCOMDataModel.DataModel.DOCUMENT_ITEM>(response.Content); |
|
96 |
// } |
|
97 |
// else |
|
98 |
// { |
|
99 |
// return null; |
|
100 |
// } |
|
101 |
// } |
|
102 |
|
|
103 |
// public KCOMDataModel.DataModel.DOCINFO Check_DocInfo(string projectNo, string documentID) |
|
104 |
// { |
|
105 |
// var request = new RestRequest("api/Basic/GetDocInfo", Method.GET); |
|
106 |
// request.AddParameter("projectNo", projectNo); |
|
107 |
// request.AddParameter("documentID", documentID); |
|
108 |
|
|
109 |
// IRestResponse response = App.BaseClient.Execute(request); |
|
110 |
// if (response.StatusCode == System.Net.HttpStatusCode.OK) |
|
111 |
// { |
|
112 |
// var data = JsonConvert.DeserializeObject<KCOMDataModel.DataModel.DOCINFO>(response.Content); |
|
113 |
// //return JsonConvert.DeserializeObject<KCOMDataModel.DataModel.DOCINFO>(response.Content); |
|
114 |
// return data; |
|
115 |
// } |
|
116 |
// else |
|
117 |
// { |
|
118 |
// return null; |
|
119 |
// } |
|
120 |
// } |
|
121 |
//} |
|
122 |
|
|
123 |
|
|
124 | 21 |
public partial class MainMenu : UserControl, INotifyPropertyChanged |
125 |
{ |
|
126 |
/// <summary> |
|
127 |
/// 강인구 테스트 |
|
128 |
/// </summary> |
|
22 |
{ |
|
129 | 23 |
const string DeepZoomUrl = @"http://{baseUrl}/TileSource/{TileSourcePath}/{ItemsPath}/{SharepointItemID}/{PageNo}.jpg"; |
130 | 24 |
public ServiceDeepViewClient BaseClient; |
131 | 25 |
public ViewInfo _ViewInfo; |
... | ... | |
160 | 54 |
} |
161 | 55 |
public void ServiceOn() |
162 | 56 |
{ |
163 |
BaseClient = new ServiceDeepViewClient(App._binding, App._EndPoint); |
|
164 |
//BaseClient = new ServiceDeepViewClient(); |
|
57 |
BaseClient = new ServiceDeepViewClient(App._binding, App._EndPoint);
|
|
58 |
|
|
165 | 59 |
BaseClient.GetDocInfoCompleted += BaseClient_GetDocInfoCompleted; //문서 섬네일, 페이지크기, 마크업 정보 [3] |
166 | 60 |
BaseClient.GetConversionStateCompleted += BaseClient_GetConversionStateCompleted; //컨버팅의 여부 [2] |
167 | 61 |
BaseClient.GetSystemDataCompleted += BaseClient_GetSystemDataCompleted; //시스템 정보 [1] |
... | ... | |
174 | 68 |
BaseClient.GetCompareRectCompleted += BaseClient_GetCompareRectCompleted; |
175 | 69 |
BaseClient.DeleteMarkupCompleted += BaseClient_DeleteMarkupCompleted; |
176 | 70 |
BaseClient.DelFavoriteVPCompleted += BaseClient_DelFavoriteVPCompleted; |
177 |
BaseClient.EditFavoriteVPCompleted += BaseClient_EditFavoriteVPCompleted; |
|
71 |
BaseClient.EditFavoriteVPCompleted += BaseClient_EditFavoriteVPCompleted;
|
|
178 | 72 |
} |
179 | 73 |
|
180 |
|
|
181 |
|
|
74 |
|
|
182 | 75 |
|
183 | 76 |
private void BaseClient_EditFavoriteVPCompleted(object sender, EditFavoriteVPCompletedEventArgs e) |
184 | 77 |
{ |
... | ... | |
570 | 463 |
{ |
571 | 464 |
if ((item.UserID == App.ViewInfo.UserID) && (this.pageNavigator.CurrentPage != null)) |
572 | 465 |
{ |
466 |
|
|
573 | 467 |
var instance = ViewerDataModel.Instance.MarkupList_USER.Where(d => d.PageNumber == pageNavigator.CurrentPage.PageNumber && d.MarkupInfoID == item.MarkupInfoID).ToList(); |
574 | 468 |
var my_item = Common.ViewerDataModel.Instance.MarkupControls_USER.FirstOrDefault(); |
575 | 469 |
|
... | ... | |
759 | 653 |
|
760 | 654 |
if (App.ViewInfo != null && App.ViewInfo.ProjectNO != "") |
761 | 655 |
{ |
762 |
//BaseClient.GetUserDataAsync(App.ViewInfo.ProjectNO, App.ViewInfo.UserID); |
|
763 | 656 |
|
764 |
|
|
765 |
using (CIEntities entity = new CIEntities(KCOMDataModel.Common.ConnectStringBuilder.ProjectCIConnectString(App.ViewInfo.ProjectNO).ToString()))
|
|
657 |
userData = BaseClient.GetMember(App.ViewInfo.ProjectNO, App.ViewInfo.UserID); |
|
658 |
if (userData != null)
|
|
766 | 659 |
{ |
767 |
var _UserList = from member in entity.MEMBER |
|
768 |
where member.ID == App.ViewInfo.UserID |
|
769 |
select member; |
|
770 |
userData = _UserList.FirstOrDefault(); |
|
771 |
|
|
772 |
if (userData != null) |
|
773 |
{ |
|
774 |
BaseClient.GetDeptDataAsync(userData.DEPARTMENT); //테스트로 입력 |
|
775 |
//BaseClient.GetPublicSymbolAsync(userData.dept); |
|
776 |
//기계 장치 배관 설비 계장 건축 전기 환경.. |
|
777 |
} |
|
778 |
else |
|
779 |
{ |
|
780 |
userData = new MEMBER(); |
|
781 |
userData.DEPARTMENT = "ALL"; |
|
782 |
} |
|
783 |
BaseClient.GetDeptDataAsync(userData.DEPARTMENT); //테스트로 입력 |
|
660 |
BaseClient.GetDeptDataAsync(userData.DEPARTMENT); |
|
784 | 661 |
} |
662 |
else |
|
663 |
{ |
|
664 |
userData = new MEMBER(); |
|
665 |
userData.DEPARTMENT = "ALL"; |
|
666 |
BaseClient.GetDeptDataAsync(userData.DEPARTMENT); |
|
667 |
} |
|
785 | 668 |
} |
786 | 669 |
} |
787 | 670 |
else |
... | ... | |
795 | 678 |
//System.Windows.Browser.HtmlPage.Window.Invoke("close"); |
796 | 679 |
} |
797 | 680 |
} |
681 |
|
|
798 | 682 |
|
799 | 683 |
private void BaseClient_GetDocInfoCompleted(object sender, GetDocInfoCompletedEventArgs e) |
800 | 684 |
{ |
... | ... | |
837 | 721 |
|
838 | 722 |
ViewerDataModel.Instance.MarkupControls_USER.Clear(); |
839 | 723 |
|
840 |
BaseClient.GetVPRevisionHistoryAsync(CurrentDoc.ProjectNo, CurrentDoc.Document_NO, CurrentDoc.Document_Id); |
|
841 |
//gridView.ItemsSource = CurrentDoc.docInfo.MARKUP_INFO.ToList(); |
|
842 |
//BaseClient.GetMarkupInfoItemsAsync(CurrentDoc.ProjectNo, CurrentDoc.docInfo.ID); |
|
724 |
BaseClient.GetVPRevisionHistoryAsync(CurrentDoc.ProjectNo, CurrentDoc.Document_NO, CurrentDoc.Document_Id); |
|
843 | 725 |
} |
844 | 726 |
|
845 | 727 |
|
내보내기 Unified diff