public int GetNewID()
        {
            int PID = 0;
            bool IsRootTranscation = false;

            try
            {
                DBO.OUT02 dbo = new OUT02(ref USEDB);

                #region �Ұʥ���Ϋ��wRootTranscation

                if (IsRootTranscation)
                {
                    //�W�ߩI�s�Ұ�Transcation
                    Conn = USEDB.CreateConnection();
                    Conn.Open();
                    DBT = Conn.BeginTransaction();
                }
                else
                {
                    DBT = null;
                }

                #endregion

                PID = dbo.doGetNewID();

                #region ������\

                if (IsRootTranscation)
                {
                    //�W�ߩI�sTranscation����
                    DBT.Commit();
                }

                #endregion

                return PID;
            }
            catch (Exception ex)
            {
                #region �������

                if (IsRootTranscation)
                {
                    //�W�ߩI�sTranscation����
                    DBT.Rollback();
                }

                #endregion

                throw ex;
            }
            finally
            {
                #region �P�_�O�_��������s�u

                if (IsRootTranscation)
                {
                    //�W�ߩI�sTranscation,�����s�u
                    if (Conn.State == ConnectionState.Connecting)
                    {
                        Conn.Close();
                    }
                }

                #endregion

            }
        }