Esempio n. 1
0
 private void DatPhong_Load(object sender, EventArgs e)
 {
     ComboBoxPhong.DataSource    = phong.getDatPhong();
     ComboBoxPhong.DisplayMember = "TenPhong";
     ComboBoxPhong.ValueMember   = "MaPhong";
     ComboBoxPhong.SelectedItem  = null;
 }
Esempio n. 2
0
        private void ThongTinPhong_Load(object sender, EventArgs e)
        {
            Phong      phong   = new Phong();
            SqlCommand command = new SqlCommand("Select * from ChiTietPhong ");

            dataGridView1.ReadOnly = true;

            dataGridView1.DataSource = phong.getshowkh(command);

            dataGridView1.AllowUserToAddRows = false;

            comboBoxRoomName.DataSource    = phong.getDatPhong();
            comboBoxRoomName.DisplayMember = "TenPhong";
            comboBoxRoomName.ValueMember   = "MaPhong";
            comboBoxRoomName.SelectedItem  = null;
        }