From 983914afc510f004a8b357c37c8711900ec30cf1 Mon Sep 17 00:00:00 2001 From: SHM Date: Wed, 26 Jun 2024 13:57:41 +0900 Subject: [PATCH] =?UTF-8?q?[=EC=84=B1=ED=98=84=EB=AA=A8]=20Trend=20?= =?UTF-8?q?=ED=81=B4=EB=A6=AD=20=EC=98=A4=EB=A5=98=20=EC=88=98=EC=A0=95,?= =?UTF-8?q?=20DB=20=EC=BB=A4=EB=84=A5=EC=85=98=20=EC=A0=95=EB=B3=B4=20?= =?UTF-8?q?=EC=98=A4=EB=A5=98=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CPXV2 TRA V2/SystemX.Product.CP.TRA/DB/DataBaseConn.cs | 6 ++++-- .../SystemX.Product.CP.TRA/DataManager/DMOverview.cs | 3 ++- CPXV2 TRA V2/SystemX.Product.CP.TRA/MainForm.cs | 10 ++++++++-- .../SystemX.Product.CP.TRA/UIControl/UcTRAStepTrend.cs | 2 +- 4 files changed, 15 insertions(+), 6 deletions(-) diff --git a/CPXV2 TRA V2/SystemX.Product.CP.TRA/DB/DataBaseConn.cs b/CPXV2 TRA V2/SystemX.Product.CP.TRA/DB/DataBaseConn.cs index 805ff1f..85e639d 100644 --- a/CPXV2 TRA V2/SystemX.Product.CP.TRA/DB/DataBaseConn.cs +++ b/CPXV2 TRA V2/SystemX.Product.CP.TRA/DB/DataBaseConn.cs @@ -27,6 +27,8 @@ namespace DataBaseConnection.Control public static string MainCatalogName = "CPXV2"; public static string ShortTermCatalogName = ""; public static List LongTermCatalogName = new List { "" } ; + public static string SelectLongTermCatalogNameCon1 = string.Empty; + public static string SelectLongTermCatalogNameCon2 = string.Empty; public static bool ScanLongTermLog = false; public const string Address = "192.168.0.43"; @@ -251,14 +253,14 @@ namespace DataBaseConnection.Control if (list?.Count > 0) { //short term - var shortTermCatalogName = list.Find(x => x.ToLower().Contains("short")); + var shortTermCatalogName = list.Find(x => x.ToLower().Contains("short") && x.ToLower().Contains("json")); if (string.IsNullOrEmpty(shortTermCatalogName) == false) { ShortTermCatalogName = shortTermCatalogName; } //long term - var longTermCatalogName = list.FindAll(x => x.ToLower().Contains("long")); + var longTermCatalogName = list.FindAll(x => x.ToLower().Contains("long") && x.ToLower().Contains("json")); if (longTermCatalogName?.Count() > 0) { LongTermCatalogName?.Clear(); diff --git a/CPXV2 TRA V2/SystemX.Product.CP.TRA/DataManager/DMOverview.cs b/CPXV2 TRA V2/SystemX.Product.CP.TRA/DataManager/DMOverview.cs index 6d80ab0..7ee2a73 100644 --- a/CPXV2 TRA V2/SystemX.Product.CP.TRA/DataManager/DMOverview.cs +++ b/CPXV2 TRA V2/SystemX.Product.CP.TRA/DataManager/DMOverview.cs @@ -121,7 +121,7 @@ namespace SystemX.Product.TRA.DataManager { LongTermDBConn = GetDBController.GetLongTermConn1().FirstOrDefault().Value; } - + DatabaseConnControl.SelectLongTermCatalogNameCon1 = LongTermDBConn.Database; } else if (SelectView == eSelectDataView.DataDocumentViewC2) { @@ -130,6 +130,7 @@ namespace SystemX.Product.TRA.DataManager { LongTermDBConn = GetDBController.GetLongTermConn2().FirstOrDefault().Value; } + DatabaseConnControl.SelectLongTermCatalogNameCon2 = LongTermDBConn.Database; } DataTable dtResult = new DataTable(); diff --git a/CPXV2 TRA V2/SystemX.Product.CP.TRA/MainForm.cs b/CPXV2 TRA V2/SystemX.Product.CP.TRA/MainForm.cs index 22e79c0..d1a93b6 100644 --- a/CPXV2 TRA V2/SystemX.Product.CP.TRA/MainForm.cs +++ b/CPXV2 TRA V2/SystemX.Product.CP.TRA/MainForm.cs @@ -545,7 +545,7 @@ namespace SystemX.Product.CP.TRA strAddress += " , " + nConnPortDT1.ToString(); - strConnDT1Label = "Data Database [1][" + strAddress + "] [" + DatabaseConnControl.ShortTermCatalogName + "] [" + DatabaseConnControl.LongTermCatalogName + "]"; + strConnDT1Label = "Data Database [1][" + strAddress + "] [" + DatabaseConnControl.ShortTermCatalogName + "] [" + DatabaseConnControl.SelectLongTermCatalogNameCon1 + "]"; barStaticItemConn.Caption += (" " + strConnDT1Label); @@ -555,7 +555,7 @@ namespace SystemX.Product.CP.TRA strAddress += " , " + nConnPortDT2.ToString(); - strConnDT2Label = "Data Database [2][" + strAddress + "] [" + DatabaseConnControl.ShortTermCatalogName + "] [" + DatabaseConnControl.LongTermCatalogName + "]"; + strConnDT2Label = "Data Database [2][" + strAddress + "] [" + DatabaseConnControl.ShortTermCatalogName + "] [" + DatabaseConnControl.SelectLongTermCatalogNameCon2 + "]"; //barStaticItemConn.Caption += " Data Database [2][" + strAddress + "] [" + DatabaseConnControl.ShortTermCatalogName + "] [" + DatabaseConnControl.LongTermCatalogName + "]"; @@ -583,6 +583,12 @@ namespace SystemX.Product.CP.TRA OverviewSearchOption oso = await view.ViewData(eCurrentView, dtStart, dtEnd, OvOp, bMergeByPartNumber, false, strTestQuery); + string strAddress = (strConnIPAddressTL == string.Empty ? "LocalHost" : strConnIPAddressTL); + strConnDT1Label = "Data Database [1][" + strAddress + "] [" + DatabaseConnControl.ShortTermCatalogName + "] [" + DatabaseConnControl.SelectLongTermCatalogNameCon1 + "]"; + strConnDT2Label = "Data Database [2][" + strAddress + "] [" + DatabaseConnControl.ShortTermCatalogName + "] [" + DatabaseConnControl.SelectLongTermCatalogNameCon2 + "]"; + + ChangeDatabaseView(eCurrentView); + if (oso.ViewOptionPanel) { if (barToggleSwitchItemOverviewMerge.Checked == !oso.DisplayByStation) diff --git a/CPXV2 TRA V2/SystemX.Product.CP.TRA/UIControl/UcTRAStepTrend.cs b/CPXV2 TRA V2/SystemX.Product.CP.TRA/UIControl/UcTRAStepTrend.cs index eba13cf..43e0703 100644 --- a/CPXV2 TRA V2/SystemX.Product.CP.TRA/UIControl/UcTRAStepTrend.cs +++ b/CPXV2 TRA V2/SystemX.Product.CP.TRA/UIControl/UcTRAStepTrend.cs @@ -783,7 +783,7 @@ namespace SystemX.Product.TRA.UIControl if (nRowHndl < 0) return; - string strGetId = DTTestLogList.Rows[e.RowHandle][23].ToString(); + string strGetId = DTTestLogList.Rows[e.RowHandle][18].ToString(); BaseRow br = vGridControlInfo.Rows.GetRowByFieldName("TestRequestID"); vGridControlInfo.SetCellValue(br, 0, strGetId);