Beispiel #1
0
        private void btnNext_ServerClick(object sender, EventArgs e)
        {
            string strGeneration = "";

            if (rb1.Checked == true)
            {
                strGeneration = "Edit";
            }
            else
            {
                strGeneration = "Present";
            }

            //加入Session
            if (Session["PresentType"] != null)
            {
                Session["PresentType"] = strGeneration;
            }
            else
            {
                Session.Add("PresentType", strGeneration);
            }

            //修改到資料庫
            string strSQL = "UPDATE Paper_Header SET cGenerationMethod = '" + strGeneration + "' " +
                            "WHERE cPaperID = '" + strPaperID + "' ";

            sqldb.ExecuteNonQuery(strSQL);

            if (strGeneration == "Edit")
            {
                Response.Redirect("Paper_QuestionMode.aspx");
            }
            else
            {
                //Response.Redirect("./QuestionGroupTree/QuestionGroupTree.aspx");  // modified by dolphin @ 2006-07-29, new Question Group Tree
                Response.Redirect("./QuestionGroupTree/QGroupTree.aspx");
            }
        }