private void btnluuphong_Click(object sender, EventArgs e) { trangthai(false); if (temp == 1) { phongBLL pBLL = new phongBLL(); pBLL.them_phong(Convert.ToInt32(txtphong.Text), traveTinhtrang(), cbloaiphong.Text, Convert.ToInt32(txtdongiaphong.Text)); hienthi(); } else { phongBLL pBLL = new phongBLL(); pBLL.sua_phong(Convert.ToInt32(txtphong.Text), traveTinhtrang(), cbloaiphong.Text, Convert.ToInt32(txtdongiaphong.Text)); // nvBLL.sua_phong(txttennv.Text, travegioitinh(), dtngaysinh.Value, txtscm.Text, txtdiachi.Text, txtsdt.Text, dtngayvaolam.Value, int.Parse(txtmanv.Text)); hienthi(); } btnluuphong.Enabled = false; btnthemphong.Enabled = true; btnxoaphong.Enabled = true; btnthoatphong.Enabled = true; }
private void btnluuphong_Click(object sender, EventArgs e) { trangthai(false); if (temp == 1) { phongBLL pBLL = new phongBLL(); pBLL.them_phong(int.Parse(txtPhong.Text), traveTinhTrang(), traveLoaiPhong(), float.Parse(txtDonGiaPhong.Text)); hienthi(); } //else //{ // nhanvienBLL nvBLL = new nhanvienBLL(); // nvBLL.sua_nhanvien(txttennv.Text, travegioitinh(), dtngaysinh.Value, txtscm.Text, txtdiachi.Text, txtsdt.Text, dtngayvaolam.Value, int.Parse(txtmanv.Text)); // hienthi(); //} //btnluu.Enabled = false; //btnhuy.Enabled = false; //btnsua.Enabled = true; //btnthem.Enabled = true; //btnxoa.Enabled = true; }