private void SetValue(CodeActivityContext context) { this.localSourceTable = InputTable.Get(context); this.localNullValue = NullValue.Get(context); if (this.localSourceTable == null) { throw new Exception("Input table is null"); } this.localGroupbyColumn = GroupbyColumns.Get(context); this.localAggregateColumn = AggregateColumn.Get(context); this.localAggregateBy = AggregateBy.ToString(); if (AggregateType.ToString() == "Integer") { this.localAggregateColumnType = System.Type.GetType("System.Int64"); } else { this.localAggregateColumnType = System.Type.GetType("System." + AggregateType.ToString()); } }
protected override void Execute(CodeActivityContext context) { try { this.localDataTable = InputTable.Get(context); this.localColumnName = ColumnName.Get(context); this.localSelect = Select.Get(context); this.localNullValue = NullValue.Get(context); this.DoAvg(); Result.Set(context, this.localOutPut); } catch (Exception ex) { throw ex; } }