//adicionar um lanche private void btAdicionar_Click(object sender, EventArgs e) { TelaCadastrarLanche tela = new TelaCadastrarLanche(); tela.FormClosed += Tela_FormClosed; tela.MdiParent = this.MdiParent; tela.Show(); }
private void dgBebidas_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { object obj = Util.GetCellValueFromColumnHeader(dgLanches.SelectedRows[0].Cells, "Id"); if (obj == null) { return; } long Id = (long)Util.GetCellValueFromColumnHeader(dgLanches.SelectedRows[0].Cells, "Id"); TelaCadastrarLanche tela = new TelaCadastrarLanche(Id); tela.FormClosed += Tela_FormClosed; tela.MdiParent = this.MdiParent; tela.Show(); }