Asp.net源码专业站
首页->电子商务->MyShop网络商城080617源码>>AccessDAL/Announce.cs>>源码在线查看
温馨提示:代码在线浏览功能只能做为源码浏览参考,如果想更进一步了解该代码请下载:MyShop网络商城080617源码
当前文件:文件类型 MyShop080617/AccessDAL/Announce.cs[9K,2009-6-12 11:48:22]打开代码结构图
普通视图
		            
1using System; 2using System.Collections.Generic; 3 4using System.Data; 5using System.Data.OleDb; 6using MyShop.IDAL; 7using MyShop.Model; 8 9namespace MyShop.AccessDAL 10{ 11 public class Announce:IAnnounce 12 { 13 private ConfigInfo configInfo = new ConfigInfo(); 14 private string tableName = "Ljh_Announce"; 15 16 public Announce() 17 { 18 if (!string.IsNullOrEmpty(configInfo.TablePrefix.Trim())) 19 tableName = configInfo.TablePrefix + "Announce"; 20 } 21 IAnnounce member 241 242 /// <summary> 243 /// 快速搜索 244 /// </summary> 245 /// <param name="searchType"></param> 246 /// <returns></returns> 247 public DataSet QuickSearch(int searchType) 248 { 249 string str; 250 switch (searchType) 251 { 252 case 1: 253 str = " [IsSelected] = 1 order by Id Desc"; 254 break; 255 256 case 2: 257 str = " DateDiff('d',addTime,now()) = 0 order by Id Desc "; 258 break; 259 260 case 3: 261 str = " DateDiff('ww',addTime,now()) = 0 order by Id Desc "; 262 break; 263 264 case 4: 265 str = " DateDiff('m',addTime,now()) = 0 order by Id Desc "; 266 break; 267 268 case 5: 269 str = " DateDiff('m',addTime,now()) <= 3 order by Id Desc "; 270 break; 271 272 default: 273 str = " DateDiff('m',addTime,now()) > 3 order by Id Desc"; 274 break; 275 } 276 return this.GetDataSet(str); 277 } 278 279 280 281 /// <summary> 282 /// 高级查询 283 /// </summary> 284 /// <param name="field"></param> 285 /// <param name="keywords"></param> 286 /// <returns></returns> 287 public DataSet KeywordsSearch(string field, string keywords) 288 { 289 string filter = ""; 290 filter = " " + field + " like '%" + keywords + "%' order by Id Desc"; 291 return GetDataSet(filter); 292 } 293 294 /// <summary> 295 /// 得到在有有效时间内的公告列表 296 /// </summary> 297 /// <returns></returns> 298 public DataSet GetList() 299 { 300 return this.GetDataSet(" DateDiff('d',addTime,now()) < [outTime] Order by [Id] "); 301 } 302 303 304 } 305} 306
还没有找到您心仪的内容?请用.net源码大搜捕
代码片断 打包下载该项目完整源码:MyShop网络商城080617源码
51Aspx.com 版权所有 CopyRight © 2006-2010. 京ICP备06046876号 本站法律顾问:ITlaw-庄毅雄律师
返回顶部
客户服务:点击这里进行客户咨询 业务合作:点击这里洽谈业务合作 合作热线:010-68880146