Hidistro.UI.Web/Admin/promotion/SelectProductToExchangeHandler.cs
(完整代码) 1KBusing System;
using System.Web;
using ControlPanel.Promotions;
namespace Hidistro.UI.Web.Admin.promotion
{
public class SelectProductToExchangeHandler : IHttpHandler
{
public void ProcessRequest(HttpContext context)
{
context.Response.ContentType = "text/plain";
try
{
int exchangeId = int.Parse(context.Request["id"].ToString());
string productIds = context.Request["products"].ToString();
string pNumbers = context.Request["pNumbers"];
string points = context.Request["points"];
string eachNumbers = context.Request["eachNumbers"];
if (PointExChangeHelper.AddProducts(exchangeId, productIds, pNumbers, points, eachNumbers))
{
context.Response.Write("{\"type\":\"success\",\"data\":\"添加商品成功\"}");
}
else
{
context.Response.Write("{\"type\":\"success\",\"data\":\"写数据库失败\"}");
}
}
catch (Exception exception)
{
context.Response.Write("{\"type\":\"error\",\"data\":\"" + exception.Message + "\"}");
}
}
public bool IsReusable
{
get
{
return false;
}
}
}
}
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。
