I have to pass id from one form to another from in C#.
I am not able to do this.
The C# code is:
private void btnedit_Click(object sender, EventArgs e)
{
foreach (DataGridViewRow a in dataGridViewUnPaidList.Rows)
{
if (a.Cells[0].Value != null)
{
Convert.ToInt64(a.Cells[1].Value); // i have to pass this id in AddInvoice() form
AddInvoice ad = new AddInvoice();
ad.Show();
NonPaideData non = new NonPaideData();
non.Hide();
}
else
{
MessageBox.Show("Now Row Is Selected");
}
}
}
Can anybody tell me what I am doing wrong?