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

📄 pworkexp.java

📁 图书
💻 JAVA
字号:
package thizlinux.linuxhr;import java.sql.*;import java.text.*;import java.util.*;public class pworkexp {	private String uid="";	private String id="";	private String sdate="";	private String edate="";	private String company="";	private String industry="";	private String typeofcompany="";	private String department="";	private String jobtitle="";	private String responsiblity="";	private String reportto="";	private String numbersundercontroll="";	private String reference="";	private String reasonforleaving="";	private String achievement="";	private String error="";	private boolean status=true;	private Vector idl=new Vector();	private Vector sdatel=new Vector();	private Vector edatel=new Vector();	private Vector companyl=new Vector();	private Vector departmentl=new Vector();	private Vector jobtitlel=new Vector();	private Vector industryl=new Vector();	private Vector responsiblityl=new Vector();	private Vector achievementl=new Vector();		public void setError(String value){		this.error=value;	}	public String getError(){		return this.error;	}		public Iterator getIdl(){		return idl.iterator();	}	public Iterator getSdatel(){		return sdatel.iterator();	}	public Iterator getEdatel(){		return edatel.iterator();	}	public Iterator getCompanyl(){		return companyl.iterator();	}	public Iterator getDepartmentl(){		return departmentl.iterator();	}	public Iterator getJobtitlel(){		return jobtitlel.iterator();	}	public Iterator getIndustryl(){		return industryl.iterator();	}	public Iterator getResponsiblityl(){		return responsiblityl.iterator();	}	public Iterator getAchievementl(){		return achievementl.iterator();	}	public void setUid(String value){		this.uid=value;		}	public String getUid(){		return this.uid;	}		public void setId(String value){		this.id=value;		}	public String getId(){		return this.id;	}		public void setSdate(String value){		this.sdate=value;		}	public String getSdate(){		return this.sdate;	}		public void setEdate(String value){		this.edate=value;		}	public String getEdate(){		return this.edate;	}			public void setCompany(String value){		this.company=value;		}	public String getCompany(){		return this.company;	}			public void setIndustry(String value){		this.industry=value;		}	public String getIndustry(){		return this.industry;	}			public void setTypeofcompany(String value){		this.typeofcompany=value;		}	public String getTypeofcompany(){		return this.typeofcompany;	}			public void setDepartment(String value){		this.department=value;		}	public String getDepartment(){		return this.department;	}			public void setJobtitle(String value){		this.jobtitle=value;		}	public String getJobtitle(){		return this.jobtitle;	}			public void setResponsiblity(String value){		this.responsiblity=value;		}	public String getResponsiblity(){		return this.responsiblity;	}			public void setReportto(String value){		this.reportto=value;		}	public String getReportto(){		return this.reportto;	}			public void setNumbersundercontroll(String value){		this.numbersundercontroll=value;		}	public String getNumbersundercontroll(){		return this.numbersundercontroll;	}			public void setReference(String value){		this.reference=value;		}	public String getReference(){		return this.reference;	}		public void setReasonforleaving(String value){		this.reasonforleaving=value;		}	public String getReasonforleaving(){		return this.reasonforleaving;	}		public void setAchievement(String value){		this.achievement=value;		}	public String getAchievement(){		return this.achievement;	}			public void refresh(){		DBconnect dbconn =new DBconnect();		idl.clear();		sdatel.clear();		edatel.clear();		companyl.clear();		departmentl.clear();		jobtitlel.clear();		industryl.clear();		responsiblityl.clear();		achievementl.clear();		ResultSet rs=null;		String sql="";		try{			sql="select id,sdate,edate,company,department,jobtitle,industry,responsiblity,achievement from tbl_pworkexp where uid='"+this.uid+"'";			rs=dbconn.executeQuery(sql);			while(rs.next()){				idl.add(pub.datachange(rs.getString("id")));				sdatel.add(pub.datachange(rs.getString("sdate")));				edatel.add(pub.datachange(rs.getString("edate")));				companyl.add(pub.datachange(rs.getString("company")));				departmentl.add(pub.datachange(rs.getString("department")));				jobtitlel.add(pub.datachange(rs.getString("jobtitle")));				industryl.add(pub.datachange(rs.getString("industry")));				responsiblityl.add(pub.datachange(rs.getString("responsiblity")));				achievementl.add(pub.datachange(rs.getString("achievement")));			}  						sql="select sdate,edate,company,industry,typeofcompany,department,"+					   "jobtitle,responsiblity,reportto,numbersundercontroll,reference,"+					   "reasonforleaving,achievement "+					   "from tbl_pworkexp where id='"+this.id+"' and uid='" +this.uid+"'";			rs=dbconn.executeQuery(sql);			if(rs.next()){  				this.sdate=pub.datachange(rs.getString("sdate"));				this.edate=pub.datachange(rs.getString("edate"));                  				this.company=pub.datachange(rs.getString("company"));                  				this.industry=pub.datachange(rs.getString("industry"));                  				this.typeofcompany=pub.datachange(rs.getString("typeofcompany"));                  				this.department=pub.datachange(rs.getString("department"));                  				this.jobtitle=pub.datachange(rs.getString("jobtitle"));                  				this.responsiblity=pub.datachange(rs.getString("responsiblity"));                  				this.reportto=pub.datachange(rs.getString("reportto"));                  				this.numbersundercontroll=pub.datachange(rs.getString("numbersundercontroll"));                  				this.reference=pub.datachange(rs.getString("reference"));                  				this.reasonforleaving=pub.datachange(rs.getString("reasonforleaving"));                  				this.achievement=pub.datachange(rs.getString("achievement"));                  			}			else{				//reset();			}		}catch(Exception e){			System.out.println(e+",sql="+sql);			status=false;		}finally{			try{				if(rs!=null)rs.close();				if(dbconn!=null)dbconn.close();			}catch(Exception e){				System.out.println(e);			}		}			}	public boolean update(){		status=true;		if(sdate==null||sdate.equalsIgnoreCase(""))                {                        return false;                }		DBconnect dbconn =new DBconnect();		String sql="";		try{			sql = "delete from tbl_pworkexp where uid='" + this.uid + "' and id='"+this.id+"'";			dbconn.executeUpdate(sql);            			sql="insert into tbl_pworkexp(id,uid,sdate,edate,company,industry,typeofcompany,department,"+                       "jobtitle,responsiblity,reportto,numbersundercontroll,reference,"+                       "reasonforleaving,achievement) "+                       "values('',"+			    "'"+this.uid+"',"+			    "'"+this.sdate+"',"+			    "'"+this.edate+"',"+			    "'"+this.company+"',"+			    "'"+this.industry+"',"+			    "'"+this.typeofcompany+"',"+			    "'"+this.department+"',"+			    "'"+this.jobtitle+"',"+			    "'"+this.responsiblity+"',"+			    "'"+this.reportto+"',"+			    "'"+this.numbersundercontroll+"',"+			    "'"+this.reference+"',"+			    "'"+this.reasonforleaving+"',"+			    "'"+this.achievement+"')";			dbconn.executeUpdate(sql);			reset();		}catch(Exception e){			System.out.println(e+",sql="+sql);			status=false;		}finally{			try{				if(dbconn!=null)dbconn.close();			}catch(Exception e){				System.out.println(e);			}		}		return  status;		}	public boolean remove(){		status=true;		DBconnect dbconn =new DBconnect();		String sql="";		try{			sql = "delete from tbl_pworkexp where uid='" + this.uid + "' and id='"+this.id+"'";			dbconn.executeUpdate(sql);            			this.id="";		}catch(Exception e){			System.out.println(e+",sql="+sql);			status=false;		}finally{			try{				if(dbconn!=null)dbconn.close();			}catch(Exception e){				System.out.println(e);			}		}		return  status;		}	public void reset(){		this.id="";		this.sdate="";		this.edate="";		this.company="";		this.industry="";		this.typeofcompany="";		this.department="";		this.jobtitle="";		this.responsiblity="";		this.reportto="";		this.numbersundercontroll="";		this.reference="";		this.reasonforleaving="";		this.achievement="";		this.error="";	}}

⌨️ 快捷键说明

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