<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<c:import url="header.jsp" />
<section>
<br><br>
<div align="center"><font size=5> 회원목록보기 </font></div> <br>
<div align="center">
<br><br>
<table border=1 width=800 height=250>
<tr><td>회원번호</td><td>회원성명</td> <td>전화번호</td>
<td>주소</td><td>가입일자</td><td>고객등급</td><td>거주지역</td></tr>
<c:forEach items="${list}" var="m">
<tr>
<td><a href="delete.do?custno=${m.getCustno()}">${m.getCustno()}</a></td>
<td>${m.getCustname()}</td>
<td>${m.getPhone()}</td>
<td>${m.getAddress()}</td>
<td>${m.getJoindate()}</td>
<td>${m.getGrade()}</td>
<td>${m.getCity()}</td>
</tr>
</c:forEach>
</table>
</div>
</section>
<c:import url="footer.jsp" />
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<c:import url="header.jsp" />
<section>
<br><br>
<div align="center"><font size=5> 회원정보 수정하기 </font></div> <br>
<div align="center">
<br><br>
<form action="update.do">
<table border=1 width=600>
<tr>
<td align=center>회원성명 </td>
<td> <input type=text name=custname value= ${edit.getCustname() } size=10></td>
</tr>
<tr>
<td align=center>회원전화 </td>
<td><input type=text name=phone size=20 value= ${edit.getPhone() }></td>
</tr>
<tr>
<td align=center>회원주소 </td>
<td><input type=text name=address size=40 value= "${edit.getAddress() }"></td>
</tr>
<tr>
<td align=center>고객등급<br>[A:VIP,B:일반,C:직원] </td>
<td><input type=text name=grade size=10 value= ${edit.getGrade() }></td>
</tr>
<tr>
<td align=center>도시코드 </td>
<td><input type=text name=city size=10 value= ${edit.getCity() }> </td>
</tr>
<tr>
<td colspan=2 align=center>
<input type=submit value="수정">  
<input type=reset value="다시입력">
</td>
</tr>
</table>
</form>
</div>
</section>
<c:import url="footer.jsp" />
@RequestMapping(value="/edit.do")
public String oneList(MemberVO vo, Model m) throws Exception{
m.addAttribute("edit", s.selectOneMember(vo.getCustno()));
return "edit.jsp";
}
@Override
public MemberVO selectOneMember(int seq) {
return dao.selectOneMember(seq);
}
@Override
public MemberVO selectOneMember(int seq) {
Object[] args = {seq};
return jdbcTemplate.queryForObject(select_sql_one,args, new rowMapper());
}
@RequestMapping(value="/update.do")
public String update(MemberVO vo) throws Exception{
s.updateMember(vo);
return "member_list.do";
}
@Override
public void updateMember(MemberVO vo) {
dao.updateMember(vo);
}
@Override
public MemberVO selectOneMember(int seq) {
Object[] args = {seq};
return jdbcTemplate.queryForObject(select_sql_one,args, new rowMapper());
}