private void getOrderList() { if (isClient) { FloderUtils floder = new FloderUtils(this.outPath); ArrayList pathes = floder.listAllOrder(); resultList = pathes; reloadList(); } else { HttpWorker httpWorker = new HttpWorker(HttpWorker.orderList, httpResponse); JSONObject form = new JSONObject(); form.setString("status", "4"); httpWorker.setData(form); httpWorker.httpWorker(); WaitDialog.show(); } }
private void httpResponse(JSONObject response) { WaitDialog.close(); int error_code = response.getInt("error_code"); if (error_code == 0) { resultList.Clear(); FloderUtils floder = new FloderUtils(this.outPath); ArrayList pathes = floder.listAllOrder(); resultList = pathes; JSONArray list = response.getJSONArray("list"); for (int i = 0; i < list.Count; i++) { JSONObject item = list.getJSONObject(i); resultList.Add(item); } reloadList(); } else { string message = response.getString("message"); MessageBox.Show(message); } }