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 UpdateClassInfo : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            string _ClassName = Request["ClassName"] == null ? "" : Request.Form["ClassName"];
            string _ParentId = Request["ParentId"] == null ? "0" : Request.Form["ParentId"];
            string _Intro = Request["Intro"] == null ? "" : Request.Form["Intro"];
            string _id = Request["id"] == null ? "0" : Request.Form["id"];
            MODEL.MClassInfo modelclass = new MODEL.MClassInfo();
            BLL.Models.MClassModels mss = new BLL.Models.MClassModels();
            modelclass.ClassName = _ClassName;
            modelclass.ParentId = Convert.ToInt32(_ParentId);
            modelclass.Intro = _Intro;
            modelclass.ID = Convert.ToInt32(_id);
            bool ret = mss.EditClassInfo(modelclass);

            string jsons = string.Empty;
            if (ret)
            {

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

            }
            else
            {

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