private void MainDataGrid_OnCellEditEnding(object sender, DataGridCellEditEndingEventArgs e) { switch (TabControl.SelectedIndex) { case 0: _devRepo.DevUpdate(e.Row.Item as DEVELOPER); break; case 1: _gameRepo.GameUpdate(e.Row.Item as GAME); break; case 2: _manRepo.ManUpdate(e.Row.Item as MANAGER); break; case 3: _artRepo.ArtUpdate(e.Row.Item as ARTIST); break; } }