public Response <GetReceiptDetailByConditionResponse> GetFinancialStatements(GetReceiptByConditionRequest request) { Response <GetReceiptDetailByConditionResponse> response = new Response <GetReceiptDetailByConditionResponse>() { Result = new GetReceiptDetailByConditionResponse() }; if (request == null || request.SearchCondition == null) { ArgumentNullException ex = new ArgumentNullException("GetReceiptByConditionRequest request"); LogError(ex); response.ErrorCode = ErrorCode.Argument; response.Exception = ex; return(response); } try { ReceiptManagementAccessor accessor = new ReceiptManagementAccessor(); int RowCount; response.Result = accessor.GetFinancialStatements(request.SearchCondition, request.PageIndex, request.PageSize, out RowCount); response.Result.PageCount = RowCount % request.PageSize == 0 ? RowCount / request.PageSize : RowCount / request.PageSize + 1; response.Result.PageIndex = request.PageIndex; response.IsSuccess = true; } catch (Exception ex) { LogError(ex); response.Exception = ex; response.IsSuccess = false; response.ErrorCode = ErrorCode.Technical; } return(response); }