public override bool Evaluate(DataSet dataSet) { this.parent.log("Evaluating RouteFillOccurred..."); EMSXFieldDataPointSource routeFilledSource = (EMSXFieldDataPointSource)dataSet.GetDataPoint("RouteFilled").GetSource(); EMSXFieldDataPointSource routeLastSharesSource = (EMSXFieldDataPointSource)dataSet.GetDataPoint("RouteLastShares").GetSource(); EMSXFieldDataPointSource routeStatusSource = (EMSXFieldDataPointSource)dataSet.GetDataPoint("RouteStatus").GetSource(); GenericIntegerDataPointSource lastfill = (GenericIntegerDataPointSource)dataSet.GetDataPoint("LastFillShown").GetSource(); int currentFilled = Convert.ToInt32(routeFilledSource.GetValue()); int previousFilled = Convert.ToInt32(routeFilledSource.GetPreviousValue()); int currentLastShares = Convert.ToInt32(routeLastSharesSource.GetValue()); int previousLastShares = Convert.ToInt32(routeLastSharesSource.GetPreviousValue()); String currentStatus = Convert.ToString(routeStatusSource.GetValue()); String previousStatus = Convert.ToString(routeStatusSource.GetPreviousValue()); int lastFillShown = Convert.ToInt32(dataSet.GetDataPoint("LastFillShown").GetValue()); this.parent.log("RouteFillOccurred DataSet values : currentFilled=" + currentFilled + "|previousFilled=" + previousFilled + "|currentLastShares=" + currentLastShares + "|previousLastShares=" + previousLastShares + "|currentStatus=" + currentStatus + "|previousStatus=" + previousStatus); bool res = ((currentFilled != previousFilled) && previousStatus != null && currentFilled != lastFillShown); this.parent.log("RouteFillOccurred returning value: " + res); return(res); }
public void Execute(DataSet dataSet) { this.parent.log(">>> ShowRouteFill Action Executor: "); this.parent.log(">>> RouteStatus: " + dataSet.GetDataPoint("RouteStatus").GetValue()); this.parent.log(">>> RouteOrderNumber: " + dataSet.GetDataPoint("RouteOrderNumber").GetValue()); this.parent.log(">>> RouteID: " + dataSet.GetDataPoint("RouteID").GetValue()); this.parent.log(">>> RouteFilled: " + dataSet.GetDataPoint("RouteFilled").GetValue()); this.parent.log(">>> RouteAmount: " + dataSet.GetDataPoint("RouteAmount").GetValue()); this.parent.log(">>> RouteLastShares: " + dataSet.GetDataPoint("RouteLastShares").GetValue()); GenericIntegerDataPointSource lastfill = (GenericIntegerDataPointSource)dataSet.GetDataPoint("LastFillShown").GetSource(); lastfill.setValue(Convert.ToInt32(dataSet.GetDataPoint("RouteFilled").GetValue())); }