Example #1
0
        private void tb_wo_KeyDown(object sender, KeyEventArgs e)
        {
            if (!string.IsNullOrEmpty(tb_wo.Text) && e.KeyCode == Keys.Enter)
            {
                DataTable dt = ReleaseData.arrByteToDataTable(tWoInfo.GetWoInfoByWo(tb_wo.Text));
                if (dt.Rows.Count > 0)
                {
                    LabTarget.Text = dt.Rows[0]["qty"].ToString();
                    LabInput.Text  = dt.Rows[0]["inputqty"].ToString();
                    LabRoute.Text  = dt.Rows[0]["inputgroup"].ToString();
                    SendMsg(mLogMsgType.Outgoing, "工单信息OK");
                    tb_Input.Focus();
                }
                else
                {
                    SendMsg(mLogMsgType.Error, "工单不存在或输入错误");
                }

                tb_wo.SelectAll();
            }
        }
Example #2
0
        private void tb_wo_KeyDown(object sender, KeyEventArgs e)
        {
            if (!string.IsNullOrEmpty(tb_wo.Text) && e.KeyCode == Keys.Enter)
            {
                DataTable dt = ReleaseData.arrByteToDataTable(tWoInfo.GetWoInfoByWo(tb_wo.Text));
                if (dt.Rows.Count > 0)
                {
                    LabTarget.Text = dt.Rows[0]["qty"].ToString();
                    LabInput.Text  = dt.Rows[0]["inputqty"].ToString();
                    LabRoute.Text  = dt.Rows[0]["inputgroup"].ToString();
                    ProductLine    = dt.Rows[0]["LINEID"].ToString();
                    SendPrgMsg(Color.Green, string.Format("此工单可在[{0}]线生产", ProductLine));
                    sPrint.SendMsg(PrintDLL.PrintLabel.mLogMsgType.Outgoing, "工单信息OK");
                }
                else
                {
                    sPrint.SendMsg(PrintDLL.PrintLabel.mLogMsgType.Error, "工单不存在或输入错误");
                }

                tb_wo.SelectAll();
            }
        }