/// <summary> /// 成功输出 /// </summary> /// <param name="msg">消息</param> /// <param name="o">不返回数据为null,其他位数组对象</param> private void writeMsgSuccess(string msg, object o) { HttpContext.Current.Response.ContentType = "application/json"; HttpContext.Current.Response.Write(YBDConvertToJson.success(msg, o)); HttpContext.Current.ApplicationInstance.CompleteRequest(); HttpContext.Current.Response.End(); }
/// <summary> /// 失败输出 /// </summary> /// <param name="msg">消息</param> private void writeMsgError(int code, string msg) { HttpContext.Current.Response.ContentType = "application/json"; HttpContext.Current.Response.Write(YBDConvertToJson.error(code, msg)); HttpContext.Current.ApplicationInstance.CompleteRequest(); HttpContext.Current.Response.End(); }