duhe
2025-05-27 7632bb98d88c05da859ba0a6030fe0a9d3940b3d
WarM/ÌõÂë´òÓ¡/Gy_PackBarCodeBill_automaticallyByPLC.cs
@@ -10,6 +10,7 @@
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Microsoft.VisualBasic;
namespace WarM.条码打印
{
@@ -480,6 +481,8 @@
                return true;
            }catch(Exception ex)
            {
                string sql = "exec h_p_WMS_PackBarCodeBill_dealDataWhenError '" + textBox_HPackBarCode + "'";
                oCn.RunProc(sql);
                throw new Exception(ex.Message);
            }
            
@@ -1178,14 +1181,29 @@
        {
            if (grdMain.SelectedRows != null && grdMain.SelectedRows.Count==1)
            {
                if (MessageBox.Show("确定要删除?", "提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2) == DialogResult.Cancel)
                //if (MessageBox.Show("确定要删除?", "提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2) == DialogResult.Cancel)
                //{
                //    return;
                //}
                //if (MessageBox.Show("删除后将不可恢复,确定要继续操作?", "提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2) == DialogResult.Cancel)
                //{
                //    return;
                //}
                string pwd = Interaction.InputBox("请输入密码", "删除确认!", "", 100, 100);
                //点击取消
                if(pwd == "")
                {
                    return;
                }
                if (MessageBox.Show("删除后将不可恢复,确定要继续操作?", "提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2) == DialogResult.Cancel)
                if(pwd != "123456")
                {
                    MessageBox.Show("密码错误!");
                    return;
                }
                Delete();
            }
            else
@@ -1403,6 +1421,7 @@
                //获取缓存列表中 æ‰˜æ¡ç  å¯¹åº”çš„ ç»„托记录
                sql = "select top(1) a.* from Sc_PackUnionBill_Temp as a inner join Gy_BarCodeBill as b on a.HBarCode = b.HBarCode where a.HBarCode_Pack = '" + HPackBarCode + "' and b.HSourceID = " + HSourceID + " and a.HStockorgID = " + HOrgID;
                //sql = "select top(1) a.* from Sc_PackUnionBill_Temp as a where a.HBarCode_Pack = '" + HPackBarCode + "' and a.HStockorgID = " + HOrgID;
                ds = oCn.RunProcReturn(sql, "Sc_PackUnionBill_Temp");
                if (ds == null || ds.Tables[0].Rows.Count == 0)
                {
@@ -1445,11 +1464,12 @@
                HSourceEntryID_ICMO = 0;
                textBox_PackQty.Text = "";
                return;
            }
            HSourceInterID_ICMO = int.Parse(ds_getPackQty.Tables[0].Rows[0]["HSourceInterID"].ToString());
            HSourceEntryID_ICMO = int.Parse(ds_getPackQty.Tables[0].Rows[0]["HSourceEntryID"].ToString());
            textBox_PackQty.Text = ds_getPackQty.Tables[0].Rows[0]["组托数量"].ToString();
            textBox_PackQty.Text = Double.Parse(ds_getPackQty.Tables[0].Rows[0]["组托数量"].ToString()).ToString();
        }
        #endregion