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

📄 costinfotra.java

📁 (Java+SQL)-大型企业JAVA的ERP系统
💻 JAVA
字号:
//Source file: D:\work\五洋\javaBean\src\CostInfoTra.java

package src.wuyang;
import src.com.*;
import java.sql.*;
import java.io.*;


public class CostInfoTra extends ShangObject
{
   
   /**
记录序号
   */
   private int infoId;
   
   /**
凭证编号
   */
   private String receiptId;
   
   /**
凭证类型
0 开票申请
1 调拨申请
2 采购申请
3 易耗品采购申请
4 销售合同
5 采购合同
6 进出口合同
   */
   private int receiptType;
   
   /**
审核状态
0  仓储费
1  力费
2  运费
   */
   private int state;
   
   /**
* Access method for the infoId property.
*
* @return   the current value of the infoId property
   */
   public int getInfoId() {
      return infoId;}
   
   /**
* Sets the value of the infoId property.
*
* @param aInfoId the new value of the infoId property
   */
   public void setInfoId(int aInfoId) {
      infoId = aInfoId;}  
   
   /**
* Access method for the receiptId property.
*
* @return   the current value of the receiptId property
   */
   public String getReceiptId() {
      return receiptId;}
   
   /**
* Sets the value of the receiptId property.
*
* @param aReceiptId the new value of the receiptId property
   */
   public void setReceiptId(String aReceiptId) {
      receiptId = aReceiptId;}
   
   /**
* Access method for the receiptType property.
*
* @return   the current value of the receiptType property
   */
   public int getReceiptType() {
      return receiptType;}
   
   /**
* Sets the value of the receiptType property.
*
* @param aReceiptType the new value of the receiptType property
   */
   public void setReceiptType(int aReceiptType) {
      receiptType = aReceiptType;}
   
   /**
* Access method for the state property.
*
* @return   the current value of the state property
   */
   public int getState() {
      return state;}
   
   /**
* Sets the value of the state property.
*
* @param aDeptId the new value of the state property
   */
   public void setState(int aState) {
      state = aState;}
      
	public  CostInfoTra()
		{
		primarykey1Name="receiptId" ;
		primarykey1Type=1;
		primarykey1Name="receiptType" ;
		primarykey1Type=0;
		tableName ="CostInfoTra";
		viewName="CostInfoTra";
		numInOnePager=10;
		}

	public String getWhereClause(javax.servlet.ServletRequest request) 
		{
		String whereClause = "";
		whereClause = addWhereClause(whereClause, "receiptId", "=", "'",request.getParameter("receiptId"));
		whereClause = addWhereClause(whereClause, "receiptType", "=", "",request.getParameter("receiptType"));
		return whereClause;
		}
	
	public int loadAttr() 
		{
		try 	{ 
			infoId= rs.getInt("infoId");
			receiptId= getRsString(rs,"receiptId");
			receiptType= rs.getInt("receiptType");
			state= rs.getInt("state");
			} 
		catch(SQLException e) 
			{
			e.printStackTrace();
			System.out.println("query failed!");
			return -1;
			}
		return 1;
		}
			
	/*  删除
	*/
	public int delete() {
		String	sql ="delete from CostInfoTra where infoId = "+infoId;
		try	{
			Statement stmt=conn.createStatement();
			stmt.execute(sql);
			return 1;
			}
		catch(SQLException E)
			{
		      	System.out.println(E.getMessage());
		      	return -102;
      	    	}		
	}	
		
}

⌨️ 快捷键说明

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