Пример #1
0
 public static void InsertMessage(Message message,
                                  ref ObservableCollection <Message> messageThread, out string error)
 {
     error = string.Empty;
     messageThread.Add(message);
     ContactFacade.InsertRecentConversation(message);
     // Insert message into the database here
 }
Пример #2
0
        public static void DeleteMessage(Message message,
                                         ref ObservableCollection <Message> messageThread, out string error)
        {
            error = string.Empty;
            messageThread.Remove(message);
            var correspondent = ContactFacade.GetCorrespondent(message, out error);

            ContactFacade.DeleteRecentConversation(correspondent, out error);
            // Delete message from the database here
        }