ch
2022-05-24 6dddaea7cf513f9a55cc54d06a2a3feca750e4f6
WarM/ÌõÂë´òÓ¡/Sc_ICMOToBarCode.cs
@@ -225,8 +225,34 @@
            HUserName = ClsPub.isStrNull(DBUtility.ClsPub.CurUserName);
            Int64 HUserID = 0;
            HUserID = ClsPub.isInt(DBUtility.ClsPub.CurUserID);
            txtHEmpID.Text = HUserName;
            txtHEmpID.Tag = HUserID;
            DataSet DSet;
            DSet = oCn.RunProcReturn("Select * from gy_czygl Where czymc='" + HUserName + "'", "gy_czygl", ref DBUtility.ClsPub.sExeReturnInfo);
            if (DSet == null)
            //if (DSet == null|| DSet.Tables[0].Rows.Count == 0)
            {
                MessageBox.Show("没有返回任何结果,请在过滤框中点击【恢复】按钮,尝试再次查询!" + DBUtility.ClsPub.sExeReturnInfo);
                return;
            }
            else
            {
                grdMain.DataSource = DSet.Tables[0].DefaultView;
                //把当前单据ID å­˜åˆ°ä¸€ä¸ªæŒ‰é’®é‡Œé¢   åˆ·æ–°æ—¶æ¯æ¬¡å­˜ä¸€é
                if (DSet.Tables[0].Rows.Count > 0)
                {
                    txtHEmpID.Tag = DBUtility.ClsPub.isInt(DSet.Tables[0].Rows[0]["HEmpID"]);
                }
                else
                {
                }
            }
        }
        private void grdMain_DblClick(object sender, EventArgs e)
@@ -1052,13 +1078,18 @@
                {
                    if (HZXQty > DBUtility.ClsPub.isDoule(grdMain.Rows[i].Cells["生产订单数量"].Value))
                    {
                        HZXQty = HZXQty - DBUtility.ClsPub.isDoule(grdMain.Rows[i].Cells["生产订单数量"].Value);
                        grdMain.Rows[i].Cells["本次数量"].Value = DBUtility.ClsPub.isDoule(grdMain.Rows[i].Cells["生产订单数量"].Value);
                        //HZXQty = HZXQty - DBUtility.ClsPub.isDoule(grdMain.Rows[i].Cells["生产订单数量"].Value);
                        //grdMain.Rows[i].Cells["本次数量"].Value = DBUtility.ClsPub.isDoule(grdMain.Rows[i].Cells["生产订单数量"].Value);
                        MessageBox.Show("请点击超额生产按钮生成条码!");
                        return;
                    }
                    else
                    {
                        grdMain.Rows[i].Cells["本次数量"].Value = HZXQty;
                        break;
                        //grdMain.Rows[i].Cells["本次数量"].Value = HZXQty;
                        //
                        HZXQty = HZXQty - DBUtility.ClsPub.isDoule(grdMain.Rows[i].Cells["生产订单数量"].Value);
                        grdMain.Rows[i].Cells["本次数量"].Value = DBUtility.ClsPub.isDoule(grdMain.Rows[i].Cells["生产订单数量"].Value);
                    }
                }
                else