Exemplo n.º 1
0
 public MeetingCreationConfirmationView(MainForm parent, Meeting meeting)
 {
     parentForm     = parent;
     currentMeeting = meeting;
     meetingManager = new MeetingManager();
     InitializeComponent();
     NewMeetingLabel.Text = meeting.title;
 }
Exemplo n.º 2
0
        private void YesButton_Click(object sender, EventArgs e)
        {
            parentForm.ToggleButtons(true);
            parentForm.Controls.Remove(this);
            MeetingManager meetingManager = new MeetingManager();

            meetingManager.RemoveMeeting(currentMeeting, parentForm.GetSelectedDate());
            parentForm.UpdateMeetingsPanel();
        }
 public MeetingEditConfirmationView(MainForm parent, Meeting newMeeting, Meeting oldMeeting)
 {
     parentForm      = parent;
     this.oldMeeting = oldMeeting;
     currentMeeting  = newMeeting;
     meetingManager  = new MeetingManager();
     InitializeComponent();
     NewMeetingLabel.Text = newMeeting.title;
     UpdateCreateMeetingButton();
 }
        private void ShowDailyMeetings()
        {
            MeetingsPanel.Controls.Clear();

            string date = GetSelectedDate();

            MeetingManager meetingManager = new MeetingManager();

            Meeting[] meetings = currentUser.rank == User.Rank.Manager ? meetingManager.GetDailyMeetings(date) : meetingManager.GetDailyMeetingsForUser(currentUser, date);

            foreach (Meeting meeting in meetings)
            {
                AddMeeting(meeting);
            }
        }
        private void ShowMonthlyMeetings()
        {
            string month = Calendar.SelectionEnd.Month.ToString();
            string year  = Calendar.SelectionEnd.Year.ToString();

            MeetingsPanel.Controls.Clear();

            MeetingManager meetingManager = new MeetingManager();

            Meeting[] meetings = currentUser.rank == User.Rank.Manager ? meetingManager.GetMonthlyMeetings(month, year) : meetingManager.GetMonthlyMeetingsForUser(currentUser, month, year);

            foreach (Meeting meeting in meetings)
            {
                AddMeeting(meeting, true);
            }
        }
        private void SaveMeetingButton_Click(object sender, EventArgs e)
        {
            string title       = currentMeeting.title;
            string location    = GetLocation();
            string startTime   = currentMeeting.startTime;
            string endTime     = currentMeeting.endTime;
            string attendees   = GetAttendees();
            string description = currentMeeting.description;

            Meeting newMeeting = new Meeting(title, location, startTime, endTime, attendees, description, currentMeeting.date);

            MeetingManager meetingManager = new MeetingManager();

            meetingManager.UpdateMeeting(oldMeeting, newMeeting, parentForm.GetSelectedDate(), parentForm);
            parentForm.UpdateMeetingsPanel();

            parentForm.ToggleButtons(true);
            parentForm.Controls.Remove(this);
        }