private bool resetHiddenColumns() { DataManagerOption dmo = DataManagerOption.GetInstance(campaignID, queryID, true); dmo.resetHiddenColumns(); return(true); }
private bool saveSettings(int id) { DataManagerOption dmo = DataManagerOption.GetInstance(id); string name = dmo.Name; dmo.delete(); return(createNamedSettings(name)); }
private bool updateColumnHidden() { DataManagerOption dmo = DataManagerOption.GetInstance(campaignID, queryID, true); DataManagerColumn dmc = dmo.getColumn(columnName); dmc.Hidden = hidden; dmc.save(); return(true); }
private bool deleteNamedSettings(int id) { DataManagerOption dmo = DataManagerOption.GetInstance(id); dmo.delete(); getNamedSettingsList(0); ajaxResponse.message = "Deleted Name Settings"; return(true); }
// 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); }
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); }
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); }
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); }