ÔÚÏß¿¼ÊÔϵͳ±ÏÒµÂÛÎÄ(Èí¼þ¹¤³ÌÍêÕû°æ) ÏÂÔØ±¾ÎÄ

sender,EventArgs e) {

if(TreeView1.SelectedNode.Text==\Í˳öϵͳ\) {

Response.Write(\

language=javascript>window.close();location=\)'\); } } }

BÀàÊÔÌâÌí¼ÓÄ£¿é

Ñ¡ÔñÍ꿼ÊÔÊÔÌâËùÊôרҵ¡¢¿Î³Ì¼°Ì×Ìâºó £¬½øÈëÊÔÌâÌí¼ÓÒ³Ãæ¡£Éè¼ÆÐ§¹û½«ÈçÏÂËùʾ£º

´úÂëΪ£º

using System.Data.SqlClient:

public partial class HouAdmin_InsertShiTi:System.Web.UI.Page {

Datacon dataconn=new Dataconn();

protected void Page_Load(object sender,EventArgs e) {

if(ddlType.SelectedIndex==0) {

Panel.Visible=true; Pane2.Visible=false;

32

} else {

Panel.Visible=false; Panel.Visible=true; } }

protected void btnAdd_Click(object sender,EventArgs e) {

string sstr1=Session[\].ToString(); string sstr2=Session[\].ToString(); string sstr3=Session[\].ToString(); if(ddlType.SelectedIndex==0) {

dataconn.eccom(\

\ ,optionB,optionC,optionD,que_answer,note)\

+\+sstr1+\+sstr2+\+sstr3+\+this.txtExamTitle.Text

+\+ddlType.Text+\+this.txtExamA.Text+\+this.txtExamB.Text +\+this.txtExamC.Text+\+this.txtExamD.Text+\ +ddlAnswer.Text+\+txtInstructon.Text+\);

//Response.Write(\Ìí¼Ó³É¹¦£¡¡®£©

£ºlocation=¡¯kaoshi_timu.aspx'\ Response.Redirect(\ } else {

if(cb1Answer.Items[0].Selected==true&&cblAnswer.Items[1].Selected==true

&&cblAnswer.Items[2].selected==true&&cblAnswer.Item[3].Selected==true)

{

string str1=\;

dataconn.eccom(\ +

\ optionD,que_answeer,note)\

33

+\sstr1+\+sstr2+\+sstr3+\+ this.txtExamTitle.Text

+\+this.txtExamA.Text+\+this.txtExamB.Text+\

+this.txtExamC.Text+\+this.txtExamD.Text+\+str1 +\+txtInstructiobn.Text+\); Response.Redirect(\); }

if(cblAnswer.Items[0].Selected==true&&cblAnswer.Items[1].Selected==true&&

cblAnswer.Items[2].Selected==true&&cblAnswer.Items[3].Selected==false)

{

string str2=\;

dataconn.eccom(\ \£¬

que_lessonid,que_taotiid,que_subject,que_type,optionA,optionB,optionC,

optionD,que_answer,note)\

+\+sstr1+\+sstr2+\+sstr3+\+ this.txtExamTitle.Text

+\+ddlType.Text+\+this.txtExamA.Text+\+this.txtExamB.Text+\+this.txtExamC.Text+\

this.txtExamD.Text+\+str2+\+txtInstruction.Text+\); Response.Redirect(\); }

if(cblAnswer.Items[0].Selected==true&&cblAnswer.Items[1].Selected==true&&

cblAnswer.Items[2].Selected==false&&cblAnswer.Items[3].Selected==false)

{

string str3=\;

dataconn.eccom(\ \£¬

que_lessonid,que_taotiid,que_subject,que_type,optionA,optionB,optionC,

optionD,que_answer,note)\

34

+\+sstr1+\+sstr2+\+sstr3+\+ this.txtExamTitle.Text

+\+ddlType.Text+\+this.txtExamA.Text+\+this.txtExamB.Text+\+this.txtExamC.Text+\

this.txtExamD.Text+\+str3+\+txtInstruction.Text+\); Response.Redirect(\); }

if(cblAnswer.Items[0].Selected==true&&cblAnswer.Items[1].Selected==true&&

cblAnswer.Items[2].Selected==false&&cblAnswer.Items[3].Selected==false)

{ string str4=\;

dataconn.eccom(\ \£¬

que_lessonid,que_taotiid,que_subject,que_type,optionA,optionB,optionC,

optionD,que_answer,note)\

+\+sstr1+\+sstr2+\+sstr3+\+ this.txtExamTitle.Text

+\+ddlType.Text+\+this.txtExamA.Text+\+this.txtExamB.Text+\+this.txtExamC.Text+\

this.txtExamD.Text+\+str4+\+txtInstruction.Text+\); Response.Redirect(\); }

if(cblAnswer.Items[0].Selected==true&&cblAnswer.Items[1].Selected==true&&

cblAnswer.Items[2].Selected==false&&cblAnswer.Items[3].Selected==false)

{

string str5=\;

dataconn.eccom(\ \£¬

que_lessonid,que_taotiid,que_subject,que_type,optionA,optionB,optionC,

optionD,que_answer,note)\

35