public void MostrarItem(UltraGridRow Row) { ItemEntradaCaja Item = (ItemEntradaCaja)Row.Tag; Row.Cells[colCodigo].Value = Item.Codigo; Row.Cells[colDescripcion].Value = Item.Descripcion; Row.Cells[colPrecio].Value = Item.Precio; Row.Cells[colCantidad].Value = Item.Cantidad; Row.Cells[colTotal].Value = Item.Total; Row.Cells[colObservacion].Value = Item.Observacion; }
private void ugItems_CellChange(object sender, CellEventArgs e) { if (ActualizandoUI) { return; } try { ItemEntradaCaja Item = (ItemEntradaCaja)e.Cell.Row.Tag; switch (e.Cell.Column.Key) { case colCodigo: Item.Codigo = e.Cell.Text; break; case colDescripcion: Item.Descripcion = e.Cell.Text; break; case colPrecio: Item.Precio = Convert.ToDecimal(e.Cell.Text.Replace('_', ' ')); break; case colCantidad: Item.Cantidad = Convert.ToDecimal(e.Cell.Text.Replace('_', ' ')); break; case colObservacion: Item.Observacion = e.Cell.Text; break; default: break; } MostrarItem(e.Cell.Row); MostrarTotales(); } catch (Exception ex) { SoftException.Control(ex); } }