Exemple #1
0
        /// <summary>
        /// 取唯一值
        /// </summary>
        /// <returns></returns>
        public static int GetUnique()
        {
            SQLHelper sqlLocal = new Utility.SQLHelper("");

            string sql = string.Format("SELECT TOP(1) [UniqueID] FROM  [{0}].[dbo].[UNIQUE] AS A WITH(NOLOCK)", "");

            object result = sqlLocal.GetSingle(sql);

            if (result == null)
            {
                return(0);
            }

            return(int.Parse(result.ToString()));
        }