コード例 #1
0
 /// <summary>
 /// Creates a record of what value to use with the given <see cref="ISqlParameter"/> of the <see cref="ExtractionFilterParameterSet"/> <see cref="IFilter"/> to achieve the concept.
 ///
 /// <para>For example if there is an <see cref="ExtractionFilter"/> 'Prescribed Drug X' with a parameter @DrugList and you create an <see cref="ExtractionFilterParameterSet"/>
 /// 'Diabetic Drugs' then this will create a <see cref="ExtractionFilterParameterSetValue"/> of '@DrugList='123.23,121,2... etc'.</para>
 ///
 /// <para>If a filter has more than one parameter then you will need one <see cref="ExtractionFilterParameterSetValue"/> per parameter per <see cref="ExtractionFilterParameterSet"/></para>
 /// </summary>
 /// <param name="repository"></param>
 /// <param name="parent"></param>
 /// <param name="valueIsForParameter"></param>
 public ExtractionFilterParameterSetValue(ICatalogueRepository repository, ExtractionFilterParameterSet parent, ExtractionFilterParameter valueIsForParameter)
 {
     repository.InsertAndHydrate(this, new Dictionary <string, object>()
     {
         { "ExtractionFilterParameterSet_ID", parent.ID },
         { "ExtractionFilterParameter_ID", valueIsForParameter.ID }
     });
 }
コード例 #2
0
        private void CacheMasterParameterFieldsIfRequired()
        {
            if (haveCachedMasterValues)
            {
                return;
            }

            var master = ExtractionFilterParameter;

            _parameterName = master.ParameterName;
            _parameterSQL  = master.ParameterSQL;
            _comment       = master.Comment;

            _extractionFilterParameterSet = ExtractionFilterParameterSet;

            haveCachedMasterValues = true;
        }