Android环境下使用JCFXBL API接口操作数据库(5)

findViewById(R.id.btnADD).setOnClickListener(new OnClickListener() {                              public void onClick(View v) {                   // TODO Auto-generated method stub                    String url = "http://169.254.1.30:8088/Execute.ashx?act=ACT_AD_HTXX_ADD¶ms=7&formId=F0201";                   Handler handler = new Handler() {                       public void handleMessage(Message message) {                           switch (message.what) {                           case HttpConnection.DID_START: {                               break;                           }                           // 连接成功后的处理                            case HttpConnection.DID_SUCCEED: {                               Log.i("DID_SUCCEED"""                                       + HttpConnection.DID_SUCCEED);                               doFxBLCallBack((String) message.obj);                               break;                           }                           case HttpConnection.DID_ERROR: {                               break;                           }                           }                       }                   };                      AndroidFxBLClientAPI FxBL = new AndroidFxBLClientAPI(url);                   Log.i("KHBH""" + txtBH.getText().toString());                   //这个两个参数是必须的,而且必须在其他参数前添加                    FxBL.AddParam("sys_username""admin");                   FxBL.AddParam("sys_password""123456");                   ==============                   FxBL.AddParam("KHBH", txtBH.getText().toString());                   FxBL.AddParam("KHMC", txtKHXM.getText().toString());                   FxBL.AddParam("ZJLX", txtZJLX.getText().toString());                   FxBL.AddParam("ZJH", txtZJH.getText().toString());                   FxBL.AddParam("LXDH", txtLXDH.getText().toString());                      FxBL.BindHandler(handler);                   FxBL.Request();               }               private void doFxBLCallBack(String res) {                   Log.i("click""click");                   FxBLResponse response = new FxBLResponse(res);                   Log.i("GetSuccess", response.GetReturn_msg());               }           });  

2.4 小结

数据删除、修改和添加的操作类似。 

三、总结

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:http://www.heiqu.com/a8d38feae8d2eebcd168d2dc7015911d.html