Exemplo n.º 1
0
        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.");
            }
        }
Exemplo n.º 2
0
        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.");
            }
        }