/// <summary> /// Create Field in Filter /// </summary> /// <param name="param">Parameters</param> /// <returns>The created field</returns> public BaseField CreateField_In_Filter(CreateField_In_Filter_Params param) { DefaultField defaultField = new DefaultField(); defaultField.StopAutoSizeConfig(); defaultField.Name = param.ConfigProperty.PropertyInfo.Name; defaultField.SizeLabel = param.SizeLabel; defaultField.SizeControl = param.SizeControl; defaultField.OrientationField = Orientation.Horizontal; defaultField.TabIndex = param.TabIndex; defaultField.Text_Label = param.ConfigProperty.DisplayProperty.Title; defaultField.ConfigSizeField(); param.FilterContainer.Controls.Add(defaultField); return(defaultField); }
/// <summary> /// Step1 : CreateField in EntryForm /// </summary> /// <param name="param"> /// </param> /// <returns>the created field</returns> public BaseField CreateField_In_EntryForm(CreateFieldParams param) { // Set ErrorProvider Instance this.errorProvider = param.errorProvider; DefaultField defaultField = new DefaultField(); defaultField.StopAutoSizeConfig(); defaultField.Name = param.PropertyInfo.Name; defaultField.Location = param.Location; defaultField.OrientationField = param.OrientationField; defaultField.SizeLabel = param.SizeLabel; defaultField.SizeControl = param.SizeControl; defaultField.TabIndex = param.TabIndex; defaultField.Text_Label = param.ConfigProperty.DisplayProperty.Title; defaultField.ConfigSizeField(); //Validating if (param.ConfigProperty.EntryForm.isRequired) { defaultField.Validating += DefaultField_Validating; } // Type of Property defaultField.PropertyInfo = param.ConfigProperty.PropertyInfo; // Can not Update Not supported Type , you can Just read it value // NB : String is not a primitve type if ( !param.ConfigProperty.PropertyInfo.PropertyType.IsPrimitive && !(param.ConfigProperty.PropertyInfo.PropertyType == typeof(string)) ) { defaultField.Enabled = false; } // Insertion à l'interface param.ConteneurFormulaire.Controls.Add(defaultField); return(defaultField); }