private void LoadCombos() { var dtBrand = _brandService.GetAllBrands(); cmbBrand.DataSource = dtBrand; cmbBrand.ValueMember = "BrandId"; cmbBrand.DisplayMember = "BrandName"; cmbBrand.Refresh(); var dtFlavour = _flavourService.GetAllFlavours(); cmbFlavour.DataSource = dtFlavour; cmbFlavour.ValueMember = "FlavourId"; cmbFlavour.DisplayMember = "FlavourName"; cmbFlavour.Refresh(); var dtUnit = _unitService.GetAllData(); cmbUnit.DataSource = dtUnit; cmbUnit.ValueMember = "UnitofMeasurementId"; cmbUnit.DisplayMember = "UnitName"; cmbUnit.Refresh(); var dtProductionMaterial = _productionMaterialService.GetProductionMaterial(); cmbMaterial.DataSource = dtProductionMaterial; cmbMaterial.ValueMember = "ProductionMaterialId"; cmbMaterial.DisplayMember = "MaterialName"; cmbMaterial.Refresh(); }
private void LoadProductionMaterialCombo() { var combodata = _productionMaterialService.GetProductionMaterial(); cmbProduct.DataSource = combodata; cmbProduct.ValueMember = "ProductionMaterialId"; cmbProduct.DisplayMember = "MaterialName"; _commonService.HideColumn(cmbProduct); cmbProduct.Refresh(); }
private void ComboMaterialName() { cmbMaterialName.DataSource = _ProductionMaterial.GetProductionMaterial(); cmbMaterialName.ValueMember = "ProductionMaterialId"; cmbMaterialName.DisplayMember = "MaterialName"; }
private void btnRefresh_Click(object sender, EventArgs e) { grdData.DataSource = _productionMaterialService.GetProductionMaterial(); grdData.Columns["UnitOfMeasurementId"].IsVisible = false; }