Esempio n. 1
0
        private void StudentFill()
        {
            StudentMasterBuss    Obj_Stu = new StudentMasterBuss();
            List <StudentMaster> Obj_St  = Obj_Stu.GetStudents();

            if (Obj_St != null && Obj_St.Count > 0)
            {
                grd.DataSource = Obj_St;
                grd.DataBind();
            }
            else
            {
                grd.DataSource = null;
                grd.DataBind();
            }
        }
Esempio n. 2
0
        private void StudentDropDownFill()
        {
            StudentMasterBuss    Obj_St      = new StudentMasterBuss();
            List <StudentMaster> Obj_Stds_ID = Obj_St.GetStudents();

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