private async void GetCompanies()
        {
            IEnumerable <Employee> companies = await _bonusRepo.GetEmployeeWithCompany(0);

            foreach (Employee company in companies)
            {
                _employees.Add(company);
            }
        }
예제 #2
0
        public async Task <IActionResult> Index(int companyId = 0)
        {
            //List<Employee> employees = _empRepo.GetAll();
            //foreach(Employee obj in employees)
            //{
            //    obj.Company = _compRepo.Find(obj.CompanyId);
            //}

            List <Employee> employees = _bonRepo.GetEmployeeWithCompany(companyId);

            return(View(employees));
        }
예제 #3
0
        //
        public IActionResult Index(int companyId = 0)
        {
            /* List<Employee> employees = _empRepo.GetAll();
             * foreach(Employee obj in employees)
             * {
             * obj.Company = _compRepo.Find(obj.CompanyId);
             * } */

            // 1
            //return View(_empRepo.GetAll());

            // 2
            List <Employee> employees = _bonRepo.GetEmployeeWithCompany(companyId);

            return(View(employees));
        }
        public async Task <IActionResult> Index()
        {
            List <Employee> employees = _bonRepo.GetEmployeeWithCompany();

            return(View(employees));
        }