public void Process(ReportCell cell, Entity entity)
 {
     if (entity.Score < 3)
     {
         cell.AddProperty(Bad);
     }
     else if (entity.Score >= 9)
     {
         cell.AddProperty(Good);
     }
 }
示例#2
0
 public void Process(ReportCell cell, TSourceEntity entity)
 {
     foreach (ReportCellProperty property in this.propertySelector(entity).Where(p => p != null))
     {
         cell.AddProperty(property);
     }
 }
示例#3
0
 private void AddProperties(ReportCell <TValue> cell)
 {
     foreach (ReportCellProperty property in this.Properties)
     {
         cell.AddProperty(property);
     }
 }
示例#4
0
 private void AddHeaderProperties(ReportCell cell)
 {
     foreach (ReportCellProperty property in this.headerProperties)
     {
         cell.AddProperty(property);
     }
 }
        private ReportCell CreateReportCell <TValue>(TValue title, params ReportCellProperty[] properties)
        {
            ReportCell <TValue> cell = new ReportCell <TValue>(title);

            foreach (ReportCellProperty property in properties)
            {
                cell.AddProperty(property);
            }

            return(cell);
        }
示例#6
0
        protected ReportCell AddGlobalProperties(ReportCell cell)
        {
            foreach (ReportCellProperty property in this.GlobalProperties)
            {
                if (!cell.HasProperty(property.GetType()))
                {
                    cell.AddProperty(property);
                }
            }

            return(cell);
        }
        private ReportCell CreateComplexHeaderCell(string title, int columnSpan)
        {
            ReportCell cell = new ReportCell <string>(title)
            {
                ColumnSpan = columnSpan,
            };

            foreach (ReportCellProperty property in this.CommonComplexHeaderProperties)
            {
                cell.AddProperty(property);
            }

            if (this.ComplexHeaderProperties.ContainsKey(title))
            {
                foreach (ReportCellProperty property in this.ComplexHeaderProperties[title])
                {
                    cell.AddProperty(property);
                }
            }

            return(cell);
        }
示例#8
0
 public void Process(ReportCell cell, string data)
 {
     cell.AddProperty(new CustomProperty(true));
 }