📄 issuetopic.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 issuetopic {
//帖子标题
private String topictitle;
//帖子内容
private String topiccontent;
//发贴用户ID
private String userID;
public issuetopic()
{
}
public void setUserID(String id)
{
userID=id;
}
public void setTopicTitle(String title)
{
topictitle=title;
}
public void setTopicContent(String content)
{
topiccontent=content;
}
public boolean doIssuetopic()
{
try
{
dbcon dbc=new dbcon();
dbc.executeUpdate("insert into topicinfo(topictitle,topicuserid,topiccontent,topictime)"
+" values('"
+topictitle+"','"
+userID+"','"
+topiccontent+"',"
+"getdate())");
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 + -