protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { DepartmentDao dao = new DepartmentDao(); list.DataSource = dao.GetAll(); list.DataBind(); } }
// Populate the GridView with data private void BindGrid() { // Get a DataTable object containing the catalog departments DepartmentDao dao = new DepartmentDao(); grid.DataSource = dao.GetAll(); // Bind the data bound controls to the data source grid.DataBind(); }
public void GetAllIntegrationTest() { var connection = TestSession.GetConnection(); connection.Open(); var selecteds = _tested.GetAll(connection); Assert.IsNotNull(selecteds); connection.Close(); }