Exemplo n.º 1
0
            protected override void Execute(Csla.Rules.IRuleContext context)
            {
                var input = (string)context.InputPropertyValues[PrimaryProperty];

                if (string.IsNullOrEmpty(input))
                {
                    context.AddOutValue(_clearProperty, null);
                }
            }
Exemplo n.º 2
0
            protected override void Execute(Csla.Rules.IRuleContext context)
            {
                var sender = (Root)context.Target;

                using (sender.BypassPropertyChecks)
                {
                    var value = (string)context.InputPropertyValues[PrimaryProperty];
                    if (!string.IsNullOrEmpty(value))
                    {
                        context.AddOutValue(PrimaryProperty, value.ToUpper());
                    }
                }
            }