/// <summary> /// 统计某个版位的广告数 /// </summary> /// <param name="strZoneId"></param> /// <returns></returns> int ID_Adzone.ADZone_Count(int ZoneId) { string str = "select count(*) from ZL_Zone_Advertisement where ZoneID=" + ZoneId.ToString(); return(SqlHelper.ObjectToInt32(SqlHelper.ExecuteScalar(CommandType.Text, str, null))); }
/// <summary> /// 修改版位 /// </summary> /// <param name="adZone"></param> /// <returns></returns> bool ID_Adzone.ADZone_Update(Model.M_Adzone adZone) { SqlParameter[] parameter = null; this.GetAdzoneParameter(adZone, ref parameter); return(SqlHelper.ExecuteNonQuery(CommandType.StoredProcedure, "dt_ADZone_Upadte", parameter) > 0); }
/// <summary> /// 批量激活 /// </summary> /// <param name="ZoneIds"></param> /// <returns></returns> bool ID_Adzone.BatchActive(string ZoneIds) { string strSql = "Update ZL_AdZone Set Active=1 Where ZoneID in (" + ZoneIds + ")"; return(SqlHelper.ExecuteNonQuery(CommandType.Text, strSql, null) > 0); }
/// <summary> /// 删除某个广告所在的版位 /// </summary> /// <param name="ADID"></param> /// <returns></returns> bool ID_Adzone.Delete_ADZone_Ad(string ADID) { string str = "delete from ZL_Zone_Advertisement where ADID=" + ADID; return(SqlHelper.ExecuteNonQuery(CommandType.Text, str, null) > 0); }
/// <summary> /// 批量删除 /// </summary> /// <param name="ZoneIds"></param> /// <returns></returns> bool ID_Adzone.BatchRemove(string ZoneIds) { string strSql = "Delete from ZL_AdZone Where ZoneID in (" + ZoneIds + ")"; return(SqlHelper.ExecuteNonQuery(CommandType.Text, strSql, null) > 0); }
/// <summary> /// 条件查询指定的版位 /// </summary> /// <param name="con"></param> /// <returns></returns> DataTable ID_Adzone.ADZone_ByCondition(string con) { string str = "select * from ZL_AdZone " + con; return(SqlHelper.ExecuteTable(CommandType.Text, str, null)); }
/// <summary> /// 获取所有版位 /// </summary> /// <returns></returns> DataTable ID_Adzone.ADZone_GetAll() { string sql = "select * from ZL_AdZone"; return(SqlHelper.ExecuteTable(CommandType.Text, sql, null)); }