private void InicializarControles() { ProductosComboBox.DataSource = null; PrecioUnitTextBox.Clear(); productoSeleccionado = null; TiposComboBox.SelectedIndex = 0; PrecioTotalTextBox.Clear(); CantidadNumericUpDown.Value = 0; TiposComboBox.Focus(); }
private void InicializarControlesItemVenta() { CategoriaComboBox.SelectedIndex = 0; ProductoComboBox.DataSource = null; StockTextBox.Clear(); PrecioTotalTextoBox.Clear(); PrecioUnitTextBox.Clear(); CantidadUpDown.Value = 0; productoDto = null; detalleVenta = null; }
private void ProductosComboBox_SelectedIndexChanged(object sender, EventArgs e) { if (ProductosComboBox.SelectedIndex > 0) { productoSeleccionado = (ProductoListDto)ProductosComboBox.SelectedItem; PrecioUnitTextBox.Text = productoSeleccionado.Precio.ToString(); CantidadNumericUpDown.Enabled = true; } else { productoSeleccionado = null; PrecioUnitTextBox.Clear(); CantidadNumericUpDown.Enabled = false; } }