hank
2015-08-18 2d4b747b3ac277babbd8eddfd88f378953f497bd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
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;
        }
    }
}