protected void Page_Load(object sender, EventArgs e) { ZwDAL.MyPowerDAL dal = new ZwDAL.MyPowerDAL(); TolistDataFun tolist = new TolistDataFun(); GridView1.DataSource = dal.listMyPower(); GridView1.DataBind(); }
public static List <MyPowerEntity> listMyPower(this MyPowerDAL myPowerDAL) { TolistDataFun.db = new DBHelper(); List <MyPowerEntity> list = new List <MyPowerEntity>(); string sql = "select * from MyPower where 1=1 "; TolistDataFun.db.PrepareSql(sql); list = TolistDataFun.Tolist <MyPowerEntity> (TolistDataFun.db.ExecQuery()); return(list); }