개정판 2e35dd78
pemss 최종
Change-Id: Iaf8b86a518b3e3f99fe52e8ef4fe2cd2b7561a0a
KCOM_API/ServiceDeepView.svc.cs | ||
---|---|---|
2 | 2 |
using IKCOM; |
3 | 3 |
using KCOMDataModel.Common; |
4 | 4 |
using KCOMDataModel.DataModel; |
5 |
using MARKUS; |
|
6 | 5 |
using System; |
7 | 6 |
using System.Collections.Generic; |
8 | 7 |
using System.Collections.ObjectModel; |
8 |
using System.Configuration; |
|
9 | 9 |
using System.Linq; |
10 | 10 |
using System.Net; |
11 | 11 |
using System.Runtime.Remoting.Channels.Tcp; |
... | ... | |
41 | 41 |
|
42 | 42 |
//DB에서 version 정보와 다운로드 url 을 Select |
43 | 43 |
PROPERTIES dbvalue = null; |
44 |
using (KCOMEntities uc = new KCOMEntities(ConnectStringBuilder.KCOMConnectionString().ToString()))
|
|
44 |
using (KCOMEntities uc = new KCOMEntities(ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString))
|
|
45 | 45 |
{ |
46 | 46 |
string wherestr = string.Empty; |
47 | 47 |
if (is64BitProcess) |
... | ... | |
76 | 76 |
{ |
77 | 77 |
try |
78 | 78 |
{ |
79 |
using (KCOMEntities uc = new KCOMEntities(ConnectStringBuilder.KCOMConnectionString().ToString()))
|
|
79 |
using (KCOMEntities uc = new KCOMEntities(ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString))
|
|
80 | 80 |
{ |
81 | 81 |
var SystemInfoSet = uc.PROPERTIES.Where(data => data.TYPE == "SystemInfo").ToList(); |
82 | 82 |
|
... | ... | |
129 | 129 |
[OperationContract] |
130 | 130 |
public List<FAVORITE_DOC> GetFavoriteVP(string PrjNo, string userID, string sharepointItemID) |
131 | 131 |
{ |
132 |
using (KCOMEntities dc = new KCOMEntities(ConnectStringBuilder.KCOMConnectionString().ToString()))
|
|
133 |
{
|
|
132 |
using (KCOMEntities dc = new KCOMEntities(ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString))
|
|
133 |
{ |
|
134 | 134 |
|
135 |
int flagString = Convert.ToInt32(FAVORITE_FLAG.Personal);
|
|
136 |
List<FAVORITE_DOC> favoriteListSet = new List<FAVORITE_DOC>();
|
|
137 |
//dc.FAVORITE_DOC.Where(data => data.PROJECT_NO == PrjNo && data.DOCUMENT_ID == sharepointItemID && data.FLAG !=
|
|
138 |
// flagString).ToList().ForEach(data => favoriteListSet.Add(data));
|
|
135 |
int flagString = Convert.ToInt32(FAVORITE_FLAG.Personal); |
|
136 |
List<FAVORITE_DOC> favoriteListSet = new List<FAVORITE_DOC>(); |
|
137 |
//dc.FAVORITE_DOC.Where(data => data.PROJECT_NO == PrjNo && data.DOCUMENT_ID == sharepointItemID && data.FLAG != |
|
138 |
// flagString).ToList().ForEach(data => favoriteListSet.Add(data)); |
|
139 | 139 |
|
140 | 140 |
|
141 |
//dc.FAVORITE_DOC.Where(data => data.PROJECT_NO == PrjNo && data.MEMBER_USER_ID == userID).ToList().ForEach(data => favoriteListSet.Add(data));
|
|
141 |
//dc.FAVORITE_DOC.Where(data => data.PROJECT_NO == PrjNo && data.MEMBER_USER_ID == userID).ToList().ForEach(data => favoriteListSet.Add(data)); |
|
142 | 142 |
|
143 |
favoriteListSet = dc.FAVORITE_DOC.Where(data => data.PROJECT_NO == PrjNo && data.MEMBER_USER_ID == userID && data.DOCUMENT_ID == sharepointItemID).ToList();
|
|
143 |
favoriteListSet = dc.FAVORITE_DOC.Where(data => data.PROJECT_NO == PrjNo && data.MEMBER_USER_ID == userID && data.DOCUMENT_ID == sharepointItemID).ToList(); |
|
144 | 144 |
|
145 |
//favoriteListSet = favoriteListSet.Distinct().ToList();
|
|
146 |
return favoriteListSet;
|
|
147 |
}
|
|
145 |
//favoriteListSet = favoriteListSet.Distinct().ToList(); |
|
146 |
return favoriteListSet; |
|
147 |
} |
|
148 | 148 |
} |
149 | 149 |
[OperationContract] |
150 | 150 |
public bool EditFavoriteVP(string prjNo, string userID, string docID, int state, string description) |
151 | 151 |
{ |
152 |
using (KCOMEntities dc = new KCOMEntities(ConnectStringBuilder.KCOMConnectionString().ToString()))
|
|
152 |
using (KCOMEntities dc = new KCOMEntities(ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString))
|
|
153 | 153 |
{ |
154 | 154 |
//List<FAVORITE_DOC> favoriteSet = dc.FAVORITE_DOC.Where(data => data.PROJECT_NO == prjNo && data.MEMBER_USER_ID == userID |
155 | 155 |
// && data.PAGE_NO == SavePageNo && data.CREATE_TIME == createTime).ToList(); |
... | ... | |
185 | 185 |
public bool DelFavoriteVP(string prjNo, string userID, int SavePageNo, string docID) |
186 | 186 |
{ |
187 | 187 |
|
188 |
using (KCOMEntities dc = new KCOMEntities(ConnectStringBuilder.KCOMConnectionString().ToString()))
|
|
188 |
using (KCOMEntities dc = new KCOMEntities(ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString))
|
|
189 | 189 |
{ |
190 | 190 |
|
191 | 191 |
List<FAVORITE_DOC> favoriteSet = dc.FAVORITE_DOC.Where(data => data.PROJECT_NO == prjNo && data.MEMBER_USER_ID == userID |
... | ... | |
215 | 215 |
[OperationContract] |
216 | 216 |
public List<Rect> GetCompareRect(string projectNo, string originDocItem_ID, string targetDocItem_ID, string originPageNo, string targetPageNo, string isInternalAddress) |
217 | 217 |
{ |
218 |
//string originFile = String.Format(@"http://cloud.devdoftech.co.kr:5977/TileSource/{0}_Tile/{1}/{2}/{3}.cmp", projectNo, (Convert.ToInt32(originDocItem_ID) / 100).ToString(), originDocItem_ID, originPageNo); |
|
219 |
//string targetFile = String.Format(@"http://cloud.devdoftech.co.kr:5977/TileSource/{0}_Tile/{1}/{2}/{3}.cmp", projectNo, (Convert.ToInt32(targetDocItem_ID) / 100).ToString(), targetDocItem_ID, targetPageNo); |
|
218 |
List<Rect> result = new List<Rect>(); |
|
220 | 219 |
|
221 |
string originFile = ""; |
|
222 |
string targetFile = ""; |
|
223 |
|
|
224 |
if (Boolean.Parse(isInternalAddress)) |
|
225 |
{ |
|
226 |
originFile = String.Format(KCOM_API.Properties.Settings.Default.TileSoucePath, projectNo, (Convert.ToUInt32(originDocItem_ID) / 100).ToString(), originDocItem_ID, originPageNo); |
|
227 |
targetFile = String.Format(KCOM_API.Properties.Settings.Default.TileSoucePath, projectNo, (Convert.ToUInt32(targetDocItem_ID) / 100).ToString(), targetDocItem_ID, targetPageNo); |
|
228 |
} |
|
229 |
else |
|
220 |
try |
|
230 | 221 |
{ |
231 |
originFile = String.Format(KCOM_API.Properties.Settings.Default.TileSoucePath_SUB, projectNo, originDocItem_ID, originPageNo); |
|
232 |
targetFile = String.Format(KCOM_API.Properties.Settings.Default.TileSoucePath_SUB, projectNo, targetDocItem_ID, targetPageNo); |
|
233 |
} |
|
222 |
string originFile = ""; |
|
223 |
string targetFile = ""; |
|
234 | 224 |
|
235 |
CompareLib compareLib = new CompareLib(); |
|
236 |
//System.IO.Stream resultOrigin = compareLib.ChangeCmpUrlToPng(originFile); |
|
237 |
//System.IO.Stream resultTarget = compareLib.ChangeCmpUrlToPng(targetFile); |
|
225 |
string sOriginFolder = originDocItem_ID.All(char.IsDigit) ? (Convert.ToUInt32(originDocItem_ID) / 100).ToString() : (originDocItem_ID.Length >= 5 ? originDocItem_ID.Substring(0, 5) : originDocItem_ID); |
|
226 |
string sTagetFolder = targetDocItem_ID.All(char.IsDigit) ? (Convert.ToUInt32(targetDocItem_ID) / 100).ToString() : (targetDocItem_ID.Length >= 5 ? targetDocItem_ID.Substring(0, 5) : targetDocItem_ID); |
|
238 | 227 |
|
239 |
var resultOrigin = compareLib.ChangeCmpUrlToPng_File(originFile); |
|
240 |
var resultTarget = compareLib.ChangeCmpUrlToPng_File(targetFile); |
|
228 |
if (Boolean.Parse(isInternalAddress)) |
|
229 |
{ |
|
230 |
originFile = String.Format(KCOM_API.Properties.Settings.Default.TileSoucePath, projectNo, sOriginFolder, originDocItem_ID, originPageNo); |
|
231 |
targetFile = String.Format(KCOM_API.Properties.Settings.Default.TileSoucePath, projectNo, sTagetFolder, targetDocItem_ID, targetPageNo); |
|
232 |
} |
|
233 |
else |
|
234 |
{ |
|
235 |
originFile = String.Format(KCOM_API.Properties.Settings.Default.TileSoucePath_SUB, projectNo, originDocItem_ID, originPageNo); |
|
236 |
targetFile = String.Format(KCOM_API.Properties.Settings.Default.TileSoucePath_SUB, projectNo, targetDocItem_ID, targetPageNo); |
|
237 |
} |
|
241 | 238 |
|
242 |
string outPutFile = compareLib.ImageCompare_File(resultOrigin, resultTarget); |
|
243 |
var result = compareLib.GetBoundBoxInImage(outPutFile); |
|
239 |
using (Markus.Image.ImageComparer compareLib = new Markus.Image.ImageComparer()) |
|
240 |
{ |
|
241 |
result = compareLib.CompareReturnRects(originFile, targetFile, new System.Drawing.Size(20, 20)); |
|
242 |
} |
|
243 |
} |
|
244 |
catch (Exception ex) |
|
245 |
{ |
|
246 |
System.Diagnostics.Debug.WriteLine("KCOM_API - GetCompareRect : " + ex.ToString()); |
|
247 |
//throw new FaultException(ex.ToString() + " Inner Exception : " + ex.InnerException?.ToString()); |
|
248 |
} |
|
244 | 249 |
|
245 | 250 |
return result; |
246 | 251 |
} |
... | ... | |
264 | 269 |
string docItemId; |
265 | 270 |
|
266 | 271 |
|
267 |
using (CIEntities _ci = new CIEntities(ConnectStringBuilder.ProjectCIConnectString(ProjectNo).ToString()))
|
|
272 |
using (CIEntities _ci = new CIEntities(ConfigurationManager.ConnectionStrings["CIConnectionString"].ConnectionString))
|
|
268 | 273 |
{ |
269 | 274 |
var _doc = _ci.DOCINFO.Where(info => info.ID == DocInfoID); |
270 | 275 |
|
... | ... | |
294 | 299 |
CREATE_DATETIME = DateTime.Now, |
295 | 300 |
STATUS = (int)IFinalPDF.FinalStatus.Insert |
296 | 301 |
}; |
297 |
using (KCOMEntities _entity = new KCOMEntities(ConnectStringBuilder.KCOMConnectionString().ToString()))
|
|
302 |
using (KCOMEntities _entity = new KCOMEntities(ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString))
|
|
298 | 303 |
{ |
299 | 304 |
_entity.AddToFINAL_PDF(fm); |
300 | 305 |
_entity.SaveChanges(System.Data.Objects.SaveOptions.AcceptAllChangesAfterSave); |
... | ... | |
309 | 314 |
// Create an instance of the remote object |
310 | 315 |
|
311 | 316 |
|
312 |
using (KCOMEntities ec = new KCOMEntities(ConnectStringBuilder.KCOMConnectionString().ToString()))
|
|
317 |
using (KCOMEntities ec = new KCOMEntities(ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString))
|
|
313 | 318 |
{ |
314 | 319 |
|
315 | 320 |
//remObj = (RemFinalPDFObject)Activator.GetObject(typeof(RemFinalPDFObject), |
... | ... | |
358 | 363 |
[OperationContract] |
359 | 364 |
public bool GetConversionState(KCOM_BasicParam param) |
360 | 365 |
{ |
361 |
using (CIEntities entity = new CIEntities(ConnectStringBuilder.ProjectCIConnectString(param.projectNo).ToString()))
|
|
366 |
try
|
|
362 | 367 |
{ |
363 |
var doc = entity.DOCINFO.Where(data => data.DOCUMENT_ID == param.documentID).FirstOrDefault(); |
|
364 |
if (doc != null) |
|
368 |
using (CIEntities entity = new CIEntities(ConfigurationManager.ConnectionStrings["CIConnectionString"].ConnectionString)) |
|
365 | 369 |
{ |
366 |
var count = doc.DOCPAGE.Where(data => data.DOCINFO_ID == doc.ID).Count();
|
|
367 |
if (doc.PAGE_COUNT == count) //페이지 수가 일치하는지
|
|
370 |
var doc = entity.DOCINFO.Where(data => data.DOCUMENT_ID == param.documentID).FirstOrDefault();
|
|
371 |
if (doc != null)
|
|
368 | 372 |
{ |
369 |
return true; |
|
370 |
} |
|
371 |
else //페이지 수가 일치하지 않는 경우 |
|
372 |
{ |
|
373 |
KCOMEntities entity_kcom = new KCOMEntities(ConnectStringBuilder.KCOMConnectionString().ToString()); |
|
374 |
var lst = entity_kcom.CONVERTER_DOC.Where(data => data.PROJECT_NO == param.projectNo && data.DOCUMENT_ID == param.documentID && data.TOTAL_PAGE != doc.PAGE_COUNT).ToList(); |
|
375 |
|
|
376 |
if (lst != null || lst.Count >= 1) |
|
373 |
var count = doc.DOCPAGE.Where(data => data.DOCINFO_ID == doc.ID).Count(); |
|
374 |
if (doc.PAGE_COUNT == count) //페이지 수가 일치하는지 |
|
375 |
{ |
|
376 |
return true; |
|
377 |
} |
|
378 |
else //페이지 수가 일치하지 않는 경우 |
|
377 | 379 |
{ |
378 |
//Common.Helper.SystemErrorNotify(SERVICE_NAME.API, LEVEL.MEDIUM, ERROR_TYPE.CONVERT, Resources.ResourceManager.GetString("MSG_ERROR_PAGECOUNT"), param.documentID, param.projectNo); |
|
379 |
//이메일 클라이언트를 구현해야함 |
|
380 |
KCOMEntities entity_kcom = new KCOMEntities(ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString); |
|
381 |
var lst = entity_kcom.CONVERTER_DOC.Where(data => data.PROJECT_NO == param.projectNo && data.DOCUMENT_ID == param.documentID && data.TOTAL_PAGE != doc.PAGE_COUNT).ToList(); |
|
382 |
|
|
383 |
if (lst != null || lst.Count >= 1) |
|
384 |
{ |
|
385 |
//Common.Helper.SystemErrorNotify(SERVICE_NAME.API, LEVEL.MEDIUM, ERROR_TYPE.CONVERT, Resources.ResourceManager.GetString("MSG_ERROR_PAGECOUNT"), param.documentID, param.projectNo); |
|
386 |
//이메일 클라이언트를 구현해야함 |
|
387 |
} |
|
388 |
return false; |
|
380 | 389 |
} |
390 |
} |
|
391 |
else |
|
392 |
{ |
|
393 |
//Common.Helper.SystemErrorNotify(SERVICE_NAME.API, LEVEL.MEDIUM, ERROR_TYPE.CONVERT, Resources.ResourceManager.GetString("MSG_ERROR_CONVERTFAILED"), param.documentID, param.projectNo); |
|
394 |
//이메일 클라이언트를 구현해야함 |
|
381 | 395 |
return false; |
382 | 396 |
} |
383 | 397 |
} |
384 |
else |
|
385 |
{ |
|
386 |
//Common.Helper.SystemErrorNotify(SERVICE_NAME.API, LEVEL.MEDIUM, ERROR_TYPE.CONVERT, Resources.ResourceManager.GetString("MSG_ERROR_CONVERTFAILED"), param.documentID, param.projectNo); |
|
387 |
//이메일 클라이언트를 구현해야함 |
|
388 |
return false; |
|
389 |
} |
|
390 | 398 |
} |
399 |
catch (Exception) |
|
400 |
{ |
|
401 |
} |
|
402 |
|
|
403 |
return true; |
|
391 | 404 |
} |
392 | 405 |
|
393 | 406 |
[OperationContract] |
... | ... | |
396 | 409 |
List<VPRevision> _result = new List<VPRevision>(); |
397 | 410 |
try |
398 | 411 |
{ |
399 |
using (CIEntities entity = new CIEntities(ConnectStringBuilder.ProjectCIConnectString(ProjectNo).ToString()))
|
|
412 |
using (CIEntities entity = new CIEntities(ConfigurationManager.ConnectionStrings["CIConnectionString"].ConnectionString))
|
|
400 | 413 |
{ |
401 | 414 |
var _vpList = (from docitem in entity.DOCUMENT_ITEM |
402 | 415 |
where docitem.DOCUMENT_NO == vpNo |
... | ... | |
441 | 454 |
VPRevision _result = null; |
442 | 455 |
try |
443 | 456 |
{ |
444 |
using (CIEntities entity = new CIEntities(ConnectStringBuilder.ProjectCIConnectString(ProjectNo).ToString()))
|
|
457 |
using (CIEntities entity = new CIEntities(ConfigurationManager.ConnectionStrings["CIConnectionString"].ConnectionString))
|
|
445 | 458 |
{ |
446 | 459 |
_result = (from docitem in entity.DOCUMENT_ITEM |
447 | 460 |
where docitem.DOCUMENT_ID == DocumentId |
... | ... | |
475 | 488 |
{ |
476 | 489 |
// 차후 아래의 코드로 변경 |
477 | 490 |
//using (CI_Entities ModelDeeview = new CI_Entities(DaelimCiConnectionString.ToString())) |
478 |
CIEntities ModelDeeview = new CIEntities(ConnectStringBuilder.ProjectCIConnectString(param.projectNo).ToString());
|
|
491 |
CIEntities ModelDeeview = new CIEntities(ConfigurationManager.ConnectionStrings["CIConnectionString"].ConnectionString);
|
|
479 | 492 |
|
480 | 493 |
var docinfo = ModelDeeview.DOCINFO.Where(doc => doc.DOCUMENT_ID == param.documentID); |
481 | 494 |
if (docinfo.Count() > 0) |
... | ... | |
489 | 502 |
} |
490 | 503 |
catch (Exception ex) |
491 | 504 |
{ |
492 |
System.Diagnostics.Trace.WriteLine("GetDocInfo Error : " + ex);
|
|
505 |
throw new FaultException(ex.ToString());
|
|
493 | 506 |
} |
494 | 507 |
finally |
495 | 508 |
{ |
... | ... | |
501 | 514 |
[OperationContract] |
502 | 515 |
public bool GetCheckSystemAdmin(string UserID) |
503 | 516 |
{ |
504 |
using (KCOMEntities uc = new KCOMEntities(ConnectStringBuilder.KCOMConnectionString().ToString()))
|
|
517 |
using (KCOMEntities uc = new KCOMEntities(ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString))
|
|
505 | 518 |
{ |
506 | 519 |
var user = uc.PROPERTIES.Where(data => data.TYPE == "Administrator" && data.PROPERTY.Contains(UserID)).FirstOrDefault(); |
507 | 520 |
if (user != null) |
... | ... | |
524 | 537 |
|
525 | 538 |
try |
526 | 539 |
{ |
527 |
CIEntities entity = new CIEntities(ConnectStringBuilder.ProjectCIConnectString(param.projectNo).ToString());
|
|
540 |
CIEntities entity = new CIEntities(ConfigurationManager.ConnectionStrings["CIConnectionString"].ConnectionString);
|
|
528 | 541 |
|
529 | 542 |
var _items = entity.DOCUMENT_ITEM.Where(data => data.DOCUMENT_ID == param.documentID); |
530 | 543 |
|
... | ... | |
560 | 573 |
|
561 | 574 |
try |
562 | 575 |
{ |
563 |
CIEntities entity = new CIEntities(ConnectStringBuilder.ProjectCIConnectString("markus").ToString());
|
|
576 |
CIEntities entity = new CIEntities(ConfigurationManager.ConnectionStrings["CIConnectionString"].ConnectionString);
|
|
564 | 577 |
|
565 | 578 |
var _items = entity.DOCUMENT_ITEM.Where(data => data.ID == ensemble_id).FirstOrDefault(); |
566 | 579 |
if(_items != null) |
... | ... | |
589 | 602 |
List<MarkupInfoItem> _result = new List<MarkupInfoItem>(); |
590 | 603 |
try |
591 | 604 |
{ |
592 |
using (CIEntities entity = new CIEntities(ConnectStringBuilder.ProjectCIConnectString(ProjectNo).ToString()))
|
|
605 |
using (CIEntities entity = new CIEntities(ConfigurationManager.ConnectionStrings["CIConnectionString"].ConnectionString))
|
|
593 | 606 |
{ |
594 | 607 |
var markupListData = entity.MARKUP_INFO.Where(data => data.DOCINFO_ID == DocInfoId).ToList(); |
595 | 608 |
|
... | ... | |
625 | 638 |
List<PROPERTIES> _ColorsProperties = new List<PROPERTIES>(); |
626 | 639 |
Random random = new Random(); |
627 | 640 |
|
628 |
using (KCOMEntities kcomEntity = new KCOMEntities(ConnectStringBuilder.KCOMConnectionString().ToString()))
|
|
641 |
using (KCOMEntities kcomEntity = new KCOMEntities(ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString))
|
|
629 | 642 |
{ |
630 | 643 |
_ColorsProperties = (from property in kcomEntity.PROPERTIES |
631 | 644 |
where property.TYPE == "DisplayColor" |
... | ... | |
679 | 692 |
List<MarkupInfoItem> _result = new List<MarkupInfoItem>(); |
680 | 693 |
try |
681 | 694 |
{ |
682 |
using (CIEntities entity = new CIEntities(ConnectStringBuilder.ProjectCIConnectString(ProjectNo).ToString()))
|
|
695 |
using (CIEntities entity = new CIEntities(ConfigurationManager.ConnectionStrings["CIConnectionString"].ConnectionString))
|
|
683 | 696 |
{ |
684 | 697 |
var markupListData = entity.MARKUP_INFO.Where(data => data.DOCINFO_ID == DocInfoId).ToList(); |
685 | 698 |
|
... | ... | |
809 | 822 |
List<MarkupInfoItem> _result = new List<MarkupInfoItem>(); |
810 | 823 |
try |
811 | 824 |
{ |
812 |
using (CIEntities entity = new CIEntities(ConnectStringBuilder.ProjectCIConnectString(ProjectNo).ToString()))
|
|
825 |
using (CIEntities entity = new CIEntities(ConfigurationManager.ConnectionStrings["CIConnectionString"].ConnectionString))
|
|
813 | 826 |
{ |
814 | 827 |
var markupListData = entity.MARKUP_INFO.Where(data => data.DOCINFO_ID == DocInfoId).ToList(); |
815 | 828 |
//foreach (var item in markupListData) |
... | ... | |
856 | 869 |
_ColorsProperties colors = new _ColorsProperties(); |
857 | 870 |
Random random = new Random(); |
858 | 871 |
|
859 |
using (KCOMEntities kcomEntity = new KCOMEntities(ConnectStringBuilder.KCOMConnectionString().ToString()))
|
|
872 |
using (KCOMEntities kcomEntity = new KCOMEntities(ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString))
|
|
860 | 873 |
{ |
861 | 874 |
colors._colorsProperties = (from property in kcomEntity.PROPERTIES |
862 | 875 |
where property.TYPE == "DisplayColor" |
... | ... | |
944 | 957 |
List<MarkupInfoItem> _result = new List<MarkupInfoItem>(); |
945 | 958 |
try |
946 | 959 |
{ |
947 |
using (CIEntities entity = new CIEntities(ConnectStringBuilder.ProjectCIConnectString(ProjectNo).ToString()))
|
|
960 |
using (CIEntities entity = new CIEntities(ConfigurationManager.ConnectionStrings["CIConnectionString"].ConnectionString))
|
|
948 | 961 |
{ |
949 | 962 |
var docItem = entity.DOCINFO.Where(data => data.DOCUMENT_ID == DocInfoId).FirstOrDefault(); |
950 | 963 |
if (docItem == null) |
... | ... | |
989 | 1002 |
List<PROPERTIES> _ColorsProperties = new List<PROPERTIES>(); |
990 | 1003 |
Random random = new Random(); |
991 | 1004 |
|
992 |
using (KCOMEntities kcomEntity = new KCOMEntities(ConnectStringBuilder.KCOMConnectionString().ToString()))
|
|
1005 |
using (KCOMEntities kcomEntity = new KCOMEntities(ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString))
|
|
993 | 1006 |
{ |
994 | 1007 |
_ColorsProperties = (from property in kcomEntity.PROPERTIES |
995 | 1008 |
where property.TYPE == "DisplayColor" |
... | ... | |
1044 | 1057 |
//{ |
1045 | 1058 |
// List<MEMBER> _result = new List<MEMBER>(); |
1046 | 1059 |
|
1047 |
// using (CIEntities entity = new CIEntities(ConnectStringBuilder.ProjectCIConnectString(ProjectNo).ToString()))
|
|
1060 |
// using (CIEntities entity = new CIEntities(ConfigurationManager.ConnectionStrings["CIConnectionString"].ConnectionString))
|
|
1048 | 1061 |
// { |
1049 | 1062 |
// var _UserList = from member in entity.MEMBER |
1050 | 1063 |
// where member.ID == UserID |
... | ... | |
1061 | 1074 |
{ |
1062 | 1075 |
List<MEMBER> _result = new List<MEMBER>(); |
1063 | 1076 |
|
1064 |
using (CIEntities entity = new CIEntities(ConnectStringBuilder.ProjectCIConnectString(ProjectNo).ToString()))
|
|
1077 |
using (CIEntities entity = new CIEntities(ConfigurationManager.ConnectionStrings["CIConnectionString"].ConnectionString))
|
|
1065 | 1078 |
{ |
1066 | 1079 |
var _UserList = from member in entity.MEMBER |
1067 | 1080 |
where member.ID == UserID |
... | ... | |
1080 | 1093 |
|
1081 | 1094 |
try |
1082 | 1095 |
{ |
1083 |
KCOMEntities entity = new KCOMEntities(ConnectStringBuilder.KCOMConnectionString().ToString());
|
|
1096 |
KCOMEntities entity = new KCOMEntities(ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString);
|
|
1084 | 1097 |
var YourEnginner = (from dept in entity.PROPERTIES |
1085 | 1098 |
where dept.TYPE == "DeptName" && UserDept.Contains(dept.VALUE) |
1086 | 1099 |
select dept).FirstOrDefault(); |
... | ... | |
1114 | 1127 |
bool _result = false; |
1115 | 1128 |
try |
1116 | 1129 |
{ |
1117 |
using (KCOMDataModel.DataModel.CIEntities Entity = new KCOMDataModel.DataModel.CIEntities(KCOMDataModel.Common.ConnectStringBuilder.ProjectCIConnectString(ProjectNo).ToString()))
|
|
1130 |
using (KCOMDataModel.DataModel.CIEntities Entity = new KCOMDataModel.DataModel.CIEntities(ConfigurationManager.ConnectionStrings["CIConnectionString"].ConnectionString))
|
|
1118 | 1131 |
{ |
1119 | 1132 |
|
1120 | 1133 |
MARKUP_INFO instance = Entity.MARKUP_INFO.Where(root => root.ID == MarkupInfoID).FirstOrDefault(); |
... | ... | |
1157 | 1170 |
public bool SetFavoriteVP(string prjNo, string userID, string groupNo, string docNo, string rev, int SavePageNo, string documentItemID, string VPDescription, IKCOM.FAVORITE_FLAG flag) |
1158 | 1171 |
{ |
1159 | 1172 |
|
1160 |
using (KCOMEntities entity = new KCOMEntities(ConnectStringBuilder.KCOMConnectionString().ToString()))
|
|
1173 |
using (KCOMEntities entity = new KCOMEntities(ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString))
|
|
1161 | 1174 |
{ |
1162 | 1175 |
try |
1163 | 1176 |
{ |
... | ... | |
1189 | 1202 |
//[OperationContract] |
1190 | 1203 |
//public List<FAVORITE_DOC> GetFavoriteVP(string PrjNo, string userID, string sharepointItemID) |
1191 | 1204 |
//{ |
1192 |
// using (KCOMEntities entity = new KCOMEntities(ConnectStringBuilder.KCOMConnectionString().ToString()))
|
|
1205 |
// using (KCOMEntities entity = new KCOMEntities(ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString))
|
|
1193 | 1206 |
// { |
1194 | 1207 |
|
1195 | 1208 |
// int flagString = Convert.ToInt32(IKCOM.FAVORITE_FLAG.Personal); |
... | ... | |
1270 | 1283 |
[OperationContract] |
1271 | 1284 |
public bool SaveMarkupData(MarkupInfoItem UserState,string project_no,string doc_id, string user_id, List<MARKUP_DATA> mlmarkup_data) |
1272 | 1285 |
{ |
1273 |
using (CIEntities Entity = new CIEntities(ConnectStringBuilder.ProjectCIConnectString(project_no).ToString()))
|
|
1286 |
using (CIEntities Entity = new CIEntities(ConfigurationManager.ConnectionStrings["CIConnectionString"].ConnectionString))
|
|
1274 | 1287 |
{ |
1275 | 1288 |
#region Docinfo 정보 가져오기 |
1276 | 1289 |
|
... | ... | |
1388 | 1401 |
//{ |
1389 | 1402 |
// try |
1390 | 1403 |
// { |
1391 |
// using (CIEntities Entity = new CIEntities(ConnectStringBuilder.ProjectCIConnectString(ProjectNo).ToString()))
|
|
1404 |
// using (CIEntities Entity = new CIEntities(ConfigurationManager.ConnectionStrings["CIConnectionString"].ConnectionString))
|
|
1392 | 1405 |
// { |
1393 | 1406 |
// Entity.AddToMARKUP_DATA_GROUP(mARKUP_DATA_GROUP); |
1394 | 1407 |
// //MARKUP_DATA_GROUP tt = Entity.MARKUP_DATA_GROUP.Where(info => info.ID == id).FirstOrDefault(); |
... | ... | |
1407 | 1420 |
//{ |
1408 | 1421 |
// try |
1409 | 1422 |
// { |
1410 |
// using (CIEntities Entity = new CIEntities(ConnectStringBuilder.ProjectCIConnectString(ProjectNo).ToString()))
|
|
1423 |
// using (CIEntities Entity = new CIEntities(ConfigurationManager.ConnectionStrings["CIConnectionString"].ConnectionString))
|
|
1411 | 1424 |
// { |
1412 | 1425 |
// var UpdateItem = Entity.MARKUP_DATA_GROUP.Where(info => info.ID == Group_ID).FirstOrDefault(); |
1413 | 1426 |
// UpdateItem.STATE = 1; |
... | ... | |
1425 | 1438 |
{ |
1426 | 1439 |
try |
1427 | 1440 |
{ |
1428 |
using (CIEntities Entity = new CIEntities(ConnectStringBuilder.ProjectCIConnectString(ProjectNo).ToString()))
|
|
1441 |
using (CIEntities Entity = new CIEntities(ConfigurationManager.ConnectionStrings["CIConnectionString"].ConnectionString))
|
|
1429 | 1442 |
{ |
1430 | 1443 |
var UpdateItem = Entity.MARKUP_DATA.Where(info => info.ID == CommentID).FirstOrDefault(); |
1431 | 1444 |
//UpdateItem.GROUP_ID = Group_ID; |
... | ... | |
1444 | 1457 |
{ |
1445 | 1458 |
try |
1446 | 1459 |
{ |
1447 |
using (KCOMDataModel.DataModel.KCOMEntities uc = new KCOMDataModel.DataModel.KCOMEntities(KCOMDataModel.Common.ConnectStringBuilder.KCOMConnectionString().ToString()))
|
|
1460 |
using (KCOMDataModel.DataModel.KCOMEntities uc = new KCOMDataModel.DataModel.KCOMEntities(ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString))
|
|
1448 | 1461 |
{ |
1449 | 1462 |
uc.AddToSYMBOL_PRIVATE(symbol_private); |
1450 | 1463 |
uc.SaveChanges(); |
... | ... | |
1461 | 1474 |
{ |
1462 | 1475 |
try |
1463 | 1476 |
{ |
1464 |
using (KCOMDataModel.DataModel.KCOMEntities uc = new KCOMDataModel.DataModel.KCOMEntities(KCOMDataModel.Common.ConnectStringBuilder.KCOMConnectionString().ToString()))
|
|
1477 |
using (KCOMDataModel.DataModel.KCOMEntities uc = new KCOMDataModel.DataModel.KCOMEntities(ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString))
|
|
1465 | 1478 |
{ |
1466 | 1479 |
uc.AddToSYMBOL_PUBLIC(symbol); |
1467 | 1480 |
uc.SaveChanges(); |
... | ... | |
1478 | 1491 |
{ |
1479 | 1492 |
try |
1480 | 1493 |
{ |
1481 |
using (KCOMEntities Entity = new KCOMEntities(ConnectStringBuilder.KCOMConnectionString().ToString()))
|
|
1494 |
using (KCOMEntities Entity = new KCOMEntities(ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString))
|
|
1482 | 1495 |
{ |
1483 | 1496 |
if (type == 0) |
1484 | 1497 |
{ |
... | ... | |
1508 | 1521 |
{ |
1509 | 1522 |
try |
1510 | 1523 |
{ |
1511 |
using (KCOMEntities Entity = new KCOMEntities(ConnectStringBuilder.KCOMConnectionString().ToString()))
|
|
1524 |
using (KCOMEntities Entity = new KCOMEntities(ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString))
|
|
1512 | 1525 |
{ |
1513 | 1526 |
if (type == 0) |
1514 | 1527 |
{ |
... | ... | |
1536 | 1549 |
{ |
1537 | 1550 |
try |
1538 | 1551 |
{ |
1539 |
using (CIEntities Entity = new CIEntities(ConnectStringBuilder.ProjectCIConnectString(project_no).ToString()))
|
|
1552 |
using (CIEntities Entity = new CIEntities(ConfigurationManager.ConnectionStrings["CIConnectionString"].ConnectionString))
|
|
1540 | 1553 |
{ |
1541 | 1554 |
Entity.CHECK_LIST_HISTORY.AddObject(Check_History); |
1542 | 1555 |
Entity.SaveChanges(); |
... | ... | |
1553 | 1566 |
{ |
1554 | 1567 |
try |
1555 | 1568 |
{ |
1556 |
using (CIEntities Entity = new CIEntities(ConnectStringBuilder.ProjectCIConnectString(project_no).ToString()))
|
|
1569 |
using (CIEntities Entity = new CIEntities(ConfigurationManager.ConnectionStrings["CIConnectionString"].ConnectionString))
|
|
1557 | 1570 |
{ |
1558 | 1571 |
var item = Entity.CHECK_LIST_HISTORY.Where(info => info.REVISION == rev).FirstOrDefault(); |
1559 | 1572 |
item = Check_History; |
... | ... | |
1571 | 1584 |
{ |
1572 | 1585 |
try |
1573 | 1586 |
{ |
1574 |
using (CIEntities Entity = new CIEntities(ConnectStringBuilder.ProjectCIConnectString(project_no).ToString()))
|
|
1587 |
using (CIEntities Entity = new CIEntities(ConfigurationManager.ConnectionStrings["CIConnectionString"].ConnectionString))
|
|
1575 | 1588 |
{ |
1576 | 1589 |
var item = Entity.CHECK_LIST.Where(info => info.ID == _id).FirstOrDefault(); |
1577 | 1590 |
item.TODOLIST = Check_value.TODOLIST; |
... | ... | |
1604 | 1617 |
{ |
1605 | 1618 |
try |
1606 | 1619 |
{ |
1607 |
using (CIEntities Entity = new CIEntities(ConnectStringBuilder.ProjectCIConnectString(project_no).ToString()))
|
|
1620 |
using (CIEntities Entity = new CIEntities(ConfigurationManager.ConnectionStrings["CIConnectionString"].ConnectionString))
|
|
1608 | 1621 |
{ |
1609 | 1622 |
Entity.CHECK_LIST.AddObject(Check_value); |
1610 | 1623 |
Entity.SaveChanges(); |
... | ... | |
1623 | 1636 |
CHECK_LIST Check_value = new CHECK_LIST(); |
1624 | 1637 |
try |
1625 | 1638 |
{ |
1626 |
using (CIEntities Entity = new CIEntities(ConnectStringBuilder.ProjectCIConnectString(project_no).ToString()))
|
|
1639 |
using (CIEntities Entity = new CIEntities(ConfigurationManager.ConnectionStrings["CIConnectionString"].ConnectionString))
|
|
1627 | 1640 |
{ |
1628 | 1641 |
Check_value = Entity.CHECK_LIST.Where(info => info.ID == _id).FirstOrDefault(); |
1629 | 1642 |
} |
... | ... | |
1640 | 1653 |
List<CHECK_LIST> list = new List<CHECK_LIST>(); |
1641 | 1654 |
try |
1642 | 1655 |
{ |
1643 |
using (CIEntities Entity = new CIEntities(ConnectStringBuilder.ProjectCIConnectString(project_no).ToString()))
|
|
1656 |
using (CIEntities Entity = new CIEntities(ConfigurationManager.ConnectionStrings["CIConnectionString"].ConnectionString))
|
|
1644 | 1657 |
{ |
1645 | 1658 |
list = Entity.CHECK_LIST.Where(i => i.PROJECT_NO == project_no && i.DOCUMENT_NO == doc_no && i.USER_ID == user_id).OrderBy(p => p.CREATE_TIME).ToList(); |
1646 | 1659 |
} |
... | ... | |
1657 | 1670 |
List<CHECK_LIST_HISTORY> history = new List<CHECK_LIST_HISTORY>(); |
1658 | 1671 |
try |
1659 | 1672 |
{ |
1660 |
using (CIEntities Entity = new CIEntities(ConnectStringBuilder.ProjectCIConnectString(project_no).ToString()))
|
|
1673 |
using (CIEntities Entity = new CIEntities(ConfigurationManager.ConnectionStrings["CIConnectionString"].ConnectionString))
|
|
1661 | 1674 |
{ |
1662 | 1675 |
history = Entity.CHECK_LIST_HISTORY.Where(data => data.CHECKLIST_ID == _id).ToList(); |
1663 | 1676 |
} |
... | ... | |
1674 | 1687 |
CHECK_LIST_HISTORY Check_Item = new CHECK_LIST_HISTORY(); |
1675 | 1688 |
try |
1676 | 1689 |
{ |
1677 |
using (CIEntities Entity = new CIEntities(ConnectStringBuilder.ProjectCIConnectString(project_no).ToString()))
|
|
1690 |
using (CIEntities Entity = new CIEntities(ConfigurationManager.ConnectionStrings["CIConnectionString"].ConnectionString))
|
|
1678 | 1691 |
{ |
1679 | 1692 |
Check_Item = Entity.CHECK_LIST_HISTORY.Where(info => info.CHECKLIST_ID == checklist_id && info.REVISION == rev).FirstOrDefault(); |
1680 | 1693 |
} |
... | ... | |
1690 | 1703 |
{ |
1691 | 1704 |
try |
1692 | 1705 |
{ |
1693 |
using (CIEntities Entity = new CIEntities(ConnectStringBuilder.ProjectCIConnectString(project_no).ToString()))
|
|
1706 |
using (CIEntities Entity = new CIEntities(ConfigurationManager.ConnectionStrings["CIConnectionString"].ConnectionString))
|
|
1694 | 1707 |
{ |
1695 | 1708 |
KCOMDataModel.DataModel.DOCPAGE _docpage = new KCOMDataModel.DataModel.DOCPAGE(); |
1696 | 1709 |
_mldocpage.ForEach(data => |
... | ... | |
1722 | 1735 |
|
1723 | 1736 |
try |
1724 | 1737 |
{ |
1725 |
using (CIEntities Entity = new CIEntities(ConnectStringBuilder.ProjectCIConnectString(project_no).ToString()))
|
|
1738 |
using (CIEntities Entity = new CIEntities(ConfigurationManager.ConnectionStrings["CIConnectionString"].ConnectionString))
|
|
1726 | 1739 |
{ |
1727 | 1740 |
markupInfo = Entity.MARKUP_INFO.Where(entity => entity.DOCINFO_ID == _id).OrderByDescending(i => i.CONSOLIDATE).OrderByDescending(j => j.CREATE_TIME).FirstOrDefault(); |
1728 | 1741 |
} |
... | ... | |
1741 | 1754 |
MARKUP_INFO_VERSION markup_info_version = new MARKUP_INFO_VERSION(); |
1742 | 1755 |
try |
1743 | 1756 |
{ |
1744 |
using (CIEntities Entity = new CIEntities(ConnectStringBuilder.ProjectCIConnectString(project_no).ToString()))
|
|
1757 |
using (CIEntities Entity = new CIEntities(ConfigurationManager.ConnectionStrings["CIConnectionString"].ConnectionString))
|
|
1745 | 1758 |
{ |
1746 | 1759 |
markup_info_version = (from version in Entity.MARKUP_INFO_VERSION |
1747 | 1760 |
where version.MARKUPINFO_ID == _markupinfoid |
... | ... | |
1767 | 1780 |
MARKUP_INFO_VERSION markup_info_version = new MARKUP_INFO_VERSION(); |
1768 | 1781 |
try |
1769 | 1782 |
{ |
1770 |
using (CIEntities Entity = new CIEntities(ConnectStringBuilder.ProjectCIConnectString(project_no).ToString()))
|
|
1783 |
using (CIEntities Entity = new CIEntities(ConfigurationManager.ConnectionStrings["CIConnectionString"].ConnectionString))
|
|
1771 | 1784 |
{ |
1772 | 1785 |
markup_info_version = (from version in Entity.MARKUP_INFO_VERSION |
1773 | 1786 |
where version.MARKUPINFO_ID == _markupinfoid |
... | ... | |
1791 | 1804 |
{ |
1792 | 1805 |
try |
1793 | 1806 |
{ |
1794 |
using (CIEntities Entity = new CIEntities(ConnectStringBuilder.ProjectCIConnectString(project_no).ToString()))
|
|
1807 |
using (CIEntities Entity = new CIEntities(ConfigurationManager.ConnectionStrings["CIConnectionString"].ConnectionString))
|
|
1795 | 1808 |
{ |
1796 | 1809 |
Entity.MARKUP_INFO.AddObject(value); |
1797 | 1810 |
Entity.SaveChanges(); |
... | ... | |
1809 | 1822 |
{ |
1810 | 1823 |
try |
1811 | 1824 |
{ |
1812 |
using (CIEntities Entity = new CIEntities(ConnectStringBuilder.ProjectCIConnectString(project_no).ToString()))
|
|
1825 |
using (CIEntities Entity = new CIEntities(ConfigurationManager.ConnectionStrings["CIConnectionString"].ConnectionString))
|
|
1813 | 1826 |
{ |
1814 | 1827 |
Entity.MARKUP_INFO_VERSION.AddObject(value); |
1815 | 1828 |
Entity.SaveChanges(); |
... | ... | |
1827 | 1840 |
{ |
1828 | 1841 |
try |
1829 | 1842 |
{ |
1830 |
using (CIEntities Entity = new CIEntities(ConnectStringBuilder.ProjectCIConnectString(project_no).ToString()))
|
|
1843 |
using (CIEntities Entity = new CIEntities(ConfigurationManager.ConnectionStrings["CIConnectionString"].ConnectionString))
|
|
1831 | 1844 |
{ |
1832 | 1845 |
Entity.MARKUP_DATA.AddObject(value); |
1833 | 1846 |
Entity.SaveChanges(); |
... | ... | |
1845 | 1858 |
{ |
1846 | 1859 |
try |
1847 | 1860 |
{ |
1848 |
using (CIEntities Entity = new CIEntities(ConnectStringBuilder.ProjectCIConnectString(project_no).ToString()))
|
|
1861 |
using (CIEntities Entity = new CIEntities(ConfigurationManager.ConnectionStrings["CIConnectionString"].ConnectionString))
|
|
1849 | 1862 |
{ |
1850 | 1863 |
var item = Entity.MARKUP_INFO.Where(entity => entity.DOCINFO_ID == _doc_id).OrderByDescending(i => i.CONSOLIDATE).OrderByDescending(j => j.CREATE_TIME).FirstOrDefault(); |
1851 | 1864 |
item.AVOID_CONSOLIDATE = 1; |
... | ... | |
1864 | 1877 |
{ |
1865 | 1878 |
try |
1866 | 1879 |
{ |
1867 |
using (CIEntities Entity = new CIEntities(ConnectStringBuilder.ProjectCIConnectString(project_no).ToString()))
|
|
1880 |
using (CIEntities Entity = new CIEntities(ConfigurationManager.ConnectionStrings["CIConnectionString"].ConnectionString))
|
|
1868 | 1881 |
{ |
1869 | 1882 |
var item = Entity.MARKUP_INFO.Where(info => info.ID == _id).FirstOrDefault(); |
1870 | 1883 |
item = value; |
... | ... | |
1884 | 1897 |
|
1885 | 1898 |
try |
1886 | 1899 |
{ |
1887 |
using (CIEntities Entity = new CIEntities(ConnectStringBuilder.ProjectCIConnectString(project_no).ToString()))
|
|
1900 |
using (CIEntities Entity = new CIEntities(ConfigurationManager.ConnectionStrings["CIConnectionString"].ConnectionString))
|
|
1888 | 1901 |
{ |
1889 | 1902 |
mlresult = Entity.MARKUP_DATA.Where(data => data.MARKUPINFO_VERSION_ID == _versionid).ToList(); |
1890 | 1903 |
} |
... | ... | |
1902 | 1915 |
try |
1903 | 1916 |
{ |
1904 | 1917 |
List<KCOMDataModel.DataModel.MARKUP_DATA> instanceDataSet = new List<KCOMDataModel.DataModel.MARKUP_DATA>(); |
1905 |
using (CIEntities Entity = new CIEntities(ConnectStringBuilder.ProjectCIConnectString(project_no).ToString()))
|
|
1918 |
using (CIEntities Entity = new CIEntities(ConfigurationManager.ConnectionStrings["CIConnectionString"].ConnectionString))
|
|
1906 | 1919 |
{ |
1907 | 1920 |
var markupInfo = Entity.MARKUP_INFO.Where(entity => entity.DOCINFO_ID == _doc_id && entity.CONSOLIDATE == 1).OrderByDescending(j => j.CREATE_TIME).FirstOrDefault(); |
1908 | 1921 |
if (markupInfo != null) |
... | ... | |
1972 | 1985 |
try |
1973 | 1986 |
{ |
1974 | 1987 |
List<KCOMDataModel.DataModel.MARKUP_DATA> instanceDataSet = new List<KCOMDataModel.DataModel.MARKUP_DATA>(); |
1975 |
using (CIEntities Entity = new CIEntities(ConnectStringBuilder.ProjectCIConnectString(project_no).ToString()))
|
|
1988 |
using (CIEntities Entity = new CIEntities(ConfigurationManager.ConnectionStrings["CIConnectionString"].ConnectionString))
|
|
1976 | 1989 |
{ |
1977 | 1990 |
var markupInfo = Entity.MARKUP_INFO.Where(entity => entity.DOCINFO_ID == _doc_id).OrderByDescending(i => i.CONSOLIDATE).OrderByDescending(j => j.CREATE_TIME).FirstOrDefault(); |
1978 | 1991 |
if (markupInfo.CONSOLIDATE == 1) |
... | ... | |
2043 | 2056 |
string docItemId; |
2044 | 2057 |
|
2045 | 2058 |
|
2046 |
using (CIEntities _ci = new CIEntities(ConnectStringBuilder.ProjectCIConnectString(ProjectNo).ToString()))
|
|
2059 |
using (CIEntities _ci = new CIEntities(ConfigurationManager.ConnectionStrings["CIConnectionString"].ConnectionString))
|
|
2047 | 2060 |
{ |
2048 | 2061 |
var _doc = _ci.DOCINFO.Where(info => info.ID == DocInfoID); |
2049 | 2062 |
|
... | ... | |
2076 | 2089 |
CREATE_DATETIME = DateTime.Now, |
2077 | 2090 |
STATUS = (int)IFinalPDF.FinalStatus.Insert |
2078 | 2091 |
}; |
2079 |
using (KCOMEntities _entity = new KCOMEntities(ConnectStringBuilder.KCOMConnectionString().ToString()))
|
|
2092 |
using (KCOMEntities _entity = new KCOMEntities(ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString))
|
|
2080 | 2093 |
{ |
2081 | 2094 |
_entity.AddToFINAL_PDF(fm); |
2082 | 2095 |
_entity.SaveChanges(System.Data.Objects.SaveOptions.AcceptAllChangesAfterSave); |
... | ... | |
2091 | 2104 |
// Create an instance of the remote object |
2092 | 2105 |
|
2093 | 2106 |
|
2094 |
using (KCOMEntities ec = new KCOMEntities(ConnectStringBuilder.KCOMConnectionString().ToString()))
|
|
2107 |
using (KCOMEntities ec = new KCOMEntities(ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString))
|
|
2095 | 2108 |
{ |
2096 | 2109 |
|
2097 | 2110 |
//remObj = (RemFinalPDFObject)Activator.GetObject(typeof(RemFinalPDFObject), |
... | ... | |
2140 | 2153 |
try |
2141 | 2154 |
{ |
2142 | 2155 |
List<KCOMDataModel.DataModel.MARKUP_DATA> instanceDataSet = new List<KCOMDataModel.DataModel.MARKUP_DATA>(); |
2143 |
using (CIEntities Entity = new CIEntities(ConnectStringBuilder.ProjectCIConnectString(project_no).ToString()))
|
|
2156 |
using (CIEntities Entity = new CIEntities(ConfigurationManager.ConnectionStrings["CIConnectionString"].ConnectionString))
|
|
2144 | 2157 |
{ |
2145 | 2158 |
string user_dept = Entity.MEMBER.Where(m => m.ID == _user_id).FirstOrDefault().DEPARTMENT; |
2146 | 2159 |
var markupInfos = Entity.MARKUP_INFO.Where(entity => entity.DOCINFO_ID == _doc_id |
... | ... | |
2216 | 2229 |
MEMBER rstmember = new MEMBER(); |
2217 | 2230 |
try |
2218 | 2231 |
{ |
2219 |
using (CIEntities Entity = new CIEntities(ConnectStringBuilder.ProjectCIConnectString(project_no).ToString()))
|
|
2232 |
using (CIEntities Entity = new CIEntities(ConfigurationManager.ConnectionStrings["CIConnectionString"].ConnectionString))
|
|
2220 | 2233 |
{ |
2221 | 2234 |
var tmp = (from member in Entity.MEMBER |
2222 | 2235 |
where member.ID == user_id && member.PROJECT_NO == project_no |
... | ... | |
2240 | 2253 |
|
2241 | 2254 |
try |
2242 | 2255 |
{ |
2243 |
using (KCOMEntities Entity = new KCOMEntities(ConnectStringBuilder.KCOMConnectionString().ToString()))
|
|
2256 |
using (KCOMEntities Entity = new KCOMEntities(ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString))
|
|
2244 | 2257 |
{ |
2245 | 2258 |
Custom_List = Entity.SYMBOL_PRIVATE.Where(data => data.MEMBER_USER_ID == user_id).ToList(); |
2246 | 2259 |
} |
... | ... | |
2257 | 2270 |
List<string> Custom_List = new List<string>(); |
2258 | 2271 |
try |
2259 | 2272 |
{ |
2260 |
using (KCOMEntities Entity = new KCOMEntities(ConnectStringBuilder.KCOMConnectionString().ToString()))
|
|
2273 |
using (KCOMEntities Entity = new KCOMEntities(ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString))
|
|
2261 | 2274 |
{ |
2262 | 2275 |
Custom_List = Entity.SYMBOL_PUBLIC.Select(data => data.DEPARTMENT).Distinct().ToList(); |
2263 | 2276 |
} |
... | ... | |
2274 | 2287 |
List<SYMBOL_PUBLIC> Custom_List = new List<SYMBOL_PUBLIC>(); |
2275 | 2288 |
try |
2276 | 2289 |
{ |
2277 |
using (KCOMEntities Entity = new KCOMEntities(ConnectStringBuilder.KCOMConnectionString().ToString()))
|
|
2290 |
using (KCOMEntities Entity = new KCOMEntities(ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString))
|
|
2278 | 2291 |
{ |
2279 | 2292 |
if(!string.IsNullOrEmpty(dept)) |
2280 | 2293 |
{ |
... | ... | |
2306 | 2319 |
string result; |
2307 | 2320 |
try |
2308 | 2321 |
{ |
2309 |
using (KCOMEntities Entity = new KCOMEntities(ConnectStringBuilder.KCOMConnectionString().ToString()))
|
|
2322 |
using (KCOMEntities Entity = new KCOMEntities(ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString))
|
|
2310 | 2323 |
{ |
2311 | 2324 |
if(type == 0) |
2312 | 2325 |
{ |
... | ... | |
2330 | 2343 |
string result; |
2331 | 2344 |
try |
2332 | 2345 |
{ |
2333 |
using (KCOMEntities Entity = new KCOMEntities(ConnectStringBuilder.KCOMConnectionString().ToString()))
|
|
2346 |
using (KCOMEntities Entity = new KCOMEntities(ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString))
|
|
2334 | 2347 |
{ |
2335 | 2348 |
if (type == 0) |
2336 | 2349 |
{ |
... | ... | |
2357 | 2370 |
string ifsign = getEnsembleSign(user_id); |
2358 | 2371 |
if (string.IsNullOrEmpty(ifsign)) |
2359 | 2372 |
{ |
2360 |
var ModelWFConnectionString = ConnectStringBuilder.ProjectCIConnectString(project_no).ToString();
|
|
2373 |
var ModelWFConnectionString = ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString;
|
|
2361 | 2374 |
if (null != ModelWFConnectionString) |
2362 | 2375 |
{ |
2363 | 2376 |
using (CIEntities entity = new CIEntities(ModelWFConnectionString)) |
... | ... | |
2394 | 2407 |
|
2395 | 2408 |
try |
2396 | 2409 |
{ |
2397 |
using (KCOMDataModel.DataModel.KCOMEntities Entity = new KCOMDataModel.DataModel.KCOMEntities(KCOMDataModel.Common.ConnectStringBuilder.KCOMConnectionString().ToString()))
|
|
2410 |
using (KCOMDataModel.DataModel.KCOMEntities Entity = new KCOMDataModel.DataModel.KCOMEntities(ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString))
|
|
2398 | 2411 |
{ |
2399 | 2412 |
result = Entity.RUN_PROJECTS.Where(i => i.PROJECT_NO == project_no).FirstOrDefault().PROJECT_NAME.ToString(); |
2400 | 2413 |
} |
... | ... | |
2413 | 2426 |
|
2414 | 2427 |
try |
2415 | 2428 |
{ |
2416 |
using (CIEntities Entity = new CIEntities(ConnectStringBuilder.ProjectCIConnectString(project_no).ToString()))
|
|
2429 |
using (CIEntities Entity = new CIEntities(ConfigurationManager.ConnectionStrings["CIConnectionString"].ConnectionString))
|
|
2417 | 2430 |
{ |
2418 | 2431 |
result = Entity.DOCUMENT_ITEM.Where(i => i.PROJECT_NO == project_no |
2419 | 2432 |
&& i.DOCUMENT_NO == doc_no |
... | ... | |
2434 | 2447 |
|
2435 | 2448 |
try |
2436 | 2449 |
{ |
2437 |
using (CIEntities Entity = new CIEntities(ConnectStringBuilder.ProjectCIConnectString(project_no).ToString()))
|
|
2450 |
using (CIEntities Entity = new CIEntities(ConfigurationManager.ConnectionStrings["CIConnectionString"].ConnectionString))
|
|
2438 | 2451 |
{ |
2439 | 2452 |
docinfo = (from info in Entity.DOCINFO |
2440 | 2453 |
where info.DOCUMENT_ID == doc_id |
... | ... | |
2456 | 2469 |
List<MarkupInfoItem> markupinfo = new List<MarkupInfoItem>(); |
2457 | 2470 |
try |
2458 | 2471 |
{ |
2459 |
using (CIEntities Entity = new CIEntities(ConnectStringBuilder.ProjectCIConnectString(project_no).ToString()))
|
|
2472 |
using (CIEntities Entity = new CIEntities(ConfigurationManager.ConnectionStrings["CIConnectionString"].ConnectionString))
|
|
2460 | 2473 |
{ |
2461 | 2474 |
var docitem = (from info in Entity.DOCINFO |
2462 | 2475 |
where info.DOCUMENT_ID == doc_id |
... | ... | |
2520 | 2533 |
{ |
2521 | 2534 |
try |
2522 | 2535 |
{ |
2523 |
using (CIEntities entity = new CIEntities(ConnectStringBuilder.ProjectCIConnectString(project_no).ToString()))
|
|
2536 |
using (CIEntities entity = new CIEntities(ConfigurationManager.ConnectionStrings["CIConnectionString"].ConnectionString))
|
|
2524 | 2537 |
{ |
2525 | 2538 |
entity.TALK.AddObject(value); |
2526 | 2539 |
entity.SaveChanges(); |
... | ... | |
2539 | 2552 |
List<TALK> result = new List<TALK>(); |
2540 | 2553 |
try |
2541 | 2554 |
{ |
2542 |
using (CIEntities entity = new CIEntities(ConnectStringBuilder.ProjectCIConnectString(project_no).ToString()))
|
|
2555 |
using (CIEntities entity = new CIEntities(ConfigurationManager.ConnectionStrings["CIConnectionString"].ConnectionString))
|
|
2543 | 2556 |
{ |
2544 | 2557 |
result = entity.TALK.Where(data => data.DOCUMENT_ID == doc_id).ToList(); |
2545 | 2558 |
} |
... | ... | |
2564 | 2577 |
string soapurl = string.Empty; |
2565 | 2578 |
try |
2566 | 2579 |
{ |
2567 |
using (KCOMEntities Entity = new KCOMEntities(ConnectStringBuilder.KCOMConnectionString().ToString()))
|
|
2580 |
using (KCOMEntities Entity = new KCOMEntities(ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString))
|
|
2568 | 2581 |
{ |
2569 | 2582 |
var item = Entity.PROPERTIES.Where(d => d.TYPE == "UpLoadServiceUrl").FirstOrDefault(); |
2570 | 2583 |
soapurl = item.VALUE; |
... | ... | |
2610 | 2623 |
|
2611 | 2624 |
try |
2612 | 2625 |
{ |
2613 |
using (CIEntities _entity = new CIEntities(ConnectStringBuilder.ProjectCIConnectString(project_no).ToString()))
|
|
2626 |
using (CIEntities _entity = new CIEntities(ConfigurationManager.ConnectionStrings["CIConnectionString"].ConnectionString))
|
|
2614 | 2627 |
{ |
2615 | 2628 |
var doc = _entity.DOCINFO.Where(x => x.ID == docinfo_id).FirstOrDefault(); |
2616 | 2629 |
if(doc != null) |
... | ... | |
2640 | 2653 |
|
2641 | 2654 |
try |
2642 | 2655 |
{ |
2643 |
using (CIEntities _entity = new CIEntities(ConnectStringBuilder.ProjectCIConnectString(project_no).ToString()))
|
|
2656 |
using (CIEntities _entity = new CIEntities(ConfigurationManager.ConnectionStrings["CIConnectionString"].ConnectionString))
|
|
2644 | 2657 |
{ |
2645 | 2658 |
var doc = _entity.DOCUMENT_ITEM.Where(x => x.DOCUMENT_ID == document_id).FirstOrDefault(); |
2646 | 2659 |
if(doc != null) |
... | ... | |
2677 | 2690 |
|
2678 | 2691 |
try |
2679 | 2692 |
{ |
2680 |
//using (CIEntities _entity = new CIEntities(ConnectStringBuilder.ProjectCIConnectString(project_no).ToString()))
|
|
2681 |
using (CIEntities _entity = new CIEntities(ConnectStringBuilder.ProjectCIConnectString(project_no).ToString()))
|
|
2693 |
//using (CIEntities _entity = new CIEntities(ConfigurationManager.ConnectionStrings["CIConnectionString"].ConnectionString))
|
|
2694 |
using (CIEntities _entity = new CIEntities(ConfigurationManager.ConnectionStrings["CIConnectionString"].ConnectionString))
|
|
2682 | 2695 |
{ |
2683 | 2696 |
var datas = _entity.MARKUP_DATA.Where(x => x.MARKUP_INFO_VERSION.MARKUP_INFO.DOCINFO_ID == docinfo_id |
2684 | 2697 |
&& x.MARKUP_INFO_VERSION.MARKUP_INFO.CONSOLIDATE == 1 |
... | ... | |
2714 | 2727 |
|
2715 | 2728 |
try |
2716 | 2729 |
{ |
2717 |
using (CIEntities _entity = new CIEntities(ConnectStringBuilder.ProjectCIConnectString(project_no).ToString()))
|
|
2730 |
using (CIEntities _entity = new CIEntities(ConfigurationManager.ConnectionStrings["CIConnectionString"].ConnectionString))
|
|
2718 | 2731 |
{ |
2719 | 2732 |
var tmp = _entity.MARKUP_INFO.Where(x => x.DOCINFO_ID == docinfo_id && x.CONSOLIDATE == 1 && x.AVOID_CONSOLIDATE == 0 && x.PART_CONSOLIDATE == 0).FirstOrDefault(); |
2720 | 2733 |
if (tmp != null) |
... | ... | |
2742 | 2755 |
|
2743 | 2756 |
try |
2744 | 2757 |
{ |
2745 |
using (KCOMEntities _entity = new KCOMEntities(ConnectStringBuilder.KCOMConnectionString().ToString()))
|
|
2758 |
using (KCOMEntities _entity = new KCOMEntities(ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString))
|
|
2746 | 2759 |
{ |
2747 | 2760 |
var finalList = _entity.FINAL_PDF.Where(final => final.ID == final_id).ToList(); |
2748 | 2761 |
foreach(var final in finalList) |
... | ... | |
2781 | 2794 |
|
2782 | 2795 |
try |
2783 | 2796 |
{ |
2784 |
using (CIEntities _entity = new CIEntities(ConnectStringBuilder.ProjectCIConnectString(project_no).ToString()))
|
|
2797 |
using (CIEntities _entity = new CIEntities(ConfigurationManager.ConnectionStrings["CIConnectionString"].ConnectionString))
|
|
2785 | 2798 |
{ |
2786 | 2799 |
var pages = _entity.DOCPAGE.Where(x => x.DOCINFO_ID == docinfo_id).OrderBy(x => x.PAGE_NUMBER).ToList(); |
2787 | 2800 |
foreach(var page in pages) |
... | ... | |
2811 | 2824 |
|
2812 | 2825 |
try |
2813 | 2826 |
{ |
2814 |
using (KCOMEntities _entity = new KCOMEntities(ConnectStringBuilder.KCOMConnectionString().ToString()))
|
|
2827 |
using (KCOMEntities _entity = new KCOMEntities(ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString))
|
|
2815 | 2828 |
{ |
2816 | 2829 |
var tmp = _entity.FINAL_PDF.Where(x => x.ID == final_id).FirstOrDefault(); |
2817 | 2830 |
if(tmp != null) |
... | ... | |
2853 | 2866 |
|
2854 | 2867 |
try |
2855 | 2868 |
{ |
2856 |
using (KCOMEntities _entity = new KCOMEntities(ConnectStringBuilder.KCOMConnectionString().ToString()))
|
|
2869 |
using (KCOMEntities _entity = new KCOMEntities(ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString))
|
|
2857 | 2870 |
{ |
2858 | 2871 |
var finalpdf = _entity.FINAL_PDF.Where(x => x.DOCINFO_ID == DocInfoID && x.MARKUPINFO_ID == MarkupInfoID && x.CREATE_USER_ID == CreateUserID && x.STATUS != (int)FinalStatus.Error).FirstOrDefault(); |
2859 | 2872 |
if (finalpdf != null) |
... | ... | |
2881 | 2894 |
|
2882 | 2895 |
try |
2883 | 2896 |
{ |
2884 |
using (KCOMEntities _entity = new KCOMEntities(ConnectStringBuilder.KCOMConnectionString().ToString()))
|
|
2897 |
using (KCOMEntities _entity = new KCOMEntities(ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString))
|
|
2885 | 2898 |
{ |
2886 | 2899 |
var tmp = _entity.FINAL_PDF.Where(x => x.ID == final_id).FirstOrDefault(); |
2887 | 2900 |
if (tmp != null) |
... | ... | |
2905 | 2918 |
|
2906 | 2919 |
try |
2907 | 2920 |
{ |
2908 |
using (KCOMEntities _entity = new KCOMEntities(ConnectStringBuilder.KCOMConnectionString().ToString()))
|
|
2921 |
using (KCOMEntities _entity = new KCOMEntities(ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString))
|
|
2909 | 2922 |
{ |
2910 | 2923 |
var tmp = _entity.FINAL_PDF.Where(x => x.ID == final_id).FirstOrDefault(); |
2911 | 2924 |
if (tmp != null) |
... | ... | |
2931 | 2944 |
|
2932 | 2945 |
try |
2933 | 2946 |
{ |
2934 |
using (CIEntities _entity = new CIEntities(ConnectStringBuilder.ProjectCIConnectString(project_no).ToString()))
|
|
2947 |
using (CIEntities _entity = new CIEntities(ConfigurationManager.ConnectionStrings["CIConnectionString"].ConnectionString))
|
|
2935 | 2948 |
{ |
2936 | 2949 |
var item = _entity.DOCUMENT_ITEM.Where(d => d.DOCUMENT_ID == document_id).FirstOrDefault(); |
2937 | 2950 |
if (item != null) |
... | ... | |
2955 | 2968 |
MEMBER member = null; |
2956 | 2969 |
try |
2957 | 2970 |
{ |
2958 |
using (CIEntities _entity = new CIEntities(ConnectStringBuilder.ProjectCIConnectString(project_no).ToString()))
|
|
2971 |
using (CIEntities _entity = new CIEntities(ConfigurationManager.ConnectionStrings["CIConnectionString"].ConnectionString))
|
|
2959 | 2972 |
{ |
2960 | 2973 |
var data = _entity.MARKUP_DATA.Where(x => x.ID == markupdata_id).FirstOrDefault(); |
2961 | 2974 |
string user_id = data.MARKUP_INFO_VERSION.MARKUP_INFO.USER_ID; |
... | ... | |
2985 | 2998 |
List<PROPERTIES> results = new List<PROPERTIES>(); |
2986 | 2999 |
try |
2987 | 3000 |
{ |
2988 |
using (KCOMEntities _entity = new KCOMEntities(KCOMDataModel.Common.ConnectStringBuilder.KCOMConnectionString().ToString()))
|
|
3001 |
using (KCOMEntities _entity = new KCOMEntities(ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString))
|
|
2989 | 3002 |
{ |
2990 | 3003 |
var _items = _entity.PROPERTIES.Where(x => x.PROPERTY == project_no).ToList(); |
2991 | 3004 |
foreach(var item in _items) |
내보내기 Unified diff