Beispiel #1
0
        public static void Main()
        {
            List<Sale> sales = new List<Sale>()
            {
                new Sale("Shampoo", new DateTime(2015, 1, 18), 1500),
                new Sale("Pantofi", new DateTime(2014, 1, 22), 750)
            };

            RegularEmployee mishoRegEm = new RegularEmployee(21123, "Mihail", "Zapryanov", 3000, Department.Production);
            SalesEmployee monikaSaEm = new SalesEmployee(20133, "Monika", "Mihaileva", 2300, Department.Sales, sales);

            Project depProject = new Project("New Department of defense terminal", new DateTime(2014, 4, 25),
                "Detail detail detail...?");
            depProject.CloseProject();

            List<Project> projects = new List<Project>()
            {
                depProject,
                new Project("The classic snake game", new DateTime(2002, 2, 4), "The game should contain at least 1 snake!")
            };
            Developer goshkoDev = new Developer(0010101, "Georgi", "Stanimirchev", 2700, Department.Production, projects);

            List<Employee> employees = new List<Employee>() { mishoRegEm, monikaSaEm, goshkoDev };
            Manager ivan = new Manager(20342, "Ivan", "Stoyanov", 2000, Department.Marketing, employees);

            Customer ginka = new Customer(20012, "Ginka", "Chikerova", 180M);

            List<Person> persons = new List<Person>() {ivan, ginka};

            foreach (var person in persons)
            {
                Console.WriteLine(person.ToString());
            }
        }
        static void Main(string[] args)
        {
            SalesEmployee gosho = new SalesEmployee(20, "Gosho", "Boo", 400m, Departments.Production, new List <Sale>()
            {
                new Sale("Laptop", 120m)
            });
            SalesEmployee pesho = new SalesEmployee(10, "Pesho", "Moo", 800m, Departments.Accounting, new List <Sale>()
            {
                new Sale("Microchip", 60m), new Sale("Car GPS", 160m)
            });
            Developer misho = new Developer(23, "Misho", "Boichev", 1400m, Departments.Marketing, new List <IProject>()
            {
                new Project("Health Care", true)
            });
            Manager boiko = new Manager(12, "Boiko", "Borchisov", 4500m, Departments.Sales, new List <Employee>()
            {
                gosho, pesho, misho
            });

            List <Employee> SoftUniTeam = new List <Employee>()
            {
                gosho,
                pesho,
                misho,
                boiko
            };

            foreach (var employee in SoftUniTeam)
            {
                Console.WriteLine(employee);
            }
        }
        static void Main()
        {
            SalesEmployee retailer = new SalesEmployee(12, "Podlizurko", "Dreben", Department.Marketing, 500, new Sale("iPod", 340));

            Employee[] employees = 
            {
                retailer,
                new Manager(28882, "Shefa", "Na firmata", Department.Marketing, 5500, retailer),
                new Developer(534, "Pesho", "Goshev", Department.Production, 2300, new Project("Project")),
                new SalesEmployee(342, "Ivan", "Grigorov", Department.Accounting, 1200, new Sale("Nishto", 0)), 
            };

            foreach (var employee in employees)
            {
                Console.WriteLine(employee);
            }
        }
Beispiel #4
0
        static void Main()
        {
            SalesEmployee retailer = new SalesEmployee(12, "Podlizurko", "Dreben", Department.Marketing, 500, new Sale("iPod", 340));

            Employee[] employees =
            {
                retailer,
                new Manager(28882,    "Shefa",  "Na firmata", Department.Marketing,  5500, retailer),
                new Developer(534,    "Pesho",  "Goshev",     Department.Production, 2300, new Project("Project")),
                new SalesEmployee(342,"Ivan",   "Grigorov",   Department.Accounting, 1200, new Sale("Nishto",0)),
            };

            foreach (var employee in employees)
            {
                Console.WriteLine(employee);
            }
        }
