Exemplo n.º 1
0
 private void tb_wo_KeyDown(object sender, KeyEventArgs e)
 {
     if ((!string.IsNullOrEmpty(tb_wo.Text)) && (e.KeyCode == Keys.Enter))
     {
         try
         {
             DataTable dtwo = ReleaseData.arrByteToDataTable(swoinfo.GetWoInfo(tb_wo.Text, null));
             ProductLine = dtwo.Rows[0]["LINEID"].ToString();
             SendMsg(mLogMsgType.Incoming, string.Format("此工单可在[{0}]线生产", ProductLine));
             sPartNumber   = dtwo.Rows[0][5].ToString();
             sPartColor    = ReleaseData.arrByteToDataTable(sProduct.GetProductByPartNumber(sPartNumber)).Rows[0][3].ToString();
             LabColor.Text = string.Format("颜色:[{0}]  料号:[{1}]", sPartColor, sPartNumber);
             _FwVer        = dtwo.Rows[0]["FW_VER"].ToString();
             SendMsg(mLogMsgType.Incoming, "获取工单信息成功");
             tb_Input.Enabled = true;
             tb_wo.Enabled    = false;
             tb_Input.Focus();
             cb_ListRoute.Items.Clear();
             DataTable dtcraft = ReleaseData.arrByteToDataTable(swoinfo.GetAllCraftInfo(tb_wo.Text));
             foreach (DataRow dr in dtcraft.Rows)
             {
                 cb_ListRoute.Items.Add(dr["CRAFTNAME"].ToString());
             }
         }
         catch
         {
             SendMsg(mLogMsgType.Error, string.Format("获取{0}工单,产品颜色失败", tb_wo.Text));
             tb_Input.Enabled = false;
             tb_wo.Text       = "";
         }
     }
 }
Exemplo n.º 2
0
        private void GetStationList(string woId)
        {
            cbroute.Text = "";
            DataTable dt = ReleaseData.arrByteToDataTable(tWoInfo.GetWoInfo(woId, null));

            if (dt.Rows.Count > 0)
            {
                // cbroute.Text = tWoInfo.GetCraftInfoBywoid(woId);
                cbroute.Text = dt.Rows[0]["INPUTGROUP"].ToString();
                ProductLine  = dt.Rows[0]["LINEID"].ToString();
                SendPrgMsg(mLogMsgType.Incoming, string.Format("此工单可在[{0}]线生产", ProductLine));
            }
        }
Exemplo n.º 3
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.GetWoInfo(tb_wo.Text, null));
         if (dt.Rows.Count != 0)
         {
             tb_Partnumber.Text = dt.Rows[0]["PARTNUMBER"].ToString();
             tb_Inputqty.Text   = dt.Rows[0]["INPUTQTY"].ToString();
             tb_TargetQty.Text  = dt.Rows[0]["QTY"].ToString();
             RouteCode          = dt.Rows[0]["ROUTGROUPID"].ToString();
             ProductLine        = dt.Rows[0]["LINEID"].ToString();
             SendPrgMsg(mLogMsgType.Normal, string.Format("此工单可在[{0}]线生产", ProductLine));
             SendPrgMsg(mLogMsgType.Normal, string.Format("工单[{0}]确认完成", tb_wo.Text));
             tb_wo.Enabled        = false;
             imbt_ChgLine.Visible = false;
         }
         else
         {
             SendPrgMsg(mLogMsgType.Error, string.Format("工单[{0}]没有找到", tb_wo.Text));
             tb_wo.Text = "";
         }
     }
 }