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)
        {
        }
    }
Example #2
0
    private void BindGridView()
    {
        CollegeMsts       msts    = new CollegeMsts();
        List <CollegeMst> Collage = msts.FullDetails();

        grdTeacherInfo.DataSource = Collage;
        grdTeacherInfo.DataBind();
    }
Example #3
0
    private void BindControl()
    {
        CollegeMsts msts    = new CollegeMsts();
        CollegeMst  collmst = msts.Details(Convert.ToInt32(Request.QueryString["EID"].ToString()));

        txtCollName.Text       = collmst.CollegeName;
        txtDetails.Text        = collmst.CollegeDesc;
        ddlstate.SelectedValue = collmst.StateID.ToString();
    }
Example #4
0
    protected void makelink_delete(object sender, EventArgs e)
    {
        string strparm = (sender as ImageButton).CommandArgument;

        CollegeMsts msts   = new CollegeMsts();
        String      strerr = msts.DeleteColl(Convert.ToInt32(strparm));

        BindGridView();
    }
Example #5
0
    protected void btnUpdate_Click(object sender, EventArgs e)
    {
        try
        {
            CollegeMst mst = new CollegeMst();
            mst.CollegeID   = Convert.ToInt32(Request.QueryString["EID"].ToString());
            mst.CollegeName = txtCollName.Text.Trim();
            mst.CollegeDesc = txtDetails.Text.Trim();
            mst.StateID     = Convert.ToInt32(ddlstate.SelectedValue.Trim());


            CollegeMsts cooldata = new CollegeMsts();
            String      strerr   = cooldata.EditColl(mst);
            if (strerr == "0")
            {
                Response.Redirect("~/College/CollegeDetails", false);
            }
        }
        catch (Exception ex)
        {
        }
    }
Example #6
0
    protected void btnCreate_Click(object sender, EventArgs e)
    {
        try
        {
            CollegeMst mst = new CollegeMst();

            mst.CollegeName = txtCollege.Text.Trim();
            mst.CollegeDesc = txtDetails.Text.Trim();

            mst.StateID = Convert.ToInt32(ddlstate.SelectedValue.Trim());


            CollegeMsts Colldata = new CollegeMsts();
            String      strerr   = Colldata.CreateColl(mst);
            if (strerr == "0")
            {
                Response.Redirect("~/CollegeJoining/CJDetails", false);
            }
        }
        catch (Exception ex)
        {
        }
    }