/// <summary>
        /// add host to system
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void bt_HostRegist_Click(object sender, RoutedEventArgs e)
        {
            BO.Host host = new BO.Host();
            if (tbIdHost.Text.Length == 0 || tbAccountNum.Text.Length == 0 || tbBranchNum.Text.Length == 0 || tbBankNum.Text.Length == 0)
            {
                MessageBox.Show("אחד השדות או יותר חסרים :");
                return;
            }
            host.AccountDetails = new BankBranch()
            {
                AccuontNumber = int.Parse(tbAccountNum.Text),
                BranchNumber  = int.Parse(tbBranchNum.Text),
                BankNumber    = int.Parse(tbBankNum.Text),
            };


            host.CollectionClearance = cb_permission.IsChecked.Value;
            host.WebSite             = tbWebSite.Text;
            host.MyOrders            = new List <BO.Order>();
            host.MyUnits             = new List <BO.HostingUnit>();
            host.HostInfo            = new Person()
            {
                Email     = tbMailHost.Text,
                Address   = "",
                FirstName = tbFirstNameHost.Text,
                Id        = int.Parse(tbIdHost.Text),
                LastName  = tbLastNameHost.Text,
                Phone     = tbPhoneHost.Text,
                Password  = tbPassword1Host.Password,
                Status    = BO.PersonStatus.ACTIVE,
            };


            try
            {
                bl.GetHost(host.HostInfo.Id);
                MessageBox.Show("המשתמש קיים במערכת ");
                ClearTextBox();
                HostLogBorder.Visibility = Visibility.Hidden;
            }
            catch
            {
                try
                {
                    Person per = bl.GetPerson(host.HostInfo.Id);
                    bl.UpdatePerson(host.HostInfo);
                    bl.AddHost(host);
                }
                catch
                {
                    bl.AddPerson(host.HostInfo);
                    bl.AddHost(host);
                }

                MessageBox.Show("נרשמת בהצלחה למערכת");
                ClearTextBox();
                HostLogBorder.Visibility = Visibility.Hidden;
            }
        }
 private void registHostButton_Click(object sender, RoutedEventArgs e)
 {
     if (idTextBox1.Text == "0" || firstNameTextBox1.Text.Length == 0 || lastNameTextBox1.Text.Length == 0 ||
         emailTextBox1.Text.Length == 0 || passwordPasswordBox1.Password.Length == 0)
     {
         MessageBox.Show("אחד השדות או יותר חסרים :");
         return;
     }
     try
     {
         host.HostInfo.Password = passwordPasswordBox1.Password;
         try
         {
             bl.AddPerson(host.HostInfo);
         }
         catch (Exception)
         {
         }
         bl.AddHost(host);
         MessageBox.Show("נרשמת בהצלחה למערכת");
         ClearTextBox();
         TabControl_Main.SelectedIndex = 0;
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
         ClearTextBox();
         TabControl_Main.SelectedIndex = 0;
     }
 }