using System;
using System.Data;
using System.Web;
using System.Web.UI;
using BoyunBase;
using SiteCore;

public partial class Part_ClientMessage : System.Web.UI.UserControl
{
    protected void Page_Load( object sender, EventArgs e )
    {
    }

    protected void btnSutmit_Click( object sender, EventArgs e )
    {
        try {
            // 获取用户填写的信息
            string title = tbTitle.Value.Trim();
            string email = tbEmail.Value.Trim();
            string cont = tbContent.Value.Trim();
            if( cont == "" ) return;

            // 存储填写的信息
            string columnValue = title + "," + email + "," + cont;
            ContentAccess ca = new ContentAccess( this, "TableName" );
            bool isOK = ca.Write( "[*]", "Title,eMail,Content", columnValue );

            // 清空控件文本
            tbTitle.Value = "";
            tbEmail.Value = "";
            tbContent.Value = "";

        } catch( Exception ex ) {
            Todo.DebugOut( "加载 Part_ClientMessage 出现异常:" + ex.Message );
        }
    }
}
