Esempio n. 1
0
        private void SetFieldValueDefaultNew(IDictionary <string, string> newFieldValues, Field field)
        {
            ActionFunctions functions = new ActionFunctions();

            newFieldValues.Add(field.Name, functions.Evaluate(field.DefaultValue));
            Debug.WriteLine(
                string.Format("SetFieldValueDefaultNew - {0,-20} -> [{1}]",
                              field.Name,
                              functions.Evaluate(field.DefaultValue)));
        }
        /// <summary>
        /// Adds the filter params to the select using default the values
        /// </summary>
        /// <param name="sqlSource">The data source</param>
        private void AddSelectParamsDefaults(SqlDataSource sqlSource)
        {
            Debug.WriteLine("AddSelectParamsDefaults " + Title);
            ActionFunctions functions = new ActionFunctions();

            sqlSource.SelectParameters.Clear();

            foreach (Param param in Config.Filter)
            {
                Debug.WriteLine(string.Format("*Default {0} - {1}", param.Name, functions.Evaluate(param.Default)));
                sqlSource.SelectParameters.Add(param.Name, functions.Evaluate(param.Default));
                Debug.WriteLine(string.Format("Default {0} - {1}", param.Name, functions.Evaluate(param.Default)));
            }
        }