protected override string GetDefaultElementType(Schema.IDataType dataType, string pageType) { Schema.IScalarType scalarType = dataType as Schema.IScalarType; if (scalarType != null) { if (scalarType.NativeType == DAE.Runtime.Data.NativeAccessors.AsBoolean.NativeType) { return("CheckBoxColumn"); } } return("TextColumn"); }
private object GetSQLValue(Schema.IDataType dataType, object tempValue) { if (tempValue == null) { return(null); } if (dataType.Is(Session.Catalog.DataTypes.SystemBoolean)) { return((bool)tempValue ? 1 : 0); } return(tempValue); }
protected virtual string GetDefaultElementType(Schema.IDataType dataType, string pageType) { Schema.IScalarType scalarType = dataType as Schema.IScalarType; if (scalarType != null) { if (scalarType.NativeType == DAE.Runtime.Data.NativeAccessors.AsBoolean.NativeType) { return("CheckBox"); } if (!DerivationUtility.IsReadOnlyPageType(pageType)) { if (scalarType.NativeType == DAE.Runtime.Data.NativeAccessors.AsDateTime.NativeType) { return("DateTimeBox"); } if (scalarType.NativeType == DAE.Runtime.Data.NativeAccessors.AsDecimal.NativeType) { return("NumericTextBox"); } if (scalarType.NativeType == DAE.Runtime.Data.NativeAccessors.AsInt64.NativeType) { return("NumericTextBox"); } if (scalarType.NativeType == DAE.Runtime.Data.NativeAccessors.AsInt32.NativeType) { return("NumericTextBox"); } if (scalarType.NativeType == DAE.Runtime.Data.NativeAccessors.AsInt16.NativeType) { return("NumericTextBox"); } if (scalarType.NativeType == DAE.Runtime.Data.NativeAccessors.AsByte.NativeType) { return("NumericTextBox"); } } } return("TextBox"); }
public MasterDataSetDataParam(string name, Schema.IDataType dataType, Modifier modifier, string columnName, DataSource source, bool isMaster) : base(name, dataType, modifier) { ColumnName = columnName; Source = source; IsMaster = isMaster; }
public DataSetDataParam(string name, Schema.IDataType dataType, Modifier modifier) : base(name, dataType, modifier) { }
public override object InternalExecute(Program program) { program.Stack.PushWindow(0, this, Operator.Locator); try { ITable table = null; try { program.Stack.Push(null); // result int stackDepth = program.Stack.Count; // Initialization try { Nodes[1].Execute(program); } catch (ExitError) {} // Aggregation Row row = null; if (_aggregateColumnIndexes.Length > 0) { row = new Row(program.ValueManager, SourceNode.DataType.RowType); } //object[] LValues = new object[FAggregateColumnIndexes.Length]; for (int index = 0; index < _aggregateColumnIndexes.Length; index++) { Schema.IDataType type = SourceNode.TableVar.Columns[_aggregateColumnIndexes[index]].DataType; //LValues[LIndex] = new DataVar(FValueNames[LIndex], LType, null); program.Stack.Push(null); } try { while (true) { #if DEBUG // This AllowExtraWindowAccess call is only necessary debug because the check is not // made in release executables program.Stack.AllowExtraWindowAccess = true; try { #endif if (table == null) { table = (ITable)Nodes[0].Execute(program); table.Open(); } if (!table.Next()) { break; } if (_aggregateColumnIndexes.Length > 0) { table.Select(row); } #if DEBUG } finally { program.Stack.AllowExtraWindowAccess = false; } #endif for (int index = 0; index < _aggregateColumnIndexes.Length; index++) { if (row.HasValue(_aggregateColumnIndexes[index])) { program.Stack.Poke(_aggregateColumnIndexes.Length - 1 - index, row[_aggregateColumnIndexes[index]]); } else { program.Stack.Poke(_aggregateColumnIndexes.Length - 1 - index, null); } } program.Stack.PushFrame(); try { Nodes[2].Execute(program); } catch (ExitError) {} finally { program.Stack.PopFrame(); } } } finally { for (int index = 0; index < _aggregateColumnIndexes.Length; index++) { program.Stack.Pop(); } if (_aggregateColumnIndexes.Length > 0) { row.Dispose(); } } // Finalization try { Nodes[3].Execute(program); } catch (ExitError) {} return(program.Stack.Peek(program.Stack.Count - stackDepth)); } finally { if (table != null) { table.Dispose(); } } } finally { program.Stack.PopWindow(); } }