DBUtility/»ù´¡×ÊÁÏ/ClsGy_Base_Ctl.cs
@@ -362,6 +362,14 @@
                        sReturn = "单据已禁用,不允许重复禁用!";
                        return false;
                    }
                    DataSet DsHavChildCodes = oCn.RunProcReturn("select HItemID from " + MvarItemKey + " where HStopflag=0 and HParentID='" + HItemID + "'", MvarItemKey, ref Pub_Class.ClsPub.sExeReturnInfo);
                    if (DsHavChildCodes.Tables[0].Rows.Count > 0)
                    {
                        sReturn = "所选单据存在未禁用的子项目,不允许禁用!";
                        return false;
                    }
                    //禁用
                    oCn.BeginTran();
                    oCn.RunProc("Update " + MvarItemKey + " set HStopflag=1,HStopEmp = '" + HMaker + "',HStopTime=getdate() where HItemID=" + HItemID, ref Pub_Class.ClsPub.sExeReturnInfo);
@@ -403,6 +411,14 @@
                        sReturn = "单据未禁用,不允许反禁用!";
                        return false;
                    }
                    DataSet DsHavChildCodes = oCn.RunProcReturn("select HItemID from " + MvarItemKey + " where HStopflag=1 and HItemID='" + DS.Tables[0].Rows[0]["HParentID"].ToString() + "'", MvarItemKey, ref Pub_Class.ClsPub.sExeReturnInfo);
                    if (DsHavChildCodes.Tables[0].Rows.Count > 0)
                    {
                        sReturn = "所选单据上级项目已禁用,不允许反禁用!";
                        return false;
                    }
                    //禁用
                    oCn.BeginTran();
                    oCn.RunProc("Update " + MvarItemKey + " set HStopflag=0,HStopEmp = '',HStopTime=null where HItemID=" + HItemID, ref Pub_Class.ClsPub.sExeReturnInfo);