private void initView() {
    // TODO Auto-generated method stub  sessionId
    mySharedPreferences = getSharedPreferences("Teleshopping", MODE_PRIVATE);
    sessionId = mySharedPreferences.getString("sessionId", "sessionId");
    merchantId = mySharedPreferences.getLong("merchantId", 10000);
    System.out.println("sessionId---" + sessionId + "--id---" + merchantId);
    csz_ll = (LinearLayout) findViewById(R.id.csz_ll);
    csz_ll.setOnClickListener(this);
    dsj_ll = (LinearLayout) findViewById(R.id.dsj_ll);
    dsj_ll.setOnClickListener(this);
    lv = (XListView) findViewById(R.id.lv);
    lv.setPullLoadEnable(true);
    lv.setXListViewListener(this);
    lv.setDivider(null);
    lv.setOnItemClickListener(
        new OnItemClickListener() {

          @Override
          public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
            // TODO Auto-generated method stub
            Intent i = new Intent(getApplicationContext(), GoodsDetail.class);
            i.putExtra("goodsInfoId", myList.get(position - 1).getId() + "");
            System.out.println("goodsInfoId" + myList.get(position - 1).getId());
            startActivity(i);
          }
        });

    myAdapter = new MerchantManagerAdapter(MerchantManager.this, myList);
    lv.setAdapter(myAdapter);
  }
 @Override
 protected void onCreate(Bundle savedInstanceState) {
   // TODO Auto-generated method stub
   super.onCreate(savedInstanceState);
   setContentView(R.layout.activity_allorder);
   myApplication = (MyApplication) getApplication();
   myApplication.addActivity(this);
   preferences = getSharedPreferences(Config.SHARED, Context.MODE_PRIVATE);
   String release = android.os.Build.VERSION.RELEASE; // android系统版本号
   version = Integer.parseInt(release.substring(0, 1));
   sessionId = preferences.getString("sessionId", "sessionId");
   merchantId = preferences.getLong("merchantId", 10000);
   initView();
   setButton();
   mAdapter = new TodayOrderAdapter(this, orderList);
   order_listview.setAdapter(mAdapter);
   if (Tools.isConnect(getApplicationContext())) {
     builder = Tools.showLoading(this, "加载中");
     getOrderList();
   } else {
     handler.sendEmptyMessage(2);
   }
 }