예제 #1
0
        /// <summary>
        ///     Opens a viewer to edit the income clicked on
        /// </summary>
        /// <param name="sender">Standard sender object</param>
        /// <param name="e">standard MouseEvent object</param>
        private void dgIn_MouseDoubleClick(object sender, MouseEventArgs e)
        {
            var grid = sender as DataGridView;

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

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

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

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

            DataBinding();
        }