상속: INotifyPropertyChanging, INotifyPropertyChanged
예제 #1
0
파일: Feed.cs 프로젝트: friism/folketsting
        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);
        }
예제 #2
0
파일: Feed.cs 프로젝트: friism/folketsting
 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);
     }
 }
예제 #3
0
 private void detach_PoliticianLawVotes(PoliticianLawVote entity)
 {
     this.SendPropertyChanging();
     entity.LawVote = null;
 }
예제 #4
0
 private void attach_PoliticianLawVotes(PoliticianLawVote entity)
 {
     this.SendPropertyChanging();
     entity.Politician = this;
 }
예제 #5
0
 partial void DeletePoliticianLawVote(PoliticianLawVote instance);
예제 #6
0
 partial void UpdatePoliticianLawVote(PoliticianLawVote instance);
예제 #7
0
 partial void InsertPoliticianLawVote(PoliticianLawVote instance);