| | |
| | | throw (e); |
| | | } |
| | | } |
| | | //åå®¡æ ¸(å
å«åå®¡æ ¸åæ§å¶) |
| | | public bool AbandonCheck(Int64 lngBillKey, string HBillNo, string procName, string sUser, ref string sReturn) |
| | | { |
| | | string sql = ""; |
| | | DataSet ds; |
| | | |
| | | if (isUse(lngBillKey, ref sReturn)) |
| | | { |
| | | return false; |
| | | } |
| | | try |
| | | { |
| | | //å¼å¯äºå¡ |
| | | oCn.BeginTran(); |
| | | |
| | | ds = oCn.RunProcReturn("select * from " + MvarItemKey + " where HInterID=" + lngBillKey.ToString(), MvarItemKey); |
| | | if (ds.Tables[0].Rows[0]["HDeleteMan"].ToString() != "") |
| | | { |
| | | oCn.RunProc(" Update " + MvarItemKey + " set HChecker='',HCheckDate=null,HBillStatus=4 Where HInterID=" + lngBillKey.ToString()); |
| | | } |
| | | else if (ds.Tables[0].Rows[0]["HCloseMan"].ToString() != "") |
| | | { |
| | | oCn.RunProc(" Update " + MvarItemKey + " set HChecker='',HCheckDate=null,HBillStatus=3 Where HInterID=" + lngBillKey.ToString()); |
| | | } |
| | | else |
| | | { |
| | | oCn.RunProc(" Update " + MvarItemKey + " set HChecker='',HCheckDate=null,HBillStatus=1 Where HInterID=" + lngBillKey.ToString()); |
| | | } |
| | | |
| | | //åå®¡æ ¸åæ§å¶ |
| | | 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; |
| | | } |
| | | |
| | | sReturn = ""; |
| | | oCn.Commit(); |
| | | return true; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | oCn.RollBack(); |
| | | sReturn = e.Message; |
| | | throw (e); |
| | | } |
| | | } |
| | | |
| | | //å®¡æ ¸ |
| | | public bool CheckBill(Int64 lngBillKey, ref string sReturn) |
| | | { |
| | |
| | | throw (e); |
| | | } |
| | | } |
| | | //å®¡æ ¸(å
å«åå®¡æ ¸åæ§å¶) |
| | | public bool CheckBill(Int64 lngBillKey, string HBillNo,string procName , string sUser, ref string sReturn) |
| | | { |
| | | string sql = ""; |
| | | DataSet ds; |
| | | try |
| | | { |
| | | string HChecker = sUser; |
| | | string HCheckDate = ClsPub.GetServerDate(-1); |
| | | |
| | | //å¼å¯äºå¡ |
| | | oCn.BeginTran(); |
| | | |
| | | //æ´æ°åæ®ç¶æ |
| | | oCn.RunProc(" Update " + MvarItemKey + " set HChecker='" + HChecker + "',HCheckDate='" + HCheckDate + "' Where HInterID=" + lngBillKey.ToString()); |
| | | |
| | | //å®¡æ ¸åæ§å¶ |
| | | 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; |
| | | } |
| | | |
| | | sReturn = ""; |
| | | oCn.Commit(); |
| | | return true; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | oCn.RollBack(); |
| | | sReturn = e.Message; |
| | | throw (e); |
| | | } |
| | | } |
| | | //å
³é |
| | | public bool CloseBill(Int64 lngBillKey, ref string sReturn) |
| | | { |