Exemplo n.º 1
0
        private void ChinhSuaThongTinPhong_Load(object sender, EventArgs e)
        {
            PhongBUS phongBUS = new PhongBUS();

            txtMaPhong.Text = phongBUS.LayThongTinPhongQuaMaPhong(MaPhong).maPhong;
            if (phongBUS.LayThongTinPhongQuaMaPhong(MaPhong).loaiPhong == 1)
            {
                txtLoaiPhong.selectedIndex = 0;
            }
            else if (phongBUS.LayThongTinPhongQuaMaPhong(MaPhong).loaiPhong == 2)
            {
                txtLoaiPhong.selectedIndex = 1;
            }
            else
            {
                txtLoaiPhong.selectedIndex = 2;
            }
            if (phongBUS.LayThongTinPhongQuaMaPhong(MaPhong).tinhTrang == 0)
            {
                txtTinhTrang.selectedIndex = 0;
            }
            else
            {
                txtTinhTrang.selectedIndex = 1;
            }
        }