개정판 d2d4f84b
issue #0000
- Excel Import/Export
- Excel Import 시 기존데이터는 그대로 두고 append만 가능하도록
- Excel Impor 시 유효성 체크(document no), excel 유효성 체크
- 저장
- Document 비교로직 추가
Change-Id: Iee4d385bc85eb9ea71b6d817a6462c0775eefe2d
ID2.Manager/ID2.Manager.Dapper/Repository/BaseRepository.cs | ||
---|---|---|
15 | 15 |
public abstract class BaseRepository : IBaseRepository |
16 | 16 |
{ |
17 | 17 |
protected readonly IDbConnection _DbConnection;//readonly 삭제해야하는지 확인 |
18 |
protected IDbTransaction _DbTransaction = null; |
|
18 | 19 |
|
19 | 20 |
public SqlConnection DBConnection(string connectionStr) |
20 | 21 |
{ |
21 | 22 |
return new SqlConnection(connectionStr); |
22 | 23 |
} |
23 | 24 |
|
25 |
public IDbTransaction BeginTransaction() |
|
26 |
{ |
|
27 |
if (this._DbConnection.State != ConnectionState.Open) |
|
28 |
{ |
|
29 |
this._DbConnection.Open(); |
|
30 |
} |
|
31 |
|
|
32 |
return this._DbConnection.BeginTransaction(); |
|
33 |
} |
|
34 |
|
|
24 | 35 |
public void Dispose() |
25 | 36 |
{ |
37 |
if (this._DbTransaction != null) |
|
38 |
{ |
|
39 |
this._DbTransaction.Commit(); |
|
40 |
} |
|
41 |
|
|
26 | 42 |
if (this._DbConnection != null) |
27 | 43 |
{ |
28 | 44 |
this._DbConnection.Close(); |
... | ... | |
97 | 113 |
|
98 | 114 |
public int Execute(string query, IDbTransaction dbTran) |
99 | 115 |
{ |
100 |
if (this._DbConnection.State != ConnectionState.Open) |
|
101 |
{ |
|
102 |
this._DbConnection.Open(); |
|
103 |
} |
|
104 |
|
|
105 |
return this._DbConnection.Execute(query, dbTran); |
|
116 |
return this.Execute(query, null, dbTran); |
|
106 | 117 |
} |
107 | 118 |
|
108 | 119 |
public int Execute(string query, object param, IDbTransaction dbTran) |
내보내기 Unified diff