I write an application that checks serial number history with Windows From with my company web-service. The results returned from the Web-service are as follows:
<NewDataSet>
<TestHistory>
<StartTime>2021-01-09T17:37:38+07:00</StartTime>
<StopTime>2021-01-09T17:37:42+07:00</StopTime>
<TestStatus>P</TestStatus>
<MachineName>HCMINGAOI06_B</MachineName>
<Operator />
<StepOrTestName>AOI_BSI</StepOrTestName>
<FailureLabel />
<FailureMessage />
</TestHistory>
</NewDataSet>
Can someone help me to show the results of datagirdview?
temporarily I can only display it with richTextBox
Below is the code I use:
private void Check(object sender, EventArgs e)
{
check();
}
public void check()
{
string CustomerName = cbWorkcell.Text;
string SerialNumber = txtserialnumber.Text;
string Division = "";
try
{
ServiceMES.MES_TISSoapClient b = new ServiceMES.MES_TISSoapClient();
string resultz = b.GetTestHistory(SerialNumber, CustomerName, Division);
ShowResult(CustomerName, SerialNumber, resultz);
}
catch { }
}
private void ShowResult(string CustomerName, string SerialNumber, string resultz)
{
this.Invoke(new MethodInvoker(delegate ()
{
richTextBox1.Text = "Serinumber:" + SerialNumber + "
CustomerName:" + CustomerName + "
" + resultz + "
";
lbSerial.Text = "Serial: " + SerialNumber;
}));
}
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…