Example #1
0
 /// <summary>
 /// 查询接口返回参数方法
 /// </summary>
 /// <param name="query">接受参数实体</param>
 /// <param name="errorCode">参数接口枚举</param>
 /// <returns></returns>
 public static QueryRespon QueryResp(this QueryRespon query, QueryErrorCode error)
 {
     query.ErrorCode = error.QueryGetValue();
     query.Message   = error.QueryGetDescription();
     if (error == QueryErrorCode.Code100)
     {
         query.Success = true;
     }
     return(query);
 }
Example #2
0
 /// <summary>
 /// 查询接口返回参数方法
 /// </summary>
 /// <param name="response">接受参数实体</param>
 /// <param name="errorCode">参数接口枚举</param>
 /// <returns></returns>
 public static Response QueryToResponse(this Response response, QueryErrorCode errorCode)
 {
     response.ErrorCode = errorCode.QueryGetValue();
     response.Message   = errorCode.QueryGetDescription();
     return(response);
 }