Search in sources :

Example 6 with Team

use of com.marshalchen.common.usefulModule.standuptimer.model.Team in project UltimateAndroid by cymcsg.

the class MeetingDetails method onCreate.

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.stand_up_timer_meeting_details);
    String teamName = getIntent().getStringExtra("teamName");
    String meetingTime = getIntent().getStringExtra("meetingTime");
    Logger.i("Looking for meeting for '" + teamName + "' at '" + meetingTime + "'");
    Date date = null;
    try {
        date = new SimpleDateFormat(Meeting.DESCRIPTION_FORMAT).parse(meetingTime);
    } catch (ParseException e) {
        String msg = "Could not parse the date/time '" + meetingTime + "'. " + e.getMessage();
        Logger.e(msg);
        throw new RuntimeException(msg);
    }
    Team team = Team.findByName(teamName, this);
    meeting = Meeting.findByTeamAndDate(team, date, this);
    displayMeetingStats(team, date);
}
Also used : Team(com.marshalchen.common.usefulModule.standuptimer.model.Team) ParseException(java.text.ParseException) SimpleDateFormat(java.text.SimpleDateFormat) Date(java.util.Date)

Example 7 with Team

use of com.marshalchen.common.usefulModule.standuptimer.model.Team in project UltimateAndroid by cymcsg.

the class TeamList method deleteTeam.

private void deleteTeam(String teamName) {
    Team team = Team.findByName(teamName, this);
    team.delete(this);
}
Also used : Team(com.marshalchen.common.usefulModule.standuptimer.model.Team)

Aggregations

Team (com.marshalchen.common.usefulModule.standuptimer.model.Team)7 ContentValues (android.content.ContentValues)2 Cursor (android.database.Cursor)2 SQLiteDatabase (android.database.sqlite.SQLiteDatabase)2 Date (java.util.Date)2 Meeting (com.marshalchen.common.usefulModule.standuptimer.model.Meeting)1 ParseException (java.text.ParseException)1 SimpleDateFormat (java.text.SimpleDateFormat)1