コード例 #1
0
ファイル: MainForm.cs プロジェクト: szabototo89/EVA2-Lectures
        public MainForm()
        {
            var Address = new Address()
            {
                City = "Budapest",
                Country = "Hungary",
                Postcode = "1117",
                StreetAddress = "Pázmány Péter sétány"
            };

            var Job = new Job()
            {
                EmployeeType = EmployeeType.Intern,
            };

            var Customers = new List<Customer>() {
                new Customer() {
                    Name = "Tony Stark", BirthDate = GetRandomDateTime(),
                    Address = Address, Job = Job
                },
                new Customer() {
                    Name = "Steve Rogers", BirthDate = GetRandomDateTime(),
                    Address = Address, Job = Job
                },
                new Customer() {
                    Name = "Nick Fury", BirthDate = GetRandomDateTime(),
                    Address = Address, Job = Job
                },
                new Customer() {
                    Name = "Bruce Banner", BirthDate = GetRandomDateTime(),
                    Address = Address, Job = Job
                }
            };

            InitializeComponent();

            _CustomerListView.Initialize(new DataManager(Customers));
        }
コード例 #2
0
        public void SetupTest()
        {
            Address = new Address() {
                City = "Budapest",
                Country = "Hungary",
                Postcode = "1117",
                StreetAddress = "Pázmány Péter sétány"
            };

            Job = new Job() {
                EmployeeType = EmployeeType.Intern,
            };

            Customers = new List<Customer>() {
                new Customer() {
                    Name = "Tony Stark", BirthDate = GetRandomDateTime(),
                    Address = Address, Job = Job
                },
                new Customer() {
                    Name = "Steve Rogers", BirthDate = GetRandomDateTime(),
                    Address = Address, Job = Job
                },
                new Customer() {
                    Name = "Nick Fury", BirthDate = GetRandomDateTime(),
                    Address = Address, Job = Job
                },
                new Customer() {
                    Name = "Bruce Banner", BirthDate = GetRandomDateTime(),
                    Address = Address, Job = Job
                }
            };
        }