摘要: http://harvesthq.github.com/chosen/ 阅读全文
posted @ 2013-03-13 13:25 James·wang 阅读(203) 评论(0) 推荐(0)
摘要: 用的是_window.Open()方式打开的窗口(风声js的window插件打开子窗口) ,类似于window.open()//用于刷新父窗口整个页面window.parent.location.reload();parent.subWindow_add.Close();//风声js的window插件关闭窗口,类似于window.close()//刷新父页面中的id为“4thEditTable”的列表(局部刷新)parent.$("#4thEditTable").load(window.parent.location.href+" #4thEditTable&qu 阅读全文
posted @ 2013-03-08 22:44 James·wang 阅读(1813) 评论(0) 推荐(0)
摘要: 在BLL里注意声明过程方法为public类型,不然无法使用类中定义的过程方法! 阅读全文
posted @ 2013-03-03 01:11 James·wang 阅读(395) 评论(0) 推荐(0)
摘要: 用户名 [\w\-]{3,12} 3-12个字符(包括英文字母、数字、'-'、'_')密码 [\x21-\x7E]{3,8} 3-8个常用字符(0x21到0x7E)年龄 1[0-2]\d|\d{1,2} 最大129岁日期 (19|20)\d{2}[/\s\-\.]*(0[1-9]|1[0-2]|[1-9])[/\s\-\.]*(0[1-9]|3[01]|[12][0-9]|[1-9]) 不含时间的日期,没有处理2月29日的情况(19|20)\d{2}[/\s\-\.]*(0[1-9]|1[0-2]|[1-9])[/\s\-\.]*(0[1-9]|3[01]|[1 阅读全文
posted @ 2013-03-02 18:43 James·wang 阅读(264) 评论(0) 推荐(0)
摘要: 很多时候删除某个元素后,我们都希望回到原来的页面,如何实现呢?假设在XController的index.cshtml(或aspx)中有:<a><href = "/area/XController/delete?id=10">删除</a>,为了让删除后回到index页面,可以使用:<a><href = "/area/XController/delete?id=10&backUrl=" + @Request.Url.ToString()>且在XController.cs中,将原来的<p 阅读全文
posted @ 2013-02-28 11:41 James·wang 阅读(2661) 评论(1) 推荐(1)
摘要: 操作符 如果源序列是空的 源序列只包含一个元素 源序列包含多个元素 First 返回null 返回该元素 返回第一个元素 FirstOrDefault 返回default(TSource) 返回该元素 返回第一个元素 Last 抛异常 返回该元素 返回最后一个元素 LastOrDefault 返回d 阅读全文
posted @ 2013-02-27 21:41 James·wang 阅读(22320) 评论(6) 推荐(6)
摘要: 1、泛型:泛型是一种特殊的类型,它把指定类型的工作推迟到客户端代码声明并实例化类或方法的时候进行。例如,通过使用泛型类型参数 T,您可以编写其他客户端代码能够使用的单个类,而不致引入运行时强制转换或装箱操作的成本或风险,如下所示:// 声明 generic 类public class GenericList<T>{ void Add(T input) { }}class TestGenericList{ private class ExampleClass { } static void Main() { // 声明list为整数类型int ... 阅读全文
posted @ 2013-02-21 09:48 James·wang 阅读(1034) 评论(1) 推荐(1)
摘要: 数据库 C#程序 int int32 text string bigint int64 binary System.Byte[] bit Boolean char string datetime System.DateTime decimal System.Decimal float System.Double image System.Byte[] money System.Decimal nchar String ntex... 阅读全文
posted @ 2013-02-05 10:56 James·wang 阅读(1210) 评论(0) 推荐(0)
摘要: 我们拿“MusicStore”这个示例来说 ,我们可以先直接在Artists表中新增CreateTime字段,然后在项目的Artist类中也新增CreateTime字段:publicvirtualDateTime?CreateTime{get;set;}这时如果我们运行程序,因为Artist类中的代码有改动,程序会出现如下错误:--------------------------------------------------------------------------------Themodelbackingthe'MusicStoreDB'contexthaschang 阅读全文
posted @ 2013-01-31 12:04 James·wang 阅读(573) 评论(4) 推荐(0)
摘要: PowerDesigner中Table视图同时显示Code和Name,像下图这样的效果:实现方法:Tools-Display Preference 阅读全文
posted @ 2013-01-10 07:54 James·wang 阅读(4024) 评论(0) 推荐(0)