示例#1
0
        private bool resetHiddenColumns()
        {
            DataManagerOption dmo = DataManagerOption.GetInstance(campaignID, queryID, true);

            dmo.resetHiddenColumns();
            return(true);
        }
示例#2
0
        private bool saveSettings(int id)
        {
            DataManagerOption dmo  = DataManagerOption.GetInstance(id);
            string            name = dmo.Name;

            dmo.delete();
            return(createNamedSettings(name));
        }
示例#3
0
        private bool updateColumnHidden()
        {
            DataManagerOption dmo = DataManagerOption.GetInstance(campaignID, queryID, true);
            DataManagerColumn dmc = dmo.getColumn(columnName);

            dmc.Hidden = hidden;
            dmc.save();
            return(true);
        }
示例#4
0
        private bool deleteNamedSettings(int id)
        {
            DataManagerOption dmo = DataManagerOption.GetInstance(id);

            dmo.delete();
            getNamedSettingsList(0);
            ajaxResponse.message = "Deleted Name Settings";
            return(true);
        }
示例#5
0
        // Updates the options for a given campaign and query
        private bool updateOption()
        {
            DataManagerOption dmo = DataManagerOption.GetInstance(campaignID, queryID, true);

            dmo.RowLimit   = rowLimit;
            dmo.SortActive = sortOn;
            if (sortColumn < 1)
            {
                sortColumn = 1;
            }
            dmo.SortColumn     = sortColumn;
            dmo.SortDirection  = sortDirection;
            dmo.ShowCSVHeaders = showCSVHeaders;
            dmo.save();
            return(true);
        }
示例#6
0
        private bool createNamedSettings(string name)
        {
            DataManagerOption dmo = DataManagerOption.GetInstance(campaignID, queryID, false);

            if (dmo != null)
            {
                dmo              = dmo.copy();
                dmo.QueryId      = 0;
                dmo.Name         = name;
                dmo.IsNamedQuery = 1;
                dmo.save();
                //getNamedSettingsList((int)dmo.Id);
                getNamedSettingsList(0);
                ajaxResponse.message = "Created Name Settings";
            }
            return(true);
        }
示例#7
0
        private bool loadSettings(int id)
        {
            DataManagerOption dmo = DataManagerOption.GetInstance(campaignID, queryID, false);

            if (dmo != null)
            {
                dmo.delete();
                dmo              = DataManagerOption.GetInstance(id);
                dmo              = dmo.copy();
                dmo.QueryId      = queryID;
                dmo.Name         = "";
                dmo.IsNamedQuery = 0;
                dmo.save();
                getNamedSettingsList((int)dmo.Id);
                ajaxResponse.message = "Loaded Name Settings";
            }
            return(true);
        }
示例#8
0
        private bool createQueryView(HttpContext context, int queryID, int sortOn, int sortColumn, int sortDirection)
        {
            DataManagerOption dmo = DataManagerOption.GetInstance(campaign.Id, queryID, true);

            ajaxResponse         = new AjaxResponse();
            ajaxResponse.message = "Query View Ready";
            QueryRunner queryRunner = new QueryRunner();

            queryRunner.columnWidth = 300;
            queryRunner.RunQuery(campaign, queryID, (int)dmo.SortActive, (int)dmo.SortColumn, (int)dmo.SortDirection);
            ajaxResponse.contents        = queryRunner.contents;
            ajaxResponse.tablePixelWidth = queryRunner.tableWidth.ToString();
            ajaxResponse.tableWidth      = queryRunner.colCount.ToString();
            ajaxResponse.tableHeight     = queryRunner.rowCount.ToString();
            ajaxResponse.tableColumns    = queryRunner.tableColumns;
            ajaxResponse.rowLimit        = dmo.RowLimit;
            ajaxResponse.sortOn          = dmo.SortActive.ToString();
            ajaxResponse.showCSVHeaders  = dmo.ShowCSVHeaders;
            ajaxResponse.rowKeys         = queryRunner.rowKeys;
            ajaxResponse.rowCount        = (queryRunner.rowCount - 1);
            ajaxResponse.sqlOptions      = queryRunner.queryOptions;
            ajaxResponse.error           = false;
            return(true);
        }