Asp.net源码专业站
首页->新闻文章->风讯dotNETCMSv1.0免安装版源码>>Foosun.CMS/Ads/Ads.cs>>源码在线查看
温馨提示:代码在线浏览功能只能做为源码浏览参考,如果想更进一步了解该代码请下载:风讯dotNETCMSv1.0免安装版源码
当前文件:文件类型 FooSunCMS/Foosun.CMS/Ads/Ads.cs[9K,2009-6-12 11:42:42]打开代码结构图
普通视图
		            
1//=========================================================== 2//== (c)2007 Foosun Inc. by dotNETCMS 1.0 == 3//== Forum:bbs.foosun.net == 4//== website:www.foosun.net == 5//== Address:NO.109 HuiMin ST.,Chengdu ,China == 6//== TEL:86-28-85098980/66026180 == 7//== qq:655071,MSN:ikoolls@gmail.com == 8//== Code By Xi.Deng == 9//=========================================================== 10using System; 11using System.Collections.Generic; 12using System.Data; 13using Foosun.Model; 14using Foosun.DALFactory; 15using System.IO; 16 17namespace Foosun.CMS.Ads 18{ 19 public class Ads 20 { 21 private string str_dirDumm = Foosun.Config.UIConfig.dirDumm; 22 private string str_rootpath = Foosun.Common.ServerInfo.GetRootPath(); 23 private IAds ac; 24 public Ads() 25 { 26 ac = DataAccess.CreateAds(); 27 } 28 29 public DataTable list(Foosun.Model.AdsListInfo ali) 30 { 31 DataTable dt = ac.list(ali); 32 return dt; 33 } 34 public DataTable childlist(string classid) 35 { 36 DataTable dt = ac.childlist(classid); 37 return dt; 38 } 39 public void Lock(string id) 40 { 41 ac.Lock(id); 42 } 43 44 public void UnLock(string id) 45 { 46 ac.UnLock(id); 47 } 48 public void DelAllAds() 49 { 50 DataTable dt = ac.AdsDt(null); 51 if (dt != null) 52 { 53 for (int i = 0; i < dt.Rows.Count; i++) 54 { 55 string classid = dt.Rows[i]["ClassID"].ToString(); 56 string adsid = dt.Rows[i]["AdID"].ToString(); 57 string adspath = str_rootpath + str_dirDumm + "\\jsfiles\\ads\\" + classid + "\\" + adsid + ".js"; 58 Foosun.Common.Public.DelFile("", adspath); 59 } 60 dt.Clear(); dt.Dispose(); 61 } 62 ac.DelAllAds(); 63 } 64 public void DelPAds(string id) 65 { 66 DataTable dt = ac.AdsDt(id); 67 if (dt != null) 68 { 69 for (int i = 0; i < dt.Rows.Count; i++) 70 { 71 string classid = dt.Rows[i]["ClassID"].ToString(); 72 string adsid = dt.Rows[i]["AdID"].ToString(); 73 string adspath = str_rootpath + str_dirDumm + "\\jsfiles\\ads\\" + classid + "\\" + adsid + ".js"; 74 Foosun.Common.Public.DelFile("", adspath); 75 } 76 dt.Clear(); dt.Dispose(); 77 } 78 ac.DelPAds(id); 79 } 80 public void DelAllAdsClass() 81 { 82 DataTable dt = ac.adsClassDt(null); 83 if (dt != null) 84 { 85 for (int i = 0; i < dt.Rows.Count; i++) 86 { 87 string classid = dt.Rows[i]["AcID"].ToString(); 88 string classpath = str_rootpath + str_dirDumm + "\\jsfiles\\ads\\" + classid; 89 Foosun.Common.Public.DelFile(classpath, ""); 90 } 91 dt.Clear(); dt.Dispose(); 92 } 93 ac.DelAllAdsClass(); 94 } 95 96 public void DelPAdsClass(string classid) 97 { 98 DataTable dt = ac.adsClassDt(classid); 99 if (dt != null) 100 { 101 for (int i = 0; i < dt.Rows.Count; i++) 102 { 103 string str_classid = dt.Rows[i]["AcID"].ToString(); 104 string classpath = str_rootpath + str_dirDumm + "\\jsfiles\\ads\\" + str_classid; 105 Foosun.Common.Public.DelFile(classpath, ""); 106 } 107 dt.Clear(); dt.Dispose(); 108 } 109 ac.DelPAdsClass(classid); 110 } 111 public int AddClass(Foosun.Model.AdsClassInfo aci) 112 { 113 int result = 0; 114 result = ac.AddClass(aci); 115 return result; 116 } 117 public int EditClass(Foosun.Model.AdsClassInfo aci) 118 { 119 int result = 0; 120 result = ac.EditClass(aci); 121 return result; 122 } 123 124 public DataTable getAdsClassInfo(string classid) 125 { 126 DataTable dt = ac.getAdsClassInfo(classid); 127 return dt; 128 } 129 public void statDelAll() 130 { 131 ac.statDelAll(); 132 } 133 public void statDel(string idstr) 134 { 135 ac.statDel(idstr); 136 } 137 public DataTable getAdsClassList() 138 { 139 DataTable dt = ac.getAdsClassList(); 140 return dt; 141 } 142 public DataTable getAdsList(string id) 143 { 144 DataTable dt = ac.getAdsList(id); 145 return dt; 146 } 147 148 public int adsAdd(Foosun.Model.AdsInfo ai) 149 { 150 string AdID = ac.adsAdd(ai); 151 createJS(ai.adType.ToString(),AdID,ai.ClassID); 152 return 1; 153 } 154 public DataTable getAdsDomain() 155 { 156 DataTable dt = ac.getAdsDomain(); 157 return dt; 158 } 159 public DataTable getAdsPicInfo(string col, string tbname, string id) 160 { 161 DataTable dt = ac.getAdsPicInfo(col,tbname,id); 162 return dt; 163 } 164 public DataTable getAdsInfo(string id) 165 { 166 DataTable dt = ac.getAdsInfo(id); 167 return dt; 168 } 169 public int adsEdit(Foosun.Model.AdsInfo ai) 170 { 171 int result = ac.adsEdit(ai); 172 string str_jspath = str_rootpath + str_dirDumm + "\\jsfiles\\ads\\" + ai.OldClass + "\\" + ai.AdID + ".js"; 173 Foosun.Common.Public.DelFile("", str_jspath); 174 175 createJS(ai.adType.ToString(), ai.AdID, ai.ClassID); 176 return result; 177 } 178 179 protected void createJS(string adType,string AdID,string classID) 180 { 181 switch (adType) 182 { 183 case "0": 184 createJs.CreateAds0(AdID, classID); 185 break; 186 case "1": 187 createJs.CreateAds1(AdID, classID); 188 break; 189 case "2": 190 createJs.CreateAds2(AdID, classID); 191 break; 192 case "3": 193 createJs.CreateAds3(AdID, classID); 194 break; 195 case "4": 196 createJs.CreateAds4(AdID, classID); 197 break; 198 case "5": 199 createJs.CreateAds5(AdID, classID); 200 break; 201 case "6": 202 createJs.CreateAds6(AdID, classID); 203 break; 204 case "7": 205 createJs.CreateAds7(AdID, classID, 0); 206 break; 207 case "8": 208 createJs.CreateAds7(AdID, classID, 1); 209 break; 210 case "9": 211 createJs.CreateAds8(AdID, classID); 212 break; 213 case "10": 214 createJs.CreateAds9(AdID, classID); 215 break; 216 case "11": 217 createJs.CreateAds10(AdID, classID); 218 break; 219 case "12": 220 createJs.CreateAds11(AdID, classID); 221 break; 222 } 223 } 224 225 public DataTable get24HourStat(string type, string id) 226 { 227 DataTable dt = ac.get24HourStat(type, id); 228 return dt; 229 } 230 public DataTable getDayStat(string type, string id, string mday) 231 { 232 DataTable dt = ac.getDayStat(type, id, mday); 233 return dt; 234 } 235 public DataTable getMonthStat(string type, string id) 236 { 237 DataTable dt = ac.getMonthStat(type, id); 238 return dt; 239 } 240 public DataTable getYearStat(string id) 241 { 242 DataTable dt = ac.getYearStat(id); 243 return dt; 244 } 245 public DataTable getWeekStat(string type, string id) 246 { 247 DataTable dt = ac.getWeekStat(type, id); 248 return dt; 249 } 250 public DataTable getSourceStat(string id) 251 { 252 DataTable dt = ac.getSourceStat(id); 253 return dt; 254 } 255 public DataTable getDbNull() 256 { 257 DataTable dt = ac.getDbNull(); 258 return dt; 259 } 260 public void upStat(string adress, string id) 261 { 262 ac.upStat(adress, id); 263 } 264 public void upShowNum(string id) 265 { 266 ac.upShowNum(id); 267 } 268 public void upClickNum(string id, string type) 269 { 270 ac.upClickNum(id, type); 271 } 272 public void addStat(string id, string ip) 273 { 274 ac.addStat(id, ip); 275 } 276 public DataTable getClassAdprice(string classid) 277 { 278 DataTable dt = ac.getClassAdprice(classid); 279 return dt; 280 } 281 public DataTable getuserG() 282 { 283 DataTable dt = ac.getuserG(); 284 return dt; 285 } 286 public void DelUserG(int Gnum) 287 { 288 ac.DelUserG(Gnum); 289 } 290 } 291} 292
还没有找到您心仪的内容?请用.net源码大搜捕
代码片断 打包下载该项目完整源码:风讯dotNETCMSv1.0免安装版源码
51Aspx.com 版权所有 CopyRight © 2006-2010. 京ICP备06046876号 本站法律顾问:ITlaw-庄毅雄律师
返回顶部
客户服务:点击这里进行客户咨询 业务合作:点击这里洽谈业务合作 合作热线:010-68880146