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
41 lines
1.2 KiB
namespace CustomerOnlineRemit.Common.Model
|
|
{
|
|
public class CommonResponse
|
|
{
|
|
public CommonResponse()
|
|
{
|
|
this.ResponseCode = ResponseHelper.FAILED;
|
|
this.ResponseMessage = ResponseMessageHelper.FAILED;
|
|
}
|
|
|
|
public CommonResponse(int ResponseCode, string ResponseMessage, object Data = null)
|
|
{
|
|
this.ResponseCode = ResponseCode;
|
|
this.ResponseMessage = ResponseMessage;
|
|
this.Data = Data;
|
|
}
|
|
|
|
public int ResponseCode { get; set; }
|
|
public string ResponseMessage { get; set; }
|
|
public string Errors { get; set; }
|
|
|
|
public string PushErrors(List<string> errorList)
|
|
{
|
|
foreach (string s in errorList)
|
|
{
|
|
Errors += s;
|
|
}
|
|
return Errors;
|
|
}
|
|
|
|
public string Id { get; set; }
|
|
public dynamic Data { get; set; }
|
|
public string Extra { get; set; }
|
|
public string Extra2 { get; set; }
|
|
|
|
public CommonResponse SetResponse(int ResponseCode, string ResponseMessage, dynamic Data = null)
|
|
{
|
|
return new CommonResponse(ResponseCode, ResponseMessage, Data);
|
|
}
|
|
}
|
|
}
|