private void bunifuFlatButton2_Click(object sender, EventArgs e) { Herencia_THoletes ht = new Herencia_THoletes(); ht.id = Convert.ToInt32(newid.Text); ht.Precio = Convert.ToInt32(newprecio.Text); pr.modificarTrifa(ht.id, ht.Precio); pr.mostarInfo(mostrarinfodata); mostrarinfodata.ClearSelection(); }
private void bunifuFlatButton1_Click(object sender, EventArgs e) { if (id.SelectedItem.ToString() == "" || precio.Text == "") { MessageBox.Show("Llene todos los campos requeridos!", "Aviso!", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); } else { Herencia_THoletes ht = new Herencia_THoletes(); ht.id = Convert.ToInt32(id.SelectedItem.ToString()); ht.Precio = Convert.ToInt32(precio.Text); pr.insertarTarifa(ht.id, ht.Precio); } id.Items.Clear(); id.Text = ""; hotel.Text = ""; pr.llenarCombo(id, "SELECT h.id FROM hotel as h where h.id not in (select e.id from tarifa_hotel as e) "); id.SelectedIndex = -1; precio.Text = ""; }