예제 #1
0
        public async Task <ActionResult <IEnumerable <Models.SuppliersDto> > > GetSuppliers(int page = 0, int itemsPerPage = 0)
        {
            var suppliersEntities = await _suppliersRepository.GetSuppliers(page, itemsPerPage);

            var _results = _mapper.Map <IEnumerable <Models.SuppliersDto> >(suppliersEntities);

            return(Ok(_results));
        }
예제 #2
0
        protected async Task UpdateDataGridViewSuppliers()
        {
            var suppliers = await _suppliersRepository.GetSuppliers();

            dataGridViewSuppliers.Rows.Clear();
            dataGridViewSuppliers.Columns[1].Width = suppliers.Count > 4 ? 262 : 279;
            foreach (var supplier in suppliers)
            {
                dataGridViewSuppliers.Rows.Add(new[]
                {
                    supplier.OGRN.ToString(),
                    supplier.Name,
                    supplier.ContactNumber
                });
            }
            ClearDataGridViewSuppliersSelection();
        }
예제 #3
0
 public IQueryable <Suppliers> GetSuppliers([Service] ISuppliersRepository repository) => repository.GetSuppliers();
예제 #4
0
 public IEnumerable <Supplier> Get()
 {
     _logger.LogInformation("Someone get suppliers info");
     return(_suppliers.GetSuppliers());
 }