예제 #1
0
        private void Course_Fill()
        {
            Course_Bussiness Obj_Course = new Course_Bussiness();
            List <Course>    Obj_Cour   = Obj_Course.GetCourses();

            if (Obj_Cour != null && Obj_Cour.Count > 0)
            {
                grd.DataSource = Obj_Cour;
                grd.DataBind();
            }
            else
            {
                grd.DataSource = null;
                grd.DataBind();
            }
        }
예제 #2
0
        private void CourseFill()
        {
            Course_Bussiness Obj_Teach     = new Course_Bussiness();
            List <Course>    Obj_Course_ID = Obj_Teach.GetCourses();

            if (Obj_Course_ID != null && Obj_Course_ID.Count > 0)
            {
                for (int i = 0; i < Obj_Course_ID.Count; i++)
                {
                    ddl_Course.Items.Add(Obj_Course_ID[i].ID.ToString());
                }
                ddl_Course.Items.Insert(0, new ListItem("Select Course", " "));
            }
            else
            {
                ddl_Course.Items.Clear();
            }
        }