private void toolStripLabel2_Click(object sender, EventArgs e) { try { if (gridView1.SelectedRowsCount > 0) { var rowHandle = gridView1.FocusedRowHandle; var obj = gridView1.GetRowCellValue(rowHandle, "IDCLIENTE"); frmFCFO frm = new frmFCFO(true, obj.ToString(), "C"); frm.ShowDialog(); AtualizaGrid(); } else { MessageBox.Show("Selecione um registro", "Atenção", MessageBoxButtons.OK, MessageBoxIcon.Warning); } } catch (Exception ex) { MessageBox.Show(ex.Message); } }
private void btnNovo_Click(object sender, EventArgs e) { frmFCFO frm = new frmFCFO(false, null, "C"); frm.ShowDialog(); AtualizaGrid(); }
private void gridControl1_DoubleClick(object sender, EventArgs e) { try { var rowHandle = gridView1.FocusedRowHandle; var obj = gridView1.GetRowCellValue(rowHandle, "IDCLIENTE"); frmFCFO frm = new frmFCFO(true, obj.ToString(), "C"); frm.ShowDialog(); AtualizaGrid(); } catch (Exception ex) { MessageBox.Show(ex.Message); } }