public ArrayList<SpeakerSeminarsWrapper> getFavRecord() {
    ArrayList<SpeakerSeminarsWrapper> array = new ArrayList<SpeakerSeminarsWrapper>();

    String query1 =
        "Select  distinct title from  speakerSeminar where ClientCode=? and EventCode=? and favourites=?";

    Cursor c =
        dbAdapter.selectRecordsFromDB(
            query1, new String[] {MyUIApplication.ClientCode, MyUIApplication.EventCode, "true"});
    if (c.moveToFirst()) {
      do {
        String title = c.getString(c.getColumnIndex("Title"));

        String query = "Select * from  speakerSeminar where title=? limit 1";

        Cursor cursor = dbAdapter.selectRecordsFromDB(query, new String[] {title});
        if (cursor.moveToFirst()) {
          SpeakerSeminarsWrapper _objSpeakerWrapper = new SpeakerSeminarsWrapper();

          _objSpeakerWrapper.id = cursor.getString(cursor.getColumnIndex("_id"));
          _objSpeakerWrapper.name = cursor.getString(cursor.getColumnIndex("name"));
          _objSpeakerWrapper.Title = cursor.getString(cursor.getColumnIndex("Title"));
          _objSpeakerWrapper.Day = cursor.getString(cursor.getColumnIndex("Day"));
          _objSpeakerWrapper.description = cursor.getString(cursor.getColumnIndex("description"));
          _objSpeakerWrapper.visited = cursor.getString(cursor.getColumnIndex("visited"));
          _objSpeakerWrapper.favourites = cursor.getString(cursor.getColumnIndex("favourites"));

          array.add(_objSpeakerWrapper);
        }
      } while (c.moveToNext());
    }
    return array;
  }
  public SpeakerSeminarsWrapper getRecord(String urlLink, String id) {
    // TODO Auto-generated method stub
    SpeakerSeminarsWrapper _objSpeakerWrapper = null;

    String query =
        "Select * from  speakerSeminar where ClientCode=? and EventCode=? and _id=? and Title=?";

    Cursor c =
        dbAdapter.selectRecordsFromDB(
            query,
            new String[] {MyUIApplication.ClientCode, MyUIApplication.EventCode, id, urlLink});

    if (c.moveToFirst()) {
      do {
        _objSpeakerWrapper = new SpeakerSeminarsWrapper();

        _objSpeakerWrapper.id = c.getString(c.getColumnIndex("_id"));
        _objSpeakerWrapper.name = c.getString(c.getColumnIndex("name"));
        _objSpeakerWrapper.Title = c.getString(c.getColumnIndex("Title"));
        _objSpeakerWrapper.Day = c.getString(c.getColumnIndex("Day"));
        _objSpeakerWrapper.description = c.getString(c.getColumnIndex("description"));
        _objSpeakerWrapper.visited = c.getString(c.getColumnIndex("visited"));
        _objSpeakerWrapper.favourites = c.getString(c.getColumnIndex("favourites"));

      } while (c.moveToNext());
    }

    return _objSpeakerWrapper;
  }
Exemplo n.º 3
0
  public SpeakerWrapper getRecord(String _id) {
    SpeakerWrapper _objSpeakerWrapper = new SpeakerWrapper();
    String query = "Select * from  speakerList where ClientCode=? and EventCode=? and _id=?";

    Cursor c =
        dbAdapter.selectRecordsFromDB(
            query, new String[] {MyUIApplication.ClientCode, MyUIApplication.EventCode, _id});

    if (c.moveToFirst()) {
      do {

        _objSpeakerWrapper.id = c.getString(c.getColumnIndex("_id"));
        _objSpeakerWrapper.name = c.getString(c.getColumnIndex("name"));
        _objSpeakerWrapper.email = c.getString(c.getColumnIndex("email"));
        _objSpeakerWrapper.post = c.getString(c.getColumnIndex("post"));
        _objSpeakerWrapper.companyname = c.getString(c.getColumnIndex("companyname"));
        _objSpeakerWrapper.description = c.getString(c.getColumnIndex("description"));
        _objSpeakerWrapper.image = c.getString(c.getColumnIndex("image"));
        _objSpeakerWrapper.favourites = c.getString(c.getColumnIndex("favourites"));

      } while (c.moveToNext());
    }

    return _objSpeakerWrapper;
  }
Exemplo n.º 4
0
  public ArrayList<SpeakerWrapper> getSortedRecord() {
    ArrayList<SpeakerWrapper> array = new ArrayList<SpeakerWrapper>();

    String query =
        "Select * from  speakerList where ClientCode=? and EventCode=?  ORDER BY name ASC";

    Cursor c =
        dbAdapter.selectRecordsFromDB(
            query, new String[] {MyUIApplication.ClientCode, MyUIApplication.EventCode});

    if (c.moveToFirst()) {
      do {
        SpeakerWrapper _objSpeakerWrapper = new SpeakerWrapper();

        _objSpeakerWrapper.id = c.getString(c.getColumnIndex("_id"));
        _objSpeakerWrapper.name = c.getString(c.getColumnIndex("name"));
        _objSpeakerWrapper.email = c.getString(c.getColumnIndex("email"));
        _objSpeakerWrapper.post = c.getString(c.getColumnIndex("post"));
        _objSpeakerWrapper.companyname = c.getString(c.getColumnIndex("companyname"));
        _objSpeakerWrapper.description = c.getString(c.getColumnIndex("description"));
        _objSpeakerWrapper.image = c.getString(c.getColumnIndex("image"));
        _objSpeakerWrapper.favourites = c.getString(c.getColumnIndex("favourites"));

        array.add(_objSpeakerWrapper);

      } while (c.moveToNext());
    }

    return array;
  }
Exemplo n.º 5
0
  public String getTimeStamp() {

    String updateTime = "";

    String query = "Select updatetimestamp from  speakerList where ClientCode=? and EventCode=?";

    Cursor c =
        dbAdapter.selectRecordsFromDB(
            query, new String[] {MyUIApplication.ClientCode, MyUIApplication.EventCode});

    if (c.moveToFirst()) {
      updateTime = c.getString(c.getColumnIndex("updatetimestamp"));
    }

    return updateTime;
  }