10 2015 档案

摘要:打开程序包管理控件台:Install-Package FubarDev.NDbUnit.SqlServerCeWeb.config中修改: 阅读全文
posted @ 2015-10-31 21:51 gobuild 阅读(269) 评论(0) 推荐(0)
摘要:把Form的KeyPreView设为true,然后在Form的KeyPress中增加下列代码即可:if (e.KeyChar == '\r')this.SelectNextControl(this.ActiveControl, true, true, true, true); 阅读全文
posted @ 2015-10-30 19:21 gobuild 阅读(142) 评论(0) 推荐(0)
摘要:using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;u... 阅读全文
posted @ 2015-10-30 19:20 gobuild 阅读(710) 评论(0) 推荐(0)
摘要:登录时增加:Session["UserName"] = model.UserName;Controller: protected override void OnActionExecuting(ActionExecutingContext filterContext) { ... 阅读全文
posted @ 2015-10-29 08:38 gobuild 阅读(1314) 评论(0) 推荐(0)
摘要:Models Controlls Views 示例网站 阅读全文
posted @ 2015-10-27 07:17 gobuild 阅读(193) 评论(0) 推荐(0)
摘要:Controller [ValidateAntiForgeryToken] [HttpPost] public ActionResult Index(FormCollection focm) { string name = focm["Name"]; ViewBag.Message ... 阅读全文
posted @ 2015-10-27 05:02 gobuild 阅读(178) 评论(0) 推荐(0)
摘要://Student.cspublic int Id{get;set;}public string name{get;set;} //SchoolContext.cspublic class SchoolContext : DbContext{public SchoolContext(): base(... 阅读全文
posted @ 2015-10-25 00:09 gobuild 阅读(359) 评论(0) 推荐(0)
摘要:程序包管理控制台:敲入Enable-Migrations;修改:AutomaticMigrationsEnabled = true;Global.asax中添加:Database.SetInitializer(new MigrateDatabaseToLatestVersion()) ; 阅读全文
posted @ 2015-10-24 23:53 gobuild 阅读(250) 评论(0) 推荐(0)
摘要:创建学生实体在 Models 文件夹中,创建 Student.cs 类,添加代码:publicint StudentID { get; set; } publicstring LastName { get; set; } publicstring FirstMidName { get; set; }... 阅读全文
posted @ 2015-10-23 20:01 gobuild 阅读(262) 评论(0) 推荐(0)