/// <summary> /// Execute AddRange command. /// </summary> /// <param name="res"></param> public override void Execute(rt.IResultValue res) { MGDataCollection mgDataTab = MGDataCollection.Instance; Task task = (Task)mgDataTab.GetTaskByID(TaskTag); FieldDef fieldDef = task.DataView.getField((int)UserRange.veeIdx - 1); int parsedLen; AddUserRangeDataviewCommand command = CommandFactory.CreateAddUserRangeDataviewCommand(TaskTag, UserRange); if (!UserRange.nullMin) { command.Range.min = RecordUtils.deSerializeItemVal(UserRange.min, fieldDef.getType(), fieldDef.getSize(), true, fieldDef.getType(), out parsedLen); } if (!UserRange.nullMax) { command.Range.max = RecordUtils.deSerializeItemVal(UserRange.max, fieldDef.getType(), fieldDef.getSize(), true, fieldDef.getType(), out parsedLen); } task.DataviewManager.Execute(command); }
/// <summary> /// CTOR /// </summary> /// <param name="command"></param> public AddUserRangeLocalDataCommand(AddUserRangeDataviewCommand command) : base(command) { fieldIndex = (int)command.Range.veeIdx - 1; userRange = command.Range; }
/// <summary> /// CTOR /// </summary> /// <param name="command"></param> public AddUserRangeRemoteDataViewCommand(AddUserRangeDataviewCommand command) : base(command) { userRange = command.Range; }