Ejemplo n.º 1
0
        void UpdateEPCtxtBox(object o)
        {
            operateMessage msg = (operateMessage)o;

            if (msg.status == "fail")
            {
                MessageBox.Show("出现错误:" + msg.message);
                return;
            }
            string value = msg.message;

            if (!_UpdateList.CheckItem("UpdateTipLable"))
            {
                return;
            }
            _UpdateList.SetItem("UpdateTipLable", false);

            if (this.textBox1.InvokeRequired)
            {
                this.textBox1.Invoke(new deleUpdateContorl(UpdateEPCtxtBox), value);
            }
            else
            {
                UpdateEPCtxtBox(value);
            }

            _UpdateList.SetItem("UpdateTipLable", true);

            this.closeSerialPort();
        }
        private void showReturn(object o)
        {
            operateMessage msg = (operateMessage)o;

            if (msg.status == "fail")
            {
                MessageBox.Show("出现错误:" + msg.message);
                return;
            }
            else
            if (msg.status == "success")
            {
                this.getCodeSource();
                if (this.ctl.AddProductItem(this.epc, DEPARTMENT_ID, YEAR, PROJECT_ID, this.serial
                                            , CREATE_DATE, ROOM_ID, CABINET_ID, FLOOR, this.tag, COMMENT))
                {
                    //if (this.checkBox1.Checked)
                    {
                        MessageBox.Show("成功添加档案信息!");
                    }
                    if (this.dataGridView1.InvokeRequired)
                    {
                        this.dataGridView1.Invoke(new deleControlInvokeVoid_Void(this.refreshDGV));
                    }
                    //this.refreshDGV();
                }
            }
        }
Ejemplo n.º 3
0
        private void showReturn(object o)
        {
            operateMessage msg = (operateMessage)o;

            if (msg.status == "fail")
            {
                MessageBox.Show("出现错误:" + msg.message);
                return;
            }
            else
            if (msg.status == "success")
            {
                MessageBox.Show("写入标签成功!");
            }
        }
        void UpdateEpcList(object o)
        {
            operateMessage msg = (operateMessage)o;

            if (msg.status == "fail")
            {
                MessageBox.Show("出现错误:" + msg.message);
                this.bGettingTag    = false;
                this.btnGetTag.Text = "扫描";
                return;
            }
            string value = msg.message;

            //把读取到的标签epc与产品的进行关联
            Debug.WriteLine(string.Format(
                                "UpdateEpcList -> epc = {0}"
                                , value));
            this.LinkEPCToProduct(value);
        }
Ejemplo n.º 5
0
        void UpdateStatus(object o)
        {
            operateMessage msg = (operateMessage)o;

            if (msg.status == "fail")
            {
                MessageBox.Show("出现错误:" + msg.message);
                return;
            }
            string value = msg.message;

            if (this.statusLabel.InvokeRequired)
            {
                this.statusLabel.Invoke(new deleUpdateContorl(UpdateStatusLable), value);
            }
            else
            {
                UpdateStatusLable(value);
            }
        }
Ejemplo n.º 6
0
        void UpdateEpcList(object o)
        {
            operateMessage msg = (operateMessage)o;

            if (msg.status == "fail")
            {
                MessageBox.Show("出现错误:" + msg.message);
                this.bGettingTag = false;
                return;
            }
            string value = msg.message;

            //把读取到的标签epc与产品的进行关联
            if (this.textBox1.InvokeRequired)
            {
                this.textBox1.Invoke(new deleUpdateContorl(LinkEPCToProduct), value);
            }
            else
            {
                this.LinkEPCToProduct(value);
            }
        }