📄 formhis.java
字号:
//该类是对定义的视图进行的操作
package mypkg;
import java.util.*;
import java.sql.*;
import java.text.*;
public class formhis extends Execute_DB{
//定义类成员变量
private String RealName;
private long FormID;
private float Totals;
private String PayKey;
private String strSql;
private String CreateTime;
private int Pay;
private int Send;
private int BuyNumber;
private String BookName;
private String Author;
private String Pub;
private float Price;
private long UserID;
private long BookID;
public formhis()
{ this.BuyNumber=0;
this.UserID=0;
this.RealName="";
java.util.Date NowTime = new java.util.Date();
this.CreateTime = NowTime.toLocaleString();
this.strSql="";
}
public boolean showformhis()
{
this.strSql="select FormId ,users.RealName,Form.UserID,goods.BookID,BookName,Pub,Author,Price,BuyNumber,Pay from books,goods,form,users where ";
this.strSql=this.strSql + " users.UserID=goods.UserID and ";
this.strSql=this.strSql + "books.BookID=goods.BookID and ";
this.strSql=this.strSql + "form.UserID=users.UserID ";
this.strSql=this.strSql + "group by FormId ,users.RealName,Form.UserID,goods.BookID,BookName,Pub,Author,Price,BuyNumber,Pay";
try
{
ResultSet rs = super.exeSqlQuery(this.strSql);
if (rs.next())
{
this.FormID=rs.getLong("FormID");
this.Totals=rs.getFloat("Totals");
this.RealName=rs.getString("RealName");
this.CreateTime=rs.getString("CreateTime");
this.UserID=rs.getLong("UserID");
this.Pay=rs.getInt("pay");
this.Send=rs.getInt("Send");
this.BuyNumber=rs.getInt("BuyNumber");
this.BookID=rs.getLong("BookID");
this.BookName=rs.getString("BookName");
this.Author=rs.getString("Author");
this.Pub=rs.getString("pub");
this.Price=rs.getFloat("Price");
return true;
}
else
{
return false;
}
}
catch(Exception ex)
{
return false;
}
}
//设置类成员变量BookID的值
public void setBookID(long BookID)
{
this.BookID = BookID;
}
//获取类成员变量BookID的值
public long getBookID()
{
return this.BookID;
}
//设置类成员变量FormID的值
public void setFormID(long FormID)
{
this.FormID = FormID;
}
//获取类成员变量FormID的值
public long getFormID()
{
return this.FormID;
}
///
//设置类成员变量FormID的值
public void setTotals(float Totals)
{
this.Totals = Totals;
}
//获取类成员变量FormID的值
public float getTotals()
{
return this.Totals;
}
//设置类成员变量RealName的值
public void setRealName(String RealName)
{
this.RealName = RealName;
}
//获取类成员变量RealName的值
public String getRealName()
{
return this.RealName;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -