private bool ValidateInput() { List <string> errors = new List <string>(); if (String.IsNullOrEmpty(ExternalAttributeDropDownListEx.SelectedValue)) { errors.Add(GetString("sf.mapping.noexternalattributeselected")); } foreach (EntityAttributeModel attributeModel in AttributeModels.Where(x => !x.IsNullable && !x.HasDefaultValue)) { MappingEditorItem control = null; if (MappingItems.TryGetValue(attributeModel.Name, out control)) { if (control.MappingItem == null) { string error = String.Format(GetString("sf.mapping.requiredattributemappingmissing"), attributeModel.Label); errors.Add(error); } } } if (errors.Count > 0) { SalesForceError.Report(GetString("sf.mapping.validationerror"), errors); return(false); } return(true); }
public void LoadData() { AssemblyModels.Include(t => t.Namespaces).Load(); NamespaceModels.Include(t => t.Types).Load(); Types.Include(t => t.GenericArguments) .Include(t => t.Attributes) .Include(t => t.DeclaringType) .Include(t => t.BaseType) .Include(t => t.ImplementedInterfaces) .Include(t => t.Fields) .Include(t => t.Methods) .Include(t => t.Properties) .Include(t => t.Indexers) .Include(t => t.Events) .Include(t => t.Constructors) .Include(t => t.NestedTypes).Load(); ConstructorModels.Include(t => t.GenericArguments) .Include(t => t.Parameters).Load(); EventModels.Load(); FieldModels.Include(t => t.TypeModel).Load(); IndexerModels.Load(); AttributeModels.Load(); MethodModels.Include(t => t.GenericArguments) .Include(t => t.Parameters).Load(); ParameterModels.Load(); PropertyModels.Include(t => t.propertyMethods).Load(); }
private void InitializeAttributeRepeaters() { IEnumerable <EntityAttributeModel> requiredAttributeModels = AttributeModels.Where(x => !x.IsNullable && !x.HasDefaultValue); IEnumerable <EntityAttributeModel> otherAttributeModels = AttributeModels.Where(x => x.IsNullable || x.HasDefaultValue); InitializeAttributeRepeater(RequiredAttributeRepeater, requiredAttributeModels); InitializeAttributeRepeater(OtherAttributeRepeater, otherAttributeModels); }