Ejemplo n.º 1
0
        private Boolean ValidateSave()
        {
            BindingExpression betxtName = TxtName.GetBindingExpression(TextBox.TextProperty);

            if (betxtName != null)
            {
                betxtName.UpdateSource();
            }

            BindingExpression becmbProviders = CmbProviders.GetBindingExpression(Selector.SelectedItemProperty);

            if (becmbProviders != null)
            {
                becmbProviders.UpdateSource();
            }

            BindingExpression betxtConnectionString = TxtConnectionString.GetBindingExpression(TextBox.TextProperty);

            if (betxtConnectionString != null)
            {
                betxtConnectionString.UpdateSource();
            }

            Boolean hasErrors = Validation.GetHasError(TxtName) || Validation.GetHasError(CmbProviders) ||
                                Validation.GetHasError(TxtConnectionString);

            return(hasErrors);
        }