/// <summary> /// 檢查牌價,回傳檢查結果(空字串代表正常) /// </summary> /// <param name="ParameterList"></param> /// <returns></returns> public string CheckStAcceptDisPrice(ArrayList ParameterList) { try { VDS_ALO_PROCESS_COMMON_DBO DBO = new VDS_ALO_PROCESS_COMMON_DBO(ref USEDB); return DBO.doCheckStAcceptDisPrice2(ParameterList); } catch (Exception ex) { throw GetNewException(ex); } }
public bool UpdateOtherTables(ArrayList ParameterList, DbTransaction RootDBT) { bool bResult = false; bool IsRootTranscation = false; VDS_ALO_PROCESS_COMMON_DBO DBO = new VDS_ALO_PROCESS_COMMON_DBO(ref USEDB); try { //判斷是否有傳入Root Transcation IsRootTranscation = (RootDBT == null) ? true : false; #region 啟動交易或指定RootTranscation if (IsRootTranscation) { //獨立呼叫啟動Transcation Conn = USEDB.CreateConnection(); Conn.Open(); DBT = Conn.BeginTransaction(); System.Web.HttpContext.Current.Trace.Warn(string.Format("使用者:{0} 於{1}.UpdateOtherTables.Open Connetction:{2} ", System.Web.HttpContext.Current.Session["UID"].ToString(), DateTime.Now.ToString(), DBT.GetHashCode().ToString()) ); } else { DBT = RootDBT; System.Web.HttpContext.Current.Trace.Warn(string.Format("使用者:{0} 於{1}.UpdateOtherTables.Used Old Connetction:{2} ", System.Web.HttpContext.Current.Session["UID"].ToString(), DateTime.Now.ToString(), DBT.GetHashCode().ToString()) ); } #endregion bResult = DBO.doUpdateOtherTables(ParameterList, DBT); #region 交易成功 if (IsRootTranscation) { //獨立呼叫Transcation成立 DBT.Commit(); } bResult = true; #endregion } catch (Exception ex) { #region 交易失敗 bResult = false; if (IsRootTranscation) { //獨立呼叫Transcation失敗 DBT.Rollback(); } #endregion throw GetNewException(ex); } finally { #region 判斷是否關閉交易連線 if (IsRootTranscation) { //獨立呼叫Transcation,關閉連線 if (Conn.State == ConnectionState.Connecting) { Conn.Close(); } } #endregion } return bResult; }
public bool CheckStAcceptDisPrice(ArrayList ParameterList, DbTransaction RootDBT) { bool bResult = false; bool IsRootTranscation = false; VDS_ALO_PROCESS_COMMON_DBO DBO = new VDS_ALO_PROCESS_COMMON_DBO(ref USEDB); try { //判斷是否有傳入Root Transcation IsRootTranscation = (RootDBT == null) ? true : false; #region 啟動交易或指定RootTranscation if (IsRootTranscation) { //獨立呼叫啟動Transcation Conn = USEDB.CreateConnection(); Conn.Open(); DBT = Conn.BeginTransaction(); } else { DBT = RootDBT; } #endregion bResult = DBO.doCheckStAcceptDisPrice(ParameterList, DBT); #region 交易成功 if (IsRootTranscation) { //獨立呼叫Transcation成立 DBT.Commit(); } //bResult = true; #endregion } catch (Exception ex) { #region 交易失敗 bResult = false; if (IsRootTranscation) { //獨立呼叫Transcation失敗 DBT.Rollback(); } #endregion throw GetNewException(ex); } finally { #region 判斷是否關閉交易連線 if (IsRootTranscation) { //獨立呼叫Transcation,關閉連線 if (Conn.State == ConnectionState.Connecting) { Conn.Close(); } } #endregion } return bResult; }