示例#1
0
        private void Readed_BarCode(object sender, ReadEventArgs e)
        {
            try
            {
                if (((FrmMAIN)this.MdiParent).ActiveMdiChild == this)
                {
                    string msg = e.ReadMsg.Replace("0", "").Trim();
                    ((FrmMAIN)this.MdiParent).ClearStrings();

                    int i = 0;
                    foreach (DataGridViewRow item in dgvBORList.Rows)
                    {
                        if (item.Cells[1].Value.ToString() == msg)
                        {
                            item.Cells[0].Value = true;
                            item.Selected       = true;
                            i++;
                        }
                    }
                    if (i < 1)
                    {
                        MessageBox.Show("항목이 없습니다 다시 확인해주세요.");
                        return;
                    }
                    if (MessageBox.Show("해당을 수정하시겠습니까?", "수정확인", MessageBoxButtons.YesNo) == DialogResult.Yes)
                    {
                        Update(null, null);
                    }
                }
            }
            catch (Exception err)
            {
                MessageBox.Show(err.Message);
            }
        }
示例#2
0
        private void Readed_BarCode(object sender, ReadEventArgs e)
        {
            if (((FrmMAIN)this.MdiParent).ActiveMdiChild == this)
            {
                try
                {
                    string msg = e.ReadMsg.Replace("%O", "_").Trim();
                    ((FrmMAIN)this.MdiParent).ClearStrings();

                    string name = "";
                    foreach (DataGridViewRow item in dgvitem.Rows)
                    {
                        if (item.Cells[3].Value.ToString() == msg)
                        {
                            item.Cells[1].Value = true;
                            item.Selected       = true;
                            name = item.Cells[4].Value.ToString();
                        }
                    }
                    if (name.Length < 1)
                    {
                        MessageBox.Show("항목이 없습니다 다시 확인해주세요.");
                        return;
                    }
                    if (MessageBox.Show($"{name} - 품목을 수정하시겠습니까?", "수정확인", MessageBoxButtons.YesNo) == DialogResult.Yes)
                    {
                        Update(null, null);
                    }
                }
                catch (Exception err)
                {
                    this.Log.WriteError($"[[RECV {this.Name}]]:{err.Message}");
                }
            }
        }
示例#3
0
        private void Readed_BarCode(object sender, ReadEventArgs e)
        {
            if (((FrmMAIN)this.MdiParent).ActiveMdiChild == this)
            {
                string msg = e.ReadMsg.Replace("%O", "_").Trim();
                ((FrmMAIN)this.MdiParent).ClearStrings();

                if (msg.Length > 0)
                {
                    dtpDate.Checked  = false;
                    txtItemName.Text = msg;
                    Search(null, null);
                    txtItemName.Clear();
                }
            }
        }