private void tsmiViewTM_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(); InsertTM frmViewTm = new InsertTM(thisTmpRec); frmViewTm.MakeAllControlsReadOnly(frmViewTm); frmViewTm.GetFromGridOnlyChecked(); frmViewTm.btnSave.Enabled = false; frmViewTm.ShowDialog(); } }
private void tsmiViewTM_Click(object sender, EventArgs e) { if (gridView1.SelectedRowsCount > 0 && gridView1.GetSelectedRows()[0] >= 0) { int Id = Convert.ToInt32(gridView1.GetRowCellValue(gridView1.GetSelectedRows()[0], gridView1.Columns["Id"]).ToString()); Trademark thisTmpRec = tempRecList.Where(i => i.Id == Id).First(); InsertTM frmViewTm = new InsertTM(thisTmpRec); frmViewTm.MakeAllControlsReadOnly(frmViewTm); frmViewTm.GetFromGridOnlyChecked(); frmViewTm.btnSave.Enabled = false; frmViewTm.ShowDialog(); } }
private void tsmiViewTM_Click(object sender, EventArgs e) { //Select if (dgvAlerts.SelectedRows.Count > 0) { //int dgvIndex = dgvAlerts.SelectedRows[0].Index; int Id = Convert.ToInt32(dgvAlerts.SelectedRows[0].Cells["tmp_Id"].Value.ToString()); Trademark thisTmRec = new Trademark(Id); InsertTM frmViewTm = new InsertTM(thisTmRec); frmViewTm.MakeAllControlsReadOnly(frmViewTm); frmViewTm.GetFromGridOnlyChecked(); frmViewTm.btnSave.Enabled = false; frmViewTm.ShowDialog(); } }