#250831 修复刷新页面,查询数据库导致的 可用连接错误
This commit is contained in:
@@ -158,69 +158,82 @@ namespace NSAnalysis
|
||||
|
||||
private void tmrRefreshData_Tick(object sender, EventArgs e)
|
||||
{
|
||||
tmrRefreshData.Stop();
|
||||
string strVIN = tmdal.SelectMaintenanceStation7VIN();
|
||||
if (strLastVIN != strVIN)
|
||||
|
||||
try
|
||||
{
|
||||
if (strVIN.ToLower().Contains("empty"))
|
||||
tmrRefreshData.Stop();
|
||||
string strVIN = tmdal.SelectMaintenanceStation7VIN();
|
||||
if (strLastVIN != strVIN)
|
||||
{
|
||||
labVIN.Text = "VIN码为空";
|
||||
//InitNextSenseOneItemControl();
|
||||
InitNextSenseControl();
|
||||
}
|
||||
else
|
||||
{
|
||||
if (strVIN.Length == 17)
|
||||
if (strVIN.ToLower().Contains("empty"))
|
||||
{
|
||||
string strSubVIN = strVIN;//.Substring(0, strVIN.Length - 2);
|
||||
dtVINData.Clear();
|
||||
labVIN.Text = strSubVIN;
|
||||
string strCarType = tmdal.SelectCarTypeByVIN(strSubVIN);
|
||||
MyBase.TraceWriteLine("Right EHY UI Refresh tmrRefreshData (strVIN.Length==17):CarType:" + strCarType + " ;VIN: " + strSubVIN);
|
||||
if (strCarType.ToUpper().Contains("EHY"))
|
||||
{
|
||||
SpecifyScreenDisplay1();
|
||||
dtVINData = tmdal.SelectTMeasureDataByCarIDAndMPN(strSubVIN, "R");
|
||||
if (dtVINData.Rows.Count > 0)
|
||||
{
|
||||
refreshCarUIData(dtVINData);
|
||||
analysisTitleColor();
|
||||
}
|
||||
else
|
||||
{
|
||||
InitNextSenseControl();
|
||||
}
|
||||
gCC.ShowCarMeasureDataByCarType(2);
|
||||
}
|
||||
labVIN.Text = "VIN码为空";
|
||||
//InitNextSenseOneItemControl();
|
||||
InitNextSenseControl();
|
||||
}
|
||||
if (strVIN.Length == 21)
|
||||
else
|
||||
{
|
||||
string strSubVIN = strVIN.Substring(0, 17);
|
||||
dtVINData.Clear();
|
||||
labVIN.Text = strSubVIN;
|
||||
string strCarType = strVIN.Substring(18, 3);
|
||||
MyBase.TraceWriteLine("Right EHY UI Refresh tmrRefreshData (strVIN.Length==21):CarType:" + strCarType + " ;VIN: " + strSubVIN);
|
||||
if (strCarType.ToUpper().Contains("EHY"))
|
||||
if (strVIN.Length == 17)
|
||||
{
|
||||
SpecifyScreenDisplay1();
|
||||
dtVINData = tmdal.SelectTMeasureDataByCarIDAndMPN(strSubVIN, "R");
|
||||
if (dtVINData.Rows.Count > 0)
|
||||
string strSubVIN = strVIN;//.Substring(0, strVIN.Length - 2);
|
||||
dtVINData.Clear();
|
||||
labVIN.Text = strSubVIN;
|
||||
string strCarType = tmdal.SelectCarTypeByVIN(strSubVIN);
|
||||
MyBase.TraceWriteLine("Right EHY UI Refresh tmrRefreshData (strVIN.Length==17):CarType:" + strCarType + " ;VIN: " + strSubVIN);
|
||||
if (strCarType.ToUpper().Contains("EHY"))
|
||||
{
|
||||
refreshCarUIData(dtVINData);
|
||||
analysisTitleColor();
|
||||
SpecifyScreenDisplay1();
|
||||
dtVINData = tmdal.SelectTMeasureDataByCarIDAndMPN(strSubVIN, "R");
|
||||
if (dtVINData.Rows.Count > 0)
|
||||
{
|
||||
refreshCarUIData(dtVINData);
|
||||
analysisTitleColor();
|
||||
}
|
||||
else
|
||||
{
|
||||
InitNextSenseControl();
|
||||
}
|
||||
gCC.ShowCarMeasureDataByCarType(2);
|
||||
}
|
||||
else
|
||||
}
|
||||
if (strVIN.Length == 21)
|
||||
{
|
||||
string strSubVIN = strVIN.Substring(0, 17);
|
||||
dtVINData.Clear();
|
||||
labVIN.Text = strSubVIN;
|
||||
string strCarType = strVIN.Substring(18, 3);
|
||||
MyBase.TraceWriteLine("Right EHY UI Refresh tmrRefreshData (strVIN.Length==21):CarType:" + strCarType + " ;VIN: " + strSubVIN);
|
||||
if (strCarType.ToUpper().Contains("EHY"))
|
||||
{
|
||||
InitNextSenseControl();
|
||||
SpecifyScreenDisplay1();
|
||||
dtVINData = tmdal.SelectTMeasureDataByCarIDAndMPN(strSubVIN, "R");
|
||||
if (dtVINData.Rows.Count > 0)
|
||||
{
|
||||
refreshCarUIData(dtVINData);
|
||||
analysisTitleColor();
|
||||
}
|
||||
else
|
||||
{
|
||||
InitNextSenseControl();
|
||||
}
|
||||
gCC.ShowCarMeasureDataByCarType(2);
|
||||
}
|
||||
gCC.ShowCarMeasureDataByCarType(2);
|
||||
}
|
||||
}
|
||||
}
|
||||
strLastVIN = strVIN;
|
||||
tmrRefreshData.Start();
|
||||
}
|
||||
strLastVIN = strVIN;
|
||||
tmrRefreshData.Start();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MyBase.TraceWriteLine("Left EHY UI Refresh tmrRefreshData Error:" + ex.Message);
|
||||
}
|
||||
|
||||
finally
|
||||
{
|
||||
tmrRefreshData.Start();
|
||||
}
|
||||
}
|
||||
|
||||
private Color analysisColorbyStatus(string strStatus)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user