private void AddItemButton_Click(object sender, EventArgs e) { Form_AddItem form = new Form_AddItem(); form.Show(); form.SetParent(this, -1); }
private void edititem_Click(object sender, EventArgs e) { if (orderitemlist.SelectedIndex != -1) { if (mOrderItems[orderitemlist.SelectedIndex].isMaterial) { Form_AddMaterial form = new Form_AddMaterial(); form.Show(); form.SetParent(this, orderitemlist.SelectedIndex, mOrderItems[orderitemlist.SelectedIndex]); } else { Form_AddItem form = new Form_AddItem(); form.Show(); form.SetParent(this, orderitemlist.SelectedIndex, mOrderItems[orderitemlist.SelectedIndex]); } } else { MessageBox.Show("No Item Selected"); } }