Esempio n. 1
0
        private Dictionary <string, string> GetObjectDisplayTable()
        {
            Dictionary <string, string> objectDisplayTable = new Dictionary <string, string>();

            // Add Customers
            CustomerSystem customerSystem = new CustomerSystem(UnitOfWork);

            AddToObjectDisplayTable(EventObjectTypes.Customer, customerSystem.GetBindingList(), objectDisplayTable);

            // Add Contacts
            ContactSystem contactSystem = new ContactSystem(UnitOfWork);

            AddToObjectDisplayTable(EventObjectTypes.Contact, contactSystem.GetBindingList(), objectDisplayTable);

            return(objectDisplayTable);
        }
        private IList <BindingListItem> GetBindingList(string subjectType)
        {
            IList <BindingListItem> dataSource = null;

            switch ((InstanceTypes)Enum.Parse(typeof(InstanceTypes), subjectType))
            {
            case InstanceTypes.Customer:
                CustomerSystem sys = new CustomerSystem(UnitOfWork);
                dataSource = sys.GetBindingList();
                break;

            case InstanceTypes.Contact:
                ContactSystem contactSystem = new ContactSystem(UnitOfWork);
                dataSource = contactSystem.GetBindingList();
                break;

            case InstanceTypes.Product:
                ProductSystem productSystem = new ProductSystem(UnitOfWork);
                dataSource = productSystem.GetBindingList();
                break;

            case InstanceTypes.Supplier:
                SupplierSystem supplierSystem = new SupplierSystem(UnitOfWork);
                dataSource = supplierSystem.GetBindingList();
                break;

            case InstanceTypes.Catalog:
                CatalogSystem catalogSystem = new CatalogSystem(UnitOfWork);
                dataSource = catalogSystem.GetBindingList();
                break;

            case InstanceTypes.Employee:
                EmployeeSystem employeeSystem = new EmployeeSystem(UnitOfWork);
                dataSource = employeeSystem.GetBindingList();
                break;

            case InstanceTypes.Document:
                DocumentSystem docSystem = new DocumentSystem(UnitOfWork);
                dataSource = docSystem.GetBindingList();
                break;

            case InstanceTypes.User:
                UserFacade facade = new UserFacade(UnitOfWork);
                dataSource = facade.GetBindingList();
                break;

            case InstanceTypes.Language:
                LanguageFacade languageFacade = new LanguageFacade(UnitOfWork);
                dataSource = languageFacade.GetBindingList();
                break;

            case InstanceTypes.Domain:
                DomainFacade domainFacade = new DomainFacade(UnitOfWork);
                dataSource = domainFacade.GetBindingList();
                break;

            case InstanceTypes.MainMenu:
                MainMenuFacade mainMenuFacade = new MainMenuFacade(UnitOfWork);
                dataSource = mainMenuFacade.GetBindingList();
                break;

            case InstanceTypes.SetupMenu:
                SetupMenuFacade setupMenuFacade = new SetupMenuFacade(UnitOfWork);
                dataSource = setupMenuFacade.GetBindingList();
                break;

            case InstanceTypes.ShipTo:
                ShipToFacade shipTofacade = new ShipToFacade(UnitOfWork);
                dataSource = shipTofacade.GetBindingList();
                break;

            case InstanceTypes.SellingPeriod:
                SellingPeriodFacade sellingPeriodfacade = new SellingPeriodFacade(UnitOfWork);
                dataSource = sellingPeriodfacade.GetBindingList();
                break;

            case InstanceTypes.UserMatch:
                dataSource = GetUserMatch();
                break;
            }

            return(dataSource);
        }
Esempio n. 3
0
 public CustomerFacade(IUnitOfWork unitOfWork)
     : base(unitOfWork)
 {
     CustomerSystem = new CustomerSystem(unitOfWork);
 }