Ejemplo n.º 1
0
    protected void gvQuestionList_PageIndexChanging(object sender, GridViewPageEventArgs e)
    {
        gvQuestionList.PageIndex = e.NewPageIndex;

        obj_QuesEntry_BLogic = new QuesEntry_BLogic();

        DataSet ds = new DataSet();

        ds = obj_QuesEntry_BLogic.BAL_Question_Select(Convert.ToInt32(ddlbms.SelectedValue), Convert.ToInt32(ddlsct.SelectedValue), ddllevel.Text, ddlquestype.Text);
        //ds.Tables.Add(dt);
        gvQuestionList.DataSource = ds;
        gvQuestionList.DataBind();
    }
Ejemplo n.º 2
0
    protected void btnview_Click(object sender, EventArgs e)
    {
        dvviewquestions.Visible = true;
        dvquesdetails.Visible   = false;
        obj_QuesEntry_BLogic    = new QuesEntry_BLogic();

        DataSet ds = new DataSet();

        ds = obj_QuesEntry_BLogic.BAL_Question_Select(Convert.ToInt32(ddlbms.SelectedValue), Convert.ToInt32(ddlsct.SelectedValue), ddllevel.Text, ddlquestype.Text);
        //ds.Tables.Add(dt);
        gvQuestionList.DataSource = ds;
        gvQuestionList.DataBind();
    }
Ejemplo n.º 3
0
    private void SaveQues()
    {
        Int32  bmsid    = Convert.ToInt32(ddlBMSList.SelectedValue);
        Int32  sctid    = Convert.ToInt32(ddlSCTList.SelectedValue);
        string Question = string.Empty;

        Question = Ques.InnerText.ToString();
        Int16  op1     = 1;
        string option1 = string.Empty;

        option1 = TxtAnswer1.Text;

        Int16  op2     = 2;
        string option2 = string.Empty;

        option2 = TxtAnswer2.Text;

        Int16  op3     = 3;
        string option3 = string.Empty;

        option3 = TxtAnswer3.Text;

        Int16  op4     = 4;
        string option4 = string.Empty;

        option4 = TxtAnswer4.Text;

        Int16  copid = 0;
        string cans  = string.Empty;

        if (RbOption1.Checked)
        {
            copid = 1;
            cans  = TxtAnswer1.Text;
        }
        else if (RbOption2.Checked)
        {
            copid = 2;
            cans  = TxtAnswer2.Text;
        }
        else if (RbOption3.Checked)
        {
            copid = 3;
            cans  = TxtAnswer3.Text;
        }
        else if (RbOption4.Checked)
        {
            copid = 4;
            cans  = TxtAnswer4.Text;
        }

        string sol = string.Empty;

        sol = TxtSolution.InnerText.ToString();

        int Qlevel = Convert.ToInt16(ddlQuesLevel.SelectedValue);

        string QType = string.Empty;

        QType = ddlQuesTypeList.SelectedValue.ToString();

        // insert Function

        obj_QuesEntry_BLogic = new QuesEntry_BLogic();
        obj_QuesEntry_BLogic.BAL_Question_Insert(bmsid, sctid, Question, op1, option1, op2, option2, op3, option3, op4, option4, copid, cans, sol, Qlevel, QType);
        ClearQuesEntryFields();
    }