Web/App/shop/updatefoodstate.aspx.cs
(完整代码) 1KBusing System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Text;
using WMPT.Model;
using WMPT.SQLServerDAL;
using WMPT.Common;
/// <summary>
/// 上架下架商品
/// </summary>
public partial class App_shop_updatefoodstate : System.Web.UI.Page
{
Foodinfo dal = new Foodinfo();
protected void Page_Load(object sender, EventArgs e)
{
Response.Clear();
string ids = WebUtility.InputText(Request["id"]); //多个用逗号分分开
string state = HjNetHelper.GetQueryString("state");//y表示上架,n表示下架
string rs = "{\"state\":\"1\",\"msg\":\"操作成功\"}";
if (ids == "")
{
rs = "{\"state\":\"-2\",\"msg\":\"参数不完整\"}";
Response.Write(rs);
Response.End();
return;
}
if (dal.UpdateValue("InUse", state, "where unid in (" + WebUtility.dellast(ids) + ")") > 0)
{
rs = "{\"state\":\"1\",\"msg\":\"操作成功\"}";
}
else
{
HJlog.toLog("上架下架商品失败:ids" + ids);
rs = "{\"state\":\"-1\",\"msg\":\"操作失败\"}";
}
Response.Write(rs);
Response.End();
}
}
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。
