private void buttonCreate_Click(object sender, EventArgs e) { FormABMHabitacionModify formABMHabitacionModify = new FormABMHabitacionModify(false, null, null, null); formABMHabitacionModify.MdiParent = this.MdiParent; MdiParent.Size = formABMHabitacionModify.Size; formABMHabitacionModify.Show(); this.Close(); }
private void buttonModify_Click(object sender, EventArgs e) { if (dgvRoom.CurrentRow != null) { String hotelId = dgvRoom.CurrentRow.Cells[0].Value.ToString(); String floorId = dgvRoom.CurrentRow.Cells[1].Value.ToString(); String roomId = dgvRoom.CurrentRow.Cells[2].Value.ToString(); FormABMHabitacionModify formABMHabitacionModify = new FormABMHabitacionModify(true, hotelId, floorId, roomId); formABMHabitacionModify.MdiParent = this.MdiParent; MdiParent.Size = formABMHabitacionModify.Size; formABMHabitacionModify.Show(); this.Close(); } else { MessageBox.Show("Debe seleccionar una modificar a modificar"); } }