コード例 #1
0
ファイル: WebForm1.aspx.cs プロジェクト: zhaowei05/Book
        protected void Page_Load(object sender, EventArgs e)
        {
            ZwDAL.MyPowerDAL dal = new ZwDAL.MyPowerDAL();

            TolistDataFun tolist = new TolistDataFun();

            GridView1.DataSource = dal.listMyPower();
            GridView1.DataBind();
        }
コード例 #2
0
ファイル: Tolist.cs プロジェクト: zhaowei05/Book
        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);
        }