Beispiel #1
0
 private void populateFields()
 {
     btnAdd.Enabled      = false;
     btnAdd.FlatStyle    = FlatStyle.Standard;
     btnUpdate.Enabled   = true;
     btnUpdate.FlatStyle = FlatStyle.Flat;
     btnDelete.Enabled   = true;
     btnDelete.FlatStyle = FlatStyle.Flat;
     eventPresenter.prepareEvent(event_id, txtEventName, txtVenue, dateFrom, dateTo,
                                 timeFrom, timeTo, txtStudentRegistrationFee, txtStudentSlots, txtEventDetails, checkGuests,
                                 txtGuestRegistrationFee, txtGuestSlots, switchIsActivated, lblSwitchStatus);
 }
Beispiel #2
0
        private void populateFields()
        {
            btnAdd.Text         = "Cancel";
            btnUpdate.Enabled   = true;
            btnUpdate.FlatStyle = FlatStyle.Flat;
            btnDelete.Enabled   = true;
            btnDelete.FlatStyle = FlatStyle.Flat;
            if (position != "Adviser")
            {
                if (eventPresenter.checkEventStatus(event_id))
                {
                    eventPresenter.prepareEvent(event_id, txtEventName, txtVenue,
                                                dateFrom, dateTo, timeFrom, timeTo, txtStudentRegistrationFee, txtStudentSlots, txtEventDetails,
                                                checkGuests, txtGuestRegistrationFee, txtGuestSlots, switchIsActivated, lblSwitchStatus);
                }
                else
                {
                    MessageBox.Show("Action restricted. Please wait until event is activated", "Events", MessageBoxButtons.OK, MessageBoxIcon.Information);
                }
            }
            else
            {
                eventPresenter.prepareEvent(event_id, txtEventName, txtVenue, dateFrom, dateTo,
                                            timeFrom, timeTo, txtStudentRegistrationFee, txtStudentSlots, txtEventDetails, checkGuests,
                                            txtGuestRegistrationFee, txtGuestSlots, switchIsActivated, lblSwitchStatus);
            }

            if (checkGuests.Checked)
            {
                groupGuests.Enabled = true;
            }
            else
            {
                groupGuests.Enabled = false;
            }
        }