Beispiel #1
0
        private void dgview_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            var senderGrid = (DataGridView)sender;

            if (e.RowIndex >= 0)
            {
                var id = Convert.ToInt64(senderGrid.Rows[e.RowIndex].Cells[0].Value);
                if (id > 0)
                {
                    frmReceipt frm = new frmReceipt()
                    {
                        Mode = Models.EntryMode.Edit, ReceiptId = id
                    };
                    if (frm.ShowDialog() == DialogResult.OK)
                    {
                        Search(dtpFrom.Value, dtpTo.Value, null);
                    }
                }
            }
        }
Beispiel #2
0
        /// <summary>
        /// Displays form consisting of the current order's information
        /// </summary>
        private void ShowReceipt()
        {
            Form receipt = new frmReceipt(order);

            receipt.ShowDialog();
        }