package idc.client.command;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import idc.model.*;

public class IdcClientDBDeleteCmd implements IdcCmd
{
	private boolean isClientDB;
	private IdcDAO dao;	
	public IdcClientDBDeleteCmd(boolean b) 
	{
		isClientDB=b;
		dao = new IdcDAO();
	}
	
	//고객 삭제 
	@Override
	public void execute(HttpServletRequest request, HttpServletResponse response) 
	{
		IdcClientDBDTO target = new IdcClientDBDTO();
		
		String code = request.getParameter("code");
		target = dao.idcClientDBDelete(code,isClientDB);
		request.setAttribute("IdcClientTarget", target);
		request.setAttribute("isClientDB",isClientDB);
	}
	
}
