private void btnUpdate_Click(object sender, EventArgs e) { string id = cbxMenu.SelectedValue.ToString(); BaseDeDatos bd = new BaseDeDatos(); Boolean res = bd.ModificarProducto(tbxPlatillo.Text, tbxPrecio.Text, rtbxDescripcion.Text, id); if (res) { MessageBox.Show("Su producto fue actualizado con exito!"); } else { MessageBox.Show("No se logro actualizar el producto"); } }
private void registrarBtn_Click(object sender, EventArgs e) { BaseDeDatos bd = new BaseDeDatos(); Boolean res = bd.AgregarProducto(tbxNomPlatillo.Text, tbxPrecioPlatillo.Text, rtbxDescripcion.Text); if (res) { MessageBox.Show("Su producto fue agregado con exito!"); } else { MessageBox.Show("No se logro agregar el producto"); } tbxPrecioPlatillo.Clear(); tbxPrecioPlatillo.Clear(); rtbxDescripcion.Clear(); }