沈泽
2021-11-03 f4e89066f9119fac831b64f388516aeb01c7dd60
WorkM/Á÷ת¿¨¹ÜÀí/MES_StationOutBillList_Bad.cs
@@ -622,7 +622,8 @@
            int HKeepCol = Fun_GetCol("K3保管");
            int HSecManagerCol = Fun_GetCol("K3验收");
            int HDeptCol = Fun_GetCol("K3部门");
            DAL.ClsKf_ProductInBill oClsKf_ProductInBill ;
            DAL.ClsKf_ProductInBill oClsKf_ProductInBill;
            SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
            //获取系统参数
            Pub_Class.ClsXt_SystemParameter oSystemParameter = new Pub_Class.ClsXt_SystemParameter();
            if (oSystemParameter.ShowBill(ref DBUtility.ClsPub.sExeReturnInfo) == false)
@@ -639,6 +640,34 @@
                MessageBox.Show("会计期间有错误! " + DBUtility.ClsPub.sExeReturnInfo);
                return;
            }
            string sHInterID = "";
            for (int i = 0; i < grdMain.SelectedRows.Count; i++)
            {
                sHInterID = sHInterID + "," + DBUtility.ClsPub.isStrNull(grdMain.Rows[grdMain.SelectedRows[i].Index].Cells[MainIDCol].Value);
            }
            if (sHInterID=="")
            {
                MessageBox.Show("没有选中的单据明细行,请先选择要入库的单据!", "提示");
                return;
            }
            else
            {
                DataSet DS = oCn.RunProcReturn("exec h_p_MES_StationOutBillList_Bad_PreProductIn '" + sHInterID + "'", "h_p_MES_StationOutBillList_Bad_PreProductIn", ref DBUtility.ClsPub.sExeReturnInfo);
                if (DS == null || DS.Tables[0].Rows.Count == 0)
                {
                    MessageBox.Show("入库前判断失败!", "提示");
                    return;
                }
                else
                {
                    if (DBUtility.ClsPub.isStrNull(DS.Tables[0].Rows[0][0]) == "1")
                    {
                        MessageBox.Show(DBUtility.ClsPub.isStrNull(DS.Tables[0].Rows[0]["HRemark"]));
                        return;
                    }
                }
            }
            Int64 n = 0;
            //循环 é€‰ä¸­è¡Œ
            for (int i = 0; i < grdMain.SelectedRows.Count; i++)