using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using Models;
using LoveBLL;

namespace LoveWeb
{
    public partial class Review : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void Button1_Click(object sender, EventArgs e)
        {
            Label1.Text = Session["username"].ToString();
            if (Label1.Text != null)
            {
                Invitation invi = new Invitation();
                invi.Invi_title = btnInviTitle.Text.Trim();
                invi.Invi_contents = FCK_invi.Value;
                invi.Invi_time = System.DateTime.Now;
                //invi.Userid = Convert.ToInt32(Label1.Text);
                InvitationManager.AddInvi(invi);

                Response.Redirect("success.aspx");
            }
            else
            {
                Response.Write("<script>alert('请先登录！')</script>");
            }
        }
    }
}
