Example #1
0
        /// <summary>
        /// 详情
        /// </summary>
        /// <param name="context"></param>
        /// <returns></returns>
        private string getDataDetail(HttpContext context)
        {
            string id = "";

            if (context.Request.Params["id"] != null)
            {
                id = context.Request.Params["id"];
            }
            WK.BLL.bus_image   bll   = new WK.BLL.bus_image();
            WK.Model.bus_image model = bll.GetModel(int.Parse(id));
            return(Newtonsoft.Json.JsonConvert.SerializeObject(model));
        }
Example #2
0
        /// <summary>
        /// 删除
        /// </summary>
        /// <param name="context"></param>
        /// <returns></returns>
        private string deleteData(HttpContext context)
        {
            ReturnInfo returnInfo = new ReturnInfo();

            returnInfo.isSuccess = false;
            WK.BLL.bus_image bll = new WK.BLL.bus_image();
            int id = int.Parse(context.Request.Params["id"]);

            if (id > 0)
            {
                WK.Model.bus_image model = bll.GetModel(id);
                model.is_delete      = 1;
                returnInfo.isSuccess = bll.Update(model);
            }

            return(Newtonsoft.Json.JsonConvert.SerializeObject(returnInfo));
        }