Différences
Ci-dessous, les différences entre deux révisions de la page.
| Les deux révisions précédentes Révision précédente Prochaine révision | Révision précédente | ||
| etudiants:2014:bertrand:scrumtool1 [2014/05/27 14:54] – florian.briens | etudiants:2014:bertrand:scrumtool1 [2019/08/31 14:21] (Version actuelle) – modification externe 127.0.0.1 | ||
|---|---|---|---|
| Ligne 2: | Ligne 2: | ||
| ===== Gestion des projets ===== | ===== Gestion des projets ===== | ||
| + | |||
| + | Description : | ||
| + | |||
| + | Cette fonctionnalité est essentielle pour l' | ||
| + | |||
| ==== 1- Fonctionnalités ==== | ==== 1- Fonctionnalités ==== | ||
| Ligne 60: | Ligne 65: | ||
| === 3.2 Cproducts - Edit Product === | === 3.2 Cproducts - Edit Product === | ||
| - | {{: | + | {{: |
| - | <sxh php; | + | <sxh php; |
| - | view.getBtnProducts().addSelectionListener(new SelectionListener() { | + | view.getBtnProducts().addSelectionListener(new SelectionListener() { |
| @Override | @Override | ||
| public void widgetSelected(SelectionEvent arg0) { | public void widgetSelected(SelectionEvent arg0) { | ||
| if (view.getBtnProducts().getText() == "Add this project" | if (view.getBtnProducts().getText() == "Add this project" | ||
| - | if (view.getTxtNameProject().getText().equals("" | + | |
| + | // Code add product | ||
| + | |||
| + | } else { | ||
| + | if (view.getTxtDescriptionProduct().getText().equals("" | ||
| Utils.MsgBox(view.getShell(), | Utils.MsgBox(view.getShell(), | ||
| } else { | } else { | ||
| - | + | productActif.setName(view.getTxtNameProject().getText()); | |
| - | boolean nomUtilise = false; | + | productActif.setDescription(view.getTxtDescriptionProduct().getText()); |
| - | for (Product product : DAO.getProducts()) { | + | DAO.SQLProduct(productActif, "update"); |
| - | if (product.getName().equals(view.getTxtNameProject().getText())) { | + | view.getTableViewerProducts().refresh(); |
| - | nomUtilise = true; | + | Utils.MsgBox(view.getShell(), |
| - | } | + | |
| - | } | + | |
| - | if (nomUtilise == true) { | + | |
| - | Utils.MsgBox(view.getShell(), | + | |
| - | } else { | + | |
| - | Product product = new Product(view.getTxtNameProject().getText(), | + | |
| - | DAO.SQLProduct(product, "insert"); | + | |
| - | view.getTableViewerProducts().add(product); | + | |
| - | Utils.MsgBox(view.getShell(), | + | |
| - | } | + | |
| } | } | ||
| - | } else { | + | } |
| + | } | ||
| - | // Code update | + | }); |
| + | |||
| + | </sxh> | ||
| + | |||
| + | |||
| + | === 3.3 Cproducts - Delete Product === | ||
| + | |||
| + | <sxh php; | ||
| + | |||
| + | | ||
| + | |||
| + | @Override | ||
| + | public void widgetSelected(SelectionEvent arg0) { | ||
| + | MessageBox messageBoxproduct = new MessageBox(view.getShell(), | ||
| + | messageBoxproduct.setText(" | ||
| + | messageBoxproduct.setMessage(" | ||
| + | int responseProduct = messageBoxproduct.open(); | ||
| + | if (responseProduct == SWT.YES) { | ||
| + | DAO.SQLProduct(productActif, | ||
| + | view.getTableViewerProducts().remove(productActif); | ||
| + | view.getGrpProject().setVisible(false); | ||
| } | } | ||
| + | |||
| } | } | ||
| + | }); | ||
| + | |||
| + | </ | ||
| + | |||
| + | === 3.4 Cproducts - Edit collaborator === | ||
| + | |||
| + | <sxh php; | ||
| + | |||
| + | | ||
| + | |||
| + | @Override | ||
| + | public void widgetSelected(SelectionEvent arg0) { | ||
| + | EditCollaboratorsProduct vAddCollaborators = new EditCollaboratorsProduct(); | ||
| + | CeditCollaboratorsProduct cEditCollaborators = new CeditCollaboratorsProduct(vAddCollaborators); | ||
| + | vAddCollaborators.init(); | ||
| + | cEditCollaborators.init(productActif); | ||
| + | cEditCollaborators.listener(productActif); | ||
| + | vAddCollaborators.open(); | ||
| + | } | ||
| + | |||
| + | }); | ||
| + | |||
| + | </ | ||
| + | |||
| + | === 3.5 Cproducts - Open product=== | ||
| + | |||
| + | <sxh php; | ||
| + | |||
| + | | ||
| + | |||
| + | @Override | ||
| + | public void widgetSelected(SelectionEvent arg0) { | ||
| + | OverviewProduct overview = new OverviewProduct(); | ||
| + | overview.init(); | ||
| + | CoverviewProduct cOverview = new CoverviewProduct(overview); | ||
| + | cOverview.listener(userActif, | ||
| + | cOverview.init(userActif, | ||
| + | cOverview.reload(userActif, | ||
| + | view.close(); | ||
| + | overview.open(); | ||
| + | } | ||
| }); | }); | ||
| + | |||
| </ | </ | ||