public static HeLianApiBaseResult <List <CarQueryDataList_Request> > CarQueryDataList(CarQueryDataList_Params pams) { HeLianApiBaseResult <List <CarQueryDataList_Request> > result = new HeLianApiBaseResult <List <CarQueryDataList_Request> >(); Dictionary <string, string> postData = new Dictionary <string, string>(); postData.Add("openid", _openid); postData.Add("appkey", _appkey); postData.Add("timestamp", GetTimespan().ToString()); postData.Add("carNo", pams.carNo); postData.Add("carType", pams.carType); postData.Add("rackNo", pams.rackNo); postData.Add("enginNo", pams.enginNo); string sign = GetSign(postData); postData.Add("sign", sign); postData.Add("isCompany", pams.isCompany); WebUtils webUtils = new WebUtils(); string postDataStr = "data=" + JsonConvert.SerializeObject(postData); string body = webUtils.DoPost("http://www.hl2016.com/mainoa/api/carquery/dataList.jhtml", null, postDataStr, null); result = JsonConvert.DeserializeObject <HeLianApiBaseResult <List <CarQueryDataList_Request> > >(body); return(result); }
public static HeLianApiBaseResult <List <CarQueryGetLllegalPrice_Result> > CarQueryGetLllegalPrice(CarQueryGetLllegalPrice_Params pams) { HeLianApiBaseResult <List <CarQueryGetLllegalPrice_Result> > result = new HeLianApiBaseResult <List <CarQueryGetLllegalPrice_Result> >(); Dictionary <string, string> postData = new Dictionary <string, string>(); postData.Add("openid", _openid); postData.Add("appkey", _appkey); postData.Add("timestamp", GetTimespan().ToString()); postData.Add("carNo", pams.carNo); postData.Add("carType", pams.carType); postData.Add("rackNo", pams.rackNo); postData.Add("enginNo", pams.enginNo); string sign = GetSign(postData); postData.Add("sign", sign); postData.Add("isCompany", pams.isCompany); string v = JsonConvert.SerializeObject(pams.dataLllegal); postData.Add("dataLllegal", v); WebUtils webUtils = new WebUtils(); string postDataStr = ""; foreach (var m in postData) { postDataStr += m.Key + "=" + m.Value + "&"; } postDataStr = postDataStr.Substring(0, postDataStr.Length - 1); string body = webUtils.DoPost("http://www.hl2016.com/mainoa/api/carquery/getLllegalPrice.jhtml", null, postDataStr, null); result = JsonConvert.DeserializeObject <HeLianApiBaseResult <List <CarQueryGetLllegalPrice_Result> > >(body); return(result); }