private voidsendSignin()
{
String password =EditTextPassword.getText().toString();
String name =EditTextName.getText().toString();
String sx_id ="260";
// int double_id = EditTextDouble.getText().toString();
// String url = UrlManager.getUserSignin();
// String url = "http://test.aotujob.com/interface_cp/signin_ipad.php";
String url = UrlManager.getUserSignin();
HttpUtils http =newHttpUtils();
RequestParams params =newRequestParams();
params.addBodyParameter("user", name);
params.addBodyParameter("password", password);
params.addBodyParameter("sx_id", sx_id);
http.configCurrentHttpCacheExpiry(1000*10);//设置超时时间
http.send(HttpRequest.HttpMethod.POST, url, params,newRequestCallBack() {
@Override
public voidonSuccess(ResponseInfo responseInfo) {
String result = responseInfo.result;
//解析
NetReturnInfo info = JosnParser.getSignIn(result);
if(info.status==0)
{
showMessageDialog("提示", info.info,"确定",null,0);
// Log.e("sd", String.valueOf(mItemList.size()));
// mItemList = JosnParser.getItme();
handler.sendEmptyMessage(1);
// Log.e(doubleid, "Exception" );
return;
}
else{
showMessageDialog("提示", info.info,"确定",null,0);
}
// /CacheTools.setCashe(url,result,getApplicationContext());
}
@Override
public voidonFailure(HttpException e, String s) {
}
});}
private voidgetDataFromSelecter() {
String url = UrlManager.getReconciliations();
String time ="time";
HttpUtils http =newHttpUtils();
RequestParams params =newRequestParams();
params.addQueryStringParameter("Time", time);
http.configCurrentHttpCacheExpiry(1000*10);//设置超时时间
http.send(HttpRequest.HttpMethod.GET, url,newRequestCallBack() {
@Override
public voidonSuccess(ResponseInfo responseInfo) {
String result = responseInfo.result;
//解析
NetReturnInfo info = JosnParser.getCVItem(result,mItemList);
if(info.success)
{
Log.e("sd", String.valueOf(mItemList.size()));
mItemList= JosnParser.getItme();
handler.sendEmptyMessage(0);
// Log.e(doubleid, "Exception" );
return;
}
// /CacheTools.setCashe(url,result,getApplicationContext());
}
@Override
public voidonFailure(HttpException e, String s) {
}
});}