private void button1_Click(object sender, EventArgs e) { AddItemForm frm = new AddItemForm(); int iID = Convert.ToInt32(dataGridView1.CurrentRow.Cells[0].Value.ToString()); Entity.Item item1 = services.GetItemByID(iID); frm.typecombo.Text = item1.getType(); frm.dateTime.Value = item1.getDate(); frm.locationtext.Text = item1.getLocation(); frm.descriptiontext.Text = item1.getDescription(); /*MemoryStream ms = new MemoryStream(item1.getImage()); * frm.pictureBox.Image = Image.FromStream(ms);*/ frm.browsebutton.Enabled = false; frm.addbutton.Enabled = false; frm.ShowDialog(); }
static void frm_formclosed(object sender, FormClosedEventArgs e) { frm = null; }