private void btnThemPhong_Click(object sender, EventArgs e) { try { Phong Phong = new Phong(); Phong.GiaTheoGio = Convert.ToInt32(txtGiaTheoGio.Text); Phong.GiaTheoNgay = Convert.ToInt32(txtGiaTheoNgay.Text); Phong.TenPhong = txtTenPhong.Text; Phong.MaLP = cboLoaiPhong.SelectedValue.ToString(); dal_phong.ThemPhong(Phong); dgvPhong.DataSource = dal_phong.ThongTinCacPhong(); MessageBox.Show("Đã Thêm Thành Công!"); } catch (Exception) { MessageBox.Show("Lỗi"); } }