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:54] 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 60: Ligne 65:
 === 3.2 Cproducts - Edit Product === === 3.2 Cproducts - Edit Product ===
  
-{{:etudiants:2014:bertrand:vueaddproductscrumtool.png|}}+{{:etudiants:2014:bertrand:vueeditproductscrumtool.png|}}
  
  
-<sxh php;title:Cproduct/add product>+<sxh php;title:Cproduct/edit product>
      
-    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("") || view.getTxtDescriptionProduct().getText().equals("")) {+ 
 + // Code add product 
 + 
 + } else { 
 + if (view.getTxtDescriptionProduct().getText().equals("")) {
  Utils.MsgBox(view.getShell(), "Please complete all fields", "information");  Utils.MsgBox(view.getShell(), "Please complete all fields", "information");
  } 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(), "Project is update", "information");
- } +
- +
- 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.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> </sxh>
  • etudiants/2014/bertrand/scrumtool1.1401195245.txt.gz
  • Dernière modification : il y a 6 ans
  • (modification externe)