Esempio n. 1
0
        private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            string colName = dataGridView1.Columns[e.ColumnIndex].Name;

            if (colName == "colCancel")
            {
                frmCancelDetails f = new frmCancelDetails(this);
                f.txtID.Text          = dataGridView1.Rows[e.RowIndex].Cells[1].Value.ToString();
                f.txtTransNo.Text     = dataGridView1.Rows[e.RowIndex].Cells[2].Value.ToString();
                f.txtPcode.Text       = dataGridView1.Rows[e.RowIndex].Cells[3].Value.ToString();
                f.txtDescription.Text = dataGridView1.Rows[e.RowIndex].Cells[4].Value.ToString();
                f.txtPrice.Text       = dataGridView1.Rows[e.RowIndex].Cells[5].Value.ToString();
                f.txtQty.Text         = dataGridView1.Rows[e.RowIndex].Cells[6].Value.ToString();
                f.txtDiscount.Text    = dataGridView1.Rows[e.RowIndex].Cells[7].Value.ToString();
                f.txtTotal.Text       = dataGridView1.Rows[e.RowIndex].Cells[8].Value.ToString();
                f.txtCancelby.Text    = suser;
                f.ShowDialog();
            }
        }
Esempio n. 2
0
 public frmVoid(frmCancelDetails frm)
 {
     InitializeComponent();
     con = new MySqlConnection(dbCon.getConnection());
     f   = frm;
 }