Пример #1
0
        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
        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);
        }