Exemple #1
0
 protected virtual void SequenceChange
 (
     object sender,
     DAE.Runtime.Data.Row fromRow,
     DAE.Runtime.Data.Row toRow,
     bool above,
     EventArgs args
 )
 {
     SequenceColumnUtility.SequenceChange(HostNode.Session, Source, _shouldEnlist, fromRow, toRow, above, _script);
 }
Exemple #2
0
 /// <remarks> Performs the search. </remarks>
 protected override void InternalExecute(INode sender, EventParams paramsValue)
 {
     if ((Source != null) && (Source.DataView != null))
     {
         DAE.Schema.Order saveOrder = null;
         if ((Source.Order == null) || (Source.Order.Columns.Count != 1) || (Source.Order.Columns[0].Column.Name != _columnName))
         {
             saveOrder          = Source.Order;
             Source.OrderString = String.Format("order {{ {0} }}", _columnName);
         }
         try
         {
             DAE.Schema.RowType rowType = new DAE.Schema.RowType();
             rowType.Columns.Add(new DAE.Schema.Column(_columnName, (Source.DataView.TableType.Columns[_columnName]).DataType));
             using (DAE.Runtime.Data.Row row = new DAE.Runtime.Data.Row(Source.DataView.Process.ValueManager, rowType))
             {
                 ((DAE.Runtime.Data.Scalar)row.GetValue(_columnName)).AsString = _value;
                 if (Mode == FindActionMode.Nearest)
                 {
                     Source.DataView.FindNearest(row);
                 }
                 else
                 {
                     bool found = Source.DataView.FindKey(row);
                     if (!found && (Mode == FindActionMode.ExactOnly))
                     {
                         throw new ClientException(ClientException.Codes.ValueNotFound, _value);
                     }
                 }
             }
         }
         finally
         {
             if (saveOrder != null)
             {
                 Source.Order = saveOrder;
             }
         }
     }
 }