You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

41 lines
1.2 KiB

  1. namespace CustomerOnlineRemit.Common.Model
  2. {
  3. public class CommonResponse
  4. {
  5. public CommonResponse()
  6. {
  7. this.ResponseCode = ResponseHelper.FAILED;
  8. this.ResponseMessage = ResponseMessageHelper.FAILED;
  9. }
  10. public CommonResponse(int ResponseCode, string ResponseMessage, object Data = null)
  11. {
  12. this.ResponseCode = ResponseCode;
  13. this.ResponseMessage = ResponseMessage;
  14. this.Data = Data;
  15. }
  16. public int ResponseCode { get; set; }
  17. public string ResponseMessage { get; set; }
  18. public string Errors { get; set; }
  19. public string PushErrors(List<string> errorList)
  20. {
  21. foreach (string s in errorList)
  22. {
  23. Errors += s;
  24. }
  25. return Errors;
  26. }
  27. public string Id { get; set; }
  28. public dynamic Data { get; set; }
  29. public string Extra { get; set; }
  30. public string Extra2 { get; set; }
  31. public CommonResponse SetResponse(int ResponseCode, string ResponseMessage, dynamic Data = null)
  32. {
  33. return new CommonResponse(ResponseCode, ResponseMessage, Data);
  34. }
  35. }
  36. }