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

📄 clientclass.java

📁 企业办公自动化管理系统
💻 JAVA
字号:
/* * ClientClass.java * * Created on 2005年5月17日, 上午10:15 *//** * * @author  administrator */package com.zh.util;import com.zh.conpool.Condata;import com.bwm.string.Str;import com.zh.util.Class;import java.sql.*;import com.zh.conpool.Condata;import com.bwm.string.Str;public class ClientClass {    String text1;    String text2;    String text3;    String text4;    String text5;    String text6;    String text7;    String text8;    Str str=new Str();    Connection conn=null;        ResultSet rs=null;    Condata con=new Condata();    //PreparedStatement pstmt=null;    String sql="";    public void setText1(String newtext1){        this.text1=newtext1;    }    public String getText1(){        return text1;    }    public void setText2(String newtext2){        this.text2=newtext2;    }    public String getText2(){        return text2;    }    public void setText3(String newtext3){        this.text3=newtext3;    }    public String getText3(){        return text3;    }    public void setText4(String newtext4){        this.text4=newtext4;    }    public String getText4(){        return text4;    }    public void setText5(String newtext5){        this.text5=newtext5;    }    public String getText5(){        return text5;    }    public void setText6(String newtext6){        this.text6=newtext6;    }    public String getText6(){        return text6;    }    public void setText7(String newtext7){        this.text7=newtext7;    }    public String getText7(){        return text7;    }    public void setText8(String newtext8){        this.text8=newtext8;    }    public String getText8(){        return text8;    }    public String InsertSql(){        try{            conn=con.getConnection();        }catch(Exception e){            e.getMessage();        }      sql="insert into tb_contract(ClientId,ContractName,ClientName,ItemName,LotMoney,LotDate,EndDate,LotMan)values('"+text1+"','"+text2+"','"+text3+"','"+text4+"','"+text5+"','"+text6+"','"+text7+"','"+text8+"')";      return sql;    }    public boolean InsertDb()    {        try{            conn=con.getConnection();        }catch(Exception e){            e.getMessage();        }        boolean fag=false;               int temp=con.executeUpdate(InsertSql());       //ps=con.executeUpdate("insert into tb_contract(ClientId,ContractName,ClientName,ItemName,LotMoney,LotMan)values(?,?,?,?,?,?,?,?)");       if(temp>0){            fag=true;       }else{            fag=false;       }       try{           conn.close();       }catch(Exception e){           e.printStackTrace();       }       try{           con.close();       }catch(Exception e){           e.printStackTrace();       }       return fag;    }    /** Creates a new instance of ClientClass */    public ClientClass() {    }    }

⌨️ 快捷键说明

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