Example #1
0
        public override DBXml RemovePreviousVersion(DBXml dbXml)
        {
            if (dbXml.Table(MainObjectTag).Rows.Count() == 0)
            {
                return(dbXml);
            }

            var deletedRows = dbXml.Table(MainObjectTag).Rows.Where(r => r.Action == DBRowState.Delete);

            if (deletedRows.Count() > 0)
            {
                foreach (var row in deletedRows)
                {
                    row.RemovePreviousVersion();
                }
            }
            else
            {
                dbXml.RemovePreviousVersion();
            }

            return(dbXml);
        }
Example #2
0
 /// <summary>
 /// Removes the previous version number from database xml.
 /// </summary>
 /// <param name="dbXml">The db XML.</param>
 /// <returns>Specified database xml without previous version number.</returns>
 public virtual DBXml RemovePreviousVersion(DBXml dbXml)
 {
     dbXml.RemovePreviousVersion();
     return(dbXml);
 }