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.Admin
{
    public partial class soulViewManager : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void Button1_Click(object sender, EventArgs e)
        {
             Article  arti = new Article();
            arti.Arti_title = btntitle.Text;
            arti.Arti_contents = FCKeditor1.Value;
            arti.Userid = Convert.ToInt32(DropDownList2.SelectedIndex.ToString());
            arti.Arti_codeid = Convert.ToInt32(DropDownList1.SelectedIndex.ToString());
            arti.Arti_time = Convert.ToDateTime(arti_time.Text.ToString()); 
            bool checkAdd=ArticleManager.AddArti(arti);
            if (checkAdd)
            {
                Response.Write("<script>alert('添加文章成功！');</script>");
                btntitle.Text = "";

                arti_time.Text = "";
                FCKeditor1.Value = "";
                Response.Redirect("~/Admin/soulViewManager.aspx");
            }
            else
            {
                Response.Write("<script>alert('添加文章失败！')</script>");
            }
        }
        }
    }

