private void dtg_prep_SelectionChanged(object sender, SelectionChangedEventArgs e) { try { object item = dtg_prep.SelectedItem; if (item != null) { string Orden = (dtg_prep.SelectedCells[0].Column.GetCellContent(item) as TextBlock).Text; string bebes = (dtg_prep.SelectedCells[1].Column.GetCellContent(item) as TextBlock).Text; PlatoBLL us = new PlatoBLL(); us.orden_id_orden = Int32.Parse(Orden); us.Id_plato = Int32.Parse(bebes); us.Alter_plato_Listo(us); } else { } } catch { } }