Esempio n. 1
0
        public static int GetAccountServiceID(int _AccountID, string _BonusAccount, ProcessTransaction pt)
        {
            DataTable dt  = null;
            int       _id = 0;

            if (pt != null)
            {
                dt = pt.Select("SELECT ID FROM dbo.AccountDetail WITH (NOLOCK) WHERE AccountID =" + _AccountID + " AND AccountTypeID NOT IN (" + _BonusAccount + ")");
            }
            else
            {
                dt = TextUtils.Select("SELECT ID FROM dbo.AccountDetail WITH (NOLOCK) WHERE AccountID =" + _AccountID + " AND AccountTypeID NOT IN (" + _BonusAccount + ")");
            }

            if (dt.Rows.Count > 0)
            {
                _id = TextUtils.ToInt(dt.Rows[0]["ID"].ToString());
            }

            return(_id);
        }