Exemple #1
0
        /// <summary>
        /// Editace vybraneho meeting center
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void Button_MCenter_Edit(object sender, RoutedEventArgs e)
        {
            // je neco vybrano?
            // predat objekt k editaci
            if (listMeetingCenters.SelectedIndex == -1)
            {
                MessageBox.Show("Select Meeting Center first please.");
            }
            else
            {
                MeetingCenterWindow meetingCenterWindow = new MeetingCenterWindow();
                meetingCenterWindow.mc = (MeetingCenter)listMeetingCenters.SelectedItem;
                meetingCenterWindow.SetData();

                bool?result = meetingCenterWindow.ShowDialog();

                if (result == true)
                {
                    listMeetingCenters.Items.Refresh();
                }
                else
                {
                    // uzivatel nic neodeslal
                }
            }
        }
Exemple #2
0
        /// <summary>
        /// Pridani noveho Meeting Centeru
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void Button_MCenter_New(object sender, RoutedEventArgs e)
        {
            MeetingCenterWindow meetingCenterWindow = new MeetingCenterWindow();
            bool?result = meetingCenterWindow.ShowDialog();

            if (result == true)
            {
                data.meetingCenters.Add(new MeetingCenter(meetingCenterWindow.Name, meetingCenterWindow.Code, meetingCenterWindow.Description));
                listMeetingCenters.Items.Refresh();
            }
            else
            {
                // uzivatel nic neodeslal
            }
        }