public UserControl_AddSchedule(Appointment selectedAppt, UserControl_ScheduleView parentUC)
        {
            InitializeComponent();

            schedule = new Schedule();

            sidLabel.Content = selectedAppt.Url;

            startDateTimePicker.SelectedValue = selectedAppt.Start;
            endDateTimePicker.SelectedValue = selectedAppt.End;

            EmpID.Text = selectedAppt.Body;

            wards = Ward.GetWards();
            WardName.ItemsSource = wards;

            foreach (Ward i in wards)
            {
                if ((selectedAppt.Location.ToString()).CompareTo(i.WardName.ToString()) == 0)
                {
                    WardName.SelectedItem = i;
                }
            }

            employee = Employee.GetEmployees();

            foreach (Employee i in employee)
            {
                EmpID.Items.Add(i.Fname);
            }

            foreach (Employee i in employee)
            {
                if (selectedAppt.Body.CompareTo(i.Eid.ToString()) == 0)
                {
                    EmpID.SelectedItem = i.Fname;
                }
            }

            _isSelected = true;
            SaveButton.Click += SaveButton_Click;
            CancelButton.Click += CancelButton_Click;
            ParentScheduleWindow = parentUC as UserControl_ScheduleView;
        }
        public UserControl_AddSchedule(Slot selectedSlot, UserControl_ScheduleView parentUC)
        {
            InitializeComponent();
            sidLabel.Content = Schedule.GenerateNextSid();
            schedule = new Schedule();

            startDateTimePicker.SelectedValue = selectedSlot.Start;
            endDateTimePicker.SelectedValue = selectedSlot.End;

            wards = Ward.GetWards();
            WardName.ItemsSource = wards;
            WardName.SelectedIndex = 0;

            employee = Employee.GetEmployees();
            foreach(Employee i in employee){
                EmpID.Items.Add(i.Fname);
            }
            EmpID.SelectedIndex = 0;

            SaveButton.Click += SaveButton_Click;
            CancelButton.Click += CancelButton_Click;

            ParentScheduleWindow = parentUC as UserControl_ScheduleView;
        }