| | |
| | | public List<Company> getCompanyList( String deviceCompanyId){
|
| | | List<Company> result=new ArrayList<Company>();
|
| | | Company company=null;
|
| | | String sql="select * from company where is_synchron='N' and device_company_id="+deviceCompanyId;
|
| | | String sql="select * from company where is_synchron='N' and device_company_id="+Integer.parseInt(deviceCompanyId);
|
| | | Cursor c =MainActivity.getInstance().db.rawQuery(sql,new String[]{});
|
| | | if(c.moveToFirst()){
|
| | | company=new Company();
|
| | |
| | | }
|
| | |
|
| | | //删除已上传给你服务器的数据
|
| | | public void delCompanyList(String deviceCompanyId){
|
| | | String sql="delete from company where is_synchron='N' and device_company_id="+deviceCompanyId;
|
| | | public void delCompanyList(){
|
| | | String sql="delete from company where is_synchron='N'";
|
| | | MainActivity.getInstance().db.execSQL(sql);
|
| | | }
|
| | |
|
| | | //获取未同步数据总数
|
| | | public int getSynDataCount(){
|
| | | String sql="select count(*) from company where is_synchron='N' ";
|
| | | Cursor c =MainActivity.getInstance().db.rawQuery(sql,new String[]{});
|
| | | return c.getCount();
|
| | | }
|
| | |
|
| | | }
|