public FormTui()
 {
     InitializeComponent();
     //khởi tạo đối tượng thực hiện các thao tác thêm, xóa, sửa vào database
     _databaseHandler = new TuiHandler();
     //lấy danh sách túi từ database
     _tuiTable = _databaseHandler.LayDuLieu();
 }
예제 #2
0
        private void HienThiDanhSachTui(DataGridViewComboBoxColumn combobox)
        {
            //gọi handler để load dữ liệu từ database
            TuiHandler handler = new TuiHandler();

            _tuiTable              = handler.LayDuLieu();
            combobox.DataSource    = _tuiTable;
            combobox.DisplayMember = "Loai";
            combobox.ValueMember   = "Ma";
        }