private void ButtonBack_Click(object sender, RoutedEventArgs e)
        {
            Window_Password a = new Window_Password();

            a.Show();
            this.Close();
        }
Example #2
0
        private void Sumbit_Click(object sender, RoutedEventArgs e)
        {
            if ((IDFill.Text == "207590225" || IDFill.Text == "318795093") && PasswordFill.Text == "111111111")//if it is the admin,efrat or talya
            {
                Admin_Window ad = new Admin_Window();
                ad.Show();
                this.Close();
                return;
            }
            try
            {
                if (((ComboBoxItem)ComboBox_of_HostOrGuest.SelectedItem) != null)
                {
                    switch (((ComboBoxItem)ComboBox_of_HostOrGuest.SelectedItem).Content.ToString())
                    {
                    case " אורח ":
                    {
                        MyGuest temp = bl.getMyGuest(bl.FindMyGuest(IDFill.Text));
                        if (temp.Password != PasswordFill.Text)
                        {
                            MessageBox_Project x = new MessageBox_Project(":שִׂים לֵב ", "סיסמתך אינה נכונה");
                            x.ShowDialog();
                        }
                        Guest_Window(temp);
                        break;
                    }

                    case " מארח ":
                    {
                        MyHost temp = bl.getMyHost(bl.FindMyHost(IDFill.Text));
                        if (temp.Password_host != PasswordFill.Text)
                        {
                            MessageBox_Project x = new MessageBox_Project(":שִׂים לֵב ", "סיסמתך אינה נכונה אנא נסה שוב");
                            x.ShowDialog();
                        }
                        else
                        {
                            MyHostWindow hostWindow = new MyHostWindow(temp);
                            hostWindow.Show();
                            Close();
                        }

                        break;
                    }
                    }
                }
                else
                {
                    MessageBox_Project x = new MessageBox_Project(":שִׂים לֵב ", "לא מילאת את כל הפרטים " + "\n" + "אנא מלא שוב את כל הפרטים");
                    x.ShowDialog();

                    Window_Password window = new Window_Password();
                    window.Show();
                }
            }
            catch (ArgumentException exp)
            {
                MessageBox.Show(exp.Message);
            }
        }
Example #3
0
        private void Admin_Click(object sender, RoutedEventArgs e)
        {
            Window_Password ad = new Window_Password();

            ad.Show();
            Close();
        }
        private void Sumbit_Click(object sender, RoutedEventArgs e)
        {
            This_Host.FhoneNumber         = FhoneFill.Text.ToString();
            This_Host.MailAddress         = email.Text.ToString();
            This_Host.BankAccountNumber   = Convert.ToInt32(BankAccountNumberFill.Text);
            This_Host.CollectionClearance = CheckEnums.CheckYes_Or_No(ComboBox_of_YesOrNo.SelectionBoxItem.ToString());

            BankBranch BankAccuont = new BankBranch();

            BankAccuont.BankName      = BankNameFill.Text.ToString();
            BankAccuont.BankNumber    = int.Parse(BankAccountNumberFill.Text); // מספר חשבון בנק
            BankAccuont.BranchNumber  = int.Parse(BankNumberFill.Text);        //מספר סניף
            BankAccuont.BranchAddress = BranchAddressFill.Text.ToString();
            BankAccuont.BranchCity    = BranchCityFill.Text.ToString();

            This_Host.BankAccuont = BankAccuont;

            bl.AddHost(this.This_Host);


            Window_Password window = new Window_Password();

            window.Show();
            this.Close();
        }
Example #5
0
        private void Sumbit_Click(object sender, RoutedEventArgs e)
        {
            This_Guest.FirstName = FirstNameFill.Text.ToString();
            This_Guest.LastName  = LastNameFill.Text.ToString();
            This_Guest.Id        = IdFill.Text.ToString();
            This_Guest.Password  = PasswordFill.Text.ToString();
            bl.AddGuest(this.This_Guest);
            Close();

            Window_Password window = new Window_Password();

            window.Show();
        }