Esempio n. 1
0
        public override void print()
        {
            Employee next;

            Console.WriteLine("Salary-first report");
            while (db.GetNextEmployee() != null)
            {
                next = db.GetNextEmployee();
                Console.WriteLine("------------------");
                Console.WriteLine("Salary: {0}", next.Salary);
                Console.WriteLine("Name: {0}", next.Name);
                Console.WriteLine("------------------");
            }
        }
Esempio n. 2
0
        public virtual void print()
        {
            Employee next;

            Console.WriteLine("Name-first report");
            while (true)
            {
                next = db.GetNextEmployee();
                if (next == null)
                {
                    break;
                }
                Console.WriteLine("------------------");
                Console.WriteLine("Name: {0}", next.Name);
                Console.WriteLine("Salary: {0}", next.Salary);
                Console.WriteLine("------------------");
            }
            done();
        }