using System;
|
using System.Data;
|
using System.Configuration;
|
using System.Web;
|
using System.Web.Security;
|
using System.Web.UI;
|
using System.Web.UI.HtmlControls;
|
using System.Web.UI.WebControls;
|
using System.Web.UI.WebControls.WebParts;
|
|
using System.Data.OracleClient;
|
|
namespace CCSTrace.CCS.Object
|
{
|
public class NumberContrast
|
{
|
private String CCSID;
|
private String AcceptNum;
|
private int CaseID;
|
|
public NumberContrast()
|
{
|
}
|
|
public void setCCSID(String m_CCSID)
|
{
|
this.CCSID = m_CCSID;
|
}
|
|
public String getCCSID()
|
{
|
return this.CCSID;
|
}
|
|
public void setAcceptNum(String m_AcceptNum)
|
{
|
this.AcceptNum = m_AcceptNum;
|
}
|
|
public String getAcceptNum()
|
{
|
return this.AcceptNum;
|
}
|
|
public void setCaseID(int m_CaseID)
|
{
|
this.CaseID = m_CaseID;
|
}
|
|
public int getCaseID()
|
{
|
return this.CaseID;
|
}
|
|
public bool Insert(OracleConnection _Conn,OracleTransaction _Transaction)
|
{
|
String SqlStmt;
|
|
if (!Check())
|
{
|
return false;
|
}
|
|
SqlStmt = "INSERT INTO CCS.NUM_CONTRAST (CCSID,ACCEPTNUM,CASEID) VALUES ('" + CCSID + "','" + AcceptNum + "'," + CaseID + ")";
|
|
OracleCommand Command = new OracleCommand(SqlStmt, _Conn, _Transaction);
|
|
if (Command.ExecuteNonQuery() > 0)
|
{
|
Command.Dispose();
|
return true;
|
}
|
|
Command.Dispose();
|
return false;
|
}
|
|
public bool Update(OracleConnection _Conn,OracleTransaction _Transaction)
|
{
|
if (!Check())
|
{
|
return false;
|
}
|
String SqlStmt = "UPDATE CCS.NUM_CONTRAST SET ACCEPTNUM='" + this.AcceptNum + "',CASEID=" + this.CaseID + " WHERE CCSID='" + this.CCSID + "'";
|
|
OracleCommand Command = new OracleCommand(SqlStmt, _Conn, _Transaction);
|
|
if (Command.ExecuteNonQuery() <= 0)
|
{
|
Command.Dispose();
|
return false;
|
}
|
|
Command.Dispose();
|
return true;
|
}
|
|
private bool Check()
|
{
|
if (this.CCSID == null)
|
return false;
|
|
if (this.AcceptNum == null)
|
return false;
|
|
if (CaseID == 0)
|
return false;
|
|
return true;
|
}
|
}
|
}
|