// Load dữ liệu public void loadData(Phong obj = null) { try { layout.load(gridViewCTThietBi); working = false; enableEdit(false); List<LoaiThietBi> listLoai = LoaiThietBi.getAll(); _ucTreeLoaiTB.loadData(listLoai); List<ViTriHienThi> listVitris = ViTriHienThi.getAllHavePhong(); _ucTreeViTri.loadData(listVitris); if (obj != null) { objPhong = obj; _ucTreeViTri.setPhong(objPhong); } else { objPhong = _ucTreeViTri.getPhong(); } gridControlCTThietBi.DataSource = null; listCTThietBis = ChiTietTBHienThi.getAllByPhongId(objPhong.id); gridControlCTThietBi.DataSource = listCTThietBis; editGUI(); } catch (Exception ex) { Debug.WriteLine(this.Name + "->loadData:" + ex.Message); } }
public void loadData() { checkedComboBoxEdit_tinhTrang.Properties.DataSource = TinhTrang.getAll(); //ucTreeLoaiTB2 ucTreeLoaiTB2.loadData(LoaiThietBi.getAll()); ucTreeLoaiTB2.Dock = DockStyle.Fill; panelLoaiTB.Controls.Clear(); panelLoaiTB.Controls.Add(ucTreeLoaiTB2); checkedComboBoxEdit_coso.Properties.DataSource = null; checkedComboBoxEdit_coso.Properties.DataSource = CoSo.getAll(); //datetime dateEdit_to.EditValue = ServerTimeHelper.getNow(); gridControlThongKe.DataSource = null; //checkPermission btnOK.Enabled = /*btnPrint.Enabled =*/ simpleButton_View.Enabled = simpleButton_Design.Enabled = Permission.canDo(Permission._THONGKE_INBAOCAO); layout.load(gridViewThongKe); }