private void BindDrop()
    {
        try
        {
            TeacherMsts       mst = new TeacherMsts();
            List <TeacherMst> obj = mst.FullDetails();

            ddlTeacher.DataTextField  = "FirstName";
            ddlTeacher.DataValueField = "TeacherID";
            ddlTeacher.DataSource     = obj;
            ddlTeacher.DataBind();
            ddlTeacher.Items.Insert(0, new ListItem("-Select-", "0"));

            CollegeMsts       mst1 = new CollegeMsts();
            List <CollegeMst> obj1 = mst1.FullDetails();

            ddlCollege.DataTextField  = "CollegeName";
            ddlCollege.DataValueField = "CollegeID";
            ddlCollege.DataSource     = obj1;
            ddlCollege.DataBind();
            ddlCollege.Items.Insert(0, new ListItem("-Select-", "0"));
        }
        catch (Exception ex)
        {
        }
    }
Esempio n. 2
0
    private void BindDrop()
    {
        try
        {
            TeacherMsts       msts     = new TeacherMsts();
            List <TeacherMst> Teachers = msts.FullDetails();

            ddlTeacher.DataTextField  = "FirstName";
            ddlTeacher.DataValueField = "TeacherID";
            ddlTeacher.DataSource     = Teachers;
            ddlTeacher.DataBind();
            ddlTeacher.Items.Insert(0, new ListItem("-Select-", "0"));

            StateMsts       mst = new StateMsts();
            List <StateMst> obj = mst.FullDetails();

            ddlstate.DataTextField  = "State_Name";
            ddlstate.DataValueField = "StateID";
            ddlstate.DataSource     = obj;
            ddlstate.DataBind();
            ddlstate.Items.Insert(0, new ListItem("-Select-", "0"));

            DepMsts       msts2 = new DepMsts();
            List <DepMst> obj1  = msts2.FullDetails();

            ddldepartment.DataTextField  = "Dept_Name";
            ddldepartment.DataValueField = "Dept_ID";
            ddldepartment.DataSource     = obj1;
            ddldepartment.DataBind();
            ddldepartment.Items.Insert(0, new ListItem("-Select-", "0"));
        }
        catch (Exception ex)
        {
        }
    }
Esempio n. 3
0
    private void BindGridView()
    {
        TeacherMsts       msts     = new TeacherMsts();
        List <TeacherMst> Teachers = msts.FullDetails();

        grdTeacherInfo.DataSource = Teachers;
        grdTeacherInfo.DataBind();
    }