日期:2014-05-17 浏览次数:20749 次
//删除
public String delMessage(){
MessageDTO m=getMessage();
m=getMessage();
MessageService.delMessage(m);
return SUCCESS;
// 删除数据
public static void delMessage(MessageDTO m)
{
Connection conn = null;
PreparedStatement stat = null;
String sql = "delete from crm_config.dbo.tb_messageset where id = ?";
try
{
conn = DBControl.getConnection();
stat = conn.prepareStatement(sql);
stat.setInt(1, m.getId());
stat.executeUpdate();
} catch (SQLException e)
{
logger.info("", e);
} finally
{
DbUtils.closeQuietly(conn);
DbUtils.closeQuietly(stat);
}
}
<script type="text/javascript" src="${contextPath}/js/selectList.js">
function delete(){
if(confirm("确定删除该记录?")){
}
return false;
}
</script>
<a href="javascript:void(0);" onclick="delete()">删除</a>