private void setCheckOut2DB(boolean sent) { CheckIn.updateActive(getActivity(), currentCheckin.get("id_checkin"), "noactive"); String id_checkout = String.valueOf(System.currentTimeMillis()); String date_time = DatesHelper.getStringDate(new Date()); if (!sent) { // id_checkout = "N" + id_checkout; CheckOut.updateInsert( getActivity(), currentCheckin.get("id_checkin"), id_checkout, "no_sent", visit_id, date_time); } else { CheckOut.updateInsert( getActivity(), currentCheckin.get("id_checkin"), id_checkout, "sent", visit_id, date_time); } }
private void setCheckIn2DB(boolean sent, String id_visit_session) { String id_checkin = String.valueOf(System.currentTimeMillis()); String date_time = DatesHelper.getStringDate(new Date()); if (!sent) { // id_checkin = "N" + id_checkin; CheckIn.insert( getActivity(), id_checkin, "no_sent", latitude, longitude, visit_id, date_time, id_visit_session, "active"); } else { CheckIn.insert( getActivity(), id_checkin, "sent", latitude, longitude, visit_id, date_time, id_visit_session, "active"); } CheckOut.insert( getActivity(), id_checkin, "pre_checkout" + id_checkin, "no_sent", visit_id, date_time, id_visit_session); checkin = "active"; }