public DataTable QueryDailyDPSitemData(ArrayList ParameterList)
        {
            DBO.VDS_CGD06_DBO CGDM = new DBO.VDS_CGD06_DBO(ref USEDB);
            DataTable Dt;

            try
            {
                Dt = CGDM.QueryDailyDPSitemData(ParameterList);
                return Dt;
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
        public DataTable CheckDPSLost(ArrayList ParameterList)
        {
            DBO.VDS_CGD06_DBO CGDM = new DBO.VDS_CGD06_DBO(ref USEDB);
            DataTable Dt;

            try
            {
                Dt = CGDM.CheckDPSLost(ParameterList);
                return Dt;
            }
            catch (Exception ex)
            {
                throw ex;
            }

        }
        public DataTable TransToDPS2(ArrayList ParameterList, DbTransaction RootDBT, out string strErr, out string strOperation)
        {
            int old_ParameterList4 = Convert.ToInt32(ParameterList[4].ToString());
            int new_ParameterList4 = Convert.ToInt32(ParameterList[4].ToString()) * 391500;

            ParameterList[3] = Convert.ToInt32(ParameterList[3].ToString());

            strErr = string.Empty;
            strOperation = string.Empty;

            bool IsRootTranscation = false;
            try
            {
                DBO.VDS_CGD06_DBO CGDM = new DBO.VDS_CGD06_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

                DataTable Dt = null;

                //刪除門市進貨日期及理貨批次的相關理貨檔
                strOperation = "DeleteMultiDPSData";
                CGDM.DeleteMultiDPSData(ParameterList, RootDBT);

                strOperation = "TransToDPS";
                ParameterList[4] = new_ParameterList4;
                strErr = CGDM.TransToDPS(ParameterList, RootDBT);
                if (strErr.Length != 0)
                {
                    return Dt;
                }

                strOperation = "DoTransToSpecDPS";
                ParameterList[4] = new_ParameterList4;
                strErr = CGDM.DoTransToSpecDPS(ParameterList, RootDBT);
                if (strErr.Length != 0)
                {
                    return Dt;
                }

                strOperation = "InsertDPSInfo";
                ParameterList[4] = old_ParameterList4;
                strErr = CGDM.InsertDPSInfo(ParameterList, RootDBT);
                if (strErr.Length != 0)
                {
                    return Dt;
                }

                strOperation = "InsertDPSRouteInfo";
                ParameterList[4] = new_ParameterList4;
                strErr = CGDM.InsertDPSRouteInfo(ParameterList, RootDBT);
                if (strErr.Length != 0)
                {
                    return Dt;
                }

                strOperation = "CountDPSBoxno";
                ParameterList[4] = new_ParameterList4;
                strErr = CGDM.CountDPSBoxno(ParameterList, RootDBT);
                if (strErr.Length != 0)
                {
                    return Dt;
                }

                #region 交易成功

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

                #endregion

                return Dt;
            }
            catch (Exception ex)
            {
                #region 交易失敗

                if (IsRootTranscation)
                {
                    //獨立呼叫Transcation失敗
                    DBT.Rollback();
                }

                #endregion

                throw ex;
            }
            finally
            {
                #region 判斷是否關閉交易連線

                if (IsRootTranscation)
                {
                    //獨立呼叫Transcation,關閉連線
                    if (Conn.State == ConnectionState.Connecting)
                    {
                        Conn.Close();
                    }
                }

                #endregion

            }
        }