Exemplo n.º 1
0
        public Employee GetEmployeeByCredentials(string user_name)
        {
            return(ExecuteFaultHandledOperation(() =>
            {
                Log.Debug($"GetEmployeeByCredentials user_name: {user_name}");
                var emp_data = _person_repo.GetByUserName(user_name);

                var ep_data = _entity_person_repo.GetByID(emp_data.PersonKey);

                var employee = _pers_es.Map(ep_data);
                employee.PersonAttributes = _entity_attrib_be.GetAttributeByEntity(employee.PersonKey, QIQOEntityType.Person);
                employee.Addresses = _address_be.GetAddressesByEntityID(employee.PersonKey, QIQOEntityType.Person);
                employee.Companies = _company_be.GetCompaniesByEmployee(employee);
                //GetEmployeeSupervisor(employee);
                _pers_es.InitPersonData(employee, emp_data);
                return employee;
            }));
        }
        public List <Company> GetCompanies(Employee emp)
        {
            ICompanyBusinessEngine company_be = _business_engine_factory.GetBusinessEngine <ICompanyBusinessEngine>();

            return(company_be.GetCompaniesByEmployee(emp));
        }