private void UpdateStatusExecute() { try { if (UpdateStatus != null) { UpdateStatus updateStatus = new UpdateStatus(Order); updateStatus.ShowDialog(); if ((updateStatus.DataContext as UpdateStatusViewModel).IsUpdateOrder == true) { OrderList = service.GetAllOrders().ToList(); } } } catch (Exception ex) { MessageBox.Show(ex.ToString()); } }