public void UpdateTable(DataGrid dataGrid, IWorkerRepository workerRepository) { if (SearchTextBox.Text.Length > 0) { dataGrid.ItemsSource = workerRepository.GetAllBySearchString(SearchTextBox.Text); return; } dataGrid.ItemsSource = workerRepository.GetAll(); }
public IEnumerable <GetWorkerDto> GetAllWorkers() { return(_workerRepository.GetAll() .Select(w => _workerConverter.FromWorkerToGetWorkerDto(w))); }
public IActionResult Index() { return(View(repo.GetAll())); }
public override void UpdateData() { UpdateTable(WorkersDataGrid, _workerRepository); WorkersAmountLabel.Content = "Усього в системі зареєстрованно " + _workerRepository.GetAll().Count; }
public IEnumerable <WorkerViewModel> GetWorkers() { var workers = _workerRepository.GetAll(); return(_mapper.Map <List <Worker>, List <WorkerViewModel> >(workers)); }
public async Task <List <WorkerDTO> > GetAllAsynk() { var result = await _workerRepository.GetAll(); return(_mapper.Map <List <Worker>, List <WorkerDTO> >(result)); }