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 AddShip : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            string _id = Request["id"] == null ? "0" : Request["id"].ToString();
            string _Name = Request["Name"] == null ? "" : Request["Name"].ToString();
            string _Price = Request["Price"] == null ? "0" : Request["Price"].ToString();
            string _Intro = Request["Intro"] == null ? "" : Request["Intro"].ToString();
            string _Flag = Request["Flag"] == null ? "0" : Request["Flag"].ToString();
            MODEL.MEms model = new MODEL.MEms();
            model.Id = Convert.ToInt32(_id);
            model.Name = _Name;
            model.Intro = _Intro;
            model.Price = Convert.ToInt32(_Price);
            model.Flag = _Flag == "0" ? true : false;
            BLL.Models.MShipMModels mss = new BLL.Models.MShipMModels();
            bool ret = mss.AddShip(model);// mss.AddClassinfo(modelclass);
            string jsons = string.Empty;
            if (ret)
            {

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

            }
            else
            {

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