public DataTable QuerySwitch(QueryType QT, ArrayList ParameterList)
        {
            CGD.VDS_CGD03_DBO CGDM = new VDS_CGD03_DBO(ref USEDB);
            DataTable Dt;

            try
            {
                switch (QT)
                {
                    case QueryType.QueryPickStation:
                        Dt = CGDM.QueryPickStation(ParameterList);
                        break;

                    case QueryType.QueryPickLocate:
                        Dt = CGDM.QueryPickLocate(ParameterList);
                        break;

                    case QueryType.GetPickOutItem:
                        Dt = CGDM.GetPickOutItem(ParameterList);
                        break;

                    case QueryType.QueryDefaultStation:
                        Dt = CGDM.QueryDefaultStation(ParameterList);
                        break;

                    case QueryType.SetPickLocateNo:
                        Dt = CGDM.SetPickLocateNo(ParameterList);
                        break;

                    case QueryType.GetMultiStationNo:
                        Dt = CGDM.GetMultiStationNo(ParameterList);
                        break;

                    case QueryType.CheckMultiStationItem:
                        Dt = CGDM.CheckMultiStationItem(ParameterList);
                        break;

                    case QueryType.Label:
                        Dt = CGDM.ExpPickLoacte(ParameterList);
                        break;

                    case QueryType.REPORT:
                        Dt = CGDM.PrintPickLineItem(ParameterList);
                        break;

                    default:
                        Dt = new DataTable();
                        break;
                }

                return Dt;
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
        public string CheckPickData(ArrayList ParameterList)
        {
            CGD.VDS_CGD03_DBO CGDM = new VDS_CGD03_DBO(ref USEDB);

            try
            {
                return CGDM.CheckPickData(ParameterList);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
        /// <summary>
        /// 基本表單新增BCO
        /// </summary>
        /// <param name="ParameterList">更新變數</param>
        /// <param name="RootDBT">是否有主交易,無主交易輸入null</param>
        /// <returns>回傳影響筆數</returns>
        public int Insert_VDS_CGD_PICK_LOCATE(ArrayList ParameterList, DbTransaction RootDBT)
        {
            int InsertRecord = 0;
            bool IsRootTranscation = false;

            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

                CGD.VDS_CGD03_DBO CGDM = new DBO.VDS_CGD03_DBO(ref USEDB);

                InsertRecord = CGDM.doInsertPickLocate(ParameterList, DBT);

                #region 交易成功

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

                #endregion

                return InsertRecord;

            }
            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

            }
        }
        /// <summary>
        /// 基本表單更新BCO
        /// </summary>
        /// <param name="ParameterList">更新變數</param>
        /// <param name="RootDBT">是否有主交易,無主交易輸入null</param>
        /// <returns>回傳影響筆數</returns>
        public string Update_VDS_CGD_PICK_STATION(ArrayList ParameterList, DbTransaction RootDBT)
        {
            bool IsRootTranscation = false;
            string MSG = "";

            try
            {
                CGD.VDS_CGD03_DBO CGDM = new DBO.VDS_CGD03_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
               
                MSG = CGDM.doUpdate(ParameterList, DBT);

                #region 交易成功

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

                #endregion

                return MSG;
            }
            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

            }
        }
        public string GetPickLocateSum(ArrayList ParameterList)
        {
            CGD.VDS_CGD03_DBO CGDM = new VDS_CGD03_DBO(ref USEDB);

            try
            {
                return CGDM.GetPickLocateSum(ParameterList);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
        public string Procedure_VDS_CGD_CGD03(ArrayList ParameterList, ref string rtnMsg)
        {
            CGD.VDS_CGD03_DBO CGDM = new VDS_CGD03_DBO(ref USEDB);

            try
            {
                return CGDM.Procedure_VDS_CGD_CGD03(ParameterList, ref rtnMsg);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
        public void GetQueryPickItem(ArrayList ParameterList, ref Int32 ITEM_CNT)
        {
            CGD.VDS_CGD03_DBO CGDM = new VDS_CGD03_DBO(ref USEDB);

            try
            {
                CGDM.GetQueryPickItem(ParameterList, ref ITEM_CNT);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
        public DataTable GetPickItem(ArrayList ParameterList , ref Int32 ITEM_CNT)
        {
            CGD.VDS_CGD03_DBO CGDM = new VDS_CGD03_DBO(ref USEDB);

            try
            {
                return CGDM.GetPickItem(ParameterList, ref ITEM_CNT);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }