Ejemplo n.º 1
0
        private static void CopyAttributes(CremaDataRow sourceRow, CremaDataRow destRow)
        {
            var sourceTable = sourceRow.Table;

            foreach (var item in sourceTable.Attributes)
            {
                if (item.AttributeName == CremaSchema.Index)
                {
                    continue;
                }
                var sourceValue = sourceRow.GetAttribute(item.AttributeName);
                destRow.SetAttribute(item.AttributeName, sourceValue);
            }
        }
Ejemplo n.º 2
0
        //[Obsolete("for 2.0")]
        private void ReadModifiedDateTimeVersion2(CremaDataTable dataTable, CremaDataRow dataRow)
        {
            if (this.version.Major >= CremaSchema.MajorVersion)
            {
                return;
            }

            var dateTimeValue = dataRow.GetAttribute(CremaSchema.ModifiedDateTime);

            if (dateTimeValue == DBNull.Value)
            {
                return;
            }

            var dateTime  = (DateTime)dateTimeValue;
            var userValue = dataRow.GetAttribute(CremaSchema.Modifier);
            var user      = userValue is DBNull ? string.Empty : userValue as string;

            if (dateTime > dataTable.ContentsInfo.DateTime)
            {
                dataTable.InternalContentsInfo = new SignatureDate(user, dateTime);
            }
        }