示例#1
0
        private void button5_Click(object sender, EventArgs e)
        {
            DataGridViewRow newDataRow = dataGridView1.Rows[selectedrow];
            DataGridViewRow row        = dataGridView1.Rows[selectedrow];

            if (row.Cells[6].Value.ToString() == "Paid")
            {
                invoice_print.c_name = row.Cells[8].Value.ToString();
                invoice_print.in_no  = row.Cells[0].Value.ToString();

                invoice_print ip = new invoice_print();
                ip.ShowDialog();
            }
            else
            {
                MessageBox.Show("Amount not Paid");
            }
        }
示例#2
0
        //print
        private void button5_Click(object sender, EventArgs e)
        {
            DataGridViewRow newDataRow = dataGridView1.Rows[selectedrow];
            DataGridViewRow row        = dataGridView1.Rows[selectedrow];

            if (row.Cells[4].Value.ToString() == "Invoice")
            {
                invoice_print.c_name = row.Cells[16].Value.ToString();
                invoice_print.in_no  = row.Cells[8].Value.ToString();


                invoice_print ip = new invoice_print();
                ip.ShowDialog();
            }
            else if (row.Cells[4].Value.ToString() == "Tax-Invoice")
            {
                tax_invoice_print.c_name = row.Cells[2].Value.ToString();
                tax_invoice_print.in_no  = row.Cells[8].Value.ToString();


                tax_invoice_print ip = new tax_invoice_print();
                ip.ShowDialog();
            }
        }