public string VerifyRequest() { StringBuilder sbStr = new StringBuilder(); int id = -1; if (RequestMonthSales == "-1" && RequestMonthStock == "-1" && RequestMonthTrade == "-1") { sbStr.Append("至少选择一项"); } if (string.IsNullOrEmpty(RequestTID) && RequstAction.ToLower().Equals("add")) { sbStr.Append("任务ID不能为空!<br />"); } if (!string.IsNullOrEmpty(RequestMonthStock)) { if (!int.TryParse(RequestMonthStock, out id)) { sbStr.Append("月库存量有误!<br />"); } } if (!string.IsNullOrEmpty(RequestMonthSales)) { if (!int.TryParse(RequestMonthSales, out id)) { sbStr.Append("月置换量有误!<br />"); } } if (!string.IsNullOrEmpty(RequestRecID)) { if (!int.TryParse(RequestRecID, out id)) { sbStr.Append("二手车范围ID有误!<br />"); } } if (!string.IsNullOrEmpty(RequestMonthTrade)) { if (!int.TryParse(RequestMonthTrade, out id)) { sbStr.Append("月交易量有误!<br />"); } } return(sbStr.ToString()); }
public void ProcessRequest(HttpContext context) { BitAuto.YanFa.SysRightManager.Common.UserInfo.Check(); currentContext = context; string msg = string.Empty; switch (RequstAction.ToLower()) { case "add": Add(out msg); break; case "edit": Edit(out msg); break; case "del": Del(out msg); break; } context.Response.Write(msg); }