예제 #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 purchasing_datagrid_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            int temp = purchasing_datagrid.CurrentCell.RowIndex;

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

                Modal_Purchases_Detail md = new Modal_Purchases_Detail(temp, orderList, orderList[temp].vendor);
                md.Show();
            }
        }