上一页 1 2 3 4 5 6 ··· 10 下一页
摘要: 1.在DAL项目里新建类文件,命名为DbHelperSQL,本类放数据库访问的常用方法。 2.为DAL项目添加System.Configuration引用。对着项目下的引用点右键--选添加引用。打开下图。。选择。 3.添加 引入命名空间 using System.Configuration; usi 阅读全文
posted @ 2016-06-06 13:35 chenglingr 阅读(341) 评论(0) 推荐(0) 编辑
摘要: 1.对着Model项目名点右键,选择,添加类。 2.新建类-userinfo 3.编写userinfo类的代码 根据数据库字段设计类,每个数据库字段对应一个类的字段。然后,为每一个字段编写一个公有属性。注意类要设置为public的。 using System; namespace Model { / 阅读全文
posted @ 2016-06-06 13:34 chenglingr 阅读(636) 评论(0) 推荐(0) 编辑
摘要: ATM项目--三层结构-项目框架搭建 1. 新建三个类库项目和一个窗体应用程序 . (1)Model 文件-新建--项目 打开下图,创建Model类库项目 (2)DAL 对着解决方案名,点右键,选添加--新建项目 打开下图,创建DAL类库项目 (3)BLL 同第二步的方法,即对着解决方案名点右键 选 阅读全文
posted @ 2016-06-06 13:32 chenglingr 阅读(435) 评论(0) 推荐(0) 编辑
摘要: https://github.com/chenglingr/ATM-WinForm 1. 打开sqlserver创建数据库,命名为ATM 2. 数据表结构如下: 3. 执行下面的代码创建数据表 if exists (select * from sysobjects where id = OBJECT 阅读全文
posted @ 2016-06-06 13:31 chenglingr 阅读(294) 评论(0) 推荐(0) 编辑
摘要: 1.在ViewModels下新建类IndexViewModel public class IndexViewModel { public List<Models.Account> Accounts { get; set; } public List<Models.Article> Articles 阅读全文
posted @ 2016-06-06 13:14 chenglingr 阅读(161) 评论(0) 推荐(0) 编辑
摘要: 1.在ArticleController里增加action,然后添加对应的视图 首页--Index 前台文章列表--IndexList 后台我的文章列表--MyIndexList 文章管理 ArticleList 添加引用: using PagedList; using System.Configu 阅读全文
posted @ 2016-06-06 13:13 chenglingr 阅读(156) 评论(0) 推荐(0) 编辑
摘要: 后台我的文章列表--MyIndexList 1.在ArticleController里编辑action--MyIndexList,然后编辑对应的视图 2.管理员-文章管理功能-ArticleList 3.文章编辑功能-Edit 5.文章删除功能-delete (1)编写一个js函数,放在 Scrip 阅读全文
posted @ 2016-06-06 13:13 chenglingr 阅读(144) 评论(0) 推荐(0) 编辑
摘要: 1.站点用户 站点分为三种用户:未登录用户、登陆用户、管理员(admin@qq.Com) 管理员导航条: 登陆用户导航条: 未登录用户导航条(只能浏览信息): 2.布局页设计 规划:设计两个布局页:MyLayout.cshtml、_LayoutUser.cshtml (1)应用MyLayout.cs 阅读全文
posted @ 2016-06-06 13:12 chenglingr 阅读(220) 评论(0) 推荐(0) 编辑
摘要: 1.在models下新建Article.cs 2.改造Account.cs 3.在controller下新建控制器Article (1)增加两action--限定需要登录才能打开 [Authorize] public ActionResult Add() { return View(); } [Ht 阅读全文
posted @ 2016-06-06 13:11 chenglingr 阅读(148) 评论(0) 推荐(0) 编辑
摘要: 1.实现Form认证 打开 Web.config文件,在System.Web部分,找到Authentication的子标签。如果不存在此标签,就在文件中添加Authentication标签。 设置Authentication的Mode为Forms,loginUrl设置为”Login”方法的URL < 阅读全文
posted @ 2016-06-06 13:10 chenglingr 阅读(157) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 ··· 10 下一页
生活在继续,我们需要活着