Esempio n. 1
0
 private void Button_Click(object sender, RoutedEventArgs e)
 {
     MainWindow.IsEmpty(Commission_textbok.Text);
     MainWindow.IsInt(Commission_textbok.Text);
     BE.Configuration.Commission = Int32.Parse(Commission_textbok.Text);
     this.Close();
 }
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                MainWindow.IsEmpty(HostNum.Text);
                MainWindow.IsEmpty(Passward.Password);
                MainWindow.IsInt(HostNum.Text);
                MainWindow.IsInt(Passward.Password);
                ibl = BL.Factory.GetBL();
                // BE.Host host = new BE.Host();
                Window HostEntryWindow = new HostEntryWindow();
                host             = ibl.SearchForHostByKey(Int32.Parse(HostNum.Text));
                this.DataContext = host;
                if (host.password == Int32.Parse(Passward.Password))
                {
                    HostEntryWindow.Show();
                    this.Close();
                }

                else
                {
                    MessageBox.Show("One of the detalis is not corect");
                }
            }
            catch (Exception E) { MessageBox.Show(E.Message); }
        }
        private void ___FinedGuestRequest_Button__Click(object sender, RoutedEventArgs e)
        {
            try
            {
                MainWindow.IsEmpty(___GuestRequest_key_textbox_.Text);
                MainWindow.IsInt(___GuestRequest_key_textbox_.Text);

                myIBL = BL.Factory.GetBL();
                int temp = Int32.Parse(___GuestRequest_key_textbox_.Text);
                guestRequest = myIBL.SearchGetGuestRequestByKey(temp);
                if (MessageBox.Show("Are you sure you want to delete?", "Question", MessageBoxButton.YesNo, MessageBoxImage.Warning) == MessageBoxResult.No)
                {
                    this.Close();
                }
                else
                {
                    myIBL.DeleteGuestRequests(guestRequest);
                    this.Close();
                    MessageBox.Show("the guest Request have beet deleted");
                }
            }
            catch (Exception exp)
            {
                MessageBox.Show(exp.Message);
            }
        }
        private void ___FinedGuestRequest_Button__Click(object sender, RoutedEventArgs e)
        {
            try
            {
                myIBL = BL.Factory.GetBL();

                MainWindow.IsEmpty(___GuestRequest_key_textbox_.Text);
                MainWindow.IsInt(___GuestRequest_key_textbox_.Text);

                int temp = Int32.Parse(___GuestRequest_key_textbox_.Text);
                guestRequest = myIBL.SearchGetGuestRequestByKey(temp);

                Window Update_Guest_Request = new Update_Guest_Request();
                Update_Guest_Request.Show();
                this.Close();
            }
            catch (Exception exp)
            {
                MessageBox.Show(exp.Message);
            }
        }
Esempio n. 5
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);
            }
        }