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); } } }
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); }
public bool AttributeIsNullOrEmpty(PgM.PgAttributes.PgAttributeM attr) { return(attr == null || attr.Value == null || attr.Value == DBNull.Value || String.IsNullOrEmpty(attr.Value.ToString())); }