private static void setTo(SynapseInterface Int)
        {
            ReportOrigin _reportOrigin = new ReportOrigin();

            _reportOrigin.ORIGIN              = Origin.Interface;
            _reportOrigin.TECHNICALNAME       = Int.TECHNICALNAME;
            _reportOrigin.DBTYPE              = (DatabaseType)Enum.Parse(typeof(DatabaseType), Int.DBTYPE, true);
            _reportOrigin.DBCONNECTION        = Int.TECHNICALNAME;
            _reportOrigin.FriendlyName        = new LabelBag();
            _reportOrigin.FriendlyName.Labels = new List <SynapseLabel>();

            foreach (SynapseLanguage lang in SynapseLanguage.LoadFromQuery("SELECT * FROM SYNAPSE_LANGUAGE ORDER BY CODE"))
            {
                SynapseLabel newlabel = new SynapseLabel();

                newlabel.LABELID  = 0;
                newlabel.LANGUAGE = lang.CODE;
                newlabel.TEXT     = Int.TECHNICALNAME;
                _reportOrigin.FriendlyName.Labels.Add(newlabel);
            }

            _reportOrigin._MODULEID        = 0;
            _reportOrigin.INTERFACEID      = Int.ID;
            _reportOrigin._TYPE            = Int.TYPE;
            _reportOrigin.CONNECTIONSTRING = Int.CONNECTIONSTRING;
            _reportOrigin.TABLESQUERY      = Int.TABLESQUERY;
            _reportOrigin.VIEWSQUERY       = Int.VIEWSQUERY;
            _reportOrigin.FIELDSQUERY      = Int.FIELDSQUERY;
            _reportOrigin.ORACLE_HOME      = Int.ORACLE_HOME;

            GlobalVariables.selectedOrigin = _reportOrigin;
        }
        private static void setTo(SynapseModule Mod)
        {
            ReportOrigin _reportOrigin = new ReportOrigin();

            _reportOrigin.ORIGIN           = Origin.Module;
            _reportOrigin.TECHNICALNAME    = Mod.TECHNICALNAME;
            _reportOrigin.DBTYPE           = DatabaseType.SQLServer;
            _reportOrigin.DBCONNECTION     = "Default";
            _reportOrigin.FriendlyName     = Mod.FriendlyName;
            _reportOrigin._MODULEID        = Mod.ID;
            _reportOrigin.INTERFACEID      = 0;
            _reportOrigin._TYPE            = 0;
            _reportOrigin.CONNECTIONSTRING = "";
            _reportOrigin.TABLESQUERY      = "";
            _reportOrigin.VIEWSQUERY       = "";
            _reportOrigin.FIELDSQUERY      = "";
            _reportOrigin.ORACLE_HOME      = "";

            GlobalVariables.selectedOrigin = _reportOrigin;
        }