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_NEW.DataOperate; using UAS_MES_NEW.Entity; using UAS_MES_NEW.PublicMethod; namespace UAS_MES_NEW.Query { public partial class Query_Commandlog : Form { DataTable dbfind; AutoSizeFormClass asc = new AutoSizeFormClass(); LogStringBuilder sql = new LogStringBuilder(); DataTable dt; DataHelper dh; DataTable dta; DataTable dtpi; DataTable dtform; DataTable dtms; int getcount; public Query_Commandlog() { InitializeComponent(); } private void Warehouse_ProductMakeIn_Load(object sender, EventArgs e) { asc.controllInitializeSize(this); getcount = 0; dh = SystemInf.dh; pallecode.Focus(); } private void Warehouse_ProductMakeIn_SizeChanged(object sender, EventArgs e) { asc.controlAutoSize(this); } private void Search_Click(object sender, EventArgs e) { if (pallecode.Text!="") { sql.Clear(); sql.Append(" select cl_linecode,cl_sncode,cl_makecode,cl_operate,cl_result,cl_date,sc_stepname,cl_man from commandlog "); sql.Append(" left join source on cl_sourcecode = sc_code where cl_sncode = '"+pallecode.Text+"' or cl_result like '%"+pallecode.Text+"%' order by cl_id asc "); DataTable dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select"); BaseUtil.FillDgvWithDataTable(InOutDetailDGV, dt); } else { MessageBox.Show("不可录入为空"); } } private void pallecode_KeyDown(object sender, KeyEventArgs e) { } private void pallecode_UserControlOnKeyDown(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.Enter) { Search_Click(this, new EventArgs()); } } } }