src/com/bean/PayBean.java

(开头部分) 5KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

package com.bean;

import java.sql.ResultSet;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.List;

import com.util.Constant;
import com.util.DBO;

public class PayBean {
	
	private List list;
	private ResultSet rs;
	private String date=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(Calendar.getInstance().getTime());
	
	///////////////////////////////////////////////////////////////工资信息录入
	public int addPayInfo(String name,String depart,String place,String age,String address,String tel,String jiben,
			String work,String house,String other,String more,String shui,String kother,String year,String month){
		String sql="insert into pay(name,depart,place,age,address,tel,jiben,work,house,other,more,shui,kother,year,month,addtime) " +
				"values('"+name+"','"+depart+"','"+place+"','"+age+"','"+address+"','"+tel+"','"+jiben+"','"+work+"'," +
						"'"+house+"','"+other+"','"+more+"','"+shui+"','"+kother+"','"+year+"','"+month+"','"+date+"')";
		DBO dbo = new DBO();
		dbo.open();
		try{
			int i = dbo.executeUpdate(sql);
			if(i == 1)
				return Constant.SUCCESS;
			else
				return Constant.SYSTEM_ERROR;
		}catch(Exception e){
			e.printStackTrace();
			return Constant.SYSTEM_ERROR;
		}finally{
			dbo.close();
		}
	}
	/////////////////////////////////////////////////////////////工资信息修改
	public int updatePayInfo(String id,String name,String depart,String place,String age,String address,String tel,String jiben,
			String work,String house,String other,String more,String shui,String kother,String year,String month){
		String sql="update pay set name='"+name+"',depart='"+depart+"',place='"+place+"',age='"+age+"',address='"+address+"',tel='"+tel+"'," +
				"jiben='"+jiben+"',work='"+work+"',house='"+house+"',other='"+other+"',more='"+more+"',shui='"+shui+"',kother='"+kother+"'," +
						"year='"+year+"',month='"+month+"' where id='"+id+"'";
		DBO dbo = new DBO();
		dbo.open();
		try{System.out.println(sql);
			int i = dbo.executeUpdate(sql);
			if(i == 1)
				return Constant.SUCCESS;
			else
				return Constant.SYSTEM_ERROR;
		}catch(Exception e){
			e.printStackTrace();
			return Constant.SYSTEM_ERROR;
		}finally{
			dbo.close();
		}
	}
	/////////////////////////////////////////////////////////////工资信息删除
后面还有 126 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。