using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Mall.MCScriptManageServices
{
    public partial class AddArticle : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            //"ID", "Name", "Classid", "Content", "flag", "istj"
            string _ID = Request["ID"] == null ? "0" : Request["ID"].ToString();
            string _Name = Request["Name"] == null ? "" : Request["Name"].ToString();
            string _Classid = Request["Classid"] == null ? "0" : Request["Classid"].ToString();
            string _Content = Request["Content"] == null ? "" : Request["Content"].ToString();
            string _flag = Request["flag"] == null ? "0" : Request["flag"].ToString();
            string _istj = Request["istj"] == null ? "0" : Request["istj"].ToString();
            MODEL.MArticle model = new MODEL.MArticle();
            model.ID = Convert.ToInt32(_ID);
            model.Name = _Name;
            model.Classid = Convert.ToInt32(_Classid);
            model.Content = _Content.Replace("\r\n", "</br>").Replace("\r", "").Replace("\n", "");
            model.Flag = Convert.ToInt32(_flag);
            model.Istj = Convert.ToInt32(_istj);
            BLL.Models.MArticleModels mas = new BLL.Models.MArticleModels();


            bool ret = mas.AddArticle(model);// mss.AddShip(model);// mss.AddClassinfo(modelclass);
            string jsons = string.Empty;
            if (ret)
            {

                jsons = "{success:'true'}";

            }
            else
            {

                jsons = "{success:'false'}";
            }
            Response.Write(jsons);


        }
    }
}