Esempio n. 1
0
 void CargarPrecioSeleccionado(PrecioIngredientePresentacion precioSeleccionado)
 {
     lblIngrediente.Text    = precioSeleccionado.Ingrediente;
     txtPrecio.Text         = precioSeleccionado.Precio;
     txtCantidad.Text       = precioSeleccionado.Cantidad;
     cboUnidad.SelectedItem = precioSeleccionado.Unidad;
 }
Esempio n. 2
0
        void GrvRecetas_CellEnter(object sender, DataGridViewCellEventArgs e)
        {
            DataGridViewRow filaSeleccionada = grvPrecios.Rows[e.RowIndex];

            filaSeleccionada.Selected = true;

            PrecioIngredientePresentacion precioSeleccionado = (PrecioIngredientePresentacion)filaSeleccionada.DataBoundItem;

            CargarPrecioSeleccionado(precioSeleccionado);
        }
Esempio n. 3
0
        void GrvRecetas_SelectionChanged(object sender, EventArgs e)
        {
            int filasSeleccionadas = grvPrecios.SelectedRows.Count;

            if (filasSeleccionadas == 0 || filasSeleccionadas > 1)
            {
                return;
            }

            DataGridViewRow filaSeleccionada = grvPrecios.CurrentRow;
            PrecioIngredientePresentacion precioSeleccionado = (PrecioIngredientePresentacion)filaSeleccionada.DataBoundItem;

            CargarPrecioSeleccionado(precioSeleccionado);
        }