示例#1
0
 private void InicializarControles()
 {
     ProductosComboBox.DataSource = null;
     PrecioUnitTextBox.Clear();
     productoSeleccionado        = null;
     TiposComboBox.SelectedIndex = 0;
     PrecioTotalTextBox.Clear();
     CantidadNumericUpDown.Value = 0;
     TiposComboBox.Focus();
 }
示例#2
0
 private void InicializarControlesItemVenta()
 {
     CategoriaComboBox.SelectedIndex = 0;
     ProductoComboBox.DataSource     = null;
     StockTextBox.Clear();
     PrecioTotalTextoBox.Clear();
     PrecioUnitTextBox.Clear();
     CantidadUpDown.Value = 0;
     productoDto          = null;
     detalleVenta         = null;
 }
示例#3
0
 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;
     }
 }