示例#1
0
        private void txt_woId_KeyDown(object sender, KeyEventArgs e)
        {
            if (!string.IsNullOrEmpty(txt_woId.Text) && e.KeyCode == Keys.Enter)
            {
                My_MoNumber = string.Empty;
                Ls_My_MoNumber.Clear();
                DataTable dtwo = FrmBLL.ReleaseData.arrByteToDataTable(refWebtWoInfo.Instance.GetWoInfo(txt_woId.Text, null));
                if (dtwo.Rows.Count > 0)
                {
                    My_MoNumber = txt_woId.Text;
                    Ls_My_MoNumber.Add(My_MoNumber);
                    Dictionary <string, object> dic = new Dictionary <string, object>();
                    dic.Add("NEW_WOID", My_MoNumber);
                    DataTable dt_MoMorge = FrmBLL.ReleaseData.arrByteToDataTable(refWebtSmtWoMerge.Instance.Get_Smt_WO_Merge(FrmBLL.ReleaseData.DictionaryToJson(dic), "OLD_WOID,MERGE_NUM"));
                    //if (dt_MoMorge.Rows.Count > 0)
                    //    Ls_My_MoNumber.Add(dt_MoMorge.Rows[0]["OLD_WOID"].ToString());
                    if (dt_MoMorge.Rows.Count > 0)
                    {
                        dic = new Dictionary <string, object>();
                        dic.Add("MERGE_NUM", dt_MoMorge.Rows[0]["MERGE_NUM"].ToString());
                        dt_MoMorge = FrmBLL.ReleaseData.arrByteToDataTable(refWebtSmtWoMerge.Instance.Get_Smt_WO_Merge(FrmBLL.ReleaseData.DictionaryToJson(dic), "NEW_WOID,OLD_WOID"));
                        foreach (DataRow dr in dt_MoMorge.Rows)
                        {
                            if (!Ls_My_MoNumber.Contains(dr["NEW_WOID"].ToString()))
                            {
                                Ls_My_MoNumber.Add(dr["NEW_WOID"].ToString());
                            }
                            if (!Ls_My_MoNumber.Contains(dr["OLD_WOID"].ToString()))
                            {
                                Ls_My_MoNumber.Add(dr["OLD_WOID"].ToString());
                            }
                        }
                    }

                    string MoNumberStr = string.Empty;
                    foreach (string itemstr in Ls_My_MoNumber)
                    {
                        MoNumberStr += itemstr + ",";
                    }

                    mFrm.ShowMsg(Frm_MaterialManage.mLogMsgType.Incoming, string.Format("工单确认完成[{0}]", MoNumberStr.Substring(0, MoNumberStr.Length - 1)));
                    txt_tr_sn.Focus();
                }
                else
                {
                    mFrm.ShowMsg(Frm_MaterialManage.mLogMsgType.Error, "工单不正确....");
                    txt_woId.Text = string.Empty;
                }
            }
        }
示例#2
0
        private void txt_tr_sn_KeyDown(object sender, KeyEventArgs e)
        {
            if (!string.IsNullOrEmpty(txt_tr_sn.Text) && e.KeyCode == Keys.Enter)
            {
                try
                {
                    string    _StrErr = string.Empty;
                    DataTable _dt     = FrmBLL.ReleaseData.arrByteToDataTable(refWebtR_Tr_Sn.Instance.Sel_Tr_Sn_Info(txt_tr_sn.Text, out _StrErr));
                    if (_dt.Rows.Count > 0)
                    {
                        #region  填充控件值
                        FrmBLL.publicfuntion.Fill_Control(panelEx3, _dt);
                        #endregion

                        Dictionary <string, string> dic = new Dictionary <string, string>();
                        dic.Add("TR_SN", _dt.Rows[0]["TR_SN"].ToString());
                        dic.Add("PART_NO", _dt.Rows[0]["KP_NO"].ToString());
                        dic.Add("DATE_CODE", _dt.Rows[0]["DATE_CODE"].ToString());
                        dic.Add("UNIT_SIZE", _dt.Rows[0]["QTY"].ToString());
                        dic.Add("VENDER_CODE", _dt.Rows[0]["VENDER_ID"].ToString());
                        dic.Add("LOT_ID", _dt.Rows[0]["LOT_CODE"].ToString());
                        dic.Add("EMP_NO", mFrm.UserId);
                        dic.Add("REMARK", _dt.Rows[0]["KP_DESC"].ToString());
                        dic.Add("STORLOC", string.Format("{0}/{1}", _dt.Rows[0]["STOCK_ID"].ToString(), _dt.Rows[0]["LOC_ID"].ToString()));
                        PublicPrintLabel(dic);
                    }
                    else
                    {
                        mFrm.ShowMsg(Frm_MaterialManage.mLogMsgType.Error, "TR_SN 错误");
                    }
                }
                catch (Exception ex)
                {
                    mFrm.ShowMsg(Frm_MaterialManage.mLogMsgType.Error, ex.Message);
                }
                finally
                {
                    txt_tr_sn.Text = string.Empty;
                }
            }
        }
