protected void BtnSave_Click(object sender, EventArgs e) { Hashtable hashtable = new Hashtable(); hashtable.Add("MeetingRoomID", this.hdnMeetinRoomID.Value); hashtable.Add("HumanNumber", this.txtHumanNumber.Text); hashtable.Add("Title", SqlStringConstructor.GetQuotedString(this.txtTitle.Text)); hashtable.Add("UserCode", SqlStringConstructor.GetQuotedString(this.hdnUserCode.Value)); hashtable.Add("UserDate", SqlStringConstructor.GetQuotedString(this.dbUserDate.Text)); hashtable.Add("BeginHour", this.ddltBeginHour.SelectedValue.ToString()); hashtable.Add("BeginMinute", this.ddltBeginMinute.SelectedValue.ToString()); hashtable.Add("EndHour", this.ddltEndHour.SelectedValue.ToString()); hashtable.Add("EndMinute", this.ddltEndMinute.SelectedValue.ToString()); hashtable.Add("Content", SqlStringConstructor.GetQuotedString(this.txtContent.Text)); hashtable.Add("State", "0"); if (this.RecordId == 0) { int applyRecordId = 0; object obj = ConferenceManage.AddApplyInfo(hashtable); if (obj != null) { applyRecordId = Convert.ToInt32(obj); } if (this.UpdateApplyEquipment(applyRecordId)) { this.JS.Text = "alert('保存成功!');window.returnValue='" + applyRecordId.ToString() + "';window.close();"; return; } this.JS.Text = "alert('保存失败!');"; return; } else { string where = " where RecordID = " + this.RecordId.ToString(); if (ConferenceManage.UpdApplyInfo(hashtable, where) && this.UpdateApplyEquipment(this.RecordId)) { this.JS.Text = "alert('保存成功!');window.returnValue='" + this.RecordId.ToString() + "';window.close();"; return; } this.JS.Text = "alert('保存失败!');"; return; } }