Beispiel #1
0
        private void reportsGrid_CellContentDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            var grid = sender as DataGridView;

            if (grid != null)
            {
                var data       = grid.DataSource as IEnumerable <ViewModel.TicketDetail>;
                var ticket     = data.Skip(e.RowIndex).First();
                var ticketEdit = new EditTicket();
                ticketEdit.DataSource = ticket;
                ticketEdit.Show();
            }
        }
Beispiel #2
0
 private void reportsGrid_CellContentDoubleClick(object sender, DataGridViewCellEventArgs e)
 {
     var grid = sender as DataGridView;
     if (grid != null)
     {
         var data = grid.DataSource as IEnumerable<ViewModel.TicketDetail>;
         var ticket = data.Skip(e.RowIndex).First();
         var ticketEdit = new EditTicket();
         ticketEdit.DataSource = ticket;
         ticketEdit.Show();
     }
 }