示例#3
0
        private void tb_woId_KeyDown(object sender, KeyEventArgs e)
        {
            if (!string.IsNullOrEmpty(tb_woId.Text) && e.KeyCode == Keys.Enter)
            {
                try
                {
                    //if (!Chk_User_Editing(tb_woId.Text))
                    //    return;

                    dgvmtrlist.Rows.Clear();
                    dgvTrsnList.Rows.Clear();


                    if (!Get_WO_Erp_Info(tb_woId.Text))
                    {
                        return;
                    }

                    DataTable dtwoInfo = FrmBLL.ReleaseData.arrByteToDataTable(refWebtWoBomInfo.Instance.GetWoBomInfo(tb_woId.Text));
                    dic_loc = new Dictionary <string, string>();
                    foreach (DataRow dr in dtwoInfo.Rows)
                    {
                        dgvmtrlist.Rows.Add(dr[0].ToString(), dr[1].ToString(), dr[2].ToString(), dr[3].ToString(), dr[4].ToString());
                        if (!dic_loc.ContainsKey(dr[2].ToString()))
                        {
                            dic_loc.Add(dr[2].ToString(), dr[7].ToString());
                        }
                    }

                    DataTable dtTrsnList = FrmBLL.ReleaseData.arrByteToDataTable(refWebtR_Tr_Sn.Instance.Sel_woId_Trsn_List(tb_woId.Text, null));
                    foreach (DataRow dr in dtTrsnList.Rows)
                    {
                        if (dr["STATUS"].ToString() == "1")
                        {
                            dgvTrsnList.Rows.Add(dr["TR_SN"].ToString(), dr["KP_NO"].ToString(), dr["VENDER_ID"].ToString(), dr["DATE_CODE"].ToString(), dr["LOT_CODE"].ToString(), dr["QTY"].ToString(), dr["STOCK_ID"].ToString());
                        }
                    }

                    mFrm.ShowMsg(Frm_MaterialManage.mLogMsgType.Warning, "正在计算发料总数......");
                    foreach (DataGridViewRow dgvr in dgvmtrlist.Rows)
                    {
                        int       x     = 0;
                        DataTable dtqty = FrmBLL.publicfuntion.getNewTable(dtTrsnList, string.Format("KP_NO='{0}'", dgvr.Cells[2].Value.ToString()));
                        foreach (DataRow dr in dtqty.Rows)
                        {
                            x += Convert.ToInt32(dr["QTY"].ToString());
                        }
                        dgvr.Cells[5].Value = x.ToString();
                    }

                    mFrm.ShowMsg(Frm_MaterialManage.mLogMsgType.Incoming, "计算发料总数完成......");

                    mFrm.ShowMsg(Frm_MaterialManage.mLogMsgType.Incoming, "查询完成...");
                }
                catch (Exception ex)
                {
                    mFrm.ShowMsg(Frm_MaterialManage.mLogMsgType.Error, ex.Message);
                }
                finally
                {
                    tb_woId.SelectAll();
                }
            }
        }
 private void Frm_Modify_TrSn_Qty_Load(object sender, EventArgs e)
 {
     FilePatch = Directory.GetCurrentDirectory() + "\\LabelFile\\FEIXUN_LOT.lab";
     mFrm.ShowMsg(Frm_MaterialManage.mLogMsgType.Incoming, "条码路径: " + FilePatch);
     txt_tr_sn.Focus();
 }
示例#5
0
 private void Frm_ReturnofMaterial_Load(object sender, EventArgs e)
 {
     try
     {
         lbl = new ApplicationClass();
         LabelFlePatch.Text = Directory.GetCurrentDirectory() + "\\LabelFile\\FEIXUN_LOT.lab";
         txt_tr_sn.Focus();
         mFrm.ShowMsg(Frm_MaterialManage.mLogMsgType.Normal, "退料流程 步骤1:输入工单  步骤2:输入料盘");
     }
     catch
     {
         mFrm.ShowMsg(Frm_MaterialManage.mLogMsgType.Error, "初始化打印接口失败");
     }
 }