コード例 #1
0
        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");
        }
コード例 #2
0
        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");
        }