예제 #1
0
 internal override void SetFilterValue(ExcelWorksheet worksheet, ExcelAddressBase address)
 {
     if (Type == eDynamicFilterType.AboveAverage ||
         Type == eDynamicFilterType.BelowAverage)
     {
         Value    = GetAvg(worksheet, address);
         MaxValue = null;
     }
     else
     {
         DynamicDateFilterMatcher.SetMatchDates(this);
     }
 }
예제 #2
0
 internal override bool Match(object value, string valueText)
 {
     if (Type == eDynamicFilterType.AboveAverage)
     {
         return(ConvertUtil.GetValueDouble(value) > Value);
     }
     else if (Type == eDynamicFilterType.BelowAverage)
     {
         return(ConvertUtil.GetValueDouble(value) < Value);
     }
     else
     {
         var date = ConvertUtil.GetValueDate(value);
         if (date.HasValue == false)
         {
             return(false);
         }
         return(DynamicDateFilterMatcher.Match(this, date));
     }
 }
예제 #3
0
 internal ExcelDynamicFilterColumn(XmlNamespaceManager namespaceManager, XmlNode topNode) : base(namespaceManager, topNode)
 {
     DynamicDateFilterMatcher.SetMatchDates(this);
 }