摘要: north region west content east region south region 阅读全文
posted @ 2015-11-27 16:02 zslm___ 阅读(216) 评论(0) 推荐(0) 编辑
摘要: public int BulkCopyTaskData( string dbTableName, DataTable dt) { int c = 0; if (dt != null && dt.Rows.Count > 0) ... 阅读全文
posted @ 2015-11-27 14:17 zslm___ 阅读(300) 评论(0) 推荐(0) 编辑
摘要: 之前都是用的二进制的序列化方法,是.net自带的,但是最常用到的还是Json序列化 (1)只需要调用 Newtonsoft.Json.dll 即可 public class JsonTools { // 从一个对象信息生成Json串 public static string ObjectToJson 阅读全文
posted @ 2015-11-26 14:02 zslm___ 阅读(359) 评论(0) 推荐(0) 编辑
摘要: 最初是为了把Cookie 保存到本地,然后随时加载这个Cookie免登陆的后来把它改了泛型,可以保存所有有Serializable 的类对象public static bool WriteObjToDisk(string file, T obj) where T:class { ... 阅读全文
posted @ 2015-11-26 11:59 zslm___ 阅读(255) 评论(0) 推荐(0) 编辑
摘要: namespace CommonClass{ /// /// 对Attribute类扩展方法 /// public static class CustomAttribute { /// /// 判断是否存在相应的特性 //... 阅读全文
posted @ 2015-11-26 11:51 zslm___ 阅读(316) 评论(0) 推荐(0) 编辑
摘要: //调用http://localhost:60663/home/GetCoder39Img?mycode=123443545public void GetCoder39Img(string mycode) { //string str= Request.QueryS... 阅读全文
posted @ 2015-11-18 18:14 zslm___ 阅读(429) 评论(0) 推荐(0) 编辑
摘要: namespace 建造者模式{ //现在要建造一个房子,需要请设计师和工人,工人负责 class Program { static void Main(string[] args) { Works works = new Work... 阅读全文
posted @ 2015-11-12 17:58 zslm___ 阅读(110) 评论(0) 推荐(0) 编辑
摘要: namespace ObserverPatternDelegateEvent{public delegate void ObserverNotify (string key,string msg); public abstract class Subject { Obse... 阅读全文
posted @ 2015-11-11 13:48 zslm___ 阅读(265) 评论(0) 推荐(0) 编辑
摘要: namespace ConsoleApplication1{ interface IObserver { void ReceiveMsg(string msg); } class Observer : IObserver { string ... 阅读全文
posted @ 2015-11-11 13:05 zslm___ 阅读(391) 评论(0) 推荐(0) 编辑
摘要: 简单的字符串数组排序就一句话Arr.sort(function(s1,s2){return s1.localeCompare(s2));//升序Arr.sort(function(s1,s2){return -1*s1.localeCompare(s2));//降序但是对应复杂的实例数组就不能这样了... 阅读全文
posted @ 2015-11-06 10:42 zslm___ 阅读(293) 评论(0) 推荐(0) 编辑