コード例 #1
0
 public string CheckVendorItemExists(ArrayList ParameterList)
 {
     try
     {
         DBO.VDM_VendorBaseDBO dbo = new VDM_VendorBaseDBO(ref USEDB);
         return dbo.CheckVendorItemExists(ParameterList);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
コード例 #2
0
        /// <summary>
        /// �򥻪���sBCO
        /// </summary>
        /// <param name="ParameterList">��s�ܼ�</param>
        /// <param name="RootDBT">�O�_���D���,�L�D�����Jnull</param>
        /// <returns>�^�Ǽv�T����</returns>
        public void UpdateVendorBase(ArrayList ParameterList,
            DbTransaction RootDBT
            )
        {
            bool IsRootTranscation = false;

            try
            {
                //�P�_�O�_���ǤJRoot Transcation
                IsRootTranscation = (RootDBT == null) ? true : false;

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

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

                #endregion

                DBO.VDM_VendorBaseDBO dbo = new VDM_VendorBaseDBO(ref USEDB);
                dbo.doUpdate(ParameterList, DBT);

                #region ������\

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

                #endregion

            }
            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

            }
        }
コード例 #3
0
 public DataTable QueryVendorBaseByLike2(ArrayList ParameterList)
 {
     try
     {
         DBO.VDM_VendorBaseDBO dbo = new VDM_VendorBaseDBO(ref USEDB);
         return dbo.doQueryByLIKE2(ParameterList);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
コード例 #4
0
 public DataTable QueryVendorBaseByALL()
 {
     try
     {
         DBO.VDM_VendorBaseDBO dbo = new VDM_VendorBaseDBO(ref USEDB);
         return dbo.doQueryAll();
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
コード例 #5
0
        public DataTable QuerySwitch(QueryType QT,
            ArrayList ParameterList
            )
        {
            DBO.VDM_VendorBaseDBO dbo = new VDM_VendorBaseDBO(ref USEDB);
            DataTable Dt;

            try
            {
                switch (QT)
                {
                    case QueryType.ALL:
                        Dt = dbo.doQueryAll();
                        break;
                    case QueryType.CODE:
                        Dt = dbo.doQueryByCode(ParameterList);
                        break;
                    case QueryType.ID:
                        Dt = dbo.doQueryByID(ParameterList);
                        break;
                    case QueryType.Custom:
                        Dt = dbo.doQueryByFind(ParameterList);
                        break;
                    default:
                        Dt = new DataTable();
                        break;
                }

                return Dt;
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
コード例 #6
0
 /// <summary>
 /// �ˮ֨����ӦX���ΰӫ~���
 /// </summary>
 /// <param name="VENODR_CODE">�����ӽs��</param>
 /// <param name="CONTRACT_CNT">�^�Ǭd��VDS_VDM_CONTRACT_MST����</param>
 /// <param name="ITEM_CNT">�^�Ǭd��VDS_ITM_ITEM����</param>
 public void QueryForDelete(string VENODR_CODE, out string CONTRACT_CNT, out string ITEM_CNT)
 {
     try
     {
         DBO.VDM_VendorBaseDBO dbo = new VDM_VendorBaseDBO(ref USEDB);
         dbo.QueryForDelete(VENODR_CODE, out CONTRACT_CNT, out ITEM_CNT);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
コード例 #7
0
        public int GetNewID()
        {
            int PID = 0;
            bool IsRootTranscation = false;

            try
            {
                DBO.VDM_VendorBaseDBO dbo = new VDM_VendorBaseDBO(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

            }
        }