public override List <AccessIO.IObjecOptions> LoadObjectNames(string containerInvariantName) { ContainerNames container = AllowedContainers.Find(containerInvariantName); if (container == null) { throw new ArgumentException(Properties.Resources.NotAllowedObjectTypeException, "objectType"); } List <IObjecOptions> lst = new List <IObjecOptions>(); if (containerInvariantName == ObjectType.General.ToString()) { lst.Add(new ObjectOptions(Properties.Resources.DatabaseProperties, ObjectType.DatabasePrj)); lst.Add(new ObjectOptions(Properties.Resources.References, ObjectType.References)); } else { foreach (Access.AccessObject obj in GetObjectCollectionFromObjectType(container.DefaultObjectType)) { lst.Add(new ObjectOptions(obj.Name, container.DefaultObjectType)); } } return(lst); }
public override List <IObjecOptions> LoadObjectNames(string containerInvariantName) { Database = Application.CurrentDb(); ContainerNames container = AllowedContainers.Find(containerInvariantName); if (container == null) { throw new ArgumentException(Properties.Resources.NotAllowedObjectTypeException, "objectType"); } List <IObjecOptions> lst = new List <IObjecOptions>(); if (containerInvariantName == ObjectType.General.ToString()) { lst.Add(new ObjectOptions(Properties.Resources.DatabaseProperties, ObjectType.DatabaseDao)); lst.Add(new ObjectOptions(Properties.Resources.References, ObjectType.References)); lst.Add(new ObjectOptions(Properties.Resources.Relations, ObjectType.Relations)); } else if (IsStandardContainerName(container.InvariantName)) { dao.Container daoContainer = Database.Containers[container.InvariantName]; foreach (dao.Document doc in daoContainer.Documents) { lst.Add(new ObjectOptions(doc.Name, container.DefaultObjectType)); } } else { lst.AddRange(GetDaoObjects(container.InvariantName)); } return(lst); }