| | |
| | | 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;
|
| | |
|
| | |
| | | {
|
| | | public class NumberContrast
|
| | | {
|
| | | private String CCSID;
|
| | | private String AcceptNum;
|
| | | private int CaseID;
|
| | | private string _ccsid;
|
| | | private string _acceptNum;
|
| | | private int _caseId;
|
| | |
|
| | | public NumberContrast()
|
| | | {
|
| | | }
|
| | |
|
| | | public void setCCSID(String m_CCSID)
|
| | | public void SetCcsid(string mCcsid)
|
| | | {
|
| | | this.CCSID = m_CCSID;
|
| | | _ccsid = mCcsid;
|
| | | }
|
| | |
|
| | | public String getCCSID()
|
| | | public string GetCcsid()
|
| | | {
|
| | | return this.CCSID;
|
| | | return _ccsid;
|
| | | }
|
| | |
|
| | | public void setAcceptNum(String m_AcceptNum)
|
| | | public void SetAcceptNum(string mAcceptNum)
|
| | | {
|
| | | this.AcceptNum = m_AcceptNum;
|
| | | _acceptNum = mAcceptNum;
|
| | | }
|
| | |
|
| | | public String getAcceptNum()
|
| | | public string GetAcceptNum()
|
| | | {
|
| | | return this.AcceptNum;
|
| | | return _acceptNum;
|
| | | }
|
| | |
|
| | | public void setCaseID(int m_CaseID)
|
| | | public void SetCaseId(int mCaseId)
|
| | | {
|
| | | this.CaseID = m_CaseID;
|
| | | _caseId = mCaseId;
|
| | | }
|
| | |
|
| | | public int getCaseID()
|
| | | public int GetCaseId()
|
| | | {
|
| | | return this.CaseID;
|
| | | return _caseId;
|
| | | }
|
| | |
|
| | | public bool Insert(OracleConnection _Conn,OracleTransaction _Transaction)
|
| | | public bool Insert(OracleConnection conn, OracleTransaction transaction)
|
| | | {
|
| | | String SqlStmt;
|
| | | string sqlStmt;
|
| | |
|
| | | if (!Check())
|
| | | {
|
| | | return false;
|
| | | }
|
| | |
|
| | | SqlStmt = "INSERT INTO CCS.NUM_CONTRAST (CCSID,ACCEPTNUM,CASEID) VALUES ('" + CCSID + "','" + AcceptNum + "'," + CaseID + ")";
|
| | | sqlStmt = "INSERT INTO CCS.NUM_CONTRAST (CCSID,ACCEPTNUM,CASEID) VALUES ('" + _ccsid + "','" + _acceptNum + "'," + _caseId + ")";
|
| | |
|
| | | OracleCommand Command = new OracleCommand(SqlStmt, _Conn, _Transaction);
|
| | | OracleCommand command = new OracleCommand(sqlStmt, conn, transaction);
|
| | |
|
| | | if (Command.ExecuteNonQuery() > 0)
|
| | | if (command.ExecuteNonQuery() > 0)
|
| | | {
|
| | | Command.Dispose();
|
| | | command.Dispose();
|
| | | return true;
|
| | | }
|
| | |
|
| | | Command.Dispose();
|
| | | command.Dispose();
|
| | | return false;
|
| | | }
|
| | |
|
| | | public bool Update(OracleConnection _Conn,OracleTransaction _Transaction)
|
| | | 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 + "'";
|
| | | string sqlStmt = "UPDATE CCS.NUM_CONTRAST SET ACCEPTNUM='" + _acceptNum + "',CASEID=" + _caseId + " WHERE CCSID='" + _ccsid + "'";
|
| | |
|
| | | OracleCommand Command = new OracleCommand(SqlStmt, _Conn, _Transaction);
|
| | | OracleCommand command = new OracleCommand(sqlStmt, conn, transaction);
|
| | |
|
| | | if (Command.ExecuteNonQuery() <= 0)
|
| | | if (command.ExecuteNonQuery() <= 0)
|
| | | {
|
| | | Command.Dispose();
|
| | | command.Dispose();
|
| | | return false;
|
| | | }
|
| | |
|
| | | Command.Dispose();
|
| | | command.Dispose();
|
| | | return true;
|
| | | }
|
| | |
|
| | | private bool Check()
|
| | | {
|
| | | if (this.CCSID == null)
|
| | | if (_ccsid == null)
|
| | | return false;
|
| | |
|
| | | if (this.AcceptNum == null)
|
| | | if (_acceptNum == null)
|
| | | return false;
|
| | |
|
| | | if (CaseID == 0)
|
| | | if (_caseId == 0)
|
| | | return false;
|
| | |
|
| | | return true;
|
| | | }
|
| | | }
|
| | | }
|
| | | } |