void SendMoney(GameEntity product, GameEntity managingCompany, long sum) { var proposal = new InvestmentProposal { Offer = sum, ShareholderId = managingCompany.shareholder.Id, InvestorBonus = InvestorBonus.None, Valuation = 0, WasAccepted = false }; Companies.AddInvestmentProposal(gameContext, product.company.Id, proposal); Companies.AcceptInvestmentProposal(gameContext, product.company.Id, managingCompany.shareholder.Id); }
void SendMoney(GameEntity product, GameEntity managingCompany, long sum) { var date = ScheduleUtils.GetCurrentDate(gameContext); var goal = new InvestmentGoalUnknown(InvestorGoalType.GrowCompanyCost); var proposal = new InvestmentProposal { Investment = new Investment(sum, 1, goal, date), AdditionalShares = 0, ShareholderId = managingCompany.shareholder.Id, WasAccepted = false, }; Companies.AddInvestmentProposal(product, proposal); Companies.AcceptInvestmentProposal(gameContext, product, managingCompany); }
public override void Execute() { int companyId = SelectedCompany.company.Id; var c = MyGroupEntity; long Offer = c.companyResource.Resources.money * Percent / 100; int shareholderId = MyGroupEntity.shareholder.Id; Companies.AddInvestmentProposal(Q, companyId, new InvestmentProposal { ShareholderId = shareholderId, Valuation = 0, Offer = Offer, WasAccepted = false, InvestorBonus = InvestorBonus.None }); Companies.AcceptInvestmentProposal(Q, companyId, shareholderId); }