public void ProcessRequest(HttpContext context) { NFMT.Common.ResultModel result = new NFMT.Common.ResultModel(); context.Response.ContentType = "text/plain"; int customId = 0; int operateId = 0; if (!int.TryParse(context.Request.Form["id"], out customId) || customId <= 0) { result.Message = "报关序号错误"; context.Response.Write(Newtonsoft.Json.JsonConvert.SerializeObject(result)); context.Response.End(); } if (!int.TryParse(context.Request.Form["oi"], out operateId) || operateId <= 0) { result.Message = "操作错误"; context.Response.Write(Newtonsoft.Json.JsonConvert.SerializeObject(result)); context.Response.End(); } NFMT.Common.UserModel user = Utility.UserUtility.CurrentUser; NFMT.Common.OperateEnum operateEnum = (NFMT.Common.OperateEnum)operateId; NFMT.WareHouse.BLL.CustomsClearanceBLL bll = new NFMT.WareHouse.BLL.CustomsClearanceBLL(); switch (operateEnum) { case NFMT.Common.OperateEnum.撤返: result = bll.GoBack(user, customId); break; case NFMT.Common.OperateEnum.作废: result = bll.Invalid(user, customId); break; case NFMT.Common.OperateEnum.执行完成: result = bll.Complete(user, customId); break; case NFMT.Common.OperateEnum.执行完成撤销: result = bll.CompleteCancel(user, customId); break; case NFMT.Common.OperateEnum.关闭: result = bll.Close(user, customId); break; } if (result.ResultStatus == 0) result.Message = string.Format("{0}成功", operateEnum.ToString()); context.Response.Write(Newtonsoft.Json.JsonConvert.SerializeObject(result)); }