Beispiel #1
0
    public void LoadForm()
    {
        BLLQuestion objbll = new BLLQuestion();

        objbll.Id = (int)Session["ques_update"];
        List <BLLQuestion> objlist = new List <BLLQuestion>();

        objlist = objbll.Selectquestionbyid(objbll);
        if (objlist.Count > 0)
        {
            string answer_type = objlist[0].Answer_type;

            if (answer_type == "Objective")
            {
                ControlEnableTrue();
            }
            else
            {
                ControlEnableFalse();
            }
            cbanswertype.Text = answer_type;
            txttopic.Text     = objlist[0].Topic;
            txtquestion.Text  = objlist[0].Question;
            cblevel.Text      = objlist[0].Ques_level;

            cbnoofanswers.Text = objlist[0].No_of_answer;
            txta.Text          = objlist[0].Answer_a;
            txtb.Text          = objlist[0].Answer_b;
            txtc.Text          = objlist[0].Answer_c;
            txtd.Text          = objlist[0].Answer_d;
            string val = objlist[0].Correct_answer;
            if (val == "A")
            {
                rba.Checked = true;
            }
            else
            if (val == "B")
            {
                rbb.Checked = true;
            }
            else
            if (val == "C")
            {
                rbc.Checked = true;
            }
            else
            if (val == "D")
            {
                rbd.Checked = true;
            }
        }
    }