public void SetColumnParams(IColumn column, TableUIGenerationParams tableUIGenerationParams)
        {
            switch (UI_Type)
            {
            case UIType.AspNet:
            case UIType.AspNetWithAjaxToolKit:
                if (column.LanguageType == "bool")
                {
                    tableUIGenerationParams.InputType = "CheckBox";
                }
                else
                {
                    tableUIGenerationParams.InputType = "TextBox";
                }
                break;

            case UIType.RadTelerik:
                if (column.LanguageType == "string")
                {
                    if (column.CharacterMaxLength < 2000)
                    {
                        tableUIGenerationParams.InputType = "RadTextBox";
                    }
                    else
                    {
                        tableUIGenerationParams.InputType = "RadEditor";
                    }
                }
                else if (column.LanguageType == "bool")
                {
                    tableUIGenerationParams.InputType = "CheckBox";
                }
                else if (column.LanguageType == "DateTime")
                {
                    tableUIGenerationParams.InputType = "RadDatePicker";
                }
                else if (column.LanguageType == "int")
                {
                    tableUIGenerationParams.InputType = "RadNumericTextBox";
                }
                else if (column.LanguageType == "long")
                {
                    tableUIGenerationParams.InputType = "RadNumericTextBox";
                }
                else if (column.LanguageType == "float")
                {
                    tableUIGenerationParams.InputType = "RadNumericTextBox";
                }
                else if (column.LanguageType == "double")
                {
                    tableUIGenerationParams.InputType = "RadNumericTextBox";
                }
                else if (column.LanguageType == "decimal")
                {
                    tableUIGenerationParams.InputType = "RadNumericTextBox";
                }
                else
                {
                    tableUIGenerationParams.InputType = "RadTextBox";
                }
                break;

            case UIType.Extjs:

                break;
            }
        }
 public string GenerateFieldValidateInfo(TableUIGenerationParams column)
 {
     return(string.Format(this.ValidateInfo, column.FieldNameCn));
 }
 public string GetFieldInputUIID(TableUIGenerationParams column)
 {
     return(column.InputUIControlType.ControlIDFormat.Replace("{$PName}", column.FieldName));
 }
 public string GenerateFieldInputTooltip(TableUIGenerationParams column)
 {
     return(string.Format(this.InputTootip, column.FieldNameCn));
 }
Exemple #5
0
        public void SetColumnParams(IColumn column, TableUIGenerationParams tableUIGenerationParams)
        {
            switch (UI_Type)
            {
            case UIType.AspNet:
            case UIType.AspNetWithAjax:
                if (column.LanguageType == "bool")
                {
                    tableUIGenerationParams.InputType = "CheckBox";
                }
                else
                {
                    tableUIGenerationParams.InputType = "TextBox";
                }
                break;

            case UIType.RadTelerik:
                if (column.LanguageType == "string")
                {
                    if (column.CharacterMaxLength < 2000)
                    {
                        tableUIGenerationParams.InputType = "RadTextBox";
                    }
                    else
                    {
                        tableUIGenerationParams.InputType = "RadEditor";
                    }
                }
                else if (column.LanguageType == "bool")
                {
                    tableUIGenerationParams.InputType = "CheckBox";
                }
                else if (column.LanguageType == "DateTime")
                {
                    tableUIGenerationParams.InputType = "RadDatePicker";
                }
                else if (column.LanguageType == "int")
                {
                    tableUIGenerationParams.InputType = "RadNumericTextBox";
                }
                else if (column.LanguageType == "long")
                {
                    tableUIGenerationParams.InputType = "RadNumericTextBox";
                }
                else if (column.LanguageType == "float")
                {
                    tableUIGenerationParams.InputType = "RadNumericTextBox";
                }
                else if (column.LanguageType == "double")
                {
                    tableUIGenerationParams.InputType = "RadNumericTextBox";
                }
                else if (column.LanguageType == "decimal")
                {
                    tableUIGenerationParams.InputType = "RadNumericTextBox";
                }
                else
                {
                    tableUIGenerationParams.InputType = "RadTextBox";
                }
                break;

            case UIType.Extjs:
                //                    AddInputUI(ius, "TextField ", true, true, false, "string", "txt{$PName}", "Text");
                //AddInputUI(ius, "TextArea ", true, true, false, "string", "txt{$PName}", "Text");
                //AddInputUI(ius, "NumberField ", true, true, false, "int", "num{$PName}", "Value");
                //AddInputUI(ius, "NumberDecimalField", true, true, false, "decimal", "num{$PName}", "Value");
                //AddInputUI(ius, "DateField", true, true, false, "DateTime", "date{$PName}", "Value");
                //AddInputUI(ius, "Checkbox", true, true, false, "bool", "chk{$PName}", "Checked");
                if (column.LanguageType == "string")
                {
                    if (column.CharacterMaxLength < 2000)
                    {
                        tableUIGenerationParams.InputType = "TextField";
                    }
                    else
                    {
                        tableUIGenerationParams.InputType = "TextArea";
                    }
                }
                else if (column.LanguageType == "bool")
                {
                    tableUIGenerationParams.InputType = "Checkbox";
                }
                else if (column.LanguageType == "DateTime")
                {
                    tableUIGenerationParams.InputType = "DateField";
                }
                else if (column.LanguageType == "int")
                {
                    tableUIGenerationParams.InputType = "NumberField";
                }
                else if (column.LanguageType == "long")
                {
                    tableUIGenerationParams.InputType = "NumberField";
                }
                else if (column.LanguageType == "float")
                {
                    tableUIGenerationParams.InputType = "NumberDecimalField";
                }
                else if (column.LanguageType == "double")
                {
                    tableUIGenerationParams.InputType = "NumberDecimalField";
                }
                else if (column.LanguageType == "decimal")
                {
                    tableUIGenerationParams.InputType = "NumberDecimalField";
                }
                else
                {
                    tableUIGenerationParams.InputType = "TextField";
                }
                break;
            }
        }