protected void BtnSave_Click(object sender, EventArgs e) { int num = 0; if (this.txtHumanNumber.Text != "") { num = Convert.ToInt32(this.txtHumanNumber.Text); } Hashtable hashtable = new Hashtable(); hashtable.Add("RecordID", this.MeetingroomID.ToString()); hashtable.Add("MeetingRoom", SqlStringConstructor.GetQuotedString(this.txtMeetingRoom.Text)); hashtable.Add("CorpCode", SqlStringConstructor.GetQuotedString(this.CorpCode.ToString())); hashtable.Add("Location", SqlStringConstructor.GetQuotedString(this.txtLocation.Text)); hashtable.Add("HumanNumber", num.ToString()); hashtable.Add("ManagerCode", SqlStringConstructor.GetQuotedString(this.hdnUserCode.Value)); hashtable.Add("RelationMode", SqlStringConstructor.GetQuotedString(this.txtRelationMode.Text)); hashtable.Add("Content", SqlStringConstructor.GetQuotedString(this.txtContent.Text)); hashtable.Add("IsValid", SqlStringConstructor.GetQuotedString("y")); if (this.RecordId == 0) { if (ConferenceManage.AddBoardroom(hashtable) && this.Update() == 1) { this.JS.Text = "alert('保存成功!');window.returnValue=true;window.close();"; return; } this.JS.Text = "alert('保存失败!');"; return; } else { string where = " where RecordID = " + this.RecordId.ToString(); if (ConferenceManage.UpdBoardroom(hashtable, where) && this.Update() == 1) { this.JS.Text = "alert('保存成功!');window.returnValue=true;window.close();"; return; } this.JS.Text = "alert('保存失败!');"; return; } }