Exemplo n.º 1
0
 public Output CloneOutput(Output o, Rule r)
 {
     Output oClone = new Output();
     oClone.Text = o.Text;
     oClone.Cmd = o.Cmd;
     oClone.Condition = o.Condition;
     oClone.Id = r.GetNewOutputId();
     return oClone;
 }
Exemplo n.º 2
0
 public Rule createRuleFromTemplateRow(Rule baseRule, System.Data.DataColumnCollection columns, System.Data.DataRow row, int index)
 {
     Rule newRule = new Rule();
     newRule.Id = baseRule.Id + "_" + index;
     newRule.Name = this.replaceTemplateData(baseRule.Name, columns, row);
     foreach(Input i in baseRule.Inputs)
     {
         Input newInput = new Input();
         newInput.Id = i.Id + "_" + index;
         newInput.Text = this.replaceTemplateData(i.Text, columns, row);
         newInput.Condition = this.replaceTemplateData(i.Condition, columns, row);
         newRule.Inputs.Add(newInput);
     }
     foreach(Output o in baseRule.Outputs)
     {
         Output newOutput = new Output();
         newOutput.Id = o.Id + "_" + index;
         newOutput.Text = this.replaceTemplateData(o.Text, columns, row);
         newOutput.Cmd = this.replaceTemplateData(o.Cmd, columns, row);
         newOutput.Condition = this.replaceTemplateData(o.Condition, columns, row);
         newRule.Outputs.Add(newOutput);
     }
     foreach(Rule child in baseRule.Children)
     {
         newRule.Children.Add(this.createRuleFromTemplateRow(child, columns, row, index));
     }
     newRule.VirtualParents = baseRule.VirtualParents;
     return newRule;
 }
Exemplo n.º 3
0
 public void AddOutput(string stText, string stCond, string stCmd)
 {
     Output outputNew = new Output();
     outputNew.Text = stText;
     outputNew.Condition = stCond;
     outputNew.Cmd = stCmd;
     outputNew.Id = this.GetNewOutputId();
     this.Outputs.Add(outputNew);
 }