Пример #1
0
        private void ForceValidation()
        {
            if (NoNIPCheckBox.IsChecked == false)
            {
                NIPTextBox.GetBindingExpression(TextBox.TextProperty)?.UpdateSource();
            }

            if (NoREGONCheckBox.IsChecked == false)
            {
                REGONTextBox.GetBindingExpression(TextBox.TextProperty)?.UpdateSource();
            }

            if (NoBankAccountCheckBox.IsChecked == false)
            {
                BankAccountNumberTextBox.GetBindingExpression(TextBox.TextProperty)?.UpdateSource();
            }

            CustomerNameTextBox.GetBindingExpression(TextBox.TextProperty)?.UpdateSource();
            CityTextBox.GetBindingExpression(TextBox.TextProperty)?.UpdateSource();
            ZipCodeTextBox.GetBindingExpression(TextBox.TextProperty)?.UpdateSource();
            FlatNumberTextBox.GetBindingExpression(TextBox.TextProperty)?.UpdateSource();
            StreetNumberTextBox.GetBindingExpression(TextBox.TextProperty)?.UpdateSource();
            StreetTextBox.GetBindingExpression(TextBox.TextProperty)?.UpdateSource();
            PhoneNumberTextBox.GetBindingExpression(TextBox.TextProperty)?.UpdateSource();
        }
Пример #2
0
 private void NoBankAccountCheckBox_Checked(object sender, RoutedEventArgs e)
 {
     if (NoBankAccountCheckBox.IsChecked == true)
     {
         var binding = BankAccountNumberTextBox?.GetBindingExpression(TextBox.TextProperty);
         Validation.ClearInvalid(binding);
     }
     EnableControls(sender, BankAccountNumberTextBox);
 }
Пример #3
0
        private void SaveHostDetails_Click(object sender, RoutedEventArgs e)
        {
            BankNameTextBox.GetBindingExpression(TextBox.TextProperty).UpdateSource();
            BankNumTextBox.GetBindingExpression(TextBox.TextProperty).UpdateSource();
            BranchNumberTextBox.GetBindingExpression(TextBox.TextProperty).UpdateSource();
            BranchAddressTextBox.GetBindingExpression(TextBox.TextProperty).UpdateSource();
            BankAccountNumberTextBox.GetBindingExpression(TextBox.TextProperty).UpdateSource();
            //hostingUnit.Owner.BankBranchDetails.CollectionClearance = (CollectionClearanceCheckBox.IsChecked);

            AddHostingUnit_UserControl addHostingUnit_UserControl = new AddHostingUnit_UserControl(hostingUnit);

            (this.Parent as StackPanel).Children.Add(addHostingUnit_UserControl);
            (this.Parent as StackPanel).Children.Remove(this);
        }