/// <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()); }
/// <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())); }
public int GetPageTotal(string columnId) { return((int)SqlHelperCatalog.ExecuteScalar("select count(*) from htmlPara where columnId=@columnId", new SqlParameter("@columnId", columnId))); }