예제 #1
0
 private void Button4_Click(object sender, EventArgs e)
 {
     PageList <Product> pageList = ORMSupport.PageSelect <Product>()
                                   .AddOrder("ID", SortType.ASC)
                                   .AddSelectedListener(Result, dataGridView1.Name)
                                   .Select();
 }
예제 #2
0
        private void ExceAsync()
        {
            SqlParameter[] parameters = null;
            String         whereStr   = Where.Build(out parameters);

            Total = ORMSupport.Count(new T(), Where);
            if (Total == 0)
            {
                return;
            }
            String select = String.Format("select * from {0} {1} ",
                                          ORMUtils.GetTableName(typeof(T)), whereStr);
            String pageSelect = Page.BuildSql(select, Order);

            SqlHelper.BeginExecuteReader(pageSelect, parameters, AsyncResultCall);
        }
예제 #3
0
        private void Exce()
        {
            SqlParameter[] parameters = null;
            String         whereStr   = Where.Build(out parameters);

            Total = ORMSupport.Count(new T(), Where);
            if (Total == 0)
            {
                return;
            }
            String select = String.Format("select * from {0} {1}",
                                          ORMUtils.GetTableName(typeof(T)), whereStr);
            String        pageSelect = Page.BuildSql(select, Order);
            SqlDataReader dataReader = SqlHelper.ExecuteReader(pageSelect, parameters);
            List <T>      list       = ORMUtils.SetModelListValue <T>(dataReader);

            Rows = list;
            dataReader.Close();
        }
예제 #4
0
 private void showInfo()
 {
     PageList <BookInfo> bookList = ORMSupport.PageSelect <BookInfo>()
                                    .Select();
 }