private void PDetalle_Load(object sender, EventArgs e) { detalle = new NDetalleReparacion(); comboRepuesto.DataSource = repuesto.ShowRepuestos(); comboRepuesto.DisplayMember = "descripcion"; comboRepuesto.ValueMember = "id"; comboServicio.DataSource = servicio.ShowServicios(); comboServicio.DisplayMember = "descripcion"; comboServicio.ValueMember = "id"; }
private void btnSave_Click(object sender, EventArgs e) { Repuesto.RegistrarRepuesto(textMarca.Text, textDescripcion.Text, textIndustria.Text, Convert.ToDecimal(textPrecio.Text)); MessageBox.Show("Se registro correctamente"); dataGridView1.DataSource = Repuesto.ShowRepuestos(); }
private void PRepuesto_Load(object sender, EventArgs e) { Repuesto = new NRepuesto(); dataGridView1.DataSource = Repuesto.ShowRepuestos(); }