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); } }
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); } }