/// <summary> /// 根据频道Id获取对应的频道 /// </summary> /// <param name="ChannelId">频道ID</param> /// <returns></returns> public DataTable GetChannelById(string ChannelId) { string sql = "select ChannelName,CheckId,Remarks from LinkChannelType where ChannelId=@ChannelId"; SqlParameter[] Paras = new SqlParameter[] { new SqlParameter("@ChannelId", ChannelId) }; return(crm.GetDataSet(sql, Paras)); }
/// <summary> /// 根据ID获取当前分站信息 /// </summary> /// <param name="Id">Id</param> /// <returns>DataTable</returns> public DataTable GetFenZhanById(string Id) { string sql = "select * from FenZhanInfo where Id=@Id"; SqlParameter[] Paras = new SqlParameter[] { new SqlParameter("@Id", SqlDbType.Int, 4) }; Paras[0].Value = Id; return(crm.GetDataSet(sql, Paras)); }
/// <summary> /// 根据链接类别 /// </summary> /// <param name="TypeId">类别ID</param> /// <returns></returns> public DataTable GetTypeById(string TypeId) { string sql = "select LinkName,CheckId,Remarks from LinkTypeTab where LinkId=@TypeId"; SqlParameter[] Paras = new SqlParameter[] { new SqlParameter("@TypeId", SqlDbType.Int, 4) }; Paras[0].Value = TypeId; return(crm.GetDataSet(sql, Paras)); }
/// <summary> /// 根据BrandId获取品牌详情 /// </summary> /// <param name="BrandId">BrandId</param> /// <returns></returns> public DataTable GetBrandByBrandId(string BrandId) { string sql = "select * from BrandInfo where BrandId=@BrandId"; SqlParameter[] Paras = new SqlParameter[] { new SqlParameter("@BrandId", BrandId) }; return(crm.GetDataSet(sql, Paras)); }
/// <summary> /// 获取友情链接详情 /// </summary> /// <param name="LinkInfoId">LinkInfoId</param> /// <returns></returns> public DataTable GetLinkById(string LinkInfoId) { StringBuilder sb = new StringBuilder(); sb.Append("select a.LinkInfoId,a.Sort,a.ChannelId,a.LinkId,b.ChannelName,c.LinkName,a.LinkInfoName,a.LinkUrl"); sb.Append(",a.Logo,a.Remarks from LinkInfoTab as a left join LinkChannelType as b on"); sb.Append(" a.ChannelId=b.ChannelId left join LinkTypeTab as c on"); sb.Append(" a.LinkId=c.LinkId where a.LinkInfoId=@LinkInfoId"); SqlParameter[] Paras = new SqlParameter[] { new SqlParameter("@LinkInfoId", SqlDbType.Int, 4) }; Paras[0].Value = LinkInfoId; return(crm.GetDataSet(sb.ToString(), Paras)); }