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

📄 dayflow.java

📁 eclipse+struts+sqlserver 简单图书管理系统,内有文档
💻 JAVA
字号:
package kignbi.dong;

import java.sql.ResultSet;
import java.util.Vector;

public class dayFlow {
	private String fdate;
	private String uid;
	private String bid;
	private String ftime;
	private String ftype;
	private int fnum;
	public String getBid() {
		return bid;
	}
	public void setBid(String bid) {
		this.bid = bid;
	}
	public String getFdate() {
		return fdate;
	}
	public void setFdate(String fdate) {
		this.fdate = fdate;
	}
	public int getFnum() {
		return fnum;
	}
	public void setFnum(int fnum) {
		this.fnum = fnum;
	}
	public String getFtime() {
		return ftime;
	}
	public void setFtime(String ftime) {
		this.ftime = ftime;
	}
	public String getFtype() {
		return ftype;
	}
	public void setFtype(String ftype) {
		this.ftype = ftype;
	}
	public String getUid() {
		return uid;
	}
	public void setUid(String uid) {
		this.uid = uid;
	}
	public dayFlow()
	{}
	public static boolean delete(DB db, String id) throws Exception {
		String strSql;
		strSql = "delete from dayflow where id='" + id + "'";
		if (db.ExecSql(strSql) == 0) {
			return false;
		} else {
			return true;
		}
	}
	public static boolean deletes(DB db, String fdate) throws Exception {
		String strSql;
		strSql = "delete from dayflow where fdate='" + fdate + "'";
		if (db.ExecSql(strSql) == 0) {
			return false;
		} else {
			return true;
		}
	}
	public boolean insert(DB db,String uid,String bid,String ftype,int fnum
	) throws Exception {
		String strSql;
		strSql = "insert into dayflow(uid,bid,fype,fnum)" +
				" values('" + uid + "','" +bid+"','"+ftype
				+ "'," + fnum+ ")";
		if (db.ExecSql(strSql) == 0) {
			return false;
		} else {
			return true;
		}
	}
 public static Vector allFlow(DB db)throws Exception{
	 Vector Flows = new Vector();
		ResultSet rs;
		String strSql = null;

		strSql = "select * from dayflow";
		rs = db.OpenSql(strSql);

		while (rs.next()) {
			dayFlow flow = new dayFlow();
            flow.setFdate(rs.getString("fdate"));
			flow.setUid(rs.getString("uid"));
			flow.setBid(rs.getString("bid"));
			flow.setFnum(rs.getInt("fnum"));
			flow.setFtime(rs.getString("ftime"));
            flow.setFtype(rs.getString("ftype"));
			Flows.add(flow);
		}
		return Flows;
	}
 public static Vector allFlow(DB db,String fdate)throws Exception{
	 Vector Flows = new Vector();
		ResultSet rs;
		String strSql = null;

		strSql = "select * from dayflow where fdate=dbo.trim('"+fdate+"')";
		rs = db.OpenSql(strSql);

		while (rs.next()) {
			dayFlow flow = new dayFlow();
            flow.setFdate(rs.getString("fdate"));
			flow.setUid(rs.getString("uid"));
			flow.setBid(rs.getString("bid"));
			flow.setFnum(rs.getInt("fnum"));
			flow.setFtime(rs.getString("ftime"));
            flow.setFtype(rs.getString("ftype"));
			Flows.add(flow);
		}
		return Flows;
	}
 public static Vector whoFlow(DB db,String uid)throws Exception{
	 Vector Flows = new Vector();
		ResultSet rs;
		String strSql = null;

		strSql = "select * from dayflow where dbo.trim(uid)=dbo.trim('"+uid+"')";
		rs = db.OpenSql(strSql);

		while (rs.next()) {
			dayFlow flow = new dayFlow();
            flow.setFdate(rs.getString("fdate"));
			flow.setUid(rs.getString("uid"));
			flow.setBid(rs.getString("bid"));
			flow.setFnum(rs.getInt("fnum"));
			flow.setFtime(rs.getString("ftime"));
            flow.setFtype(rs.getString("ftype"));
			Flows.add(flow);
		}
		return Flows;
	}
 public static Vector kindFlow(DB db,String ftype)throws Exception{
	 Vector Flows = new Vector();
		ResultSet rs;
		String strSql = null;

		strSql = "select * from dayflow where ftype like '%'"+ftype+"'%'";
		rs = db.OpenSql(strSql);

		while (rs.next()) {
			dayFlow flow = new dayFlow();
            flow.setFdate(rs.getString("fdate"));
			flow.setUid(rs.getString("uid"));
			flow.setBid(rs.getString("bid"));
			flow.setFnum(rs.getInt("fnum"));
			flow.setFtime(rs.getString("ftime"));
            flow.setFtype(rs.getString("ftype"));
			Flows.add(flow);
		}
		return Flows;
	}
 }
	

⌨️ 快捷键说明

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