笨小孩做开发

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理
上一页 1 ··· 18 19 20 21 22 23 24 25 26 ··· 32 下一页

2014年3月3日

摘要: 序列化listhttp://kchen.cnblogs.com/通过序列化和反序列化泛型数据实体集合来实现持久化数据对象的方法 通过序列化和反序列化泛型数据实体集合来实现持久化数据对象的方法我们在平时使用数据库的时候,经常会碰到一个问题,就是不希望数据实体对象插入数据库中, 却有想持久化的时候,那么就可以用序列化成XML字符串,来保存到其他地方,由于生成的是字符串,所以可以保存到任意我们想保存的地方。比如 asp.net的ViewState,cookie,cache等。首先,我们定义一个数据实体类。 class Entity { public Entity() {} private int . 阅读全文
posted @ 2014-03-03 16:47 笨小孩做开发 阅读(561) 评论(0) 推荐(0) 编辑

摘要: 今天碰到要在一个页面获取另外一个页面url传过来的参数,一开始很本能的想到了用 split("?")这样一步步的分解出需要的参数。后来想了一下,肯定会有更加简单的方法的!所以在网上找到了两个很又简单实用的方法,mark下方法一:正则分析法 function getQueryString(name) { var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i"); var r = window.location.search.subs 阅读全文
posted @ 2014-03-03 16:28 笨小孩做开发 阅读(189) 评论(0) 推荐(0) 编辑

2014年2月27日

摘要: 具体代码实现@{ ViewBag.Title = "人员查找"; ViewBag.LeftWidth = "200px"; ViewBag.MiddleWidth = "200px";} //后台using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Collections;using System.Web.Mvc;using System.Web;using System.Data;using GWo 阅读全文
posted @ 2014-02-27 15:38 笨小孩做开发 阅读(597) 评论(0) 推荐(0) 编辑

摘要: 代码的具体实现@{ ViewBag.Title = "人员查找"; ViewBag.LeftWidth = "200px"; ViewBag.MiddleWidth = "200px";} 部门名称 、、、、、using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Collections;using System.Web.Mvc;using System.Web;using... 阅读全文
posted @ 2014-02-27 15:35 笨小孩做开发 阅读(2590) 评论(0) 推荐(1) 编辑

摘要: 下面是代码实现@{ ViewBag.Title = "人员查找"; ViewBag.LeftWidth = "200px"; ViewBag.MiddleWidth = "200px";} 按部门设置 按角色设置 姓名 确定 清空 取消 using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Collections;using S... 阅读全文
posted @ 2014-02-27 15:33 笨小孩做开发 阅读(764) 评论(0) 推荐(0) 编辑

2014年2月24日

摘要: 1.新建demo.aspx页面。2.首先在该页面的后台文件demos.aspx.cs中添加引用。 using System.Web.Services; 3.无参数的方法调用. 大家注意了,这个版本不能低于.net framework 2.0。2.0已下不支持的。 后台代码: [WebMethod] public static string SayHello() { return "Hello Ajax!"; } JS代码: AJAX 调用后台的方法" alt="复制代码" src="http://common.cnblogs.com/ 阅读全文
posted @ 2014-02-24 12:02 笨小孩做开发 阅读(295) 评论(0) 推荐(0) 编辑

2014年2月20日

摘要: #region 获取部门列表树集合 /// /// 获取部门列表树集合 /// /// public string GetOrganizationList() { System.Collections.IList orgainList = organizationibll.GetList();//获取部门方法 IsoDateTimeConverter timeConverter = new IsoDateTimeConverter(); timeConverter.DateTimeFormat = "yyyy'-'... 阅读全文
posted @ 2014-02-20 15:49 笨小孩做开发 阅读(385) 评论(0) 推荐(0) 编辑

摘要: #region 获取部门列表树集合 /// /// 获取部门列表树集合 /// /// public string GetOrganizationList() { System.Collections.IList orgainList = organizationibll.GetList();//获取部门方法 IsoDateTimeConverter timeConverter = new IsoDateTimeConverter(); timeConverter.DateTimeFormat = "yyyy'-'MM'-... 阅读全文
posted @ 2014-02-20 13:56 笨小孩做开发 阅读(546) 评论(0) 推荐(0) 编辑

2014年1月12日

摘要: if (Request.Cookies["zxcookies"] != null) { HttpCookie mycookie; mycookie = Request.Cookies["zxcookies"]; TimeSpan ts = new TimeSpan(0, 0, 0, 0);//时间跨度 mycookie.Expires = DateTime.Now.Add(ts);//立即过期 Response.Cookies.Remove("zxcookies");//清除 Response.Cookies.Add(mycookie 阅读全文
posted @ 2014-01-12 15:24 笨小孩做开发 阅读(260) 评论(0) 推荐(0) 编辑

2013年11月20日

摘要: Js获取当前日期时间及其它操作var myDate = new Date();myDate.getYear(); //获取当前年份(2位)myDate.getFullYear(); //获取完整的年份(4位,1970-????)myDate.getMonth(); //获取当前月份(0-11,0代表1月)myDate.getDate(); //获取当前日(1-31)myDate.getDay(); //获取当前星期X(0-6,0代表星期天)myDate.getTime(); //获取当前时间(从1970.1.1开始的毫秒数)myDate.getHours(); //获取当前小时数(0-23). 阅读全文
posted @ 2013-11-20 14:56 笨小孩做开发 阅读(226) 评论(0) 推荐(0) 编辑

上一页 1 ··· 18 19 20 21 22 23 24 25 26 ··· 32 下一页