Exemplo n.º 1
0
        /// <summary>
        /// 重置标签
        /// 本方法主要功能为 重置标签名称以及标签信息 主要为同一个批号存在两种标签的工单设计 如 12芯*2
        /// </summary>
        /// <param name="_labName"></param>
        public bool SetLab(string _labName)
        {
            OrderLabSet _M_LabSetInfo = new OrderLabSet();

            _WTT_LabSetInfo = _M_LabSetInfo.GetLabInfo("(tb_OrderLabSet.BachNo  = '" + _PrintRecord.BatchNo
                                                       + "') AND (tb_OrderLabSet.LabName = '" + _labName + "')");

            if (_WTT_LabSetInfo.Tables[0].Rows.Count > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Exemplo n.º 2
0
        //针对跳线设计
        public My_Print(Maticsoft.Model.PackBatch _packBatch)
        {
            try
            {
                //1.获取工单中标签的设置信息 2.开启BT打印程序后台线程
                OrderLabSet _M_LabSetInfo = new OrderLabSet();
                _WTT_LabSetInfo = _M_LabSetInfo.GetLabInfo("(tb_OrderLabSet.OrderID  = '" + _packBatch.OrderID + "' )");
                if (_WTT_LabSetInfo.Tables[0].Rows.Count > 0)
                {
                    LabName = _WTT_LabSetInfo.Tables[0].Rows[0]["LabName"].ToString();
                    _PrintRecord.BatchNo    = _packBatch.BatchNo;
                    _PrintRecord.OrderID    = _packBatch.OrderID;
                    _PrintRecord.LabellMode = LabName;
                    btEngine.Start();      //开启后台线程
                    IsPrint = true;        //启用标签打印

                    //检查标签是否核对
                    LabVerify labv = new LabVerify();
                    Maticsoft.Model.LabVerify _temLabv = labv.GetModel(" Orm_ID = '" + _packBatch.OrderID + "'");
                    if (_temLabv != null && _temLabv.IsVerify != "0")
                    {
                    }
                    else
                    {
                        IsPrint = false;
                        My_MessageBox.My_MessageBox_Erry("此工单标签未经过核对!!!\r\n请通知助理或工程师进行标签核对后重试!");
                    }
                }
                else
                {
                    IsPrint = false;
                    My_MessageBox.My_MessageBox_Message("未找到此批号的任何标签,将不进行标签打印!!!\r\n请确认是否需要进行标签打印");
                }
            }
            catch { My_MessageBox.My_MessageBox_Message("打印服务未能启动,将导致无法打印!/r/n导致此错误的原因可能是您的计算机未安装BT打印软件或其它必要的服务程序!如有疑问请联系系统管理员"); }
        }