Example #1
0
        public CtrlGuests()
        {
            InitializeComponent();
            guestPresenter = new GuestPresenter();
            guestPresenter.setEvents(cmbEvents);

            btnUpdate.Enabled   = false;
            btnUpdate.FlatStyle = FlatStyle.Standard;
            btnDelete.Enabled   = false;
            btnDelete.FlatStyle = FlatStyle.Standard;
        }
Example #2
0
        private void CtrlEventDetails_Load(object sender, EventArgs e)
        {
            eventDetailsPresenter = new EventDetailsPresenter();
            guestPresenter        = new GuestPresenter();
            th.setLabelColor(lblEventName);
            th.setLabelColor(lblDateAndTime);
            th.setLabelColor(lblStudentSlots);
            th.setLabelColor(lblStudentRegistrationFee);
            th.setLabelColor(lblGuestSlots);
            th.setLabelColor(lblGuestRegistrationFee);

            eventDetailsPresenter.populateEventDetails(event_id, this, lblEventName, lblDateAndTime, lblStudentSlots,
                                                       lblStudentRegistrationFee, lblGuestSlots, lblGuestRegistrationFee);
            loadData();

            triggerFormChange();
        }
Example #3
0
        public FrmGuests(string mode, int id)
        {
            InitializeComponent();
            th             = new ThemeHelper();
            guestPresenter = new GuestPresenter();
            th.setFormColor(this);
            th.setPanelColor(panelTop);
            th.setGroupBoxColor(groupPersonalInfo);
            th.setGroupBoxColor(groupSchoolInfo);
            th.setGroupBoxColor(groupWorkInfo);
            th.setButtonColor(btnAdd);
            th.setButtonColor(btnUpdate);
            th.setButtonColor(btnDelete);

            th.setRadioButtonColor(rbnStudent);
            th.setRadioButtonColor(rbnWorking);
            th.setRadioButtonColor(rbnMale);
            th.setRadioButtonColor(rbnFemale);

            th.setLabelColor(lblFirstName);
            th.setLabelColor(lblMiddleName);
            th.setLabelColor(lblLastName);
            th.setLabelColor(lblAddress);
            th.setLabelColor(lblEvents);
            th.setLabelColor(lblContactNo);
            th.setLabelColor(lblEmailAddress);
            th.setLabelColor(lblSchoolName);
            th.setLabelColor(lblCourse);
            th.setLabelColor(lblYear);
            th.setLabelColor(lblWorksAt);
            th.setLabelColor(lblPosition);

            guestPresenter.setEvents(cmbEvents);

            if (mode == "form")
            {
                btnAdd.Text   = "Add";
                lblTitle.Text = "GUEST FORM";
                this.Text     = lblTitle.Text;
                if (id != 0)
                {
                    guest_id = id;
                    populateFields();
                }
                else
                {
                    btnUpdate.Enabled   = false;
                    btnUpdate.FlatStyle = FlatStyle.Standard;
                    btnDelete.Enabled   = false;
                }
            }
            else
            {
                //int event_id = guestPresenter.eventID(cmbEvents.Text);
                //cmbEvents.Text = guestPresenter.getEventName(int.Parse(mode));
                activation        = false;
                cmbEvents.Text    = mode;
                cmbEvents.Enabled = false;
                btnAdd.Text       = "Register";
                lblStatus.Hide();
                switchIsActivated.Hide();
                lblSwitchStatus.Hide();
                this.Size = new Size(616, 580);
            }
        }