You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
67 lines
2.1 KiB
67 lines
2.1 KiB
using System;
|
|
using System.Collections.Generic;
|
|
using System.ComponentModel;
|
|
using System.Data;
|
|
using System.Drawing;
|
|
using System.Linq;
|
|
using System.Reflection;
|
|
using System.Text;
|
|
using System.Windows.Forms;
|
|
using PunchAndWeld.DataSouce;
|
|
|
|
namespace PunchAndWeld
|
|
{
|
|
public partial class FrmPackList : Form
|
|
{
|
|
public FrmPackList()
|
|
{
|
|
InitializeComponent();
|
|
}
|
|
|
|
private void FrmPackList_Load(object sender, EventArgs e)
|
|
{
|
|
textBox1.Text = "";
|
|
textBox1.Focus();
|
|
}
|
|
|
|
private void button1_Click(object sender, EventArgs e)
|
|
{
|
|
try
|
|
{
|
|
if (string.IsNullOrEmpty(textBox1.Text.Trim()))
|
|
{
|
|
MessageBox.Show("请扫描或输入箱单号!", "提示", MessageBoxButtons.OK);
|
|
textBox1.Focus();
|
|
return;
|
|
}
|
|
|
|
listView1.Columns.Clear();
|
|
listView1.Clear();
|
|
listView1.Columns.Add("箱单号", 400, HorizontalAlignment.Center);
|
|
listView1.Columns.Add("塑件条码", 400, HorizontalAlignment.Center);
|
|
listView1.Columns.Add("装箱时间", 400, HorizontalAlignment.Center);
|
|
|
|
DataTable dt = ProScreenFunc.PackList(textBox1.Text.Trim());
|
|
if (dt != null && dt.Rows.Count > 0)
|
|
{
|
|
for (int i = 0; i < dt.Rows.Count; i++)
|
|
{
|
|
ListViewItem lvi = new ListViewItem(dt.Rows[i]["BoxNo"].ToString());
|
|
lvi.SubItems.Add(dt.Rows[i]["BarCode"].ToString()); //后面添加的Item都为SubItems ,即为子项
|
|
lvi.SubItems.Add(dt.Rows[i]["CreateTime"].ToString());
|
|
listView1.Items.Add(lvi);
|
|
}
|
|
}
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
LogHelper.WriteErrLogBase(ex.ToString(), MethodBase.GetCurrentMethod().Name);
|
|
}
|
|
}
|
|
|
|
private void button2_Click(object sender, EventArgs e)
|
|
{
|
|
this.Close();
|
|
}
|
|
}
|
|
}
|
|
|