Ejemplo n.º 1
0
 protected internal virtual void OnFieldDataChanged(Field sender, FieldDataChangeEventArgs args)
 {
     if (FieldDataChanged != null)
     {
         FieldDataChanged(sender, args);
     }
 }
Ejemplo n.º 2
0
        protected internal override void OnFieldDataChanged(Field sender, FieldDataChangeEventArgs args)
        {
            base.OnFieldDataChanged(sender, args);

            //recalculate business code according to this business rule
            if (m_fldBusinessCode.IsMutable)
            {
                //example of implicit value property access
                int hash = m_fldRating + 10 + (int)Math.Truncate(m_fldScore * 2D);
                string str = "Rating " + m_fldRating + " for " + m_fldName;

                m_fldBusinessCode.Value =
                 string.Format("[{0}] {1}-{2} {3}",
                   m_fldName.GetHashCode() + hash,
                   m_fldDOB.HasValue ? m_fldDOB : App.LocalizedTime,
                   ~m_fldRegistered,
                   str
                 );

            }
        }