private void metroTile1_Click(object sender, EventArgs e) { addRepresentative add = new addRepresentative(); add.prevform = prevform; add.Show(); add.com_id = com_id; this.Close(); }
private void dgvCompany_CellContentDoubleClick(object sender, DataGridViewCellEventArgs e) { int ri = dgvCompany.CurrentCell.RowIndex; if (ri >= 0) { DialogResult res = MessageBox.Show("Are you sure you want to add representative to this company?", "", MessageBoxButtons.OKCancel, MessageBoxIcon.Warning); if (DialogResult.OK == res) { addRepresentative add = new addRepresentative(); add.com_id = int.Parse(dgvCompany.Rows[ri].Cells[0].Value.ToString()); add.ShowDialog(); } } }