/// <summary>
        /// 計算配量
        /// </summary>
        /// <param name="ParameterList"> s_DIS_NO, s_ITEM, s_PERIOD, s_CAL_NONEFF, s_USER_ID, s_DIS_TYPE, s_ROOT_NO</param>
        /// <param name="strResult"></param>
        /// <param name="strErrMsg"></param>
        /// <param name="RootDBT"></param>
        /// <returns></returns>
        public bool ProcessCalculateDisQtyFor131(ArrayList ParameterList, out string strResult, out string strErrMsg, DbTransaction RootDBT)
        {
            #region
            bool bResult = false;
            bool IsRootTranscation = false;
            strResult = "";
            strErrMsg = "";

            try
            {
                VDS_ALO_CONFIRM_COMM_DBO DBO = new VDS_ALO_CONFIRM_COMM_DBO(ref USEDB);

                #region 取消判斷 Transaction
                ////判斷是否有傳入Root Transcation 
                //IsRootTranscation = (RootDBT == null) ? true : false;

                //#region 啟動交易或指定RootTranscation

                //if (IsRootTranscation)
                //{
                //    //獨立呼叫啟動Transcation
                //    Conn = USEDB.CreateConnection();
                //    Conn.Open();
                //    DBT = Conn.BeginTransaction();
                //}
                //else
                //{
                //    DBT = RootDBT;
                //}

                //#endregion

                #endregion

                string s_DIS_NO, s_ITEM, s_PERIOD, s_CAL_NONEFF, s_USER_ID, s_DIS_TYPE, s_ROOT_NO;

                s_DIS_NO = ParameterList[0].ToString().Trim();
                s_ITEM = ParameterList[1].ToString().Trim();
                s_PERIOD = ParameterList[2].ToString().Trim();
                s_CAL_NONEFF = ParameterList[3].ToString().Trim();
                s_USER_ID = ParameterList[4].ToString().Trim();
                s_DIS_TYPE = ParameterList[5].ToString().Trim();
                s_ROOT_NO = ParameterList[6].ToString().Trim();

                //計算配量
                try
                {
                    bResult = ProcessCalculateDisQty(s_DIS_NO, s_ITEM, s_PERIOD, s_CAL_NONEFF, s_USER_ID, s_DIS_TYPE, s_ROOT_NO, RootDBT);
                }
                catch (Exception ex)
                {
                    strErrMsg = s_DIS_NO + ex.Message;
                    bResult = false;
                }

                if (bResult)
                {
                    MaintainDisAssist BCO2 = new MaintainDisAssist(ConnectionDB);
                    ParameterList.Clear();
                    ParameterList.Add(s_DIS_NO);
                    ParameterList.Add(s_ITEM);
                    ParameterList.Add(s_PERIOD);
                    ParameterList.Add(null);
                    DataTable dtDisAssistMain = BCO2.QueryDisAssistMain(ParameterList);

                    //判斷輔助項目是否有設定,有值則繼續計算配量
                    if (dtDisAssistMain != null && dtDisAssistMain.Rows.Count > 0)
                    {
                        ParameterList.Clear();
                        ParameterList.Add(s_DIS_NO);
                        ParameterList.Add(s_ITEM);
                        ParameterList.Add(s_PERIOD);
                        ParameterList.Add("0");
                        ParameterList.Add(s_USER_ID);

                        bResult = CalculateForAssistInfo(ParameterList);

                        if (!bResult) 
                        {
                            strErrMsg = "計算輔助項目配量失敗";
                        }
                    }

                }
                else 
                {
                    if (strErrMsg == "")
                    {
                        strErrMsg = "計算基本項目配量失敗";
                    }
                }

                #region 交易成功

                //if (IsRootTranscation)
                //{
                //    //獨立呼叫Transcation成立
                //    DBT.Commit();
                //}

                #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;
            #endregion
        }
        public bool ProcessCancelConfirm(ArrayList ParameterList, out string strResult, out string strErrMsg, DbTransaction RootDBT)
        {
            #region
            bool bResult = false;
            bool IsRootTranscation = false;

            try
            {
                VDS_ALO_CONFIRM_COMM_DBO DBO = new VDS_ALO_CONFIRM_COMM_DBO(ref USEDB);

                //判斷是否有傳入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.doProcessCancelConfirm(ParameterList, out strResult, out strErrMsg, DBT);

                #region 交易成功

                if (IsRootTranscation)
                {
                    //獨立呼叫Transcation成立
                    DBT.Commit();
                }

                #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;
            #endregion
        }