TG.WXCRM.V4/CRMServices/ServicesModel/returnResult.cs

35 lines
1.1 KiB
C#

using System.Text;
using WX.CRM.BLL.Util;
using WX.CRM.Common;
namespace WX.CRM.CRMServices.ServicesModel
{
public class returnResult
{
public bool result { get; set; }
public int retcode { get; set; }
public int total { get; set; }
public string retMessage { get; set; }
public string data { get; set; }
public returnResult getResult(string json, string url)
{
SecurityHelper sHelper = new SecurityHelper();
string key = sHelper.createSignEncodingStr(json);
string response = Utility.PostData(url + "?" + key, Encoding.UTF8);
string _retmsg = sHelper.decyptData("UPWEBSITE", response);
returnResult result = Utility.JSONToObject<returnResult>(_retmsg);
return result;
}
public returnResult getNoencyptResult(string json, string url)
{
string response = Utility.PostData(url + "?key=" + json, Encoding.UTF8);
returnResult result = Utility.JSONToObject<returnResult>(response);
return result;
}
}
}