Esempio n. 1
0
        private void LoadDataGridView()
        {
            Helper.InitializeDataGridView(dgvProductUnitList);

            Cursor           = Cursors.WaitCursor;
            _productUnitList = _productUnitService.GetAll().Where(w => !w.IsDeleted).ToList();
            dgvProductUnitList.DataSource = _productUnitList;
            Cursor = Cursors.Default;
        }
        public IActionResult GetList()
        {
            var result = _productUnitService.GetAll();

            if (result.Success)
            {
                return(Ok(result));
            }

            return(BadRequest(result));
        }
Esempio n. 3
0
        private void LoadProductUnitComboBox()
        {
            Helper.InitializeComboBox(cbxProductUnit);

            Cursor                       = Cursors.WaitCursor;
            _productUnitList             = _productUnitService.GetAll().Where(w => !w.IsDeleted).ToList();
            Cursor                       = Cursors.Default;
            cbxProductUnit.DataSource    = _productUnitList;
            cbxProductUnit.DisplayMember = "ProductUnitName";
            cbxProductUnit.ValueMember   = "Id";
        }
Esempio n. 4
0
 public async Task <ActionResult <IEnumerable <ProductUnitModel> > > GetAll()
 {
     return(Ok(await _productUnitService.GetAll(await GetUserId(),
                                                GetPermissionId())));
 }