using System; using System.Text; using System.Windows.Forms; using UAS_MES_NEW.DataOperate; using UAS_MES_NEW.Entity; using UAS_MES_NEW.PublicMethod; namespace UAS_MES_NEW.SMT { public partial class SMT_WaringSetting : Form { StringBuilder sql = new StringBuilder(); DataHelper dh = new DataHelper(); public SMT_WaringSetting() { InitializeComponent(); } private void Confirm_Click(object sender, EventArgs e) { if (de_code.Text == "" || Cycle.Text == "" || UnitTime.Text == "" || EarlyWarning.Text == "") { BaseUtil.ShowError("所有参数都必须填写!"); } else { string str = dh.getFieldDataByCondition("device", "de_statuscode", "de_code='" + de_code.Text + "'").ToString(); if (str != "") { if (!(str == ("AUDITED"))) {//机台未审核 BaseUtil.ShowError("机台:" + de_code.Text + "未审核!"); } } else { BaseUtil.ShowError("机台:" + de_code.Text + "不存在!"); } Close(); } } private void 用料预警设置_Load(object sender, EventArgs e) { de_code.FormName = Name; de_code.SetValueField = new string[] { "de_code" }; de_code.TableName = "device"; de_code.SelectField = "de_code # 设备编号,de_linecode # 线别编号,de_name # 设备名称,de_runstatus # 运行状态"; de_code.Condition = "de_linecode='" + User.UserLineCode + "'"; } } }