private void frmQuanLyPhong_Load(object sender, EventArgs e) { try { SetGridViewStyle(dgvQuanLyPhong); BindGrid(Phong.GetAll()); } catch (Exception ex) { MessageBox.Show(ex.Message); } }
private void cmbLoaiPhong_SelectedIndexChanged(object sender, EventArgs e) { try { if (cmbLoaiPhong.SelectedValue != null) { LoaiPhong temp = (LoaiPhong)cmbLoaiPhong.SelectedItem; var list = Phong.GetAll(temp.LoaiPhongID); FillSoPhongCombobox(list); } } catch { } }