public AddMemberToEventForm(Event ev, BareMember member) { InitializeComponent(); lblEvent.Text = ev.Name; lblMember.Text = member.fullName; currentevent = ev; currentmember = member; }
private void AddMemberToEvent_Click(object sender, EventArgs e) { var memberid = hc.FindMemberId(firstname, surname); currentevent = db.Events.Include("eventAmounts").ToList().Find(ce => ce.Id == currentevent.Id); currentmember = db.bareMembers.Include("Events").ToList().Find(cm => cm.Id == memberid); AddMemberToEventForm amtef = new AddMemberToEventForm(currentevent, currentmember); amtef.ShowDialog(); EventMembers = db.eventAmountReductions.Include("thisMember").Where(x => x.ThisEvent.Id == currentevent.Id).ToList(); EventParticipantsAdded.DataSource = EventMembers.Select(x => x.thisMember).ToList().Select(y => new { y.firstName, y.surName }).ToList(); EventMemberList.DataSource = hc.Search("", EventMembers); }
public IncassoMember(BareMember member, string IncassoNumber, DateTime IncassoDate) : this() { this.Name = member.Initials.Trim() + " " + member.surName.Trim(); this.Adres = member.Address; this.Postcode = member.Postcode; this.Plaats = member.City; this.Land = "Nederland"; this.Rekeningnummer = member.accountNumber.Trim(); this.Inschrijfdatum = member.joinDate; if (member.studentNumber.ToString() != "") { var first = member.studentNumber.First(); switch (first) { case 'R': this.Kenmerk = member.studentNumber.Remove(0, 3).Trim(); break; case 'H': var x = member.studentNumber; var y = x.Remove(0, 2); var z = y.Trim(); this.Kenmerk = z; break; case 'G': this.Kenmerk = member.studentNumber.Remove(0, 1).Trim(); break; default: this.Kenmerk = member.studentNumber.Trim(); break; } } this.Omschrijving = $"Incasso/collection {IncassoNumber} 2018-2019"; this.Incassodatum = IncassoDate; }