/// <summary> /// 响应消息封装类 /// </summary> /// <param name="Status">状态:1-成功;0-缺省; -1失败</param> /// <param name="Message">消息内容</param> /// <returns></returns> public static ResponseResult Error(string errorMessage) { var result = new ResponseResult(); result.Status = -1; result.Message = errorMessage; return result; }
/// <summary> /// 响应消息封装类 /// </summary> /// <param name="Status">状态:1-成功;0-缺省; -1失败</param> /// <param name="Message">消息内容</param> /// <returns></returns> public static ResponseResult Default(string message = null) { var result = new ResponseResult(); result.Status = 0; result.Message = message; return result; }
/// <summary> /// 响应消息封装类 /// </summary> /// <param name="Status">状态:1-成功;0-缺省; -1失败</param> /// <param name="Message">消息内容</param> /// <returns></returns> public static ResponseResult Success(string message = null) { var result = new ResponseResult(); result.Status = 1; result.Message = message; return result; }