您目前尚未登陆,请选择【登陆】或【注册
首页->电子商务->MyShop网络商城080617源码>>AccessDAL/Announce.cs>>源码在线查看
温馨提示:代码在线浏览功能只能做为源码浏览参考,如果想更进一步了解该代码请下载:MyShop网络商城080617源码
当前文件:文件类型 MyShop080617/AccessDAL/Announce.cs打开代码结构图
普通视图
		            
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