private void enterToSystem_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                BE.Nanny temp = null;
                temp = bl.searchNanny(this.idBox.Text);

                if (temp == null)
                {
                    throw (new Exception("no exist"));
                }

                if (temp.Password != this.passwordBox.Password)
                {
                    throw (new Exception("Incorrect password"));
                }


                existNanny exstNanny = new existNanny(temp);
                exstNanny.Show();
                this.idBox.Clear();
                this.passwordBox.Clear();
            }
            catch (Exception p)
            {
                MessageBox.Show(p.Message);
            }
        }
 public showNannyDetails(string idNanny, BE.Mother mm)
 {
     InitializeComponent();
     mom    = mm;
     bl     = BL.FactoryBL.getBL();
     newnan = bl.searchNanny(idNanny);
     this.mainGrid.DataContext = newnan;
     this.grid29.DataContext   = newnan;
     this.grid28.DataContext   = newnan;
     this.grid2.DataContext    = newnan;
     this.grid26.DataContext   = newnan;
     this.grid7.DataContext    = newnan;
     this.grid27.DataContext   = newnan;
     this.grid35.DataContext   = newnan;
 }