Example #1
0
        private void dataGridView1_RowHeaderMouseClick(object sender, DataGridViewCellMouseEventArgs e)
        {
            try
            {
                DataGridViewRow dr = dataGridView1.SelectedRows[0];
                // this.Hide();
                InvoiceReport_frm frm = new InvoiceReport_frm();
                // or simply use column name instead of index
                //dr.Cells["SubjectCode"].Value.ToString();
                //frm.Show();

                txt_Client_Name.Text  = dr.Cells[1].Value.ToString();
                txt_Invoice_No.Text   = dr.Cells[0].Value.ToString();
                cmb_Payment.Text      = dr.Cells[17].Value.ToString();
                txt_Total_Amount.Text = dr.Cells[23].Value.ToString();
                value4 = Convert.ToDecimal(dr.Cells[18].Value.ToString());
                txt_Amount_Due.Text = dr.Cells[24].Value.ToString();
            }


            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Example #2
0
        private void invoiceToolStripMenuItem_Click(object sender, EventArgs e)
        {
            InvoiceReport_frm frm = new InvoiceReport_frm();

            frm.Show();
        }