reply.java
来自「system1为用户注册模块 system2为在线聊天系统 system3为」· Java 代码 · 共 68 行
JAVA
68 行
/*
* Created on 2005-12-22
*
* TODO To change the template for this generated file go to
* Window - Preferences - Java - Code Style - Code Templates
*/
package MyBean;
/**
* @author Administrator
*
* TODO To change the template for this generated type comment go to
* Window - Preferences - Java - Code Style - Code Templates
*/
public class reply {
//帖子ID
private String topicid;
//回复内容
private String replycontent;
//回复用户ID
private String userID;
public reply()
{
}
public void setUserID(String id)
{
userID=id;
}
public void setTopicID(String id)
{
topicid=id;
}
public void setReplyContent(String content)
{
replycontent=content;
}
public boolean doReply()
{
try
{
dbcon dbc=new dbcon();
System.out.println("r22");
dbc.executeUpdate("insert into replyinfo(topicid,replyuseid,replyContent,replytime)"
+" values("
+topicid+",'"
+userID+"','"
+replycontent+"',"
+"getdate())");
System.out.println("r133");
return true;
}
catch(Exception e)
{
System.err.println(e.getMessage());
System.err.println("回复失败!");
return false;
}
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?