Beispiel #5
0
        static void Main()
        {
            List <Sale> sales = new List <Sale>
            {
                new Sale("Animals", new DateTime(2014, 9, 2), 649.99),
                new Sale("Yolo game", new DateTime(2015, 11, 5), 780)
            };

            List <Project> projects = new List <Project>
            {
                new Project("Yolo game", new DateTime(2015, 10, 5), "No Details", State.Open),
                new Project("Business report program", new DateTime(2014, 8, 4), "No Details", State.Closed)
            };

            List <Project> moreProjects = new List <Project>
            {
                new Project("Animals", new DateTime(2014, 8, 1), "Amazing Project", State.Closed),
                new Project("Hola", new DateTime(2015, 5, 2), "No Details", State.Open)
            };

            Developer kiro = new Developer(
                "547823", "Kiro", "Kirov", 1100, Department.Production, projects);
            Developer svetla = new Developer(
                "999231", "Svetla", "Svetlenova", 1500, Department.Production, moreProjects);
            SalesEmployee petkan = new SalesEmployee(
                "123321", "Petko", "Petkov", 1450, Department.Sales, sales);

            List <Employee> employeesUnderControl = new List <Employee> {
                kiro, svetla, petkan
            };

            Manager Toshe = new Manager("875123", "Toshko", "Toshov", 1400,
                                        Department.Production, employeesUnderControl);

            List <Employee> allEmployees = new List <Employee> {
                kiro, svetla, petkan, Toshe
            };

            foreach (var employee in allEmployees)
            {
                Console.WriteLine(employee);
                Console.WriteLine();
            }
        }
Beispiel #6
0
        static void Main()
        {
            Sale product1 = new Sale("Product1", "02-06-2013", 500);
            Sale product2 = new Sale("Product2", "05-09-2013", 250);

            Sale[] sales = new Sale[2]
            {
                product1,
                product2
            };

            Project project1 = new Project("Project1", "20-08-2014", "detail", ProjectState.Open);
            Project project2 = new Project("Project2", "25-03-2014", "detail", ProjectState.Open);

            Project[] projects = new Project[2]
            {
                project1,
                project2
            };

            Employee gosho = new SalesEmployee("8527", "Pesho", "Peshev", 2500, Department.Sales, sales);
            Employee misho = new Developer("8527", "Pesho", "Peshev", 2500, Department.Production, projects);

            Employee[] workers = new Employee[2] {
                gosho, misho
            };

            Employee pesho = new Manager("8527", "Pesho", "Peshev", 2500, Department.Marketing, workers);

            List <Employee> employees = new List <Employee>()
            {
                gosho,
                misho,
                pesho
            };

            foreach (var employee in employees)
            {
                Console.WriteLine(employee);
                Console.WriteLine();
            }
        }
        static void Main(string[] args)
        {
            Project cars = new Project("Cars",DateTime.Parse("12.12.2002"),"nema");
            Sale SaleReadyCars = new Sale("Cars",DateTime.Parse("12.12.2002"),1245.99);
            Console.WriteLine(cars.State);
            cars.CloseProject();
            Console.WriteLine(cars.State);
            Employee stancho = new Developer("Stancho","IT","2135561234",cars);
            Employee pancho = new SalesEmployee("Pancho", "Vladigerov", "213213234", SaleReadyCars);
            Employee pesho = new Manager("Pesho","Managera","90873462321",stancho);
            Employee mariika = new SalesEmployee("Mariika", "Stankova", "89675456789", SaleReadyCars);
            Employee kosio = new Developer("Kosio", "eshov", "32151255", cars);

            Customer stamat = new Customer("Stamat","Kostov");
            Customer kosta = new Customer("Kosta", "Kostov");

            IPerson[] personsCollection = {
            stancho,pancho,pesho,mariika,kosio,stamat,kosta
            };
            foreach (var person in personsCollection)
            {
                Console.WriteLine(person);
            }
        }