Example #1
0
    public void SelectStudentlnfo()
    {
        List <BLLStudentInfo> objlist = new List <BLLStudentInfo>();
        BLLStudentInfo        objbll  = new BLLStudentInfo();

        objlist = objbll.SelectStudentInfo();
        if (objlist.Count > 0)
        {
            dgstudentinfo.DataSource = objlist;
            dgstudentinfo.DataBind();
            for (int i = 0; i <= dgstudentinfo.Rows.Count - 1; i++)
            {
                string update = (string)Session["update"];
                string delete = (string)Session["delete"];
                if (update == "yes")
                {
                    dgstudentinfo.Rows[i].Cells[1].Enabled = true;
                }
                else
                {
                    dgstudentinfo.Rows[i].Cells[1].Enabled = false;
                }
                if (delete == "yes")
                {
                    dgstudentinfo.Rows[i].Cells[2].Enabled = true;
                }
                else
                {
                    dgstudentinfo.Rows[i].Cells[2].Enabled = false;
                }
            }
        }
    }
Example #2
0
    public void SelectRollno()
    {
        List <BLLStudentInfo> objlist = new List <BLLStudentInfo>();
        BLLStudentInfo        objbll  = new BLLStudentInfo();

        objlist = objbll.SelectStudentInfo();
        if (objlist.Count > 0)
        {
            cbrollno.DataSource = objlist;
            cbrollno.ValueField = "rollno";
            cbrollno.TextField  = "rollno";
            cbrollno.DataBind();
        }
    }