示例#1
0
        public bool AttributesHaveDifferentValues(PgM.PgAttributes.PgAttributeM attrLeft, PgM.PgAttributes.PgAttributeM attrRight)
        {
            bool attrLeftIsNull  = AttributeIsNullOrEmpty(attrLeft);
            bool attrRightIsNull = AttributeIsNullOrEmpty(attrRight);

            if (attrLeftIsNull && attrRightIsNull)
            {
                return(false);
            }
            else if (attrRightIsNull != attrLeftIsNull)
            {
                return(true);
            }
            else
            {
                if (attrLeft.Value.ToString() == attrRight.Value.ToString())
                {
                    return(false);
                }
                else
                {
                    return(true);
                }
            }
        }
示例#2
0
 public PgAttributesStyleVM(PgAtVM.PgAttributesVM attributeVM)
 {
     _attributeVM = attributeVM;
     _isDebug     = attributeVM.IsDebug;
     _connect     = attributeVM.Connect;
     _isReadOnly  = attributeVM.IsReadOnly;
     _table       = attributeVM.Table;
     _pkAttribute = attributeVM.AttributesListVM.PkAttribute;
     _style       = new PgM.PgStyleObjectM(_table, _pkAttribute.Value);
 }
示例#3
0
 public bool AttributeIsNullOrEmpty(PgM.PgAttributes.PgAttributeM attr)
 {
     return(attr == null || attr.Value == null || attr.Value == DBNull.Value || String.IsNullOrEmpty(attr.Value.ToString()));
 }