Hidistro.UI.Web/Admin/promotion/SaveActivityHandler.cs
(开头部分) 10KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Collections.Generic;
using System.Web;
using ControlPanel.Promotions;
using Hidistro.Entities;
using Hidistro.Entities.Promotions;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
namespace Hidistro.UI.Web.Admin.promotion
{
public class SaveActivityHandler : IHttpHandler
{
public void ProcessRequest(HttpContext context)
{
context.Response.ContentType = "text/plain";
try
{
int id = int.Parse(context.Request["id"].ToString());
string str = context.Request["name"].ToString();
string val = context.Request["begin"].ToString();
string str3 = context.Request["end"].ToString();
string str4 = context.Request["memberlvl"].ToString();
string str5 = context.Request["maxNum"].ToString();
string str6 = context.Request["type"].ToString();
string str7 = context.Request["attendType"].ToString();
string str8 = context.Request["meetType"].ToString();
int i = 0;
int num3 = 0;
DateTime now = DateTime.Now;
DateTime time2 = DateTime.Now;
int num4 = 0;
int num5 = 0;
if (str.Length > 30)
{
context.Response.Write("{\"type\":\"error\",\"data\":\"活动名称不能超过30个字符\"}");
}
else if (!val.bDate(ref now))
{
context.Response.Write("{\"type\":\"error\",\"data\":\"请输入正确的开始时间\"}");
}
else if (!str3.bDate(ref time2))
{
context.Response.Write("{\"type\":\"error\",\"data\":\"请输入正确的结束时间\"}");
}
else if (time2 < now)
{
context.Response.Write("{\"type\":\"error\",\"data\":\"结束时间不能早于开始时间\"}");
}
else if (string.IsNullOrEmpty(str4))
{
context.Response.Write("{\"type\":\"error\",\"data\":\"请选择适用会员等级\"}");
}
else if (!str5.bInt(ref num4))
{
context.Response.Write("{\"type\":\"error\",\"data\":\"请选择参与次数\"}");
}
else if (!str6.bInt(ref num5))
{
context.Response.Write("{\"type\":\"error\",\"data\":\"请选择参与商品类型\"}");
后面还有 167 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。
