public DataTable QueryTrnasNoByCode(ArrayList ParameterList) { try { DBO.VDS_TRN12_DBO dbo = new VDS_TRN12_DBO(ref USEDB); return dbo.doQueryByCode(ParameterList); } catch (Exception ex) { throw ex; } }
/// <summary> /// 查詢VDS_TRN_TRNSPO_INIT資料 /// </summary> /// <param name="ParameterList"></param> /// <returns></returns> public DataTable QUERY_TRN_TRNSPO_INIT(ArrayList ParameterList) { #region try { DBO.VDS_TRN12_DBO dbo = new VDS_TRN12_DBO(ref USEDB); return dbo.doQUERY_TRN_TRNSPO_INIT(ParameterList); } catch (Exception ex) { throw ex; } #endregion }
public DataTable QueryByLikeForSLP(ArrayList ParameterList) { try { DBO.VDS_TRN12_DBO dbo = new VDS_TRN12_DBO(ref USEDB); ParameterList[0] = ParameterList[0] + "%"; //code ParameterList[1] = ParameterList[1] + "%"; //name ParameterList[2] = ParameterList[2]; return dbo.doQueryByLikeForSLP(ParameterList); } catch (Exception ex) { throw ex; } }
/// <summary> /// 刪除時,必需檢查是否存在vds_trn_trans_car_detl.TRANS_STEP_NO /// </summary> /// <param name="ParameterList"></param> /// <returns></returns> public DataTable CheckUseTRANS_STEP_NO(ArrayList ParameterList) { #region try { DBO.VDS_TRN12_DBO dbo = new VDS_TRN12_DBO(ref USEDB); return dbo.doCheckUseTRANS_STEP_NO(ParameterList); } catch (Exception ex) { throw ex; } #endregion }
/// <summary> /// 刪除一筆VDS_TRN_TRNSPO_INIT資料 /// </summary> /// <param name="ParameterList"></param> /// <param name="RootDBT"></param> public void DEL_TRN_TRNSPO_INIT(ArrayList ParameterList, DbTransaction RootDBT) { #region bool IsRootTranscation = false; DBO.VDS_TRN12_DBO dbo = new VDS_TRN12_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 dbo.doDEL_TRN_TRNSPO_INIT(ParameterList, DBT); #region 交易成功 if (IsRootTranscation) { //獨立呼叫Transcation成立 DBT.Commit(); } #endregion } catch (Exception ex) { #region 交易失敗 if (IsRootTranscation) { //獨立呼叫Transcation失敗 DBT.Rollback(); } #endregion throw ex; } finally { #region 判斷是否關閉交易連線 if (IsRootTranscation) { //獨立呼叫Transcation,關閉連線 if ((Conn.State == ConnectionState.Connecting) || (Conn.State == ConnectionState.Open)) { Conn.Close(); } } #endregion } #endregion }
/// <summary> /// 判斷【轉運站排序順序】是否已被TRN12佔用 /// </summary> /// <param name="ParameterList"></param> /// <param name="i32OCCUPIED"></param> /// <returns></returns> public bool CheckTransferSortIsOccupied(ArrayList ParameterList, out Int32 i32OCCUPIED) { #region try { DBO.VDS_TRN12_DBO dbo = new VDS_TRN12_DBO(ref USEDB); return dbo.doCheckTransferSortIsOccupied(ParameterList, out i32OCCUPIED); } catch (Exception ex) { throw ex; } #endregion }