using MESClassLibrary.BLL.BasicInfo; using MESClassLibrary.BLL.Inspection; 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; namespace InjectionPC { public partial class FrmPackageDetail : Form { private BarCodeBLL _barCodeBLL = new BarCodeBLL(); private InjectionBoxBLL _injectionBoxBLL = new InjectionBoxBLL(); private string _packageCode = string.Empty; public FrmPackageDetail(string pPackageCode) { InitializeComponent(); this._packageCode = pPackageCode; txtPackageCode.Text = pPackageCode; dataGridView1.AutoGenerateColumns = false; btnSearch_Click(null, null); } private void btnSearch_Click(object sender, EventArgs e) { string boxCode = txtPackageCode.Text?.Trim(); DataTable dt = _barCodeBLL.SearchBarCode(boxCode, Program.tableName, "200"); dataGridView1.DataSource = dt; } } }