Beispiel #1
0
        /// <summary>
        /// 标题存储成功后返回titleUrl
        /// </summary>
        /// <param name="userId"></param>
        /// <returns></returns>
        public string GetTitleUrl(string userId)
        {
            object tUrl = SqlHelperCatalog.ExecuteScalar("select top 1 titleURL from htmlPara where userId=@userId order by Id desc",
                                                         new SqlParameter("@userId", SqlHelper.ToDBNull(userId)));

            return(tUrl.ToString());
        }
Beispiel #2
0
        /// <summary>
        /// 获取当前表最大Id
        /// </summary>
        /// <returns></returns>
        public int GetMaxId()
        {
            object ob = "";

            try
            {
                ob = SqlHelperCatalog.ExecuteScalar("select Id  from htmlPara order by Id desc");
                if (ob == null)
                {
                    ob = 0;
                }
            }
            catch (Exception ex)
            { return(1); }
            return(int.Parse(ob.ToString()));
        }
Beispiel #3
0
 public int GetPageTotal(string columnId)
 {
     return((int)SqlHelperCatalog.ExecuteScalar("select count(*)  from htmlPara where columnId=@columnId",
                                                new SqlParameter("@columnId", columnId)));
 }