⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 reply.java

📁 自己没有弄懂的代码 应该是一个系统的 高手下了
💻 JAVA
字号:
/*
 * 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 + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -