private void AbrirHab() { FrmRegistroAlquiler alquiler = new FrmRegistroAlquiler(); if (lbl_Estado.Text == "DISPONIBLE") { alquiler.tb_CodHab.Text = btn_Hab.Text; if (alquiler.ShowDialog() == DialogResult.OK) { panel1.BackColor = Color.Red; lbl_Estado.Text = "OCUPADO"; } } else if (lbl_Estado.Text == "OCUPADO") { alquiler.ObtenerDatosCheckOut(btn_Hab.Text); alquiler.tb_CodHab.Text = btn_Hab.Text; alquiler.btn_CheckOut.Visible = true; if (alquiler.ShowDialog() == DialogResult.OK) { panel1.BackColor = Color.LightGreen; lbl_Estado.Text = "DISPONIBLE"; } } }
private void btn_Hab_Click(object sender, EventArgs e) { FrmRegistroAlquiler alquiler = new FrmRegistroAlquiler(); alquiler.ShowDialog(); }