예제 #1
0
    protected void BtnSave_Click(object sender, EventArgs e)
    {
        Hashtable hashtable = new Hashtable();

        hashtable.Add("ClassID", this.ClassID.ToString());
        hashtable.Add("TempletName", SqlStringConstructor.GetQuotedString(this.txtTemplateName.Text));
        hashtable.Add("Content", SqlStringConstructor.GetQuotedString(this.txtContent.Text));
        if (this.TemplateID == 0)
        {
            if (ConferenceManage.AddMeetingTemplate(hashtable))
            {
                this.JS.Text = "alert('保存成功!');window.returnValue=true;window.close();";
                return;
            }
            this.JS.Text = "alert('保存失败!');";
            return;
        }
        else
        {
            string where = " where RecordID = " + this.TemplateID.ToString();
            if (ConferenceManage.UpdMeetingTemplate(hashtable, where))
            {
                this.JS.Text = "alert('保存成功!');window.returnValue=true;window.close();";
                return;
            }
            this.JS.Text = "alert('保存失败!');";
            return;
        }
    }