public void loadData() { try { checkPermission(); layout.load(gridViewTinhTrang); editGUI("view"); if (isThietBi) { listTinhTrang = TinhTrang.getAllForTHIETBI(); } else { listTinhTrang = TinhTrang.getAllForSUCOPHONG(); } if (listTinhTrang.Count == 0) { enableButton(false); } gridControlTinhTrang.DataSource = listTinhTrang; } catch (Exception ex) { Debug.WriteLine(this.Name + "->loadData: " + ex.Message); } }
public void loadData() { List <ViTriHienThi> listViTriHienThi = ViTriHienThi.getAllHavePhong(); _ucComboBoxViTri.DataSource = listViTriHienThi; List <TinhTrang> listTinhTrang = TinhTrang.getAllForTHIETBI(); lookUpTinhTrang.Properties.DataSource = listTinhTrang; }
public frmTinhTrangVaSoLuong(bool _loaichung) { InitializeComponent(); List <TinhTrang> list = TinhTrang.getAllForTHIETBI(); lookUpEdit1.Properties.DataSource = list; spinEdit1.Properties.ReadOnly = !_loaichung; if (list.Count > 0) { lookUpEdit1.EditValue = list.First().id; } }