public PersonalForm(IWorkshopLogic wslogic, IWorkshopCRUDLogic workshopcrudlogic, IPersonLogic personlogic, IEnrollmentRequest er) { InitializeComponent(); this.wslogic = wslogic; this.wscrudlogic = workshopcrudlogic; this.personlogic = personlogic; this.erlogic = er; erlogic.EnrollmentRequestStatusChangeEvent += new IEnrollmentRequest.EnrollmentRequestStatusHandler(erstatuschange_notification); wslogic.ParticipantsLimitEvent += new IWorkshopLogic.ParticipantsLimitHandler(partlimit_notification); }
public WorkshopInfoForm(IWorkshopCRUDLogic wscrudlogic, IWorkshopLogic wslogic, Workshop ws) { InitializeComponent(); this.wscrudlogic = wscrudlogic; this.ws = ws; this.wslogic = wslogic; if (ws is OnlineWks) { lblWsInfo.Text = $"Date: {ws.Time}\nTitle: {ws.Title}\nTopic: {ws.Topic}\nCapacity: {ws.MaxParticipants}\nTeacher: {ws.Teacher}\nLink: {((OnlineWks)ws).Link}"; } else { lblWsInfo.Text = $"Date: {ws.Time}\nTitle: {ws.Title}\nTopic: {ws.Topic}\nCapacity: {ws.MaxParticipants}\nTeacher: {ws.Teacher}\nAddress: {((InBuildingWks)ws).Address}\nRoom: {((InBuildingWks)ws).RoomNum}"; } FillParticipantsLB(); }
public ReceptionistForm() { InitializeComponent(); wslogic = new WorkshopLogic(); wscrudlogic = new WorkshopCRUDLogic(); personlogic = new PersonLogic(); enrollmentreq = new EnrollmentRequestLogic(); PersonalForm pf = new PersonalForm(wslogic, wscrudlogic, personlogic, enrollmentreq); pf.Show(); comboBoxTypeWsMan.SelectedIndex = 0; comboBoxPersonRole.SelectedIndex = 0; enrollmentreq.EnrollmentRequestEvent += new IEnrollmentRequest.EnrollmentRequestHandler(enrollmentrequest_notification); //Dummy data personlogic.AddPerson(new Teacher("John", "Teacher", "159357")); personlogic.AddPerson(new Student("Sarah", "Student", "159359")); wscrudlogic.AddWorkshop(new OnlineWks("An Online Workshop", "How to give online workshops", DateTime.Now, 5, (Teacher)personlogic.GetPerson("159357"), "somelink")); UpdateLBER(); UpdateWSListbox(); UpdatePeopleListbox(); }