public void FinishVoting(CongressVoting voting)
        {
            voting.VotingStatusID = (int)VotingStatusEnum.Accepted;
            switch ((VotingTypeEnum)voting.VotingTypeID)
            {
            case VotingTypeEnum.ChangeCongressVotingLength:
            {
                voting.Country.CountryPolicy.CongressVotingLength = int.Parse(voting.Argument1);
                break;
            }

            case VotingTypeEnum.ChangePartyPresidentCadenceLength:
            {
                voting.Country.CountryPolicy.PartyPresidentCadenceLength = int.Parse(voting.Argument1);
                break;
            }

            case VotingTypeEnum.ChangeCongressCadenceLength:
            {
                voting.Country.CountryPolicy.CongressCadenceLength = int.Parse(voting.Argument1);
                break;
            }

            case VotingTypeEnum.ChangeNormalJobMarketFee:
            {
                voting.Country.CountryPolicy.NormalJobMarketFee = (decimal)(double.Parse(voting.Argument1));
                break;
            }

            case VotingTypeEnum.ChangeContractJobMarketFee:
            {
                voting.Country.CountryPolicy.ContractJobMarketFee = (decimal)(double.Parse(voting.Argument1));
                break;
            }

            case VotingTypeEnum.ChangeProductVAT:
            {
                ProductTypeEnum productType = ((ProductTypeEnum)int.Parse(voting.Argument1));
                var             rate        = double.Parse(voting.Argument2);

                var tax = productTaxRepository.FirstOrDefault(t => t.ProductID == (int)productType &&
                                                              t.CountryID == voting.CountryID);

                if (tax == null)
                {
                    tax = new ProductTax()
                    {
                        CountryID        = voting.CountryID,
                        ProductID        = (int)productType,
                        ProductTaxTypeID = (int)ProductTaxTypeEnum.VAT,
                        TaxRate          = (decimal)(rate / 100.0),
                        ForeignCountryID = voting.CountryID
                    };
                    productTaxRepository.Add(tax);
                }
                else
                {
                    tax.TaxRate = (decimal)rate;
                }

                productTaxRepository.SaveChanges();

                break;
            }

            case VotingTypeEnum.ChangeProductExportTax:
            case VotingTypeEnum.ChangeProductImportTax:
            {
                ProductTypeEnum productType      = ((ProductTypeEnum)int.Parse(voting.Argument1));
                var             rate             = double.Parse(voting.Argument2);
                int             countryID        = voting.CountryID;
                int             foreignCountryID = int.Parse(voting.Argument3);

                if (foreignCountryID != -1)
                {
                    addForeignTax(voting, productType, rate, foreignCountryID);
                }
                else
                {
                    foreach (var country in Persistent.Countries.GetAll())
                    {
                        if (country.ID == countryID)
                        {
                            continue;
                        }
                        addForeignTax(voting, productType, rate, country.ID);
                    }
                }

                productTaxRepository.SaveChanges();

                break;
            }

            case VotingTypeEnum.ChangeArticleTax:
            {
                var taxRate = double.Parse(voting.Argument1);
                voting.Country.CountryPolicy.ArticleTax = (decimal)(taxRate / 100.0);
                break;
            }

            case VotingTypeEnum.ChangeNewspaperCreateCost:
            {
                var cost = double.Parse(voting.Argument1);
                voting.Country.CountryPolicy.NewspaperCreateCost = (decimal)cost;
                break;
            }

            case VotingTypeEnum.ChangeMarketOfferCost:
            {
                var cost = double.Parse(voting.Argument1);
                voting.Country.CountryPolicy.MarketOfferCost = (decimal)cost;
                break;
            }

            case VotingTypeEnum.ChangeOrganisationCreateCost:
            {
                var cost = double.Parse(voting.Argument1);
                voting.Country.CountryPolicy.OrganisationCreateCost = (decimal)cost;
                break;
            }

            case VotingTypeEnum.ChangePresidentCadenceLength:
            {
                var length = int.Parse(voting.Argument1);
                voting.Country.CountryPolicy.PresidentCadenceLength = length;
                break;
            }

            case VotingTypeEnum.ChangePartyCreateFee:
            {
                var cost = double.Parse(voting.Argument1);
                voting.Country.CountryPolicy.PartyFoundingFee = (decimal)cost;
                break;
            }

            case VotingTypeEnum.ChangeNormalCongressVotingWinPercentage:
            {
                var winPercentage = double.Parse(voting.Argument1);
                voting.Country.CountryPolicy.NormalCongressVotingWinPercentage = (decimal)(winPercentage / 100.0);
                break;
            }

            case VotingTypeEnum.ChangeCitizenCompanyCost:
            case VotingTypeEnum.ChangeOrganisationCompanyCost:
            {
                var cost = double.Parse(voting.Argument1);

                if ((VotingTypeEnum)voting.VotingTypeID == VotingTypeEnum.ChangeCitizenCompanyCost)
                {
                    voting.Country.CountryPolicy.CitizenCompanyCost = (decimal)cost;
                }
                else
                {
                    voting.Country.CountryPolicy.OrganisationCompanyCost = (decimal)cost;
                }
                break;
            }

            case VotingTypeEnum.ChangeMonetaryTaxRate:
            {
                var rate = double.Parse(voting.Argument1);
                voting.Country.CountryPolicy.MonetaryTaxRate = (decimal)rate / 100;
                break;
            }

            case VotingTypeEnum.ChangeMinimumMonetaryTaxValue:
            {
                var value = double.Parse(voting.Argument1);
                voting.Country.CountryPolicy.MinimumMonetaryTax = (decimal)value;
                break;
            }

            case VotingTypeEnum.ChangeTreasureLawHolder:
            {
                var value = int.Parse(voting.Argument1);
                voting.Country.CountryPolicy.TreasuryVisibilityLawAllowHolderID = value;
                break;
            }

            case VotingTypeEnum.ChangeCompanyCreationLawHolder:
            {
                var value = int.Parse(voting.Argument1);
                voting.Country.CountryPolicy.CountryCompanyBuildLawAllowHolder = value;
                break;
            }

            case VotingTypeEnum.CreateNationalCompany:
            {
                var country  = voting.Country;
                var regionID = Convert.ToInt32(voting.Argument2);

                var region = regionRepository.GetById(regionID);

                if (region.CountryID != voting.CountryID)
                {
                    RejectVoting(voting, CongressVotingRejectionReasonEnum.RegionIsNotYoursConstructCompany);
                    break;
                }

                var             companyName = voting.Argument1;
                ProductTypeEnum productType = (ProductTypeEnum)Convert.ToInt32(voting.Argument3);

                if (productType == ProductTypeEnum.MedicalSupplies)
                {
                    companyName = hospitalService.GenerateNameForHospital(region);
                }

                reservedEntityNameRepository.Remove(companyName);
                var company = companyService.CreateCompanyForCountry(companyName, productType, regionID, country, payForCreation: false);

                if (productType == ProductTypeEnum.MedicalSupplies)
                {
                    region.Hospital = company.Hospital;
                }

                RemoveFromGameMoneyInVoting(voting);
                break;
            }

            case VotingTypeEnum.RemoveNationalCompany:
            {
                int companyID = int.Parse(voting.Argument1);
                var company   = companyRepository.GetById(companyID);
                if (company.Region.CountryID != voting.CountryID)
                {
                    RejectVoting(voting, CongressVotingRejectionReasonEnum.CompanyIsNotYoursRemoveCompany);
                    break;
                }
                removalService.RemoveCompany(company);
                break;
            }

            case VotingTypeEnum.AssignManagerToCompany:
            {
                var companyID = int.Parse(voting.Argument1);
                var citizenID = int.Parse(voting.Argument2);

                var company = companyRepository.GetById(companyID);
                var citizen = citizenRepository.GetById(citizenID);

                if (company.CompanyManagers.Any(manager => manager.EntityID == citizenID))
                {
                    RejectVoting(voting, CongressVotingRejectionReasonEnum.AlreadyManagerAssignManager);
                }

                companyService.AddManager(company, citizen, new CompanyRights(true, 100));
                break;
            }

            case VotingTypeEnum.TransferCashToCompany:
            {
                decimal amount     = decimal.Parse(voting.Argument1);
                int     companyID  = int.Parse(voting.Argument2);
                int     currencyID = int.Parse(voting.Argument3);

                var company = companyRepository.GetById(companyID);
                var money   = new Money(currencyID, amount);
                var country = voting.Country;

                var possibleReason = GetRejectionReasonForTransferCashToCompany(money, company, country);

                if (possibleReason.HasValue)
                {
                    RejectVoting(voting, possibleReason.Value);
                    break;
                }

                transactionsService.TransferMoneyFromCountryToCompany(money, company, country);
                RemoveFromGameMoneyInVoting(voting);

                break;
            }

            case VotingTypeEnum.ChangeGreetingMessage:
            {
                int greetingID = int.Parse(voting.Argument1);
                var message    = votingGreetingMessageRepository.GetById(greetingID).Message;


                voting.Country.GreetingMessage = message;
                break;
            }

            case VotingTypeEnum.ChangeCitizenStartingMoney:
            {
                decimal amount = decimal.Parse(voting.Argument1);

                var policy = voting.Country.CountryPolicy;
                policy.CitizenFee = amount;
                break;
            }

            case VotingTypeEnum.ChangeMinimumContractLength:
            {
                int length = int.Parse(voting.Argument1);

                var policy = voting.Country.CountryPolicy;
                policy.MinimumContractLength = length;
                break;
            }

            case VotingTypeEnum.ChangeMaximumContractLength:
            {
                int length = int.Parse(voting.Argument1);
                var policy = voting.Country.CountryPolicy;
                policy.MaximumContractLength = length;
                break;
            }

            case VotingTypeEnum.PrintMoney:
            {
                int moneyAmount = int.Parse(voting.Argument1);

                var money = new Money()
                {
                    Currency = Persistent.Countries.GetCountryCurrency(voting.CountryID),
                    Amount   = moneyAmount
                };

                transactionsService.PrintMoney(voting.Country, money);



                RemoveFromGameMoneyInVoting(voting);
                break;
            }

            case VotingTypeEnum.ChangeMinimalWage:
            {
                var minimalWage = decimal.Parse(voting.Argument1);

                voting.Country.CountryPolicy.MinimalWage = minimalWage;
                companyService.RemoveJobOffersThatDoesNotMeetMinimalWage(minimalWage, voting.CountryID);

                break;
            }

            case VotingTypeEnum.BuildDefenseSystem:
            {
                var quality  = int.Parse(voting.Argument3);
                var regionID = int.Parse(voting.Argument1);

                var region = regionRepository.GetById(regionID);
                defenseSystemService.BuildDefenseSystem(region, voting.Country, quality, constructionService);
                break;
            }

            case VotingTypeEnum.ChangeHotelTax:
            {
                var tax = decimal.Parse(voting.Argument1);
                voting.Country.CountryPolicy.HotelTax = tax / 100m;
                break;
            }

            case VotingTypeEnum.ChangeHouseTax:
            {
                var tax = decimal.Parse(voting.Argument1);
                voting.Country.CountryPolicy.HouseTax = tax / 100m;
                break;
            }

            default:
            {
                throw new NotImplementedException();
            }
            }

            countryEventService.AddVotingEvent(voting, VotingStatusEnum.Accepted);
            ConditionalSaveChanges(congressVotingRepository);
        }