コード例 #1
0
        private void btnResult_Click(object sender, EventArgs e)
        {
            if (this.bGettingTag)
            {
                this.bGettingTag  = false;
                this.btnScan.Text = "扫描";
                this.operateUnitStartGetTag.closeSerialPort();
                this.operateUnitStopGetTag.OperateStart(true);
            }
            List <Epc> list = new List <Epc>();

            //将具体的产品信息添加到详细列表里面
            if (this.dgvProductInfo.DataSource != null)
            {
                DataTable dt = (DataTable)this.dgvProductInfo.DataSource;

                foreach (DataRow dr in dt.Rows)
                {
                    Epc epc = new Epc(dr[0].ToString());
                    list.Add(epc);
                }
            }
            frmInventoryResult frm = new frmInventoryResult(list);

            frm.ShowDialog();
        }
コード例 #2
0
        private void btnResult_Click(object sender, EventArgs e)
        {
            if (this.bGettingTag)
            {
                this.bGettingTag  = false;
                this.btnScan.Text = "开始盘点";
                //停止通过网络获取标签
                //this.rmu900Helper.StopInventory();
            }
            List <Epc> list = new List <Epc>();

            //将具体的产品信息添加到详细列表里面
            if (this.dgvProductInfo.DataSource != null)
            {
                DataTable dt = (DataTable)this.dgvProductInfo.DataSource;

                foreach (DataRow dr in dt.Rows)
                {
                    Epc epc = new Epc(dr[0].ToString());
                    list.Add(epc);
                }
            }
            frmInventoryResult frm = new frmInventoryResult(list);

            frm.ShowDialog();
        }