[성현모] TRA Recovery 기능 수정

This commit is contained in:
SHM
2025-05-21 14:09:29 +09:00
parent 0b69c113ec
commit 57fdf665c0
16 changed files with 384 additions and 263 deletions

View File

@ -25,6 +25,9 @@ namespace DataBaseConnection.Control
public static string LongTermCatalogName = "CPXLog";*/
public static string MainCatalogName = "CPXV2";
public static string MainDBIP = "";
public static string LogDBIP = "";
public static string ShortTermCatalogName = "";
public static List<string> LongTermCatalogName = new List<string> { "" } ;
public static string SelectLongTermCatalogNameCon1 = string.Empty;
@ -123,7 +126,8 @@ namespace DataBaseConnection.Control
{
try
{
connMain = new SqlConnection($"Data Source=localhost; Initial Catalog={MainCatalogName}; Integrated Security = SSPI; MultipleActiveResultSets=True;");
var connectionStr = $"Server={MainDBIP}; Database={MainCatalogName}; UID={CatalogConnUID}; Password={CatalogConnPW}; MultipleActiveResultSets=True;";
connMain = new SqlConnection($"{connectionStr}");
connMain.Open();
SqlCommand SQLCmd = new SqlCommand("spGetDBList", connMain);
@ -167,12 +171,13 @@ namespace DataBaseConnection.Control
{
SqlConnection connecction;
connShortTerm1 = new SqlConnection($"Data Source=localhost; Initial Catalog={ShortTermCatalogName}; Integrated Security = SSPI; MultipleActiveResultSets=True;"); // MultipleActiveResultSets=True;");
connShortTerm1.Open();
//connShortTerm1 = new SqlConnection($"Data Source=localhost; Initial Catalog={ShortTermCatalogName}; Integrated Security = SSPI; MultipleActiveResultSets=True;"); // MultipleActiveResultSets=True;");
//connShortTerm1.Open();
foreach(var catalog in LongTermCatalogName)
{
connLongTerm1.Add(catalog, new SqlConnection($"Data Source=localhost; Initial Catalog={catalog}; Integrated Security = SSPI; MultipleActiveResultSets=True;")); // MultipleActiveResultSets=True;");
var connectionStr = $"Server={LogDBIP}; Database={catalog}; UID={CatalogConnUID}; Password={CatalogConnPW}; MultipleActiveResultSets=True;";
connLongTerm1.Add(catalog, new SqlConnection($"{connectionStr}")); // MultipleActiveResultSets=True;");
if (connLongTerm1.TryGetValue(catalog, out connecction) == true)
{
@ -230,7 +235,7 @@ namespace DataBaseConnection.Control
builder.UserID = "Alis";
builder.Password = "Kefico!@34";
builder.InitialCatalog = MainCatalogName;
builder.InitialCatalog = "master";
builder.MultipleActiveResultSets = true;
connMain = new SqlConnection(builder.ConnectionString);

View File

@ -103,7 +103,7 @@ namespace SystemX.Product.TRA.DataManager
{
if (SelectView == eSelectDataView.DataDocumentViewC1)
{
LongTermDBConn = GetDBController.GetLongTermConn1().Where(x => x.Key.Contains(data.StartTime.Year.ToString()))?.FirstOrDefault().Value;
LongTermDBConn = GetDBController.GetLongTermConn1().FirstOrDefault().Value;
if (LongTermDBConn == null)
{
LongTermDBConn = GetDBController.GetLongTermConn1().FirstOrDefault().Value;
@ -111,7 +111,7 @@ namespace SystemX.Product.TRA.DataManager
}
else if (SelectView == eSelectDataView.DataDocumentViewC2)
{
LongTermDBConn = GetDBController.GetLongTermConn2().Where(x => x.Key.Contains(data.StartTime.Year.ToString()))?.FirstOrDefault().Value;
LongTermDBConn = GetDBController.GetLongTermConn2().FirstOrDefault().Value;
if (LongTermDBConn == null)
{
LongTermDBConn = GetDBController.GetLongTermConn2().FirstOrDefault().Value;
@ -194,16 +194,16 @@ namespace SystemX.Product.TRA.DataManager
switch (GetSelectInfo)
{
case eOverviewModelNameInfo.L:
strQuery += $"LEFT JOIN [CPXV2].[dbo].[PROD_Variant] AS X WITH(NOLOCK) ON X.No = {DMCommon.SummaryLogTable}.[TestListVariantNo] ";
strQuery += $"LEFT JOIN [CPXV2].[dbo].[PROD_Group] AS Y WITH(NOLOCK) ON Y.No = X.GroupNo ";
strQuery += $"LEFT JOIN [{DatabaseConnControl.MainCatalogName}].[dbo].[PROD_Variant] AS X WITH(NOLOCK) ON X.No = {DMCommon.SummaryLogTable}.[TestListVariantNo] ";
strQuery += $"LEFT JOIN [{DatabaseConnControl.MainCatalogName}].[dbo].[PROD_Group] AS Y WITH(NOLOCK) ON Y.No = X.GroupNo ";
break;
case eOverviewModelNameInfo.P1:
strQuery += $"LEFT JOIN [P1].[CPXV2].[dbo].[PROD_Variant] AS X WITH(NOLOCK) ON X.No = {DMCommon.SummaryLogTable}.[TestListVariantNo] ";
strQuery += $"LEFT JOIN [P1].[CPXV2].[dbo].[PROD_Group] AS Y WITH(NOLOCK) ON Y.No = X.GroupNo ";
strQuery += $"LEFT JOIN [P1].[{DatabaseConnControl.MainCatalogName}].[dbo].[PROD_Variant] AS X WITH(NOLOCK) ON X.No = {DMCommon.SummaryLogTable}.[TestListVariantNo] ";
strQuery += $"LEFT JOIN [P1].[{DatabaseConnControl.MainCatalogName}].[dbo].[PROD_Group] AS Y WITH(NOLOCK) ON Y.No = X.GroupNo ";
break;
case eOverviewModelNameInfo.P2:
strQuery += $"LEFT JOIN [P2].[CPXV2].[dbo].[PROD_Variant] AS X WITH(NOLOCK) ON X.No = {DMCommon.SummaryLogTable}.[TestListVariantNo] ";
strQuery += $"LEFT JOIN [P2].[CPXV2].[dbo].[PROD_Group] AS Y WITH(NOLOCK) ON Y.No = X.GroupNo ";
strQuery += $"LEFT JOIN [P2].[{DatabaseConnControl.MainCatalogName}].[dbo].[PROD_Variant] AS X WITH(NOLOCK) ON X.No = {DMCommon.SummaryLogTable}.[TestListVariantNo] ";
strQuery += $"LEFT JOIN [P2].[{DatabaseConnControl.MainCatalogName}].[dbo].[PROD_Group] AS Y WITH(NOLOCK) ON Y.No = X.GroupNo ";
break;
}
/*
@ -325,16 +325,16 @@ namespace SystemX.Product.TRA.DataManager
switch (GetSelectInfo)
{
case eOverviewModelNameInfo.L:
strQuery += $"LEFT JOIN [CPXV2].[dbo].[PROD_Variant] AS X WITH(NOLOCK) ON X.No = {DMCommon.SummaryLogTable}.[TestListVariantNo] ";
strQuery += $"LEFT JOIN [CPXV2].[dbo].[PROD_Group] AS Y WITH(NOLOCK) ON Y.No = X.GroupNo ";
strQuery += $"LEFT JOIN [{DatabaseConnControl.MainCatalogName}].[dbo].[PROD_Variant] AS X WITH(NOLOCK) ON X.No = {DMCommon.SummaryLogTable}.[TestListVariantNo] ";
strQuery += $"LEFT JOIN [{DatabaseConnControl.MainCatalogName}].[dbo].[PROD_Group] AS Y WITH(NOLOCK) ON Y.No = X.GroupNo ";
break;
case eOverviewModelNameInfo.P1:
strQuery += $"LEFT JOIN [P1].[CPXV2].[dbo].[PROD_Variant] AS X WITH(NOLOCK) ON X.No = {DMCommon.SummaryLogTable}.[TestListVariantNo] ";
strQuery += $"LEFT JOIN [P1].[CPXV2].[dbo].[PROD_Group] AS Y WITH(NOLOCK) ON Y.No = X.GroupNo ";
strQuery += $"LEFT JOIN [P1].[{DatabaseConnControl.MainCatalogName}].[dbo].[PROD_Variant] AS X WITH(NOLOCK) ON X.No = {DMCommon.SummaryLogTable}.[TestListVariantNo] ";
strQuery += $"LEFT JOIN [P1].[{DatabaseConnControl.MainCatalogName}].[dbo].[PROD_Group] AS Y WITH(NOLOCK) ON Y.No = X.GroupNo ";
break;
case eOverviewModelNameInfo.P2:
strQuery += $"LEFT JOIN [P2].[CPXV2].[dbo].[PROD_Variant] AS X WITH(NOLOCK) ON X.No = {DMCommon.SummaryLogTable}.[TestListVariantNo] ";
strQuery += $"LEFT JOIN [P2].[CPXV2].[dbo].[PROD_Group] AS Y WITH(NOLOCK) ON Y.No = X.GroupNo ";
strQuery += $"LEFT JOIN [P2].[{DatabaseConnControl.MainCatalogName}].[dbo].[PROD_Variant] AS X WITH(NOLOCK) ON X.No = {DMCommon.SummaryLogTable}.[TestListVariantNo] ";
strQuery += $"LEFT JOIN [P2].[{DatabaseConnControl.MainCatalogName}].[dbo].[PROD_Group] AS Y WITH(NOLOCK) ON Y.No = X.GroupNo ";
break;
}

View File

@ -116,7 +116,7 @@ namespace SystemX.Product.TRA.DataManager
{
if (SelectView == eSelectDataView.DataDocumentViewC1)
{
LongTermDBConn = GetDBController.GetLongTermConn1().Where(x => x.Key.Contains(dtStart.Year.ToString()))?.FirstOrDefault().Value;
LongTermDBConn = GetDBController.GetLongTermConn1().FirstOrDefault().Value;
if(LongTermDBConn == null)
{
LongTermDBConn = GetDBController.GetLongTermConn1().FirstOrDefault().Value;
@ -225,16 +225,16 @@ namespace SystemX.Product.TRA.DataManager
switch(GetSelectInfo)
{
case eOverviewModelNameInfo.L:
strQuery += $"LEFT JOIN [CPXV2].[dbo].[PROD_Variant] AS X WITH(NOLOCK) ON X.No = {DMCommon.SummaryLogTable}.[TestListVariantNo] ";
strQuery += $"LEFT JOIN [CPXV2].[dbo].[PROD_Group] AS Y WITH(NOLOCK) ON Y.No = X.GroupNo ";
strQuery += $"LEFT JOIN [{DatabaseConnControl.MainCatalogName}].[dbo].[PROD_Variant] AS X WITH(NOLOCK) ON X.No = {DMCommon.SummaryLogTable}.[TestListVariantNo] ";
strQuery += $"LEFT JOIN [{DatabaseConnControl.MainCatalogName}].[dbo].[PROD_Group] AS Y WITH(NOLOCK) ON Y.No = X.GroupNo ";
break;
case eOverviewModelNameInfo.P1:
strQuery += $"LEFT JOIN [CPXV2].[dbo].[PROD_Variant] AS X WITH(NOLOCK) ON X.No = {DMCommon.SummaryLogTable}.[TestListVariantNo] ";
strQuery += $"LEFT JOIN [CPXV2].[dbo].[PROD_Group] AS Y WITH(NOLOCK) ON Y.No = X.GroupNo ";
strQuery += $"LEFT JOIN [{DatabaseConnControl.MainCatalogName}].[dbo].[PROD_Variant] AS X WITH(NOLOCK) ON X.No = {DMCommon.SummaryLogTable}.[TestListVariantNo] ";
strQuery += $"LEFT JOIN [{DatabaseConnControl.MainCatalogName}].[dbo].[PROD_Group] AS Y WITH(NOLOCK) ON Y.No = X.GroupNo ";
break;
case eOverviewModelNameInfo.P2:
strQuery += $"LEFT JOIN [P2].[CPXV2].[dbo].[PROD_Variant] AS X WITH(NOLOCK) ON X.No = {DMCommon.SummaryLogTable}.[TestListVariantNo] ";
strQuery += $"LEFT JOIN [P2].[CPXV2].[dbo].[PROD_Group] AS Y WITH(NOLOCK) ON Y.No = X.GroupNo ";
strQuery += $"LEFT JOIN [P2].[{DatabaseConnControl.MainCatalogName}].[dbo].[PROD_Variant] AS X WITH(NOLOCK) ON X.No = {DMCommon.SummaryLogTable}.[TestListVariantNo] ";
strQuery += $"LEFT JOIN [P2].[{DatabaseConnControl.MainCatalogName}].[dbo].[PROD_Group] AS Y WITH(NOLOCK) ON Y.No = X.GroupNo ";
break;
}
/*

View File

@ -38,14 +38,14 @@ namespace SystemX.Product.TRA.DataManager
TrendSelectView = eSelectDataView.DataDocumentViewC1;
ShortTermDBConn = getDBController.GetShortTermConn1();
LongTermDBConn = getDBController.GetLongTermConn1().Where(x=>x.Key.Contains(dtStart.Year.ToString())).First().Value;
LongTermDBConn = getDBController.GetLongTermConn1().First().Value;
}
else if (SelectView == eSelectDataView.DataDocumentViewC2)
{
TrendSelectView = eSelectDataView.DataDocumentViewC2;
ShortTermDBConn = getDBController.GetShortTermConn2();
LongTermDBConn = getDBController.GetLongTermConn2().Where(x => x.Key.Contains(dtStart.Year.ToString())).First().Value;
LongTermDBConn = getDBController.GetLongTermConn2().First().Value;
}
}
@ -56,14 +56,14 @@ namespace SystemX.Product.TRA.DataManager
TrendSelectView = eSelectDataView.DataDocumentViewC1;
ShortTermDBConn = GetDBController.GetShortTermConn1();
LongTermDBConn = GetDBController.GetLongTermConn1().Where(x => x.Key.Contains(dtTest.Year.ToString())).First().Value;
LongTermDBConn = GetDBController.GetLongTermConn1().First().Value;
}
else if (TrendSelectView == eSelectDataView.DataDocumentViewC2)
{
TrendSelectView = eSelectDataView.DataDocumentViewC2;
ShortTermDBConn = GetDBController.GetShortTermConn2();
LongTermDBConn = GetDBController.GetLongTermConn2().Where(x => x.Key.Contains(dtTest.Year.ToString())).First().Value;
LongTermDBConn = GetDBController.GetLongTermConn2().First().Value;
}
DataTable dtResult = new DataTable();

View File

@ -95,7 +95,7 @@ namespace SystemX.Product.TRA.DataManager
NgHistorySelectView = eSelectDataView.DataDocumentViewC1;
ShortTermDBConn = getDBController.GetShortTermConn1();
LongTermDBConn = getDBController.GetLongTermConn1().Where(x=>x.Key.Contains(dtStart.Year.ToString())).First().Value;
LongTermDBConn = getDBController.GetLongTermConn1().First().Value;
}
else if (SelectView == eSelectDataView.DataDocumentViewC2)
{
@ -234,13 +234,13 @@ namespace SystemX.Product.TRA.DataManager
{
ShortTermDBConn = DBControllers.GetShortTermConn1();
LongTermDBConn = DBControllers.GetLongTermConn1().Where(x => x.Key.Contains(data.StartTime.Year.ToString())).First().Value;
LongTermDBConn = DBControllers.GetLongTermConn1().First().Value;
}
else if (NgHistorySelectView == eSelectDataView.DataDocumentViewC2)
{
ShortTermDBConn = DBControllers.GetShortTermConn2();
LongTermDBConn = DBControllers.GetLongTermConn2().Where(x => x.Key.Contains(data.StartTime.Year.ToString())).First().Value;
LongTermDBConn = DBControllers.GetLongTermConn2().First().Value;
}
DataTable dtResult = new DataTable();

View File

@ -74,7 +74,7 @@ namespace SystemX.Product.TRA.DataManager
{
if (SelectView == eSelectDataView.DataDocumentViewC1)
{
LongTermDBConn = GetDBController.GetLongTermConn1().Where(x => x.Key.Contains(data.StartTime.Year.ToString()))?.FirstOrDefault().Value;
LongTermDBConn = GetDBController.GetLongTermConn1().FirstOrDefault().Value;
if (LongTermDBConn == null)
{
LongTermDBConn = GetDBController.GetLongTermConn1().FirstOrDefault().Value;
@ -82,7 +82,7 @@ namespace SystemX.Product.TRA.DataManager
}
else if (SelectView == eSelectDataView.DataDocumentViewC2)
{
LongTermDBConn = GetDBController.GetLongTermConn2().Where(x => x.Key.Contains(data.StartTime.Year.ToString()))?.FirstOrDefault().Value;
LongTermDBConn = GetDBController.GetLongTermConn2().FirstOrDefault().Value;
if (LongTermDBConn == null)
{
LongTermDBConn = GetDBController.GetLongTermConn2().FirstOrDefault().Value;

View File

@ -63,14 +63,14 @@ namespace SystemX.Product.TRA.DataManager
NgHistorySelectView = eSelectDataView.DataDocumentViewC1;
ShortTermDBConn = getDBController.GetShortTermConn1();
LongTermDBConn = getDBController.GetLongTermConn1().Where(x=>x.Key.Contains(dtStart.Year.ToString())).First().Value;
LongTermDBConn = getDBController.GetLongTermConn1().First().Value;
}
else if (SelectView == eSelectDataView.DataDocumentViewC2)
{
NgHistorySelectView = eSelectDataView.DataDocumentViewC2;
ShortTermDBConn = getDBController.GetShortTermConn2();
LongTermDBConn = getDBController.GetLongTermConn2().Where(x => x.Key.Contains(dtStart.Year.ToString())).First().Value;
LongTermDBConn = getDBController.GetLongTermConn2().First().Value;
}
}
@ -156,13 +156,13 @@ namespace SystemX.Product.TRA.DataManager
{
ShortTermDBConn = DBControllers.GetShortTermConn1();
LongTermDBConn = DBControllers.GetLongTermConn1().Where(x => x.Key.Contains(data.SearchRangeStart.Year.ToString())).First().Value;
LongTermDBConn = DBControllers.GetLongTermConn1().First().Value;
}
else if (NgHistorySelectView == eSelectDataView.DataDocumentViewC2)
{
ShortTermDBConn = DBControllers.GetShortTermConn2();
LongTermDBConn = DBControllers.GetLongTermConn2().Where(x => x.Key.Contains(data.SearchRangeStart.Year.ToString())).First().Value;
LongTermDBConn = DBControllers.GetLongTermConn2().First().Value;
}
DataTable dtResult = new DataTable();

View File

@ -107,14 +107,14 @@ namespace SystemX.Product.TRA.DataManager
TestSummarySelectView = eSelectDataView.DataDocumentViewC1;
ShortTermDBConn = getDBController.GetShortTermConn1();
LongTermDBConn = getDBController.GetLongTermConn1().Where(x=>x.Key.Contains(dtStart.Year.ToString())).First().Value;
LongTermDBConn = getDBController.GetLongTermConn1().First().Value;
}
else if (SelectView == eSelectDataView.DataDocumentViewC2)
{
TestSummarySelectView = eSelectDataView.DataDocumentViewC2;
ShortTermDBConn = getDBController.GetShortTermConn2();
LongTermDBConn = getDBController.GetLongTermConn2().Where(x => x.Key.Contains(dtStart.Year.ToString())).First().Value;
LongTermDBConn = getDBController.GetLongTermConn2().First().Value;
}
}
@ -329,13 +329,13 @@ namespace SystemX.Product.TRA.DataManager
{
ShortTermDBConn = GetDBController.GetShortTermConn1();
LongTermDBConn = GetDBController.GetLongTermConn1().Where(x => x.Key.Contains(start.Year.ToString())).First().Value;
LongTermDBConn = GetDBController.GetLongTermConn1().First().Value;
}
else if (TestSummarySelectView == eSelectDataView.DataDocumentViewC2)
{
ShortTermDBConn = GetDBController.GetShortTermConn2();
LongTermDBConn = GetDBController.GetLongTermConn2().Where(x => x.Key.Contains(start.Year.ToString())).First().Value;
LongTermDBConn = GetDBController.GetLongTermConn2().First().Value;
}
DataTable dtResult = new DataTable();

View File

@ -365,39 +365,14 @@ namespace SystemX.Product.CP.TRA
{
try
{
//TODO : Conn Database
if (strConnIPAddressTL == string.Empty)
{
DatabaseConnControl.ConnectTestListDB();
DatabaseConnControl.ConnectTestListDB();
DBConnMain = DatabaseConnControl.GetMainConn();
DBConnMain = DatabaseConnControl.GetMainConn();
}
else
{
// DatabaseConnControl.ConnectTestListDB(strConnIPAddressTL, nConnPortTL);
DBConnMain = DatabaseConnControl.GetMainConn();
}
//Data Server 1
if (strConnIPAddressDT1 == string.Empty)
{
DatabaseConnControl.ConnectDataDB1();
DBConnShortTerm1 = DatabaseConnControl.GetShortTermConn1();
DBConnLongTerm1 = DatabaseConnControl.GetLongTermConn1();
}
else
{
foreach (string catalog in DatabaseConnControl.LongTermCatalogName)
{
DatabaseConnControl.ConnectDataDB1(strConnIPAddressDT1, nConnPortDT1, catalog);
}
DBConnShortTerm1 = DatabaseConnControl.GetShortTermConn1();
DBConnLongTerm1 = DatabaseConnControl.GetLongTermConn1();
}
DatabaseConnControl.ConnectDataDB1();
DBConnShortTerm1 = DatabaseConnControl.GetShortTermConn1();
DBConnLongTerm1 = DatabaseConnControl.GetLongTermConn1();
//Data Server 2
if (bUseDataServer2)
{
@ -440,7 +415,7 @@ namespace SystemX.Product.CP.TRA
//
CheckSqlOption(DatabaseConnControl.GetMainConn());
CheckSqlOption(DatabaseConnControl.GetShortTermConn1());
// CheckSqlOption(DatabaseConnControl.GetShortTermConn1());
foreach (var con in DatabaseConnControl.GetLongTermConn1())
{
CheckSqlOption(con.Value);
@ -481,7 +456,7 @@ namespace SystemX.Product.CP.TRA
}
finally
{
if (DBConnMain == null || DBConnShortTerm1 == null || DBConnLongTerm1 == null)
if (DBConnMain == null || DBConnLongTerm1 == null)
{
bDatabaseConnState = false;
@ -2138,8 +2113,8 @@ namespace SystemX.Product.CP.TRA
$"{DMCommon.SummaryHistTable}.[ProductID], " +
$"{DMCommon.SummaryHistTable}.[Result] " +
$"FROM {DMCommon.SummaryHistTable} WITH(NOLOCK) " +
$"LEFT JOIN [CPXV2].[dbo].[PROD_Variant] AS X WITH(NOLOCK) ON X.No = CONVERT(NVARCHAR, {DMCommon.SummaryHistTable}.[TestListVariantNo]) " +
$"LEFT JOIN [CPXV2].[dbo].[PROD_Group] AS Y WITH(NOLOCK) ON Y.No = X.GroupNo " +
$"LEFT JOIN [{DatabaseConnControl.MainCatalogName}].[dbo].[PROD_Variant] AS X WITH(NOLOCK) ON X.No = CONVERT(NVARCHAR, {DMCommon.SummaryHistTable}.[TestListVariantNo]) " +
$"LEFT JOIN [{DatabaseConnControl.MainCatalogName}].[dbo].[PROD_Group] AS Y WITH(NOLOCK) ON Y.No = X.GroupNo " +
$"WHERE " +
$"TestDT >= '{dtStart.ToString("yyyy-MM-dd HH:mm:ss")}' AND " +
$"TestDT <= '{dtEnd.ToString("yyyy-MM-dd HH:mm:ss")}' AND " +

View File

@ -0,0 +1,4 @@
DevExpress.XtraCharts.ChartControl, DevExpress.XtraCharts.v20.2.UI, Version=20.2.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
DevExpress.XtraEditors.ComboBoxEdit, DevExpress.XtraEditors.v20.2, Version=20.2.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
DevExpress.XtraGrid.GridControl, DevExpress.XtraGrid.v20.2, Version=20.2.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
DevExpress.XtraVerticalGrid.VGridControl, DevExpress.XtraVerticalGrid.v20.2, Version=20.2.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a

View File

@ -33,6 +33,7 @@ namespace SystemX.Product.ALIS.UI.Subs
this.labelControl1 = new DevExpress.XtraEditors.LabelControl();
this.simpleButtonOK = new DevExpress.XtraEditors.SimpleButton();
this.panel1 = new System.Windows.Forms.Panel();
this.lbError = new System.Windows.Forms.Label();
this.simpleButtonReset = new DevExpress.XtraEditors.SimpleButton();
this.panel2 = new System.Windows.Forms.Panel();
this.panel3 = new System.Windows.Forms.Panel();
@ -53,7 +54,9 @@ namespace SystemX.Product.ALIS.UI.Subs
this.comboBoxOverviewModel2 = new System.Windows.Forms.ComboBox();
this.checkBoxUseDT2 = new System.Windows.Forms.CheckBox();
this.label3 = new System.Windows.Forms.Label();
this.lbError = new System.Windows.Forms.Label();
this.btnRefresh2 = new System.Windows.Forms.Button();
this.label4 = new System.Windows.Forms.Label();
this.comboDbList2 = new System.Windows.Forms.ComboBox();
this.panel1.SuspendLayout();
this.panel3.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.maskedTextBoxTLIP.Properties)).BeginInit();
@ -88,7 +91,7 @@ namespace SystemX.Product.ALIS.UI.Subs
this.simpleButtonOK.Appearance.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F);
this.simpleButtonOK.Appearance.Options.UseFont = true;
this.simpleButtonOK.Dock = System.Windows.Forms.DockStyle.Right;
this.simpleButtonOK.Location = new System.Drawing.Point(1025, 0);
this.simpleButtonOK.Location = new System.Drawing.Point(825, 0);
this.simpleButtonOK.Name = "simpleButtonOK";
this.simpleButtonOK.Size = new System.Drawing.Size(66, 64);
this.simpleButtonOK.TabIndex = 4;
@ -102,11 +105,20 @@ namespace SystemX.Product.ALIS.UI.Subs
this.panel1.Controls.Add(this.simpleButtonReset);
this.panel1.Controls.Add(this.simpleButtonOK);
this.panel1.Dock = System.Windows.Forms.DockStyle.Top;
this.panel1.Location = new System.Drawing.Point(0, 314);
this.panel1.Location = new System.Drawing.Point(0, 393);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(1091, 64);
this.panel1.Size = new System.Drawing.Size(891, 64);
this.panel1.TabIndex = 5;
//
// lbError
//
this.lbError.ForeColor = System.Drawing.Color.Red;
this.lbError.Location = new System.Drawing.Point(483, 25);
this.lbError.Name = "lbError";
this.lbError.Size = new System.Drawing.Size(317, 16);
this.lbError.TabIndex = 6;
this.lbError.Text = "lbError";
//
// simpleButtonReset
//
this.simpleButtonReset.Appearance.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F);
@ -125,18 +137,21 @@ namespace SystemX.Product.ALIS.UI.Subs
this.panel2.Dock = System.Windows.Forms.DockStyle.Top;
this.panel2.Location = new System.Drawing.Point(0, 24);
this.panel2.Name = "panel2";
this.panel2.Size = new System.Drawing.Size(1091, 3);
this.panel2.Size = new System.Drawing.Size(891, 3);
this.panel2.TabIndex = 6;
//
// panel3
//
this.panel3.BackColor = System.Drawing.Color.Transparent;
this.panel3.Controls.Add(this.btnRefresh2);
this.panel3.Controls.Add(this.label4);
this.panel3.Controls.Add(this.comboDbList2);
this.panel3.Controls.Add(this.maskedTextBoxTLIP);
this.panel3.Controls.Add(this.panel4);
this.panel3.Dock = System.Windows.Forms.DockStyle.Top;
this.panel3.Location = new System.Drawing.Point(0, 27);
this.panel3.Name = "panel3";
this.panel3.Size = new System.Drawing.Size(1091, 108);
this.panel3.Size = new System.Drawing.Size(891, 187);
this.panel3.TabIndex = 8;
//
// maskedTextBoxTLIP
@ -153,7 +168,7 @@ namespace SystemX.Product.ALIS.UI.Subs
this.maskedTextBoxTLIP.Properties.Appearance.Options.UseForeColor = true;
this.maskedTextBoxTLIP.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
this.maskedTextBoxTLIP.Size = new System.Drawing.Size(1091, 22);
this.maskedTextBoxTLIP.Size = new System.Drawing.Size(891, 22);
this.maskedTextBoxTLIP.TabIndex = 8;
this.maskedTextBoxTLIP.PreviewKeyDown += new System.Windows.Forms.PreviewKeyDownEventHandler(this.maskedTextBoxIP_PreviewKeyDown);
//
@ -164,7 +179,7 @@ namespace SystemX.Product.ALIS.UI.Subs
this.panel4.Dock = System.Windows.Forms.DockStyle.Top;
this.panel4.Location = new System.Drawing.Point(0, 0);
this.panel4.Name = "panel4";
this.panel4.Size = new System.Drawing.Size(1091, 65);
this.panel4.Size = new System.Drawing.Size(891, 65);
this.panel4.TabIndex = 7;
//
// label2
@ -175,7 +190,7 @@ namespace SystemX.Product.ALIS.UI.Subs
this.label2.ForeColor = System.Drawing.Color.Black;
this.label2.Location = new System.Drawing.Point(0, 0);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(1091, 51);
this.label2.Size = new System.Drawing.Size(891, 51);
this.label2.TabIndex = 9;
this.label2.Text = "TestList Server";
this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
@ -189,9 +204,9 @@ namespace SystemX.Product.ALIS.UI.Subs
this.panel5.Controls.Add(this.maskedTextBoxDT1IP);
this.panel5.Controls.Add(this.panel6);
this.panel5.Dock = System.Windows.Forms.DockStyle.Top;
this.panel5.Location = new System.Drawing.Point(0, 135);
this.panel5.Location = new System.Drawing.Point(0, 214);
this.panel5.Name = "panel5";
this.panel5.Size = new System.Drawing.Size(1091, 179);
this.panel5.Size = new System.Drawing.Size(891, 179);
this.panel5.TabIndex = 9;
//
// btnRefresh
@ -238,8 +253,9 @@ namespace SystemX.Product.ALIS.UI.Subs
this.maskedTextBoxDT1IP.Properties.Appearance.Options.UseForeColor = true;
this.maskedTextBoxDT1IP.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
this.maskedTextBoxDT1IP.Size = new System.Drawing.Size(1091, 22);
this.maskedTextBoxDT1IP.Size = new System.Drawing.Size(891, 22);
this.maskedTextBoxDT1IP.TabIndex = 8;
this.maskedTextBoxDT1IP.Visible = false;
this.maskedTextBoxDT1IP.PreviewKeyDown += new System.Windows.Forms.PreviewKeyDownEventHandler(this.maskedTextBoxIP_PreviewKeyDown);
//
// panel6
@ -250,7 +266,7 @@ namespace SystemX.Product.ALIS.UI.Subs
this.panel6.Dock = System.Windows.Forms.DockStyle.Top;
this.panel6.Location = new System.Drawing.Point(0, 0);
this.panel6.Name = "panel6";
this.panel6.Size = new System.Drawing.Size(1091, 85);
this.panel6.Size = new System.Drawing.Size(891, 85);
this.panel6.TabIndex = 7;
//
// comboBoxOverviewModel1
@ -261,7 +277,7 @@ namespace SystemX.Product.ALIS.UI.Subs
"L",
"P1",
"P2"});
this.comboBoxOverviewModel1.Location = new System.Drawing.Point(280, 22);
this.comboBoxOverviewModel1.Location = new System.Drawing.Point(82, 25);
this.comboBoxOverviewModel1.Name = "comboBoxOverviewModel1";
this.comboBoxOverviewModel1.Size = new System.Drawing.Size(106, 23);
this.comboBoxOverviewModel1.TabIndex = 10;
@ -275,7 +291,7 @@ namespace SystemX.Product.ALIS.UI.Subs
this.label1.ForeColor = System.Drawing.Color.Black;
this.label1.Location = new System.Drawing.Point(0, 0);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(1091, 70);
this.label1.Size = new System.Drawing.Size(891, 70);
this.label1.TabIndex = 9;
this.label1.Text = "Log Server [1]";
this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
@ -287,9 +303,9 @@ namespace SystemX.Product.ALIS.UI.Subs
this.panel7.Controls.Add(this.maskedTextBoxDT2IP);
this.panel7.Controls.Add(this.panel8);
this.panel7.Dock = System.Windows.Forms.DockStyle.Bottom;
this.panel7.Location = new System.Drawing.Point(0, 384);
this.panel7.Location = new System.Drawing.Point(0, 473);
this.panel7.Name = "panel7";
this.panel7.Size = new System.Drawing.Size(1091, 14);
this.panel7.Size = new System.Drawing.Size(891, 14);
this.panel7.TabIndex = 10;
this.panel7.Visible = false;
//
@ -307,7 +323,7 @@ namespace SystemX.Product.ALIS.UI.Subs
this.maskedTextBoxDT2IP.Properties.Appearance.Options.UseForeColor = true;
this.maskedTextBoxDT2IP.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
this.maskedTextBoxDT2IP.Size = new System.Drawing.Size(1091, 22);
this.maskedTextBoxDT2IP.Size = new System.Drawing.Size(891, 22);
this.maskedTextBoxDT2IP.TabIndex = 8;
this.maskedTextBoxDT2IP.PreviewKeyDown += new System.Windows.Forms.PreviewKeyDownEventHandler(this.maskedTextBoxIP_PreviewKeyDown);
//
@ -320,7 +336,7 @@ namespace SystemX.Product.ALIS.UI.Subs
this.panel8.Dock = System.Windows.Forms.DockStyle.Top;
this.panel8.Location = new System.Drawing.Point(0, 0);
this.panel8.Name = "panel8";
this.panel8.Size = new System.Drawing.Size(1091, 83);
this.panel8.Size = new System.Drawing.Size(891, 83);
this.panel8.TabIndex = 7;
//
// comboBoxOverviewModel2
@ -357,19 +373,42 @@ namespace SystemX.Product.ALIS.UI.Subs
this.label3.ForeColor = System.Drawing.Color.Black;
this.label3.Location = new System.Drawing.Point(0, 0);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(1091, 69);
this.label3.Size = new System.Drawing.Size(891, 69);
this.label3.TabIndex = 9;
this.label3.Text = "Log Server [2]";
this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// lbError
// btnRefresh2
//
this.lbError.ForeColor = System.Drawing.Color.Red;
this.lbError.Location = new System.Drawing.Point(693, 25);
this.lbError.Name = "lbError";
this.lbError.Size = new System.Drawing.Size(317, 16);
this.lbError.TabIndex = 6;
this.lbError.Text = "lbError";
this.btnRefresh2.ForeColor = System.Drawing.Color.Black;
this.btnRefresh2.Location = new System.Drawing.Point(486, 115);
this.btnRefresh2.Name = "btnRefresh2";
this.btnRefresh2.Size = new System.Drawing.Size(98, 23);
this.btnRefresh2.TabIndex = 14;
this.btnRefresh2.Text = "Refresh";
this.btnRefresh2.UseVisualStyleBackColor = true;
this.btnRefresh2.Click += new System.EventHandler(this.button1_Click);
//
// label4
//
this.label4.AutoSize = true;
this.label4.ForeColor = System.Drawing.Color.Black;
this.label4.Location = new System.Drawing.Point(12, 119);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(102, 15);
this.label4.TabIndex = 13;
this.label4.Text = "Recovery DataBase";
this.label4.Click += new System.EventHandler(this.label4_Click);
//
// comboDbList2
//
this.comboDbList2.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.comboDbList2.FormattingEnabled = true;
this.comboDbList2.Location = new System.Drawing.Point(129, 114);
this.comboDbList2.Name = "comboDbList2";
this.comboDbList2.Size = new System.Drawing.Size(351, 23);
this.comboDbList2.TabIndex = 12;
this.comboDbList2.SelectedIndexChanged += new System.EventHandler(this.comboBox1_SelectedIndexChanged);
//
// ConnectForm
//
@ -379,7 +418,7 @@ namespace SystemX.Product.ALIS.UI.Subs
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.BackgroundImageLayoutStore = System.Windows.Forms.ImageLayout.Stretch;
this.BackgroundImageStore = global::SystemX.Product.TRA.Properties.Resources.IpAddress;
this.ClientSize = new System.Drawing.Size(1091, 398);
this.ClientSize = new System.Drawing.Size(891, 487);
this.Controls.Add(this.panel1);
this.Controls.Add(this.panel7);
this.Controls.Add(this.panel5);
@ -398,6 +437,7 @@ namespace SystemX.Product.ALIS.UI.Subs
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.ConnectForm_FormClosing);
this.panel1.ResumeLayout(false);
this.panel3.ResumeLayout(false);
this.panel3.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.maskedTextBoxTLIP.Properties)).EndInit();
this.panel4.ResumeLayout(false);
this.panel5.ResumeLayout(false);
@ -438,5 +478,8 @@ namespace SystemX.Product.ALIS.UI.Subs
private System.Windows.Forms.ComboBox comboDbList;
private System.Windows.Forms.Button btnRefresh;
private System.Windows.Forms.Label lbError;
private System.Windows.Forms.Button btnRefresh2;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.ComboBox comboDbList2;
}
}

View File

@ -276,8 +276,22 @@ namespace SystemX.Product.ALIS.UI.Subs
return;
}
DatabaseConnControl.LongTermCatalogName.RemoveAll(x=>x != comboDbList.Text);
//cpxv2 ip 아님
if (string.IsNullOrEmpty(comboDbList2.Text) == true)
{
lbError.Text = "No selected Recovery TestList DataBase";
return;
}
//선택완료되면 DB닫았다가 다시열기
DatabaseConnControl.MainCatalogName = comboDbList2.Text;
DatabaseConnControl.MainDBIP = maskedTextBoxTLIP.Text;
DatabaseConnControl.LogDBIP = maskedTextBoxTLIP.Text;
DatabaseConnControl.ConnectTestListDB();
DatabaseConnControl.LongTermCatalogName.RemoveAll(x=>x != comboDbList.Text);
bSelectUseDataServer2 = checkBoxUseDT2.Checked;
//
nOverviewModelC1 = comboBoxOverviewModel1.SelectedIndex;
@ -341,14 +355,14 @@ namespace SystemX.Product.ALIS.UI.Subs
private void btnRefresh_Click(object sender, EventArgs e)
{
if (IsValidIPv4(maskedTextBoxDT1IP.Text) == false)
if (IsValidIPv4(maskedTextBoxTLIP.Text) == false)
{
lbError.Text = "Invalid Log Server IP Address";
return;
}
lbError.Text = string.Empty;
DatabaseConnControl.ConnectTestListDB(maskedTextBoxDT1IP.Text);
DatabaseConnControl.ConnectTestListDB(maskedTextBoxTLIP.Text);
var dbList = DatabaseConnControl.LongTermCatalogName;
comboDbList.Items.Clear();
@ -360,5 +374,31 @@ namespace SystemX.Product.ALIS.UI.Subs
string pattern = @"^((25[0-5]|2[0-4]\d|1\d{2}|[1-9]?\d)\.){3}(25[0-5]|2[0-4]\d|1\d{2}|[1-9]?\d)$";
return Regex.IsMatch(input, pattern);
}
private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
{
}
private void label4_Click(object sender, EventArgs e)
{
}
private void button1_Click(object sender, EventArgs e)
{
if (IsValidIPv4(maskedTextBoxTLIP.Text) == false)
{
lbError.Text = "Invalid Log Server IP Address";
return;
}
lbError.Text = string.Empty;
DatabaseConnControl.ConnectTestListDB(maskedTextBoxTLIP.Text);
var dbList = DatabaseConnControl.LongTermCatalogName;
comboDbList2.Items.Clear();
comboDbList2.Items.AddRange(dbList.ToArray());
}
}
}

View File

@ -366,6 +366,7 @@
<EmbeddedResource Include="MainForm.resx">
<DependentUpon>MainForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\licenses.licx" />
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>