GetParameters() public method

Retrieves a collection of objects from the data store.
public GetParameters ( int moduleId ) : ParameterList
moduleId int Module identifier.
return ParameterList
Exemplo n.º 1
0
 public static void ImportProviderSettings(int moduleId, XmlNode settingsNode, string providerName)
 {
     if ((settingsNode != null))
     {
         var pc = new ParameterController(providerName);
         foreach (var p in pc.GetParameters(moduleId))
         {
             pc.DeleteParameter(p.Key);
         }
         foreach (XmlNode node in settingsNode.SelectNodes(Portable.ParamElement))
         {
             if (node.Attributes == null)
             {
                 continue;
             }
             var p = new ParameterInfo
             {
                 ModuleId = moduleId,
                 Name     = node.Attributes["name"].Value,
                 Type     = node.Attributes[Portable.TypeAttribute].Value
             };
             if (p.IsArgumentRequired())
             {
                 p.TypeArgument = node.Attributes[Portable.ArgAttribute].Value;
             }
             p.IsValueRequired = (node.Attributes[Portable.ValueRequiredAttribute] != null);
             pc.AddParameter(p);
         }
     }
 }
Exemplo n.º 2
0
        /// <summary>
        ///   Binds the <see cref = "ParameterInfo" /> settings.
        /// </summary>
        /// <param name = "showAddRow">Specifies whether an additional edit row should be displayed.</param>
        private void BindParameters(bool showAddRow = false)
        {
            var objController = new ParameterController(Purpose);
            var colParams     = objController.GetParameters(ModuleId);

            _isStatic = colParams.IsStatic();

            // add new row
            if (showAddRow)
            {
                colParams.Add(new ParameterInfo());
                grdParams.EditItemIndex = colParams.Count - 1;
            }

            // apply data source
            grdParams.DataSource = colParams;
            grdParams.DataBind();
            grdParams.Visible            = (colParams.Count > 0 || showAddRow);
            grdParams.Columns[2].Visible = grdParams.Visible && RequiredValuesNeeded;

            // bind settings
        }
Exemplo n.º 3
0
        /// <summary>
        ///   Binds the <see cref = "ParameterInfo" /> settings.
        /// </summary>
        /// <param name = "showAddRow">Specifies whether an additional edit row should be displayed.</param>
        private void BindParameters(bool showAddRow = false)
        {
            var objController = new ParameterController(Purpose);
            var colParams = objController.GetParameters(ModuleId);
            _isStatic = colParams.IsStatic();

            // add new row
            if (showAddRow)
            {
                colParams.Add(new ParameterInfo());
                grdParams.EditItemIndex = colParams.Count - 1;
            }

            // apply data source
            grdParams.DataSource = colParams;
            grdParams.DataBind();
            grdParams.Visible = (colParams.Count > 0 || showAddRow);
            grdParams.Columns[2].Visible = grdParams.Visible && RequiredValuesNeeded;

            // bind settings
        }
Exemplo n.º 4
0
 public static void ImportProviderSettings(int moduleId, XmlNode settingsNode, string providerName)
 {
     if ((settingsNode != null))
     {
         var pc = new ParameterController(providerName);
         foreach (var p in pc.GetParameters(moduleId))
         {
             pc.DeleteParameter(p.Key);
         }
         foreach (XmlNode node in settingsNode.SelectNodes(Portable.ParamElement))
         {
             if (node.Attributes == null) continue;
             var p = new ParameterInfo
                         {
                             ModuleId = moduleId,
                             Name = node.Attributes["name"].Value,
                             Type = node.Attributes[Portable.TypeAttribute].Value
                         };
             if (p.IsArgumentRequired())
                 p.TypeArgument = node.Attributes[Portable.ArgAttribute].Value;
             p.IsValueRequired = (node.Attributes[Portable.ValueRequiredAttribute] != null);
             pc.AddParameter(p);
         }
     }
 }