using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using UAS_MES.DataOperate; using UAS_MES.Entity; namespace UAS_MES.Make { public partial class Make_PalletWeightRecord : Form { DataHelper dh = SystemInf.dh; public Make_PalletWeightRecord() { InitializeComponent(); } private void SaveWeight_Click(object sender, EventArgs e) { //验证栈板号存在 if (dh.CheckExist("package", "pa_outboxcode='" + pa_outboxcode.Text + "' and pa_type=3")) { float PalletWeight; try { PalletWeight = float.Parse(weight.Text); } catch (Exception) { OperateResult.AppendText(">>请输入正确的重量\n"); return; } dh.UpdateByCondition("package", "PA_WEIGHT='" + PalletWeight + "'", "pa_outboxcode='" + pa_outboxcode.Text + "'"); OperateResult.AppendText(">>栈板号" + pa_outboxcode.Text + "记录重量" + weight.Text + "kg成功\n", Color.Green, pa_outboxcode); weight.Clear(); } else OperateResult.AppendText(">>栈板号" + pa_outboxcode.Text + "不存在\n", Color.Red, pa_outboxcode); } private void Clean_Click(object sender, EventArgs e) { OperateResult.Clear(); } } }