private void SetStatus(HttpContext context) { int?intParam = base.GetIntParam(context, "id", false); if (!intParam.HasValue) { throw new HidistroAshxException("错误的编号"); } string text = context.Request["Command"]; if (string.IsNullOrWhiteSpace(text)) { throw new HidistroAshxException("错误的命令"); } text = text.ToLower(); string a = text; if (!(a == "close")) { if (a == "open") { WeiXinRedEnvelopeProcessor.SetRedEnvelopeState(intParam.Value, RedEnvelopeState.Enabled); goto IL_00a3; } throw new HidistroAshxException("错误的命令"); } WeiXinRedEnvelopeProcessor.SetRedEnvelopeState(intParam.Value, RedEnvelopeState.Close); goto IL_00a3; IL_00a3: base.ReturnSuccessResult(context, "操作成功", 0, true); }