| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 | using DevComponents.DotNetBar;using System;using System.Data;using WCS_Client.UC;namespace WCS_Client.Frm.MBtn_Monitor{    public partial class FrmUpdateEquMsg : Office2007Form    {        private DataRow dr = null;        public FrmUpdateEquMsg(DataRow datarow)        {            InitializeComponent();            dr = datarow;            txtEqu_No.Text = datarow["DEVICECODE"].ToString();            txtEqu_PlcName.Text = datarow["Equ_PlcName"].ToString();            txtEqu_Area.Text = datarow["Equ_Area"].ToString();            txtEqu_Type.Text = datarow["Equ_Type"].ToString();            txtEqu_Notes.Text = datarow["Equ_Notes"].ToString();        }        private void btnCancel_Click_1(object sender, EventArgs e)        {            this.Close();        }        private void btnUpdateP_Click_1(object sender, EventArgs e)        {            var enuipmentinfo = new WCS_EQUIPMENTINFO();            enuipmentinfo.Equ_Notes = txtEqu_Notes.Text.Trim();            string result = TryCachHelper.TryExecute((db) =>            {                if (db.Updateable<WCS_EQUIPMENTINFO>()                      .UpdateColumns(it => new WCS_EQUIPMENTINFO                      {                          Equ_Notes = enuipmentinfo.Equ_Notes                      })                      .Where(v => v.Equ_No == txtEqu_No.Text).ExecuteCommand() < 0)                {                    throw new Exception(string.Format("设备编号[{0}]修改备注信息失败!", txtEqu_No.Text));                }            });            if (string.IsNullOrWhiteSpace(result))            {                result = string.Format("修改机械码垛信息成功");            }            MessageUtil.ShowTips(result);        }    }}
 |