Пример #1
0
        private void cboLuaChonTraLoad()
        {
            DataTable dt = BUS_OBJ.loadDSSachDangMuonTheoMaThe(user.TenDangNhap);

            if (dt.Rows.Count != 0)
            {
                cboLuaChonTra.DataSource    = dt;
                cboLuaChonTra.DisplayMember = "TenSach";
                cboLuaChonTra.ValueMember   = "MaSach";
            }
            else
            {
                cboLuaChonTra.DataSource    = null;
                cboLuaChonTra.SelectedIndex = -1;
            }
        }
Пример #2
0
 private void cboLuaChonTraLoad()
 {
     if (this.user.LoaiTaiKhoan == 1)
     {
         dt = BUS_OBJ.loadDSSachDangMuonTheoMaThe(txtMaThe.Text);
     }
     else
     {
         dt = BUS_OBJ.loadDSSachDangMuonTheoMaThe(user.TenDangNhap);
     }
     if (dt.Rows.Count != 0)
     {
         cboLuaChonTra.DataSource    = dt;
         cboLuaChonTra.DisplayMember = "TenSach";
         cboLuaChonTra.ValueMember   = "MaSach";
     }
     else
     {
         cboLuaChonTra.DataSource    = null;
         cboLuaChonTra.SelectedIndex = -1;
     }
 }