Exemple #1
0
        /// <summary>
        /// Crea el contenedor de opciones que trae el metodo Generate
        /// y los controles de opciones.
        /// </summary>
        /// <param name="type"></param>
        /// <returns></returns>
        private BaseOptionsType CreateOption(EBFieldType type)
        {
            switch (type)
            {
            case EBFieldType.Between:
                return(new OptionsDateType());

            case EBFieldType.Time:
                return(new OptionsDateType(EBFieldType.Time));

            //case EBFieldType.ExampleEmail:
            //    break;
            case EBFieldType.Number:
            case EBFieldType.Amount:
            case EBFieldType.Latitude:
            case EBFieldType.Longitude:
                return(new OptionsNumberType(ftype.BCategoryName, ftype.BName));

            case EBFieldType.id:
                return(new RowNumberOptionsType());

            default:
                return(new BaseOptionsType(ftype.BCategoryName, ftype.BName));
            }
        }
Exemple #2
0
 /// <summary>
 /// Tipo de dato del campo.
 /// </summary>
 /// <param name="name">Nombre del campo por defecto.(En textbox)</param>
 /// <param name="searchCategoryName">Nombre de categoria del campo para busqueda.</param>
 /// <param name="searchName">Nombre del campo para busqueda.</param>
 /// <param name="bName">Nombre del campo para Bogus.</param>
 /// <param name="bCategoryName">Categoria del campo para Bogus.</param>
 /// <param name="example">Ejemplo para mostrar en la lista de seleccion.</param>
 /// <param name="columnType">Ejemplo para mostrar en la lista de seleccion.</param>
 public FieldType(
     string name,
     string columnType,
     EFieldName searchName,
     ECategory searchCategoryName = ECategory.Basico,
     EBCategory bCategoryName     = EBCategory.Basico,
     EBFieldType bName            = EBFieldType.id,
     string example = "Null")
 {
     ColumName          = name;
     ColumnType         = columnType;
     SearchName         = searchName;
     SearchCategoryName = searchCategoryName;
     BName         = bName;
     BCategoryName = bCategoryName;
     Example       = example;
 }
Exemple #3
0
        public OptionsDateType(EBFieldType type = EBFieldType.Between)
        {
            DTFrom = new DateTimePick_(DateTime.Now.AddYears(-1));
            DTTo   = new DateTimePick_(DateTime.Now);

            if (type == EBFieldType.Time)
            {
                DTFrom.Format       = DTTo.Format = DateTimePickerFormat.Custom;
                DTFrom.CustomFormat = DTTo.CustomFormat = "H:mm";
                DTFrom.Value        = DateTime.Today;
                DTTo.Value          = DateTime.Today.AddHours(7);

                CBDateFormats.DataSource = new string[]
                {
                    "H:mm",
                    "HH",
                    "HH:mm",
                    "h:m",
                    "hh:mm",
                    "hh:mm:ss",
                };
            }
            else
            {
                CBDateFormats.DataSource = new string[] {
                    "dd/MM/yyyy",
                    "MM/dd/yyyy",
                    "yyyy-MM-dd",
                    "d/M/yyyy",
                    "d.M.yyyy",
                    "dd.MM.yyyy",
                    "dd-MMM-yyyy",
                    "yyyy/MM/dd",
                };
            }

            panelControls.InsertRange(0, new Control[] { DTFrom, lblto, DTTo, lblfmt, CBDateFormats });
        }
Exemple #4
0
        public OptionsNumberType(EBCategory ebcat, EBFieldType ebfld)
        {
            EBCat = ebcat;
            EBFld = ebfld;

            if (EBFld == EBFieldType.Number)
            {
                Label lblMin = new Label_("Min");
                TBMin = new TextBox {
                    Width = 70, Text = "1", MaxLength = 20
                };
                Label lblMax = new Label_("Max");
                TBMax = new TextBox {
                    Width = 70, Text = "100", MaxLength = 20
                };
                Label lblDec = new Label_("Decimales");
                TBDec = new TextBox {
                    Width = 20, Text = "0", MaxLength = 1
                };

                panelControls.InsertRange(0, new Control[] { lblMin, TBMin, lblMax, TBMax, lblDec, TBDec });
            }
        }
Exemple #5
0
 public BaseOptionsType(EBCategory ebcat, EBFieldType ebfld)
 {
     panelControls.AddRange(new Control[] { lblBlanks, NullsCount, lblPrcnt });
     EBCat = ebcat;
     EBFld = ebfld;
 }