Example #1
0
        private void GetStudents()
        {
            site = new DBSite();
            StudentBll stBll = new StudentBll();

            string classIDs = ddlPresentClass.SelectedValue;



            //try
            {
                // List<StudentBll.StudenEntity>  students = stBll.GetStudents(site);
                List <StudentBll.StudenEntity> students = stBll.GetStudentsByClass(site, "", classIDs);
                //total_records = students.Count;
                gridView1.DataSource = students;
                gridView1.DataBind();
            }
            //catch (Exception exception)
            //{
            //    util.HandleExpception(exception, Response);
            //}
            //finally
            //{
            //    site.Close();
            //}
        }
Example #2
0
        protected void GetStudents()
        {
            StudentBll sBll = new StudentBll();
            //StudentBll.StudenEntity st = sBll.GetStudents(site, util.CheckNullInt(lblStudentMasterId.Text));
            List <StudentBll.StudenEntity> st = sBll.GetStudentsByClass(site, "", GetSelectedIds(gridView2, 1));

            gridView1.DataSource = st;
            gridView1.DataBind();
        }
        protected void GetStudentsByClass()
        {
            ddlStudent.Items.Clear();

            site = new DBSite();
            StudentBll stBLL = new StudentBll();
            List <StudentBll.StudenEntity> studentList = stBLL.GetStudentsByClass(site, "", ddlClass.SelectedValue);

            foreach (StudentBll.StudenEntity st in studentList)
            {
                ddlStudent.Items.Add(new ListItem(st.StudentName, st.StudentMasterId.ToString()));
            }
        }