private void btnAddOrder_Click(object sender, EventArgs e) { OrdersForm OF = new OrdersForm(); DataGridViewRow row = dataGridView1.CurrentCell.OwningRow; int ID = Convert.ToInt32(row.Cells[0].Value.ToString()); string FirstName = row.Cells[1].Value.ToString(); string LastName = row.Cells[2].Value.ToString(); string Telephone = row.Cells[3].Value.ToString(); string Address = row.Cells[4].Value.ToString(); OF.SetLabelInfos(ID, FirstName, LastName, Telephone, Address); OF.Show(); }
private void btnAddOrder_Click(object sender, EventArgs e) { OrdersForm OF = new OrdersForm(); DataGridViewRow row = dataGridView1.CurrentCell.OwningRow; int ID = Convert.ToInt32(row.Cells[0].Value.ToString()); string FirstName = row.Cells[1].Value.ToString(); string LastName = row.Cells[2].Value.ToString(); string Telephone = row.Cells[3].Value.ToString(); string Address = row.Cells[4].Value.ToString(); OF.SetLabelInfos(ID, FirstName, LastName, Telephone, Address); OF.Show(); }