예제 #1
0
        private void AddProduct_Click(object sender, EventArgs e)
        {
            DetailsProductForm form = new DetailsProductForm(0);

            form.FormClosed += newFormClosed;
            form.ShowDialog();
        }
예제 #2
0
        private void showProductDetails()
        {
            Product            selected = (Product)listView1.SelectedItems[0].Tag;
            DetailsProductForm form     = new DetailsProductForm(selected.ID);

            form.FormClosed += newFormClosed;
            form.ShowDialog();
        }
예제 #3
0
 private void ShowDetails_Click(object sender, EventArgs e)
 {
     try
     {
         Product            selected = (Product)listView1.SelectedItems[0].Tag;
         DetailsProductForm form     = new DetailsProductForm(selected.ID);
         form.FormClosed += newFormClosed;
         form.ShowDialog();
     }
     catch
     {
         MessageBox.Show("Najpierw Wybierz produkt", "Wybierz Produkt", MessageBoxButtons.OK);
     }
 }