private void HandleSupplierInsertMessage(Message message)
 {
     SupplierListItemViewData supplier =
 message.Payload as SupplierListItemViewData;
     if (supplier != null && supplier.SupplierID == ((SupplierListItemViewData)ViewData).SupplierID)
     {
         message.HandledStatus = MessageHandledStatus.HandledCompleted;
         ActivateViewModel();
     }
 }
 private void RefreshList(Message message)
 {
     RefreshList();
     message.HandledStatus = MessageHandledStatus.HandledContinue;
 }
 private void RefreshListAfterDelete(Message message)
 {
     RefreshListAfterAction();
     message.HandledStatus = MessageHandledStatus.HandledContinue;
 }
 private void HandleCategorySelectedForEditMessage(Message message)
 {
     CategoryListItemViewData category =
 message.Payload as CategoryListItemViewData;
     if (category != null && category.CategoryID == ((CategoryListItemViewData)ViewData).CategoryID)
     {
         message.HandledStatus = MessageHandledStatus.HandledCompleted;
         ActivateViewModel();
     }
 }
 private void HandleProductInsertMessage(Message message)
 {
     ProductListItemViewData product =
 message.Payload as ProductListItemViewData;
     if (product != null && product.ProductID == ((ProductListItemViewData)ViewData).ProductID)
     {
         message.HandledStatus = MessageHandledStatus.HandledCompleted;
         ActivateViewModel();
     }
 }
 /// <summary>
 /// If somewhere someone selects a Employee for editing and this 
 /// Edit ViewModel is already
 /// Editing that Employee, then abort the message, and make the View active
 /// </summary>
 /// <param name="message"></param>
 private void HandleCustomerSelectedForEditMessage(Message message)
 {
     CustomerListItemViewData customer =
 message.Payload as CustomerListItemViewData;
     if (customer != null && customer.CustomerID == ((CustomerListItemViewData)ViewData).CustomerID)
     {
         message.HandledStatus = MessageHandledStatus.HandledCompleted;
         ActivateViewModel();
     }
 }
 /// <summary>
 /// If somewhere someone selects a Employee for editing and this 
 /// Edit ViewModel is already
 /// Editing that Employee, then abort the message, and make the View active
 /// </summary>
 /// <param name="message"></param>
 private void HandleEmployeeSelectedForEditMessage(Message message)
 {
     EmployeeListItemViewData employee =
 message.Payload as EmployeeListItemViewData;
     if (employee != null && employee.EmployeeID == ((EmployeeListItemViewData)ViewData).EmployeeID)
     {
         message.HandledStatus = MessageHandledStatus.HandledCompleted;
         ActivateViewModel();
     }
 }