개정판 cb806a91
AliveGrid count expander열림, dashboard 테두리
Change-Id: Id50a07c853f65d7037685ba4c220cdd739c10fca
ConvertService/ServiceBase/Markus.Service.StationController/ViewModel/FinalPDFViewModel.cs | ||
---|---|---|
13 | 13 |
using System.Windows; |
14 | 14 |
using Telerik.Windows.Controls; |
15 | 15 |
using Telerik.Windows.Data; |
16 |
//using ConvertItem = Markus.Service.Interface.ConvertItem; |
|
17 | 16 |
using System.Net; |
18 | 17 |
using System.Windows.Threading; |
19 | 18 |
using System.Diagnostics; |
... | ... | |
23 | 22 |
using System.Windows.Controls; |
24 | 23 |
using System.IO; |
25 | 24 |
using Newtonsoft.Json; |
26 |
//using Markus.Service.Interface; |
|
27 | 25 |
using static Markus.Service.StationController.Data.FinalPDF; |
28 | 26 |
using System.Collections.ObjectModel; |
29 | 27 |
|
... | ... | |
630 | 628 |
} |
631 | 629 |
} |
632 | 630 |
|
631 |
public bool _AliveShow; |
|
632 |
public bool AliveShow |
|
633 |
{ |
|
634 |
get => _AliveShow; |
|
635 |
set |
|
636 |
{ |
|
637 |
if (_AliveShow = !value) |
|
638 |
{ |
|
639 |
_AliveShow = false; |
|
640 |
} |
|
641 |
_AliveShow = value; |
|
642 |
OnPropertyChanged(() => AliveShow); |
|
643 |
} |
|
644 |
} |
|
645 |
|
|
633 | 646 |
|
634 | 647 |
private bool _ExcptionCheck = false; |
635 | 648 |
public bool ExcptionCheck |
... | ... | |
721 | 734 |
} |
722 | 735 |
|
723 | 736 |
await Task.Delay(5000); |
724 |
//await Task.Delay(10000); |
|
725 |
|
|
726 |
//System.Threading.Thread.Sleep(new TimeSpan(0,0,0,0,100)); |
|
727 | 737 |
|
728 | 738 |
dispatcherTimer.Start(); |
729 | 739 |
} |
... | ... | |
947 | 957 |
var Listitems = from x in await WcfClient.GET_SELECT_FINAL_PDF_ITEMAsync(null, ProjectNumberFilter.Project_NO, DocumentIDFilter, MarkupInfo_IDFilter, DOCINFO_IDFilter, Document_NameFilter, Document_NOFilter, |
948 | 958 |
CreateUser_IDFilter, _status, SelectedCount.ValueMember, GROUP_NOFilter, REVISIONFilter, Start_CreateTime, Finish_CreateTime, null, null, null, null, Document_URLFilter, ExcptionCheck) |
949 | 959 |
let MarkusLink = "kcom://" + CreateMarkusParam(x.ID, x.DOCUMENT_ID, "doftech") |
950 |
select new FinalPDF(x.ID, x.PROJECT_NO, _status, x.DOCUMENT_ID, x.MARKUPINFO_ID, x.DOCINFO_ID, x.DOCUMENT_NAME, x.DOCUMENT_NO, x.CREATE_USER_ID,
|
|
960 |
select new FinalPDF(x.ID, x.PROJECT_NO, x.STATUS, x.DOCUMENT_ID, x.MARKUPINFO_ID, x.DOCINFO_ID, x.DOCUMENT_NAME, x.DOCUMENT_NO, x.CREATE_USER_ID,
|
|
951 | 961 |
x.REVISION, x.CURRENT_PAGE, x.TOTAL_PAGE, x.EXCEPTION, x.GROUP_NO, x.CREATE_DATETIME, x.START_DATETIME, x.END_DATETIME |
952 | 962 |
, x.ORIGINAL_FILE, x.CONVERT_PATH, MarkusLink); |
953 | 963 |
|
... | ... | |
1045 | 1055 |
|
1046 | 1056 |
var MarkusLink = "kcom://" + CreateMarkusParam(item.ProjectNumber, item.DocumentID, "doftech"); |
1047 | 1057 |
|
1048 |
//var convertpath = GetSearchConvertPathAndMarkus(item.ProjectNumber, item.UniqueKey); |
|
1049 |
|
|
1050 | 1058 |
if (item.ConvertState != null) |
1051 | 1059 |
{ |
1052 | 1060 |
itemsToEach.ConvertState = (StatusCodeType)Enum.Parse(typeof(StatusCodeType), item.ConvertState); |
... | ... | |
1076 | 1084 |
itemsToEach.CreateTime = item.CreateTime; |
1077 | 1085 |
itemsToEach.StartTime = item.StartTime; |
1078 | 1086 |
itemsToEach.EndTime = item.EndTime; |
1079 |
//itemsToEach.MarkupInfo_ID = |
|
1080 |
//itemsToEach.DocInfo_ID = |
|
1081 |
//itemsToEach.Create_User_ID = |
|
1082 | 1087 |
|
1083 | 1088 |
itemsToList.Add(itemsToEach); |
1084 | 1089 |
} |
... | ... | |
1133 | 1138 |
} |
1134 | 1139 |
else |
1135 | 1140 |
{ |
1136 |
// 데이터 업데이트 |
|
1137 | 1141 |
newitems.ForEach(newitem => |
1138 | 1142 |
{ |
1139 | 1143 |
AliveItems.UpdateWhere(changeitem => ConvertItemEx.ChangeValues(changeitem, newitem), x => x.ProjectNumber == newitem.ProjectNumber && x.ConvertID == newitem.ConvertID); |
1140 | 1144 |
}); |
1141 | 1145 |
|
1142 |
///추가 |
|
1143 | 1146 |
foreach (var item in newitems) |
1144 | 1147 |
{ |
1145 | 1148 |
if (AliveItems.Count(x => x.ConvertID == item.ConvertID && x.ProjectNumber == item.ProjectNumber) == 0) |
... | ... | |
1148 | 1151 |
} |
1149 | 1152 |
} |
1150 | 1153 |
|
1151 |
// 삭제 |
|
1152 |
|
|
1153 | 1154 |
for (int i = AliveItems.Count() - 1; i > -1; --i) |
1154 | 1155 |
{ |
1155 | 1156 |
var item = AliveItems[i]; |
... | ... | |
1168 | 1169 |
} |
1169 | 1170 |
} |
1170 | 1171 |
|
1172 |
if (AliveItems.Count() > 1) |
|
1173 |
{ |
|
1174 |
AliveShow = true; |
|
1175 |
} |
|
1176 |
|
|
1171 | 1177 |
Alive_Height = 80 + (newitems.Count() * 10); |
1172 | 1178 |
DataBase_ItemsHeight = 800 - (RealConvert_Height + Alive_Height); |
1173 | 1179 |
} |
... | ... | |
1218 | 1224 |
} |
1219 | 1225 |
else |
1220 | 1226 |
{ |
1221 |
//ConvertDatabase _DataConvert = new ConvertDatabase(App.MarkusDataBaseConnecitonString); |
|
1222 | 1227 |
var resultRealConvert = 0; |
1223 | 1228 |
var resultFiltertConvert = 0; |
1224 | 1229 |
|
1225 | 1230 |
if (SelectRealConvert != null) |
1226 | 1231 |
{ |
1227 |
//resultRealConvert = _DataConvert.SetCleanUpItem(SelectRealConvert);//ConvertDataBase |
|
1228 |
resultRealConvert = SetCleanUpItem(SelectRealConvert).Result;//ConvertDataBase |
|
1232 |
resultRealConvert = SetCleanUpItem(SelectRealConvert).Result; |
|
1229 | 1233 |
} |
1230 | 1234 |
else if (SelectFilterConvert != null) |
1231 | 1235 |
{ |
1232 |
//resultFiltertConvert = _DataConvert.SetCleanUpItem(SelectFilterConvert);//ConvertDataBase |
|
1233 | 1236 |
resultFiltertConvert = SetCleanUpItem(SelectFilterConvert).Result; |
1234 | 1237 |
} |
1235 | 1238 |
System.Diagnostics.Debug.WriteLine(resultRealConvert + " " + resultFiltertConvert); |
... | ... | |
1268 | 1271 |
var _CREATE_DATETIME = DateTime.Now; |
1269 | 1272 |
var _STATUS = (int)StatusCodeType.None; |
1270 | 1273 |
|
1271 |
await WcfClient.GET_SELECT_RERECONVERT_ITEMAsync(_ConvertItem.ConvertID, 0, _CREATE_DATETIME, _STATUS, null);//_END_DATETIME = null 에러
|
|
1274 |
await WcfClient.GET_SELECT_RERECONVERT_ITEMAsync(_ConvertItem.ConvertID, 0, _CREATE_DATETIME, _STATUS, null); |
|
1272 | 1275 |
|
1273 | 1276 |
} |
1274 | 1277 |
|
1275 | 1278 |
return result; |
1276 | 1279 |
} |
1277 | 1280 |
|
1278 |
//public string[] GetSearchConvertPathAndMarkus(string PROJECT_NO, string DOCUMENT_ID) |
|
1279 |
//{ |
|
1280 |
// string[] ConvertPath = new string[2]; |
|
1281 |
// ConvertPath[0] = GetConvertPath(PROJECT_NO, DOCUMENT_ID); |
|
1282 |
// ConvertPath[1] = "kcom://" + CreateMarkusParam(PROJECT_NO, DOCUMENT_ID, "doftech"); |
|
1283 |
|
|
1284 |
// return ConvertPath; |
|
1285 |
//} |
|
1286 |
|
|
1287 | 1281 |
public static string CreateMarkusParam(string projectNo, string documentID, string userID) |
1288 | 1282 |
{ |
1289 | 1283 |
ViewInfo viewInfo = new ViewInfo(); |
... | ... | |
1306 | 1300 |
|
1307 | 1301 |
} |
1308 | 1302 |
|
1309 |
#region Convert Path |
|
1310 |
|
|
1311 |
//private string GetConvertPath(string ProjectNo, string DocumentID) |
|
1312 |
//{ |
|
1313 |
// try |
|
1314 |
// { |
|
1315 |
// return Path.Combine(BaseStorage(ProjectNo), ProjectNo + "_Tile", (System.Convert.ToInt64(DocumentID) / 100).ToString(), DocumentID); |
|
1316 |
// } |
|
1317 |
// catch (Exception) |
|
1318 |
// { |
|
1319 |
// throw new Exception("GetConvertPath Error"); |
|
1320 |
// } |
|
1321 |
|
|
1322 |
//} |
|
1323 |
|
|
1324 |
//private async string BaseStorage(string ProjectNo) |
|
1325 |
//{ |
|
1326 |
// using (markusEntities entities = new markusEntities(App.MarkusDataBaseConnecitonString)) |
|
1327 |
// { |
|
1328 |
// string result = ""; |
|
1329 |
|
|
1330 |
// var properties = await WcfClient.GET_SELECT_FINAL_PDF_ITEM(null, ProjectNo, null, null, null, null, null, null, null, 1, null, null, null, null, |
|
1331 |
// null, null, null, null, null); |
|
1332 |
|
|
1333 |
|
|
1334 |
// if (properties.Count() > 0) |
|
1335 |
// { |
|
1336 |
// result = properties.First().PROPERTIES_VALUE; |
|
1337 |
// } |
|
1338 |
// else |
|
1339 |
// { |
|
1340 |
// throw new Exception($"Project {ProjectNo} BaseStorage Not Setting."); |
|
1341 |
// } |
|
1342 |
|
|
1343 |
// return result; |
|
1344 |
// } |
|
1345 |
//} |
|
1346 |
|
|
1347 |
#endregion |
|
1348 |
|
|
1349 | 1303 |
#endregion |
1350 | 1304 |
|
1351 | 1305 |
#region Validation |
... | ... | |
1392 | 1346 |
{ |
1393 | 1347 |
dispatcherTimer.Tick -= new EventHandler(Timer_Tick); |
1394 | 1348 |
dispatcherTimer.Tick += new EventHandler(SearchTimer_Tick); |
1395 |
//DataSearch(new[] { (StatusCodeType)(SelectedStatus.Value) }, FilterConvertSource); |
|
1396 | 1349 |
} |
1397 | 1350 |
|
1398 | 1351 |
#endregion |
... | ... | |
1407 | 1360 |
{ |
1408 | 1361 |
var convertitem = obj as FinalPDF; |
1409 | 1362 |
|
1410 |
//SelectFilterConvert = convertitem; |
|
1411 | 1363 |
SelectFilterConvertList.Add(convertitem); |
1412 | 1364 |
|
1413 | 1365 |
SelectRealConvert = convertitem; |
내보내기 Unified diff