2013年12月29日
摘要: where表明了对类型变量T的约束关系。where T: A表示类型变量是继承于A的,或者是A本身。where T:new()指明了创建T的实例时应该使用的构造函数。 阅读全文
posted @ 2013-12-29 14:17 HonestPeople 阅读(141) 评论(0) 推荐(0) 编辑
  2013年3月6日
摘要: 后台:TxtContent =Microsoft.JScript.GlobalObject.escape( am.txtContent)......................使用escape对文本编辑器里面的字符串进行处理。前台: $.each(json, function (i, n) { // alert(unescape(n.TxtContent)); //alert(n.Parent_lanmu_name); arrclass[i + 1] = n.Parent_lanmu_name; if (n.Id == id) { parent_lanmu_name = n.Parent_ 阅读全文
posted @ 2013-03-06 16:40 HonestPeople 阅读(1396) 评论(0) 推荐(0) 编辑
  2013年1月10日
摘要: student kemuA语文A 语文A 数学B语文B 数学如何实现查询:student 语文 数学A 2 1B 11SQL:select student ,sum(case kemu when '语文' then 1 esle 0 end) 语文, sum(case kemu when '数学then 1 esle 0 end) 数学from table group by student 阅读全文
posted @ 2013-01-10 11:38 HonestPeople 阅读(114) 评论(0) 推荐(0) 编辑
  2013年1月7日
摘要: 用HttpModule实现登陆验证:大家在作登录时,登录成功后,一般要把用户名放在Session中保存,在其它每一个页面的Page_Load事件中都检查Session中是否存在用户名,如果不存在就说明用户未登录,就不让其访问其中的内容。 在比较大的程序中,这种做法实在是太笨拙,因为你几乎要在每一个页面中都加入检测Session的代码,导致难以开发和维护。下面我们看看如何使用HttpModule来减少我们的工作量 由于在这里我们要用到Session中的内容,我们只能在AcquireRequestState和PreRequestHandlerExecute事件中编写代码,因为在HttpModu.. 阅读全文
posted @ 2013-01-07 17:40 HonestPeople 阅读(214) 评论(0) 推荐(0) 编辑
摘要: using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace ConsoleApplication2{public class A{public A(){PrintFields();}public virtual void PrintFields() { Console.Write("test"); }}public class B : A{int x = 1;int y;public B(){y = -1;}public new void PrintF 阅读全文
posted @ 2013-01-07 14:59 HonestPeople 阅读(356) 评论(0) 推荐(0) 编辑
  2013年1月6日
摘要: 如何取得一个数据表的所有列名 SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME ='users'通过SQL语句来更改用户的密码修改别人的,需要sysadmin roleEXEC sp_password NULL, 'newpassword', 'User'如果帐号为SA执行EXEC sp_password NULL, 'newpassword', sa 阅读全文
posted @ 2013-01-06 16:58 HonestPeople 阅读(245) 评论(0) 推荐(0) 编辑
摘要: http://www.cnblogs.com/chillsrc/archive/2009/09/21/1571444.html 下一篇:http://www.cnblogs.com/chillsrc/archive/2009/09/23/1572743.html 阅读全文
posted @ 2013-01-06 11:46 HonestPeople 阅读(121) 评论(0) 推荐(0) 编辑
  2013年1月1日
摘要: http://www.cnblogs.com/yeminglong/archive/2012/05/11/2496348.html说明:1,不用启用父路径。2.将上面的。net版本换成你使用的framework 阅读全文
posted @ 2013-01-01 13:30 HonestPeople 阅读(129) 评论(0) 推荐(0) 编辑
  2012年12月28日
摘要: string query1 = "select MAX(g.Stars) ,new AuthorDTO(MAX(cast(g.GroupName as string))//不知道为什么不能加在聚合函数里面,也不能加到Groupfrom Group g join g.authors auths group by g.GroupName";下面方式可以:string query1 = "select g.Stars,new AuthorDTO(cast(g.GroupName as string)//需要在Group.hbm.xml里面添加<import cla 阅读全文
posted @ 2012-12-28 17:41 HonestPeople 阅读(295) 评论(0) 推荐(0) 编辑
摘要: linq的不支持: IQueryable<Model.MessageBoard> iq = new ManagerBase<Model.MessageBoard, Model.MessageBoard>().Query();IQueryable<Model.Author> iq2 = new ManagerBase<Model.Author, Model.Author>().Query();IQueryable<Model.Order> iq2 = new ManagerBase<Model.Order, Model.Order 阅读全文
posted @ 2012-12-28 17:26 HonestPeople 阅读(178) 评论(1) 推荐(0) 编辑