Example #1
0
        /// <summary>
        /// 更新游戏
        /// </summary>
        /// <param name="id"></param>
        /// <param name="collection"></param>
        /// <returns></returns>
        public ActionResult UpdateProductType(int id, FormCollection collection)
        {
            String      Description = collection.Get("Description");
            String      Name        = collection.Get("ProductTypeName");
            ProductType info        = new ProductType();

            info.ID = id;
            info.ProductTypeName = Name;
            info.Description     = Description;
            Message msg;

            if (productTypeBLL.UpdateProductType(info))
            {
                msg = new Message(true, "修改成功!");
            }
            else
            {
                msg = new Message(false, "修改失败!");
            }
            JavaScriptSerializer json = new JavaScriptSerializer();

            return(Content(json.Serialize(msg), "text/html;charset=UTF-8"));
        }