private void csvData_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { if (e.RowIndex == -1) { return; } DataGridViewCellCollection rowData = csvData.Rows[e.RowIndex].Cells; int recordIndex = e.RowIndex; ClientInfo editingData = new ClientInfo( (int)rowData["id"].Value, (string)rowData["client"].Value, DateTime.Parse((string)rowData["insertDate"].Value) ); ChangeRow changeRow = new ChangeRow(recordIndex, editingData); changeRow.Show(); }
private void addBtn_Click(object sender, EventArgs e) { ChangeRow changeRow = new ChangeRow(); changeRow.Show(); }