public FeedEvent(PoliticianLawVote vote) { var thelaw = vote.LawVote.Law; var thevote = vote.LawVote; this.date = thevote.Date.Value; this.BodyText = thelaw.Summary.PresentText(200); this.ActionUrl = thelaw.DetailsLink(); this.ActionText = GetVoteText(vote) + " til " + thelaw.ShortName.PresentText(35); }
private string GetVoteText(PoliticianLawVote plv) { switch (plv.Vote) { case 0: return "Stemte Ja"; case 1: return "Stemte Nej"; case 2: return "Afstod fra at stemme"; default: throw new ArgumentException("Unknown votetype: " + plv.Vote); } }
private void detach_PoliticianLawVotes(PoliticianLawVote entity) { this.SendPropertyChanging(); entity.LawVote = null; }
private void attach_PoliticianLawVotes(PoliticianLawVote entity) { this.SendPropertyChanging(); entity.Politician = this; }
partial void DeletePoliticianLawVote(PoliticianLawVote instance);
partial void UpdatePoliticianLawVote(PoliticianLawVote instance);
partial void InsertPoliticianLawVote(PoliticianLawVote instance);