//Constructs a new Edit form for a new entry or an edit session...
        public Form_Edit_New(MainForm mainForm, List<Member> members)
        {
            InitializeComponent();
            parentForm = mainForm;
            memberImpl = new MemberImpl();
            converter = new Converter();

            this.cbxSex.Items.AddRange(new Object[] { Gender.Female.ToString(), Gender.Male.ToString() });
            this.cbxCity.Items.AddRange(new Object[]{Province.Anvers.ToString(), Province.Bruxelles.ToString(),
                Province.Charleroi.ToString(), Province.Liège.ToString(), Province.Namur.ToString(),
                Province.Etranger.ToString()});
            if (members != null)
            {
                this.NewRecord = false;
                this.btnSave.Enabled = true;
                this.editMembers = members;
                this.editMembers.Reverse();
                this.activeMemberIndex = 0;
                this.zapper(activeMemberIndex);
                this.btnZapperNext.Enabled = true;
                this.btnZapperPrev.Enabled = true;
            }
            else
            {
                this.NewRecord = true;
                this.editMembers = null;
                this.btnSave.Enabled = false;
                this.btnZapperNext.Enabled = false;
                this.btnZapperPrev.Enabled = false;
                this.lblZapper.Text = "1/1";
            }
        }
Esempio n. 2
0
 public Management(MainForm mainForm)
 {
     InitializeComponent();
     parentForm = mainForm;
     meetingImpl = new MeetingImpl();
     memberImpl = new MemberImpl();
     attendanceImpl = new AttendanceImpl();
 }
Esempio n. 3
0
        public MailSender(MainForm mainForm)
        {
            InitializeComponent();
            this.parentForm = mainForm;
            memberImpl = new MemberImpl();
            recipients = parentForm.SelectedMembers;
            foreach (Member member in recipients) {
                this.txtReceiver.Text += member.Email + ", ";
            }

            //This code autocompletes the receiver's details...but only the first!
            AutoCompleteStringCollection source = new AutoCompleteStringCollection();
            List<Member> recipientsAuto = memberImpl.getAllMembers();
            foreach (Member member in recipientsAuto)
            {
                source.Add(member.Lastname + " " + member.Firstname + ": " + member.Email);
            }
            this.txtReceiver.AutoCompleteCustomSource = source;
            this.txtReceiver.AutoCompleteMode = AutoCompleteMode.SuggestAppend;
            this.txtReceiver.AutoCompleteSource = AutoCompleteSource.CustomSource;
        }