void EditStadium(object parameter) { if (!ValidateParams(parameter)) { ShowInfoWindow("Podaj poprawne dane"); return; } var values = (object[])parameter; string newName = values[0].ToString(); string newCity = values[1].ToString(); string newCountry = values[2].ToString(); StadiumViewModel currentStadium = (StadiumViewModel)values[3]; if (stadiumService.EditStadium(newName, newCity, newCountry, currentStadium.ID)) { RefereshAll(); } }