这里MVC中用到了反射,工厂,泛型,接口 在搭建框架的时候,除了MVC的三层以外,还有泛型的接口层和工厂层 下面是dal层调用sql存储过程,增删改查,dal层继承了接口层,实现了接口层里面的方法 1 namespace DAL 2 { 3 public class DalHouse : IHouse 4 { 5 public int Add(HouseInfo m) 6 { 7 string sql = "pro_add"; 8 SqlParameter eid = new SqlP…
//这个是分页数据和总页数类 public class SummaryBase<TModel> { public SummaryBase(); public IList<TModel> Collection { get; set; } public int TotalCount { get; set; } } //查询学校数据分页 BM.Criteria.SchoolDataCriteria 这个是条件类,根据自己的需求定义 public static SummaryBase&l…
SQLite数据库的常用操作: create table if not exists 表名(字段1 类型(长度),字段2 类型(长度),...)// 建表 drop table if exists 表名//删除表 insert into 表名 (字段1,字段2,字段3 ...) values (值1,值2,值3 ...);//增 insert into 目标数据表 select * from 源数据表; delete from 表名 where 条件表达式// 删 update 表名…
控制器 ---------------------GoodsController.class.php------------------------------------------------- <?php namespace Admin\Controller; use Think\Controller; class GoodsController extends Controller{ public function showlist1(){ // $goods=new GoodsMode…