internal bool DeleteIntegration(Guid intlistid, out string message)
        {
            message = "";
            if (_core.RemoveIntegration(intlistid, ListId, out message))
            {
                Hashtable hshProps = new Hashtable();
                hshProps.Add("intlistid", intlistid);


                string sql = "SELECT SITE_ID,WEB_ID,LIST_ID, INT_COLID from INT_LISTS where INT_LIST_ID=@intlistid";

                DataSet ds     = _core.GetDataSet(sql, hshProps);
                DataRow dr     = ds.Tables[0].Rows[0];
                Guid    listid = new Guid(dr["LIST_ID"].ToString());
                string  colid  = "INTUID" + dr["INT_COLID"].ToString();
                Guid    SiteId = new Guid(dr["SITE_ID"].ToString());
                Guid    WebId  = new Guid(dr["WEB_ID"].ToString());

                sql = "DELETE FROM INT_LISTS where INT_LIST_ID=@intlistid";

                _core.ExecuteQuery(sql, hshProps, false);


                sql = "DELETE FROM INT_LOG where INT_LIST_ID=@intlistid";
                _core.ExecuteQuery(sql, hshProps, false);

                sql = "DELETE FROM INT_COLUMNS where INT_LIST_ID=@intlistid";
                _core.ExecuteQuery(sql, hshProps, false);

                sql = "DELETE FROM INT_PROPS where INT_LIST_ID=@intlistid";
                _core.ExecuteQuery(sql, hshProps, true);

                using (SPSite site = new SPSite(SiteId))
                {
                    using (SPWeb web = site.OpenWeb(WebId))
                    {
                        web.AllowUnsafeUpdates = true;
                        SPList  list  = web.Lists[listid];
                        SPField field = null;
                        try
                        {
                            field = list.Fields.GetFieldByInternalName(colid);
                        }
                        catch { }

                        if (field != null)
                        {
                            field.Hidden = false;
                            field.Update();
                            list.Fields.Delete(field.InternalName);
                        }
                        list.Update();

                        RemoveEventHandlers(list);
                    }
                }

                _core.UpdatePriorityNumbers(listid);
                return(true);
            }
            else
            {
                return(false);
            }
        }