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

📄 secondleveltitlebean.java

📁 源码新闻发布系统
💻 JAVA
字号:
package newsreleasesystem;

import java.sql.*;

/**
 * <p>Title: </p>
 *
 * <p>Description: </p>
 *
 * <p>Copyright: Copyright (c) 2006</p>
 *
 * <p>Company: </p>
 *
 * @author not attributable
 * @version 1.0
 */
public class SecondLevelTitleBean {
    private String SLId=null;
    private String SLTitleName=null;
    private String SLFilePath=null;
    private String SLCreater=null;
    private String SLCreatTime=null;
    private String SLParentTitle=null;
    SQLBean sqlb=new SQLBean();
    ConvertGBKBean cb=new ConvertGBKBean();
    Connection con=null;

    public SecondLevelTitleBean() {
    }

    public int sqlselectdata(String str){
        int FLId=0;
        try {
            if(sqlb.getCon()!=null){
                con=sqlb.getCon();
                String strSql="select * from FirstLevelTitle where FLTitleName='"+str+"'";
                Statement stmt=con.createStatement();
                ResultSet rs=stmt.executeQuery(strSql);
                if(rs.next()){
                    FLId=rs.getInt(1);
                    return FLId;
                }else{
                    System.out.println("***********************************");
                }
            }
        } catch (Exception ex) {
            ex.getMessage();
        }
        return FLId;
    }

    public boolean sqlinsertdata(String secondtitlename,String filepath,int firsttitlename){
        try {
            if(sqlb.getCon()!=null){
                con=sqlb.getCon();
                String strSql="insert into SecondLevelTitle(SLTitleName,SLFilePath,SLCreater,SLCreatTime,SLParentTitle) values('"+secondtitlename+"','"+filepath+"','rj',getDate(),'"+firsttitlename+"')";
                Statement stmt=con.createStatement();
                stmt.executeUpdate(strSql);
                return true;
            }else{
                return false;
            }
        } catch (Exception ex) {
            System.out.println(ex.getMessage());
            return false;
        }
    }

    public void setSLId(String SLId) {
        this.SLId = SLId;
    }

    public String getSLId() {
        return SLId;
    }

    public void setSLTitleName(String SLTitleName) {
        this.SLTitleName = SLTitleName;
    }

    public String getSLTitleName() {
        return SLTitleName;
    }

    public void setSLFilePath(String SLFilePath) {
        this.SLFilePath = SLFilePath;
    }

    public String getSLFilePath() {
        return SLFilePath;
    }

    public void setSLCreater(String SLCreater) {
        this.SLCreater = SLCreater;
    }

    public String getSLCreater() {
        return SLCreater;
    }

    public void setSLCreatTime(String SLCreatTime) {
        this.SLCreatTime = SLCreatTime;
    }

    public String getSLCreatTime() {
        return SLCreatTime;
    }

    public void setSLParentTitle(String SLParentTitle) {
        this.SLParentTitle = SLParentTitle;
    }

    public String getSLParentTitle() {
        return SLParentTitle;
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -