private void DeleteRequestButton_Click(object sender, RoutedEventArgs e) { Button button = sender as Button; BO.GuestRequest guestRequest = (BO.GuestRequest)button.DataContext; try { bl.UpdateRequestStatus(RequestStatus.IRRELEVANT, guestRequest.Key);//update the staus as Irlevent } catch (Exception ex) { MessageBox.Show(ex.Message); } lstRequest = bl.GetGuestRequestByPredicate(x => x.ClientId == int.Parse(tb_GuestId.Text) && x.Status != RequestStatus.IRRELEVANT); this.RequestsViewList.ItemsSource = lstRequest; this.RequestsViewList.Items.Refresh(); }