Example #1
0
        private void buttonNew_Click(object sender, EventArgs e)
        {
            productForm form = new productForm(this.context);

            form.ShowDialog(this);
            loadList();
        }
Example #2
0
 private void editSelection()
 {
     try
     {
         foreach (ListViewItem item in listView.SelectedItems)
         {
             int id = Convert.ToInt16(item.Tag);
             Product product = new Product(id);
             productForm form = new productForm(this.context, product);
             form.ShowDialog(this);
             loadList();
         }
     }
     catch (Exception ex)
     {
         Tools.ShowError("Unable to load product\n" + ex.Message);
     }
 }
Example #3
0
 private void editSelection()
 {
     try
     {
         foreach (ListViewItem item in listView.SelectedItems)
         {
             int         id      = Convert.ToInt16(item.Tag);
             Product     product = new Product(id);
             productForm form    = new productForm(this.context, product);
             form.ShowDialog(this);
             loadList();
         }
     }
     catch (Exception ex)
     {
         Tools.ShowError("Unable to load product\n" + ex.Message);
     }
 }
Example #4
0
 private void buttonNew_Click(object sender, EventArgs e)
 {
     productForm form = new productForm(this.context);
     form.ShowDialog(this);
     loadList();
 }