package services;

import dao.DAOContact;

public class ContactService {
	
	private DAOContact dao;
	
	public ContactService()
	{
		dao = new DAOContact();
	}
	
	public String addContact (int Did, String Dnom, String Dprenom, String Dmail)
	{
		System.out.println("test");
		return dao.createContact(Did, Dnom, Dprenom, Dmail);
	}
	
	public String modifyContact(int Did, String Dnom, String Dprenom, String Dmail)
	{
		return dao.updateContact(Did, Dnom, Dprenom, Dmail);
	}
	
	public String researchContact(int id)
	{
		return dao.researchContact(id);
	}
	
	public String deleteContact(int id)
	{
		return dao.deleteContact(id);
	}

}

@@ -25,15 +25,70 @@
 ort 
-dao.DAO
+java.util.ArrayList;%0D%0A%0D%0Aimport dao.DAOContact;%0D%0Aimport domain.
 Cont
@@ -713,14 +713,99 @@
 d);%0D%0A%09%7D%0D
+%0A%09%0D%0A%09public ArrayList%3CContact%3E listeContacts()%0D%0A%09%7B%0D%0A%09%09return dao.listContacts();%0D%0A%09%7D%0D
 %0A%0D%0A%7D%0D%0A

add modif liste dans service