80,337
社区成员
发帖
与我相关
我的任务
分享
if (envelope.getResponse()!= null){
SoapObject result=(SoapObject) envelope.bodyIn;
SoapObject detail=(SoapObject) result.getProperty(methodName+"Result");
list= new ArrayList<rating>();
for (int i = 0; i < detail.getPropertyCount(); i++) {
SoapObject mstr=(SoapObject)detail.getProperty(i);
rating a = new rating();
String plusreason = mstr.getProperty("Plusreason").toString();
String average = mstr.getProperty("Average").toString();
String plusdepart = mstr.getProperty("Plusdepart").toString();
String lessdepart = mstr.getProperty("Lessdepart").toString();
String lessreason = mstr.getProperty("Lessreason").toString();
String branchName = mstr.getProperty("Branchname").toString();
String ratingmonth = mstr.getProperty("Datetime").toString();
a.setPlusreason(plusreason);
a.setAverage(average);
a.setPlusdepart(plusdepart);
a.setLessdepart(lessdepart);
a.setLessreason(lessreason);
a.setBranchName(branchName);
a.setRatingmonth(ratingmonth);
list.add(a);
}
Toast.makeText(voteporformance.this,
getString(R.string.Average),
Toast.LENGTH_SHORT).show();
ArrayAdapter<rating> adapter = new ArrayAdapter<rating>(this,R.layout.list_items,list);
mylListView.setAdapter(adapter);
}
public class rating {
private String plusreason;
private String Average;
private String plusdepart;
private String lessdepart;
private String lessreason;
private String branchName;
private String ratingmonth;
public String getPlusreason() {
return plusreason;
}
public void setPlusreason(String plusreason) {
this.plusreason = plusreason;
}
public String getPlusdepart() {
return plusdepart;
}
public void setPlusdepart(String plusdepart) {
this.plusdepart = plusdepart;
}
public String getAverage() {
return Average;
}
public void setAverage(String average) {
Average = average;
}
public String getLessdepart() {
return lessdepart;
}
public void setLessdepart(String lessdepart) {
this.lessdepart = lessdepart;
}
public String getLessreason() {
return lessreason;
}
public void setLessreason(String lessreason) {
this.lessreason = lessreason;
}
public String getBranchName() {
return branchName;
}
public void setBranchName(String branchName) {
this.branchName = branchName;
}
public String getRatingmonth() {
return ratingmonth;
}
public void setRatingmonth(String ratingmonth) {
this.ratingmonth = ratingmonth;
}
}