public Employee(Int32 Id) { _Info = Retrieve(Id); if (_Info.HasRows()) { InitializeProperties(_Info.Rows[0]); ReportingDepartment reportingDepartments = new ReportingDepartment(_ResourceID); _ReportingDepartment = reportingDepartments; WarehouseDesignation warehouseDesignation = new WarehouseDesignation(_EmployeeId); _WarehouseDesignation = (IWarehouseDesignation)warehouseDesignation; } else { throw new KeyNotFoundException("Id not found."); } }
public void Retrieve() { _Info = EmployeeDac.Retrieve(this).Tables[0]; if (_Info.HasRows()) { InitializeProperties(_Info.Rows[0]); ReportingDepartment reportingDepartments = new ReportingDepartment(_ResourceID); _ReportingDepartment = reportingDepartments; WarehouseDesignation warehouseDesignation = new WarehouseDesignation(_EmployeeId); _WarehouseDesignation = (IWarehouseDesignation)warehouseDesignation; } else { throw new KeyNotFoundException("Email not found."); } }