|  |  | 
 |  |  |  | 
 |  |  |  | 
 |  |  |         //审核 | 
 |  |  |         public bool CheckBill(int HSourceID, int HSourceInterID, int HSourceEntryID, string HSourceBillNo, int HICMOInterID, int HICMOEntryID, Int64 lngBillKey, ref string sReturn) | 
 |  |  |         public bool CheckBill(int HSourceID, int HSourceInterID, int HSourceEntryID, string HSourceBillNo, int HICMOInterID, int HICMOEntryID, Int64 lngBillKey, string HBillNo, string procName, string sUser, ref string sReturn) | 
 |  |  |         { | 
 |  |  |  | 
 |  |  |             string sql = ""; | 
 |  |  |             DataSet ds; | 
 |  |  |             try | 
 |  |  |             { | 
 |  |  |                 string HChecker = DBUtility.ClsPub.CurUserName; | 
 |  |  | 
 |  |  |                 oCn.BeginTran(); | 
 |  |  |                 oCn.RunProc(" Update " + MvarItemKey + " set HBillStatus='2',HChecker='" + HChecker + "',HCheckDate='" + HCheckDate + "' Where HInterID=" + lngBillKey.ToString()); | 
 |  |  |                 sReturn = "审核单据成功!"; | 
 |  |  |  | 
 |  |  |                 //审核后控制===============================================Begin================================================================ | 
 |  |  |                 sql = "exec " + procName + " " + lngBillKey + ",'" + HBillNo + "','" + sUser + "'"; | 
 |  |  |                 ds = oCn.RunProcReturn(sql, procName); | 
 |  |  |                 if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0) | 
 |  |  |                 { | 
 |  |  |                     sReturn = "审核过程中出错,请与网络管理人员联系"; | 
 |  |  |                     oCn.RollBack(); | 
 |  |  |                     return false; | 
 |  |  |                 } | 
 |  |  |                 if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0") | 
 |  |  |                 { | 
 |  |  |                     sReturn = ds.Tables[0].Rows[0]["HRemark"].ToString(); | 
 |  |  |                     oCn.RollBack(); | 
 |  |  |                     return false; | 
 |  |  |                 } | 
 |  |  |                 //审核后控制===============================================End================================================================ | 
 |  |  |  | 
 |  |  |                 oCn.Commit(); | 
 |  |  |                 //生成调拨单 | 
 |  |  |                 //得到调拨单 mainid 单据号 | 
 |  |  | 
 |  |  |         } | 
 |  |  |  | 
 |  |  |         //反审核 | 
 |  |  |         public bool AbandonCheck(int HSourceID, int HSourceInterID, int HSourceEntryID, string HSourceBillNo, int HICMOInterID, int HICMOEntryID, Int64 lngBillKey, ref string sReturn) | 
 |  |  |         public bool AbandonCheck(int HSourceID, int HSourceInterID, int HSourceEntryID, string HSourceBillNo, int HICMOInterID, int HICMOEntryID, Int64 lngBillKey, string HBillNo, string procName, string sUser, ref string sReturn) | 
 |  |  |         { | 
 |  |  |  | 
 |  |  |             string sql = ""; | 
 |  |  |             DataSet ds; | 
 |  |  |             try | 
 |  |  |             { | 
 |  |  |                 string HChecker = DBUtility.ClsPub.CurUserName; | 
 |  |  | 
 |  |  |                 oCn.BeginTran(); | 
 |  |  |                 //还原单据状态为未审核状态 | 
 |  |  |                 oCn.RunProc(" Update " + MvarItemKey + " set HBillStatus='1',HChecker='',HCheckDate='' Where HInterID=" + lngBillKey.ToString()); | 
 |  |  |                 sReturn = "审核单据成功!"; | 
 |  |  |                 sReturn = "反审核单据成功!"; | 
 |  |  |  | 
 |  |  |                 //审核后控制===============================================Begin================================================================ | 
 |  |  |                 sql = "exec " + procName + " " + lngBillKey + ",'" + HBillNo + "','" + sUser + "'"; | 
 |  |  |                 ds = oCn.RunProcReturn(sql, procName); | 
 |  |  |                 if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0) | 
 |  |  |                 { | 
 |  |  |                     sReturn = "反审核过程中出错,请与网络管理人员联系"; | 
 |  |  |                     oCn.RollBack(); | 
 |  |  |                     return false; | 
 |  |  |                 } | 
 |  |  |                 if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0") | 
 |  |  |                 { | 
 |  |  |                     sReturn = ds.Tables[0].Rows[0]["HRemark"].ToString(); | 
 |  |  |                     oCn.RollBack(); | 
 |  |  |                     return false; | 
 |  |  |                 } | 
 |  |  |                 //审核后控制===============================================End================================================================ | 
 |  |  |  | 
 |  |  |                 oCn.Commit(); | 
 |  |  |                 //生成调拨单 | 
 |  |  |                 //得到调拨单 mainid 单据号 |