三层架构实现增删的简单实例
2012-05-29 10:10
316 查看
首先建一个web.config的窗体,添加 <appSettings> <add key="conn" value="server=.;database=test;integrated security=true"/> </appSettings> <connectionStrings/>字段
简单页面设计:
显示层
Bll.Bll_class BC; protected void Page_Load(object sender, EventArgs e) { BC = new BLL.BLL_Class(); this.GridView1.DataSource = BC.Bind(); this.GridView1.DataBind(); } //添加 protected void Button1_Click(object sender, EventArgs e) { BC.ID = Convert.ToInt32(TextBox1.Text.Trim().ToString()); BC.Age = Convert.ToInt32(TextBox2.Text); BC.Name = this.TextBox4.Text; BC.Sex = this.TextBox3.Text; BC.Insert_info(); } 删除 protected void Button2_Click(object sender, EventArgs e) { BC.Sid = Convert.ToInt32(TextBox1.Text.Trim().ToString()); BC.Delete_info(); }
相关文章推荐
- 温故而知新---浅析三层架构(一个超简单的系统登录三层架构实例)
- asp.net 2.0 三层架构的实现(最最原始,简单,一般, 但不平凡)
- 三层架构简单实例【转】
- 利用XML配置实现增删改查的.net快速开发架构 简单的构建信息管理系统架构
- EF5+MVC4系列(6) 简单三层的搭配(泛型) 实现 增删改查
- 四种php中webservice实现的简单架构方法及实例
- 一般处理程序加简单三层实现增删查改(1)
- asp.net 2.0 三层架构的实现(最最原始,简单,一般, 但不平凡)用通俗的语言说出难以理解的。。。
- 运用Unity实现依赖注入[结合简单三层实例]
- 迎接2012之三层架构基于JQuery Ui实现增删改查完整设计
- 原:使用objectdatasource进行简单三层架构的开发 , 并实现Repeater现删改查
- “步步精心”——三层架构下GridView控件实现增删改查
- SpringMVC教程/实例(三):java SpringMVC之REST实现简单的增删改查CRUD
- 分享php中四种webservice实现的简单架构方法及实例
- 四种php中webservice实现的简单架构方法及实例
- 一般处理程序加简单三层实现增删查改(2)
- MyBatis代码实例系列-03:MyBatis单张表简单实现增删改查 + log4j + 手动事务控制
- 一般处理程序加简单三层实现增删查改(2)
- ASP.NET MVC 4 插件化架构简单实现-实例篇
- MVC项目实践,在三层架构下实现SportsStore-11,使用Knockout实现增删改查