| | |
| | | return true; |
| | | |
| | | } |
| | | public bool DeleteBill(long HInterID, long HProcExchInterID, long HProcExchEntryID, ref string sReturn) |
| | | public bool DeleteBill(long HInterID, long HProcExchInterID, long HProcExchEntryID, string HBillNo, string procName, string user, ref string sReturn) |
| | | { |
| | | try |
| | | { |
| | | oCn.BeginTran(); |
| | | |
| | | |
| | | //åå
¥å 餿¥å¿ |
| | | //oCn.RunProc("exec h_p_Sc_StationInBillMain_DropLog " + HInterID+",'"+DBUtility.ClsPub.CurUserName+"'"); |
| | | |
| | |
| | | //åå¡«æµè½¬å¡è¿ç«æ¶é´ |
| | | //oCn.RunProc("update Sc_ProcessExchangeBillsub set HRelBeginDate=null where HInterID=" + HProcExchInterID + " and HEntryID=" + HProcExchEntryID); |
| | | |
| | | //å é¤åæ§å¶================================================================================== |
| | | string sql2 = "exec " + procName + " " + HInterID + ",'" + HBillNo + "','" + user + "'"; |
| | | DataSet ds = oCn.RunProcReturn(sql2, 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; |
| | | } |
| | | //============================================================================================== |
| | | |
| | | oCn.Commit(); |
| | | return true; |
| | | } |