Inheritance: INotifyPropertyChanging, INotifyPropertyChanged
Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
 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);
     }
 }
Ejemplo n.º 3
0
 private void detach_PoliticianLawVotes(PoliticianLawVote entity)
 {
     this.SendPropertyChanging();
     entity.LawVote = null;
 }
Ejemplo n.º 4
0
 private void attach_PoliticianLawVotes(PoliticianLawVote entity)
 {
     this.SendPropertyChanging();
     entity.Politician = this;
 }
Ejemplo n.º 5
0
 partial void DeletePoliticianLawVote(PoliticianLawVote instance);
Ejemplo n.º 6
0
 partial void UpdatePoliticianLawVote(PoliticianLawVote instance);
Ejemplo n.º 7
0
 partial void InsertPoliticianLawVote(PoliticianLawVote instance);