private void tsmiAlertsViewer_Click(object sender, EventArgs e) { if (dgvTempRecs.SelectedRows.Count > 0) { int Id = Convert.ToInt32(dgvTempRecs.SelectedRows[0].Cells["tmp_Id"].Value.ToString()); //Trademark thisTmpRec = tempRecList.Where(i => i.Id == Id).First(); TMAlertsViewer frmAlertViewer = new TMAlertsViewer(Id); frmAlertViewer.ShowDialog(); } }
private void tsmiAnalyticalView_Click(object sender, EventArgs e) { if (dgvAlerts.SelectedRows.Count > 0) { string TMNo = dgvAlerts.SelectedRows[0].Cells["tmp_No"].Value.ToString(); string TMName = dgvAlerts.SelectedRows[0].Cells["tmp_Name"].Value.ToString(); TMAlertsViewer frmAlertsView = new TMAlertsViewer(); frmAlertsView.txtTMId.Text = TMNo; frmAlertsView.txtTMName.Text = TMName; frmAlertsView.applyFilters(); frmAlertsView.ShowDialog(); } }