示例#1
0
        private void btnAdd_Click(object sender, EventArgs e)
        {
            ItemEditForm addItemForm = new ItemEditForm();

            addItemForm.TopLevel     = false;
            addItemForm.MdiParent    = (MainForm)Parent.Parent;
            addItemForm.FormClosing += AddEditItemForm_FormClosing;
            addItemForm.Show();
        }
示例#2
0
        private void btnEdit_Click(object sender, EventArgs e)
        {
            int          index        = int.Parse(dataGridView1.CurrentRow.Cells[0].Value.ToString());
            ItemEditForm editItemForm = new ItemEditForm(index);

            editItemForm.TopLevel     = false;
            editItemForm.MdiParent    = (MainForm)Parent.Parent;
            editItemForm.FormClosing += AddEditItemForm_FormClosing;
            editItemForm.Show();
        }