Exemplo n.º 1
0
        private void buttonAdd_Click(object sender, EventArgs e)
        {
            Globals.IDNo = -1;
            AddEditProduct addedit = new AddEditProduct();

            addedit.ShowDialog();
            fillbox();
        }
Exemplo n.º 2
0
 private void buttonEdit_Click(object sender, EventArgs e)
 {
     if (listBox1.SelectedIndex != -1)
     {
         Globals.IDNo = int.Parse(listBox1.SelectedValue.ToString());
         AddEditProduct addedit = new AddEditProduct();
         addedit.ShowDialog();
         fillbox();
     }
     else
     {
         MessageBox.Show("Please select a product from the list");
     }
 }