private void UpdateOperationsButton_OnClick(object sender, RoutedEventArgs e) { IList selectedOperations = OperationsDataGrid.SelectedItems; int operationsSize = selectedOperations.Count; for (var i = 0; i < operationsSize; i++) { DataRowView row = (DataRowView)OperationsDataGrid.SelectedItems[i]; string textId = row["Id"].ToString(); int id = Convert.ToInt32(textId); Operatie operation = _client.FindOperationById(id); operation.Denumire = row["Denumire"].ToString(); operation.TimpExecutie = Convert.ToDecimal(row["TimpExecutie"].ToString()); _client.UpdateOperation(operation); } OperationsTabItem_OnLoaded(sender, e); }