예제 #1
0
        public void Fill()

        {
            DataTable dataTable = Employee_DAL.GetDataTable();
            Employee  employee  = new Employee();
            DataRow   dataRow;

            for (int i = 0; i < dataTable.Rows.Count; i++)
            {
                dataRow = dataTable.Rows[i];

                employee = new Employee(dataRow);

                this.Add(employee);
            }
        }
예제 #2
0
        public void FillNew()
        {
            DataTable dataTable = Employee_DAL.GetDataTable();
            Employee  employee  = new Employee();
            DataRow   dataRow;
            double    Bonus;

            for (int i = 0; i < dataTable.Rows.Count; i++)
            {
                dataRow = dataTable.Rows[i];

                employee = new Employee(dataRow);
                Bonus    = GetBonus(DateTime.Now.Date, employee);

                employee.Salary += Convert.ToInt32(Bonus);

                this.Add(employee);
            }
        }