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:37] – 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 14: | Ligne 19: | ||
| ==== 3- Contrôleurs ==== | ==== 3- Contrôleurs ==== | ||
| + | |||
| + | === 3.1 Cproducts - Add Product === | ||
| + | |||
| + | {{: | ||
| + | |||
| + | |||
| + | <sxh php; | ||
| + | |||
| + | | ||
| + | |||
| + | @Override | ||
| + | public void widgetSelected(SelectionEvent arg0) { | ||
| + | if (view.getBtnProducts().getText() == "Add this project" | ||
| + | if (view.getTxtNameProject().getText().equals("" | ||
| + | Utils.MsgBox(view.getShell(), | ||
| + | } else { | ||
| + | |||
| + | boolean nomUtilise = false; | ||
| + | for (Product product : DAO.getProducts()) { | ||
| + | if (product.getName().equals(view.getTxtNameProject().getText())) { | ||
| + | nomUtilise = true; | ||
| + | } | ||
| + | } | ||
| + | if (nomUtilise == true) { | ||
| + | Utils.MsgBox(view.getShell(), | ||
| + | } else { | ||
| + | Product product = new Product(view.getTxtNameProject().getText(), | ||
| + | DAO.SQLProduct(product, | ||
| + | view.getTableViewerProducts().add(product); | ||
| + | Utils.MsgBox(view.getShell(), | ||
| + | } | ||
| + | } | ||
| + | } else { | ||
| + | |||
| + | // Code update product | ||
| + | |||
| + | } | ||
| + | } | ||
| + | |||
| + | |||
| + | }); | ||
| + | </ | ||
| + | |||
| + | |||
| + | === 3.2 Cproducts - Edit Product === | ||
| + | |||
| + | {{: | ||
| + | |||
| + | |||
| + | <sxh php; | ||
| + | |||
| + | | ||
| + | |||
| + | @Override | ||
| + | public void widgetSelected(SelectionEvent arg0) { | ||
| + | if (view.getBtnProducts().getText() == "Add this project" | ||
| + | |||
| + | // Code add product | ||
| + | |||
| + | } else { | ||
| + | if (view.getTxtDescriptionProduct().getText().equals("" | ||
| + | Utils.MsgBox(view.getShell(), | ||
| + | } else { | ||
| + | productActif.setName(view.getTxtNameProject().getText()); | ||
| + | productActif.setDescription(view.getTxtDescriptionProduct().getText()); | ||
| + | DAO.SQLProduct(productActif, | ||
| + | view.getTableViewerProducts().refresh(); | ||
| + | Utils.MsgBox(view.getShell(), | ||
| + | } | ||
| + | } | ||
| + | } | ||
| + | |||
| + | }); | ||
| + | |||
| + | </ | ||
| + | |||
| + | |||
| + | === 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(); | ||
| + | } | ||
| + | |||
| + | }); | ||
| + | |||
| + | </ | ||