Ejemplo n.º 1
0
        public void DeleteAllObjectsByObjectParentID(int iObjectParentID)
        {
            string primaryKeyColumn = SqlDatabaseHelper.GetPrimaryKeyColumn(this.TableName);
            string strColumnName    = primaryKeyColumn.Substring(0, primaryKeyColumn.Length - 2) + "ParentID";

            if (!SqlDatabaseHelper.ColumnIsExistInTable(this.TableName, strColumnName))
            {
                return;
            }
            SqlDatabaseHelper.RunQuery(SqlDatabaseHelper.GetQuery(string.Format("Update [{0}] Set AAStatus = 'Delete' Where ([{1}]={2}) And ({2}>0)", (object)this.TableName, (object)strColumnName, (object)iObjectParentID)));
        }