Esempio n. 1
0
        /// <inheritdoc/>
        public void Owners(ICaller caller)
        {
            using IDealData data = InstanceFactory.GetInstance <IDealData>();

            if (data.AnyOwner())
            {
                return;
            }

            IDictionary <string, string> ownerDetails = new Dictionary <string, string>
            {
                { "LCBA", "LCBA" },
                { "CBC", "County Bridge Club" },
                { "BRADGATE", "Bradgate Bridge Club" },
                { "GLENFIELD", "Glenfield Bridge Club" },
                { "CBT", "Charnwood Bridge Teachers" }
            };

            foreach (KeyValuePair <string, string> ownerDetail in ownerDetails)
            {
                IOwner owner = new Owner(
                    id: Guid.NewGuid(),
                    code: ownerDetail.Key,
                    name: ownerDetail.Value,
                    isClub: true);
                data.CreateOwner(owner);
            }

            ownerDetails = new Dictionary <string, string>
            {
                { "WRIGHT", "Steve/Anne Wright" }
            };

            foreach (KeyValuePair <string, string> ownerDetail in ownerDetails)
            {
                IOwner owner = new Owner(
                    id: Guid.NewGuid(),
                    code: ownerDetail.Key,
                    name: ownerDetail.Value,
                    isClub: false);
                data.CreateOwner(owner);
            }
        }