📄 einfo.java
字号:
package thizlinux.linuxhr;import java.sql.*;import java.text.*;public class einfo { private String id=""; private String name=""; private String industry=""; private String type=""; private String scale=""; private String location=""; private String fdate=""; private String contact=""; private String position=""; private String worktel=""; private String mobile=""; private String email=""; private String fax=""; private String address=""; private String postcode=""; private String homepage=""; private String introduction=""; private String error=""; private boolean status=true; public void setError(String value){ this.error=value; } public String getError(){ return this.error; } public void setId(String value){ this.id=value; } public String getId(){ return this.id; } public void setName(String value){ this.name=value; } public String getName(){ return this.name; } public void setIndustry(String value){ this.industry=value; } public String getIndustry(){ return this.industry; } public void setType(String value){ this.type=value; } public String getType(){ return this.type; } public void setScale(String value){ this.scale=value; } public String getScale(){ return this.scale; } public void setLocation(String value){ this.location=value; } public String getLocation(){ return this.location; } public void setFdate(String value){ this.fdate=value; } public String getFdate(){ return this.fdate; } public void setContact(String value){ this.contact=value; } public String getContact(){ return this.contact; } public void setPosition(String value){ this.position=value; } public String getPosition(){ return this.position; } public void setWorktel(String value){ this.worktel=value; } public String getWorktel(){ return this.worktel; } public void setMobile(String value){ this.mobile=value; } public String getMobile(){ return this.mobile; } public void setEmail(String value){ this.email=value; } public String getEmail(){ return this.email; } public void setFax(String value){ this.fax=value; } public String getFax(){ return this.fax; } public void setAddress(String value){ this.address=value; } public String getAddress(){ return this.address; } public void setPostcode(String value){ this.postcode=value; } public String getPostcode(){ return this.postcode; } public void setHomepage(String value){ this.homepage=value; } public String getHomepage(){ return this.homepage; } public void setIntroduction(String value){ this.introduction=value; } public String getIntroduction(){ return this.introduction; } public void refresh(){ DBconnect dbconn =new DBconnect(); ResultSet rs=null; try{ String sql="select name,industry,type,scale,location,fdate,"+ "contact,position,worktel,mobile,email,fax,address,postcode,"+ "homepage,introduction from tbl_euserinfo "+ "where id='" +this.id+"'"; rs=dbconn.executeQuery(sql); if(rs.next()){ this.name=pub.datachange(rs.getString("name")); this.industry=pub.datachange(rs.getString("industry")); this.type=pub.datachange(rs.getString("type")); this.scale=pub.datachange(rs.getString("scale")); this.location=pub.datachange(rs.getString("location")); this.fdate=pub.datachange(rs.getString("fdate")); this.contact=pub.datachange(rs.getString("contact")); this.position=pub.datachange(rs.getString("position")); this.worktel=pub.datachange(rs.getString("worktel")); this.mobile=pub.datachange(rs.getString("mobile")); this.email=pub.datachange(rs.getString("email")); this.fax=pub.datachange(rs.getString("fax")); this.address=pub.datachange(rs.getString("address")); this.postcode=pub.datachange(rs.getString("postcode")); this.homepage=pub.datachange(rs.getString("homepage")); this.introduction=pub.datachange(rs.getString("introduction")); } }catch(Exception e){ System.out.println(e.getMessage()); status=false; }finally{ try{ if(rs!=null)rs.close(); if(dbconn!=null)dbconn.close(); }catch(Exception e){ System.out.println(e.getMessage()); } } } public boolean update(){ status=true; if(name==null||name.equalsIgnoreCase("")) { return false; } DBconnect dbconn =new DBconnect(); try{ String sql = "delete from tbl_euserinfo where id='" + this.id + "'"; dbconn.executeUpdate(sql); sql="insert into tbl_euserinfo(id,name,industry,type,scale,location,fdate,"+ "contact,position,worktel,mobile,email,fax,address,postcode,"+ "homepage,introduction) "+ "values('" +this.id+"',"+ "'"+this.name+"',"+ "'"+this.industry+"',"+ "'"+this.type+"',"+ "'"+this.scale+"',"+ "'"+this.location+"',"+ "'"+this.fdate+"',"+ "'"+this.contact+"',"+ "'"+this.position+"',"+ "'"+this.worktel+"',"+ "'"+this.mobile+"',"+ "'"+this.email+"',"+ "'"+this.fax+"',"+ "'"+this.address+"',"+ "'"+this.postcode+"',"+ "'"+this.homepage+"',"+ "'"+this.introduction+"')"; dbconn.executeUpdate(sql); reset(); }catch(Exception e){ System.out.println(e); status=false; }finally{ try{ if(dbconn!=null)dbconn.close(); }catch(Exception e){ System.out.println(e); } } return status; } public void reset(){ id=""; name=""; industry=""; type=""; scale=""; location=""; fdate=""; contact=""; position=""; worktel=""; mobile=""; email=""; fax=""; address=""; postcode=""; homepage=""; introduction=""; error=""; }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -