Skip to content

Instantly share code, notes, and snippets.

@jfbueno
Last active February 16, 2016 17:14
Show Gist options
  • Save jfbueno/92ceecfc3e71434789a8 to your computer and use it in GitHub Desktop.
Save jfbueno/92ceecfc3e71434789a8 to your computer and use it in GitHub Desktop.
public class FormMain : Form
{
private void btLupa_Click(object sender, EventArgs e)
{
var form = new FormPesquisa(umaListaComOsDados);
form.ShowDialog();
if(!string.IsNullOrEmpty(form.Retorno))
textBox.Text = form.Retorno;
}
}
public class FormPesquisa : Form
{
public string Retorno { get; private set; } //Tem que ver qual o melhor tipo pra usar
private void CellDoubleClick(object sender, DataGridViewCellEventArgs e)
{
Retorno = tblUg.Rows[e.RowIndex].Cells[0].Value.ToString();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment