Esempio n. 1
0
 public static void update_event(Context context, String Event_ID) {
   // Update event in app sql + server sql.
   Update_Event_MySQL(Event_ID);
   Update_Event_ServerSQL(context, Event_ID);
   // Send message to all users to new/update/delete the event.
   String message;
   for (String[] update_user : Update_Users) {
     if (update_user[1].equals(Constants.Update_Event)) {
       message =
           update_user[1]
               + "|"
               + Event_ID
               + "^"
               + update_section[details_num]
               + "^"
               + update_section[users_num]
               + "^"
               + update_section[tasks_num]
               + "^"
               + update_section[vote_date_num]
               + "^"
               + update_section[vote_location_num];
     } else {
       message = update_user[1] + "|" + Event_ID;
     }
     new SendMessage_AsyncTask(context).execute(Constants.MY_User_ID, message, update_user[0]);
   }
   // Update Event_Helper.
   Event_Helper.friends = Event_Helper.friends_tmp;
   Event_Helper.task = Event_Helper.task_tmp;
   Event_Helper.vote_date = Event_Helper.vote_date_tmp;
   Event_Helper.vote_location = Event_Helper.vote_location_tmp;
 }