Exemple #1
0
        /// <summary>
        /// build fun for class/window ,get parmeters to how to build the window
        /// </summary>
        /// <param name="mother">mother of child</param>
        /// <param name="num">num for choose the current option</param>
        /// <param name="id">id of nanny</param>
        public Results(Mother mother, int num, int id)
        {
            InitializeComponent();
            bl       = new BL.BL_imp();
            temp_mom = mother;

            try
            {
                if (num == 1)
                {
                    this.listNannies.DataContext = bl.properList(mother);
                }
                if (num == 0)
                {
                    this.listNannies.DataContext = bl.Nannies_around(mother);
                }
                if (num == 2)
                {
                    foreach (Contract item in bl.getNanny(id).MyContract)
                    {
                        new Contract_Menu(item).Show();
                    }
                }
            }
            catch (FormatException)
            {
                MessageBox.Show("בדוק את הקלט");
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }