private void UpdateEmployeeTextBox()
        {
            StringBuilder builder = new StringBuilder();

            foreach (var employee in PayrollDatabase.GetAllEmployeeIds())
            {
                builder.Append(employee);
                builder.Append(Environment.NewLine);
            }
            view.EmployeesText = builder.ToString();
        }
        public void GetAllEmployeeIds()
        {
            database.AddEmployee(employee);

            var e2 = new Employee(321, "Bill", "2st Cst.");

            e2.Schedule       = new BiweeklySchedule();
            e2.Method         = new DirectDepositMethod("1st Bank", "0123456");
            e2.Classification = new SalariedClassification(5432.10);
            database.AddEmployee(e2);

            var ids = database.GetAllEmployeeIds();

            Assert.AreEqual(2, ids.Count);
        }
        public void Execute()
        {
            var empIds = PayrollDatabase.GetAllEmployeeIds();

            foreach (var empId in empIds)
            {
                var employee = PayrollDatabase.GetEmployee(empId);
                if (employee.IsPayDate(payDate))
                {
                    DateTime startDate = employee.GetPayPeriodStartDate(payDate);
                    PayCheck pc        = new PayCheck(startDate, payDate);
                    paychecks[empId] = pc;
                    employee.PayDay(pc);
                }
            }
        }
Beispiel #4
0
        public void Execute()
        {
            ArrayList empIds = PayrollDatabase.GetAllEmployeeIds();

            foreach (int empId in empIds)
            {
                var e = PayrollDatabase.GetEmployee(empId);
                if (e.IsPayDate(_payDate))
                {
                    DateTime startDate = e.GetPayPeriodStartDate(_payDate);
                    PayCheck pc        = new PayCheck(startDate, _payDate);
                    e.Payday(pc);
                    _paychecks[e.EmpId] = pc;
                }
            }
        }