2016年3月4日

摘要: 1 1.添加对log4net的引用(先下载log4net.dll文件) 2 2.在基类中实例化Log对象 3 public log4net.ILog Log 4 { 5 get 6 { 7 return log4net.LogManager.GetLogger("Sfc.Client.Api"); 阅读全文
posted @ 2016-03-04 08:55 CeleryCabbage 阅读(393) 评论(0) 推荐(0) 编辑

2016年2月25日

摘要: 1 一、页面刷新问题 2 1.父页面A跳转到子页面B,B页面修改数据后再跳回A页面,刷新A页面数据 3 (1).父页面A代码 4 window.addEventListener("pageflowrefresh", function (e) { 5 location.reload(); 6 }); 阅读全文
posted @ 2016-02-25 16:42 CeleryCabbage 阅读(699) 评论(0) 推荐(0) 编辑

2016年2月15日

摘要: 1.引入相应的命名空间 using System.Transactions; 2.代码事例(using (TransactionScope ts = new TransactionScope())) 1 public JsonResult DriverCommentAdd(OrderComment 阅读全文
posted @ 2016-02-15 10:22 CeleryCabbage 阅读(307) 评论(0) 推荐(0) 编辑

2015年12月19日

摘要: 1.服务器系统环境 Windows Server 2008 R2 Enterprise 64位操作系统 2.所需软件 IIS7 PHPManager http://phpmanager.codeplex.com/releases/view/69115 php-5.5.25-Win32-VC11-x6 阅读全文
posted @ 2015-12-19 16:02 CeleryCabbage 阅读(809) 评论(0) 推荐(0) 编辑

2015年11月3日

摘要: 前台页面通过<file name="img">标签数组上传图片,后台根据Request.Files["img"]来接收前台上传的图片。 1 System.Web.HttpFileCollection files = System.Web.HttpContext.Current.Request.Fil 阅读全文
posted @ 2015-11-03 17:15 CeleryCabbage 阅读(5609) 评论(1) 推荐(1) 编辑

2015年10月31日

摘要: 1.生成验证码类 1 using System; 2 using System.Collections.Generic; 3 using System.Linq; 4 using System.Text; 5 using System.Web.Mvc; 6 using System.IO... 阅读全文
posted @ 2015-10-31 13:54 CeleryCabbage 阅读(462) 评论(0) 推荐(0) 编辑

2015年10月28日

摘要: code first网站发布后数据表中没有数据问题(1).将internal sealed class Configuration类访问修饰符改为public class Configuration : DbMigrationsConfiguration(2).在Global文件的Start()方法... 阅读全文
posted @ 2015-10-28 20:28 CeleryCabbage 阅读(204) 评论(0) 推荐(0) 编辑

2015年8月27日

摘要: 数字、手机号、QQ号、Url地址合法性校验1.验证是否为整数1 function isNumber($val)2 {3 if(ereg("^[0-9]+$", $val))4 return true;5 retu... 阅读全文
posted @ 2015-08-27 17:29 CeleryCabbage 阅读(5313) 评论(0) 推荐(2) 编辑

2015年8月21日

摘要: 1.定义一个分页用的Page类 1 /* 使用示例: 2 var pager = new Pager( 3 this.ControllerContext, //上下文 4 type.Articles,//数据源 5 ... 阅读全文
posted @ 2015-08-21 10:52 CeleryCabbage 阅读(835) 评论(2) 推荐(1) 编辑

2015年8月14日

摘要: 1.发送邮件1 public ActionResult SendEmail()2 {3 var member = dbSession.MemberRepository.LoadEntities(p => p.UserName == User.Identity.... 阅读全文
posted @ 2015-08-14 16:22 CeleryCabbage 阅读(487) 评论(1) 推荐(1) 编辑

导航