private void button2_Click(object sender, EventArgs e) { Form modifyForm = new ItemListForm(fullList); this.Hide(); modifyForm.ShowDialog(); this.Close(); }
private void button1_Click(object sender, EventArgs e) { fullList[numIndex].Comments = textBox1.Text; if (saveToFile()) { Form itemListForm = new ItemListForm(fullList); this.Hide(); itemListForm.ShowDialog(); this.Close(); } }
private void button1_Click(object sender, EventArgs e) { if (comboBox1.Text.Equals("")) { MessageBox.Show("Please choose a Material Type", "Yo", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); return; } if (saveToFile()) { Form itemListForm = new ItemListForm(fullList); this.Hide(); itemListForm.ShowDialog(); this.Close(); } }
private void button3_Click(object sender, EventArgs e) { numInList = listBox1.SelectedIndex; if (numInList == -1) { MessageBox.Show("No Batch Selected", "Error", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); return; } DialogResult input = MessageBox.Show("Are you sure you want to delete\n" + fullList[numInList].Material + " " + fullList[numInList].BatchNum + "?", "Warning", MessageBoxButtons.OKCancel, MessageBoxIcon.Exclamation); if (input == DialogResult.OK) { fullList.RemoveAt(numInList); saveToFile(); Form reload = new ItemListForm(fullList); this.Hide(); reload.ShowDialog(); this.Close(); } }