Пример #1
0
        /// <summary>
        ///     Opens a viewer to edit the expense clicked on
        /// </summary>
        /// <param name="sender">Standard sender object</param>
        /// <param name="e">standard MouseEvent object</param>
        private void dgOut_MouseDoubleClick(object sender, MouseEventArgs e)
        {
            var grid = sender as DataGridView;

            if (grid.CurrentCell == null)
            {
                return;
            }

            using (var form = new ExpenseViewer(grid.CurrentCell.OwningRow.DataBoundItem as Expense))
            {
                form.ShowDialog();
            }

            DataBinding();
        }
Пример #2
0
        /// <summary>
        ///     Opens a viewer to edit the expense clicked on
        /// </summary>
        /// <param name="sender">Standard sender object</param>
        /// <param name="e">standard MouseEvent object</param>
        private void dgOut_MouseDoubleClick(object sender, MouseEventArgs e)
        {
            var grid = sender as DataGridView;
            if (grid.CurrentCell == null) return;

            using (var form = new ExpenseViewer(grid.CurrentCell.OwningRow.DataBoundItem as Expense))
            {
                form.ShowDialog();
            }

            DataBinding();
        }