摘要: View Code public static IEnumerable<T> GetIEnumberable(IEnumerable<T> list,Func<T,bool> FuncWhere,Func<T,String> FuncOrder,int PageSize,int PageIndex){ var rance= List.Where(FuncWhere).OrderByDescending(FuncOrder).Select(t=>t).Skip((PageIndex-1)*PageSize).Take(PageSize);}/ 阅读全文
posted @ 2012-07-13 15:43 RyanRuan 阅读(266) 评论(0) 推荐(0) 编辑
摘要: 创建lucene索引View Code 1 //1. path 2 string indexPath=@"/ui/index/"; 3 4 //2. StandarAnalyzer 5 Lucene.Net.Analysis.Standard.StandarAnalyzer sa=new StandarAnalyzer(); 6 7 //3. IndexWriter 8 IndexWriter iw=new IndexWriter(mapPath(indexPath),sa,true); 9 10 //4. Document11 Document doc=new Docum 阅读全文
posted @ 2012-07-13 15:35 RyanRuan 阅读(237) 评论(0) 推荐(0) 编辑
摘要: 因为在用DNN框架,所以,用到大部分是皮肤和模块,每个模块都是各自隔离的。测试人员,就指出了BUG:页面按ENTER指向不明确个人解决方法:在每一个textbox里,添加onfocus,onblur,onkeydown方法,在每次onfocus时添加cookie,然后其他模块(用户控件)在搜索的时候,就判断这个cookie是否为空,不为空才操作,onblur删除这个cookie,onkeydwon,执行该模块的button方法。SetEnterCookie=function(){ var name="enterType", value="material" 阅读全文
posted @ 2012-07-13 15:06 RyanRuan 阅读(205) 评论(0) 推荐(0) 编辑
摘要: http://www.oschina.net/code/snippet_156736_4923 阅读全文
posted @ 2012-07-13 14:55 RyanRuan 阅读(140) 评论(0) 推荐(0) 编辑
View Code