Beispiel #1
0
 private void AddProduct(object sender, EventArgs e)
 {
     try
     {
         Product product = FormU.RetriveProductInformation();
         pdbm = new ProductDBManager();
         pdbm.AddProduct(product, idUser);
     }
     catch (Exception ex)
     {
         FormU.ShowMessage(ex.Message);
         throw;
     }
 }
Beispiel #2
0
 public PresenterUser(int id)
 {
     this.idUser                          = id;
     odbm                                 = new OrderDBManager();
     orders                               = new Orders();
     pdbm                                 = new ProductDBManager();
     FormU                                = new FormUser(idUser);
     FormU.buttonGet.Click               += viewAllOrders;
     FormU.editBtn.Click                 += UpdateOrder;
     FormU.deleteBtn.Click               += DeleteOrder;
     FormU.buttonAddOrder.Click          += AddOrder;
     FormU.buttonViewProducts.Click      += ViewProducts;
     FormU.buttonEditProduct.Click       += EditProduct;
     FormU.buttonAddProduct.Click        += AddProduct;
     FormU.buttonDeleteProduct.Click     += DeleteProduct;
     FormU.buttonAddProductToOrder.Click += AddProductToOrder;
     FormU.Show();
 }