示例#1
0
        private void datagrid_CellContentDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            if (mode == 0)
            {
                int temp = datagrid.CurrentCell.RowIndex;
                if (temp < 0 || temp >= InvoicesList.Count)
                {
                    MessageBox.Show("Please select a valid invoice!");
                }
                else
                {
                    // Console.WriteLine("temp:" + temp);

                    Modal_Invoices_Detail md = new Modal_Invoices_Detail(temp, InvoicesList);
                    md.Show();
                }
            }

            else
            {
                int temp = datagrid.CurrentCell.RowIndex;
                if (temp < 0 || temp >= PurchasesList.Count)
                {
                    MessageBox.Show("Please select a valid order!");
                }
                else
                {
                    // Console.WriteLine("temp:" + temp);

                    Modal_Purchases_Detail md = new Modal_Purchases_Detail(temp, PurchasesList, PurchasesList[temp].vendor);
                    md.Show();
                }
            }
        }
示例#2
0
        private void invoices_datagrid_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            int temp = invoices_datagrid.CurrentCell.RowIndex;

            if (temp < 0 || temp >= invoicesList.Count)
            {
                MessageBox.Show("Please select a valid invoice!");
            }
            else
            {
                // Console.WriteLine("temp:" + temp);

                Modal_Invoices_Detail md = new Modal_Invoices_Detail(temp, invoicesList);
                md.Show();
            }
        }