public void Excute()
        {
            Console.WriteLine("隊列任務");
            EmployeesService = new EmployeesService();
            var result = EmployeesService.GetAll();

            Console.WriteLine($"資料筆數:{result.Count}");
        }
Esempio n. 2
0
        // GET: Admin/AdminEmployees
        public ActionResult Index()
        {
            var modelView = new AdminEmployeesViewModel
            {
                ListEmployees = _employeesService.GetAll()
            };

            return(View(modelView));
        }
Esempio n. 3
0
        public ActionResult OnlineOrder()
        {
            var modelView = new EmployeesViewModel
            {
                employeesRoles = _employeesRoleService.GetAll(),
                employees      = _employeesService.GetAll(),
            };

            return(PartialView(modelView));
        }
Esempio n. 4
0
 public ActionResult <IEnumerable <Employee> > Get()
 {
     try
     {
         var employees = db.GetAll().ToList();
         return(employees);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Esempio n. 5
0
        public IActionResult Get()
        {
            try
            {
                IEnumerable <Employee> employees = _employeesService.GetAll();

                // If no employees are found, returns 404.
                if (!employees.Any())
                {
                    return(NotFound());
                }

                return(Ok(new GetAllEmployeesResponse
                {
                    Employees = employees
                }));
            }
            catch (Exception ex)
            {
                _logger.LogError(ex, "Error on getting all employees");
                throw ex;
            }
        }
Esempio n. 6
0
 public IActionResult Employee()
 {
     return(View(_employeesService.GetAll()));
 }
Esempio n. 7
0
 public IEnumerable <Employee> GetAll()
 {
     return(employeesServiceDelegate.GetAll());
 }
Esempio n. 8
0
 public IActionResult Index()
 {
     //return Content("Hello from home controller");
     return(View(_employeesService.GetAll()));
 }
Esempio n. 9
0
 public IEnumerable <Employee> GetAll() => _employeesService.GetAll();
 [AllowAnonymous] //просматривать список могут все
 public IActionResult Employees()
 {
     return(View(_employees.GetAll().ToView()));
 }
Esempio n. 11
0
 public IEnumerable <EmployeeEntity> Get()
 {
     Logger.LogDebug("Made it past cache...fetching data");
     return(EmployeesService.GetAll());
 }
 public IEnumerable <Employee> GetAll()
 {
     return(_employeesService.GetAll());
 }
Esempio n. 13
0
        public IActionResult EmployeeList()
        {
            var employees = _mapper.Map <IEnumerable <EmployeeViewModel> >(_employeesService.GetAll());

            return(View(employees));
        }
Esempio n. 14
0
        public async Task <IActionResult> Get()
        {
            var clients = await _employeesService.GetAll();

            return(Ok(clients));
        }