コード例 #1
0
 protected void AddOptions(ListControl list, ListParameterSettings customParameterSettings, ParameterInfo parameterSettings)
 {
     // add options from both if necessary
     if (customParameterSettings.Command.Length > 0)
     {
         var connectionString = default(string);
         if (customParameterSettings.ConnectionId < 0)
         {
             // get report set connection
             var objReportSetController = new ReportSetController();
             var objReportSetInfo       = objReportSetController.GetReportSet(parameterSettings.ReportSetId);
             connectionString = objReportSetInfo.ReportSetConnectionString;
         }
         else
         {
             var objConnectionInfo = ConnectionController.GetConnection(customParameterSettings.ConnectionId);
             connectionString = objConnectionInfo.ConnectionString;
         }
         SQLUtil.AddOptionsFromQuery(list, ReplaceOptionTokens(customParameterSettings.Command), connectionString, customParameterSettings.Default, customParameterSettings.CommandCacheTimeout);
     }
     if (customParameterSettings.List.Length > 0)
     {
         SQLUtil.AddOptionsFromList(list, customParameterSettings.List, customParameterSettings.Default);
     }
 }