Exemplo n.º 1
0
 /// <summary>
 ///  绑定Staff信息的数据源
 /// </summary>
 private void BindSource(int start, string position)
 {
     if (position != null)
     {
         Staff staff = new Staff();
         staff.Staffionfo_position = position;
         StaffProvider provider = new StaffProvider();
         DataTable     table    = provider.Select(staff, start, this.ListPager1.PageSize);
         this.GridView1.DataSource = table.DefaultView;
         this.GridView1.DataBind();
     }
     else
     {
         StaffProvider provider = new StaffProvider();
         DataTable     table    = provider.GetAll(start, this.ListPager1.PageSize);
         this.GridView1.DataSource = table.DefaultView;
         this.GridView1.DataBind();
     }
 }