/// <summary> /// 取消订单 /// </summary> /// <param name="yylsh">医院流水号</param> /// <param name="msg">出错信息</param> /// <returns>0:成功 大于0:出错 小于0:异常</returns> public int DB_CancelPredepositList(string openid, string patientname, string patientid, long yylsh, out string msg) { msg = ""; long _sjczzt = -99; string _ztmc = ""; double _czje = 0; int phoneOrderStatus = DB_AlipayStatusOrder(yylsh, out _sjczzt, out _ztmc, out _czje, out msg); if (phoneOrderStatus == 1) { msg = "手机订单已完成,无法被修改"; return(22); } else if (phoneOrderStatus == -1) { msg = "手机订单已作废,无法被修改"; return(23); } OracleConnection connection = new OracleConnection(WebConfigParameter.ConnectionHisString); OracleDataReader dr = null; try { int ret = -1; //作废订单 string updateSql = _builder.CancelOrderSql(yylsh); ArrayList listSql = new ArrayList(); listSql.Add(updateSql); string logMsg = " yylsh = '" + yylsh + "' 。"; UtilLog.GetInstance().WriteOrderLog("取消订单成功: ", logMsg); DbHelperOra.ExecuteSqlTran(listSql, connection); msg = "订单作废成功"; ret = 00; return(ret); } catch (Exception ex) { msg = GetExceptionInfo(ex); return(-1); } finally { if (null != dr) { dr.Close(); } connection.Close(); } }