//***************************************************************************************** private void editMenuInsert_Click(object sender, EventArgs e) { PracticeForm child = this.ActiveMdiChild as PracticeForm; Form EntryForm = new EntryForm(child); EntryForm.Controls.RemoveAt(0); // the update button won't be visible; insert only EntryForm.Text = "Insert new inventory item"; EntryForm.ShowDialog(); }
//***************************************************************************************** private void editMenuUpdate_Click(object sender, EventArgs e) { PracticeForm child = this.ActiveMdiChild as PracticeForm; EntryForm Entry = new EntryForm(child, true); Entry.Controls.RemoveAt(2); // the insert button won't be visible; update only Entry.Text = "Update inventory item"; Entry.ShowDialog(); //Record tozemp = Entry.informer(); //Deleter(); }