internal void GetConsumedData()
 {
     if ((fieldVal == null) && (field != null))
     {
         field.GetFieldValue(delegate(object v) {
             fieldVal = v;
         });
     }
     if ((tableVal == null) && (table != null))
     {
         table.GetTableData(delegate(ICollection v) {
             tableVal = v;
         });
     }
     if ((rowVal == null) && (row != null))
     {
         row.GetRowData(delegate(object v) {
             rowVal = v;
         });
     }
     if ((paramsVal == null) && (param != null))
     {
         param.GetParametersData(delegate(IDictionary v) {
             paramsVal = v;
         });
     }
 }
 public void SetQueryParametersProvider(IWebPartParameters provider)
 {
     this.schema = this.schema ?? Utility.GetQueryParametersSchema(this.QueryToAppend ?? "");
     if (provider != null)
     {
         provider.SetConsumerSchema(this.schema);
         provider.GetParametersData(ParametersCallback);
     }
 }
        public void ConnectionParametersConsumer(IWebPartParameters parameters)
        {
            // Set the schema
            CamlPreprocessor camlPreprocessor = new CamlPreprocessor(CamlQuery);

            parameters.SetConsumerSchema(camlPreprocessor.GetSchema());
            // The get parameters callback
            parameters.GetParametersData(ConsumeParameterValues);
        }
Esempio n. 4
0
 public void ConnectionParametersConsumer(IWebPartParameters parameters)
 {
     Debug.WriteLine("ConnectionParametersConsumer " + Title);
     // Set the schema
     // Using a dummy CamlProcessor
     if (Page == null)
     {
         Debug.WriteLine("- null Page (DummyCamlEngine) " + Title);
         InitializeCamlEngine();
     }
     // _camlPreprocessor = new CamlPreprocessor(CamlQuery);
     parameters.SetConsumerSchema(_camlPreprocessor.GetSchema());
     // The get parameters callback
     parameters.GetParametersData(ConsumeParameterValues);
 }
Esempio n. 5
0
        public void ConnectionParametersConsumer(IWebPartParameters parameters)
        {
            if (parameters != null && Config != null)
            {
                SPSSchema schemaBuilder = new SPSSchema();

                // Add each necesary parameter
                foreach (IdentityColumn column in Config.DataBase.Table.IdentityColumnCollection)
                {
                    schemaBuilder.AddParameterSql(column.Name, column.Type.ToString());
                }

                // Set the schema
                parameters.SetConsumerSchema(schemaBuilder.Schema);

                // The get parameters callback
                parameters.GetParametersData(ConsumeParameterValues);
            }
        }
        public void ConnectionParametersConsumer(IWebPartParameters parameters)
        {
            Debug.WriteLine("ConnectionParametersConsumer " + Title);

            if (parameters != null && Config != null)
            {
                SPSSchema schema = new SPSSchema();

                // Add each necesary parameter
                foreach (Param param in Config.Filter)
                {
                    schema.AddParameterSql(param.Name, param.Type);
                }

                // Set the schema
                parameters.SetConsumerSchema(schema.Schema);

                // The get parameters callback
                parameters.GetParametersData(ConsumeParameterValues);
            }
        }