摘要: #region 简单数据层代码,足可以说明面向接口的编程思想,一种思想的提高才是真正的提升 /// <summary> /// 简单数据工厂 /// </summary> internal class Factory { volatile static Dictionary<Thread, DataContext[]> divDataContext = new Dictionary<Thread, DataContext[]>(); static System.Timers.Timer t = new System.Timers.Timer(10 阅读全文
posted @ 2011-05-18 14:33 张占岭 阅读(929) 评论(0) 推荐(0) 编辑
摘要: 一个存储验证信息的公用类: /// <summary> /// 验证信息实体类 /// </summary> public class RuleViolation { /// <summary> /// 属性名,only support contruction method set it /// </summary> public string PropertyName { get; private set; } /// <summary> /// 错误信息 /// </summary> public string Err 阅读全文
posted @ 2011-05-18 14:31 张占岭 阅读(530) 评论(0) 推荐(0) 编辑
摘要: ASXC代码:<script> $(function() { //菜单变亮 $(".menubanner>ul>li").find("a[href$='" + location.href.split(window.location.host)[1] + "']").closest("li").addClass("current"); if (location.href.split(window.location.host)[1] == "&quo 阅读全文
posted @ 2011-05-18 14:25 张占岭 阅读(396) 评论(0) 推荐(0) 编辑
摘要: 静态构造函数用于初始化任何静态数据,或用于执行仅需执行一次的特定操作。在创建第一个实例或引用任何静态成员之前,将自动调用静态构造函数class Program { static void Main(string[] args) { static_construct sc = new static_construct(); //这里它执行了普通构造方法和静态构造方法 static_construct sc2 = new static_construct(); //这里静态构造方法就不会被执行了,它只在第一个类实例时被执行 Console.WriteLine(static_construct.A) 阅读全文
posted @ 2011-05-18 14:22 张占岭 阅读(414) 评论(0) 推荐(0) 编辑
摘要: <script type="text/javascript"> $(function() { $("#originalWidth").val($("#img1").width()); $("#originalHeight").val($("#img1").height()); var originalWidth = $("#originalWidth").val(); var originalHeight = $("#originalHeight&quo 阅读全文
posted @ 2011-05-18 14:21 张占岭 阅读(538) 评论(0) 推荐(0) 编辑