etudiants:2014:bertrand:scrumtool1

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

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:38] florian.briensetudiants: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'application. En effet elle permet l'ajout, la modification ainsi que la suppression d'un projet.
 +
  
 ==== 1- Fonctionnalités ==== ==== 1- Fonctionnalités ====
Ligne 15: Ligne 20:
 ==== 3- Contrôleurs ==== ==== 3- Contrôleurs ====
  
-=== 3.1 Cproduct - Add Product ===+=== 3.1 Cproducts - Add Product === 
 + 
 +{{:etudiants:2014:bertrand:vueaddproductscrumtool.png|}} 
 + 
 + 
 +<sxh php;title:Cproduct/add product> 
 +  
 +    view.getBtnProducts().addSelectionListener(new SelectionListener() { 
 + 
 + @Override 
 + public void widgetSelected(SelectionEvent arg0) { 
 + if (view.getBtnProducts().getText() == "Add this project") { 
 + if (view.getTxtNameProject().getText().equals("") || view.getTxtDescriptionProduct().getText().equals("")) { 
 + Utils.MsgBox(view.getShell(), "Please complete all fields", "information"); 
 + } 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(), "A project already has this name", "information"); 
 + } else { 
 + Product product = new Product(view.getTxtNameProject().getText(), view.getTxtDescriptionProduct().getText(), null, null, null); 
 + DAO.SQLProduct(product, "insert"); 
 + view.getTableViewerProducts().add(product); 
 + Utils.MsgBox(view.getShell(), "Project is create", "information"); 
 +
 +
 + } else { 
 + 
 +    // Code update product 
 + 
 +
 +
 + 
 + 
 + }); 
 +</sxh> 
 + 
 + 
 +=== 3.2 Cproducts Edit Product === 
 + 
 +{{:etudiants:2014:bertrand:vueeditproductscrumtool.png|}} 
 + 
 + 
 +<sxh php;title:Cproduct/edit product> 
 +  
 +    view.getBtnProducts().addSelectionListener(new SelectionListener() { 
 + 
 + @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(), "Please complete all fields", "information"); 
 + } else { 
 + productActif.setName(view.getTxtNameProject().getText()); 
 + productActif.setDescription(view.getTxtDescriptionProduct().getText()); 
 + DAO.SQLProduct(productActif, "update"); 
 + view.getTableViewerProducts().refresh(); 
 + Utils.MsgBox(view.getShell(), "Project is update", "information"); 
 +
 +
 +
 + 
 + }); 
 +    
 +</sxh> 
 + 
 + 
 +=== 3.3 Cproducts - Delete Product === 
 + 
 +<sxh php;title:Cproduct/delete product> 
 +  
 +    view.getTltmDelProduct().addSelectionListener(new SelectionListener() { 
 + 
 + @Override 
 + public void widgetSelected(SelectionEvent arg0) { 
 + 
 + MessageBox messageBoxproduct = new MessageBox(view.getShell(), SWT.ICON_QUESTION | SWT.YES | SWT.NO); 
 + messageBoxproduct.setText("SCRUMTOOL"); 
 + messageBoxproduct.setMessage("Do you really want to delete this project ?"); 
 + int responseProduct = messageBoxproduct.open(); 
 + if (responseProduct == SWT.YES) { 
 + DAO.SQLProduct(productActif, "delete"); 
 + view.getTableViewerProducts().remove(productActif); 
 + view.getGrpProject().setVisible(false); 
 +
 + 
 +
 + });  
 +    
 +</sxh> 
 + 
 + 
 +=== 3.4 Cproducts - Edit collaborator === 
 + 
 +<sxh php;title:Cproduct/edit collaborator> 
 +  
 +    view.getTltmEditCollaboratorsProduct().addSelectionListener(new SelectionListener() { 
 + 
 + @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(); 
 +
 + 
 + }); 
 +    
 +</sxh> 
 + 
 +=== 3.5 Cproducts - Open product=== 
 + 
 +<sxh php;title:Cproduct/open product> 
 +  
 +    view.getTltmOpenProduct().addSelectionListener(new SelectionListener() { 
 + 
 + @Override 
 + public void widgetSelected(SelectionEvent arg0) { 
 + OverviewProduct overview = new OverviewProduct(); 
 + overview.init(); 
 + CoverviewProduct cOverview = new CoverviewProduct(overview); 
 + cOverview.listener(userActif,productActif); 
 + cOverview.init(userActif, productActif); 
 + cOverview.reload(userActif, productActif); 
 + view.close(); 
 + overview.open(); 
 +
 + 
 + }); 
 +    
 +</sxh>
  • etudiants/2014/bertrand/scrumtool1.1401194320.txt.gz
  • Dernière modification : il y a 6 ans
  • (modification externe)