Esempio n. 1
0
        private void DeleteMecanicButton_OnClick(object sender, RoutedEventArgs e)
        {
            IList selectedMechanics = MechanicsDataGrid.SelectedItems;
            int   mechanicsSize     = selectedMechanics.Count;

            for (var i = 0; i < mechanicsSize; i++)
            {
                DataRowView row    = (DataRowView)MechanicsDataGrid.SelectedItems[i];
                string      textId = row["Id"].ToString();
                int         id     = Convert.ToInt32(textId);

                _client.DeleteMecanic(id);
            }

            MechanicsTabItem_OnLoaded(sender, e);
        }