Пример #1
0
        private void bussButton_Click(object sender, RoutedEventArgs e)
        {
            string username = userName.Text;
            string password = passWord.Password;

            auth = new Authentication(username, password);

            if (accBussName.Text == "" || accBranch.Text == "" || accBussType.Text == "" || accTown.Text == "" || accProvince.Text == "" || accCountry.Text == "" || accZipcode.Text == "" || accCreated.Text == "")
            {
                MessageBox.Show("Please Complete the Form", "Notice", MessageBoxButton.OK, MessageBoxImage.Warning);
            }
            else
            {
                // Add User
                auth.addUser(accPrivilege.Text, accNumber.Text);

                clientInfo.buss_name     = accBussName.Text;
                clientInfo.buss_branch   = accBranch.Text;
                clientInfo.buss_type     = accBussType.Text;
                clientInfo.buss_town     = accTown.Text;
                clientInfo.buss_province = accProvince.Text;
                clientInfo.buss_country  = accCountry.Text;
                clientInfo.buss_zipcode  = Convert.ToInt32(accZipcode.Text);

                clientInfo.registerClient();
                clientInfo.Clear();
                ClearTextbox();

                tabControlMain.SelectedIndex--;
            }
        }