示例#1
0
        /// <summary>
        /// Event: when clicking on the button - go to the asked window.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void newMother_Click(object sender, RoutedEventArgs e)
        {
            Window newMother = new newMotherWindow();

            Close();
            newMother.ShowDialog();
        }
示例#2
0
        /// <summary>
        /// event - adding new object
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void Add_Click(object sender, RoutedEventArgs e)
        {
            if (Nannylist.IsChecked.Value)
            {
                Window add = new nanny_sign_up();
                add.ShowDialog();
            }

            if (Motherlist.IsChecked.Value)
            {
                Window add = new newMotherWindow();
                add.ShowDialog();
            }

            if (Childlist.IsChecked.Value)
            {
                MessageBox.Show("adding child must be through mother. select mother and click \"go to interface\"", "", MessageBoxButton.OK);
            }

            if (Contractlist.IsChecked.Value)
            {
                MessageBox.Show("adding contract must be through mother. select mother and click \"go to interface\"", "", MessageBoxButton.OK);
            }
        }