Ejemplo n.º 1
0
    protected void Button10_Click(object sender, EventArgs e)
    {
        string      strtitle = txtQtitle.Text.Trim();
        bool        Status   = bool.Parse(qstatus.SelectedValue);
        Model_QType q        = new Model_QType
        {
            Title  = strtitle,
            Status = Status
        };


        Button btn = (Button)sender;

        if (!string.IsNullOrEmpty(Request.QueryString["qt"]))
        {
            int bytID = int.Parse(Request.QueryString["qt"]);
            q.QTID = bytID;

            if (AssessmentController.EditQType(q))
            {
                Response.Redirect("Assessmentoptionaddedit?tab=3");
            }
        }
        else
        {
            if (AssessmentController.AddQtype(q) > 0)
            {
                Response.Redirect(Request.Url.ToString());
            }
        }
    }