You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
86 lines
2.6 KiB
86 lines
2.6 KiB
3 months ago
|
using System;
|
||
|
using System.Collections.Generic;
|
||
|
using System.ComponentModel;
|
||
|
using System.Configuration;
|
||
|
using System.Data;
|
||
|
using System.Drawing;
|
||
|
using System.Linq;
|
||
|
using System.Reflection;
|
||
|
using System.Text;
|
||
|
using System.Windows.Forms;
|
||
|
using MESClassLibrary.BLL.Log;
|
||
|
using MESClassLibrary.BLL.ZPPlan;
|
||
|
|
||
|
namespace FacOneZPStation
|
||
|
{
|
||
|
public partial class FrmMould : Form
|
||
|
{
|
||
|
public FrmMould()
|
||
|
{
|
||
|
InitializeComponent();
|
||
|
}
|
||
|
|
||
|
private void textBox1_KeyDown(object sender, KeyEventArgs e)
|
||
|
{
|
||
|
try
|
||
|
{
|
||
|
ZPBomBLL bll=new ZPBomBLL();
|
||
|
|
||
|
if (e.KeyCode == Keys.Enter)
|
||
|
{
|
||
|
DataTable dt = bll.SearchPartAndMould(ConfigurationManager.AppSettings["StationNo"].ToString(),Program.partNo1, textBox1.Text.Trim());
|
||
|
if (dt != null && dt.Rows.Count > 0)
|
||
|
{
|
||
|
Program.IsOK = true;
|
||
|
Program.mouldNo = textBox1.Text.Trim();
|
||
|
this.Close();
|
||
|
}
|
||
|
else
|
||
|
{
|
||
|
Program.IsOK = false;
|
||
|
MessageBox.Show("胎膜号和计划不一致,请更换胎膜!", "提示", MessageBoxButtons.OK);
|
||
|
textBox1.Focus();
|
||
|
textBox1.SelectAll();
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
catch (Exception ex)
|
||
|
{
|
||
|
LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod());
|
||
|
}
|
||
|
}
|
||
|
|
||
|
private void button1_Click(object sender, EventArgs e)
|
||
|
{
|
||
|
this.Close();
|
||
|
}
|
||
|
|
||
|
private void button2_Click(object sender, EventArgs e)
|
||
|
{
|
||
|
try
|
||
|
{
|
||
|
ZPBomBLL bll = new ZPBomBLL();
|
||
|
|
||
|
DataTable dt = bll.SearchPartAndMould(ConfigurationManager.AppSettings["StationNo"], Program.partNo1, textBox1.Text.Trim());
|
||
|
if (dt != null && dt.Rows.Count > 0)
|
||
|
{
|
||
|
Program.IsOK = true;
|
||
|
Program.mouldNo = textBox1.Text.Trim();
|
||
|
this.Close();
|
||
|
}
|
||
|
else
|
||
|
{
|
||
|
Program.IsOK = false;
|
||
|
MessageBox.Show("胎膜号和计划不一致,请更换胎膜!", "提示", MessageBoxButtons.OK);
|
||
|
textBox1.Focus();
|
||
|
textBox1.SelectAll();
|
||
|
}
|
||
|
}
|
||
|
catch (Exception ex)
|
||
|
{
|
||
|
LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod());
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|