private void Add_Host_button_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                MainWindow.IsEmpty(familyNameTextBox.Text);
                MainWindow.IsValidEmailAddress(mailAddressTextBox.Text);
                MainWindow.IsEmpty(mailAddressTextBox.Text);
                MainWindow.IsEmpty(passwordTextBox.Text);
                MainWindow.IsEmpty(phoneNumberTextBox.Text);
                MainWindow.IsEmpty(privateNameTextBox.Text);

                bank.BankAccountNumber = Int32.Parse(Bank_Number_Textbox.Text);
                host.HostBankAccuont   = bank;
                host.HostKey           = BE.Configuration.getNewHostKey();
                myIBL.NewHost(host);
                MessageBox.Show("Host added Successfuly.  key: " + host.HostKey);
                this.Close();
                Window Manger_Hosts_win = new Manger_Hosts_win();
                Manger_Hosts_win.Show();
            }

            catch (Exception exp)
            {
                MessageBox.Show(exp.Message);
            }
        }
Ejemplo n.º 2
0
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                if (MainWindow.IsEmpty(Delete_Textbox.Text))
                {
                    if (MainWindow.IsInt(Delete_Textbox.Text))
                    {
                        myIBL.DeleteHost(myIBL.SearchForHostByKey(Int32.Parse(Delete_Textbox.Text)));
                    }
                }
                MessageBox.Show("Deleted successfully.");
                this.Close();

                Window Manger_Hosts_win = new Manger_Hosts_win();
                Manger_Hosts_win.Show();
            }
            catch (Exception exp)
            {
                MessageBox.Show(exp.Message);
            }
        }
Ejemplo n.º 3
0
        private void Button_Click_1(object sender, RoutedEventArgs e)
        {
            Window Manger_Hosts_win = new Manger_Hosts_win();

            Manger_Hosts_win.Show();
        }