zzr99
2022-06-17 5b7184598c83f56080eb0a336f28d06b202a151f
WarM/ÌõÂë´òÓ¡/Sc_ICMOToBarCode.cs
@@ -2043,5 +2043,49 @@
            Sub_SaveBarCode();
            //
        }
        private void cmdESOP_Click(object sender, EventArgs e)
        {
            Sc_MESNowWorkBill_Fast oSc_MESNowWorkBill_Fast = new Sc_MESNowWorkBill_Fast();
            oSc_MESNowWorkBill_Fast.txtHICMOBillNo.Text = "";
            oSc_MESNowWorkBill_Fast.txtHMaterID.Text =txtHMaterID.Text;
            oSc_MESNowWorkBill_Fast.txtHName.Text = ClsPub.isStrNull(grdMain.Rows[0].Cells[Fun_GetCol("物料名称")].Value);
            oSc_MESNowWorkBill_Fast.txtHModel.Text = ClsPub.isStrNull(grdMain.Rows[0].Cells[Fun_GetCol("规格型号")].Value);
            oSc_MESNowWorkBill_Fast.Show();
        }
        private void txtHBarCode_KeyDown(object sender, KeyEventArgs e)
        {
            if(e.KeyCode==Keys.Enter)
            {
                //
                //获取第一行条形码进行打印
                DataSet DSet = oCn.RunProcReturn("select * from h_v_IF_BarCodeBillList_CS Where  æ¡ç ç¼–号='"+ txtHBarCode.Text +"' and æ¡ç ç±»åž‹ = '托盘条码'", "h_v_IF_BarCodeBillList_CS", ref DBUtility.ClsPub.sExeReturnInfo);
                //生成首行标题
                if (DSet == null)
                {
                    MessageBox.Show("没有返回任何结果,条码不存在!" + DBUtility.ClsPub.sExeReturnInfo);
                    return;
                }
                //
                grdList.DataSource = DSet.Tables[0].DefaultView;
                //冻结
                int FrCol = 0;
                string s = "是";
                DBUtility.Xt_BaseBillFun.DisplayGrid(grdList, this.Name + "grdList", s, FrCol);
                //
                //判断是否已经生成条码
                if (DBUtility.ClsPub.isStrNull(grdList.Rows[0].Cells[Fun_GetColList("条码编号")].Value) == "")
                {
                    MessageBox.Show("条码未生成,请先生成条码后再预览!");
                    return;
                }
                //选择打印模板
                Sub_SetReport("注塑物料标签");
                Report.Print(false);
                Thread.Sleep(1000);
            }
        }
    }
}