//批号验证 private void productIdtxt_Validated(object sender, EventArgs e) { if (mModel.IsConnect == true) { try { string message = webService.XXCC_LOT_PC_F(mModel.Factories[Convert.ToInt32(mModel.Factory)], productIdtxt.Text, mModel.ProcessIds[Convert.ToInt32(mModel.ProcessId)], mModel.LineIds[Convert.ToInt32(mModel.LineId)], mModel.LineNumbers[Convert.ToInt32(mModel.LineNumber)], "1"); //MessageBox.Show(mModel.Factories[Convert.ToInt32(mModel.Factory)]+"," +productIdtxt.Text + "," + mModel.ProcessIds[Convert.ToInt32(mModel.ProcessId)] + "," + mModel.LineIds[Convert.ToInt32(mModel.LineId)] + "," + mModel.LineNumbers[Convert.ToInt32(mModel.LineNumber)] + "," + "1"); if (message == "OK") { mModel.IsFlag1 = true; label9.ForeColor = Color.Green; label9.Text = message; getProductNum(); //productNumtxt.Text = message; } else { label9.ForeColor = Color.Red; label9.Text = message; mModel.IsFlag1 = false; } } catch { mModel.IsConnect = false; initForm2(); MessageBox.Show("連接有誤"); } } }
private void textBox2_Validated(object sender, EventArgs e) { string s2 = hWebservice.XXCC_LOT_PC_F(mModel.Factories[Convert.ToInt32(mModel.Factory)], textBox2.Text, mModel.ProcessIds[Convert.ToInt32(mModel.ProcessId)], mModel.LineIds[Convert.ToInt32(mModel.LineId)], mModel.LineNumbers[Convert.ToInt32(mModel.LineNumber)], mModel.P_LOT_TYPE); if (s2 == "OK") { string ssss = hWebservice.getPartnum(textBox2.Text); mModel.ProductNum = ssss.Substring(0, ssss.IndexOf(",")); textBox3.Text = mModel.ProductNum; mModel.ProductId = textBox2.Text; flag2 = true; //mModel.ProductNum = textBox3.Text; label5.ForeColor = Color.Green; label5.Text = "OK"; } else { label5.ForeColor = Color.Red; label5.Text = s2; flag2 = false; } }