private void DgUsers_MouseDoubleClick(object sender, MouseButtonEventArgs e)
        {
            DataGrid grid = sender as DataGrid;


            if (grid != null && grid.SelectedItems != null && grid.SelectedItems.Count == 1)
            {
                DataGridRow dgr = grid.ItemContainerGenerator.ContainerFromItem(grid.SelectedItem) as DataGridRow;
                Usuario     us  = (Usuario)dgr.Item;

                uscventa.ClienteCompra(us);

                this.Close();
            }
        }
Exemplo n.º 2
0
        private void DgUsers_MouseDoubleClick(object sender, MouseButtonEventArgs e)
        {
            DataGrid grid = sender as DataGrid;


            if (grid != null && grid.SelectedItems != null && grid.SelectedItems.Count == 1)
            {
                DataGridRow dgr = grid.ItemContainerGenerator.ContainerFromItem(grid.SelectedItem) as DataGridRow;
                Usuario     us  = (Usuario)dgr.Item;



                usventa.ClienteCompra(us);

                /*  usventa.TxTUsuarioID.Text = us.UsuarioID.ToString(cultures);
                 * usventa.TxTNombreCliente.Text = us.Nombre.ToString(cultures);*/

                this.Close();
            }
        }