protected void skillCardButton3_Click(object sender, EventArgs e)
    {
        UserBO obj = new UserBO();

        obj.skillName = skillCard3.Text.Trim();
        clsBLL    dt        = new clsBLL();
        DataTable dataTable = dt.CourseContentBLL(obj);

        CoursesGrid.DataSource = dataTable;
        CoursesGrid.DataBind();
    }
        public void displayCourseData()
        {

            SqlConnection conn = new SqlConnection("Server=localhost\\SqlExpress;Database=Comp229Assign03;" + "Integrated Security=True");
            SqlCommand comm = new SqlCommand("select * from Comp229Assign03.[dbo].Courses;", conn);

            conn.Open();
            SqlDataReader reader = comm.ExecuteReader();

            while (reader.Read())
            {

                CoursesGrid.DataSource = reader;
                CoursesGrid.DataBind();
            }

            reader.Close();
            conn.Close();

        }
Exemple #3
0
 protected void LoadCourses()
 {
     CoursesGrid.DataSource = new StudentInformerWebApp.DAL.StudentInformerDbContext().Courses.ToArray();
     CoursesGrid.DataBind();
 }