void PersistColumnsSelected()
    {
        ReportsManager manager = new ReportsManager(null);

        if (!String.IsNullOrEmpty(Request["OrderedColumnsHidden"]))
        {
            Page.Settings.Columns.Clear();
            string[] values = Request["OrderedColumnsHidden"].Trim(',').Split(',');
            foreach (string value in values)
            {
                if (!String.IsNullOrEmpty(value))
                {
                    
                    ReportColumnsSchema columnSchema = manager.GetColumnSchema(Page.Settings.Report.ReportTablesSchemaId.Value, Convert.ToInt32(value));

                    ReportColumn column = new ReportColumn();
                    column.ReportColumnsSchemaId = columnSchema.ReportColumnsSchemaId;
                    column.ReportTablesSchemaId = columnSchema.ReportTablesSchemaId;
                    column.ReportDataTypeId = columnSchema.ReportDataTypeId;
                    column.Name = columnSchema.Name;
                    Page.Settings.Columns.Add(column);
                }
            }
        }
    }
Ejemplo n.º 2
0
 private void AddColumnInQuery(DataClasses.ReportColumn column)
 {
     DataClasses.ReportColumnsSchema columnSchema = null;
     // DataClasses.ReportDataFunction function;
     //if (column.ReportDataFunctionId == null)
     //{
     columnSchema = GetColumnSchema(column.ReportTablesSchemaId, column.ReportColumnsSchemaId);
     query.Append(columnSchema.Source + " as [" + columnSchema.Name + "], ");
     //}
     //else
     //{
     //    function = null;
     //    query.Append(function.SqlText.Replace("[=Column=]", columnSchema.Source) + ", ");
     //}
 }
Ejemplo n.º 3
0
 public void Insert(DataClasses.ReportColumn column)
 {
     DbContext.ReportColumns.InsertOnSubmit(column);
     DbContext.SubmitChanges();
 }
		private void detach_ReportColumns(ReportColumn entity)
		{
			this.SendPropertyChanging();
			entity.ReportColumnsSchema = null;
		}
 partial void DeleteReportColumn(ReportColumn instance);
 partial void UpdateReportColumn(ReportColumn instance);
 partial void InsertReportColumn(ReportColumn instance);
		private void attach_ReportColumns(ReportColumn entity)
		{
			this.SendPropertyChanging();
			entity.Report = this;
		}