h-you / branches / ddl / DataConert / DataConert / DataConvertAuxiliary.cs @ 101
履歴 | 表示 | アノテート | ダウンロード (308 KB)
1 |
using System; |
---|---|
2 |
using System.Collections.Generic; |
3 |
using System.Collections; |
4 |
using System.Linq; |
5 |
using System.Text; |
6 |
using System.Threading.Tasks; |
7 |
|
8 |
using log4net; |
9 |
|
10 |
using ProcessManagement.OracleDB.Oracle; |
11 |
using ProcessManagement.OracleDB.Core; |
12 |
using ProcessManagement.OracleDB.IOAccess; |
13 |
|
14 |
using ProcessManagement.DB.MySql; |
15 |
using ProcessManagement.DB.Core; |
16 |
using ProcessManagement.DB.IOAccess; |
17 |
|
18 |
using ProcessManagement.DataModel; |
19 |
using ProcessManagement.Common; |
20 |
|
21 |
namespace DataConert |
22 |
{ |
23 |
partial class FrmDataConvert |
24 |
{ |
25 |
#region スレッド使用定義 |
26 |
//コントロールの値を変更するためのデリゲート |
27 |
private delegate void SetProgressValueDelegate(string strMsg); |
28 |
//バックグラウンド処理が終わった時にコントロールの値を変更するためのデリゲート |
29 |
private delegate void ThreadCompletedDelegate(); |
30 |
//処理がキャンセルされた時にコントロールの値を変更するためのデリゲート |
31 |
private delegate void ThreadCanceledDelegate(); |
32 |
|
33 |
//別処理をするためのスレッド |
34 |
private System.Threading.Thread workerThread; |
35 |
|
36 |
//デリゲートの作成 |
37 |
SetProgressValueDelegate m_progressDlg = null; |
38 |
ThreadCompletedDelegate m_completeDlg = null; |
39 |
ThreadCanceledDelegate m_canceledDlg = null; |
40 |
#endregion |
41 |
|
42 |
private DateTime m_dtStart = DateTime.Now; |
43 |
#region 変換メイン |
44 |
/// <summary> |
45 |
/// 変換メイン |
46 |
/// </summary> |
47 |
private void MainProc() |
48 |
{ |
49 |
try |
50 |
{ |
51 |
btnStart.Visible = false; |
52 |
btnEnd.Visible = false; |
53 |
|
54 |
//印刷を別スレッドで実行する |
55 |
workerThread = new System.Threading.Thread(new System.Threading.ThreadStart(ConvertProcess)); |
56 |
workerThread.IsBackground = true; |
57 |
workerThread.Start(); |
58 |
|
59 |
listBox1.Items.Clear(); |
60 |
m_dtStart = DateTime.Now; |
61 |
string strStartMsg = string.Format(" ---------- 処理開始 ---------- {0}", m_dtStart.ToLongTimeString()); |
62 |
listBox1.Items.Add(strStartMsg); |
63 |
} |
64 |
catch (Exception ex) |
65 |
{ |
66 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
67 |
} |
68 |
} |
69 |
#endregion |
70 |
|
71 |
#region 変換処理 |
72 |
/// <summary> |
73 |
/// 変換処理 |
74 |
/// </summary> |
75 |
private void ConvertProcess() |
76 |
{ |
77 |
try |
78 |
{ |
79 |
//デリゲートの作成 |
80 |
m_progressDlg = new SetProgressValueDelegate(SetProgressValue); |
81 |
m_completeDlg = new ThreadCompletedDelegate(ThreadCompleted); |
82 |
m_canceledDlg = new ThreadCanceledDelegate(ThreadCanceled); |
83 |
|
84 |
string strMsg = string.Empty; |
85 |
bool bRet= true; |
86 |
int ino = 0; |
87 |
|
88 |
#region ----- 変換処理 |
89 |
// 1:担当者行動予定データ(Actionscheduledata) |
90 |
bRet = CnvActionscheduledata(ino++, ref strMsg); |
91 |
this.Invoke(m_progressDlg, new object[] { strMsg }); |
92 |
if (!bRet) return; |
93 |
|
94 |
// 2:承認経路マスタ(Approvalmaster) |
95 |
bRet = CnvApprovalmaster(ino++, ref strMsg); |
96 |
this.Invoke(m_progressDlg, new object[] { strMsg }); |
97 |
if (!bRet) return; |
98 |
|
99 |
// 3:出勤日報データ(Attendancedailydata) |
100 |
bRet = CnvAttendancedailydata(ino++, ref strMsg); |
101 |
this.Invoke(m_progressDlg, new object[] { strMsg }); |
102 |
if (!bRet) return; |
103 |
|
104 |
// 4:出勤管理データ(Attendancedata) |
105 |
bRet = CnvAttendancedata(ino++, ref strMsg); |
106 |
this.Invoke(m_progressDlg, new object[] { strMsg }); |
107 |
if (!bRet) return; |
108 |
|
109 |
// 5:工事詳細台帳データ【退避用】(bk_constructionledger) |
110 |
bRet = CnvBk_constructionledger(ino++, ref strMsg); |
111 |
this.Invoke(m_progressDlg, new object[] { strMsg }); |
112 |
if (!bRet) return; |
113 |
|
114 |
// 6:工事詳細台帳明細データ【退避用】(Bk_constructionledgerdetail) |
115 |
bRet = CnvBk_constructionledgerdetail(ino++, ref strMsg); |
116 |
this.Invoke(m_progressDlg, new object[] { strMsg }); |
117 |
if (!bRet) return; |
118 |
|
119 |
// 7:工事詳細台帳実行データ【退避用】(Bk_constructionledgerexcute) |
120 |
bRet = CnvBk_constructionledgerexcute(ino++, ref strMsg); |
121 |
this.Invoke(m_progressDlg, new object[] { strMsg }); |
122 |
if (!bRet) return; |
123 |
|
124 |
// 8:積算見積データ【退避用】(Bk_estimatedata) |
125 |
bRet = CnvBk_estimatedata(ino++, ref strMsg); |
126 |
this.Invoke(m_progressDlg, new object[] { strMsg }); |
127 |
if (!bRet) return; |
128 |
|
129 |
// 9:積算見積ページデータ【退避用】(Bk_estimatedatabody) |
130 |
bRet = CnvBk_estimatedatabody(ino++, ref strMsg); |
131 |
this.Invoke(m_progressDlg, new object[] { strMsg }); |
132 |
if (!bRet) return; |
133 |
|
134 |
// 10:積算見積データ明細【退避用】(Bk_estimatedatadetail) |
135 |
bRet = CnvBk_estimatedatadetail(ino++, ref strMsg); |
136 |
this.Invoke(m_progressDlg, new object[] { strMsg }); |
137 |
if (!bRet) return; |
138 |
|
139 |
// 11:法人格マスタ(Businesstypemaster) |
140 |
bRet = CnvBusinesstypemaster(ino++, ref strMsg); |
141 |
this.Invoke(m_progressDlg, new object[] { strMsg }); |
142 |
if (!bRet) return; |
143 |
|
144 |
// 12:共通費大項目マスタ(Commoncostlarge) |
145 |
bRet = CnvCommoncostlarge(ino++, ref strMsg); |
146 |
this.Invoke(m_progressDlg, new object[] { strMsg }); |
147 |
if (!bRet) return; |
148 |
|
149 |
// 13:共通費工種関連マスタ(Commoncostlinkms) |
150 |
bRet = CnvCommoncostlinkms(ino++, ref strMsg); |
151 |
this.Invoke(m_progressDlg, new object[] { strMsg }); |
152 |
if (!bRet) return; |
153 |
|
154 |
// 14:共通費中項目マスタ(Commoncostmiddle) |
155 |
bRet = CnvCommoncostmiddle(ino++, ref strMsg); |
156 |
this.Invoke(m_progressDlg, new object[] { strMsg }); |
157 |
if (!bRet) return; |
158 |
|
159 |
// 15:共通費中項目キーマスタ(Commoncostmiddlesearchword) |
160 |
bRet = CnvCommoncostmiddlesearchword(ino++, ref strMsg); |
161 |
this.Invoke(m_progressDlg, new object[] { strMsg }); |
162 |
if (!bRet) return; |
163 |
|
164 |
// 16:構成工種関連マスタ(Componentlinkmaster) |
165 |
bRet = CnvComponentlinkmaster(ino++, ref strMsg); |
166 |
this.Invoke(m_progressDlg, new object[] { strMsg }); |
167 |
if (!bRet) return; |
168 |
|
169 |
// 17:構成マスタ(Componentmaster) |
170 |
bRet = CnvComponentmaster(ino++, ref strMsg); |
171 |
this.Invoke(m_progressDlg, new object[] { strMsg }); |
172 |
if (!bRet) return; |
173 |
|
174 |
// 18:工事基本情報(Constructionbaseinfo) |
175 |
bRet = CnvConstructionbaseinfo(ino++, ref strMsg); |
176 |
this.Invoke(m_progressDlg, new object[] { strMsg }); |
177 |
if (!bRet) return; |
178 |
|
179 |
// 19:工事基本情報明細(Constructionbaseinfodetail) |
180 |
bRet = CnvConstructionbaseinfodetail(ino++, ref strMsg); |
181 |
this.Invoke(m_progressDlg, new object[] { strMsg }); |
182 |
if (!bRet) return; |
183 |
|
184 |
// 20:工事施工予算データ(Constructionbudget) |
185 |
bRet = CnvConstructionbudget(ino++, ref strMsg); |
186 |
this.Invoke(m_progressDlg, new object[] { strMsg }); |
187 |
if (!bRet) return; |
188 |
|
189 |
// 21:工事施工予算データ明細(Constructionbudgetdetail) |
190 |
bRet = CnvConstructionbudgetdetail(ino++, ref strMsg); |
191 |
this.Invoke(m_progressDlg, new object[] { strMsg }); |
192 |
if (!bRet) return; |
193 |
|
194 |
// 22:工種マスタ(Constructionitemmaster) |
195 |
bRet = CnvConstructionitemmaster(ino++, ref strMsg); |
196 |
this.Invoke(m_progressDlg, new object[] { strMsg }); |
197 |
if (!bRet) return; |
198 |
|
199 |
// 23:工事詳細台帳データ(Constructionledger) |
200 |
bRet = CnvConstructionledger(ino++, ref strMsg); |
201 |
this.Invoke(m_progressDlg, new object[] { strMsg }); |
202 |
if (!bRet) return; |
203 |
|
204 |
// 24:工事詳細台帳明細データ(Constructionledgerdetail) |
205 |
bRet = CnvConstructionledgerdetail(ino++, ref strMsg); |
206 |
this.Invoke(m_progressDlg, new object[] { strMsg }); |
207 |
if (!bRet) return; |
208 |
|
209 |
// 25:工事詳細台帳実行データ(Constructionledgerexcute) |
210 |
bRet = CnvConstructionledgerexcute(ino++, ref strMsg); |
211 |
this.Invoke(m_progressDlg, new object[] { strMsg }); |
212 |
if (!bRet) return; |
213 |
|
214 |
// 26:工事リンク情報(Constructionlink) |
215 |
bRet = CnvConstructionlink(ino++, ref strMsg); |
216 |
this.Invoke(m_progressDlg, new object[] { strMsg }); |
217 |
if (!bRet) return; |
218 |
|
219 |
// 27:案件進捗日付データ(Constructionprogressdate) |
220 |
bRet = CnvConstructionprogressdate(ino++, ref strMsg); |
221 |
this.Invoke(m_progressDlg, new object[] { strMsg }); |
222 |
if (!bRet) return; |
223 |
|
224 |
// 28:作業マスタ(Constructionspecmaster) |
225 |
bRet = CnvConstructionspecmaster(ino++, ref strMsg); |
226 |
this.Invoke(m_progressDlg, new object[] { strMsg }); |
227 |
if (!bRet) return; |
228 |
|
229 |
// 29:作業単価マスタ(Constructionspecunitprice) |
230 |
bRet = CnvConstructionspecunitprice(ino++, ref strMsg); |
231 |
this.Invoke(m_progressDlg, new object[] { strMsg }); |
232 |
if (!bRet) return; |
233 |
|
234 |
// 30:工事種別マスタ(Constructiontypemaster) |
235 |
bRet = CnvConstructiontypemaster(ino++, ref strMsg); |
236 |
this.Invoke(m_progressDlg, new object[] { strMsg }); |
237 |
if (!bRet) return; |
238 |
|
239 |
// 31:担当者毎経費データ(Costdataofperson) |
240 |
bRet = CnvCostdataofperson(ino++, ref strMsg); |
241 |
this.Invoke(m_progressDlg, new object[] { strMsg }); |
242 |
if (!bRet) return; |
243 |
|
244 |
// 32:発注者登録申請データ(Costomerregist) |
245 |
bRet = CnvCostomerregist(ino++, ref strMsg); |
246 |
this.Invoke(m_progressDlg, new object[] { strMsg }); |
247 |
if (!bRet) return; |
248 |
|
249 |
// 33:日報データ(Dailydataconstruction) |
250 |
bRet = CnvDailydataconstruction(ino++, ref strMsg); |
251 |
this.Invoke(m_progressDlg, new object[] { strMsg }); |
252 |
if (!bRet) return; |
253 |
|
254 |
// 34:日報データ (明細)(Dailydatadetail) |
255 |
bRet = CnvDailydatadetail(ino++, ref strMsg); |
256 |
this.Invoke(m_progressDlg, new object[] { strMsg }); |
257 |
if (!bRet) return; |
258 |
|
259 |
// 35:日報データ (現場巡回)(Dailydatafield) |
260 |
bRet = CnvDailydatafield(ino++, ref strMsg); |
261 |
this.Invoke(m_progressDlg, new object[] { strMsg }); |
262 |
if (!bRet) return; |
263 |
|
264 |
// 36:日報データ (資材)(Dailydatamaterials) |
265 |
bRet = CnvDailydatamaterials(ino++, ref strMsg); |
266 |
this.Invoke(m_progressDlg, new object[] { strMsg }); |
267 |
if (!bRet) return; |
268 |
|
269 |
// 37:日報データ (協力業者指示)(Dailydatasubcontractors) |
270 |
bRet = CnvDailydatasubcontractors(ino++, ref strMsg); |
271 |
this.Invoke(m_progressDlg, new object[] { strMsg }); |
272 |
if (!bRet) return; |
273 |
|
274 |
// 38:日報データ (車両)(Dailydatavehicles) |
275 |
bRet = CnvDailydatavehicles(ino++, ref strMsg); |
276 |
this.Invoke(m_progressDlg, new object[] { strMsg }); |
277 |
if (!bRet) return; |
278 |
|
279 |
// 39:部署経費率マスタ(Departmentexpensesmaster) |
280 |
bRet = CnvDepartmentexpensesmaster(ino++, ref strMsg); |
281 |
this.Invoke(m_progressDlg, new object[] { strMsg }); |
282 |
if (!bRet) return; |
283 |
|
284 |
// 40:部署マスタ(Departmentmaster) |
285 |
bRet = CnvDepartmentmaster(ino++, ref strMsg); |
286 |
this.Invoke(m_progressDlg, new object[] { strMsg }); |
287 |
if (!bRet) return; |
288 |
|
289 |
// 41:区分マスタ(Divisionmaster) |
290 |
bRet = CnvDivisionmaster(ino++, ref strMsg); |
291 |
this.Invoke(m_progressDlg, new object[] { strMsg }); |
292 |
if (!bRet) return; |
293 |
|
294 |
// 42:積算予算書データ(Estimatebudget) |
295 |
bRet = CnvEstimatebudget(ino++, ref strMsg); |
296 |
this.Invoke(m_progressDlg, new object[] { strMsg }); |
297 |
if (!bRet) return; |
298 |
|
299 |
// 43:積算予算内訳データ明細(Estimatebudgetdetail) |
300 |
bRet = CnvEstimatebudgetdetail(ino++, ref strMsg); |
301 |
this.Invoke(m_progressDlg, new object[] { strMsg }); |
302 |
if (!bRet) return; |
303 |
|
304 |
// 44:積算見積データ(Estimatedata) |
305 |
bRet = CnvEstimatedata(ino++, ref strMsg); |
306 |
this.Invoke(m_progressDlg, new object[] { strMsg }); |
307 |
if (!bRet) return; |
308 |
|
309 |
// 45:積算見積ページデータ(Estimatedatabody) |
310 |
bRet = CnvEstimatedatabody(ino++, ref strMsg); |
311 |
this.Invoke(m_progressDlg, new object[] { strMsg }); |
312 |
if (!bRet) return; |
313 |
|
314 |
// 46:積算見積データ明細(Estimatedatadetail) |
315 |
bRet = CnvEstimatedatadetail(ino++, ref strMsg); |
316 |
this.Invoke(m_progressDlg, new object[] { strMsg }); |
317 |
if (!bRet) return; |
318 |
|
319 |
// 47:会社休日マスタ(Holidaycalendermaster) |
320 |
bRet = CnvHolidaycalendermaster(ino++, ref strMsg); |
321 |
this.Invoke(m_progressDlg, new object[] { strMsg }); |
322 |
if (!bRet) return; |
323 |
|
324 |
// 48:入力時検索履歴(Inputsearchlogdata) |
325 |
bRet = CnvInputsearchlogdata(ino++, ref strMsg); |
326 |
this.Invoke(m_progressDlg, new object[] { strMsg }); |
327 |
if (!bRet) return; |
328 |
|
329 |
// 49:掲示板メッセージ(Messageboarddata) |
330 |
bRet = CnvMessageboarddata(ino++, ref strMsg); |
331 |
this.Invoke(m_progressDlg, new object[] { strMsg }); |
332 |
if (!bRet) return; |
333 |
|
334 |
// 50:掲示板対象者テーブル(Messageboardterget) |
335 |
bRet = CnvMessageboardterget(ino++, ref strMsg); |
336 |
this.Invoke(m_progressDlg, new object[] { strMsg }); |
337 |
if (!bRet) return; |
338 |
|
339 |
// 51:掲示板メッセージ閲覧履歴(Messagebrowsinghistory) |
340 |
bRet = CnvMessagebrowsinghistory(ino++, ref strMsg); |
341 |
this.Invoke(m_progressDlg, new object[] { strMsg }); |
342 |
if (!bRet) return; |
343 |
|
344 |
// 52:発注者マスタ(Orderersmaster) |
345 |
bRet = CnvOrderersmaster(ino++, ref strMsg); |
346 |
this.Invoke(m_progressDlg, new object[] { strMsg }); |
347 |
if (!bRet) return; |
348 |
|
349 |
// 53:受注金額データ(Orderspricedata) |
350 |
bRet = CnvOrderspricedata(ino++, ref strMsg); |
351 |
this.Invoke(m_progressDlg, new object[] { strMsg }); |
352 |
if (!bRet) return; |
353 |
|
354 |
// 54:担当者承認データ(Personapproval) |
355 |
bRet = CnvPersonapproval(ino++, ref strMsg); |
356 |
this.Invoke(m_progressDlg, new object[] { strMsg }); |
357 |
if (!bRet) return; |
358 |
|
359 |
// 55:担当者承認コメントデータ(Personapprovalcomment) |
360 |
bRet = CnvPersonapprovalcomment(ino++, ref strMsg); |
361 |
this.Invoke(m_progressDlg, new object[] { strMsg }); |
362 |
if (!bRet) return; |
363 |
|
364 |
// 56:担当者対象部署マスタ(Persondepartmentmaster) |
365 |
bRet = CnvPersondepartmentmaster(ino++, ref strMsg); |
366 |
this.Invoke(m_progressDlg, new object[] { strMsg }); |
367 |
if (!bRet) return; |
368 |
|
369 |
// 57:担当者マスタ(Personinchargemaster) |
370 |
bRet = CnvPersoninchargemaster(ino++, ref strMsg); |
371 |
this.Invoke(m_progressDlg, new object[] { strMsg }); |
372 |
if (!bRet) return; |
373 |
|
374 |
// 58:担当者給与マスタ(Personsalarymaster) |
375 |
bRet = CnvPersonsalarymaster(ino++, ref strMsg); |
376 |
this.Invoke(m_progressDlg, new object[] { strMsg }); |
377 |
if (!bRet) return; |
378 |
|
379 |
// 59:発注者打ち合わせ議事録データ(Proceedingsdata) |
380 |
bRet = CnvProceedingsdata(ino++, ref strMsg); |
381 |
this.Invoke(m_progressDlg, new object[] { strMsg }); |
382 |
if (!bRet) return; |
383 |
|
384 |
// 60:発注者打ち合わせ議事録データ(出席(Proceedingsdataattend)者) |
385 |
bRet = CnvProceedingsdataattend(ino++, ref strMsg); |
386 |
this.Invoke(m_progressDlg, new object[] { strMsg }); |
387 |
if (!bRet) return; |
388 |
|
389 |
// 61:発注者打ち合わせ議事録データ(明細(Proceedingsdatadetail)) |
390 |
bRet = CnvProceedingsdatadetail(ino++, ref strMsg); |
391 |
this.Invoke(m_progressDlg, new object[] { strMsg }); |
392 |
if (!bRet) return; |
393 |
|
394 |
// 62:承認データ(Processapproval) |
395 |
bRet = CnvProcessapproval(ino++, ref strMsg); |
396 |
this.Invoke(m_progressDlg, new object[] { strMsg }); |
397 |
if (!bRet) return; |
398 |
|
399 |
// 63:承認コメントデータ(Processapprovalcomment) |
400 |
bRet = CnvProcessapprovalcomment(ino++, ref strMsg); |
401 |
this.Invoke(m_progressDlg, new object[] { strMsg }); |
402 |
if (!bRet) return; |
403 |
|
404 |
// 64:承認明細データ(Processapprovaldetail) |
405 |
bRet = CnvProcessapprovaldetail(ino++, ref strMsg); |
406 |
this.Invoke(m_progressDlg, new object[] { strMsg }); |
407 |
if (!bRet) return; |
408 |
|
409 |
// 65:起動対象マスタ(Processexcutemaster) |
410 |
bRet = CnvProcessexcutemaster(ino++, ref strMsg); |
411 |
this.Invoke(m_progressDlg, new object[] { strMsg }); |
412 |
if (!bRet) return; |
413 |
|
414 |
// 66:注文書データ(Purchaseorder) |
415 |
bRet = CnvPurchaseorder(ino++, ref strMsg); |
416 |
this.Invoke(m_progressDlg, new object[] { strMsg }); |
417 |
if (!bRet) return; |
418 |
|
419 |
// 67:注文書明細データ(Purchaseorderdetail) |
420 |
bRet = CnvPurchaseorderdetail(ino++, ref strMsg); |
421 |
this.Invoke(m_progressDlg, new object[] { strMsg }); |
422 |
if (!bRet) return; |
423 |
|
424 |
// 68:売上グラフデータ(Salesgraphdata) |
425 |
bRet = CnvSalesgraphdata(ino++, ref strMsg); |
426 |
this.Invoke(m_progressDlg, new object[] { strMsg }); |
427 |
if (!bRet) return; |
428 |
|
429 |
// 69:保護区分マスタ(Securitymaster) |
430 |
bRet = CnvSecuritymaster(ino++, ref strMsg); |
431 |
this.Invoke(m_progressDlg, new object[] { strMsg }); |
432 |
if (!bRet) return; |
433 |
|
434 |
// 70:協力業者施工工種登録申請データ(Subconstrjobitemregist) |
435 |
bRet = CnvSubconstrjobitemregist(ino++, ref strMsg); |
436 |
this.Invoke(m_progressDlg, new object[] { strMsg }); |
437 |
if (!bRet) return; |
438 |
|
439 |
// 71:協力業者職種リンク登録申請データ(Subconstrjoblinkregist) |
440 |
bRet = CnvSubconstrjoblinkregist(ino++, ref strMsg); |
441 |
this.Invoke(m_progressDlg, new object[] { strMsg }); |
442 |
if (!bRet) return; |
443 |
|
444 |
// 72:協力業者登録申請データ(Subconstrregist) |
445 |
bRet = CnvSubconstrregist(ino++, ref strMsg); |
446 |
this.Invoke(m_progressDlg, new object[] { strMsg }); |
447 |
if (!bRet) return; |
448 |
|
449 |
// 73:協力会社工種マスタ(Subcontractoritemmaster) |
450 |
bRet = CnvSubcontractoritemmaster(ino++, ref strMsg); |
451 |
this.Invoke(m_progressDlg, new object[] { strMsg }); |
452 |
if (!bRet) return; |
453 |
|
454 |
// 74:協力会社職種マスタ(Subcontractorjobcategory) |
455 |
bRet = CnvSubcontractorjobcategory(ino++, ref strMsg); |
456 |
this.Invoke(m_progressDlg, new object[] { strMsg }); |
457 |
if (!bRet) return; |
458 |
|
459 |
// 75:協力会社施工工種データ(Subcontractorjobitem) |
460 |
bRet = CnvSubcontractorjobitem(ino++, ref strMsg); |
461 |
this.Invoke(m_progressDlg, new object[] { strMsg }); |
462 |
if (!bRet) return; |
463 |
|
464 |
// 76:協力会社職種リンクマスタ(Subcontractorjoblink) |
465 |
bRet = CnvSubcontractorjoblink(ino++, ref strMsg); |
466 |
this.Invoke(m_progressDlg, new object[] { strMsg }); |
467 |
if (!bRet) return; |
468 |
|
469 |
// 77:協力会社マスタ(Subcontractormaster) |
470 |
bRet = CnvSubcontractormaster(ino++, ref strMsg); |
471 |
this.Invoke(m_progressDlg, new object[] { strMsg }); |
472 |
if (!bRet) return; |
473 |
|
474 |
// 78:仕入先マスタ(Suppliersmaster) |
475 |
bRet = CnvSuppliersmaster(ino++, ref strMsg); |
476 |
this.Invoke(m_progressDlg, new object[] { strMsg }); |
477 |
if (!bRet) return; |
478 |
|
479 |
// 79:システム起動確認データ(Systemexecute) |
480 |
bRet = CnvSystemexecute(ino++, ref strMsg); |
481 |
this.Invoke(m_progressDlg, new object[] { strMsg }); |
482 |
if (!bRet) return; |
483 |
|
484 |
// 80:管理マスタ(Systemmaster) |
485 |
bRet = CnvSystemmaster(ino++, ref strMsg); |
486 |
this.Invoke(m_progressDlg, new object[] { strMsg }); |
487 |
if (!bRet) return; |
488 |
|
489 |
// 81:期限マスタ(Termmaster) |
490 |
bRet = CnvTermmaster(ino++, ref strMsg); |
491 |
this.Invoke(m_progressDlg, new object[] { strMsg }); |
492 |
if (!bRet) return; |
493 |
|
494 |
// 82:出勤交通費データ(Tranceportdailydata) |
495 |
bRet = CnvTranceportdailydata(ino++, ref strMsg); |
496 |
this.Invoke(m_progressDlg, new object[] { strMsg }); |
497 |
if (!bRet) return; |
498 |
|
499 |
// 83:工事種別経費率マスタ(Typeexpensesmaster) |
500 |
bRet = CnvTypeexpensesmaster(ino++, ref strMsg); |
501 |
this.Invoke(m_progressDlg, new object[] { strMsg }); |
502 |
if (!bRet) return; |
503 |
|
504 |
// 84:単位マスタ(Unitmaster) |
505 |
bRet = CnvUnitmaster(ino++, ref strMsg); |
506 |
this.Invoke(m_progressDlg, new object[] { strMsg }); |
507 |
if (!bRet) return; |
508 |
|
509 |
// 85:車両マスタ(Vehiclemaster) |
510 |
bRet = CnvVehiclemaster(ino++, ref strMsg); |
511 |
this.Invoke(m_progressDlg, new object[] { strMsg }); |
512 |
if (!bRet) return; |
513 |
|
514 |
// 86:車両記録データ(Vehiclerecorddata) |
515 |
bRet = CnvVehiclerecorddata(ino++, ref strMsg); |
516 |
this.Invoke(m_progressDlg, new object[] { strMsg }); |
517 |
if (!bRet) return; |
518 |
|
519 |
// 87:車両予約データ(Vehiclescheduledata) |
520 |
bRet = CnvVehiclescheduledata(ino++, ref strMsg); |
521 |
this.Invoke(m_progressDlg, new object[] { strMsg }); |
522 |
if (!bRet) return; |
523 |
|
524 |
// 88:年マスタ(YearMaster) |
525 |
bRet = CnvYearMaster(ino++, ref strMsg); |
526 |
this.Invoke(m_progressDlg, new object[] { strMsg }); |
527 |
if (!bRet) return; |
528 |
|
529 |
// 89:月マスタ(Monthmaster) |
530 |
bRet = CnvMonthmaster(ino++, ref strMsg); |
531 |
this.Invoke(m_progressDlg, new object[] { strMsg }); |
532 |
if (!bRet) return; |
533 |
|
534 |
// 90:日マスタ(Daymaster) |
535 |
bRet = CnvDaymaster(ino++, ref strMsg); |
536 |
this.Invoke(m_progressDlg, new object[] { strMsg }); |
537 |
if (!bRet) return; |
538 |
|
539 |
#endregion |
540 |
} |
541 |
catch (Exception ex) |
542 |
{ |
543 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
544 |
} |
545 |
finally |
546 |
{ |
547 |
// 完了したときにコントロールの値を変更する |
548 |
this.Invoke(m_completeDlg); |
549 |
|
550 |
//デリゲートの廃棄 |
551 |
m_progressDlg = null; |
552 |
m_completeDlg = null; |
553 |
m_canceledDlg = null; |
554 |
|
555 |
// ガーベージコレクト |
556 |
GC.Collect(); |
557 |
} |
558 |
} |
559 |
#endregion |
560 |
|
561 |
#region プログレスの代わりにメッセージを出す |
562 |
/// <summary> |
563 |
/// プログレスの代わりにメッセージを出す |
564 |
/// </summary> |
565 |
/// <param name="strMsg"></param> |
566 |
private void SetProgressValue(string strMsg) |
567 |
{ |
568 |
listBox1.Items.Add(strMsg); |
569 |
listBox1.SelectedIndex = (listBox1.Items.Count - 1); |
570 |
} |
571 |
#endregion |
572 |
|
573 |
#region 処理が完了した時にコントロールの値を変更する |
574 |
/// <summary> |
575 |
/// 処理が完了した時にコントロールの値を変更する |
576 |
/// </summary> |
577 |
private void ThreadCompleted() |
578 |
{ |
579 |
try |
580 |
{ |
581 |
DateTime dtFinish = DateTime.Now; |
582 |
string strFinishMsg = string.Format(" ---------- 処理終了 ---------- {0}:経過時間{1}", dtFinish.ToLongTimeString(), dtFinish.Subtract(m_dtStart).ToString()); |
583 |
listBox1.Items.Add(strFinishMsg); |
584 |
listBox1.SelectedIndex = (listBox1.Items.Count - 1); |
585 |
|
586 |
btnStart.Visible = true; |
587 |
btnEnd.Visible = true; |
588 |
} |
589 |
catch (System.Exception ex) |
590 |
{ |
591 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
592 |
} |
593 |
} |
594 |
#endregion |
595 |
|
596 |
#region 処理がキャンセルされた時にコントロールの値を変更する |
597 |
/// <summary> |
598 |
/// 処理がキャンセルされた時にコントロールの値を変更する |
599 |
/// </summary> |
600 |
private void ThreadCanceled() |
601 |
{ |
602 |
try |
603 |
{ |
604 |
|
605 |
} |
606 |
catch (System.Exception ex) |
607 |
{ |
608 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
609 |
} |
610 |
} |
611 |
#endregion |
612 |
|
613 |
#region プライマリキー取得 |
614 |
/// <summary> |
615 |
/// プライマリキー取得 |
616 |
/// </summary> |
617 |
/// <param name="tblname"></param> |
618 |
/// <param name="keyname"></param> |
619 |
private void GetPrimaryKey(string tblname, ref List<string> keyname) |
620 |
{ |
621 |
OracleProcess OraProc = new OracleProcess(DBCommonForOracle.Instance.DBConnectString); |
622 |
try |
623 |
{ |
624 |
string strSQL = "SELECT COLUMN_NAME FROM USER_CONS_COLUMNS"; |
625 |
strSQL += string.Format(" WHERE TABLE_NAME = '{0}'", tblname); |
626 |
strSQL += " AND CONSTRAINT_NAME IN (SELECT CONSTRAINT_NAME FROM USER_CONSTRAINTS"; |
627 |
strSQL += string.Format(" WHERE TABLE_NAME = '{0}'", tblname); |
628 |
strSQL += " AND CONSTRAINT_TYPE = 'P')"; |
629 |
ArrayList arList = new ArrayList(); |
630 |
if (!OraProc.ExecuteReader(strSQL, ref arList)) return; |
631 |
|
632 |
foreach (object[] objRec in arList) |
633 |
{ |
634 |
keyname.Add(CommonMotions.cnvString(objRec[0])); |
635 |
} |
636 |
} |
637 |
catch (Exception ex) |
638 |
{ |
639 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
640 |
} |
641 |
finally |
642 |
{ |
643 |
OraProc.close(); OraProc = null; |
644 |
} |
645 |
} |
646 |
#endregion |
647 |
|
648 |
#region テーブル取得順序作成 |
649 |
/// <summary> |
650 |
/// テーブル取得順序作成 |
651 |
/// </summary> |
652 |
/// <param name="tblname"></param> |
653 |
/// <returns></returns> |
654 |
private string CreateOrder(string tblname) |
655 |
{ |
656 |
string strRet = string.Empty; |
657 |
try |
658 |
{ |
659 |
List<string> keyname = new List<string>(); |
660 |
|
661 |
// プライマリキー取得 |
662 |
GetPrimaryKey(tblname, ref keyname); |
663 |
|
664 |
strRet = " ORDER BY"; |
665 |
bool bFirst = true; |
666 |
foreach (string curname in keyname) |
667 |
{ |
668 |
if (bFirst) strRet += string.Format(" {0} ASC", curname); |
669 |
else strRet += string.Format(", {0} ASC", curname); |
670 |
bFirst = false; |
671 |
} |
672 |
if (strRet.Equals(" ORDER BY")) strRet = string.Empty; |
673 |
} |
674 |
catch (Exception ex) |
675 |
{ |
676 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
677 |
} |
678 |
return strRet; |
679 |
} |
680 |
#endregion |
681 |
|
682 |
#region 表示メッセージ長さ調整 |
683 |
/// <summary> |
684 |
/// 表示メッセージ長さ調整 |
685 |
/// </summary> |
686 |
/// <param name="strMsg"></param> |
687 |
private void EditDspLength(ref string strMsg) |
688 |
{ |
689 |
try |
690 |
{ |
691 |
string work = strMsg; |
692 |
strMsg = string.Format("{0, -90}", work); |
693 |
} |
694 |
catch (Exception ex) |
695 |
{ |
696 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
697 |
} |
698 |
} |
699 |
#endregion |
700 |
|
701 |
// ----- テーブル毎変換処理 |
702 |
#region 担当者行動予定データ(Actionscheduledata) |
703 |
/// <summary> |
704 |
/// 担当者行動予定データ(Actionscheduledata) |
705 |
/// </summary> |
706 |
/// <returns></returns> |
707 |
private bool CnvActionscheduledata(int ino, ref string strMsg) |
708 |
{ |
709 |
ProcessManagement.OracleDB.IOAccess.IOActionScheduleData InDB = new ProcessManagement.OracleDB.IOAccess.IOActionScheduleData(); |
710 |
ProcessManagement.DB.IOAccess.IOActionScheduleData OutDB = new ProcessManagement.DB.IOAccess.IOActionScheduleData(); |
711 |
strMsg = string.Format("№{0}:テーブル:{1}({2})", (ino + 1).ToString("00"), s_OracleTables[ino].Value, s_OracleTables[ino].Key); |
712 |
try |
713 |
{ |
714 |
EditDspLength(ref strMsg); |
715 |
|
716 |
string strSQL = CreateOrder(s_OracleTables[ino].Key); |
717 |
List<ActionScheduleData> getList = new List<ActionScheduleData>(); |
718 |
if (!InDB.SelectAction(strSQL, ref getList)) return false; |
719 |
|
720 |
OutDB.connect(); OutDB.beginTran(); |
721 |
strSQL = string.Format("TRUNCATE TABLE {0}", s_OracleTables[ino].Key); |
722 |
OutDB.ExecuteNonQuery(strSQL, false); |
723 |
|
724 |
List<ActionScheduleData> BuffList = new List<ActionScheduleData>(); |
725 |
int DataCnt = 0; |
726 |
while (DataCnt < getList.Count) |
727 |
{ |
728 |
BuffList.Clear(); |
729 |
|
730 |
for (int ii = 0; ii < s_LoopCount; ii++, DataCnt++) |
731 |
{ |
732 |
if (DataCnt >= getList.Count) break; |
733 |
|
734 |
BuffList.Add(getList[DataCnt]); |
735 |
} |
736 |
|
737 |
if (!OutDB.InsertAction(BuffList, false)) |
738 |
{ |
739 |
OutDB.rollback(); |
740 |
strMsg += " DB処理異常"; |
741 |
return false; |
742 |
} |
743 |
} |
744 |
|
745 |
strMsg += string.Format(" 処理件数={0}", DataCnt.ToString("#,0")); |
746 |
|
747 |
return true; |
748 |
} |
749 |
catch (Exception ex) |
750 |
{ |
751 |
OutDB.rollback(); |
752 |
|
753 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
754 |
strMsg += string.Format(" システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
755 |
return false; |
756 |
} |
757 |
finally |
758 |
{ |
759 |
InDB.close(); InDB = null; |
760 |
OutDB.commit(); |
761 |
OutDB.close(); OutDB = null; |
762 |
} |
763 |
} |
764 |
#endregion |
765 |
|
766 |
#region 承認経路マスタ(Approvalmaster) |
767 |
/// <summary> |
768 |
/// 承認経路マスタ(Approvalmaster) |
769 |
/// </summary> |
770 |
private bool CnvApprovalmaster(int ino, ref string strMsg) |
771 |
{ |
772 |
ProcessManagement.OracleDB.IOAccess.IOMApproval InDB = new ProcessManagement.OracleDB.IOAccess.IOMApproval(); |
773 |
ProcessManagement.DB.IOAccess.IOMApproval OutDB = new ProcessManagement.DB.IOAccess.IOMApproval(); |
774 |
strMsg = string.Format("№{0}:テーブル:{1}({2})", (ino + 1).ToString("00"), s_OracleTables[ino].Value, s_OracleTables[ino].Key); |
775 |
try |
776 |
{ |
777 |
EditDspLength(ref strMsg); |
778 |
|
779 |
string strSQL = CreateOrder(s_OracleTables[ino].Key); |
780 |
List<ApprovalMaster> getList = new List<ApprovalMaster>(); |
781 |
if (!InDB.SelectAction(strSQL, ref getList)) return false; |
782 |
|
783 |
OutDB.connect(); OutDB.beginTran(); |
784 |
strSQL = string.Format("TRUNCATE TABLE {0}", s_OracleTables[ino].Key); |
785 |
OutDB.ExecuteNonQuery(strSQL, false); |
786 |
|
787 |
List<ApprovalMaster> BuffList = new List<ApprovalMaster>(); |
788 |
int DataCnt = 0; |
789 |
while (DataCnt < getList.Count) |
790 |
{ |
791 |
BuffList.Clear(); |
792 |
|
793 |
for (int ii = 0; ii < s_LoopCount; ii++, DataCnt++) |
794 |
{ |
795 |
if (DataCnt >= getList.Count) break; |
796 |
|
797 |
BuffList.Add(getList[DataCnt]); |
798 |
} |
799 |
|
800 |
if (!OutDB.InsertAction(BuffList, false)) |
801 |
{ |
802 |
OutDB.rollback(); |
803 |
strMsg += " DB処理異常"; |
804 |
return false; |
805 |
} |
806 |
} |
807 |
|
808 |
strMsg += string.Format(" 処理件数={0}", DataCnt.ToString("#,0")); |
809 |
|
810 |
return true; |
811 |
} |
812 |
catch (Exception ex) |
813 |
{ |
814 |
OutDB.rollback(); |
815 |
|
816 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
817 |
strMsg += string.Format(" システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
818 |
return false; |
819 |
} |
820 |
finally |
821 |
{ |
822 |
InDB.close(); InDB = null; |
823 |
OutDB.commit(); |
824 |
OutDB.close(); OutDB = null; |
825 |
} |
826 |
} |
827 |
#endregion |
828 |
|
829 |
#region 出勤日報データ(Attendancedailydata) |
830 |
/// <summary> |
831 |
/// 出勤日報データ(Attendancedailydata) |
832 |
/// </summary> |
833 |
/// <returns></returns> |
834 |
private bool CnvAttendancedailydata(int ino, ref string strMsg) |
835 |
{ |
836 |
ProcessManagement.OracleDB.IOAccess.IOAttendanceDailyData InDB = new ProcessManagement.OracleDB.IOAccess.IOAttendanceDailyData(); |
837 |
ProcessManagement.DB.IOAccess.IOAttendanceDailyData OutDB = new ProcessManagement.DB.IOAccess.IOAttendanceDailyData(); |
838 |
strMsg = string.Format("№{0}:テーブル:{1}({2})", (ino + 1).ToString("00"), s_OracleTables[ino].Value, s_OracleTables[ino].Key); |
839 |
try |
840 |
{ |
841 |
EditDspLength(ref strMsg); |
842 |
|
843 |
string strSQL = CreateOrder(s_OracleTables[ino].Key); |
844 |
List<AttendanceDailyData> getList = new List<AttendanceDailyData>(); |
845 |
if (!InDB.SelectAction(strSQL, ref getList)) return false; |
846 |
|
847 |
OutDB.connect(); OutDB.beginTran(); |
848 |
strSQL = string.Format("TRUNCATE TABLE {0}", s_OracleTables[ino].Key); |
849 |
OutDB.ExecuteNonQuery(strSQL, false); |
850 |
|
851 |
List<AttendanceDailyData> BuffList = new List<AttendanceDailyData>(); |
852 |
int DataCnt = 0; |
853 |
while (DataCnt < getList.Count) |
854 |
{ |
855 |
BuffList.Clear(); |
856 |
|
857 |
for (int ii = 0; ii < s_LoopCount; ii++, DataCnt++) |
858 |
{ |
859 |
if (DataCnt >= getList.Count) break; |
860 |
|
861 |
BuffList.Add(getList[DataCnt]); |
862 |
} |
863 |
|
864 |
if (!OutDB.InsertAction(BuffList, false)) |
865 |
{ |
866 |
OutDB.rollback(); |
867 |
strMsg += " DB処理異常"; |
868 |
return false; |
869 |
} |
870 |
} |
871 |
|
872 |
strMsg += string.Format(" 処理件数={0}", DataCnt.ToString("#,0")); |
873 |
|
874 |
return true; |
875 |
} |
876 |
catch (Exception ex) |
877 |
{ |
878 |
OutDB.rollback(); |
879 |
|
880 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
881 |
strMsg += string.Format(" システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
882 |
return false; |
883 |
} |
884 |
finally |
885 |
{ |
886 |
InDB.close(); InDB = null; |
887 |
OutDB.commit(); |
888 |
OutDB.close(); OutDB = null; |
889 |
} |
890 |
} |
891 |
#endregion |
892 |
|
893 |
#region 出勤管理データ(Attendancedata) |
894 |
/// <summary> |
895 |
/// 出勤管理データ(Attendancedata) |
896 |
/// </summary> |
897 |
/// <param name="strMsg"></param> |
898 |
/// <returns></returns> |
899 |
private bool CnvAttendancedata(int ino, ref string strMsg) |
900 |
{ |
901 |
ProcessManagement.OracleDB.IOAccess.IOAttendanceData InDB = new ProcessManagement.OracleDB.IOAccess.IOAttendanceData(); |
902 |
ProcessManagement.DB.IOAccess.IOAttendanceData OutDB = new ProcessManagement.DB.IOAccess.IOAttendanceData(); |
903 |
strMsg = string.Format("№{0}:テーブル:{1}({2})", (ino + 1).ToString("00"), s_OracleTables[ino].Value, s_OracleTables[ino].Key); |
904 |
try |
905 |
{ |
906 |
EditDspLength(ref strMsg); |
907 |
|
908 |
string strSQL = CreateOrder(s_OracleTables[ino].Key); |
909 |
List<AttendanceData> getList = new List<AttendanceData>(); |
910 |
if (!InDB.SelectAction(strSQL, ref getList)) return false; |
911 |
|
912 |
OutDB.connect(); OutDB.beginTran(); |
913 |
strSQL = string.Format("TRUNCATE TABLE {0}", s_OracleTables[ino].Key); |
914 |
OutDB.ExecuteNonQuery(strSQL, false); |
915 |
|
916 |
List<AttendanceData> BuffList = new List<AttendanceData>(); |
917 |
int DataCnt = 0; |
918 |
while (DataCnt < getList.Count) |
919 |
{ |
920 |
BuffList.Clear(); |
921 |
|
922 |
for (int ii = 0; ii < s_LoopCount; ii++, DataCnt++) |
923 |
{ |
924 |
if (DataCnt >= getList.Count) break; |
925 |
|
926 |
BuffList.Add(getList[DataCnt]); |
927 |
} |
928 |
|
929 |
if (!OutDB.InsertAction(BuffList, false)) |
930 |
{ |
931 |
OutDB.rollback(); |
932 |
strMsg += " DB処理異常"; |
933 |
return false; |
934 |
} |
935 |
} |
936 |
|
937 |
strMsg += string.Format(" 処理件数={0}", DataCnt.ToString("#,0")); |
938 |
|
939 |
return true; |
940 |
} |
941 |
catch (Exception ex) |
942 |
{ |
943 |
OutDB.rollback(); |
944 |
|
945 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
946 |
strMsg += string.Format(" システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
947 |
return false; |
948 |
} |
949 |
finally |
950 |
{ |
951 |
InDB.close(); InDB = null; |
952 |
OutDB.commit(); |
953 |
OutDB.close(); OutDB = null; |
954 |
} |
955 |
} |
956 |
#endregion |
957 |
|
958 |
#region 工事詳細台帳データ【退避用】(bk_constructionledger) |
959 |
/// <summary> |
960 |
/// 工事詳細台帳データ【退避用】(bk_constructionledger) |
961 |
/// </summary> |
962 |
/// <param name="strMsg"></param> |
963 |
private bool CnvBk_constructionledger(int ino, ref string strMsg) |
964 |
{ |
965 |
ProcessManagement.OracleDB.IOAccess.IOConstructionLedger InDB = new ProcessManagement.OracleDB.IOAccess.IOConstructionLedger(); |
966 |
ProcessManagement.DB.IOAccess.IOConstructionLedger OutDB = new ProcessManagement.DB.IOAccess.IOConstructionLedger(); |
967 |
strMsg = string.Format("№{0}:テーブル:{1}({2})", (ino + 1).ToString("00"), s_OracleTables[ino].Value, s_OracleTables[ino].Key); |
968 |
try |
969 |
{ |
970 |
EditDspLength(ref strMsg); |
971 |
|
972 |
string strSQL = "SELECT"; |
973 |
strSQL += " ConstructionCode"; // 工事番号 |
974 |
strSQL += " ,ConstructionPeriod"; // 事業期 |
975 |
strSQL += " ,CreatorCode"; // 作成者コード |
976 |
strSQL += " ,CreatorName"; // 作成者名 |
977 |
strSQL += " ,CreateDate"; // 作成日 |
978 |
strSQL += " ,ConstructionTimes"; // 工期(単位・月) |
979 |
strSQL += " ,TO_CHAR(ConstructionStart, 'YYYY/MM/DD')"; // 契約工期開始 |
980 |
strSQL += " ,TO_CHAR(ConstructionEnd, 'YYYY/MM/DD')"; // 契約工期完了 |
981 |
strSQL += " ,OrdersDecisionPrice"; // 税抜受注決定金額 |
982 |
strSQL += " ,CompanyExpenses"; // 会社経費合計 |
983 |
strSQL += " ,DepartmentExpenses"; // 部署経費合計 |
984 |
strSQL += " ,SalesExpenses"; // 営業経費合計 |
985 |
strSQL += " ,TotalPayment"; // 総支払額 |
986 |
strSQL += " ,GrossProfit"; // 粗利 |
987 |
strSQL += " ,Allowance"; // 給与 |
988 |
strSQL += " ,NetProfit"; // 純利益 |
989 |
strSQL += " ,ComplateFlg"; // 入力完了フラグ |
990 |
strSQL += " ,IntegrationFlg"; // 受注金額積算フラグ |
991 |
strSQL += ", TO_CHAR(EntryDate, 'YYYY/MM/DD HH24:MI:ss')"; |
992 |
strSQL += ", TO_CHAR(UpdateDate, 'YYYY/MM/DD HH24:MI:ss')"; |
993 |
strSQL += string.Format(" FROM {0}", s_OracleTables[ino].Key); |
994 |
strSQL += string.Format(CreateOrder(s_OracleTables[ino].Key)); |
995 |
strSQL += CreateOrder(s_OracleTables[ino].Key); |
996 |
ArrayList getList = new ArrayList(); |
997 |
if (!InDB.ExecuteReader(strSQL, ref getList)) return false; |
998 |
|
999 |
OutDB.connect(); OutDB.beginTran(); |
1000 |
strSQL = string.Format("TRUNCATE TABLE {0}", s_OracleTables[ino].Key); |
1001 |
OutDB.ExecuteNonQuery(strSQL, false); |
1002 |
|
1003 |
int DataCnt = 0; |
1004 |
bool bColFirst = true; |
1005 |
bool bDataFirst = true; |
1006 |
ConstructionLedger work = new ConstructionLedger(); |
1007 |
|
1008 |
while (DataCnt < getList.Count) |
1009 |
{ |
1010 |
bColFirst = true; |
1011 |
strSQL = string.Format("INSERT INTO {0}", s_OracleTables[ino].Key); |
1012 |
strSQL += " ("; |
1013 |
foreach (var gender in Enum.GetValues(typeof(ProcessManagement.DB.IOAccess.IOConstructionLedger.TableColumn))) |
1014 |
{ |
1015 |
if (!bColFirst) strSQL += ", "; |
1016 |
strSQL += gender.ToString(); |
1017 |
bColFirst = false; |
1018 |
} |
1019 |
strSQL += ") VALUES"; |
1020 |
|
1021 |
bDataFirst = true; |
1022 |
for (int i = 0; i < s_LoopCount; i++, DataCnt++) |
1023 |
{ |
1024 |
if (DataCnt >= getList.Count) break; |
1025 |
|
1026 |
object[] CurRec = (object[])getList[DataCnt]; |
1027 |
|
1028 |
if (bDataFirst) strSQL += " ("; |
1029 |
else strSQL += ", ("; |
1030 |
|
1031 |
work.ConstructionCode = CommonMotions.ObjectToInt(CurRec, (int)ProcessManagement.DB.IOAccess.IOConstructionLedger.TableColumn.ConstructionCode); |
1032 |
strSQL += string.Format(" {0}", work.ConstructionCode); // 工事番号 |
1033 |
|
1034 |
work.ConstructionPeriod = CommonMotions.ObjectToInt(CurRec, (int)ProcessManagement.DB.IOAccess.IOConstructionLedger.TableColumn.ConstructionPeriod); |
1035 |
strSQL += string.Format(", {0}", work.ConstructionPeriod); // 事業期 |
1036 |
|
1037 |
work.CreatorCode = CommonMotions.ObjectToInt(CurRec, (int)ProcessManagement.DB.IOAccess.IOConstructionLedger.TableColumn.CreatorCode); |
1038 |
strSQL += string.Format(", {0}", work.CreatorCode); // 作成者コード |
1039 |
|
1040 |
work.CreatorName = CommonMotions.ObjectToString(CurRec, (int)ProcessManagement.DB.IOAccess.IOConstructionLedger.TableColumn.CreatorName); |
1041 |
strSQL += string.Format(",'{0}'", work.CreatorName); // 作成者名 |
1042 |
|
1043 |
work.CreateDate = CommonMotions.ObjectToDateTime(CurRec, (int)ProcessManagement.DB.IOAccess.IOConstructionLedger.TableColumn.CreateDate); |
1044 |
strSQL += string.Format(", STR_TO_DATE('{0}','%Y/%m/%d')", work.CreateDate.ToShortDateString()); // 作成日 |
1045 |
|
1046 |
work.ConstructionTimes = CommonMotions.ObjectToDouble(CurRec, (int)ProcessManagement.DB.IOAccess.IOConstructionLedger.TableColumn.ConstructionTimes); |
1047 |
strSQL += string.Format(", {0}", work.ConstructionTimes); // 工期(単位・月) |
1048 |
|
1049 |
work.ConstructionStart = CommonMotions.ObjectToDateTime(CurRec, (int)ProcessManagement.DB.IOAccess.IOConstructionLedger.TableColumn.ConstructionStart); |
1050 |
strSQL += string.Format(", STR_TO_DATE('{0}','%Y/%m/%d')", work.ConstructionStart.ToShortDateString()); // 契約工期開始 |
1051 |
|
1052 |
work.ConstructionEnd = CommonMotions.ObjectToDateTime(CurRec, (int)ProcessManagement.DB.IOAccess.IOConstructionLedger.TableColumn.ConstructionEnd); |
1053 |
strSQL += string.Format(", STR_TO_DATE('{0}','%Y/%m/%d')", work.ConstructionEnd.ToShortDateString()); // 契約工期完了 |
1054 |
|
1055 |
work.OrdersDecisionPrice = CommonMotions.ObjectToDouble(CurRec, (int)ProcessManagement.DB.IOAccess.IOConstructionLedger.TableColumn.OrdersDecisionPrice); |
1056 |
strSQL += string.Format(",{0}", work.OrdersDecisionPrice); // 税抜受注決定金額 |
1057 |
|
1058 |
work.CompanyExpenses = CommonMotions.ObjectToDouble(CurRec, (int)ProcessManagement.DB.IOAccess.IOConstructionLedger.TableColumn.CompanyExpenses); |
1059 |
strSQL += string.Format(",{0}", work.CompanyExpenses); // 会社経費合計 |
1060 |
|
1061 |
work.DepartmentExpenses = CommonMotions.ObjectToDouble(CurRec, (int)ProcessManagement.DB.IOAccess.IOConstructionLedger.TableColumn.DepartmentExpenses); |
1062 |
strSQL += string.Format(",{0}", work.DepartmentExpenses); // 部署経費合計 |
1063 |
|
1064 |
work.SalesExpenses = CommonMotions.ObjectToDouble(CurRec, (int)ProcessManagement.DB.IOAccess.IOConstructionLedger.TableColumn.SalesExpenses); |
1065 |
strSQL += string.Format(",{0}", work.SalesExpenses); // 営業経費合計 |
1066 |
|
1067 |
work.TotalPayment = CommonMotions.ObjectToDouble(CurRec, (int)ProcessManagement.DB.IOAccess.IOConstructionLedger.TableColumn.TotalPayment); |
1068 |
strSQL += string.Format(",{0}", work.TotalPayment); // 総支払額 |
1069 |
|
1070 |
work.GrossProfit = CommonMotions.ObjectToDouble(CurRec, (int)ProcessManagement.DB.IOAccess.IOConstructionLedger.TableColumn.GrossProfit); |
1071 |
strSQL += string.Format(",{0}", work.GrossProfit); // 粗利 |
1072 |
|
1073 |
work.Allowance = CommonMotions.ObjectToDouble(CurRec, (int)ProcessManagement.DB.IOAccess.IOConstructionLedger.TableColumn.Allowance); |
1074 |
strSQL += string.Format(",{0}", work.Allowance); // 給与 |
1075 |
|
1076 |
work.NetProfit = CommonMotions.ObjectToDouble(CurRec, (int)ProcessManagement.DB.IOAccess.IOConstructionLedger.TableColumn.NetProfit); |
1077 |
strSQL += string.Format(",{0}", work.NetProfit); // 純利益 |
1078 |
|
1079 |
work.ComplateFlg = CommonMotions.ObjectToInt(CurRec, (int)ProcessManagement.DB.IOAccess.IOConstructionLedger.TableColumn.ComplateFlg); |
1080 |
strSQL += string.Format(",{0}", work.ComplateFlg); // 入力完了フラグ |
1081 |
|
1082 |
work.IntegrationFlg = CommonMotions.ObjectToInt(CurRec, (int)ProcessManagement.DB.IOAccess.IOConstructionLedger.TableColumn.IntegrationFlg); |
1083 |
strSQL += string.Format(",{0}", work.IntegrationFlg); // 受注金額積算フラグ |
1084 |
|
1085 |
work.EntryDate = CommonMotions.ObjectToDateTime(CurRec, (int)ProcessManagement.DB.IOAccess.IOConstructionLedger.TableColumn.EntryDate); |
1086 |
strSQL += string.Format(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.EntryDate); |
1087 |
|
1088 |
work.UpdateDate = CommonMotions.ObjectToDateTime(CurRec, (int)ProcessManagement.DB.IOAccess.IOConstructionLedger.TableColumn.UpdateDate); |
1089 |
strSQL += string.Format(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.UpdateDate); |
1090 |
|
1091 |
strSQL += ")"; |
1092 |
|
1093 |
bDataFirst = false; |
1094 |
} |
1095 |
|
1096 |
if (!OutDB.ExecuteNonQuery(strSQL, false)) |
1097 |
{ |
1098 |
OutDB.rollback(); |
1099 |
strMsg += " DB処理異常"; |
1100 |
return false; |
1101 |
} |
1102 |
} |
1103 |
strMsg += string.Format(" 処理件数={0}", DataCnt.ToString("#,0")); |
1104 |
|
1105 |
return true; |
1106 |
} |
1107 |
catch (Exception ex) |
1108 |
{ |
1109 |
OutDB.rollback(); |
1110 |
|
1111 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
1112 |
strMsg += string.Format(" システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
1113 |
return false; |
1114 |
} |
1115 |
finally |
1116 |
{ |
1117 |
InDB.close(); InDB = null; |
1118 |
OutDB.commit(); |
1119 |
OutDB.close(); OutDB = null; |
1120 |
} |
1121 |
} |
1122 |
#endregion |
1123 |
|
1124 |
#region 工事詳細台帳明細データ【退避用】(Bk_constructionledgerdetail) |
1125 |
/// <summary> |
1126 |
/// 工事詳細台帳明細データ【退避用】(Bk_constructionledgerdetail) |
1127 |
/// </summary> |
1128 |
/// <param name="strMsg"></param> |
1129 |
/// <returns></returns> |
1130 |
private bool CnvBk_constructionledgerdetail(int ino, ref string strMsg) |
1131 |
{ |
1132 |
ProcessManagement.OracleDB.IOAccess.IOConstructionLedgerDetail InDB = new ProcessManagement.OracleDB.IOAccess.IOConstructionLedgerDetail(); |
1133 |
ProcessManagement.DB.IOAccess.IOConstructionLedgerDetail OutDB = new ProcessManagement.DB.IOAccess.IOConstructionLedgerDetail(); |
1134 |
strMsg = string.Format("№{0}:テーブル:{1}({2})", (ino + 1).ToString("00"), s_OracleTables[ino].Value, s_OracleTables[ino].Key); |
1135 |
try |
1136 |
{ |
1137 |
EditDspLength(ref strMsg); |
1138 |
|
1139 |
string strSQL = "SELECT"; |
1140 |
strSQL += " ConstructionCode"; // 工事コード |
1141 |
strSQL += ", GroupCount"; // グループ番号 |
1142 |
strSQL += ", LineCount"; // 行番号 |
1143 |
strSQL += ", ComponentCode"; // 構成キー |
1144 |
strSQL += ", ItemCode"; // 工種キー |
1145 |
strSQL += ", FirstString"; // 項目名称 |
1146 |
strSQL += ", SecondString"; // 工事内容 |
1147 |
strSQL += ", CompanyType"; // 協力会社コードタイプ |
1148 |
strSQL += ", CompanyCode"; // 協力会社コード |
1149 |
strSQL += ", CompanyName"; // 協力会社名称 |
1150 |
strSQL += ", EstimatePrice"; // 予算(見積)金額 |
1151 |
strSQL += ", ExecutionAmount"; // 実行金額 |
1152 |
strSQL += ", AmountConfigRate"; // 金額構成率 |
1153 |
strSQL += ", PaymentBurden"; // 支払補填額 |
1154 |
strSQL += ", FixDataFlg"; // 固定データフラグ |
1155 |
strSQL += ", IndependentFlg"; // 独立データフラグ |
1156 |
strSQL += ", FluctuationFlg"; // 増減データフラグ |
1157 |
strSQL += ", SalaryFlg"; // 給与振分区分 |
1158 |
strSQL += ", SalaryDays"; // 給与振分日数 |
1159 |
strSQL += ", OperatingFlg"; // 担当中フラグ |
1160 |
strSQL += ", SourceCode"; // 元工事番号 |
1161 |
strSQL += ", JoinTitleFlg"; // 工事名称タイトル |
1162 |
strSQL += ", SalaryOnRegist"; // 登録時月額給与 |
1163 |
strSQL += ", PurchaseOrderFlg"; // 注文書発行フラグ |
1164 |
strSQL += ", TO_CHAR(EntryDate, 'YYYY/MM/DD HH24:MI:ss')"; |
1165 |
strSQL += ", TO_CHAR(UpdateDate, 'YYYY/MM/DD HH24:MI:ss')"; |
1166 |
strSQL += string.Format(" FROM {0}", s_OracleTables[ino].Key); |
1167 |
strSQL += string.Format(CreateOrder(s_OracleTables[ino].Key)); |
1168 |
strSQL += CreateOrder(s_OracleTables[ino].Key); |
1169 |
ArrayList getList = new ArrayList(); |
1170 |
if (!InDB.ExecuteReader(strSQL, ref getList)) return false; |
1171 |
|
1172 |
OutDB.connect(); OutDB.beginTran(); |
1173 |
strSQL = string.Format("TRUNCATE TABLE {0}", s_OracleTables[ino].Key); |
1174 |
OutDB.ExecuteNonQuery(strSQL, false); |
1175 |
|
1176 |
int DataCnt = 0; |
1177 |
bool bColFirst = true; |
1178 |
bool bDataFirst = true; |
1179 |
ConstructionLedgerDetail work = new ConstructionLedgerDetail(); |
1180 |
|
1181 |
while (DataCnt < getList.Count) |
1182 |
{ |
1183 |
bColFirst = true; |
1184 |
strSQL = string.Format("INSERT INTO {0}", s_OracleTables[ino].Key); |
1185 |
strSQL += " ("; |
1186 |
foreach (var gender in Enum.GetValues(typeof(ProcessManagement.DB.IOAccess.IOConstructionLedgerDetail.TableColumn))) |
1187 |
{ |
1188 |
if (!bColFirst) strSQL += ", "; |
1189 |
strSQL += gender.ToString(); |
1190 |
bColFirst = false; |
1191 |
} |
1192 |
strSQL += ") VALUES"; |
1193 |
|
1194 |
bDataFirst = true; |
1195 |
for (int i = 0; i < s_LoopCount; i++, DataCnt++) |
1196 |
{ |
1197 |
if (DataCnt >= getList.Count) break; |
1198 |
|
1199 |
object[] CurRec = (object[])getList[DataCnt]; |
1200 |
|
1201 |
if (bDataFirst) strSQL += " ("; |
1202 |
else strSQL += ", ("; |
1203 |
|
1204 |
work.ConstructionCode = CommonMotions.ObjectToInt(CurRec, (int)ProcessManagement.OracleDB.IOAccess.IOConstructionLedgerDetail.TableColumn.ConstructionCode); |
1205 |
strSQL += string.Format(" {0}", work.ConstructionCode); // 工事番号 |
1206 |
|
1207 |
work.GroupCount = CommonMotions.ObjectToInt(CurRec, (int)ProcessManagement.OracleDB.IOAccess.IOConstructionLedgerDetail.TableColumn.GroupCount); |
1208 |
strSQL += string.Format(", {0}", work.GroupCount); // グループ番号 |
1209 |
|
1210 |
work.LineCount = CommonMotions.ObjectToInt(CurRec, (int)ProcessManagement.OracleDB.IOAccess.IOConstructionLedgerDetail.TableColumn.LineCount); |
1211 |
strSQL += string.Format(", {0}", work.LineCount); // 行番号 |
1212 |
|
1213 |
work.ComponentCode = CommonMotions.ObjectToInt(CurRec, (int)ProcessManagement.OracleDB.IOAccess.IOConstructionLedgerDetail.TableColumn.ComponentCode); |
1214 |
strSQL += string.Format(", {0}", work.ComponentCode); // 構成キー |
1215 |
|
1216 |
work.ItemCode = CommonMotions.ObjectToInt(CurRec, (int)ProcessManagement.OracleDB.IOAccess.IOConstructionLedgerDetail.TableColumn.ItemCode); |
1217 |
strSQL += string.Format(", {0}", work.ItemCode); // 工種キー |
1218 |
|
1219 |
work.FirstString = CommonMotions.ObjectToString(CurRec, (int)ProcessManagement.OracleDB.IOAccess.IOConstructionLedgerDetail.TableColumn.FirstString); |
1220 |
strSQL += string.Format(",'{0}'", work.FirstString); // 項目名称 |
1221 |
|
1222 |
work.SecondString = CommonMotions.ObjectToString(CurRec, (int)ProcessManagement.OracleDB.IOAccess.IOConstructionLedgerDetail.TableColumn.SecondString); |
1223 |
strSQL += string.Format(",'{0}'", work.SecondString); // 工事内容 |
1224 |
|
1225 |
work.CompanyType = CommonMotions.ObjectToInt(CurRec, (int)ProcessManagement.OracleDB.IOAccess.IOConstructionLedgerDetail.TableColumn.CompanyType); |
1226 |
strSQL += string.Format(", {0}", work.CompanyType); // 協力会社コードタイプ |
1227 |
|
1228 |
work.CompanyCode = CommonMotions.ObjectToInt(CurRec, (int)ProcessManagement.OracleDB.IOAccess.IOConstructionLedgerDetail.TableColumn.CompanyCode); |
1229 |
strSQL += string.Format(", {0}", work.CompanyCode); // 協力会社コード |
1230 |
|
1231 |
work.CompanyName = CommonMotions.ObjectToString(CurRec, (int)ProcessManagement.OracleDB.IOAccess.IOConstructionLedgerDetail.TableColumn.CompanyName); |
1232 |
strSQL += string.Format(",'{0}'", work.CompanyName); // 協力会社名称 |
1233 |
|
1234 |
work.EstimatePrice = CommonMotions.ObjectToDouble(CurRec, (int)ProcessManagement.OracleDB.IOAccess.IOConstructionLedgerDetail.TableColumn.EstimatePrice); |
1235 |
strSQL += string.Format(", {0}", work.EstimatePrice); // 予算(見積)金額 |
1236 |
|
1237 |
work.ExecutionAmount = CommonMotions.ObjectToDouble(CurRec, (int)ProcessManagement.OracleDB.IOAccess.IOConstructionLedgerDetail.TableColumn.ExecutionAmount); |
1238 |
strSQL += string.Format(", {0}", work.ExecutionAmount); // 実行金額 |
1239 |
|
1240 |
work.AmountConfigRate = CommonMotions.ObjectToDouble(CurRec, (int)ProcessManagement.OracleDB.IOAccess.IOConstructionLedgerDetail.TableColumn.AmountConfigRate); |
1241 |
strSQL += string.Format(", {0}", work.AmountConfigRate); // 金額構成率 |
1242 |
|
1243 |
work.PaymentBurden = CommonMotions.ObjectToDouble(CurRec, (int)ProcessManagement.OracleDB.IOAccess.IOConstructionLedgerDetail.TableColumn.PaymentBurden); |
1244 |
strSQL += string.Format(", {0}", work.PaymentBurden); // 支払補填額 |
1245 |
|
1246 |
work.FixDataFlg = CommonMotions.ObjectToInt(CurRec, (int)ProcessManagement.OracleDB.IOAccess.IOConstructionLedgerDetail.TableColumn.FixDataFlg); |
1247 |
strSQL += string.Format(", {0}", work.FixDataFlg); // 固定データフラグ |
1248 |
|
1249 |
work.IndependentFlg = CommonMotions.ObjectToInt(CurRec, (int)ProcessManagement.OracleDB.IOAccess.IOConstructionLedgerDetail.TableColumn.IndependentFlg); |
1250 |
strSQL += string.Format(", {0}", work.IndependentFlg); // 独立データフラグ |
1251 |
|
1252 |
work.FluctuationFlg = CommonMotions.ObjectToInt(CurRec, (int)ProcessManagement.OracleDB.IOAccess.IOConstructionLedgerDetail.TableColumn.FluctuationFlg); |
1253 |
strSQL += string.Format(", {0}", work.FluctuationFlg); // 増減データフラグ |
1254 |
|
1255 |
work.SalaryFlg = CommonMotions.ObjectToInt(CurRec, (int)ProcessManagement.OracleDB.IOAccess.IOConstructionLedgerDetail.TableColumn.SalaryFlg); |
1256 |
strSQL += string.Format(", {0}", work.SalaryFlg); // 給与振分区分 |
1257 |
|
1258 |
work.SalaryDays = CommonMotions.ObjectToInt(CurRec, (int)ProcessManagement.OracleDB.IOAccess.IOConstructionLedgerDetail.TableColumn.SalaryDays); |
1259 |
strSQL += string.Format(", {0}", work.SalaryDays); // 給与振分日数 |
1260 |
|
1261 |
work.OperatingFlg = CommonMotions.ObjectToInt(CurRec, (int)ProcessManagement.OracleDB.IOAccess.IOConstructionLedgerDetail.TableColumn.OperatingFlg); |
1262 |
strSQL += string.Format(", {0}", work.OperatingFlg); // 担当中フラグ |
1263 |
|
1264 |
work.SourceCode = CommonMotions.ObjectToInt(CurRec, (int)ProcessManagement.OracleDB.IOAccess.IOConstructionLedgerDetail.TableColumn.SourceCode); |
1265 |
strSQL += string.Format(", {0}", work.SourceCode); // 元工事番号 |
1266 |
|
1267 |
work.JoinTitleFlg = CommonMotions.ObjectToInt(CurRec, (int)ProcessManagement.OracleDB.IOAccess.IOConstructionLedgerDetail.TableColumn.JoinTitleFlg); |
1268 |
strSQL += string.Format(", {0}", work.JoinTitleFlg); // 工事名称タイトル |
1269 |
|
1270 |
work.SalaryOnRegist = CommonMotions.ObjectToDouble(CurRec, (int)ProcessManagement.OracleDB.IOAccess.IOConstructionLedgerDetail.TableColumn.SalaryOnRegist); |
1271 |
strSQL += string.Format(", {0}", work.SalaryOnRegist); // 登録時月額給与 |
1272 |
|
1273 |
work.PurchaseOrderFlg = CommonMotions.ObjectToInt(CurRec, (int)ProcessManagement.OracleDB.IOAccess.IOConstructionLedgerDetail.TableColumn.PurchaseOrderFlg); |
1274 |
strSQL += string.Format(", {0}", work.PurchaseOrderFlg); // 注文書発行フラグ |
1275 |
|
1276 |
work.EntryDate = CommonMotions.ObjectToDateTime(CurRec, (int)ProcessManagement.OracleDB.IOAccess.IOConstructionLedgerDetail.TableColumn.EntryDate); |
1277 |
strSQL += string.Format(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.EntryDate); |
1278 |
|
1279 |
work.UpdateDate = CommonMotions.ObjectToDateTime(CurRec, (int)ProcessManagement.OracleDB.IOAccess.IOConstructionLedgerDetail.TableColumn.UpdateDate); |
1280 |
strSQL += string.Format(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.UpdateDate); |
1281 |
|
1282 |
strSQL += ")"; |
1283 |
|
1284 |
bDataFirst = false; |
1285 |
} |
1286 |
|
1287 |
if (!OutDB.ExecuteNonQuery(strSQL, false)) |
1288 |
{ |
1289 |
OutDB.rollback(); |
1290 |
strMsg += " DB処理異常"; |
1291 |
return false; |
1292 |
} |
1293 |
} |
1294 |
strMsg += string.Format(" 処理件数={0}", DataCnt.ToString("#,0")); |
1295 |
|
1296 |
return true; |
1297 |
} |
1298 |
catch (Exception ex) |
1299 |
{ |
1300 |
OutDB.rollback(); |
1301 |
|
1302 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
1303 |
strMsg += string.Format(" システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
1304 |
return false; |
1305 |
} |
1306 |
finally |
1307 |
{ |
1308 |
InDB.close(); InDB = null; |
1309 |
OutDB.commit(); |
1310 |
OutDB.close(); OutDB = null; |
1311 |
} |
1312 |
} |
1313 |
#endregion |
1314 |
|
1315 |
#region 工事詳細台帳実行データ【退避用】(Bk_constructionledgerexcute) |
1316 |
/// <summary> |
1317 |
/// 工事詳細台帳実行データ【退避用】(Bk_constructionledgerexcute) |
1318 |
/// </summary> |
1319 |
/// <param name="strMsg"></param> |
1320 |
/// <returns></returns> |
1321 |
private bool CnvBk_constructionledgerexcute(int ino, ref string strMsg) |
1322 |
{ |
1323 |
ProcessManagement.OracleDB.IOAccess.IOConstructionLedgerExcute InDB = new ProcessManagement.OracleDB.IOAccess.IOConstructionLedgerExcute(); |
1324 |
ProcessManagement.DB.IOAccess.IOConstructionLedgerExcute OutDB = new ProcessManagement.DB.IOAccess.IOConstructionLedgerExcute(); |
1325 |
strMsg = string.Format("№{0}:テーブル:{1}({2})", (ino + 1).ToString("00"), s_OracleTables[ino].Value, s_OracleTables[ino].Key); |
1326 |
try |
1327 |
{ |
1328 |
EditDspLength(ref strMsg); |
1329 |
|
1330 |
string strSQL = "SELECT"; |
1331 |
strSQL += " ConstructionCode"; // 工事コード |
1332 |
strSQL += ", GroupCount"; // グループ番号 |
1333 |
strSQL += ", LineCount"; // 行番号 |
1334 |
strSQL += ", ColumnCount"; // 列番号 |
1335 |
strSQL += ", PaymentAmount"; // 支払金額 |
1336 |
strSQL += ", TO_CHAR(TargetMonth, 'YYYY/MM/DD HH24:MI:ss')"; // 対象年月 |
1337 |
strSQL += ", TO_CHAR(EntryDate, 'YYYY/MM/DD HH24:MI:ss')"; |
1338 |
strSQL += ", TO_CHAR(UpdateDate, 'YYYY/MM/DD HH24:MI:ss')"; |
1339 |
strSQL += string.Format(" FROM {0}", s_OracleTables[ino].Key); |
1340 |
strSQL += string.Format(CreateOrder(s_OracleTables[ino].Key)); |
1341 |
strSQL += CreateOrder(s_OracleTables[ino].Key); |
1342 |
ArrayList getList = new ArrayList(); |
1343 |
if (!InDB.ExecuteReader(strSQL, ref getList)) return false; |
1344 |
|
1345 |
OutDB.connect(); OutDB.beginTran(); |
1346 |
strSQL = string.Format("TRUNCATE TABLE {0}", s_OracleTables[ino].Key); |
1347 |
OutDB.ExecuteNonQuery(strSQL, false); |
1348 |
|
1349 |
int DataCnt = 0; |
1350 |
bool bColFirst = true; |
1351 |
bool bDataFirst = true; |
1352 |
ConstructionLedgerExcute work = new ConstructionLedgerExcute(); |
1353 |
|
1354 |
while (DataCnt < getList.Count) |
1355 |
{ |
1356 |
bColFirst = true; |
1357 |
strSQL = string.Format("INSERT INTO {0}", s_OracleTables[ino].Key); |
1358 |
strSQL += " ("; |
1359 |
foreach (var gender in Enum.GetValues(typeof(ProcessManagement.DB.IOAccess.IOConstructionLedgerExcute.TableColumn))) |
1360 |
{ |
1361 |
if (!bColFirst) strSQL += ", "; |
1362 |
strSQL += gender.ToString(); |
1363 |
bColFirst = false; |
1364 |
} |
1365 |
strSQL += ") VALUES"; |
1366 |
|
1367 |
bDataFirst = true; |
1368 |
for (int i = 0; i < s_LoopCount; i++, DataCnt++) |
1369 |
{ |
1370 |
if (DataCnt >= getList.Count) break; |
1371 |
|
1372 |
object[] CurRec = (object[])getList[DataCnt]; |
1373 |
|
1374 |
if (bDataFirst) strSQL += " ("; |
1375 |
else strSQL += ", ("; |
1376 |
|
1377 |
work.ConstructionCode = CommonMotions.ObjectToInt(CurRec, (int)ProcessManagement.OracleDB.IOAccess.IOConstructionLedgerExcute.TableColumn.ConstructionCode); |
1378 |
strSQL += string.Format(" {0}", work.ConstructionCode); // 工事番号 |
1379 |
|
1380 |
work.GroupCount = CommonMotions.ObjectToInt(CurRec, (int)ProcessManagement.OracleDB.IOAccess.IOConstructionLedgerExcute.TableColumn.GroupCount); |
1381 |
strSQL += string.Format(", {0}", work.GroupCount); // グループ番号 |
1382 |
|
1383 |
work.LineCount = CommonMotions.ObjectToInt(CurRec, (int)ProcessManagement.OracleDB.IOAccess.IOConstructionLedgerExcute.TableColumn.LineCount); |
1384 |
strSQL += string.Format(", {0}", work.LineCount); // 行番号 |
1385 |
|
1386 |
work.ColumnCount = CommonMotions.ObjectToInt(CurRec, (int)ProcessManagement.OracleDB.IOAccess.IOConstructionLedgerExcute.TableColumn.ColumnCount); |
1387 |
strSQL += string.Format(", {0}", work.ColumnCount); // 列番号 |
1388 |
|
1389 |
work.PaymentAmount = CommonMotions.ObjectToDouble(CurRec, (int)ProcessManagement.OracleDB.IOAccess.IOConstructionLedgerExcute.TableColumn.PaymentAmount); |
1390 |
strSQL += string.Format(", {0}", work.PaymentAmount); // 支払金額 |
1391 |
|
1392 |
work.TargetMonth = CommonMotions.ObjectToDateTime(CurRec, (int)ProcessManagement.OracleDB.IOAccess.IOConstructionLedgerExcute.TableColumn.TargetMonth); |
1393 |
strSQL += string.Format(", STR_TO_DATE('{0}','%Y/%m/%d')", work.TargetMonth.ToShortDateString()); // 対象年月 |
1394 |
|
1395 |
work.EntryDate = CommonMotions.ObjectToDateTime(CurRec, (int)ProcessManagement.OracleDB.IOAccess.IOConstructionLedgerExcute.TableColumn.EntryDate); |
1396 |
strSQL += string.Format(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.EntryDate); |
1397 |
|
1398 |
work.UpdateDate = CommonMotions.ObjectToDateTime(CurRec, (int)ProcessManagement.OracleDB.IOAccess.IOConstructionLedgerExcute.TableColumn.UpdateDate); |
1399 |
strSQL += string.Format(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.UpdateDate); |
1400 |
|
1401 |
strSQL += ")"; |
1402 |
|
1403 |
bDataFirst = false; |
1404 |
} |
1405 |
|
1406 |
if (!OutDB.ExecuteNonQuery(strSQL, false)) |
1407 |
{ |
1408 |
OutDB.rollback(); |
1409 |
strMsg += " DB処理異常"; |
1410 |
return false; |
1411 |
} |
1412 |
} |
1413 |
strMsg += string.Format(" 処理件数={0}", DataCnt.ToString("#,0")); |
1414 |
|
1415 |
return true; |
1416 |
} |
1417 |
catch (Exception ex) |
1418 |
{ |
1419 |
OutDB.rollback(); |
1420 |
|
1421 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
1422 |
strMsg += string.Format(" システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
1423 |
return false; |
1424 |
} |
1425 |
finally |
1426 |
{ |
1427 |
InDB.close(); InDB = null; |
1428 |
OutDB.commit(); |
1429 |
OutDB.close(); OutDB = null; |
1430 |
} |
1431 |
} |
1432 |
#endregion |
1433 |
|
1434 |
#region 積算見積データ【退避用】(Bk_estimatedata) |
1435 |
/// <summary> |
1436 |
/// 積算見積データ【退避用】(Bk_estimatedata) |
1437 |
/// </summary> |
1438 |
/// <param name="strMsg"></param> |
1439 |
/// <returns></returns> |
1440 |
private bool CnvBk_estimatedata(int ino, ref string strMsg) |
1441 |
{ |
1442 |
ProcessManagement.OracleDB.IOAccess.IOEstimateData InDB = new ProcessManagement.OracleDB.IOAccess.IOEstimateData(); |
1443 |
ProcessManagement.DB.IOAccess.IOEstimateData OutDB = new ProcessManagement.DB.IOAccess.IOEstimateData(); |
1444 |
strMsg = string.Format("№{0}:テーブル:{1}({2})", (ino + 1).ToString("00"), s_OracleTables[ino].Value, s_OracleTables[ino].Key); |
1445 |
try |
1446 |
{ |
1447 |
EditDspLength(ref strMsg); |
1448 |
|
1449 |
string strSQL = "SELECT"; |
1450 |
strSQL += " ConstructionCode"; // 工事番号 |
1451 |
strSQL += ", LineCount"; // 行番号 |
1452 |
strSQL += ", ComponentCode"; // 構成キー |
1453 |
strSQL += ", FixedItemCode"; // 固定項目キー |
1454 |
strSQL += ", ItemName"; // 作業名称 |
1455 |
strSQL += ", SpecName"; // 品質・形状・寸法 |
1456 |
strSQL += ", PriceValue"; // 金額 |
1457 |
strSQL += ", Note"; // 備考 |
1458 |
strSQL += ", MyExpensesFlg"; |
1459 |
strSQL += ", InputFlg"; |
1460 |
strSQL += ", TO_CHAR(EntryDate, 'YYYY/MM/DD HH24:MI:ss')"; |
1461 |
strSQL += ", TO_CHAR(UpdateDate, 'YYYY/MM/DD HH24:MI:ss')"; |
1462 |
strSQL += ", TO_CHAR(SaveDate, 'YYYY/MM/DD HH24:MI:ss')"; // 退避日付 |
1463 |
strSQL += string.Format(" FROM {0}", s_OracleTables[ino].Key); |
1464 |
strSQL += string.Format(CreateOrder(s_OracleTables[ino].Key)); |
1465 |
strSQL += CreateOrder(s_OracleTables[ino].Key); |
1466 |
ArrayList getList = new ArrayList(); |
1467 |
if (!InDB.ExecuteReader(strSQL, ref getList)) return false; |
1468 |
|
1469 |
OutDB.connect(); OutDB.beginTran(); |
1470 |
strSQL = string.Format("TRUNCATE TABLE {0}", s_OracleTables[ino].Key); |
1471 |
OutDB.ExecuteNonQuery(strSQL, false); |
1472 |
|
1473 |
int DataCnt = 0; |
1474 |
bool bColFirst = true; |
1475 |
bool bDataFirst = true; |
1476 |
EstimateData work = new EstimateData(); |
1477 |
DateTime SaveDate = DateTime.Now; |
1478 |
int TblColCnt = Enum.GetNames(typeof(ProcessManagement.OracleDB.IOAccess.IOEstimateData.TableColumn)).Length; |
1479 |
|
1480 |
while (DataCnt < getList.Count) |
1481 |
{ |
1482 |
bColFirst = true; |
1483 |
strSQL = string.Format("INSERT INTO {0}", s_OracleTables[ino].Key); |
1484 |
strSQL += " ("; |
1485 |
strSQL += "SaveDate,"; |
1486 |
foreach (var gender in Enum.GetValues(typeof(ProcessManagement.DB.IOAccess.IOEstimateData.TableColumn))) |
1487 |
{ |
1488 |
if (!bColFirst) strSQL += ", "; |
1489 |
strSQL += gender.ToString(); |
1490 |
bColFirst = false; |
1491 |
} |
1492 |
strSQL += ") VALUES"; |
1493 |
|
1494 |
bDataFirst = true; |
1495 |
for (int i = 0; i < s_LoopCount; i++, DataCnt++) |
1496 |
{ |
1497 |
if (DataCnt >= getList.Count) break; |
1498 |
|
1499 |
object[] CurRec = (object[])getList[DataCnt]; |
1500 |
|
1501 |
if (bDataFirst) strSQL += " ("; |
1502 |
else strSQL += ", ("; |
1503 |
|
1504 |
SaveDate = CommonMotions.ObjectToDateTime(CurRec, TblColCnt); |
1505 |
strSQL += string.Format(" STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", SaveDate); // 退避日付 |
1506 |
|
1507 |
work.ConstructionCode = CommonMotions.ObjectToInt(CurRec, (int)ProcessManagement.OracleDB.IOAccess.IOEstimateData.TableColumn.ConstructionCode); |
1508 |
strSQL += string.Format(", {0}", work.ConstructionCode); // 工事番号 |
1509 |
|
1510 |
work.LineCount = CommonMotions.ObjectToInt(CurRec, (int)ProcessManagement.OracleDB.IOAccess.IOEstimateData.TableColumn.LineCount); |
1511 |
strSQL += string.Format(", {0}", work.LineCount); // 行番号 |
1512 |
|
1513 |
work.ComponentCode = CommonMotions.ObjectToInt(CurRec, (int)ProcessManagement.OracleDB.IOAccess.IOEstimateData.TableColumn.ComponentCode); |
1514 |
strSQL += string.Format(", {0}", work.ComponentCode); // 構成キー |
1515 |
|
1516 |
work.FixedItemCode = CommonMotions.ObjectToString(CurRec, (int)ProcessManagement.OracleDB.IOAccess.IOEstimateData.TableColumn.FixedItemCode); |
1517 |
strSQL += string.Format(",'{0}'", work.FixedItemCode); // 固定項目キー |
1518 |
|
1519 |
work.ItemName = CommonMotions.ObjectToString(CurRec, (int)ProcessManagement.OracleDB.IOAccess.IOEstimateData.TableColumn.ItemName); |
1520 |
strSQL += string.Format(",'{0}'", work.ItemName.Replace(",", ",")); // 作業名称 |
1521 |
|
1522 |
work.SpecName = CommonMotions.ObjectToString(CurRec, (int)ProcessManagement.OracleDB.IOAccess.IOEstimateData.TableColumn.WorkName); |
1523 |
strSQL += string.Format(",'{0}'", work.SpecName.Replace(",", ",")); // 品質・形状・寸法 |
1524 |
|
1525 |
work.PriceValue = CommonMotions.ObjectToDouble(CurRec, (int)ProcessManagement.OracleDB.IOAccess.IOEstimateData.TableColumn.PriceValue); |
1526 |
strSQL += string.Format(", {0}", work.PriceValue); // 金額 |
1527 |
|
1528 |
work.Note = CommonMotions.ObjectToString(CurRec, (int)ProcessManagement.OracleDB.IOAccess.IOEstimateData.TableColumn.Note); |
1529 |
strSQL += string.Format(",'{0}'", work.Note.Replace(",", ",")); // 備考 |
1530 |
|
1531 |
work.MyExpensesFlg = CommonMotions.ObjectToInt(CurRec, (int)ProcessManagement.OracleDB.IOAccess.IOEstimateData.TableColumn.MyExpensesFlg); |
1532 |
strSQL += string.Format(", {0}", work.MyExpensesFlg); // 自社経費フラグ |
1533 |
|
1534 |
work.InputFlg = CommonMotions.ObjectToInt(CurRec, (int)ProcessManagement.OracleDB.IOAccess.IOEstimateData.TableColumn.InputFlg); |
1535 |
strSQL += string.Format(", {0}", work.InputFlg); // 入力フラグ |
1536 |
|
1537 |
work.EntryDate = CommonMotions.ObjectToDateTime(CurRec, (int)ProcessManagement.OracleDB.IOAccess.IOEstimateData.TableColumn.EntryDate); |
1538 |
strSQL += string.Format(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.EntryDate); |
1539 |
|
1540 |
work.UpdateDate = CommonMotions.ObjectToDateTime(CurRec, (int)ProcessManagement.OracleDB.IOAccess.IOEstimateData.TableColumn.UpdateDate); |
1541 |
strSQL += string.Format(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.UpdateDate); |
1542 |
|
1543 |
strSQL += ")"; |
1544 |
|
1545 |
bDataFirst = false; |
1546 |
} |
1547 |
|
1548 |
if (!OutDB.ExecuteNonQuery(strSQL, false)) |
1549 |
{ |
1550 |
OutDB.rollback(); |
1551 |
strMsg += " DB処理異常"; |
1552 |
return false; |
1553 |
} |
1554 |
} |
1555 |
strMsg += string.Format(" 処理件数={0}", DataCnt.ToString("#,0")); |
1556 |
|
1557 |
return true; |
1558 |
} |
1559 |
catch (Exception ex) |
1560 |
{ |
1561 |
OutDB.rollback(); |
1562 |
|
1563 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
1564 |
strMsg += string.Format(" システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
1565 |
return false; |
1566 |
} |
1567 |
finally |
1568 |
{ |
1569 |
InDB.close(); InDB = null; |
1570 |
OutDB.commit(); |
1571 |
OutDB.close(); OutDB = null; |
1572 |
} |
1573 |
} |
1574 |
#endregion |
1575 |
|
1576 |
#region 積算見積ページデータ【退避用】(Bk_estimatedatabody) |
1577 |
/// <summary> |
1578 |
/// 積算見積ページデータ【退避用】(Bk_estimatedatabody) |
1579 |
/// </summary> |
1580 |
/// <param name="strMsg"></param> |
1581 |
/// <returns></returns> |
1582 |
private bool CnvBk_estimatedatabody(int ino, ref string strMsg) |
1583 |
{ |
1584 |
ProcessManagement.OracleDB.IOAccess.IOEstimateDataBody InDB = new ProcessManagement.OracleDB.IOAccess.IOEstimateDataBody(); |
1585 |
ProcessManagement.DB.IOAccess.IOEstimateDataBody OutDB = new ProcessManagement.DB.IOAccess.IOEstimateDataBody(); |
1586 |
strMsg = string.Format("№{0}:テーブル:{1}({2})", (ino + 1).ToString("00"), s_OracleTables[ino].Value, s_OracleTables[ino].Key); |
1587 |
try |
1588 |
{ |
1589 |
EditDspLength(ref strMsg); |
1590 |
|
1591 |
string strSQL = "SELECT"; |
1592 |
strSQL += " ConstructionCode"; // 工事番号 |
1593 |
strSQL += ", PageCount"; // ページ番号 |
1594 |
strSQL += ", Category"; // 頁区分 |
1595 |
strSQL += ", UnionComponentCode"; // 所属構成キー |
1596 |
strSQL += ", ComponentCode"; // 構成キー |
1597 |
strSQL += ", ItemCode"; // 工種キー |
1598 |
strSQL += ", SelectComponent"; // 選択構成キー |
1599 |
strSQL += ", PageTitle"; // ページ表示名 |
1600 |
strSQL += ", DetailLineCount"; // 明細行番号 |
1601 |
strSQL += ", TO_CHAR(EntryDate, 'YYYY/MM/DD HH24:MI:ss')"; |
1602 |
strSQL += ", TO_CHAR(UpdateDate, 'YYYY/MM/DD HH24:MI:ss')"; |
1603 |
strSQL += ", TO_CHAR(SaveDate, 'YYYY/MM/DD HH24:MI:ss')"; // 退避日付 |
1604 |
strSQL += string.Format(" FROM {0}", s_OracleTables[ino].Key); |
1605 |
strSQL += string.Format(CreateOrder(s_OracleTables[ino].Key)); |
1606 |
strSQL += CreateOrder(s_OracleTables[ino].Key); |
1607 |
ArrayList getList = new ArrayList(); |
1608 |
if (!InDB.ExecuteReader(strSQL, ref getList)) return false; |
1609 |
|
1610 |
OutDB.connect(); OutDB.beginTran(); |
1611 |
strSQL = string.Format("TRUNCATE TABLE {0}", s_OracleTables[ino].Key); |
1612 |
OutDB.ExecuteNonQuery(strSQL, false); |
1613 |
|
1614 |
int DataCnt = 0; |
1615 |
bool bColFirst = true; |
1616 |
bool bDataFirst = true; |
1617 |
EstimateDataBody work = new EstimateDataBody(); |
1618 |
DateTime SaveDate = DateTime.Now; |
1619 |
int TblColCnt = Enum.GetNames(typeof(ProcessManagement.OracleDB.IOAccess.IOEstimateDataBody.TableColumn)).Length; |
1620 |
|
1621 |
while (DataCnt < getList.Count) |
1622 |
{ |
1623 |
bColFirst = true; |
1624 |
strSQL = string.Format("INSERT INTO {0}", s_OracleTables[ino].Key); |
1625 |
strSQL += " ("; |
1626 |
strSQL += "SaveDate,"; |
1627 |
foreach (var gender in Enum.GetValues(typeof(ProcessManagement.DB.IOAccess.IOEstimateDataBody.TableColumn))) |
1628 |
{ |
1629 |
if (!bColFirst) strSQL += " ,"; |
1630 |
strSQL += gender.ToString(); |
1631 |
bColFirst = false; |
1632 |
} |
1633 |
strSQL += ") VALUES"; |
1634 |
|
1635 |
bDataFirst = true; |
1636 |
for (int i = 0; i < s_LoopCount; i++, DataCnt++) |
1637 |
{ |
1638 |
if (DataCnt >= getList.Count) break; |
1639 |
|
1640 |
object[] CurRec = (object[])getList[DataCnt]; |
1641 |
|
1642 |
if (bDataFirst) strSQL += " ("; |
1643 |
else strSQL += ", ("; |
1644 |
|
1645 |
SaveDate = CommonMotions.ObjectToDateTime(CurRec, TblColCnt); |
1646 |
strSQL += string.Format(" STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", SaveDate); // 退避日付 |
1647 |
|
1648 |
work.ConstructionCode = CommonMotions.ObjectToInt(CurRec, (int)ProcessManagement.OracleDB.IOAccess.IOEstimateDataBody.TableColumn.ConstructionCode); |
1649 |
strSQL += string.Format(", {0}", work.ConstructionCode); // 工事番号 |
1650 |
|
1651 |
work.PageCount = CommonMotions.ObjectToInt(CurRec, (int)ProcessManagement.OracleDB.IOAccess.IOEstimateDataBody.TableColumn.PageCount); |
1652 |
strSQL += string.Format(", {0}", work.PageCount); // ページ番号 |
1653 |
|
1654 |
work.Category = CommonMotions.ObjectToInt(CurRec, (int)ProcessManagement.OracleDB.IOAccess.IOEstimateDataBody.TableColumn.Category); |
1655 |
strSQL += string.Format(", {0}", work.Category); // ページ区分 |
1656 |
|
1657 |
work.UnionComponentCode = CommonMotions.ObjectToInt(CurRec, (int)ProcessManagement.OracleDB.IOAccess.IOEstimateDataBody.TableColumn.UnionComponentCode); |
1658 |
strSQL += string.Format(", {0}", work.UnionComponentCode); // 所属構成キー |
1659 |
|
1660 |
work.ComponentCode = CommonMotions.ObjectToInt(CurRec, (int)ProcessManagement.OracleDB.IOAccess.IOEstimateDataBody.TableColumn.ComponentCode); |
1661 |
strSQL += string.Format(", {0}", work.ComponentCode); // 構成キー |
1662 |
|
1663 |
work.ItemCode = CommonMotions.ObjectToInt(CurRec, (int)ProcessManagement.OracleDB.IOAccess.IOEstimateDataBody.TableColumn.ItemCode); |
1664 |
strSQL += string.Format(", {0}", work.ItemCode); // 工種キー |
1665 |
|
1666 |
work.SelectComponent = CommonMotions.ObjectToInt(CurRec, (int)ProcessManagement.OracleDB.IOAccess.IOEstimateDataBody.TableColumn.SelectComponent); |
1667 |
strSQL += string.Format(", {0}", work.SelectComponent); // 選択構成キー |
1668 |
|
1669 |
work.PageTitle = CommonMotions.ObjectToString(CurRec, (int)ProcessManagement.OracleDB.IOAccess.IOEstimateDataBody.TableColumn.PageTitle); |
1670 |
strSQL += string.Format(",'{0}'", work.PageTitle); // ページ表示名 |
1671 |
|
1672 |
work.DetailLineCount = CommonMotions.ObjectToInt(CurRec, (int)ProcessManagement.OracleDB.IOAccess.IOEstimateDataBody.TableColumn.DetailLineCount); |
1673 |
strSQL += string.Format(", {0}", work.DetailLineCount); // 明細行番号 |
1674 |
|
1675 |
work.EntryDate = CommonMotions.ObjectToDateTime(CurRec, (int)ProcessManagement.OracleDB.IOAccess.IOEstimateDataBody.TableColumn.EntryDate); |
1676 |
strSQL += string.Format(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.EntryDate); |
1677 |
|
1678 |
work.UpdateDate = CommonMotions.ObjectToDateTime(CurRec, (int)ProcessManagement.OracleDB.IOAccess.IOEstimateDataBody.TableColumn.UpdateDate); |
1679 |
strSQL += string.Format(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.UpdateDate); |
1680 |
|
1681 |
strSQL += ")"; |
1682 |
|
1683 |
bDataFirst = false; |
1684 |
} |
1685 |
|
1686 |
if (!OutDB.ExecuteNonQuery(strSQL, false)) |
1687 |
{ |
1688 |
OutDB.rollback(); |
1689 |
strMsg += " DB処理異常"; |
1690 |
return false; |
1691 |
} |
1692 |
} |
1693 |
strMsg += string.Format(" 処理件数={0}", DataCnt.ToString("#,0")); |
1694 |
|
1695 |
return true; |
1696 |
} |
1697 |
catch (Exception ex) |
1698 |
{ |
1699 |
OutDB.rollback(); |
1700 |
|
1701 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
1702 |
strMsg += string.Format(" システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
1703 |
return false; |
1704 |
} |
1705 |
finally |
1706 |
{ |
1707 |
InDB.close(); InDB = null; |
1708 |
OutDB.commit(); |
1709 |
OutDB.close(); OutDB = null; |
1710 |
} |
1711 |
} |
1712 |
#endregion |
1713 |
|
1714 |
#region 積算見積データ明細【退避用】(Bk_estimatedatadetail) |
1715 |
/// <summary> |
1716 |
/// 積算見積データ明細【退避用】(Bk_estimatedatadetail) |
1717 |
/// </summary> |
1718 |
/// <param name="strMsg"></param> |
1719 |
/// <returns></returns> |
1720 |
private bool CnvBk_estimatedatadetail(int ino, ref string strMsg) |
1721 |
{ |
1722 |
ProcessManagement.OracleDB.IOAccess.IOEstimateDataDetail InDB = new ProcessManagement.OracleDB.IOAccess.IOEstimateDataDetail(); |
1723 |
ProcessManagement.DB.IOAccess.IOEstimateDataDetail OutDB = new ProcessManagement.DB.IOAccess.IOEstimateDataDetail(); |
1724 |
strMsg = string.Format("№{0}:テーブル:{1}({2})", (ino + 1).ToString("00"), s_OracleTables[ino].Value, s_OracleTables[ino].Key); |
1725 |
try |
1726 |
{ |
1727 |
EditDspLength(ref strMsg); |
1728 |
|
1729 |
string strSQL = "SELECT"; |
1730 |
strSQL += " ConstructionCode"; // 工事番号 |
1731 |
strSQL += ", PageCount"; // ページ番号 |
1732 |
strSQL += ", LineCount"; // 行番号 |
1733 |
strSQL += ", DataType"; // データイプ |
1734 |
strSQL += ", ComponentCode"; // 構成キー(行) |
1735 |
strSQL += ", ItemCode"; // 工種キー |
1736 |
strSQL += ", SpecCode"; // 規格・寸法キー |
1737 |
strSQL += ", ItemName"; // 作業名称 |
1738 |
strSQL += ", SpecName"; // 作業/品質・形状・寸法 |
1739 |
strSQL += ", UnitCount"; // 数量 |
1740 |
strSQL += ", UnitName"; // 単位 |
1741 |
strSQL += ", UnitPrice"; // 単価 |
1742 |
strSQL += ", LineTotal"; // 金額 |
1743 |
strSQL += ", Note"; // 備考 |
1744 |
strSQL += ", CompanyCode"; // 協力会社コード |
1745 |
strSQL += ", MyExpensesFlg"; |
1746 |
strSQL += ", InputFlg"; |
1747 |
strSQL += ", TO_CHAR(EntryDate, 'YYYY/MM/DD HH24:MI:ss')"; |
1748 |
strSQL += ", TO_CHAR(UpdateDate, 'YYYY/MM/DD HH24:MI:ss')"; |
1749 |
strSQL += ", TO_CHAR(SaveDate, 'YYYY/MM/DD HH24:MI:ss')"; // 退避日付 |
1750 |
strSQL += string.Format(" FROM {0}", s_OracleTables[ino].Key); |
1751 |
strSQL += string.Format(CreateOrder(s_OracleTables[ino].Key)); |
1752 |
strSQL += CreateOrder(s_OracleTables[ino].Key); |
1753 |
ArrayList getList = new ArrayList(); |
1754 |
if (!InDB.ExecuteReader(strSQL, ref getList)) return false; |
1755 |
|
1756 |
OutDB.connect(); OutDB.beginTran(); |
1757 |
strSQL = string.Format("TRUNCATE TABLE {0}", s_OracleTables[ino].Key); |
1758 |
OutDB.ExecuteNonQuery(strSQL, false); |
1759 |
|
1760 |
int DataCnt = 0; |
1761 |
bool bColFirst = true; |
1762 |
bool bDataFirst = true; |
1763 |
EstimateDataDetail work = new EstimateDataDetail(); |
1764 |
DateTime SaveDate = DateTime.Now; |
1765 |
int TblColCnt = Enum.GetNames(typeof(ProcessManagement.OracleDB.IOAccess.IOEstimateDataDetail.TableColumn)).Length; |
1766 |
|
1767 |
while (DataCnt < getList.Count) |
1768 |
{ |
1769 |
bColFirst = true; |
1770 |
strSQL = string.Format("INSERT INTO {0}", s_OracleTables[ino].Key); |
1771 |
strSQL += " ("; |
1772 |
strSQL += "SaveDate,"; |
1773 |
foreach (var gender in Enum.GetValues(typeof(ProcessManagement.DB.IOAccess.IOEstimateDataDetail.TableColumn))) |
1774 |
{ |
1775 |
if (!bColFirst) strSQL += " ,"; |
1776 |
strSQL += gender.ToString(); |
1777 |
bColFirst = false; |
1778 |
} |
1779 |
strSQL += ") VALUES"; |
1780 |
|
1781 |
bDataFirst = true; |
1782 |
for (int i = 0; i < s_LoopCount; i++, DataCnt++) |
1783 |
{ |
1784 |
if (DataCnt >= getList.Count) break; |
1785 |
|
1786 |
object[] CurRec = (object[])getList[DataCnt]; |
1787 |
|
1788 |
if (bDataFirst) strSQL += " ("; |
1789 |
else strSQL += ", ("; |
1790 |
|
1791 |
SaveDate = CommonMotions.ObjectToDateTime(CurRec, TblColCnt); |
1792 |
strSQL += string.Format(" STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", SaveDate); // 退避日付 |
1793 |
|
1794 |
work.ConstructionCode = CommonMotions.ObjectToInt(CurRec, (int)ProcessManagement.OracleDB.IOAccess.IOEstimateDataDetail.TableColumn.ConstructionCode); |
1795 |
strSQL += string.Format(", {0}", work.ConstructionCode); // 工事番号 |
1796 |
|
1797 |
work.PageCount = CommonMotions.ObjectToInt(CurRec, (int)ProcessManagement.OracleDB.IOAccess.IOEstimateDataDetail.TableColumn.PageCount); |
1798 |
strSQL += string.Format(", {0}", work.PageCount); // ページ番号 |
1799 |
|
1800 |
work.LineCount = CommonMotions.ObjectToInt(CurRec, (int)ProcessManagement.OracleDB.IOAccess.IOEstimateDataDetail.TableColumn.LineCount); |
1801 |
strSQL += string.Format(", {0}", work.LineCount); // 行番号 |
1802 |
|
1803 |
work.DataType = CommonMotions.ObjectToInt(CurRec, (int)ProcessManagement.OracleDB.IOAccess.IOEstimateDataDetail.TableColumn.DataType); |
1804 |
strSQL += string.Format(", {0}", work.DataType); // データタイプ |
1805 |
|
1806 |
work.ComponentCode = CommonMotions.ObjectToInt(CurRec, (int)ProcessManagement.OracleDB.IOAccess.IOEstimateDataDetail.TableColumn.ComponentCode); |
1807 |
strSQL += string.Format(", {0}", work.ComponentCode); // 構成キー |
1808 |
|
1809 |
work.ItemCode = CommonMotions.ObjectToInt(CurRec, (int)ProcessManagement.OracleDB.IOAccess.IOEstimateDataDetail.TableColumn.ItemCode); |
1810 |
strSQL += string.Format(", {0}", work.ItemCode); // 工種キー |
1811 |
|
1812 |
work.SpecCode = CommonMotions.ObjectToInt(CurRec, (int)ProcessManagement.OracleDB.IOAccess.IOEstimateDataDetail.TableColumn.SpecCode); |
1813 |
strSQL += string.Format(", {0}", work.SpecCode); // 規格・寸法キー |
1814 |
|
1815 |
work.ItemName = CommonMotions.ObjectToString(CurRec, (int)ProcessManagement.OracleDB.IOAccess.IOEstimateDataDetail.TableColumn.ItemName); |
1816 |
strSQL += string.Format(",'{0}'", work.ItemName.Replace(",", ",").Replace("'", "’")); // 作業名称 |
1817 |
|
1818 |
work.SpecName = CommonMotions.ObjectToString(CurRec, (int)ProcessManagement.OracleDB.IOAccess.IOEstimateDataDetail.TableColumn.SpecName); |
1819 |
strSQL += string.Format(",'{0}'", work.SpecName.Replace(",", ",").Replace("'", "’")); // 作業/品質・形状・寸法 |
1820 |
|
1821 |
work.UnitCount = CommonMotions.ObjectToDouble(CurRec, (int)ProcessManagement.OracleDB.IOAccess.IOEstimateDataDetail.TableColumn.UnitCount); |
1822 |
strSQL += string.Format(", {0}", work.UnitCount); // 数量 |
1823 |
|
1824 |
work.UnitName = CommonMotions.ObjectToString(CurRec, (int)ProcessManagement.OracleDB.IOAccess.IOEstimateDataDetail.TableColumn.UnitName); |
1825 |
strSQL += string.Format(",'{0}'", work.UnitName); // 単位 |
1826 |
|
1827 |
work.UnitPrice = CommonMotions.ObjectToDouble(CurRec, (int)ProcessManagement.OracleDB.IOAccess.IOEstimateDataDetail.TableColumn.UnitPrice); |
1828 |
strSQL += string.Format(", {0}", work.UnitPrice); // 単価 |
1829 |
|
1830 |
work.LineTotal = CommonMotions.ObjectToDouble(CurRec, (int)ProcessManagement.OracleDB.IOAccess.IOEstimateDataDetail.TableColumn.LineTotal); |
1831 |
strSQL += string.Format(", {0}", work.LineTotal); // 金額 |
1832 |
|
1833 |
work.Note = CommonMotions.ObjectToString(CurRec, (int)ProcessManagement.OracleDB.IOAccess.IOEstimateDataDetail.TableColumn.Note); |
1834 |
strSQL += string.Format(",'{0}'", work.Note.Replace(",", ",").Replace("'", "’")); // 備考 |
1835 |
|
1836 |
work.CompanyCode = CommonMotions.ObjectToInt(CurRec, (int)ProcessManagement.OracleDB.IOAccess.IOEstimateDataDetail.TableColumn.CompanyCode); |
1837 |
strSQL += string.Format(", {0}", work.CompanyCode); // 協力会社コード |
1838 |
|
1839 |
work.MyExpensesFlg = CommonMotions.ObjectToInt(CurRec, (int)ProcessManagement.OracleDB.IOAccess.IOEstimateDataDetail.TableColumn.MyExpensesFlg); |
1840 |
strSQL += string.Format(", {0}", work.MyExpensesFlg); // 自社経費フラグ |
1841 |
|
1842 |
work.InputFlg = CommonMotions.ObjectToInt(CurRec, (int)ProcessManagement.OracleDB.IOAccess.IOEstimateDataDetail.TableColumn.InputFlg); |
1843 |
strSQL += string.Format(", {0}", work.InputFlg); // 入力フラグ |
1844 |
|
1845 |
work.EntryDate = CommonMotions.ObjectToDateTime(CurRec, (int)ProcessManagement.OracleDB.IOAccess.IOEstimateDataDetail.TableColumn.EntryDate); |
1846 |
strSQL += string.Format(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.EntryDate); |
1847 |
|
1848 |
work.UpdateDate = CommonMotions.ObjectToDateTime(CurRec, (int)ProcessManagement.OracleDB.IOAccess.IOEstimateDataDetail.TableColumn.UpdateDate); |
1849 |
strSQL += string.Format(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.UpdateDate); |
1850 |
|
1851 |
strSQL += ")"; |
1852 |
|
1853 |
bDataFirst = false; |
1854 |
} |
1855 |
|
1856 |
if (!OutDB.ExecuteNonQuery(strSQL, false)) |
1857 |
{ |
1858 |
OutDB.rollback(); |
1859 |
strMsg += " DB処理異常"; |
1860 |
return false; |
1861 |
} |
1862 |
} |
1863 |
strMsg += string.Format(" 処理件数={0}", DataCnt.ToString("#,0")); |
1864 |
|
1865 |
return true; |
1866 |
} |
1867 |
catch (Exception ex) |
1868 |
{ |
1869 |
OutDB.rollback(); |
1870 |
|
1871 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
1872 |
strMsg += string.Format(" システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
1873 |
return false; |
1874 |
} |
1875 |
finally |
1876 |
{ |
1877 |
InDB.close(); InDB = null; |
1878 |
OutDB.commit(); |
1879 |
OutDB.close(); OutDB = null; |
1880 |
} |
1881 |
} |
1882 |
#endregion |
1883 |
|
1884 |
#region 法人格マスタ(Businesstypemaster) |
1885 |
/// <summary> |
1886 |
/// 法人格マスタ(Businesstypemaster) |
1887 |
/// </summary> |
1888 |
/// <param name="strMsg"></param> |
1889 |
/// <returns></returns> |
1890 |
private bool CnvBusinesstypemaster(int ino, ref string strMsg) |
1891 |
{ |
1892 |
ProcessManagement.OracleDB.IOAccess.IOMBusinessType InDB = new ProcessManagement.OracleDB.IOAccess.IOMBusinessType(); |
1893 |
ProcessManagement.DB.IOAccess.IOMBusinessType OutDB = new ProcessManagement.DB.IOAccess.IOMBusinessType(); |
1894 |
strMsg = string.Format("№{0}:テーブル:{1}({2})", (ino + 1).ToString("00"), s_OracleTables[ino].Value, s_OracleTables[ino].Key); |
1895 |
try |
1896 |
{ |
1897 |
EditDspLength(ref strMsg); |
1898 |
|
1899 |
string strSQL = CreateOrder(s_OracleTables[ino].Key); |
1900 |
List<BusinessTypeMaster> getList = new List<BusinessTypeMaster>(); |
1901 |
if (!InDB.SelectAction(strSQL, ref getList)) return false; |
1902 |
|
1903 |
OutDB.connect(); OutDB.beginTran(); |
1904 |
strSQL = string.Format("TRUNCATE TABLE {0}", s_OracleTables[ino].Key); |
1905 |
OutDB.ExecuteNonQuery(strSQL, false); |
1906 |
|
1907 |
List<BusinessTypeMaster> BuffList = new List<BusinessTypeMaster>(); |
1908 |
int DataCnt = 0; |
1909 |
while (DataCnt < getList.Count) |
1910 |
{ |
1911 |
BuffList.Clear(); |
1912 |
|
1913 |
for (int ii = 0; ii < s_LoopCount; ii++, DataCnt++) |
1914 |
{ |
1915 |
if (DataCnt >= getList.Count) break; |
1916 |
|
1917 |
BuffList.Add(getList[DataCnt]); |
1918 |
} |
1919 |
|
1920 |
if (!OutDB.InsertAction(BuffList, false)) |
1921 |
{ |
1922 |
OutDB.rollback(); |
1923 |
strMsg += " DB処理異常"; |
1924 |
return false; |
1925 |
} |
1926 |
} |
1927 |
|
1928 |
strMsg += string.Format(" 処理件数={0}", DataCnt.ToString("#,0")); |
1929 |
|
1930 |
return true; |
1931 |
} |
1932 |
catch (Exception ex) |
1933 |
{ |
1934 |
OutDB.rollback(); |
1935 |
|
1936 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
1937 |
strMsg += string.Format(" システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
1938 |
return false; |
1939 |
} |
1940 |
finally |
1941 |
{ |
1942 |
InDB.close(); InDB = null; |
1943 |
OutDB.commit(); |
1944 |
OutDB.close(); OutDB = null; |
1945 |
} |
1946 |
} |
1947 |
#endregion |
1948 |
|
1949 |
#region 共通費大項目マスタ(Commoncostlarge) |
1950 |
/// <summary> |
1951 |
/// 共通費大項目マスタ(Commoncostlarge) |
1952 |
/// </summary> |
1953 |
/// <param name="strMsg"></param> |
1954 |
/// <returns></returns> |
1955 |
private bool CnvCommoncostlarge(int ino, ref string strMsg) |
1956 |
{ |
1957 |
ProcessManagement.OracleDB.IOAccess.IOMCommonCostLarge InDB = new ProcessManagement.OracleDB.IOAccess.IOMCommonCostLarge(); |
1958 |
ProcessManagement.DB.IOAccess.IOMCommonCostLarge OutDB = new ProcessManagement.DB.IOAccess.IOMCommonCostLarge(); |
1959 |
strMsg = string.Format("№{0}:テーブル:{1}({2})", (ino + 1).ToString("00"), s_OracleTables[ino].Value, s_OracleTables[ino].Key); |
1960 |
try |
1961 |
{ |
1962 |
EditDspLength(ref strMsg); |
1963 |
|
1964 |
string strSQL = CreateOrder(s_OracleTables[ino].Key); |
1965 |
List<CommonCostLarge> getList = new List<CommonCostLarge>(); |
1966 |
if (!InDB.SelectAction(strSQL, ref getList)) return false; |
1967 |
|
1968 |
OutDB.connect(); OutDB.beginTran(); |
1969 |
strSQL = string.Format("TRUNCATE TABLE {0}", s_OracleTables[ino].Key); |
1970 |
OutDB.ExecuteNonQuery(strSQL, false); |
1971 |
|
1972 |
List<CommonCostLarge> BuffList = new List<CommonCostLarge>(); |
1973 |
int DataCnt = 0; |
1974 |
while (DataCnt < getList.Count) |
1975 |
{ |
1976 |
BuffList.Clear(); |
1977 |
|
1978 |
for (int ii = 0; ii < s_LoopCount; ii++, DataCnt++) |
1979 |
{ |
1980 |
if (DataCnt >= getList.Count) break; |
1981 |
|
1982 |
BuffList.Add(getList[DataCnt]); |
1983 |
} |
1984 |
|
1985 |
if (!OutDB.InsertAction(BuffList, false)) |
1986 |
{ |
1987 |
OutDB.rollback(); |
1988 |
strMsg += " DB処理異常"; |
1989 |
return false; |
1990 |
} |
1991 |
} |
1992 |
|
1993 |
strMsg += string.Format(" 処理件数={0}", DataCnt.ToString("#,0")); |
1994 |
|
1995 |
return true; |
1996 |
} |
1997 |
catch (Exception ex) |
1998 |
{ |
1999 |
OutDB.rollback(); |
2000 |
|
2001 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
2002 |
strMsg += string.Format(" システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
2003 |
return false; |
2004 |
} |
2005 |
finally |
2006 |
{ |
2007 |
InDB.close(); InDB = null; |
2008 |
OutDB.commit(); |
2009 |
OutDB.close(); OutDB = null; |
2010 |
} |
2011 |
} |
2012 |
#endregion |
2013 |
|
2014 |
#region 共通費工種関連マスタ(Commoncostlinkms) |
2015 |
/// <summary> |
2016 |
/// 共通費工種関連マスタ(Commoncostlinkms) |
2017 |
/// </summary> |
2018 |
/// <param name="strMsg"></param> |
2019 |
/// <returns></returns> |
2020 |
private bool CnvCommoncostlinkms(int ino, ref string strMsg) |
2021 |
{ |
2022 |
ProcessManagement.OracleDB.IOAccess.IOMCommonCostLinkMS InDB = new ProcessManagement.OracleDB.IOAccess.IOMCommonCostLinkMS(); |
2023 |
ProcessManagement.DB.IOAccess.IOMCommonCostLinkMS OutDB = new ProcessManagement.DB.IOAccess.IOMCommonCostLinkMS(); |
2024 |
strMsg = string.Format("№{0}:テーブル:{1}({2})", (ino + 1).ToString("00"), s_OracleTables[ino].Value, s_OracleTables[ino].Key); |
2025 |
try |
2026 |
{ |
2027 |
EditDspLength(ref strMsg); |
2028 |
|
2029 |
string strSQL = CreateOrder(s_OracleTables[ino].Key); |
2030 |
List<CommonCostLinkMS> getList = new List<CommonCostLinkMS>(); |
2031 |
if (!InDB.SelectAction(strSQL, ref getList)) return false; |
2032 |
|
2033 |
OutDB.connect(); OutDB.beginTran(); |
2034 |
strSQL = string.Format("TRUNCATE TABLE {0}", s_OracleTables[ino].Key); |
2035 |
OutDB.ExecuteNonQuery(strSQL, false); |
2036 |
|
2037 |
List<CommonCostLinkMS> BuffList = new List<CommonCostLinkMS>(); |
2038 |
int DataCnt = 0; |
2039 |
while (DataCnt < getList.Count) |
2040 |
{ |
2041 |
BuffList.Clear(); |
2042 |
|
2043 |
for (int ii = 0; ii < s_LoopCount; ii++, DataCnt++) |
2044 |
{ |
2045 |
if (DataCnt >= getList.Count) break; |
2046 |
|
2047 |
BuffList.Add(getList[DataCnt]); |
2048 |
} |
2049 |
|
2050 |
if (!OutDB.InsertAction(BuffList, false)) |
2051 |
{ |
2052 |
OutDB.rollback(); |
2053 |
strMsg += " DB処理異常"; |
2054 |
return false; |
2055 |
} |
2056 |
} |
2057 |
|
2058 |
strMsg += string.Format(" 処理件数={0}", DataCnt.ToString("#,0")); |
2059 |
|
2060 |
return true; |
2061 |
} |
2062 |
catch (Exception ex) |
2063 |
{ |
2064 |
OutDB.rollback(); |
2065 |
|
2066 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
2067 |
strMsg += string.Format(" システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
2068 |
return false; |
2069 |
} |
2070 |
finally |
2071 |
{ |
2072 |
InDB.close(); InDB = null; |
2073 |
OutDB.commit(); |
2074 |
OutDB.close(); OutDB = null; |
2075 |
} |
2076 |
} |
2077 |
#endregion |
2078 |
|
2079 |
#region 共通費中項目マスタ(Commoncostmiddle) |
2080 |
/// <summary> |
2081 |
/// 共通費中項目マスタ(Commoncostmiddle) |
2082 |
/// </summary> |
2083 |
/// <param name="strMsg"></param> |
2084 |
/// <returns></returns> |
2085 |
private bool CnvCommoncostmiddle(int ino, ref string strMsg) |
2086 |
{ |
2087 |
ProcessManagement.OracleDB.IOAccess.IOMCommonCostMiddle InDB = new ProcessManagement.OracleDB.IOAccess.IOMCommonCostMiddle(); |
2088 |
ProcessManagement.DB.IOAccess.IOMCommonCostMiddle OutDB = new ProcessManagement.DB.IOAccess.IOMCommonCostMiddle(); |
2089 |
strMsg = string.Format("№{0}:テーブル:{1}({2})", (ino + 1).ToString("00"), s_OracleTables[ino].Value, s_OracleTables[ino].Key); |
2090 |
try |
2091 |
{ |
2092 |
EditDspLength(ref strMsg); |
2093 |
|
2094 |
string strSQL = CreateOrder(s_OracleTables[ino].Key); |
2095 |
List<CommonCostMiddle> getList = new List<CommonCostMiddle>(); |
2096 |
if (!InDB.SelectAction(strSQL, ref getList)) return false; |
2097 |
|
2098 |
OutDB.connect(); OutDB.beginTran(); |
2099 |
strSQL = string.Format("TRUNCATE TABLE {0}", s_OracleTables[ino].Key); |
2100 |
OutDB.ExecuteNonQuery(strSQL, false); |
2101 |
|
2102 |
List<CommonCostMiddle> BuffList = new List<CommonCostMiddle>(); |
2103 |
int DataCnt = 0; |
2104 |
while (DataCnt < getList.Count) |
2105 |
{ |
2106 |
BuffList.Clear(); |
2107 |
|
2108 |
for (int ii = 0; ii < s_LoopCount; ii++, DataCnt++) |
2109 |
{ |
2110 |
if (DataCnt >= getList.Count) break; |
2111 |
|
2112 |
BuffList.Add(getList[DataCnt]); |
2113 |
} |
2114 |
|
2115 |
if (!OutDB.InsertAction(BuffList, false)) |
2116 |
{ |
2117 |
OutDB.rollback(); |
2118 |
strMsg += " DB処理異常"; |
2119 |
return false; |
2120 |
} |
2121 |
} |
2122 |
|
2123 |
strMsg += string.Format(" 処理件数={0}", DataCnt.ToString("#,0")); |
2124 |
|
2125 |
return true; |
2126 |
} |
2127 |
catch (Exception ex) |
2128 |
{ |
2129 |
OutDB.rollback(); |
2130 |
|
2131 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
2132 |
strMsg += string.Format(" システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
2133 |
return false; |
2134 |
} |
2135 |
finally |
2136 |
{ |
2137 |
InDB.close(); InDB = null; |
2138 |
OutDB.commit(); |
2139 |
OutDB.close(); OutDB = null; |
2140 |
} |
2141 |
} |
2142 |
#endregion |
2143 |
|
2144 |
#region 共通費中項目キーマスタ(Commoncostmiddlesearchword) |
2145 |
/// <summary> |
2146 |
/// 共通費中項目キーマスタ(Commoncostmiddlesearchword) |
2147 |
/// </summary> |
2148 |
/// <param name="strMsg"></param> |
2149 |
/// <returns></returns> |
2150 |
private bool CnvCommoncostmiddlesearchword(int ino, ref string strMsg) |
2151 |
{ |
2152 |
ProcessManagement.OracleDB.IOAccess.IOMCommonCostMiddleSearchWord InDB = new ProcessManagement.OracleDB.IOAccess.IOMCommonCostMiddleSearchWord(); |
2153 |
ProcessManagement.DB.IOAccess.IOMCommonCostMiddleSearchWord OutDB = new ProcessManagement.DB.IOAccess.IOMCommonCostMiddleSearchWord(); |
2154 |
strMsg = string.Format("№{0}:テーブル:{1}({2})", (ino + 1).ToString("00"), s_OracleTables[ino].Value, s_OracleTables[ino].Key); |
2155 |
try |
2156 |
{ |
2157 |
EditDspLength(ref strMsg); |
2158 |
|
2159 |
string strSQL = CreateOrder(s_OracleTables[ino].Key); |
2160 |
List<CommonCostMiddleSearchWord> getList = new List<CommonCostMiddleSearchWord>(); |
2161 |
if (!InDB.SelectAction(strSQL, ref getList)) return false; |
2162 |
|
2163 |
OutDB.connect(); OutDB.beginTran(); |
2164 |
strSQL = string.Format("TRUNCATE TABLE {0}", s_OracleTables[ino].Key); |
2165 |
OutDB.ExecuteNonQuery(strSQL, false); |
2166 |
|
2167 |
List<CommonCostMiddleSearchWord> BuffList = new List<CommonCostMiddleSearchWord>(); |
2168 |
int DataCnt = 0; |
2169 |
while (DataCnt < getList.Count) |
2170 |
{ |
2171 |
BuffList.Clear(); |
2172 |
|
2173 |
for (int ii = 0; ii < s_LoopCount; ii++, DataCnt++) |
2174 |
{ |
2175 |
if (DataCnt >= getList.Count) break; |
2176 |
|
2177 |
BuffList.Add(getList[DataCnt]); |
2178 |
} |
2179 |
|
2180 |
if (!OutDB.InsertAction(BuffList, false)) |
2181 |
{ |
2182 |
OutDB.rollback(); |
2183 |
strMsg += " DB処理異常"; |
2184 |
return false; |
2185 |
} |
2186 |
} |
2187 |
|
2188 |
strMsg += string.Format(" 処理件数={0}", DataCnt.ToString("#,0")); |
2189 |
|
2190 |
return true; |
2191 |
} |
2192 |
catch (Exception ex) |
2193 |
{ |
2194 |
OutDB.rollback(); |
2195 |
|
2196 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
2197 |
strMsg += string.Format(" システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
2198 |
return false; |
2199 |
} |
2200 |
finally |
2201 |
{ |
2202 |
InDB.close(); InDB = null; |
2203 |
OutDB.commit(); |
2204 |
OutDB.close(); OutDB = null; |
2205 |
} |
2206 |
} |
2207 |
#endregion |
2208 |
|
2209 |
#region 構成工種関連マスタ(Componentlinkmaster) |
2210 |
/// <summary> |
2211 |
/// 構成工種関連マスタ(Componentlinkmaster) |
2212 |
/// </summary> |
2213 |
/// <param name="strMsg"></param> |
2214 |
/// <returns></returns> |
2215 |
private bool CnvComponentlinkmaster(int ino, ref string strMsg) |
2216 |
{ |
2217 |
ProcessManagement.OracleDB.IOAccess.IOMComponentLink InDB = new ProcessManagement.OracleDB.IOAccess.IOMComponentLink(); |
2218 |
ProcessManagement.DB.IOAccess.IOMComponentLink OutDB = new ProcessManagement.DB.IOAccess.IOMComponentLink(); |
2219 |
strMsg = string.Format("№{0}:テーブル:{1}({2})", (ino + 1).ToString("00"), s_OracleTables[ino].Value, s_OracleTables[ino].Key); |
2220 |
try |
2221 |
{ |
2222 |
EditDspLength(ref strMsg); |
2223 |
|
2224 |
string strSQL = CreateOrder(s_OracleTables[ino].Key); |
2225 |
List<ComponentLinkMaster> getList = new List<ComponentLinkMaster>(); |
2226 |
if (!InDB.SelectAction(strSQL, ref getList)) return false; |
2227 |
|
2228 |
OutDB.connect(); OutDB.beginTran(); |
2229 |
strSQL = string.Format("TRUNCATE TABLE {0}", s_OracleTables[ino].Key); |
2230 |
OutDB.ExecuteNonQuery(strSQL, false); |
2231 |
|
2232 |
List<ComponentLinkMaster> BuffList = new List<ComponentLinkMaster>(); |
2233 |
int DataCnt = 0; |
2234 |
while (DataCnt < getList.Count) |
2235 |
{ |
2236 |
BuffList.Clear(); |
2237 |
|
2238 |
for (int ii = 0; ii < s_LoopCount; ii++, DataCnt++) |
2239 |
{ |
2240 |
if (DataCnt >= getList.Count) break; |
2241 |
|
2242 |
BuffList.Add(getList[DataCnt]); |
2243 |
} |
2244 |
|
2245 |
if (!OutDB.InsertAction(BuffList, false)) |
2246 |
{ |
2247 |
OutDB.rollback(); |
2248 |
strMsg += " DB処理異常"; |
2249 |
return false; |
2250 |
} |
2251 |
} |
2252 |
|
2253 |
strMsg += string.Format(" 処理件数={0}", DataCnt.ToString("#,0")); |
2254 |
|
2255 |
return true; |
2256 |
} |
2257 |
catch (Exception ex) |
2258 |
{ |
2259 |
OutDB.rollback(); |
2260 |
|
2261 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
2262 |
strMsg += string.Format(" システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
2263 |
return false; |
2264 |
} |
2265 |
finally |
2266 |
{ |
2267 |
InDB.close(); InDB = null; |
2268 |
OutDB.commit(); |
2269 |
OutDB.close(); OutDB = null; |
2270 |
} |
2271 |
} |
2272 |
#endregion |
2273 |
|
2274 |
#region 構成マスタ(Componentmaster) |
2275 |
/// <summary> |
2276 |
/// 構成マスタ(Componentmaster) |
2277 |
/// </summary> |
2278 |
/// <param name="strMsg"></param> |
2279 |
/// <returns></returns> |
2280 |
private bool CnvComponentmaster(int ino, ref string strMsg) |
2281 |
{ |
2282 |
ProcessManagement.OracleDB.IOAccess.IOMComponent InDB = new ProcessManagement.OracleDB.IOAccess.IOMComponent(); |
2283 |
ProcessManagement.DB.IOAccess.IOMComponent OutDB = new ProcessManagement.DB.IOAccess.IOMComponent(); |
2284 |
strMsg = string.Format("№{0}:テーブル:{1}({2})", (ino + 1).ToString("00"), s_OracleTables[ino].Value, s_OracleTables[ino].Key); |
2285 |
try |
2286 |
{ |
2287 |
EditDspLength(ref strMsg); |
2288 |
|
2289 |
string strSQL = CreateOrder(s_OracleTables[ino].Key); |
2290 |
List<ComponentMaster> getList = new List<ComponentMaster>(); |
2291 |
if (!InDB.SelectAction(strSQL, ref getList)) return false; |
2292 |
|
2293 |
OutDB.connect(); OutDB.beginTran(); |
2294 |
strSQL = string.Format("TRUNCATE TABLE {0}", s_OracleTables[ino].Key); |
2295 |
OutDB.ExecuteNonQuery(strSQL, false); |
2296 |
|
2297 |
List<ComponentMaster> BuffList = new List<ComponentMaster>(); |
2298 |
int DataCnt = 0; |
2299 |
while (DataCnt < getList.Count) |
2300 |
{ |
2301 |
BuffList.Clear(); |
2302 |
|
2303 |
for (int ii = 0; ii < s_LoopCount; ii++, DataCnt++) |
2304 |
{ |
2305 |
if (DataCnt >= getList.Count) break; |
2306 |
|
2307 |
BuffList.Add(getList[DataCnt]); |
2308 |
} |
2309 |
|
2310 |
if (!OutDB.InsertAction(BuffList, false)) |
2311 |
{ |
2312 |
OutDB.rollback(); |
2313 |
strMsg += " DB処理異常"; |
2314 |
return false; |
2315 |
} |
2316 |
} |
2317 |
|
2318 |
strMsg += string.Format(" 処理件数={0}", DataCnt.ToString("#,0")); |
2319 |
|
2320 |
return true; |
2321 |
} |
2322 |
catch (Exception ex) |
2323 |
{ |
2324 |
OutDB.rollback(); |
2325 |
|
2326 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
2327 |
strMsg += string.Format(" システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
2328 |
return false; |
2329 |
} |
2330 |
finally |
2331 |
{ |
2332 |
InDB.close(); InDB = null; |
2333 |
OutDB.commit(); |
2334 |
OutDB.close(); OutDB = null; |
2335 |
} |
2336 |
} |
2337 |
#endregion |
2338 |
|
2339 |
#region 工事基本情報(Constructionbaseinfo) |
2340 |
/// <summary> |
2341 |
/// 工事基本情報(Constructionbaseinfo) |
2342 |
/// </summary> |
2343 |
/// <param name="strMsg"></param> |
2344 |
/// <returns></returns> |
2345 |
private bool CnvConstructionbaseinfo(int ino, ref string strMsg) |
2346 |
{ |
2347 |
ProcessManagement.OracleDB.IOAccess.IOConstructionBaseInfo InDB = new ProcessManagement.OracleDB.IOAccess.IOConstructionBaseInfo(); |
2348 |
ProcessManagement.DB.IOAccess.IOConstructionBaseInfo OutDB = new ProcessManagement.DB.IOAccess.IOConstructionBaseInfo(); |
2349 |
strMsg = string.Format("№{0}:テーブル:{1}({2})", (ino + 1).ToString("00"), s_OracleTables[ino].Value, s_OracleTables[ino].Key); |
2350 |
try |
2351 |
{ |
2352 |
EditDspLength(ref strMsg); |
2353 |
|
2354 |
string strSQL = CreateOrder(s_OracleTables[ino].Key); |
2355 |
List<ConstructionBaseInfo> getList = new List<ConstructionBaseInfo>(); |
2356 |
if (!InDB.SelectAction(strSQL, ref getList)) return false; |
2357 |
|
2358 |
OutDB.connect(); OutDB.beginTran(); |
2359 |
strSQL = string.Format("TRUNCATE TABLE {0}", s_OracleTables[ino].Key); |
2360 |
OutDB.ExecuteNonQuery(strSQL, false); |
2361 |
|
2362 |
List<ConstructionBaseInfo> BuffList = new List<ConstructionBaseInfo>(); |
2363 |
int DataCnt = 0; |
2364 |
while (DataCnt < getList.Count) |
2365 |
{ |
2366 |
BuffList.Clear(); |
2367 |
|
2368 |
for (int ii = 0; ii < s_LoopCount; ii++, DataCnt++) |
2369 |
{ |
2370 |
if (DataCnt >= getList.Count) break; |
2371 |
|
2372 |
BuffList.Add(getList[DataCnt]); |
2373 |
} |
2374 |
|
2375 |
if (!OutDB.InsertAction(BuffList, false)) |
2376 |
{ |
2377 |
OutDB.rollback(); |
2378 |
strMsg += " DB処理異常"; |
2379 |
return false; |
2380 |
} |
2381 |
} |
2382 |
|
2383 |
strMsg += string.Format(" 処理件数={0}", DataCnt.ToString("#,0")); |
2384 |
|
2385 |
return true; |
2386 |
} |
2387 |
catch (Exception ex) |
2388 |
{ |
2389 |
OutDB.rollback(); |
2390 |
|
2391 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
2392 |
strMsg += string.Format(" システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
2393 |
return false; |
2394 |
} |
2395 |
finally |
2396 |
{ |
2397 |
InDB.close(); InDB = null; |
2398 |
OutDB.commit(); |
2399 |
OutDB.close(); OutDB = null; |
2400 |
} |
2401 |
} |
2402 |
#endregion |
2403 |
|
2404 |
#region 工事基本情報明細(Constructionbaseinfodetail) |
2405 |
/// <summary> |
2406 |
/// 工事基本情報明細(Constructionbaseinfodetail) |
2407 |
/// </summary> |
2408 |
/// <param name="strMsg"></param> |
2409 |
/// <returns></returns> |
2410 |
private bool CnvConstructionbaseinfodetail(int ino, ref string strMsg) |
2411 |
{ |
2412 |
ProcessManagement.OracleDB.IOAccess.IOConstructionBaseInfoDetail InDB = new ProcessManagement.OracleDB.IOAccess.IOConstructionBaseInfoDetail(); |
2413 |
ProcessManagement.DB.IOAccess.IOConstructionBaseInfoDetail OutDB = new ProcessManagement.DB.IOAccess.IOConstructionBaseInfoDetail(); |
2414 |
strMsg = string.Format("№{0}:テーブル:{1}({2})", (ino + 1).ToString("00"), s_OracleTables[ino].Value, s_OracleTables[ino].Key); |
2415 |
try |
2416 |
{ |
2417 |
EditDspLength(ref strMsg); |
2418 |
|
2419 |
string strSQL = CreateOrder(s_OracleTables[ino].Key); |
2420 |
List<ConstructionBaseInfoDetail> getList = new List<ConstructionBaseInfoDetail>(); |
2421 |
if (!InDB.SelectAction(strSQL, ref getList)) return false; |
2422 |
|
2423 |
OutDB.connect(); OutDB.beginTran(); |
2424 |
strSQL = string.Format("TRUNCATE TABLE {0}", s_OracleTables[ino].Key); |
2425 |
OutDB.ExecuteNonQuery(strSQL, false); |
2426 |
|
2427 |
List<ConstructionBaseInfoDetail> BuffList = new List<ConstructionBaseInfoDetail>(); |
2428 |
int DataCnt = 0; |
2429 |
while (DataCnt < getList.Count) |
2430 |
{ |
2431 |
BuffList.Clear(); |
2432 |
|
2433 |
for (int ii = 0; ii < s_LoopCount; ii++, DataCnt++) |
2434 |
{ |
2435 |
if (DataCnt >= getList.Count) break; |
2436 |
|
2437 |
BuffList.Add(getList[DataCnt]); |
2438 |
} |
2439 |
|
2440 |
if (!OutDB.InsertAction(BuffList, false)) |
2441 |
{ |
2442 |
OutDB.rollback(); |
2443 |
strMsg += " DB処理異常"; |
2444 |
return false; |
2445 |
} |
2446 |
} |
2447 |
|
2448 |
strMsg += string.Format(" 処理件数={0}", DataCnt.ToString("#,0")); |
2449 |
|
2450 |
return true; |
2451 |
} |
2452 |
catch (Exception ex) |
2453 |
{ |
2454 |
OutDB.rollback(); |
2455 |
|
2456 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
2457 |
strMsg += string.Format(" システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
2458 |
return false; |
2459 |
} |
2460 |
finally |
2461 |
{ |
2462 |
InDB.close(); InDB = null; |
2463 |
OutDB.commit(); |
2464 |
OutDB.close(); OutDB = null; |
2465 |
} |
2466 |
} |
2467 |
#endregion |
2468 |
|
2469 |
#region 工事施工予算データ(Constructionbudget) |
2470 |
/// <summary> |
2471 |
/// 工事施工予算データ(Constructionbudget) |
2472 |
/// </summary> |
2473 |
/// <param name="strMsg"></param> |
2474 |
/// <returns></returns> |
2475 |
private bool CnvConstructionbudget(int ino, ref string strMsg) |
2476 |
{ |
2477 |
ProcessManagement.OracleDB.IOAccess.IOConstructionBudget InDB = new ProcessManagement.OracleDB.IOAccess.IOConstructionBudget(); |
2478 |
ProcessManagement.DB.IOAccess.IOConstructionBudget OutDB = new ProcessManagement.DB.IOAccess.IOConstructionBudget(); |
2479 |
strMsg = string.Format("№{0}:テーブル:{1}({2})", (ino + 1).ToString("00"), s_OracleTables[ino].Value, s_OracleTables[ino].Key); |
2480 |
try |
2481 |
{ |
2482 |
EditDspLength(ref strMsg); |
2483 |
|
2484 |
string strSQL = CreateOrder(s_OracleTables[ino].Key); |
2485 |
List<ConstructionBudget> getList = new List<ConstructionBudget>(); |
2486 |
if (!InDB.SelectAction(strSQL, ref getList)) return false; |
2487 |
|
2488 |
OutDB.connect(); OutDB.beginTran(); |
2489 |
strSQL = string.Format("TRUNCATE TABLE {0}", s_OracleTables[ino].Key); |
2490 |
OutDB.ExecuteNonQuery(strSQL, false); |
2491 |
|
2492 |
List<ConstructionBudget> BuffList = new List<ConstructionBudget>(); |
2493 |
int DataCnt = 0; |
2494 |
while (DataCnt < getList.Count) |
2495 |
{ |
2496 |
BuffList.Clear(); |
2497 |
|
2498 |
for (int ii = 0; ii < s_LoopCount; ii++, DataCnt++) |
2499 |
{ |
2500 |
if (DataCnt >= getList.Count) break; |
2501 |
|
2502 |
BuffList.Add(getList[DataCnt]); |
2503 |
} |
2504 |
|
2505 |
if (!OutDB.InsertAction(BuffList, false)) |
2506 |
{ |
2507 |
OutDB.rollback(); |
2508 |
strMsg += " DB処理異常"; |
2509 |
return false; |
2510 |
} |
2511 |
} |
2512 |
|
2513 |
strMsg += string.Format(" 処理件数={0}", DataCnt.ToString("#,0")); |
2514 |
|
2515 |
return true; |
2516 |
} |
2517 |
catch (Exception ex) |
2518 |
{ |
2519 |
OutDB.rollback(); |
2520 |
|
2521 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
2522 |
strMsg += string.Format(" システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
2523 |
return false; |
2524 |
} |
2525 |
finally |
2526 |
{ |
2527 |
InDB.close(); InDB = null; |
2528 |
OutDB.commit(); |
2529 |
OutDB.close(); OutDB = null; |
2530 |
} |
2531 |
} |
2532 |
#endregion |
2533 |
|
2534 |
#region 工事施工予算データ明細(Constructionbudgetdetail) |
2535 |
/// <summary> |
2536 |
///工事施工予算データ明細(Constructionbudgetdetail) |
2537 |
/// </summary> |
2538 |
/// <param name="strMsg"></param> |
2539 |
/// <returns></returns> |
2540 |
private bool CnvConstructionbudgetdetail(int ino, ref string strMsg) |
2541 |
{ |
2542 |
ProcessManagement.OracleDB.IOAccess.IOConstructionBudgetDetail InDB = new ProcessManagement.OracleDB.IOAccess.IOConstructionBudgetDetail(); |
2543 |
ProcessManagement.DB.IOAccess.IOConstructionBudgetDetail OutDB = new ProcessManagement.DB.IOAccess.IOConstructionBudgetDetail(); |
2544 |
strMsg = string.Format("№{0}:テーブル:{1}({2})", (ino + 1).ToString("00"), s_OracleTables[ino].Value, s_OracleTables[ino].Key); |
2545 |
try |
2546 |
{ |
2547 |
EditDspLength(ref strMsg); |
2548 |
|
2549 |
string strSQL = CreateOrder(s_OracleTables[ino].Key); |
2550 |
List<ConstructionBudgetDetail> getList = new List<ConstructionBudgetDetail>(); |
2551 |
if (!InDB.SelectAction(strSQL, ref getList)) return false; |
2552 |
|
2553 |
OutDB.connect(); OutDB.beginTran(); |
2554 |
strSQL = string.Format("TRUNCATE TABLE {0}", s_OracleTables[ino].Key); |
2555 |
OutDB.ExecuteNonQuery(strSQL, false); |
2556 |
|
2557 |
List<ConstructionBudgetDetail> BuffList = new List<ConstructionBudgetDetail>(); |
2558 |
int DataCnt = 0; |
2559 |
while (DataCnt < getList.Count) |
2560 |
{ |
2561 |
BuffList.Clear(); |
2562 |
|
2563 |
for (int ii = 0; ii < s_LoopCount; ii++, DataCnt++) |
2564 |
{ |
2565 |
if (DataCnt >= getList.Count) break; |
2566 |
|
2567 |
BuffList.Add(getList[DataCnt]); |
2568 |
} |
2569 |
|
2570 |
if (!OutDB.InsertAction(BuffList, false)) |
2571 |
{ |
2572 |
OutDB.rollback(); |
2573 |
strMsg += " DB処理異常"; |
2574 |
return false; |
2575 |
} |
2576 |
} |
2577 |
|
2578 |
strMsg += string.Format(" 処理件数={0}", DataCnt.ToString("#,0")); |
2579 |
|
2580 |
return true; |
2581 |
} |
2582 |
catch (Exception ex) |
2583 |
{ |
2584 |
OutDB.rollback(); |
2585 |
|
2586 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
2587 |
strMsg += string.Format(" システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
2588 |
return false; |
2589 |
} |
2590 |
finally |
2591 |
{ |
2592 |
InDB.close(); InDB = null; |
2593 |
OutDB.commit(); |
2594 |
OutDB.close(); OutDB = null; |
2595 |
} |
2596 |
} |
2597 |
#endregion |
2598 |
|
2599 |
#region 工種マスタ(Constructionitemmaster) |
2600 |
/// <summary> |
2601 |
/// 工種マスタ(Constructionitemmaster) |
2602 |
/// </summary> |
2603 |
/// <param name="strMsg"></param> |
2604 |
/// <returns></returns> |
2605 |
private bool CnvConstructionitemmaster(int ino, ref string strMsg) |
2606 |
{ |
2607 |
ProcessManagement.OracleDB.IOAccess.IOMConstructionItem InDB = new ProcessManagement.OracleDB.IOAccess.IOMConstructionItem(); |
2608 |
ProcessManagement.DB.IOAccess.IOMConstructionItem OutDB = new ProcessManagement.DB.IOAccess.IOMConstructionItem(); |
2609 |
strMsg = string.Format("№{0}:テーブル:{1}({2})", (ino + 1).ToString("00"), s_OracleTables[ino].Value, s_OracleTables[ino].Key); |
2610 |
try |
2611 |
{ |
2612 |
EditDspLength(ref strMsg); |
2613 |
|
2614 |
string strSQL = CreateOrder(s_OracleTables[ino].Key); |
2615 |
List<ConstructionItemMaster> getList = new List<ConstructionItemMaster>(); |
2616 |
if (!InDB.SelectAction(strSQL, ref getList)) return false; |
2617 |
|
2618 |
OutDB.connect(); OutDB.beginTran(); |
2619 |
strSQL = string.Format("TRUNCATE TABLE {0}", s_OracleTables[ino].Key); |
2620 |
OutDB.ExecuteNonQuery(strSQL, false); |
2621 |
|
2622 |
List<ConstructionItemMaster> BuffList = new List<ConstructionItemMaster>(); |
2623 |
int DataCnt = 0; |
2624 |
while (DataCnt < getList.Count) |
2625 |
{ |
2626 |
BuffList.Clear(); |
2627 |
|
2628 |
for (int ii = 0; ii < s_LoopCount; ii++, DataCnt++) |
2629 |
{ |
2630 |
if (DataCnt >= getList.Count) break; |
2631 |
|
2632 |
BuffList.Add(getList[DataCnt]); |
2633 |
} |
2634 |
|
2635 |
if (!OutDB.InsertAction(BuffList, false)) |
2636 |
{ |
2637 |
OutDB.rollback(); |
2638 |
strMsg += " DB処理異常"; |
2639 |
return false; |
2640 |
} |
2641 |
} |
2642 |
|
2643 |
strMsg += string.Format(" 処理件数={0}", DataCnt.ToString("#,0")); |
2644 |
|
2645 |
return true; |
2646 |
} |
2647 |
catch (Exception ex) |
2648 |
{ |
2649 |
OutDB.rollback(); |
2650 |
|
2651 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
2652 |
strMsg += string.Format(" システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
2653 |
return false; |
2654 |
} |
2655 |
finally |
2656 |
{ |
2657 |
InDB.close(); InDB = null; |
2658 |
OutDB.commit(); |
2659 |
OutDB.close(); OutDB = null; |
2660 |
} |
2661 |
} |
2662 |
#endregion |
2663 |
|
2664 |
#region 工事詳細台帳データ(Constructionledger) |
2665 |
/// <summary> |
2666 |
/// 工事詳細台帳データ(Constructionledger) |
2667 |
/// </summary> |
2668 |
/// <param name="strMsg"></param> |
2669 |
/// <returns></returns> |
2670 |
private bool CnvConstructionledger(int ino, ref string strMsg) |
2671 |
{ |
2672 |
ProcessManagement.OracleDB.IOAccess.IOConstructionLedger InDB = new ProcessManagement.OracleDB.IOAccess.IOConstructionLedger(); |
2673 |
ProcessManagement.DB.IOAccess.IOConstructionLedger OutDB = new ProcessManagement.DB.IOAccess.IOConstructionLedger(); |
2674 |
strMsg = string.Format("№{0}:テーブル:{1}({2})", (ino + 1).ToString("00"), s_OracleTables[ino].Value, s_OracleTables[ino].Key); |
2675 |
try |
2676 |
{ |
2677 |
EditDspLength(ref strMsg); |
2678 |
|
2679 |
string strSQL = CreateOrder(s_OracleTables[ino].Key); |
2680 |
List<ConstructionLedger> getList = new List<ConstructionLedger>(); |
2681 |
if (!InDB.SelectAction(strSQL, ref getList)) return false; |
2682 |
|
2683 |
OutDB.connect(); OutDB.beginTran(); |
2684 |
strSQL = string.Format("TRUNCATE TABLE {0}", s_OracleTables[ino].Key); |
2685 |
OutDB.ExecuteNonQuery(strSQL, false); |
2686 |
|
2687 |
List<ConstructionLedger> BuffList = new List<ConstructionLedger>(); |
2688 |
int DataCnt = 0; |
2689 |
while (DataCnt < getList.Count) |
2690 |
{ |
2691 |
BuffList.Clear(); |
2692 |
|
2693 |
for (int ii = 0; ii < s_LoopCount; ii++, DataCnt++) |
2694 |
{ |
2695 |
if (DataCnt >= getList.Count) break; |
2696 |
|
2697 |
BuffList.Add(getList[DataCnt]); |
2698 |
} |
2699 |
|
2700 |
if (!OutDB.InsertAction(BuffList, false)) |
2701 |
{ |
2702 |
OutDB.rollback(); |
2703 |
strMsg += " DB処理異常"; |
2704 |
return false; |
2705 |
} |
2706 |
} |
2707 |
|
2708 |
strMsg += string.Format(" 処理件数={0}", DataCnt.ToString("#,0")); |
2709 |
|
2710 |
return true; |
2711 |
} |
2712 |
catch (Exception ex) |
2713 |
{ |
2714 |
OutDB.rollback(); |
2715 |
|
2716 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
2717 |
strMsg += string.Format(" システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
2718 |
return false; |
2719 |
} |
2720 |
finally |
2721 |
{ |
2722 |
InDB.close(); InDB = null; |
2723 |
OutDB.commit(); |
2724 |
OutDB.close(); OutDB = null; |
2725 |
} |
2726 |
} |
2727 |
#endregion |
2728 |
|
2729 |
#region 工事詳細台帳明細データ(Constructionledgerdetail) |
2730 |
/// <summary> |
2731 |
/// 工事詳細台帳明細データ(Constructionledgerdetail) |
2732 |
/// </summary> |
2733 |
/// <param name="strMsg"></param> |
2734 |
/// <returns></returns> |
2735 |
private bool CnvConstructionledgerdetail(int ino, ref string strMsg) |
2736 |
{ |
2737 |
ProcessManagement.OracleDB.IOAccess.IOConstructionLedgerDetail InDB = new ProcessManagement.OracleDB.IOAccess.IOConstructionLedgerDetail(); |
2738 |
ProcessManagement.DB.IOAccess.IOConstructionLedgerDetail OutDB = new ProcessManagement.DB.IOAccess.IOConstructionLedgerDetail(); |
2739 |
strMsg = string.Format("№{0}:テーブル:{1}({2})", (ino + 1).ToString("00"), s_OracleTables[ino].Value, s_OracleTables[ino].Key); |
2740 |
try |
2741 |
{ |
2742 |
EditDspLength(ref strMsg); |
2743 |
|
2744 |
string strSQL = CreateOrder(s_OracleTables[ino].Key); |
2745 |
List<ConstructionLedgerDetail> getList = new List<ConstructionLedgerDetail>(); |
2746 |
if (!InDB.SelectAction(strSQL, ref getList)) return false; |
2747 |
|
2748 |
OutDB.connect(); OutDB.beginTran(); |
2749 |
strSQL = string.Format("TRUNCATE TABLE {0}", s_OracleTables[ino].Key); |
2750 |
OutDB.ExecuteNonQuery(strSQL, false); |
2751 |
|
2752 |
List<ConstructionLedgerDetail> BuffList = new List<ConstructionLedgerDetail>(); |
2753 |
int DataCnt = 0; |
2754 |
while (DataCnt < getList.Count) |
2755 |
{ |
2756 |
BuffList.Clear(); |
2757 |
|
2758 |
for (int ii = 0; ii < s_LoopCount; ii++, DataCnt++) |
2759 |
{ |
2760 |
if (DataCnt >= getList.Count) break; |
2761 |
|
2762 |
BuffList.Add(getList[DataCnt]); |
2763 |
} |
2764 |
|
2765 |
if (!OutDB.InsertAction(BuffList, false)) |
2766 |
{ |
2767 |
OutDB.rollback(); |
2768 |
strMsg += " DB処理異常"; |
2769 |
return false; |
2770 |
} |
2771 |
} |
2772 |
|
2773 |
strMsg += string.Format(" 処理件数={0}", DataCnt.ToString("#,0")); |
2774 |
|
2775 |
return true; |
2776 |
} |
2777 |
catch (Exception ex) |
2778 |
{ |
2779 |
OutDB.rollback(); |
2780 |
|
2781 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
2782 |
strMsg += string.Format(" システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
2783 |
return false; |
2784 |
} |
2785 |
finally |
2786 |
{ |
2787 |
InDB.close(); InDB = null; |
2788 |
OutDB.commit(); |
2789 |
OutDB.close(); OutDB = null; |
2790 |
} |
2791 |
} |
2792 |
#endregion |
2793 |
|
2794 |
#region 工事詳細台帳実行データ(Constructionledgerexcute) |
2795 |
/// <summary> |
2796 |
/// 工事詳細台帳実行データ(Constructionledgerexcute) |
2797 |
/// </summary> |
2798 |
/// <param name="strMsg"></param> |
2799 |
/// <returns></returns> |
2800 |
private bool CnvConstructionledgerexcute(int ino, ref string strMsg) |
2801 |
{ |
2802 |
ProcessManagement.OracleDB.IOAccess.IOConstructionLedgerExcute InDB = new ProcessManagement.OracleDB.IOAccess.IOConstructionLedgerExcute(); |
2803 |
ProcessManagement.DB.IOAccess.IOConstructionLedgerExcute OutDB = new ProcessManagement.DB.IOAccess.IOConstructionLedgerExcute(); |
2804 |
strMsg = string.Format("№{0}:テーブル:{1}({2})", (ino + 1).ToString("00"), s_OracleTables[ino].Value, s_OracleTables[ino].Key); |
2805 |
try |
2806 |
{ |
2807 |
EditDspLength(ref strMsg); |
2808 |
|
2809 |
string strSQL = CreateOrder(s_OracleTables[ino].Key); |
2810 |
List<ConstructionLedgerExcute> getList = new List<ConstructionLedgerExcute>(); |
2811 |
if (!InDB.SelectAction(strSQL, ref getList)) return false; |
2812 |
|
2813 |
OutDB.connect(); OutDB.beginTran(); |
2814 |
strSQL = string.Format("TRUNCATE TABLE {0}", s_OracleTables[ino].Key); |
2815 |
OutDB.ExecuteNonQuery(strSQL, false); |
2816 |
|
2817 |
List<ConstructionLedgerExcute> BuffList = new List<ConstructionLedgerExcute>(); |
2818 |
int DataCnt = 0; |
2819 |
while (DataCnt < getList.Count) |
2820 |
{ |
2821 |
BuffList.Clear(); |
2822 |
|
2823 |
for (int ii = 0; ii < s_LoopCount; ii++, DataCnt++) |
2824 |
{ |
2825 |
if (DataCnt >= getList.Count) break; |
2826 |
|
2827 |
BuffList.Add(getList[DataCnt]); |
2828 |
} |
2829 |
|
2830 |
if (!OutDB.InsertAction(BuffList, false)) |
2831 |
{ |
2832 |
OutDB.rollback(); |
2833 |
strMsg += " DB処理異常"; |
2834 |
return false; |
2835 |
} |
2836 |
} |
2837 |
|
2838 |
strMsg += string.Format(" 処理件数={0}", DataCnt.ToString("#,0")); |
2839 |
|
2840 |
return true; |
2841 |
} |
2842 |
catch (Exception ex) |
2843 |
{ |
2844 |
OutDB.rollback(); |
2845 |
|
2846 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
2847 |
strMsg += string.Format(" システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
2848 |
return false; |
2849 |
} |
2850 |
finally |
2851 |
{ |
2852 |
InDB.close(); InDB = null; |
2853 |
OutDB.commit(); |
2854 |
OutDB.close(); OutDB = null; |
2855 |
} |
2856 |
} |
2857 |
#endregion |
2858 |
|
2859 |
#region 工事リンク情報(Constructionlink) |
2860 |
/// <summary> |
2861 |
/// 工事リンク情報(Constructionlink) |
2862 |
/// </summary> |
2863 |
/// <param name="strMsg"></param> |
2864 |
/// <returns></returns> |
2865 |
private bool CnvConstructionlink(int ino, ref string strMsg) |
2866 |
{ |
2867 |
ProcessManagement.OracleDB.IOAccess.IOConstructionLink InDB = new ProcessManagement.OracleDB.IOAccess.IOConstructionLink(); |
2868 |
ProcessManagement.DB.IOAccess.IOConstructionLink OutDB = new ProcessManagement.DB.IOAccess.IOConstructionLink(); |
2869 |
strMsg = string.Format("№{0}:テーブル:{1}({2})", (ino + 1).ToString("00"), s_OracleTables[ino].Value, s_OracleTables[ino].Key); |
2870 |
try |
2871 |
{ |
2872 |
EditDspLength(ref strMsg); |
2873 |
|
2874 |
string strSQL = CreateOrder(s_OracleTables[ino].Key); |
2875 |
List<ConstructionLink> getList = new List<ConstructionLink>(); |
2876 |
if (!InDB.SelectAction(strSQL, ref getList)) return false; |
2877 |
|
2878 |
OutDB.connect(); OutDB.beginTran(); |
2879 |
strSQL = string.Format("TRUNCATE TABLE {0}", s_OracleTables[ino].Key); |
2880 |
OutDB.ExecuteNonQuery(strSQL, false); |
2881 |
|
2882 |
List<ConstructionLink> BuffList = new List<ConstructionLink>(); |
2883 |
int DataCnt = 0; |
2884 |
while (DataCnt < getList.Count) |
2885 |
{ |
2886 |
BuffList.Clear(); |
2887 |
|
2888 |
for (int ii = 0; ii < s_LoopCount; ii++, DataCnt++) |
2889 |
{ |
2890 |
if (DataCnt >= getList.Count) break; |
2891 |
|
2892 |
BuffList.Add(getList[DataCnt]); |
2893 |
} |
2894 |
|
2895 |
if (!OutDB.InsertAction(BuffList, false)) |
2896 |
{ |
2897 |
OutDB.rollback(); |
2898 |
strMsg += " DB処理異常"; |
2899 |
return false; |
2900 |
} |
2901 |
} |
2902 |
|
2903 |
strMsg += string.Format(" 処理件数={0}", DataCnt.ToString("#,0")); |
2904 |
|
2905 |
return true; |
2906 |
} |
2907 |
catch (Exception ex) |
2908 |
{ |
2909 |
OutDB.rollback(); |
2910 |
|
2911 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
2912 |
strMsg += string.Format(" システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
2913 |
return false; |
2914 |
} |
2915 |
finally |
2916 |
{ |
2917 |
InDB.close(); InDB = null; |
2918 |
OutDB.commit(); |
2919 |
OutDB.close(); OutDB = null; |
2920 |
} |
2921 |
} |
2922 |
#endregion |
2923 |
|
2924 |
#region 案件進捗日付データ(Constructionprogressdate) |
2925 |
/// <summary> |
2926 |
/// 案件進捗日付データ(Constructionprogressdate) |
2927 |
/// </summary> |
2928 |
/// <param name="strMsg"></param> |
2929 |
/// <returns></returns> |
2930 |
private bool CnvConstructionprogressdate(int ino, ref string strMsg) |
2931 |
{ |
2932 |
ProcessManagement.OracleDB.IOAccess.IOConstructionProgressDate InDB = new ProcessManagement.OracleDB.IOAccess.IOConstructionProgressDate(); |
2933 |
ProcessManagement.DB.IOAccess.IOConstructionProgressDate OutDB = new ProcessManagement.DB.IOAccess.IOConstructionProgressDate(); |
2934 |
strMsg = string.Format("№{0}:テーブル:{1}({2})", (ino + 1).ToString("00"), s_OracleTables[ino].Value, s_OracleTables[ino].Key); |
2935 |
try |
2936 |
{ |
2937 |
EditDspLength(ref strMsg); |
2938 |
|
2939 |
string strSQL = CreateOrder(s_OracleTables[ino].Key); |
2940 |
List<ConstructionProgressDate> getList = new List<ConstructionProgressDate>(); |
2941 |
if (!InDB.SelectAction(strSQL, ref getList)) return false; |
2942 |
|
2943 |
OutDB.connect(); OutDB.beginTran(); |
2944 |
strSQL = string.Format("TRUNCATE TABLE {0}", s_OracleTables[ino].Key); |
2945 |
OutDB.ExecuteNonQuery(strSQL, false); |
2946 |
|
2947 |
List<ConstructionProgressDate> BuffList = new List<ConstructionProgressDate>(); |
2948 |
int DataCnt = 0; |
2949 |
while (DataCnt < getList.Count) |
2950 |
{ |
2951 |
BuffList.Clear(); |
2952 |
|
2953 |
for (int ii = 0; ii < s_LoopCount; ii++, DataCnt++) |
2954 |
{ |
2955 |
if (DataCnt >= getList.Count) break; |
2956 |
|
2957 |
BuffList.Add(getList[DataCnt]); |
2958 |
} |
2959 |
|
2960 |
if (!OutDB.InsertAction(BuffList, false)) |
2961 |
{ |
2962 |
OutDB.rollback(); |
2963 |
strMsg += " DB処理異常"; |
2964 |
return false; |
2965 |
} |
2966 |
} |
2967 |
|
2968 |
strMsg += string.Format(" 処理件数={0}", DataCnt.ToString("#,0")); |
2969 |
|
2970 |
return true; |
2971 |
} |
2972 |
catch (Exception ex) |
2973 |
{ |
2974 |
OutDB.rollback(); |
2975 |
|
2976 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
2977 |
strMsg += string.Format(" システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
2978 |
return false; |
2979 |
} |
2980 |
finally |
2981 |
{ |
2982 |
InDB.close(); InDB = null; |
2983 |
OutDB.commit(); |
2984 |
OutDB.close(); OutDB = null; |
2985 |
} |
2986 |
} |
2987 |
#endregion |
2988 |
|
2989 |
#region 作業マスタ(Constructionspecmaster) |
2990 |
/// <summary> |
2991 |
/// 作業マスタ(Constructionspecmaster) |
2992 |
/// </summary> |
2993 |
/// <param name="strMsg"></param> |
2994 |
/// <returns></returns> |
2995 |
private bool CnvConstructionspecmaster(int ino, ref string strMsg) |
2996 |
{ |
2997 |
ProcessManagement.OracleDB.IOAccess.IOMConstructionSpec InDB = new ProcessManagement.OracleDB.IOAccess.IOMConstructionSpec(); |
2998 |
ProcessManagement.DB.IOAccess.IOMConstructionSpec OutDB = new ProcessManagement.DB.IOAccess.IOMConstructionSpec(); |
2999 |
strMsg = string.Format("№{0}:テーブル:{1}({2})", (ino + 1).ToString("00"), s_OracleTables[ino].Value, s_OracleTables[ino].Key); |
3000 |
try |
3001 |
{ |
3002 |
EditDspLength(ref strMsg); |
3003 |
|
3004 |
string strSQL = CreateOrder(s_OracleTables[ino].Key); |
3005 |
List<ConstructionSpecMaster> getList = new List<ConstructionSpecMaster>(); |
3006 |
if (!InDB.SelectAction(strSQL, ref getList)) return false; |
3007 |
|
3008 |
OutDB.connect(); OutDB.beginTran(); |
3009 |
strSQL = string.Format("TRUNCATE TABLE {0}", s_OracleTables[ino].Key); |
3010 |
OutDB.ExecuteNonQuery(strSQL, false); |
3011 |
|
3012 |
List<ConstructionSpecMaster> BuffList = new List<ConstructionSpecMaster>(); |
3013 |
int DataCnt = 0; |
3014 |
while (DataCnt < getList.Count) |
3015 |
{ |
3016 |
BuffList.Clear(); |
3017 |
|
3018 |
for (int ii = 0; ii < s_LoopCount; ii++, DataCnt++) |
3019 |
{ |
3020 |
if (DataCnt >= getList.Count) break; |
3021 |
|
3022 |
BuffList.Add(getList[DataCnt]); |
3023 |
} |
3024 |
|
3025 |
if (!OutDB.InsertAction(BuffList, false)) |
3026 |
{ |
3027 |
OutDB.rollback(); |
3028 |
strMsg += " DB処理異常"; |
3029 |
return false; |
3030 |
} |
3031 |
} |
3032 |
|
3033 |
strMsg += string.Format(" 処理件数={0}", DataCnt.ToString("#,0")); |
3034 |
|
3035 |
return true; |
3036 |
} |
3037 |
catch (Exception ex) |
3038 |
{ |
3039 |
OutDB.rollback(); |
3040 |
|
3041 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
3042 |
strMsg += string.Format(" システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
3043 |
return false; |
3044 |
} |
3045 |
finally |
3046 |
{ |
3047 |
InDB.close(); InDB = null; |
3048 |
OutDB.commit(); |
3049 |
OutDB.close(); OutDB = null; |
3050 |
} |
3051 |
} |
3052 |
#endregion |
3053 |
|
3054 |
#region 作業単価マスタ(Constructionspecunitprice) |
3055 |
/// <summary> |
3056 |
/// 作業単価マスタ(Constructionspecunitprice) |
3057 |
/// </summary> |
3058 |
/// <param name="strMsg"></param> |
3059 |
/// <returns></returns> |
3060 |
private bool CnvConstructionspecunitprice(int ino, ref string strMsg) |
3061 |
{ |
3062 |
ProcessManagement.OracleDB.IOAccess.IOMConstructionSpecUnitPrice InDB = new ProcessManagement.OracleDB.IOAccess.IOMConstructionSpecUnitPrice(); |
3063 |
ProcessManagement.DB.IOAccess.IOMConstructionSpecUnitPrice OutDB = new ProcessManagement.DB.IOAccess.IOMConstructionSpecUnitPrice(); |
3064 |
strMsg = string.Format("№{0}:テーブル:{1}({2})", (ino + 1).ToString("00"), s_OracleTables[ino].Value, s_OracleTables[ino].Key); |
3065 |
try |
3066 |
{ |
3067 |
EditDspLength(ref strMsg); |
3068 |
|
3069 |
string strSQL = CreateOrder(s_OracleTables[ino].Key); |
3070 |
List<ConstructionSpecUnitPrice> getList = new List<ConstructionSpecUnitPrice>(); |
3071 |
if (!InDB.SelectAction(strSQL, ref getList)) return false; |
3072 |
|
3073 |
OutDB.connect(); OutDB.beginTran(); |
3074 |
strSQL = string.Format("TRUNCATE TABLE {0}", s_OracleTables[ino].Key); |
3075 |
OutDB.ExecuteNonQuery(strSQL, false); |
3076 |
|
3077 |
List<ConstructionSpecUnitPrice> BuffList = new List<ConstructionSpecUnitPrice>(); |
3078 |
int DataCnt = 0; |
3079 |
while (DataCnt < getList.Count) |
3080 |
{ |
3081 |
BuffList.Clear(); |
3082 |
|
3083 |
for (int ii = 0; ii < s_LoopCount; ii++, DataCnt++) |
3084 |
{ |
3085 |
if (DataCnt >= getList.Count) break; |
3086 |
|
3087 |
BuffList.Add(getList[DataCnt]); |
3088 |
} |
3089 |
|
3090 |
if (!OutDB.InsertAction(BuffList, false)) |
3091 |
{ |
3092 |
OutDB.rollback(); |
3093 |
strMsg += " DB処理異常"; |
3094 |
return false; |
3095 |
} |
3096 |
} |
3097 |
|
3098 |
strMsg += string.Format(" 処理件数={0}", DataCnt.ToString("#,0")); |
3099 |
|
3100 |
return true; |
3101 |
} |
3102 |
catch (Exception ex) |
3103 |
{ |
3104 |
OutDB.rollback(); |
3105 |
|
3106 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
3107 |
strMsg += string.Format(" システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
3108 |
return false; |
3109 |
} |
3110 |
finally |
3111 |
{ |
3112 |
InDB.close(); InDB = null; |
3113 |
OutDB.commit(); |
3114 |
OutDB.close(); OutDB = null; |
3115 |
} |
3116 |
} |
3117 |
#endregion |
3118 |
|
3119 |
#region 工事種別マスタ(Constructiontypemaster) |
3120 |
/// <summary> |
3121 |
/// 工事種別マスタ(Constructiontypemaster) |
3122 |
/// </summary> |
3123 |
/// <param name="strMsg"></param> |
3124 |
/// <returns></returns> |
3125 |
private bool CnvConstructiontypemaster(int ino, ref string strMsg) |
3126 |
{ |
3127 |
ProcessManagement.OracleDB.IOAccess.IOMConstructionType InDB = new ProcessManagement.OracleDB.IOAccess.IOMConstructionType(); |
3128 |
ProcessManagement.DB.IOAccess.IOMConstructionType OutDB = new ProcessManagement.DB.IOAccess.IOMConstructionType(); |
3129 |
strMsg = string.Format("№{0}:テーブル:{1}({2})", (ino + 1).ToString("00"), s_OracleTables[ino].Value, s_OracleTables[ino].Key); |
3130 |
try |
3131 |
{ |
3132 |
EditDspLength(ref strMsg); |
3133 |
|
3134 |
string strSQL = CreateOrder(s_OracleTables[ino].Key); |
3135 |
List<ConstructionTypeMaster> getList = new List<ConstructionTypeMaster>(); |
3136 |
if (!InDB.SelectAction(strSQL, ref getList)) return false; |
3137 |
|
3138 |
OutDB.connect(); OutDB.beginTran(); |
3139 |
strSQL = string.Format("TRUNCATE TABLE {0}", s_OracleTables[ino].Key); |
3140 |
OutDB.ExecuteNonQuery(strSQL, false); |
3141 |
|
3142 |
List<ConstructionTypeMaster> BuffList = new List<ConstructionTypeMaster>(); |
3143 |
int DataCnt = 0; |
3144 |
while (DataCnt < getList.Count) |
3145 |
{ |
3146 |
BuffList.Clear(); |
3147 |
|
3148 |
for (int ii = 0; ii < s_LoopCount; ii++, DataCnt++) |
3149 |
{ |
3150 |
if (DataCnt >= getList.Count) break; |
3151 |
|
3152 |
BuffList.Add(getList[DataCnt]); |
3153 |
} |
3154 |
|
3155 |
if (!OutDB.InsertAction(BuffList, false)) |
3156 |
{ |
3157 |
OutDB.rollback(); |
3158 |
strMsg += " DB処理異常"; |
3159 |
return false; |
3160 |
} |
3161 |
} |
3162 |
|
3163 |
strMsg += string.Format(" 処理件数={0}", DataCnt.ToString("#,0")); |
3164 |
|
3165 |
return true; |
3166 |
} |
3167 |
catch (Exception ex) |
3168 |
{ |
3169 |
OutDB.rollback(); |
3170 |
|
3171 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
3172 |
strMsg += string.Format(" システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
3173 |
return false; |
3174 |
} |
3175 |
finally |
3176 |
{ |
3177 |
InDB.close(); InDB = null; |
3178 |
OutDB.commit(); |
3179 |
OutDB.close(); OutDB = null; |
3180 |
} |
3181 |
} |
3182 |
#endregion |
3183 |
|
3184 |
#region 担当者毎経費データ(Costdataofperson) |
3185 |
/// <summary> |
3186 |
/// 担当者毎経費データ(Costdataofperson) |
3187 |
/// </summary> |
3188 |
/// <param name="strMsg"></param> |
3189 |
/// <returns></returns> |
3190 |
private bool CnvCostdataofperson(int ino, ref string strMsg) |
3191 |
{ |
3192 |
ProcessManagement.OracleDB.IOAccess.IOCostDataOfPerson InDB = new ProcessManagement.OracleDB.IOAccess.IOCostDataOfPerson(); |
3193 |
ProcessManagement.DB.IOAccess.IOCostDataOfPerson OutDB = new ProcessManagement.DB.IOAccess.IOCostDataOfPerson(); |
3194 |
strMsg = string.Format("№{0}:テーブル:{1}({2})", (ino + 1).ToString("00"), s_OracleTables[ino].Value, s_OracleTables[ino].Key); |
3195 |
try |
3196 |
{ |
3197 |
EditDspLength(ref strMsg); |
3198 |
|
3199 |
string strSQL = CreateOrder(s_OracleTables[ino].Key); |
3200 |
List<CostDataOfPerson> getList = new List<CostDataOfPerson>(); |
3201 |
if (!InDB.SelectAction(strSQL, ref getList)) return false; |
3202 |
|
3203 |
OutDB.connect(); OutDB.beginTran(); |
3204 |
strSQL = string.Format("TRUNCATE TABLE {0}", s_OracleTables[ino].Key); |
3205 |
OutDB.ExecuteNonQuery(strSQL, false); |
3206 |
|
3207 |
List<CostDataOfPerson> BuffList = new List<CostDataOfPerson>(); |
3208 |
int DataCnt = 0; |
3209 |
while (DataCnt < getList.Count) |
3210 |
{ |
3211 |
BuffList.Clear(); |
3212 |
|
3213 |
for (int ii = 0; ii < s_LoopCount; ii++, DataCnt++) |
3214 |
{ |
3215 |
if (DataCnt >= getList.Count) break; |
3216 |
|
3217 |
BuffList.Add(getList[DataCnt]); |
3218 |
} |
3219 |
|
3220 |
if (!OutDB.InsertAction(BuffList, false)) |
3221 |
{ |
3222 |
OutDB.rollback(); |
3223 |
strMsg += " DB処理異常"; |
3224 |
return false; |
3225 |
} |
3226 |
} |
3227 |
|
3228 |
strMsg += string.Format(" 処理件数={0}", DataCnt.ToString("#,0")); |
3229 |
|
3230 |
return true; |
3231 |
} |
3232 |
catch (Exception ex) |
3233 |
{ |
3234 |
OutDB.rollback(); |
3235 |
|
3236 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
3237 |
strMsg += string.Format(" システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
3238 |
return false; |
3239 |
} |
3240 |
finally |
3241 |
{ |
3242 |
InDB.close(); InDB = null; |
3243 |
OutDB.commit(); |
3244 |
OutDB.close(); OutDB = null; |
3245 |
} |
3246 |
} |
3247 |
#endregion |
3248 |
|
3249 |
#region 発注者登録申請データ(Costomerregist) |
3250 |
/// <summary> |
3251 |
/// 発注者登録申請データ(Costomerregist) |
3252 |
/// </summary> |
3253 |
/// <param name="strMsg"></param> |
3254 |
/// <returns></returns> |
3255 |
private bool CnvCostomerregist(int ino, ref string strMsg) |
3256 |
{ |
3257 |
ProcessManagement.OracleDB.IOAccess.IOCostomerRegist InDB = new ProcessManagement.OracleDB.IOAccess.IOCostomerRegist(); |
3258 |
ProcessManagement.DB.IOAccess.IOCostomerRegist OutDB = new ProcessManagement.DB.IOAccess.IOCostomerRegist(); |
3259 |
strMsg = string.Format("№{0}:テーブル:{1}({2})", (ino + 1).ToString("00"), s_OracleTables[ino].Value, s_OracleTables[ino].Key); |
3260 |
try |
3261 |
{ |
3262 |
EditDspLength(ref strMsg); |
3263 |
|
3264 |
string strSQL = CreateOrder(s_OracleTables[ino].Key); |
3265 |
List<CostomerRegist> getList = new List<CostomerRegist>(); |
3266 |
if (!InDB.SelectAction(strSQL, ref getList)) return false; |
3267 |
|
3268 |
OutDB.connect(); OutDB.beginTran(); |
3269 |
strSQL = string.Format("TRUNCATE TABLE {0}", s_OracleTables[ino].Key); |
3270 |
OutDB.ExecuteNonQuery(strSQL, false); |
3271 |
|
3272 |
List<CostomerRegist> BuffList = new List<CostomerRegist>(); |
3273 |
int DataCnt = 0; |
3274 |
while (DataCnt < getList.Count) |
3275 |
{ |
3276 |
BuffList.Clear(); |
3277 |
|
3278 |
for (int ii = 0; ii < s_LoopCount; ii++, DataCnt++) |
3279 |
{ |
3280 |
if (DataCnt >= getList.Count) break; |
3281 |
|
3282 |
BuffList.Add(getList[DataCnt]); |
3283 |
} |
3284 |
|
3285 |
if (!OutDB.InsertAction(BuffList, false)) |
3286 |
{ |
3287 |
OutDB.rollback(); |
3288 |
strMsg += " DB処理異常"; |
3289 |
return false; |
3290 |
} |
3291 |
} |
3292 |
|
3293 |
strMsg += string.Format(" 処理件数={0}", DataCnt.ToString("#,0")); |
3294 |
|
3295 |
return true; |
3296 |
} |
3297 |
catch (Exception ex) |
3298 |
{ |
3299 |
OutDB.rollback(); |
3300 |
|
3301 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
3302 |
strMsg += string.Format(" システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
3303 |
return false; |
3304 |
} |
3305 |
finally |
3306 |
{ |
3307 |
InDB.close(); InDB = null; |
3308 |
OutDB.commit(); |
3309 |
OutDB.close(); OutDB = null; |
3310 |
} |
3311 |
} |
3312 |
#endregion |
3313 |
|
3314 |
#region 日報データ(Dailydataconstruction) |
3315 |
/// <summary> |
3316 |
/// 日報データ(Dailydataconstruction) |
3317 |
/// </summary> |
3318 |
/// <param name="strMsg"></param> |
3319 |
/// <returns></returns> |
3320 |
private bool CnvDailydataconstruction(int ino, ref string strMsg) |
3321 |
{ |
3322 |
ProcessManagement.OracleDB.IOAccess.IODailyDataConstruction InDB = new ProcessManagement.OracleDB.IOAccess.IODailyDataConstruction(); |
3323 |
ProcessManagement.DB.IOAccess.IODailyDataConstruction OutDB = new ProcessManagement.DB.IOAccess.IODailyDataConstruction(); |
3324 |
strMsg = string.Format("№{0}:テーブル:{1}({2})", (ino + 1).ToString("00"), s_OracleTables[ino].Value, s_OracleTables[ino].Key); |
3325 |
try |
3326 |
{ |
3327 |
EditDspLength(ref strMsg); |
3328 |
|
3329 |
string strSQL = CreateOrder(s_OracleTables[ino].Key); |
3330 |
List<DailyDataConstruction> getList = new List<DailyDataConstruction>(); |
3331 |
if (!InDB.SelectAction(strSQL, ref getList)) return false; |
3332 |
|
3333 |
OutDB.connect(); OutDB.beginTran(); |
3334 |
strSQL = string.Format("TRUNCATE TABLE {0}", s_OracleTables[ino].Key); |
3335 |
OutDB.ExecuteNonQuery(strSQL, false); |
3336 |
|
3337 |
List<DailyDataConstruction> BuffList = new List<DailyDataConstruction>(); |
3338 |
int DataCnt = 0; |
3339 |
while (DataCnt < getList.Count) |
3340 |
{ |
3341 |
BuffList.Clear(); |
3342 |
|
3343 |
for (int ii = 0; ii < s_LoopCount; ii++, DataCnt++) |
3344 |
{ |
3345 |
if (DataCnt >= getList.Count) break; |
3346 |
|
3347 |
BuffList.Add(getList[DataCnt]); |
3348 |
} |
3349 |
|
3350 |
if (!OutDB.InsertAction(BuffList, false)) |
3351 |
{ |
3352 |
OutDB.rollback(); |
3353 |
strMsg += " DB処理異常"; |
3354 |
return false; |
3355 |
} |
3356 |
} |
3357 |
|
3358 |
strMsg += string.Format(" 処理件数={0}", DataCnt.ToString("#,0")); |
3359 |
|
3360 |
return true; |
3361 |
} |
3362 |
catch (Exception ex) |
3363 |
{ |
3364 |
OutDB.rollback(); |
3365 |
|
3366 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
3367 |
strMsg += string.Format(" システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
3368 |
return false; |
3369 |
} |
3370 |
finally |
3371 |
{ |
3372 |
InDB.close(); InDB = null; |
3373 |
OutDB.commit(); |
3374 |
OutDB.close(); OutDB = null; |
3375 |
} |
3376 |
} |
3377 |
#endregion |
3378 |
|
3379 |
#region 日報データ (明細)(Dailydatadetail) |
3380 |
/// <summary> |
3381 |
/// 日報データ (明細)(Dailydatadetail) |
3382 |
/// </summary> |
3383 |
/// <param name="strMsg"></param> |
3384 |
/// <returns></returns> |
3385 |
private bool CnvDailydatadetail(int ino, ref string strMsg) |
3386 |
{ |
3387 |
ProcessManagement.OracleDB.IOAccess.IODailyDataDetail InDB = new ProcessManagement.OracleDB.IOAccess.IODailyDataDetail(); |
3388 |
ProcessManagement.DB.IOAccess.IODailyDataDetail OutDB = new ProcessManagement.DB.IOAccess.IODailyDataDetail(); |
3389 |
strMsg = string.Format("№{0}:テーブル:{1}({2})", (ino + 1).ToString("00"), s_OracleTables[ino].Value, s_OracleTables[ino].Key); |
3390 |
try |
3391 |
{ |
3392 |
EditDspLength(ref strMsg); |
3393 |
|
3394 |
string strSQL = CreateOrder(s_OracleTables[ino].Key); |
3395 |
List<DailyDataDetail> getList = new List<DailyDataDetail>(); |
3396 |
if (!InDB.SelectAction(strSQL, ref getList)) return false; |
3397 |
|
3398 |
OutDB.connect(); OutDB.beginTran(); |
3399 |
strSQL = string.Format("TRUNCATE TABLE {0}", s_OracleTables[ino].Key); |
3400 |
OutDB.ExecuteNonQuery(strSQL, false); |
3401 |
|
3402 |
List<DailyDataDetail> BuffList = new List<DailyDataDetail>(); |
3403 |
int DataCnt = 0; |
3404 |
while (DataCnt < getList.Count) |
3405 |
{ |
3406 |
BuffList.Clear(); |
3407 |
|
3408 |
for (int ii = 0; ii < s_LoopCount; ii++, DataCnt++) |
3409 |
{ |
3410 |
if (DataCnt >= getList.Count) break; |
3411 |
|
3412 |
BuffList.Add(getList[DataCnt]); |
3413 |
} |
3414 |
|
3415 |
if (!OutDB.InsertAction(BuffList, false)) |
3416 |
{ |
3417 |
OutDB.rollback(); |
3418 |
strMsg += " DB処理異常"; |
3419 |
return false; |
3420 |
} |
3421 |
} |
3422 |
|
3423 |
strMsg += string.Format(" 処理件数={0}", DataCnt.ToString("#,0")); |
3424 |
|
3425 |
return true; |
3426 |
} |
3427 |
catch (Exception ex) |
3428 |
{ |
3429 |
OutDB.rollback(); |
3430 |
|
3431 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
3432 |
strMsg += string.Format(" システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
3433 |
return false; |
3434 |
} |
3435 |
finally |
3436 |
{ |
3437 |
InDB.close(); InDB = null; |
3438 |
OutDB.commit(); |
3439 |
OutDB.close(); OutDB = null; |
3440 |
} |
3441 |
} |
3442 |
#endregion |
3443 |
|
3444 |
#region 日報データ (現場巡回)(Dailydatafield) |
3445 |
/// <summary> |
3446 |
/// 日報データ (現場巡回)(Dailydatafield) |
3447 |
/// </summary> |
3448 |
/// <param name="strMsg"></param> |
3449 |
/// <returns></returns> |
3450 |
private bool CnvDailydatafield(int ino, ref string strMsg) |
3451 |
{ |
3452 |
ProcessManagement.OracleDB.IOAccess.IODailyDataField InDB = new ProcessManagement.OracleDB.IOAccess.IODailyDataField(); |
3453 |
ProcessManagement.DB.IOAccess.IODailyDataField OutDB = new ProcessManagement.DB.IOAccess.IODailyDataField(); |
3454 |
strMsg = string.Format("№{0}:テーブル:{1}({2})", (ino + 1).ToString("00"), s_OracleTables[ino].Value, s_OracleTables[ino].Key); |
3455 |
try |
3456 |
{ |
3457 |
EditDspLength(ref strMsg); |
3458 |
|
3459 |
string strSQL = CreateOrder(s_OracleTables[ino].Key); |
3460 |
List<DailyDataField> getList = new List<DailyDataField>(); |
3461 |
if (!InDB.SelectAction(strSQL, ref getList)) return false; |
3462 |
|
3463 |
OutDB.connect(); OutDB.beginTran(); |
3464 |
strSQL = string.Format("TRUNCATE TABLE {0}", s_OracleTables[ino].Key); |
3465 |
OutDB.ExecuteNonQuery(strSQL, false); |
3466 |
|
3467 |
List<DailyDataField> BuffList = new List<DailyDataField>(); |
3468 |
int DataCnt = 0; |
3469 |
while (DataCnt < getList.Count) |
3470 |
{ |
3471 |
BuffList.Clear(); |
3472 |
|
3473 |
for (int ii = 0; ii < s_LoopCount; ii++, DataCnt++) |
3474 |
{ |
3475 |
if (DataCnt >= getList.Count) break; |
3476 |
|
3477 |
BuffList.Add(getList[DataCnt]); |
3478 |
} |
3479 |
|
3480 |
if (!OutDB.InsertAction(BuffList, false)) |
3481 |
{ |
3482 |
OutDB.rollback(); |
3483 |
strMsg += " DB処理異常"; |
3484 |
return false; |
3485 |
} |
3486 |
} |
3487 |
|
3488 |
strMsg += string.Format(" 処理件数={0}", DataCnt.ToString("#,0")); |
3489 |
|
3490 |
return true; |
3491 |
} |
3492 |
catch (Exception ex) |
3493 |
{ |
3494 |
OutDB.rollback(); |
3495 |
|
3496 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
3497 |
strMsg += string.Format(" システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
3498 |
return false; |
3499 |
} |
3500 |
finally |
3501 |
{ |
3502 |
InDB.close(); InDB = null; |
3503 |
OutDB.commit(); |
3504 |
OutDB.close(); OutDB = null; |
3505 |
} |
3506 |
} |
3507 |
#endregion |
3508 |
|
3509 |
#region 日報データ (資材)(Dailydatamaterials) |
3510 |
/// <summary> |
3511 |
/// 日報データ (資材)(Dailydatamaterials) |
3512 |
/// </summary> |
3513 |
/// <param name="strMsg"></param> |
3514 |
/// <returns></returns> |
3515 |
private bool CnvDailydatamaterials(int ino, ref string strMsg) |
3516 |
{ |
3517 |
ProcessManagement.OracleDB.IOAccess.IODailyDataMaterials InDB = new ProcessManagement.OracleDB.IOAccess.IODailyDataMaterials(); |
3518 |
ProcessManagement.DB.IOAccess.IODailyDataMaterials OutDB = new ProcessManagement.DB.IOAccess.IODailyDataMaterials(); |
3519 |
strMsg = string.Format("№{0}:テーブル:{1}({2})", (ino + 1).ToString("00"), s_OracleTables[ino].Value, s_OracleTables[ino].Key); |
3520 |
try |
3521 |
{ |
3522 |
EditDspLength(ref strMsg); |
3523 |
|
3524 |
string strSQL = CreateOrder(s_OracleTables[ino].Key); |
3525 |
List<DailyDataMaterials> getList = new List<DailyDataMaterials>(); |
3526 |
if (!InDB.SelectAction(strSQL, ref getList)) return false; |
3527 |
|
3528 |
OutDB.connect(); OutDB.beginTran(); |
3529 |
strSQL = string.Format("TRUNCATE TABLE {0}", s_OracleTables[ino].Key); |
3530 |
OutDB.ExecuteNonQuery(strSQL, false); |
3531 |
|
3532 |
List<DailyDataMaterials> BuffList = new List<DailyDataMaterials>(); |
3533 |
int DataCnt = 0; |
3534 |
while (DataCnt < getList.Count) |
3535 |
{ |
3536 |
BuffList.Clear(); |
3537 |
|
3538 |
for (int ii = 0; ii < s_LoopCount; ii++, DataCnt++) |
3539 |
{ |
3540 |
if (DataCnt >= getList.Count) break; |
3541 |
|
3542 |
BuffList.Add(getList[DataCnt]); |
3543 |
} |
3544 |
|
3545 |
if (!OutDB.InsertAction(BuffList, false)) |
3546 |
{ |
3547 |
OutDB.rollback(); |
3548 |
strMsg += " DB処理異常"; |
3549 |
return false; |
3550 |
} |
3551 |
} |
3552 |
|
3553 |
strMsg += string.Format(" 処理件数={0}", DataCnt.ToString("#,0")); |
3554 |
|
3555 |
return true; |
3556 |
} |
3557 |
catch (Exception ex) |
3558 |
{ |
3559 |
OutDB.rollback(); |
3560 |
|
3561 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
3562 |
strMsg += string.Format(" システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
3563 |
return false; |
3564 |
} |
3565 |
finally |
3566 |
{ |
3567 |
InDB.close(); InDB = null; |
3568 |
OutDB.commit(); |
3569 |
OutDB.close(); OutDB = null; |
3570 |
} |
3571 |
} |
3572 |
#endregion |
3573 |
|
3574 |
#region 日報データ (協力業者指示)(Dailydatasubcontractors) |
3575 |
/// <summary> |
3576 |
/// 日報データ (協力業者指示)(Dailydatasubcontractors) |
3577 |
/// </summary> |
3578 |
/// <param name="strMsg"></param> |
3579 |
/// <returns></returns> |
3580 |
private bool CnvDailydatasubcontractors(int ino, ref string strMsg) |
3581 |
{ |
3582 |
ProcessManagement.OracleDB.IOAccess.IODailyDataSubcontractors InDB = new ProcessManagement.OracleDB.IOAccess.IODailyDataSubcontractors(); |
3583 |
ProcessManagement.DB.IOAccess.IODailyDataSubcontractors OutDB = new ProcessManagement.DB.IOAccess.IODailyDataSubcontractors(); |
3584 |
strMsg = string.Format("№{0}:テーブル:{1}({2})", (ino + 1).ToString("00"), s_OracleTables[ino].Value, s_OracleTables[ino].Key); |
3585 |
try |
3586 |
{ |
3587 |
EditDspLength(ref strMsg); |
3588 |
|
3589 |
string strSQL = CreateOrder(s_OracleTables[ino].Key); |
3590 |
List<DailyDataSubcontractors> getList = new List<DailyDataSubcontractors>(); |
3591 |
if (!InDB.SelectAction(strSQL, ref getList)) return false; |
3592 |
|
3593 |
OutDB.connect(); OutDB.beginTran(); |
3594 |
strSQL = string.Format("TRUNCATE TABLE {0}", s_OracleTables[ino].Key); |
3595 |
OutDB.ExecuteNonQuery(strSQL, false); |
3596 |
|
3597 |
List<DailyDataSubcontractors> BuffList = new List<DailyDataSubcontractors>(); |
3598 |
int DataCnt = 0; |
3599 |
while (DataCnt < getList.Count) |
3600 |
{ |
3601 |
BuffList.Clear(); |
3602 |
|
3603 |
for (int ii = 0; ii < s_LoopCount; ii++, DataCnt++) |
3604 |
{ |
3605 |
if (DataCnt >= getList.Count) break; |
3606 |
|
3607 |
BuffList.Add(getList[DataCnt]); |
3608 |
} |
3609 |
|
3610 |
if (!OutDB.InsertAction(BuffList, false)) |
3611 |
{ |
3612 |
OutDB.rollback(); |
3613 |
strMsg += " DB処理異常"; |
3614 |
return false; |
3615 |
} |
3616 |
} |
3617 |
|
3618 |
strMsg += string.Format(" 処理件数={0}", DataCnt.ToString("#,0")); |
3619 |
|
3620 |
return true; |
3621 |
} |
3622 |
catch (Exception ex) |
3623 |
{ |
3624 |
OutDB.rollback(); |
3625 |
|
3626 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
3627 |
strMsg += string.Format(" システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
3628 |
return false; |
3629 |
} |
3630 |
finally |
3631 |
{ |
3632 |
InDB.close(); InDB = null; |
3633 |
OutDB.commit(); |
3634 |
OutDB.close(); OutDB = null; |
3635 |
} |
3636 |
} |
3637 |
#endregion |
3638 |
|
3639 |
#region 日報データ (車両)(Dailydatavehicles) |
3640 |
/// <summary> |
3641 |
/// 日報データ (車両)(Dailydatavehicles) |
3642 |
/// </summary> |
3643 |
/// <param name="strMsg"></param> |
3644 |
/// <returns></returns> |
3645 |
private bool CnvDailydatavehicles(int ino, ref string strMsg) |
3646 |
{ |
3647 |
ProcessManagement.OracleDB.IOAccess.IODailyDataVehicles InDB = new ProcessManagement.OracleDB.IOAccess.IODailyDataVehicles(); |
3648 |
ProcessManagement.DB.IOAccess.IODailyDataVehicles OutDB = new ProcessManagement.DB.IOAccess.IODailyDataVehicles(); |
3649 |
strMsg = string.Format("№{0}:テーブル:{1}({2})", (ino + 1).ToString("00"), s_OracleTables[ino].Value, s_OracleTables[ino].Key); |
3650 |
try |
3651 |
{ |
3652 |
EditDspLength(ref strMsg); |
3653 |
|
3654 |
string strSQL = CreateOrder(s_OracleTables[ino].Key); |
3655 |
List<DailyDataVehicles> getList = new List<DailyDataVehicles>(); |
3656 |
if (!InDB.SelectAction(strSQL, ref getList)) return false; |
3657 |
|
3658 |
OutDB.connect(); OutDB.beginTran(); |
3659 |
strSQL = string.Format("TRUNCATE TABLE {0}", s_OracleTables[ino].Key); |
3660 |
OutDB.ExecuteNonQuery(strSQL, false); |
3661 |
|
3662 |
List<DailyDataVehicles> BuffList = new List<DailyDataVehicles>(); |
3663 |
int DataCnt = 0; |
3664 |
while (DataCnt < getList.Count) |
3665 |
{ |
3666 |
BuffList.Clear(); |
3667 |
|
3668 |
for (int ii = 0; ii < s_LoopCount; ii++, DataCnt++) |
3669 |
{ |
3670 |
if (DataCnt >= getList.Count) break; |
3671 |
|
3672 |
BuffList.Add(getList[DataCnt]); |
3673 |
} |
3674 |
|
3675 |
if (!OutDB.InsertAction(BuffList, false)) |
3676 |
{ |
3677 |
OutDB.rollback(); |
3678 |
strMsg += " DB処理異常"; |
3679 |
return false; |
3680 |
} |
3681 |
} |
3682 |
|
3683 |
strMsg += string.Format(" 処理件数={0}", DataCnt.ToString("#,0")); |
3684 |
|
3685 |
return true; |
3686 |
} |
3687 |
catch (Exception ex) |
3688 |
{ |
3689 |
OutDB.rollback(); |
3690 |
|
3691 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
3692 |
strMsg += string.Format(" システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
3693 |
return false; |
3694 |
} |
3695 |
finally |
3696 |
{ |
3697 |
InDB.close(); InDB = null; |
3698 |
OutDB.commit(); |
3699 |
OutDB.close(); OutDB = null; |
3700 |
} |
3701 |
} |
3702 |
#endregion |
3703 |
|
3704 |
#region 部署経費率マスタ(Departmentexpensesmaster) |
3705 |
/// <summary> |
3706 |
/// 部署経費率マスタ(Departmentexpensesmaster) |
3707 |
/// </summary> |
3708 |
/// <param name="strMsg"></param> |
3709 |
/// <returns></returns> |
3710 |
private bool CnvDepartmentexpensesmaster(int ino, ref string strMsg) |
3711 |
{ |
3712 |
ProcessManagement.OracleDB.IOAccess.IOMDepartmentExpenses InDB = new ProcessManagement.OracleDB.IOAccess.IOMDepartmentExpenses(); |
3713 |
ProcessManagement.DB.IOAccess.IOMDepartmentExpenses OutDB = new ProcessManagement.DB.IOAccess.IOMDepartmentExpenses(); |
3714 |
strMsg = string.Format("№{0}:テーブル:{1}({2})", (ino + 1).ToString("00"), s_OracleTables[ino].Value, s_OracleTables[ino].Key); |
3715 |
try |
3716 |
{ |
3717 |
EditDspLength(ref strMsg); |
3718 |
|
3719 |
string strSQL = CreateOrder(s_OracleTables[ino].Key); |
3720 |
List<DepartmentExpenses> getList = new List<DepartmentExpenses>(); |
3721 |
if (!InDB.SelectAction(strSQL, ref getList)) return false; |
3722 |
|
3723 |
OutDB.connect(); OutDB.beginTran(); |
3724 |
strSQL = string.Format("TRUNCATE TABLE {0}", s_OracleTables[ino].Key); |
3725 |
OutDB.ExecuteNonQuery(strSQL, false); |
3726 |
|
3727 |
List<DepartmentExpenses> BuffList = new List<DepartmentExpenses>(); |
3728 |
int DataCnt = 0; |
3729 |
while (DataCnt < getList.Count) |
3730 |
{ |
3731 |
BuffList.Clear(); |
3732 |
|
3733 |
for (int ii = 0; ii < s_LoopCount; ii++, DataCnt++) |
3734 |
{ |
3735 |
if (DataCnt >= getList.Count) break; |
3736 |
|
3737 |
BuffList.Add(getList[DataCnt]); |
3738 |
} |
3739 |
|
3740 |
if (!OutDB.InsertAction(BuffList, false)) |
3741 |
{ |
3742 |
OutDB.rollback(); |
3743 |
strMsg += " DB処理異常"; |
3744 |
return false; |
3745 |
} |
3746 |
} |
3747 |
|
3748 |
strMsg += string.Format(" 処理件数={0}", DataCnt.ToString("#,0")); |
3749 |
|
3750 |
return true; |
3751 |
} |
3752 |
catch (Exception ex) |
3753 |
{ |
3754 |
OutDB.rollback(); |
3755 |
|
3756 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
3757 |
strMsg += string.Format(" システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
3758 |
return false; |
3759 |
} |
3760 |
finally |
3761 |
{ |
3762 |
InDB.close(); InDB = null; |
3763 |
OutDB.commit(); |
3764 |
OutDB.close(); OutDB = null; |
3765 |
} |
3766 |
} |
3767 |
#endregion |
3768 |
|
3769 |
#region 部署マスタ(Departmentmaster) |
3770 |
/// <summary> |
3771 |
/// 部署マスタ(Departmentmaster) |
3772 |
/// </summary> |
3773 |
/// <param name="strMsg"></param> |
3774 |
/// <returns></returns> |
3775 |
private bool CnvDepartmentmaster(int ino, ref string strMsg) |
3776 |
{ |
3777 |
ProcessManagement.OracleDB.IOAccess.IOMDepartment InDB = new ProcessManagement.OracleDB.IOAccess.IOMDepartment(); |
3778 |
ProcessManagement.DB.IOAccess.IOMDepartment OutDB = new ProcessManagement.DB.IOAccess.IOMDepartment(); |
3779 |
strMsg = string.Format("№{0}:テーブル:{1}({2})", (ino + 1).ToString("00"), s_OracleTables[ino].Value, s_OracleTables[ino].Key); |
3780 |
try |
3781 |
{ |
3782 |
EditDspLength(ref strMsg); |
3783 |
|
3784 |
string strSQL = CreateOrder(s_OracleTables[ino].Key); |
3785 |
List<DepartmentMaster> getList = new List<DepartmentMaster>(); |
3786 |
if (!InDB.SelectAction(strSQL, ref getList)) return false; |
3787 |
|
3788 |
OutDB.connect(); OutDB.beginTran(); |
3789 |
strSQL = string.Format("TRUNCATE TABLE {0}", s_OracleTables[ino].Key); |
3790 |
OutDB.ExecuteNonQuery(strSQL, false); |
3791 |
|
3792 |
List<DepartmentMaster> BuffList = new List<DepartmentMaster>(); |
3793 |
int DataCnt = 0; |
3794 |
while (DataCnt < getList.Count) |
3795 |
{ |
3796 |
BuffList.Clear(); |
3797 |
|
3798 |
for (int ii = 0; ii < s_LoopCount; ii++, DataCnt++) |
3799 |
{ |
3800 |
if (DataCnt >= getList.Count) break; |
3801 |
|
3802 |
BuffList.Add(getList[DataCnt]); |
3803 |
} |
3804 |
|
3805 |
if (!OutDB.InsertAction(BuffList, false)) |
3806 |
{ |
3807 |
OutDB.rollback(); |
3808 |
strMsg += " DB処理異常"; |
3809 |
return false; |
3810 |
} |
3811 |
} |
3812 |
|
3813 |
strMsg += string.Format(" 処理件数={0}", DataCnt.ToString("#,0")); |
3814 |
|
3815 |
return true; |
3816 |
} |
3817 |
catch (Exception ex) |
3818 |
{ |
3819 |
OutDB.rollback(); |
3820 |
|
3821 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
3822 |
strMsg += string.Format(" システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
3823 |
return false; |
3824 |
} |
3825 |
finally |
3826 |
{ |
3827 |
InDB.close(); InDB = null; |
3828 |
OutDB.commit(); |
3829 |
OutDB.close(); OutDB = null; |
3830 |
} |
3831 |
} |
3832 |
#endregion |
3833 |
|
3834 |
#region 区分マスタ(Divisionmaster) |
3835 |
/// <summary> |
3836 |
/// 区分マスタ(Divisionmaster) |
3837 |
/// </summary> |
3838 |
/// <param name="strMsg"></param> |
3839 |
/// <returns></returns> |
3840 |
private bool CnvDivisionmaster(int ino, ref string strMsg) |
3841 |
{ |
3842 |
ProcessManagement.OracleDB.IOAccess.IOMDivision InDB = new ProcessManagement.OracleDB.IOAccess.IOMDivision(); |
3843 |
ProcessManagement.DB.IOAccess.IOMDivision OutDB = new ProcessManagement.DB.IOAccess.IOMDivision(); |
3844 |
strMsg = string.Format("№{0}:テーブル:{1}({2})", (ino + 1).ToString("00"), s_OracleTables[ino].Value, s_OracleTables[ino].Key); |
3845 |
try |
3846 |
{ |
3847 |
EditDspLength(ref strMsg); |
3848 |
|
3849 |
string strSQL = CreateOrder(s_OracleTables[ino].Key); |
3850 |
List<DivisionMaster> getList = new List<DivisionMaster>(); |
3851 |
if (!InDB.SelectAction(strSQL, ref getList)) return false; |
3852 |
|
3853 |
OutDB.connect(); OutDB.beginTran(); |
3854 |
strSQL = string.Format("TRUNCATE TABLE {0}", s_OracleTables[ino].Key); |
3855 |
OutDB.ExecuteNonQuery(strSQL, false); |
3856 |
|
3857 |
List<DivisionMaster> BuffList = new List<DivisionMaster>(); |
3858 |
int DataCnt = 0; |
3859 |
while (DataCnt < getList.Count) |
3860 |
{ |
3861 |
BuffList.Clear(); |
3862 |
|
3863 |
for (int ii = 0; ii < s_LoopCount; ii++, DataCnt++) |
3864 |
{ |
3865 |
if (DataCnt >= getList.Count) break; |
3866 |
|
3867 |
BuffList.Add(getList[DataCnt]); |
3868 |
} |
3869 |
|
3870 |
if (!OutDB.InsertAction(BuffList, false)) |
3871 |
{ |
3872 |
OutDB.rollback(); |
3873 |
strMsg += " DB処理異常"; |
3874 |
return false; |
3875 |
} |
3876 |
} |
3877 |
|
3878 |
strMsg += string.Format(" 処理件数={0}", DataCnt.ToString("#,0")); |
3879 |
|
3880 |
return true; |
3881 |
} |
3882 |
catch (Exception ex) |
3883 |
{ |
3884 |
OutDB.rollback(); |
3885 |
|
3886 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
3887 |
strMsg += string.Format(" システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
3888 |
return false; |
3889 |
} |
3890 |
finally |
3891 |
{ |
3892 |
InDB.close(); InDB = null; |
3893 |
OutDB.commit(); |
3894 |
OutDB.close(); OutDB = null; |
3895 |
} |
3896 |
} |
3897 |
#endregion |
3898 |
|
3899 |
#region 積算予算書データ(Estimatebudget) |
3900 |
/// <summary> |
3901 |
/// 積算予算書データ(Estimatebudget) |
3902 |
/// </summary> |
3903 |
/// <param name="strMsg"></param> |
3904 |
/// <returns></returns> |
3905 |
private bool CnvEstimatebudget(int ino, ref string strMsg) |
3906 |
{ |
3907 |
ProcessManagement.OracleDB.IOAccess.IOEstimateBudget InDB = new ProcessManagement.OracleDB.IOAccess.IOEstimateBudget(); |
3908 |
ProcessManagement.DB.IOAccess.IOEstimateBudget OutDB = new ProcessManagement.DB.IOAccess.IOEstimateBudget(); |
3909 |
strMsg = string.Format("№{0}:テーブル:{1}({2})", (ino + 1).ToString("00"), s_OracleTables[ino].Value, s_OracleTables[ino].Key); |
3910 |
try |
3911 |
{ |
3912 |
EditDspLength(ref strMsg); |
3913 |
|
3914 |
string strSQL = CreateOrder(s_OracleTables[ino].Key); |
3915 |
List<EstimateBudget> getList = new List<EstimateBudget>(); |
3916 |
if (!InDB.SelectAction(strSQL, ref getList)) return false; |
3917 |
|
3918 |
OutDB.connect(); OutDB.beginTran(); |
3919 |
strSQL = string.Format("TRUNCATE TABLE {0}", s_OracleTables[ino].Key); |
3920 |
OutDB.ExecuteNonQuery(strSQL, false); |
3921 |
|
3922 |
List<EstimateBudget> BuffList = new List<EstimateBudget>(); |
3923 |
int DataCnt = 0; |
3924 |
while (DataCnt < getList.Count) |
3925 |
{ |
3926 |
BuffList.Clear(); |
3927 |
|
3928 |
for (int ii = 0; ii < s_LoopCount; ii++, DataCnt++) |
3929 |
{ |
3930 |
if (DataCnt >= getList.Count) break; |
3931 |
|
3932 |
BuffList.Add(getList[DataCnt]); |
3933 |
} |
3934 |
|
3935 |
if (!OutDB.InsertAction(BuffList, false)) |
3936 |
{ |
3937 |
OutDB.rollback(); |
3938 |
strMsg += " DB処理異常"; |
3939 |
return false; |
3940 |
} |
3941 |
} |
3942 |
|
3943 |
strMsg += string.Format(" 処理件数={0}", DataCnt.ToString("#,0")); |
3944 |
|
3945 |
return true; |
3946 |
} |
3947 |
catch (Exception ex) |
3948 |
{ |
3949 |
OutDB.rollback(); |
3950 |
|
3951 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
3952 |
strMsg += string.Format(" システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
3953 |
return false; |
3954 |
} |
3955 |
finally |
3956 |
{ |
3957 |
InDB.close(); InDB = null; |
3958 |
OutDB.commit(); |
3959 |
OutDB.close(); OutDB = null; |
3960 |
} |
3961 |
} |
3962 |
#endregion |
3963 |
|
3964 |
#region 積算予算内訳データ明細(Estimatebudgetdetail) |
3965 |
/// <summary> |
3966 |
/// 積算予算内訳データ明細(Estimatebudgetdetail) |
3967 |
/// </summary> |
3968 |
/// <param name="strMsg"></param> |
3969 |
/// <returns></returns> |
3970 |
private bool CnvEstimatebudgetdetail(int ino, ref string strMsg) |
3971 |
{ |
3972 |
ProcessManagement.OracleDB.IOAccess.IOEstimateBudgetDetail InDB = new ProcessManagement.OracleDB.IOAccess.IOEstimateBudgetDetail(); |
3973 |
ProcessManagement.DB.IOAccess.IOEstimateBudgetDetail OutDB = new ProcessManagement.DB.IOAccess.IOEstimateBudgetDetail(); |
3974 |
strMsg = string.Format("№{0}:テーブル:{1}({2})", (ino + 1).ToString("00"), s_OracleTables[ino].Value, s_OracleTables[ino].Key); |
3975 |
try |
3976 |
{ |
3977 |
EditDspLength(ref strMsg); |
3978 |
|
3979 |
string strSQL = CreateOrder(s_OracleTables[ino].Key); |
3980 |
List<EstimateBudgetDetail> getList = new List<EstimateBudgetDetail>(); |
3981 |
if (!InDB.SelectAction(strSQL, ref getList)) return false; |
3982 |
|
3983 |
OutDB.connect(); OutDB.beginTran(); |
3984 |
strSQL = string.Format("TRUNCATE TABLE {0}", s_OracleTables[ino].Key); |
3985 |
OutDB.ExecuteNonQuery(strSQL, false); |
3986 |
|
3987 |
List<EstimateBudgetDetail> BuffList = new List<EstimateBudgetDetail>(); |
3988 |
int DataCnt = 0; |
3989 |
while (DataCnt < getList.Count) |
3990 |
{ |
3991 |
BuffList.Clear(); |
3992 |
|
3993 |
for (int ii = 0; ii < s_LoopCount; ii++, DataCnt++) |
3994 |
{ |
3995 |
if (DataCnt >= getList.Count) break; |
3996 |
|
3997 |
BuffList.Add(getList[DataCnt]); |
3998 |
} |
3999 |
|
4000 |
if (!OutDB.InsertAction(BuffList, false)) |
4001 |
{ |
4002 |
OutDB.rollback(); |
4003 |
strMsg += " DB処理異常"; |
4004 |
return false; |
4005 |
} |
4006 |
} |
4007 |
|
4008 |
strMsg += string.Format(" 処理件数={0}", DataCnt.ToString("#,0")); |
4009 |
|
4010 |
return true; |
4011 |
} |
4012 |
catch (Exception ex) |
4013 |
{ |
4014 |
OutDB.rollback(); |
4015 |
|
4016 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
4017 |
strMsg += string.Format(" システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
4018 |
return false; |
4019 |
} |
4020 |
finally |
4021 |
{ |
4022 |
InDB.close(); InDB = null; |
4023 |
OutDB.commit(); |
4024 |
OutDB.close(); OutDB = null; |
4025 |
} |
4026 |
} |
4027 |
#endregion |
4028 |
|
4029 |
#region 積算見積データ(Estimatedata) |
4030 |
/// <summary> |
4031 |
/// 積算見積データ(Estimatedata) |
4032 |
/// </summary> |
4033 |
/// <param name="strMsg"></param> |
4034 |
/// <returns></returns> |
4035 |
private bool CnvEstimatedata(int ino, ref string strMsg) |
4036 |
{ |
4037 |
ProcessManagement.OracleDB.IOAccess.IOEstimateData InDB = new ProcessManagement.OracleDB.IOAccess.IOEstimateData(); |
4038 |
ProcessManagement.DB.IOAccess.IOEstimateData OutDB = new ProcessManagement.DB.IOAccess.IOEstimateData(); |
4039 |
strMsg = string.Format("№{0}:テーブル:{1}({2})", (ino + 1).ToString("00"), s_OracleTables[ino].Value, s_OracleTables[ino].Key); |
4040 |
try |
4041 |
{ |
4042 |
EditDspLength(ref strMsg); |
4043 |
|
4044 |
string strSQL = CreateOrder(s_OracleTables[ino].Key); |
4045 |
List<EstimateData> getList = new List<EstimateData>(); |
4046 |
if (!InDB.SelectAction(strSQL, ref getList)) return false; |
4047 |
|
4048 |
OutDB.connect(); OutDB.beginTran(); |
4049 |
strSQL = string.Format("TRUNCATE TABLE {0}", s_OracleTables[ino].Key); |
4050 |
OutDB.ExecuteNonQuery(strSQL, false); |
4051 |
|
4052 |
List<EstimateData> BuffList = new List<EstimateData>(); |
4053 |
int DataCnt = 0; |
4054 |
while (DataCnt < getList.Count) |
4055 |
{ |
4056 |
BuffList.Clear(); |
4057 |
|
4058 |
for (int ii = 0; ii < s_LoopCount; ii++, DataCnt++) |
4059 |
{ |
4060 |
if (DataCnt >= getList.Count) break; |
4061 |
|
4062 |
BuffList.Add(getList[DataCnt]); |
4063 |
} |
4064 |
|
4065 |
if (!OutDB.InsertAction(BuffList, false)) |
4066 |
{ |
4067 |
OutDB.rollback(); |
4068 |
strMsg += " DB処理異常"; |
4069 |
return false; |
4070 |
} |
4071 |
} |
4072 |
|
4073 |
strMsg += string.Format(" 処理件数={0}", DataCnt.ToString("#,0")); |
4074 |
|
4075 |
return true; |
4076 |
} |
4077 |
catch (Exception ex) |
4078 |
{ |
4079 |
OutDB.rollback(); |
4080 |
|
4081 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
4082 |
strMsg += string.Format(" システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
4083 |
return false; |
4084 |
} |
4085 |
finally |
4086 |
{ |
4087 |
InDB.close(); InDB = null; |
4088 |
OutDB.commit(); |
4089 |
OutDB.close(); OutDB = null; |
4090 |
} |
4091 |
} |
4092 |
#endregion |
4093 |
|
4094 |
#region 積算見積ページデータ(Estimatedatabody) |
4095 |
/// <summary> |
4096 |
/// 積算見積ページデータ(Estimatedatabody) |
4097 |
/// </summary> |
4098 |
/// <param name="strMsg"></param> |
4099 |
/// <returns></returns> |
4100 |
private bool CnvEstimatedatabody(int ino, ref string strMsg) |
4101 |
{ |
4102 |
ProcessManagement.OracleDB.IOAccess.IOEstimateDataBody InDB = new ProcessManagement.OracleDB.IOAccess.IOEstimateDataBody(); |
4103 |
ProcessManagement.DB.IOAccess.IOEstimateDataBody OutDB = new ProcessManagement.DB.IOAccess.IOEstimateDataBody(); |
4104 |
strMsg = string.Format("№{0}:テーブル:{1}({2})", (ino + 1).ToString("00"), s_OracleTables[ino].Value, s_OracleTables[ino].Key); |
4105 |
try |
4106 |
{ |
4107 |
EditDspLength(ref strMsg); |
4108 |
|
4109 |
string strSQL = CreateOrder(s_OracleTables[ino].Key); |
4110 |
List<EstimateDataBody> getList = new List<EstimateDataBody>(); |
4111 |
if (!InDB.SelectAction(strSQL, ref getList)) return false; |
4112 |
|
4113 |
OutDB.connect(); OutDB.beginTran(); |
4114 |
strSQL = string.Format("TRUNCATE TABLE {0}", s_OracleTables[ino].Key); |
4115 |
OutDB.ExecuteNonQuery(strSQL, false); |
4116 |
|
4117 |
List<EstimateDataBody> BuffList = new List<EstimateDataBody>(); |
4118 |
int DataCnt = 0; |
4119 |
while (DataCnt < getList.Count) |
4120 |
{ |
4121 |
BuffList.Clear(); |
4122 |
|
4123 |
for (int ii = 0; ii < s_LoopCount; ii++, DataCnt++) |
4124 |
{ |
4125 |
if (DataCnt >= getList.Count) break; |
4126 |
|
4127 |
BuffList.Add(getList[DataCnt]); |
4128 |
} |
4129 |
|
4130 |
if (!OutDB.InsertAction(BuffList, false)) |
4131 |
{ |
4132 |
OutDB.rollback(); |
4133 |
strMsg += " DB処理異常"; |
4134 |
return false; |
4135 |
} |
4136 |
} |
4137 |
|
4138 |
strMsg += string.Format(" 処理件数={0}", DataCnt.ToString("#,0")); |
4139 |
|
4140 |
return true; |
4141 |
} |
4142 |
catch (Exception ex) |
4143 |
{ |
4144 |
OutDB.rollback(); |
4145 |
|
4146 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
4147 |
strMsg += string.Format(" システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
4148 |
return false; |
4149 |
} |
4150 |
finally |
4151 |
{ |
4152 |
InDB.close(); InDB = null; |
4153 |
OutDB.commit(); |
4154 |
OutDB.close(); OutDB = null; |
4155 |
} |
4156 |
} |
4157 |
#endregion |
4158 |
|
4159 |
#region 積算見積データ明細(Estimatedatadetail) |
4160 |
/// <summary> |
4161 |
/// 積算見積データ明細(Estimatedatadetail) |
4162 |
/// </summary> |
4163 |
/// <param name="strMsg"></param> |
4164 |
/// <returns></returns> |
4165 |
private bool CnvEstimatedatadetail(int ino, ref string strMsg) |
4166 |
{ |
4167 |
ProcessManagement.OracleDB.IOAccess.IOEstimateDataDetail InDB = new ProcessManagement.OracleDB.IOAccess.IOEstimateDataDetail(); |
4168 |
ProcessManagement.DB.IOAccess.IOEstimateDataDetail OutDB = new ProcessManagement.DB.IOAccess.IOEstimateDataDetail(); |
4169 |
strMsg = string.Format("№{0}:テーブル:{1}({2})", (ino + 1).ToString("00"), s_OracleTables[ino].Value, s_OracleTables[ino].Key); |
4170 |
try |
4171 |
{ |
4172 |
EditDspLength(ref strMsg); |
4173 |
|
4174 |
string strSQL = CreateOrder(s_OracleTables[ino].Key); |
4175 |
List<EstimateDataDetail> getList = new List<EstimateDataDetail>(); |
4176 |
if (!InDB.SelectAction(strSQL, ref getList)) return false; |
4177 |
|
4178 |
OutDB.connect(); OutDB.beginTran(); |
4179 |
strSQL = string.Format("TRUNCATE TABLE {0}", s_OracleTables[ino].Key); |
4180 |
OutDB.ExecuteNonQuery(strSQL, false); |
4181 |
|
4182 |
List<EstimateDataDetail> BuffList = new List<EstimateDataDetail>(); |
4183 |
int DataCnt = 0; |
4184 |
while (DataCnt < getList.Count) |
4185 |
{ |
4186 |
BuffList.Clear(); |
4187 |
|
4188 |
for (int ii = 0; ii < s_LoopCount; ii++, DataCnt++) |
4189 |
{ |
4190 |
if (DataCnt >= getList.Count) break; |
4191 |
|
4192 |
BuffList.Add(getList[DataCnt]); |
4193 |
} |
4194 |
|
4195 |
if (!OutDB.InsertAction(BuffList, false)) |
4196 |
{ |
4197 |
OutDB.rollback(); |
4198 |
strMsg += " DB処理異常"; |
4199 |
return false; |
4200 |
} |
4201 |
} |
4202 |
|
4203 |
strMsg += string.Format(" 処理件数={0}", DataCnt.ToString("#,0")); |
4204 |
|
4205 |
return true; |
4206 |
} |
4207 |
catch (Exception ex) |
4208 |
{ |
4209 |
OutDB.rollback(); |
4210 |
|
4211 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
4212 |
strMsg += string.Format(" システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
4213 |
return false; |
4214 |
} |
4215 |
finally |
4216 |
{ |
4217 |
InDB.close(); InDB = null; |
4218 |
OutDB.commit(); |
4219 |
OutDB.close(); OutDB = null; |
4220 |
} |
4221 |
} |
4222 |
#endregion |
4223 |
|
4224 |
#region 会社休日マスタ(Holidaycalendermaster) |
4225 |
/// <summary> |
4226 |
/// 会社休日マスタ(Holidaycalendermaster) |
4227 |
/// </summary> |
4228 |
/// <param name="strMsg"></param> |
4229 |
/// <returns></returns> |
4230 |
private bool CnvHolidaycalendermaster(int ino, ref string strMsg) |
4231 |
{ |
4232 |
ProcessManagement.OracleDB.IOAccess.IOMHolidayCalender InDB = new ProcessManagement.OracleDB.IOAccess.IOMHolidayCalender(); |
4233 |
ProcessManagement.DB.IOAccess.IOMHolidayCalender OutDB = new ProcessManagement.DB.IOAccess.IOMHolidayCalender(); |
4234 |
strMsg = string.Format("№{0}:テーブル:{1}({2})", (ino + 1).ToString("00"), s_OracleTables[ino].Value, s_OracleTables[ino].Key); |
4235 |
try |
4236 |
{ |
4237 |
EditDspLength(ref strMsg); |
4238 |
|
4239 |
string strSQL = CreateOrder(s_OracleTables[ino].Key); |
4240 |
List<HolidayCalenderMaster> getList = new List<HolidayCalenderMaster>(); |
4241 |
if (!InDB.SelectAction(strSQL, ref getList)) return false; |
4242 |
|
4243 |
OutDB.connect(); OutDB.beginTran(); |
4244 |
strSQL = string.Format("TRUNCATE TABLE {0}", s_OracleTables[ino].Key); |
4245 |
OutDB.ExecuteNonQuery(strSQL, false); |
4246 |
|
4247 |
List<HolidayCalenderMaster> BuffList = new List<HolidayCalenderMaster>(); |
4248 |
int DataCnt = 0; |
4249 |
while (DataCnt < getList.Count) |
4250 |
{ |
4251 |
BuffList.Clear(); |
4252 |
|
4253 |
for (int ii = 0; ii < s_LoopCount; ii++, DataCnt++) |
4254 |
{ |
4255 |
if (DataCnt >= getList.Count) break; |
4256 |
|
4257 |
BuffList.Add(getList[DataCnt]); |
4258 |
} |
4259 |
|
4260 |
if (!OutDB.InsertAction(BuffList, false)) |
4261 |
{ |
4262 |
OutDB.rollback(); |
4263 |
strMsg += " DB処理異常"; |
4264 |
return false; |
4265 |
} |
4266 |
} |
4267 |
|
4268 |
strMsg += string.Format(" 処理件数={0}", DataCnt.ToString("#,0")); |
4269 |
|
4270 |
return true; |
4271 |
} |
4272 |
catch (Exception ex) |
4273 |
{ |
4274 |
OutDB.rollback(); |
4275 |
|
4276 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
4277 |
strMsg += string.Format(" システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
4278 |
return false; |
4279 |
} |
4280 |
finally |
4281 |
{ |
4282 |
InDB.close(); InDB = null; |
4283 |
OutDB.commit(); |
4284 |
OutDB.close(); OutDB = null; |
4285 |
} |
4286 |
} |
4287 |
#endregion |
4288 |
|
4289 |
#region 入力時検索履歴(Inputsearchlogdata) |
4290 |
/// <summary> |
4291 |
/// 入力時検索履歴(Inputsearchlogdata) |
4292 |
/// </summary> |
4293 |
/// <param name="strMsg"></param> |
4294 |
/// <returns></returns> |
4295 |
private bool CnvInputsearchlogdata(int ino, ref string strMsg) |
4296 |
{ |
4297 |
ProcessManagement.OracleDB.IOAccess.IOInputSearchLogData InDB = new ProcessManagement.OracleDB.IOAccess.IOInputSearchLogData(); |
4298 |
ProcessManagement.DB.IOAccess.IOInputSearchLogData OutDB = new ProcessManagement.DB.IOAccess.IOInputSearchLogData(); |
4299 |
strMsg = string.Format("№{0}:テーブル:{1}({2})", (ino + 1).ToString("00"), s_OracleTables[ino].Value, s_OracleTables[ino].Key); |
4300 |
try |
4301 |
{ |
4302 |
EditDspLength(ref strMsg); |
4303 |
|
4304 |
string strSQL = CreateOrder(s_OracleTables[ino].Key); |
4305 |
List<InputSearchLogData> getList = new List<InputSearchLogData>(); |
4306 |
if (!InDB.SelectAction(strSQL, ref getList)) return false; |
4307 |
|
4308 |
OutDB.connect(); OutDB.beginTran(); |
4309 |
strSQL = string.Format("TRUNCATE TABLE {0}", s_OracleTables[ino].Key); |
4310 |
OutDB.ExecuteNonQuery(strSQL, false); |
4311 |
|
4312 |
List<InputSearchLogData> BuffList = new List<InputSearchLogData>(); |
4313 |
int DataCnt = 0; |
4314 |
while (DataCnt < getList.Count) |
4315 |
{ |
4316 |
BuffList.Clear(); |
4317 |
|
4318 |
for (int ii = 0; ii < s_LoopCount; ii++, DataCnt++) |
4319 |
{ |
4320 |
if (DataCnt >= getList.Count) break; |
4321 |
|
4322 |
BuffList.Add(getList[DataCnt]); |
4323 |
} |
4324 |
|
4325 |
if (!OutDB.InsertAction(BuffList, false)) |
4326 |
{ |
4327 |
OutDB.rollback(); |
4328 |
strMsg += " DB処理異常"; |
4329 |
return false; |
4330 |
} |
4331 |
} |
4332 |
|
4333 |
strMsg += string.Format(" 処理件数={0}", DataCnt.ToString("#,0")); |
4334 |
|
4335 |
return true; |
4336 |
} |
4337 |
catch (Exception ex) |
4338 |
{ |
4339 |
OutDB.rollback(); |
4340 |
|
4341 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
4342 |
strMsg += string.Format(" システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
4343 |
return false; |
4344 |
} |
4345 |
finally |
4346 |
{ |
4347 |
InDB.close(); InDB = null; |
4348 |
OutDB.commit(); |
4349 |
OutDB.close(); OutDB = null; |
4350 |
} |
4351 |
} |
4352 |
#endregion |
4353 |
|
4354 |
#region 掲示板メッセージ(Messageboarddata) |
4355 |
/// <summary> |
4356 |
/// 掲示板メッセージ(Messageboarddata) |
4357 |
/// </summary> |
4358 |
/// <param name="strMsg"></param> |
4359 |
/// <returns></returns> |
4360 |
private bool CnvMessageboarddata(int ino, ref string strMsg) |
4361 |
{ |
4362 |
ProcessManagement.OracleDB.IOAccess.IOMessageBoardData InDB = new ProcessManagement.OracleDB.IOAccess.IOMessageBoardData(); |
4363 |
ProcessManagement.DB.IOAccess.IOMessageBoardData OutDB = new ProcessManagement.DB.IOAccess.IOMessageBoardData(); |
4364 |
strMsg = string.Format("№{0}:テーブル:{1}({2})", (ino + 1).ToString("00"), s_OracleTables[ino].Value, s_OracleTables[ino].Key); |
4365 |
try |
4366 |
{ |
4367 |
EditDspLength(ref strMsg); |
4368 |
|
4369 |
string strSQL = CreateOrder(s_OracleTables[ino].Key); |
4370 |
List<MessageBoardData> getList = new List<MessageBoardData>(); |
4371 |
if (!InDB.SelectAction(strSQL, ref getList)) return false; |
4372 |
|
4373 |
OutDB.connect(); OutDB.beginTran(); |
4374 |
strSQL = string.Format("TRUNCATE TABLE {0}", s_OracleTables[ino].Key); |
4375 |
OutDB.ExecuteNonQuery(strSQL, false); |
4376 |
|
4377 |
List<MessageBoardData> BuffList = new List<MessageBoardData>(); |
4378 |
int DataCnt = 0; |
4379 |
while (DataCnt < getList.Count) |
4380 |
{ |
4381 |
BuffList.Clear(); |
4382 |
|
4383 |
for (int ii = 0; ii < s_LoopCount; ii++, DataCnt++) |
4384 |
{ |
4385 |
if (DataCnt >= getList.Count) break; |
4386 |
|
4387 |
BuffList.Add(getList[DataCnt]); |
4388 |
} |
4389 |
|
4390 |
if (!OutDB.InsertAction(BuffList, false)) |
4391 |
{ |
4392 |
OutDB.rollback(); |
4393 |
strMsg += " DB処理異常"; |
4394 |
return false; |
4395 |
} |
4396 |
} |
4397 |
|
4398 |
strMsg += string.Format(" 処理件数={0}", DataCnt.ToString("#,0")); |
4399 |
|
4400 |
return true; |
4401 |
} |
4402 |
catch (Exception ex) |
4403 |
{ |
4404 |
OutDB.rollback(); |
4405 |
|
4406 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
4407 |
strMsg += string.Format(" システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
4408 |
return false; |
4409 |
} |
4410 |
finally |
4411 |
{ |
4412 |
InDB.close(); InDB = null; |
4413 |
OutDB.commit(); |
4414 |
OutDB.close(); OutDB = null; |
4415 |
} |
4416 |
} |
4417 |
#endregion |
4418 |
|
4419 |
#region 掲示板対象者テーブル(Messageboardterget) |
4420 |
/// <summary> |
4421 |
/// 掲示板対象者テーブル(Messageboardterget) |
4422 |
/// </summary> |
4423 |
/// <param name="strMsg"></param> |
4424 |
/// <returns></returns> |
4425 |
private bool CnvMessageboardterget(int ino, ref string strMsg) |
4426 |
{ |
4427 |
ProcessManagement.OracleDB.IOAccess.IOMessageBoardTerget InDB = new ProcessManagement.OracleDB.IOAccess.IOMessageBoardTerget(); |
4428 |
ProcessManagement.DB.IOAccess.IOMessageBoardTerget OutDB = new ProcessManagement.DB.IOAccess.IOMessageBoardTerget(); |
4429 |
strMsg = string.Format("№{0}:テーブル:{1}({2})", (ino + 1).ToString("00"), s_OracleTables[ino].Value, s_OracleTables[ino].Key); |
4430 |
try |
4431 |
{ |
4432 |
EditDspLength(ref strMsg); |
4433 |
|
4434 |
string strSQL = CreateOrder(s_OracleTables[ino].Key); |
4435 |
List<MessageBoardTerget> getList = new List<MessageBoardTerget>(); |
4436 |
if (!InDB.SelectAction(strSQL, ref getList)) return false; |
4437 |
|
4438 |
OutDB.connect(); OutDB.beginTran(); |
4439 |
strSQL = string.Format("TRUNCATE TABLE {0}", s_OracleTables[ino].Key); |
4440 |
OutDB.ExecuteNonQuery(strSQL, false); |
4441 |
|
4442 |
List<MessageBoardTerget> BuffList = new List<MessageBoardTerget>(); |
4443 |
int DataCnt = 0; |
4444 |
while (DataCnt < getList.Count) |
4445 |
{ |
4446 |
BuffList.Clear(); |
4447 |
|
4448 |
for (int ii = 0; ii < s_LoopCount; ii++, DataCnt++) |
4449 |
{ |
4450 |
if (DataCnt >= getList.Count) break; |
4451 |
|
4452 |
BuffList.Add(getList[DataCnt]); |
4453 |
} |
4454 |
|
4455 |
if (!OutDB.InsertAction(BuffList, false)) |
4456 |
{ |
4457 |
OutDB.rollback(); |
4458 |
strMsg += " DB処理異常"; |
4459 |
return false; |
4460 |
} |
4461 |
} |
4462 |
|
4463 |
strMsg += string.Format(" 処理件数={0}", DataCnt.ToString("#,0")); |
4464 |
|
4465 |
return true; |
4466 |
} |
4467 |
catch (Exception ex) |
4468 |
{ |
4469 |
OutDB.rollback(); |
4470 |
|
4471 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
4472 |
strMsg += string.Format(" システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
4473 |
return false; |
4474 |
} |
4475 |
finally |
4476 |
{ |
4477 |
InDB.close(); InDB = null; |
4478 |
OutDB.commit(); |
4479 |
OutDB.close(); OutDB = null; |
4480 |
} |
4481 |
} |
4482 |
#endregion |
4483 |
|
4484 |
#region 掲示板メッセージ閲覧履歴(Messagebrowsinghistory) |
4485 |
/// <summary> |
4486 |
/// 掲示板メッセージ閲覧履歴(Messagebrowsinghistory) |
4487 |
/// </summary> |
4488 |
/// <param name="strMsg"></param> |
4489 |
/// <returns></returns> |
4490 |
private bool CnvMessagebrowsinghistory(int ino, ref string strMsg) |
4491 |
{ |
4492 |
ProcessManagement.OracleDB.IOAccess.IOMessageBrowsingHistory InDB = new ProcessManagement.OracleDB.IOAccess.IOMessageBrowsingHistory(); |
4493 |
ProcessManagement.DB.IOAccess.IOMessageBrowsingHistory OutDB = new ProcessManagement.DB.IOAccess.IOMessageBrowsingHistory(); |
4494 |
strMsg = string.Format("№{0}:テーブル:{1}({2})", (ino + 1).ToString("00"), s_OracleTables[ino].Value, s_OracleTables[ino].Key); |
4495 |
try |
4496 |
{ |
4497 |
EditDspLength(ref strMsg); |
4498 |
|
4499 |
string strSQL = CreateOrder(s_OracleTables[ino].Key); |
4500 |
List<MessageBrowsingHistory> getList = new List<MessageBrowsingHistory>(); |
4501 |
if (!InDB.SelectAction(strSQL, ref getList)) return false; |
4502 |
|
4503 |
OutDB.connect(); OutDB.beginTran(); |
4504 |
strSQL = string.Format("TRUNCATE TABLE {0}", s_OracleTables[ino].Key); |
4505 |
OutDB.ExecuteNonQuery(strSQL, false); |
4506 |
|
4507 |
List<MessageBrowsingHistory> BuffList = new List<MessageBrowsingHistory>(); |
4508 |
int DataCnt = 0; |
4509 |
while (DataCnt < getList.Count) |
4510 |
{ |
4511 |
BuffList.Clear(); |
4512 |
|
4513 |
for (int ii = 0; ii < s_LoopCount; ii++, DataCnt++) |
4514 |
{ |
4515 |
if (DataCnt >= getList.Count) break; |
4516 |
|
4517 |
BuffList.Add(getList[DataCnt]); |
4518 |
} |
4519 |
|
4520 |
if (!OutDB.InsertAction(BuffList, false)) |
4521 |
{ |
4522 |
OutDB.rollback(); |
4523 |
strMsg += " DB処理異常"; |
4524 |
return false; |
4525 |
} |
4526 |
} |
4527 |
|
4528 |
strMsg += string.Format(" 処理件数={0}", DataCnt.ToString("#,0")); |
4529 |
|
4530 |
return true; |
4531 |
} |
4532 |
catch (Exception ex) |
4533 |
{ |
4534 |
OutDB.rollback(); |
4535 |
|
4536 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
4537 |
strMsg += string.Format(" システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
4538 |
return false; |
4539 |
} |
4540 |
finally |
4541 |
{ |
4542 |
InDB.close(); InDB = null; |
4543 |
OutDB.commit(); |
4544 |
OutDB.close(); OutDB = null; |
4545 |
} |
4546 |
} |
4547 |
#endregion |
4548 |
|
4549 |
#region 発注者マスタ(Orderersmaster) |
4550 |
/// <summary> |
4551 |
/// 発注者マスタ(Orderersmaster) |
4552 |
/// </summary> |
4553 |
/// <param name="strMsg"></param> |
4554 |
/// <returns></returns> |
4555 |
private bool CnvOrderersmaster(int ino, ref string strMsg) |
4556 |
{ |
4557 |
ProcessManagement.OracleDB.IOAccess.IOMOrderers InDB = new ProcessManagement.OracleDB.IOAccess.IOMOrderers(); |
4558 |
ProcessManagement.DB.IOAccess.IOMOrderers OutDB = new ProcessManagement.DB.IOAccess.IOMOrderers(); |
4559 |
strMsg = string.Format("№{0}:テーブル:{1}({2})", (ino + 1).ToString("00"), s_OracleTables[ino].Value, s_OracleTables[ino].Key); |
4560 |
try |
4561 |
{ |
4562 |
EditDspLength(ref strMsg); |
4563 |
|
4564 |
string strSQL = CreateOrder(s_OracleTables[ino].Key); |
4565 |
List<OrderersMaster> getList = new List<OrderersMaster>(); |
4566 |
if (!InDB.SelectAction(strSQL, ref getList)) return false; |
4567 |
|
4568 |
OutDB.connect(); OutDB.beginTran(); |
4569 |
strSQL = string.Format("TRUNCATE TABLE {0}", s_OracleTables[ino].Key); |
4570 |
OutDB.ExecuteNonQuery(strSQL, false); |
4571 |
|
4572 |
List<OrderersMaster> BuffList = new List<OrderersMaster>(); |
4573 |
int DataCnt = 0; |
4574 |
while (DataCnt < getList.Count) |
4575 |
{ |
4576 |
BuffList.Clear(); |
4577 |
|
4578 |
for (int ii = 0; ii < s_LoopCount; ii++, DataCnt++) |
4579 |
{ |
4580 |
if (DataCnt >= getList.Count) break; |
4581 |
|
4582 |
BuffList.Add(getList[DataCnt]); |
4583 |
} |
4584 |
|
4585 |
if (!OutDB.InsertAction(BuffList, false)) |
4586 |
{ |
4587 |
OutDB.rollback(); |
4588 |
strMsg += " DB処理異常"; |
4589 |
return false; |
4590 |
} |
4591 |
} |
4592 |
|
4593 |
strMsg += string.Format(" 処理件数={0}", DataCnt.ToString("#,0")); |
4594 |
|
4595 |
return true; |
4596 |
} |
4597 |
catch (Exception ex) |
4598 |
{ |
4599 |
OutDB.rollback(); |
4600 |
|
4601 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
4602 |
strMsg += string.Format(" システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
4603 |
return false; |
4604 |
} |
4605 |
finally |
4606 |
{ |
4607 |
InDB.close(); InDB = null; |
4608 |
OutDB.commit(); |
4609 |
OutDB.close(); OutDB = null; |
4610 |
} |
4611 |
} |
4612 |
#endregion |
4613 |
|
4614 |
#region 受注金額データ(Orderspricedata) |
4615 |
/// <summary> |
4616 |
/// 受注金額データ(Orderspricedata) |
4617 |
/// </summary> |
4618 |
/// <param name="strMsg"></param> |
4619 |
/// <returns></returns> |
4620 |
private bool CnvOrderspricedata(int ino, ref string strMsg) |
4621 |
{ |
4622 |
ProcessManagement.OracleDB.IOAccess.IOOrdersPriceData InDB = new ProcessManagement.OracleDB.IOAccess.IOOrdersPriceData(); |
4623 |
ProcessManagement.DB.IOAccess.IOOrdersPriceData OutDB = new ProcessManagement.DB.IOAccess.IOOrdersPriceData(); |
4624 |
strMsg = string.Format("№{0}:テーブル:{1}({2})", (ino + 1).ToString("00"), s_OracleTables[ino].Value, s_OracleTables[ino].Key); |
4625 |
try |
4626 |
{ |
4627 |
EditDspLength(ref strMsg); |
4628 |
|
4629 |
string strSQL = CreateOrder(s_OracleTables[ino].Key); |
4630 |
List<OrdersPriceData> getList = new List<OrdersPriceData>(); |
4631 |
if (!InDB.SelectAction(strSQL, ref getList)) return false; |
4632 |
|
4633 |
OutDB.connect(); OutDB.beginTran(); |
4634 |
strSQL = string.Format("TRUNCATE TABLE {0}", s_OracleTables[ino].Key); |
4635 |
OutDB.ExecuteNonQuery(strSQL, false); |
4636 |
|
4637 |
List<OrdersPriceData> BuffList = new List<OrdersPriceData>(); |
4638 |
int DataCnt = 0; |
4639 |
while (DataCnt < getList.Count) |
4640 |
{ |
4641 |
BuffList.Clear(); |
4642 |
|
4643 |
for (int ii = 0; ii < s_LoopCount; ii++, DataCnt++) |
4644 |
{ |
4645 |
if (DataCnt >= getList.Count) break; |
4646 |
|
4647 |
BuffList.Add(getList[DataCnt]); |
4648 |
} |
4649 |
|
4650 |
if (!OutDB.InsertAction(BuffList, false)) |
4651 |
{ |
4652 |
OutDB.rollback(); |
4653 |
strMsg += " DB処理異常"; |
4654 |
return false; |
4655 |
} |
4656 |
} |
4657 |
|
4658 |
strMsg += string.Format(" 処理件数={0}", DataCnt.ToString("#,0")); |
4659 |
|
4660 |
return true; |
4661 |
} |
4662 |
catch (Exception ex) |
4663 |
{ |
4664 |
OutDB.rollback(); |
4665 |
|
4666 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
4667 |
strMsg += string.Format(" システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
4668 |
return false; |
4669 |
} |
4670 |
finally |
4671 |
{ |
4672 |
InDB.close(); InDB = null; |
4673 |
OutDB.commit(); |
4674 |
OutDB.close(); OutDB = null; |
4675 |
} |
4676 |
} |
4677 |
#endregion |
4678 |
|
4679 |
#region 担当者承認データ(Personapproval) |
4680 |
/// <summary> |
4681 |
/// 担当者承認データ(Personapproval) |
4682 |
/// </summary> |
4683 |
/// <param name="strMsg"></param> |
4684 |
/// <returns></returns> |
4685 |
private bool CnvPersonapproval(int ino, ref string strMsg) |
4686 |
{ |
4687 |
ProcessManagement.OracleDB.IOAccess.IOPersonApproval InDB = new ProcessManagement.OracleDB.IOAccess.IOPersonApproval(); |
4688 |
ProcessManagement.DB.IOAccess.IOPersonApproval OutDB = new ProcessManagement.DB.IOAccess.IOPersonApproval(); |
4689 |
strMsg = string.Format("№{0}:テーブル:{1}({2})", (ino + 1).ToString("00"), s_OracleTables[ino].Value, s_OracleTables[ino].Key); |
4690 |
try |
4691 |
{ |
4692 |
EditDspLength(ref strMsg); |
4693 |
|
4694 |
string strSQL = CreateOrder(s_OracleTables[ino].Key); |
4695 |
List<PersonApproval> getList = new List<PersonApproval>(); |
4696 |
if (!InDB.SelectAction(strSQL, ref getList)) return false; |
4697 |
|
4698 |
OutDB.connect(); OutDB.beginTran(); |
4699 |
strSQL = string.Format("TRUNCATE TABLE {0}", s_OracleTables[ino].Key); |
4700 |
OutDB.ExecuteNonQuery(strSQL, false); |
4701 |
|
4702 |
List<PersonApproval> BuffList = new List<PersonApproval>(); |
4703 |
int DataCnt = 0; |
4704 |
while (DataCnt < getList.Count) |
4705 |
{ |
4706 |
BuffList.Clear(); |
4707 |
|
4708 |
for (int ii = 0; ii < s_LoopCount; ii++, DataCnt++) |
4709 |
{ |
4710 |
if (DataCnt >= getList.Count) break; |
4711 |
|
4712 |
BuffList.Add(getList[DataCnt]); |
4713 |
} |
4714 |
|
4715 |
if (!OutDB.InsertAction(BuffList, false)) |
4716 |
{ |
4717 |
OutDB.rollback(); |
4718 |
strMsg += " DB処理異常"; |
4719 |
return false; |
4720 |
} |
4721 |
} |
4722 |
|
4723 |
strMsg += string.Format(" 処理件数={0}", DataCnt.ToString("#,0")); |
4724 |
|
4725 |
return true; |
4726 |
} |
4727 |
catch (Exception ex) |
4728 |
{ |
4729 |
OutDB.rollback(); |
4730 |
|
4731 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
4732 |
strMsg += string.Format(" システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
4733 |
return false; |
4734 |
} |
4735 |
finally |
4736 |
{ |
4737 |
InDB.close(); InDB = null; |
4738 |
OutDB.commit(); |
4739 |
OutDB.close(); OutDB = null; |
4740 |
} |
4741 |
} |
4742 |
#endregion |
4743 |
|
4744 |
#region 担当者承認コメントデータ(Personapprovalcomment) |
4745 |
/// <summary> |
4746 |
/// 担当者承認コメントデータ(Personapprovalcomment) |
4747 |
/// </summary> |
4748 |
/// <param name="strMsg"></param> |
4749 |
/// <returns></returns> |
4750 |
private bool CnvPersonapprovalcomment(int ino, ref string strMsg) |
4751 |
{ |
4752 |
ProcessManagement.OracleDB.IOAccess.IOPersonApprovalComment InDB = new ProcessManagement.OracleDB.IOAccess.IOPersonApprovalComment(); |
4753 |
ProcessManagement.DB.IOAccess.IOPersonApprovalComment OutDB = new ProcessManagement.DB.IOAccess.IOPersonApprovalComment(); |
4754 |
strMsg = string.Format("№{0}:テーブル:{1}({2})", (ino + 1).ToString("00"), s_OracleTables[ino].Value, s_OracleTables[ino].Key); |
4755 |
try |
4756 |
{ |
4757 |
EditDspLength(ref strMsg); |
4758 |
|
4759 |
string strSQL = CreateOrder(s_OracleTables[ino].Key); |
4760 |
List<PersonApprovalComment> getList = new List<PersonApprovalComment>(); |
4761 |
if (!InDB.SelectAction(strSQL, ref getList)) return false; |
4762 |
|
4763 |
OutDB.connect(); OutDB.beginTran(); |
4764 |
strSQL = string.Format("TRUNCATE TABLE {0}", s_OracleTables[ino].Key); |
4765 |
OutDB.ExecuteNonQuery(strSQL, false); |
4766 |
|
4767 |
List<PersonApprovalComment> BuffList = new List<PersonApprovalComment>(); |
4768 |
int DataCnt = 0; |
4769 |
while (DataCnt < getList.Count) |
4770 |
{ |
4771 |
BuffList.Clear(); |
4772 |
|
4773 |
for (int ii = 0; ii < s_LoopCount; ii++, DataCnt++) |
4774 |
{ |
4775 |
if (DataCnt >= getList.Count) break; |
4776 |
|
4777 |
BuffList.Add(getList[DataCnt]); |
4778 |
} |
4779 |
|
4780 |
if (!OutDB.InsertAction(BuffList, false)) |
4781 |
{ |
4782 |
OutDB.rollback(); |
4783 |
strMsg += " DB処理異常"; |
4784 |
return false; |
4785 |
} |
4786 |
} |
4787 |
|
4788 |
strMsg += string.Format(" 処理件数={0}", DataCnt.ToString("#,0")); |
4789 |
|
4790 |
return true; |
4791 |
} |
4792 |
catch (Exception ex) |
4793 |
{ |
4794 |
OutDB.rollback(); |
4795 |
|
4796 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
4797 |
strMsg += string.Format(" システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
4798 |
return false; |
4799 |
} |
4800 |
finally |
4801 |
{ |
4802 |
InDB.close(); InDB = null; |
4803 |
OutDB.commit(); |
4804 |
OutDB.close(); OutDB = null; |
4805 |
} |
4806 |
} |
4807 |
#endregion |
4808 |
|
4809 |
#region 担当者対象部署マスタ(Persondepartmentmaster) |
4810 |
/// <summary> |
4811 |
/// 担当者対象部署マスタ(Persondepartmentmaster) |
4812 |
/// </summary> |
4813 |
/// <param name="strMsg"></param> |
4814 |
/// <returns></returns> |
4815 |
private bool CnvPersondepartmentmaster(int ino, ref string strMsg) |
4816 |
{ |
4817 |
ProcessManagement.OracleDB.IOAccess.IOMPersonDepartment InDB = new ProcessManagement.OracleDB.IOAccess.IOMPersonDepartment(); |
4818 |
ProcessManagement.DB.IOAccess.IOMPersonDepartment OutDB = new ProcessManagement.DB.IOAccess.IOMPersonDepartment(); |
4819 |
strMsg = string.Format("№{0}:テーブル:{1}({2})", (ino + 1).ToString("00"), s_OracleTables[ino].Value, s_OracleTables[ino].Key); |
4820 |
try |
4821 |
{ |
4822 |
EditDspLength(ref strMsg); |
4823 |
|
4824 |
string strSQL = CreateOrder(s_OracleTables[ino].Key); |
4825 |
List<PersonDepartmentMaster> getList = new List<PersonDepartmentMaster>(); |
4826 |
if (!InDB.SelectAction(strSQL, ref getList)) return false; |
4827 |
|
4828 |
OutDB.connect(); OutDB.beginTran(); |
4829 |
strSQL = string.Format("TRUNCATE TABLE {0}", s_OracleTables[ino].Key); |
4830 |
OutDB.ExecuteNonQuery(strSQL, false); |
4831 |
|
4832 |
List<PersonDepartmentMaster> BuffList = new List<PersonDepartmentMaster>(); |
4833 |
int DataCnt = 0; |
4834 |
while (DataCnt < getList.Count) |
4835 |
{ |
4836 |
BuffList.Clear(); |
4837 |
|
4838 |
for (int ii = 0; ii < s_LoopCount; ii++, DataCnt++) |
4839 |
{ |
4840 |
if (DataCnt >= getList.Count) break; |
4841 |
|
4842 |
BuffList.Add(getList[DataCnt]); |
4843 |
} |
4844 |
|
4845 |
if (!OutDB.InsertAction(BuffList, false)) |
4846 |
{ |
4847 |
OutDB.rollback(); |
4848 |
strMsg += " DB処理異常"; |
4849 |
return false; |
4850 |
} |
4851 |
} |
4852 |
|
4853 |
strMsg += string.Format(" 処理件数={0}", DataCnt.ToString("#,0")); |
4854 |
|
4855 |
return true; |
4856 |
} |
4857 |
catch (Exception ex) |
4858 |
{ |
4859 |
OutDB.rollback(); |
4860 |
|
4861 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
4862 |
strMsg += string.Format(" システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
4863 |
return false; |
4864 |
} |
4865 |
finally |
4866 |
{ |
4867 |
InDB.close(); InDB = null; |
4868 |
OutDB.commit(); |
4869 |
OutDB.close(); OutDB = null; |
4870 |
} |
4871 |
} |
4872 |
#endregion |
4873 |
|
4874 |
#region 担当者マスタ(Personinchargemaster) |
4875 |
/// <summary> |
4876 |
/// 担当者マスタ(Personinchargemaster) |
4877 |
/// </summary> |
4878 |
/// <param name="strMsg"></param> |
4879 |
/// <returns></returns> |
4880 |
private bool CnvPersoninchargemaster(int ino, ref string strMsg) |
4881 |
{ |
4882 |
ProcessManagement.OracleDB.IOAccess.IOMPersonInCharge InDB = new ProcessManagement.OracleDB.IOAccess.IOMPersonInCharge(); |
4883 |
ProcessManagement.DB.IOAccess.IOMPersonInCharge OutDB = new ProcessManagement.DB.IOAccess.IOMPersonInCharge(); |
4884 |
strMsg = string.Format("№{0}:テーブル:{1}({2})", (ino + 1).ToString("00"), s_OracleTables[ino].Value, s_OracleTables[ino].Key); |
4885 |
try |
4886 |
{ |
4887 |
EditDspLength(ref strMsg); |
4888 |
|
4889 |
string strSQL = CreateOrder(s_OracleTables[ino].Key); |
4890 |
List<PersonInChargeMaster> getList = new List<PersonInChargeMaster>(); |
4891 |
if (!InDB.SelectAction(strSQL, ref getList)) return false; |
4892 |
|
4893 |
OutDB.connect(); OutDB.beginTran(); |
4894 |
strSQL = string.Format("TRUNCATE TABLE {0}", s_OracleTables[ino].Key); |
4895 |
OutDB.ExecuteNonQuery(strSQL, false); |
4896 |
|
4897 |
List<PersonInChargeMaster> BuffList = new List<PersonInChargeMaster>(); |
4898 |
int DataCnt = 0; |
4899 |
while (DataCnt < getList.Count) |
4900 |
{ |
4901 |
BuffList.Clear(); |
4902 |
|
4903 |
for (int ii = 0; ii < s_LoopCount; ii++, DataCnt++) |
4904 |
{ |
4905 |
if (DataCnt >= getList.Count) break; |
4906 |
|
4907 |
BuffList.Add(getList[DataCnt]); |
4908 |
} |
4909 |
|
4910 |
if (!OutDB.InsertAction(BuffList, false)) |
4911 |
{ |
4912 |
OutDB.rollback(); |
4913 |
strMsg += " DB処理異常"; |
4914 |
return false; |
4915 |
} |
4916 |
} |
4917 |
|
4918 |
strMsg += string.Format(" 処理件数={0}", DataCnt.ToString("#,0")); |
4919 |
|
4920 |
return true; |
4921 |
} |
4922 |
catch (Exception ex) |
4923 |
{ |
4924 |
OutDB.rollback(); |
4925 |
|
4926 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
4927 |
strMsg += string.Format(" システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
4928 |
return false; |
4929 |
} |
4930 |
finally |
4931 |
{ |
4932 |
InDB.close(); InDB = null; |
4933 |
OutDB.commit(); |
4934 |
OutDB.close(); OutDB = null; |
4935 |
} |
4936 |
} |
4937 |
#endregion |
4938 |
|
4939 |
#region 担当者給与マスタ(Personsalarymaster) |
4940 |
/// <summary> |
4941 |
/// 担当者給与マスタ(Personsalarymaster) |
4942 |
/// </summary> |
4943 |
/// <param name="strMsg"></param> |
4944 |
/// <returns></returns> |
4945 |
private bool CnvPersonsalarymaster(int ino, ref string strMsg) |
4946 |
{ |
4947 |
ProcessManagement.OracleDB.IOAccess.IOMPersonSalary InDB = new ProcessManagement.OracleDB.IOAccess.IOMPersonSalary(); |
4948 |
ProcessManagement.DB.IOAccess.IOMPersonSalary OutDB = new ProcessManagement.DB.IOAccess.IOMPersonSalary(); |
4949 |
strMsg = string.Format("№{0}:テーブル:{1}({2})", (ino + 1).ToString("00"), s_OracleTables[ino].Value, s_OracleTables[ino].Key); |
4950 |
try |
4951 |
{ |
4952 |
EditDspLength(ref strMsg); |
4953 |
|
4954 |
string strSQL = CreateOrder(s_OracleTables[ino].Key); |
4955 |
List<PersonSalaryMaster> getList = new List<PersonSalaryMaster>(); |
4956 |
if (!InDB.SelectAction(strSQL, ref getList)) return false; |
4957 |
|
4958 |
OutDB.connect(); OutDB.beginTran(); |
4959 |
strSQL = string.Format("TRUNCATE TABLE {0}", s_OracleTables[ino].Key); |
4960 |
OutDB.ExecuteNonQuery(strSQL, false); |
4961 |
|
4962 |
List<PersonSalaryMaster> BuffList = new List<PersonSalaryMaster>(); |
4963 |
int DataCnt = 0; |
4964 |
while (DataCnt < getList.Count) |
4965 |
{ |
4966 |
BuffList.Clear(); |
4967 |
|
4968 |
for (int ii = 0; ii < s_LoopCount; ii++, DataCnt++) |
4969 |
{ |
4970 |
if (DataCnt >= getList.Count) break; |
4971 |
|
4972 |
BuffList.Add(getList[DataCnt]); |
4973 |
} |
4974 |
|
4975 |
if (!OutDB.InsertAction(BuffList, false)) |
4976 |
{ |
4977 |
OutDB.rollback(); |
4978 |
strMsg += " DB処理異常"; |
4979 |
return false; |
4980 |
} |
4981 |
} |
4982 |
|
4983 |
strMsg += string.Format(" 処理件数={0}", DataCnt.ToString("#,0")); |
4984 |
|
4985 |
return true; |
4986 |
} |
4987 |
catch (Exception ex) |
4988 |
{ |
4989 |
OutDB.rollback(); |
4990 |
|
4991 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
4992 |
strMsg += string.Format(" システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
4993 |
return false; |
4994 |
} |
4995 |
finally |
4996 |
{ |
4997 |
InDB.close(); InDB = null; |
4998 |
OutDB.commit(); |
4999 |
OutDB.close(); OutDB = null; |
5000 |
} |
5001 |
} |
5002 |
#endregion |
5003 |
|
5004 |
#region 発注者打ち合わせ議事録データ(Proceedingsdata) |
5005 |
/// <summary> |
5006 |
/// 発注者打ち合わせ議事録データ(Proceedingsdata) |
5007 |
/// </summary> |
5008 |
/// <param name="strMsg"></param> |
5009 |
/// <returns></returns> |
5010 |
private bool CnvProceedingsdata(int ino, ref string strMsg) |
5011 |
{ |
5012 |
ProcessManagement.OracleDB.IOAccess.IOProceedingsData InDB = new ProcessManagement.OracleDB.IOAccess.IOProceedingsData(); |
5013 |
ProcessManagement.DB.IOAccess.IOProceedingsData OutDB = new ProcessManagement.DB.IOAccess.IOProceedingsData(); |
5014 |
strMsg = string.Format("№{0}:テーブル:{1}({2})", (ino + 1).ToString("00"), s_OracleTables[ino].Value, s_OracleTables[ino].Key); |
5015 |
try |
5016 |
{ |
5017 |
EditDspLength(ref strMsg); |
5018 |
|
5019 |
string strSQL = CreateOrder(s_OracleTables[ino].Key); |
5020 |
List<ProceedingsData> getList = new List<ProceedingsData>(); |
5021 |
if (!InDB.SelectAction(strSQL, ref getList)) return false; |
5022 |
|
5023 |
OutDB.connect(); OutDB.beginTran(); |
5024 |
strSQL = string.Format("TRUNCATE TABLE {0}", s_OracleTables[ino].Key); |
5025 |
OutDB.ExecuteNonQuery(strSQL, false); |
5026 |
|
5027 |
List<ProceedingsData> BuffList = new List<ProceedingsData>(); |
5028 |
int DataCnt = 0; |
5029 |
while (DataCnt < getList.Count) |
5030 |
{ |
5031 |
BuffList.Clear(); |
5032 |
|
5033 |
for (int ii = 0; ii < s_LoopCount; ii++, DataCnt++) |
5034 |
{ |
5035 |
if (DataCnt >= getList.Count) break; |
5036 |
|
5037 |
BuffList.Add(getList[DataCnt]); |
5038 |
} |
5039 |
|
5040 |
if (!OutDB.InsertAction(BuffList, false)) |
5041 |
{ |
5042 |
OutDB.rollback(); |
5043 |
strMsg += " DB処理異常"; |
5044 |
return false; |
5045 |
} |
5046 |
} |
5047 |
|
5048 |
strMsg += string.Format(" 処理件数={0}", DataCnt.ToString("#,0")); |
5049 |
|
5050 |
return true; |
5051 |
} |
5052 |
catch (Exception ex) |
5053 |
{ |
5054 |
OutDB.rollback(); |
5055 |
|
5056 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
5057 |
strMsg += string.Format(" システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
5058 |
return false; |
5059 |
} |
5060 |
finally |
5061 |
{ |
5062 |
InDB.close(); InDB = null; |
5063 |
OutDB.commit(); |
5064 |
OutDB.close(); OutDB = null; |
5065 |
} |
5066 |
} |
5067 |
#endregion |
5068 |
|
5069 |
#region 発注者打ち合わせ議事録データ(出席者)(Proceedingsdataattend) |
5070 |
/// <summary> |
5071 |
/// 発注者打ち合わせ議事録データ(出席者)(Proceedingsdataattend) |
5072 |
/// </summary> |
5073 |
/// <param name="strMsg"></param> |
5074 |
/// <returns></returns> |
5075 |
private bool CnvProceedingsdataattend(int ino, ref string strMsg) |
5076 |
{ |
5077 |
ProcessManagement.OracleDB.IOAccess.IOProceedingsDataAttend InDB = new ProcessManagement.OracleDB.IOAccess.IOProceedingsDataAttend(); |
5078 |
ProcessManagement.DB.IOAccess.IOProceedingsDataAttend OutDB = new ProcessManagement.DB.IOAccess.IOProceedingsDataAttend(); |
5079 |
strMsg = string.Format("№{0}:テーブル:{1}({2})", (ino + 1).ToString("00"), s_OracleTables[ino].Value, s_OracleTables[ino].Key); |
5080 |
try |
5081 |
{ |
5082 |
EditDspLength(ref strMsg); |
5083 |
|
5084 |
string strSQL = CreateOrder(s_OracleTables[ino].Key); |
5085 |
List<ProceedingsDataAttend> getList = new List<ProceedingsDataAttend>(); |
5086 |
if (!InDB.SelectAction(strSQL, ref getList)) return false; |
5087 |
|
5088 |
OutDB.connect(); OutDB.beginTran(); |
5089 |
strSQL = string.Format("TRUNCATE TABLE {0}", s_OracleTables[ino].Key); |
5090 |
OutDB.ExecuteNonQuery(strSQL, false); |
5091 |
|
5092 |
List<ProceedingsDataAttend> BuffList = new List<ProceedingsDataAttend>(); |
5093 |
int DataCnt = 0; |
5094 |
while (DataCnt < getList.Count) |
5095 |
{ |
5096 |
BuffList.Clear(); |
5097 |
|
5098 |
for (int ii = 0; ii < s_LoopCount; ii++, DataCnt++) |
5099 |
{ |
5100 |
if (DataCnt >= getList.Count) break; |
5101 |
|
5102 |
BuffList.Add(getList[DataCnt]); |
5103 |
} |
5104 |
|
5105 |
if (!OutDB.InsertAction(BuffList, false)) |
5106 |
{ |
5107 |
OutDB.rollback(); |
5108 |
strMsg += " DB処理異常"; |
5109 |
return false; |
5110 |
} |
5111 |
} |
5112 |
|
5113 |
strMsg += string.Format(" 処理件数={0}", DataCnt.ToString("#,0")); |
5114 |
|
5115 |
return true; |
5116 |
} |
5117 |
catch (Exception ex) |
5118 |
{ |
5119 |
OutDB.rollback(); |
5120 |
|
5121 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
5122 |
strMsg += string.Format(" システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
5123 |
return false; |
5124 |
} |
5125 |
finally |
5126 |
{ |
5127 |
InDB.close(); InDB = null; |
5128 |
OutDB.commit(); |
5129 |
OutDB.close(); OutDB = null; |
5130 |
} |
5131 |
} |
5132 |
#endregion |
5133 |
|
5134 |
#region 発注者打ち合わせ議事録データ(明細)(Proceedingsdatadetail) |
5135 |
/// <summary> |
5136 |
/// 発注者打ち合わせ議事録データ(明細)(Proceedingsdatadetail) |
5137 |
/// </summary> |
5138 |
/// <param name="strMsg"></param> |
5139 |
/// <returns></returns> |
5140 |
private bool CnvProceedingsdatadetail(int ino, ref string strMsg) |
5141 |
{ |
5142 |
ProcessManagement.OracleDB.IOAccess.IOProceedingsDataDetail InDB = new ProcessManagement.OracleDB.IOAccess.IOProceedingsDataDetail(); |
5143 |
ProcessManagement.DB.IOAccess.IOProceedingsDataDetail OutDB = new ProcessManagement.DB.IOAccess.IOProceedingsDataDetail(); |
5144 |
strMsg = string.Format("№{0}:テーブル:{1}({2})", (ino + 1).ToString("00"), s_OracleTables[ino].Value, s_OracleTables[ino].Key); |
5145 |
try |
5146 |
{ |
5147 |
EditDspLength(ref strMsg); |
5148 |
|
5149 |
string strSQL = CreateOrder(s_OracleTables[ino].Key); |
5150 |
List<ProceedingsDataDetail> getList = new List<ProceedingsDataDetail>(); |
5151 |
if (!InDB.SelectAction(strSQL, ref getList)) return false; |
5152 |
|
5153 |
OutDB.connect(); OutDB.beginTran(); |
5154 |
strSQL = string.Format("TRUNCATE TABLE {0}", s_OracleTables[ino].Key); |
5155 |
OutDB.ExecuteNonQuery(strSQL, false); |
5156 |
|
5157 |
List<ProceedingsDataDetail> BuffList = new List<ProceedingsDataDetail>(); |
5158 |
int DataCnt = 0; |
5159 |
while (DataCnt < getList.Count) |
5160 |
{ |
5161 |
BuffList.Clear(); |
5162 |
|
5163 |
for (int ii = 0; ii < s_LoopCount; ii++, DataCnt++) |
5164 |
{ |
5165 |
if (DataCnt >= getList.Count) break; |
5166 |
|
5167 |
BuffList.Add(getList[DataCnt]); |
5168 |
} |
5169 |
|
5170 |
if (!OutDB.InsertAction(BuffList, false)) |
5171 |
{ |
5172 |
OutDB.rollback(); |
5173 |
strMsg += " DB処理異常"; |
5174 |
return false; |
5175 |
} |
5176 |
} |
5177 |
|
5178 |
strMsg += string.Format(" 処理件数={0}", DataCnt.ToString("#,0")); |
5179 |
|
5180 |
return true; |
5181 |
} |
5182 |
catch (Exception ex) |
5183 |
{ |
5184 |
OutDB.rollback(); |
5185 |
|
5186 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
5187 |
strMsg += string.Format(" システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
5188 |
return false; |
5189 |
} |
5190 |
finally |
5191 |
{ |
5192 |
InDB.close(); InDB = null; |
5193 |
OutDB.commit(); |
5194 |
OutDB.close(); OutDB = null; |
5195 |
} |
5196 |
} |
5197 |
#endregion |
5198 |
|
5199 |
#region 承認データ(Processapproval) |
5200 |
/// <summary> |
5201 |
/// 承認データ(Processapproval) |
5202 |
/// </summary> |
5203 |
/// <param name="strMsg"></param> |
5204 |
/// <returns></returns> |
5205 |
private bool CnvProcessapproval(int ino, ref string strMsg) |
5206 |
{ |
5207 |
ProcessManagement.OracleDB.IOAccess.IOProcessApproval InDB = new ProcessManagement.OracleDB.IOAccess.IOProcessApproval(); |
5208 |
ProcessManagement.DB.IOAccess.IOProcessApproval OutDB = new ProcessManagement.DB.IOAccess.IOProcessApproval(); |
5209 |
strMsg = string.Format("№{0}:テーブル:{1}({2})", (ino + 1).ToString("00"), s_OracleTables[ino].Value, s_OracleTables[ino].Key); |
5210 |
try |
5211 |
{ |
5212 |
EditDspLength(ref strMsg); |
5213 |
|
5214 |
string strSQL = CreateOrder(s_OracleTables[ino].Key); |
5215 |
List<ProcessApproval> getList = new List<ProcessApproval>(); |
5216 |
if (!InDB.SelectAction(strSQL, ref getList)) return false; |
5217 |
|
5218 |
OutDB.connect(); OutDB.beginTran(); |
5219 |
strSQL = string.Format("TRUNCATE TABLE {0}", s_OracleTables[ino].Key); |
5220 |
OutDB.ExecuteNonQuery(strSQL, false); |
5221 |
|
5222 |
List<ProcessApproval> BuffList = new List<ProcessApproval>(); |
5223 |
int DataCnt = 0; |
5224 |
while (DataCnt < getList.Count) |
5225 |
{ |
5226 |
BuffList.Clear(); |
5227 |
|
5228 |
for (int ii = 0; ii < s_LoopCount; ii++, DataCnt++) |
5229 |
{ |
5230 |
if (DataCnt >= getList.Count) break; |
5231 |
|
5232 |
BuffList.Add(getList[DataCnt]); |
5233 |
} |
5234 |
|
5235 |
if (!OutDB.InsertAction(BuffList, false)) |
5236 |
{ |
5237 |
OutDB.rollback(); |
5238 |
strMsg += " DB処理異常"; |
5239 |
return false; |
5240 |
} |
5241 |
} |
5242 |
|
5243 |
strMsg += string.Format(" 処理件数={0}", DataCnt.ToString("#,0")); |
5244 |
|
5245 |
return true; |
5246 |
} |
5247 |
catch (Exception ex) |
5248 |
{ |
5249 |
OutDB.rollback(); |
5250 |
|
5251 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
5252 |
strMsg += string.Format(" システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
5253 |
return false; |
5254 |
} |
5255 |
finally |
5256 |
{ |
5257 |
InDB.close(); InDB = null; |
5258 |
OutDB.commit(); |
5259 |
OutDB.close(); OutDB = null; |
5260 |
} |
5261 |
} |
5262 |
#endregion |
5263 |
|
5264 |
#region 承認コメントデータ(Processapprovalcomment) |
5265 |
/// <summary> |
5266 |
/// 承認コメントデータ(Processapprovalcomment) |
5267 |
/// </summary> |
5268 |
/// <param name="strMsg"></param> |
5269 |
/// <returns></returns> |
5270 |
private bool CnvProcessapprovalcomment(int ino, ref string strMsg) |
5271 |
{ |
5272 |
ProcessManagement.OracleDB.IOAccess.IOProcessApprovalComment InDB = new ProcessManagement.OracleDB.IOAccess.IOProcessApprovalComment(); |
5273 |
ProcessManagement.DB.IOAccess.IOProcessApprovalComment OutDB = new ProcessManagement.DB.IOAccess.IOProcessApprovalComment(); |
5274 |
strMsg = string.Format("№{0}:テーブル:{1}({2})", (ino + 1).ToString("00"), s_OracleTables[ino].Value, s_OracleTables[ino].Key); |
5275 |
try |
5276 |
{ |
5277 |
EditDspLength(ref strMsg); |
5278 |
|
5279 |
string strSQL = CreateOrder(s_OracleTables[ino].Key); |
5280 |
List<ProcessApprovalComment> getList = new List<ProcessApprovalComment>(); |
5281 |
if (!InDB.SelectAction(strSQL, ref getList)) return false; |
5282 |
|
5283 |
OutDB.connect(); OutDB.beginTran(); |
5284 |
strSQL = string.Format("TRUNCATE TABLE {0}", s_OracleTables[ino].Key); |
5285 |
OutDB.ExecuteNonQuery(strSQL, false); |
5286 |
|
5287 |
List<ProcessApprovalComment> BuffList = new List<ProcessApprovalComment>(); |
5288 |
int DataCnt = 0; |
5289 |
while (DataCnt < getList.Count) |
5290 |
{ |
5291 |
BuffList.Clear(); |
5292 |
|
5293 |
for (int ii = 0; ii < s_LoopCount; ii++, DataCnt++) |
5294 |
{ |
5295 |
if (DataCnt >= getList.Count) break; |
5296 |
|
5297 |
BuffList.Add(getList[DataCnt]); |
5298 |
} |
5299 |
|
5300 |
if (!OutDB.InsertAction(BuffList, false)) |
5301 |
{ |
5302 |
OutDB.rollback(); |
5303 |
strMsg += " DB処理異常"; |
5304 |
return false; |
5305 |
} |
5306 |
} |
5307 |
|
5308 |
strMsg += string.Format(" 処理件数={0}", DataCnt.ToString("#,0")); |
5309 |
|
5310 |
return true; |
5311 |
} |
5312 |
catch (Exception ex) |
5313 |
{ |
5314 |
OutDB.rollback(); |
5315 |
|
5316 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
5317 |
strMsg += string.Format(" システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
5318 |
return false; |
5319 |
} |
5320 |
finally |
5321 |
{ |
5322 |
InDB.close(); InDB = null; |
5323 |
OutDB.commit(); |
5324 |
OutDB.close(); OutDB = null; |
5325 |
} |
5326 |
} |
5327 |
#endregion |
5328 |
|
5329 |
#region 承認明細データ(Processapprovaldetail) |
5330 |
/// <summary> |
5331 |
/// 承認明細データ(Processapprovaldetail) |
5332 |
/// </summary> |
5333 |
/// <param name="strMsg"></param> |
5334 |
/// <returns></returns> |
5335 |
private bool CnvProcessapprovaldetail(int ino, ref string strMsg) |
5336 |
{ |
5337 |
ProcessManagement.OracleDB.IOAccess.IOProcessApprovalDetail InDB = new ProcessManagement.OracleDB.IOAccess.IOProcessApprovalDetail(); |
5338 |
ProcessManagement.DB.IOAccess.IOProcessApprovalDetail OutDB = new ProcessManagement.DB.IOAccess.IOProcessApprovalDetail(); |
5339 |
strMsg = string.Format("№{0}:テーブル:{1}({2})", (ino + 1).ToString("00"), s_OracleTables[ino].Value, s_OracleTables[ino].Key); |
5340 |
try |
5341 |
{ |
5342 |
EditDspLength(ref strMsg); |
5343 |
|
5344 |
string strSQL = CreateOrder(s_OracleTables[ino].Key); |
5345 |
List<ProcessApprovalDetail> getList = new List<ProcessApprovalDetail>(); |
5346 |
if (!InDB.SelectAction(strSQL, ref getList)) return false; |
5347 |
|
5348 |
OutDB.connect(); OutDB.beginTran(); |
5349 |
strSQL = string.Format("TRUNCATE TABLE {0}", s_OracleTables[ino].Key); |
5350 |
OutDB.ExecuteNonQuery(strSQL, false); |
5351 |
|
5352 |
List<ProcessApprovalDetail> BuffList = new List<ProcessApprovalDetail>(); |
5353 |
int DataCnt = 0; |
5354 |
while (DataCnt < getList.Count) |
5355 |
{ |
5356 |
BuffList.Clear(); |
5357 |
|
5358 |
for (int ii = 0; ii < s_LoopCount; ii++, DataCnt++) |
5359 |
{ |
5360 |
if (DataCnt >= getList.Count) break; |
5361 |
|
5362 |
BuffList.Add(getList[DataCnt]); |
5363 |
} |
5364 |
|
5365 |
if (!OutDB.InsertAction(BuffList, false)) |
5366 |
{ |
5367 |
OutDB.rollback(); |
5368 |
strMsg += " DB処理異常"; |
5369 |
return false; |
5370 |
} |
5371 |
} |
5372 |
|
5373 |
strMsg += string.Format(" 処理件数={0}", DataCnt.ToString("#,0")); |
5374 |
|
5375 |
return true; |
5376 |
} |
5377 |
catch (Exception ex) |
5378 |
{ |
5379 |
OutDB.rollback(); |
5380 |
|
5381 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
5382 |
strMsg += string.Format(" システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
5383 |
return false; |
5384 |
} |
5385 |
finally |
5386 |
{ |
5387 |
InDB.close(); InDB = null; |
5388 |
OutDB.commit(); |
5389 |
OutDB.close(); OutDB = null; |
5390 |
} |
5391 |
} |
5392 |
#endregion |
5393 |
|
5394 |
#region 起動対象マスタ(Processexcutemaster) |
5395 |
/// <summary> |
5396 |
/// 起動対象マスタ(Processexcutemaster) |
5397 |
/// </summary> |
5398 |
/// <param name="strMsg"></param> |
5399 |
/// <returns></returns> |
5400 |
private bool CnvProcessexcutemaster(int ino, ref string strMsg) |
5401 |
{ |
5402 |
ProcessManagement.OracleDB.IOAccess.IOMProcessExcute InDB = new ProcessManagement.OracleDB.IOAccess.IOMProcessExcute(); |
5403 |
ProcessManagement.DB.IOAccess.IOMProcessExcute OutDB = new ProcessManagement.DB.IOAccess.IOMProcessExcute(); |
5404 |
strMsg = string.Format("№{0}:テーブル:{1}({2})", (ino + 1).ToString("00"), s_OracleTables[ino].Value, s_OracleTables[ino].Key); |
5405 |
try |
5406 |
{ |
5407 |
EditDspLength(ref strMsg); |
5408 |
|
5409 |
string strSQL = CreateOrder(s_OracleTables[ino].Key); |
5410 |
List<ProcessExcute> getList = new List<ProcessExcute>(); |
5411 |
if (!InDB.SelectAction(strSQL, ref getList)) return false; |
5412 |
|
5413 |
OutDB.connect(); OutDB.beginTran(); |
5414 |
strSQL = string.Format("TRUNCATE TABLE {0}", s_OracleTables[ino].Key); |
5415 |
OutDB.ExecuteNonQuery(strSQL, false); |
5416 |
|
5417 |
List<ProcessExcute> BuffList = new List<ProcessExcute>(); |
5418 |
int DataCnt = 0; |
5419 |
while (DataCnt < getList.Count) |
5420 |
{ |
5421 |
BuffList.Clear(); |
5422 |
|
5423 |
for (int ii = 0; ii < s_LoopCount; ii++, DataCnt++) |
5424 |
{ |
5425 |
if (DataCnt >= getList.Count) break; |
5426 |
|
5427 |
BuffList.Add(getList[DataCnt]); |
5428 |
} |
5429 |
|
5430 |
if (!OutDB.InsertAction(BuffList, false)) |
5431 |
{ |
5432 |
OutDB.rollback(); |
5433 |
strMsg += " DB処理異常"; |
5434 |
return false; |
5435 |
} |
5436 |
} |
5437 |
|
5438 |
strMsg += string.Format(" 処理件数={0}", DataCnt.ToString("#,0")); |
5439 |
|
5440 |
return true; |
5441 |
} |
5442 |
catch (Exception ex) |
5443 |
{ |
5444 |
OutDB.rollback(); |
5445 |
|
5446 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
5447 |
strMsg += string.Format(" システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
5448 |
return false; |
5449 |
} |
5450 |
finally |
5451 |
{ |
5452 |
InDB.close(); InDB = null; |
5453 |
OutDB.commit(); |
5454 |
OutDB.close(); OutDB = null; |
5455 |
} |
5456 |
} |
5457 |
#endregion |
5458 |
|
5459 |
#region 注文書データ(Purchaseorder) |
5460 |
/// <summary> |
5461 |
/// 注文書データ(Purchaseorder) |
5462 |
/// </summary> |
5463 |
/// <param name="strMsg"></param> |
5464 |
/// <returns></returns> |
5465 |
private bool CnvPurchaseorder(int ino, ref string strMsg) |
5466 |
{ |
5467 |
ProcessManagement.OracleDB.IOAccess.IOPurchaseOrder InDB = new ProcessManagement.OracleDB.IOAccess.IOPurchaseOrder(); |
5468 |
ProcessManagement.DB.IOAccess.IOPurchaseOrder OutDB = new ProcessManagement.DB.IOAccess.IOPurchaseOrder(); |
5469 |
strMsg = string.Format("№{0}:テーブル:{1}({2})", (ino + 1).ToString("00"), s_OracleTables[ino].Value, s_OracleTables[ino].Key); |
5470 |
try |
5471 |
{ |
5472 |
EditDspLength(ref strMsg); |
5473 |
|
5474 |
string strSQL = CreateOrder(s_OracleTables[ino].Key); |
5475 |
List<PurchaseOrder> getList = new List<PurchaseOrder>(); |
5476 |
if (!InDB.SelectAction(strSQL, ref getList)) return false; |
5477 |
|
5478 |
OutDB.connect(); OutDB.beginTran(); |
5479 |
strSQL = string.Format("TRUNCATE TABLE {0}", s_OracleTables[ino].Key); |
5480 |
OutDB.ExecuteNonQuery(strSQL, false); |
5481 |
|
5482 |
List<PurchaseOrder> BuffList = new List<PurchaseOrder>(); |
5483 |
int DataCnt = 0; |
5484 |
while (DataCnt < getList.Count) |
5485 |
{ |
5486 |
BuffList.Clear(); |
5487 |
|
5488 |
for (int ii = 0; ii < s_LoopCount; ii++, DataCnt++) |
5489 |
{ |
5490 |
if (DataCnt >= getList.Count) break; |
5491 |
|
5492 |
BuffList.Add(getList[DataCnt]); |
5493 |
} |
5494 |
|
5495 |
if (!OutDB.InsertAction(BuffList, false)) |
5496 |
{ |
5497 |
OutDB.rollback(); |
5498 |
strMsg += " DB処理異常"; |
5499 |
return false; |
5500 |
} |
5501 |
} |
5502 |
|
5503 |
strMsg += string.Format(" 処理件数={0}", DataCnt.ToString("#,0")); |
5504 |
|
5505 |
return true; |
5506 |
} |
5507 |
catch (Exception ex) |
5508 |
{ |
5509 |
OutDB.rollback(); |
5510 |
|
5511 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
5512 |
strMsg += string.Format(" システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
5513 |
return false; |
5514 |
} |
5515 |
finally |
5516 |
{ |
5517 |
InDB.close(); InDB = null; |
5518 |
OutDB.commit(); |
5519 |
OutDB.close(); OutDB = null; |
5520 |
} |
5521 |
} |
5522 |
#endregion |
5523 |
|
5524 |
#region 注文書明細データ(Purchaseorderdetail) |
5525 |
/// <summary> |
5526 |
/// 注文書明細データ(Purchaseorderdetail) |
5527 |
/// </summary> |
5528 |
/// <param name="strMsg"></param> |
5529 |
/// <returns></returns> |
5530 |
private bool CnvPurchaseorderdetail(int ino, ref string strMsg) |
5531 |
{ |
5532 |
ProcessManagement.OracleDB.IOAccess.IOPurchaseOrderDetail InDB = new ProcessManagement.OracleDB.IOAccess.IOPurchaseOrderDetail(); |
5533 |
ProcessManagement.DB.IOAccess.IOPurchaseOrderDetail OutDB = new ProcessManagement.DB.IOAccess.IOPurchaseOrderDetail(); |
5534 |
strMsg = string.Format("№{0}:テーブル:{1}({2})", (ino + 1).ToString("00"), s_OracleTables[ino].Value, s_OracleTables[ino].Key); |
5535 |
try |
5536 |
{ |
5537 |
EditDspLength(ref strMsg); |
5538 |
|
5539 |
string strSQL = CreateOrder(s_OracleTables[ino].Key); |
5540 |
List<PurchaseOrderDetail> getList = new List<PurchaseOrderDetail>(); |
5541 |
if (!InDB.SelectAction(strSQL, ref getList)) return false; |
5542 |
|
5543 |
OutDB.connect(); OutDB.beginTran(); |
5544 |
strSQL = string.Format("TRUNCATE TABLE {0}", s_OracleTables[ino].Key); |
5545 |
OutDB.ExecuteNonQuery(strSQL, false); |
5546 |
|
5547 |
List<PurchaseOrderDetail> BuffList = new List<PurchaseOrderDetail>(); |
5548 |
int DataCnt = 0; |
5549 |
while (DataCnt < getList.Count) |
5550 |
{ |
5551 |
BuffList.Clear(); |
5552 |
|
5553 |
for (int ii = 0; ii < s_LoopCount; ii++, DataCnt++) |
5554 |
{ |
5555 |
if (DataCnt >= getList.Count) break; |
5556 |
|
5557 |
BuffList.Add(getList[DataCnt]); |
5558 |
} |
5559 |
|
5560 |
if (!OutDB.InsertAction(BuffList, false)) |
5561 |
{ |
5562 |
OutDB.rollback(); |
5563 |
strMsg += " DB処理異常"; |
5564 |
return false; |
5565 |
} |
5566 |
} |
5567 |
|
5568 |
strMsg += string.Format(" 処理件数={0}", DataCnt.ToString("#,0")); |
5569 |
|
5570 |
return true; |
5571 |
} |
5572 |
catch (Exception ex) |
5573 |
{ |
5574 |
OutDB.rollback(); |
5575 |
|
5576 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
5577 |
strMsg += string.Format(" システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
5578 |
return false; |
5579 |
} |
5580 |
finally |
5581 |
{ |
5582 |
InDB.close(); InDB = null; |
5583 |
OutDB.commit(); |
5584 |
OutDB.close(); OutDB = null; |
5585 |
} |
5586 |
} |
5587 |
#endregion |
5588 |
|
5589 |
#region 売上グラフデータ(Salesgraphdata) |
5590 |
/// <summary> |
5591 |
/// 売上グラフデータ(Salesgraphdata) |
5592 |
/// </summary> |
5593 |
/// <param name="strMsg"></param> |
5594 |
/// <returns></returns> |
5595 |
private bool CnvSalesgraphdata(int ino, ref string strMsg) |
5596 |
{ |
5597 |
ProcessManagement.OracleDB.IOAccess.IOSalesGraphData InDB = new ProcessManagement.OracleDB.IOAccess.IOSalesGraphData(); |
5598 |
ProcessManagement.DB.IOAccess.IOSalesGraphData OutDB = new ProcessManagement.DB.IOAccess.IOSalesGraphData(); |
5599 |
strMsg = string.Format("№{0}:テーブル:{1}({2})", (ino + 1).ToString("00"), s_OracleTables[ino].Value, s_OracleTables[ino].Key); |
5600 |
try |
5601 |
{ |
5602 |
EditDspLength(ref strMsg); |
5603 |
|
5604 |
string strSQL = CreateOrder(s_OracleTables[ino].Key); |
5605 |
List<SalesGraphData> getList = new List<SalesGraphData>(); |
5606 |
if (!InDB.SelectAction(strSQL, ref getList)) return false; |
5607 |
|
5608 |
OutDB.connect(); OutDB.beginTran(); |
5609 |
strSQL = string.Format("TRUNCATE TABLE {0}", s_OracleTables[ino].Key); |
5610 |
OutDB.ExecuteNonQuery(strSQL, false); |
5611 |
|
5612 |
List<SalesGraphData> BuffList = new List<SalesGraphData>(); |
5613 |
int DataCnt = 0; |
5614 |
while (DataCnt < getList.Count) |
5615 |
{ |
5616 |
BuffList.Clear(); |
5617 |
|
5618 |
for (int ii = 0; ii < s_LoopCount; ii++, DataCnt++) |
5619 |
{ |
5620 |
if (DataCnt >= getList.Count) break; |
5621 |
|
5622 |
BuffList.Add(getList[DataCnt]); |
5623 |
} |
5624 |
|
5625 |
if (!OutDB.InsertAction(BuffList, false)) |
5626 |
{ |
5627 |
OutDB.rollback(); |
5628 |
strMsg += " DB処理異常"; |
5629 |
return false; |
5630 |
} |
5631 |
} |
5632 |
|
5633 |
strMsg += string.Format(" 処理件数={0}", DataCnt.ToString("#,0")); |
5634 |
|
5635 |
return true; |
5636 |
} |
5637 |
catch (Exception ex) |
5638 |
{ |
5639 |
OutDB.rollback(); |
5640 |
|
5641 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
5642 |
strMsg += string.Format(" システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
5643 |
return false; |
5644 |
} |
5645 |
finally |
5646 |
{ |
5647 |
InDB.close(); InDB = null; |
5648 |
OutDB.commit(); |
5649 |
OutDB.close(); OutDB = null; |
5650 |
} |
5651 |
} |
5652 |
#endregion |
5653 |
|
5654 |
#region 保護区分マスタ(Securitymaster) |
5655 |
/// <summary> |
5656 |
/// 保護区分マスタ(Securitymaster) |
5657 |
/// </summary> |
5658 |
/// <param name="strMsg"></param> |
5659 |
/// <returns></returns> |
5660 |
private bool CnvSecuritymaster(int ino, ref string strMsg) |
5661 |
{ |
5662 |
ProcessManagement.OracleDB.IOAccess.IOMSecurity InDB = new ProcessManagement.OracleDB.IOAccess.IOMSecurity(); |
5663 |
ProcessManagement.DB.IOAccess.IOMSecurity OutDB = new ProcessManagement.DB.IOAccess.IOMSecurity(); |
5664 |
strMsg = string.Format("№{0}:テーブル:{1}({2})", (ino + 1).ToString("00"), s_OracleTables[ino].Value, s_OracleTables[ino].Key); |
5665 |
try |
5666 |
{ |
5667 |
EditDspLength(ref strMsg); |
5668 |
|
5669 |
string strSQL = CreateOrder(s_OracleTables[ino].Key); |
5670 |
List<SecurityMaster> getList = new List<SecurityMaster>(); |
5671 |
if (!InDB.SelectAction(strSQL, ref getList)) return false; |
5672 |
|
5673 |
OutDB.connect(); OutDB.beginTran(); |
5674 |
strSQL = string.Format("TRUNCATE TABLE {0}", s_OracleTables[ino].Key); |
5675 |
OutDB.ExecuteNonQuery(strSQL, false); |
5676 |
|
5677 |
List<SecurityMaster> BuffList = new List<SecurityMaster>(); |
5678 |
int DataCnt = 0; |
5679 |
while (DataCnt < getList.Count) |
5680 |
{ |
5681 |
BuffList.Clear(); |
5682 |
|
5683 |
for (int ii = 0; ii < s_LoopCount; ii++, DataCnt++) |
5684 |
{ |
5685 |
if (DataCnt >= getList.Count) break; |
5686 |
|
5687 |
BuffList.Add(getList[DataCnt]); |
5688 |
} |
5689 |
|
5690 |
if (!OutDB.InsertAction(BuffList, false)) |
5691 |
{ |
5692 |
OutDB.rollback(); |
5693 |
strMsg += " DB処理異常"; |
5694 |
return false; |
5695 |
} |
5696 |
} |
5697 |
|
5698 |
strMsg += string.Format(" 処理件数={0}", DataCnt.ToString("#,0")); |
5699 |
|
5700 |
return true; |
5701 |
} |
5702 |
catch (Exception ex) |
5703 |
{ |
5704 |
OutDB.rollback(); |
5705 |
|
5706 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
5707 |
strMsg += string.Format(" システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
5708 |
return false; |
5709 |
} |
5710 |
finally |
5711 |
{ |
5712 |
InDB.close(); InDB = null; |
5713 |
OutDB.commit(); |
5714 |
OutDB.close(); OutDB = null; |
5715 |
} |
5716 |
} |
5717 |
#endregion |
5718 |
|
5719 |
#region 協力業者施工工種登録申請データ(Subconstrjobitemregist) |
5720 |
/// <summary> |
5721 |
/// 協力業者施工工種登録申請データ(Subconstrjobitemregist) |
5722 |
/// </summary> |
5723 |
/// <param name="strMsg"></param> |
5724 |
/// <returns></returns> |
5725 |
private bool CnvSubconstrjobitemregist(int ino, ref string strMsg) |
5726 |
{ |
5727 |
ProcessManagement.OracleDB.IOAccess.IOSubConstrJobItemRegist InDB = new ProcessManagement.OracleDB.IOAccess.IOSubConstrJobItemRegist(); |
5728 |
ProcessManagement.DB.IOAccess.IOSubConstrJobItemRegist OutDB = new ProcessManagement.DB.IOAccess.IOSubConstrJobItemRegist(); |
5729 |
strMsg = string.Format("№{0}:テーブル:{1}({2})", (ino + 1).ToString("00"), s_OracleTables[ino].Value, s_OracleTables[ino].Key); |
5730 |
try |
5731 |
{ |
5732 |
EditDspLength(ref strMsg); |
5733 |
|
5734 |
string strSQL = CreateOrder(s_OracleTables[ino].Key); |
5735 |
List<SubConstrJobItemRegist> getList = new List<SubConstrJobItemRegist>(); |
5736 |
if (!InDB.SelectAction(strSQL, ref getList)) return false; |
5737 |
|
5738 |
OutDB.connect(); OutDB.beginTran(); |
5739 |
strSQL = string.Format("TRUNCATE TABLE {0}", s_OracleTables[ino].Key); |
5740 |
OutDB.ExecuteNonQuery(strSQL, false); |
5741 |
|
5742 |
List<SubConstrJobItemRegist> BuffList = new List<SubConstrJobItemRegist>(); |
5743 |
int DataCnt = 0; |
5744 |
while (DataCnt < getList.Count) |
5745 |
{ |
5746 |
BuffList.Clear(); |
5747 |
|
5748 |
for (int ii = 0; ii < s_LoopCount; ii++, DataCnt++) |
5749 |
{ |
5750 |
if (DataCnt >= getList.Count) break; |
5751 |
|
5752 |
BuffList.Add(getList[DataCnt]); |
5753 |
} |
5754 |
|
5755 |
if (!OutDB.InsertAction(BuffList, false)) |
5756 |
{ |
5757 |
OutDB.rollback(); |
5758 |
strMsg += " DB処理異常"; |
5759 |
return false; |
5760 |
} |
5761 |
} |
5762 |
|
5763 |
strMsg += string.Format(" 処理件数={0}", DataCnt.ToString("#,0")); |
5764 |
|
5765 |
return true; |
5766 |
} |
5767 |
catch (Exception ex) |
5768 |
{ |
5769 |
OutDB.rollback(); |
5770 |
|
5771 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
5772 |
strMsg += string.Format(" システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
5773 |
return false; |
5774 |
} |
5775 |
finally |
5776 |
{ |
5777 |
InDB.close(); InDB = null; |
5778 |
OutDB.commit(); |
5779 |
OutDB.close(); OutDB = null; |
5780 |
} |
5781 |
} |
5782 |
#endregion |
5783 |
|
5784 |
#region 協力業者職種リンク登録申請データ(Subconstrjoblinkregist) |
5785 |
/// <summary> |
5786 |
/// 協力業者職種リンク登録申請データ(Subconstrjoblinkregist) |
5787 |
/// </summary> |
5788 |
/// <param name="strMsg"></param> |
5789 |
/// <returns></returns> |
5790 |
private bool CnvSubconstrjoblinkregist(int ino, ref string strMsg) |
5791 |
{ |
5792 |
ProcessManagement.OracleDB.IOAccess.IOSubConstrJobLinkRegist InDB = new ProcessManagement.OracleDB.IOAccess.IOSubConstrJobLinkRegist(); |
5793 |
ProcessManagement.DB.IOAccess.IOSubConstrJobLinkRegist OutDB = new ProcessManagement.DB.IOAccess.IOSubConstrJobLinkRegist(); |
5794 |
strMsg = string.Format("№{0}:テーブル:{1}({2})", (ino + 1).ToString("00"), s_OracleTables[ino].Value, s_OracleTables[ino].Key); |
5795 |
try |
5796 |
{ |
5797 |
EditDspLength(ref strMsg); |
5798 |
|
5799 |
string strSQL = CreateOrder(s_OracleTables[ino].Key); |
5800 |
List<SubConstrJobLinkRegist> getList = new List<SubConstrJobLinkRegist>(); |
5801 |
if (!InDB.SelectAction(strSQL, ref getList)) return false; |
5802 |
|
5803 |
OutDB.connect(); OutDB.beginTran(); |
5804 |
strSQL = string.Format("TRUNCATE TABLE {0}", s_OracleTables[ino].Key); |
5805 |
OutDB.ExecuteNonQuery(strSQL, false); |
5806 |
|
5807 |
List<SubConstrJobLinkRegist> BuffList = new List<SubConstrJobLinkRegist>(); |
5808 |
int DataCnt = 0; |
5809 |
while (DataCnt < getList.Count) |
5810 |
{ |
5811 |
BuffList.Clear(); |
5812 |
|
5813 |
for (int ii = 0; ii < s_LoopCount; ii++, DataCnt++) |
5814 |
{ |
5815 |
if (DataCnt >= getList.Count) break; |
5816 |
|
5817 |
BuffList.Add(getList[DataCnt]); |
5818 |
} |
5819 |
|
5820 |
if (!OutDB.InsertAction(BuffList, false)) |
5821 |
{ |
5822 |
OutDB.rollback(); |
5823 |
strMsg += " DB処理異常"; |
5824 |
return false; |
5825 |
} |
5826 |
} |
5827 |
|
5828 |
strMsg += string.Format(" 処理件数={0}", DataCnt.ToString("#,0")); |
5829 |
|
5830 |
return true; |
5831 |
} |
5832 |
catch (Exception ex) |
5833 |
{ |
5834 |
OutDB.rollback(); |
5835 |
|
5836 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
5837 |
strMsg += string.Format(" システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
5838 |
return false; |
5839 |
} |
5840 |
finally |
5841 |
{ |
5842 |
InDB.close(); InDB = null; |
5843 |
OutDB.commit(); |
5844 |
OutDB.close(); OutDB = null; |
5845 |
} |
5846 |
} |
5847 |
#endregion |
5848 |
|
5849 |
#region 協力業者登録申請データ(Subconstrregist) |
5850 |
/// <summary> |
5851 |
/// 協力業者登録申請データ(Subconstrregist) |
5852 |
/// </summary> |
5853 |
/// <param name="strMsg"></param> |
5854 |
/// <returns></returns> |
5855 |
private bool CnvSubconstrregist(int ino, ref string strMsg) |
5856 |
{ |
5857 |
ProcessManagement.OracleDB.IOAccess.IOSubConstrRegist InDB = new ProcessManagement.OracleDB.IOAccess.IOSubConstrRegist(); |
5858 |
ProcessManagement.DB.IOAccess.IOSubConstrRegist OutDB = new ProcessManagement.DB.IOAccess.IOSubConstrRegist(); |
5859 |
strMsg = string.Format("№{0}:テーブル:{1}({2})", (ino + 1).ToString("00"), s_OracleTables[ino].Value, s_OracleTables[ino].Key); |
5860 |
try |
5861 |
{ |
5862 |
EditDspLength(ref strMsg); |
5863 |
|
5864 |
string strSQL = CreateOrder(s_OracleTables[ino].Key); |
5865 |
List<SubConstrRegist> getList = new List<SubConstrRegist>(); |
5866 |
if (!InDB.SelectAction(strSQL, ref getList)) return false; |
5867 |
|
5868 |
OutDB.connect(); OutDB.beginTran(); |
5869 |
strSQL = string.Format("TRUNCATE TABLE {0}", s_OracleTables[ino].Key); |
5870 |
OutDB.ExecuteNonQuery(strSQL, false); |
5871 |
|
5872 |
List<SubConstrRegist> BuffList = new List<SubConstrRegist>(); |
5873 |
int DataCnt = 0; |
5874 |
while (DataCnt < getList.Count) |
5875 |
{ |
5876 |
BuffList.Clear(); |
5877 |
|
5878 |
for (int ii = 0; ii < s_LoopCount; ii++, DataCnt++) |
5879 |
{ |
5880 |
if (DataCnt >= getList.Count) break; |
5881 |
|
5882 |
BuffList.Add(getList[DataCnt]); |
5883 |
} |
5884 |
|
5885 |
if (!OutDB.InsertAction(BuffList, false)) |
5886 |
{ |
5887 |
OutDB.rollback(); |
5888 |
strMsg += " DB処理異常"; |
5889 |
return false; |
5890 |
} |
5891 |
} |
5892 |
|
5893 |
strMsg += string.Format(" 処理件数={0}", DataCnt.ToString("#,0")); |
5894 |
|
5895 |
return true; |
5896 |
} |
5897 |
catch (Exception ex) |
5898 |
{ |
5899 |
OutDB.rollback(); |
5900 |
|
5901 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
5902 |
strMsg += string.Format(" システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
5903 |
return false; |
5904 |
} |
5905 |
finally |
5906 |
{ |
5907 |
InDB.close(); InDB = null; |
5908 |
OutDB.commit(); |
5909 |
OutDB.close(); OutDB = null; |
5910 |
} |
5911 |
} |
5912 |
#endregion |
5913 |
|
5914 |
#region 協力会社工種マスタ(Subcontractoritemmaster) |
5915 |
/// <summary> |
5916 |
/// 協力会社工種マスタ(Subcontractoritemmaster) |
5917 |
/// </summary> |
5918 |
/// <param name="strMsg"></param> |
5919 |
/// <returns></returns> |
5920 |
private bool CnvSubcontractoritemmaster(int ino, ref string strMsg) |
5921 |
{ |
5922 |
ProcessManagement.OracleDB.IOAccess.IOMSubContractorItem InDB = new ProcessManagement.OracleDB.IOAccess.IOMSubContractorItem(); |
5923 |
ProcessManagement.DB.IOAccess.IOMSubContractorItem OutDB = new ProcessManagement.DB.IOAccess.IOMSubContractorItem(); |
5924 |
strMsg = string.Format("№{0}:テーブル:{1}({2})", (ino + 1).ToString("00"), s_OracleTables[ino].Value, s_OracleTables[ino].Key); |
5925 |
try |
5926 |
{ |
5927 |
EditDspLength(ref strMsg); |
5928 |
|
5929 |
string strSQL = CreateOrder(s_OracleTables[ino].Key); |
5930 |
List<SubContractorItemMaster> getList = new List<SubContractorItemMaster>(); |
5931 |
if (!InDB.SelectAction(strSQL, ref getList)) return false; |
5932 |
|
5933 |
OutDB.connect(); OutDB.beginTran(); |
5934 |
strSQL = string.Format("TRUNCATE TABLE {0}", s_OracleTables[ino].Key); |
5935 |
OutDB.ExecuteNonQuery(strSQL, false); |
5936 |
|
5937 |
List<SubContractorItemMaster> BuffList = new List<SubContractorItemMaster>(); |
5938 |
int DataCnt = 0; |
5939 |
while (DataCnt < getList.Count) |
5940 |
{ |
5941 |
BuffList.Clear(); |
5942 |
|
5943 |
for (int ii = 0; ii < s_LoopCount; ii++, DataCnt++) |
5944 |
{ |
5945 |
if (DataCnt >= getList.Count) break; |
5946 |
|
5947 |
BuffList.Add(getList[DataCnt]); |
5948 |
} |
5949 |
|
5950 |
if (!OutDB.InsertAction(BuffList, false)) |
5951 |
{ |
5952 |
OutDB.rollback(); |
5953 |
strMsg += " DB処理異常"; |
5954 |
return false; |
5955 |
} |
5956 |
} |
5957 |
|
5958 |
strMsg += string.Format(" 処理件数={0}", DataCnt.ToString("#,0")); |
5959 |
|
5960 |
return true; |
5961 |
} |
5962 |
catch (Exception ex) |
5963 |
{ |
5964 |
OutDB.rollback(); |
5965 |
|
5966 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
5967 |
strMsg += string.Format(" システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
5968 |
return false; |
5969 |
} |
5970 |
finally |
5971 |
{ |
5972 |
InDB.close(); InDB = null; |
5973 |
OutDB.commit(); |
5974 |
OutDB.close(); OutDB = null; |
5975 |
} |
5976 |
} |
5977 |
#endregion |
5978 |
|
5979 |
#region 協力会社職種マスタ(Subcontractorjobcategory) |
5980 |
/// <summary> |
5981 |
/// 協力会社職種マスタ(Subcontractorjobcategory) |
5982 |
/// </summary> |
5983 |
/// <param name="strMsg"></param> |
5984 |
/// <returns></returns> |
5985 |
private bool CnvSubcontractorjobcategory(int ino, ref string strMsg) |
5986 |
{ |
5987 |
ProcessManagement.OracleDB.IOAccess.IOMSubContractorJobCategory InDB = new ProcessManagement.OracleDB.IOAccess.IOMSubContractorJobCategory(); |
5988 |
ProcessManagement.DB.IOAccess.IOMSubContractorJobCategory OutDB = new ProcessManagement.DB.IOAccess.IOMSubContractorJobCategory(); |
5989 |
strMsg = string.Format("№{0}:テーブル:{1}({2})", (ino + 1).ToString("00"), s_OracleTables[ino].Value, s_OracleTables[ino].Key); |
5990 |
try |
5991 |
{ |
5992 |
EditDspLength(ref strMsg); |
5993 |
|
5994 |
string strSQL = CreateOrder(s_OracleTables[ino].Key); |
5995 |
List<SubContractorJobCategory> getList = new List<SubContractorJobCategory>(); |
5996 |
if (!InDB.SelectAction(strSQL, ref getList)) return false; |
5997 |
|
5998 |
OutDB.connect(); OutDB.beginTran(); |
5999 |
strSQL = string.Format("TRUNCATE TABLE {0}", s_OracleTables[ino].Key); |
6000 |
OutDB.ExecuteNonQuery(strSQL, false); |
6001 |
|
6002 |
List<SubContractorJobCategory> BuffList = new List<SubContractorJobCategory>(); |
6003 |
int DataCnt = 0; |
6004 |
while (DataCnt < getList.Count) |
6005 |
{ |
6006 |
BuffList.Clear(); |
6007 |
|
6008 |
for (int ii = 0; ii < s_LoopCount; ii++, DataCnt++) |
6009 |
{ |
6010 |
if (DataCnt >= getList.Count) break; |
6011 |
|
6012 |
BuffList.Add(getList[DataCnt]); |
6013 |
} |
6014 |
|
6015 |
if (!OutDB.InsertAction(BuffList, false)) |
6016 |
{ |
6017 |
OutDB.rollback(); |
6018 |
strMsg += " DB処理異常"; |
6019 |
return false; |
6020 |
} |
6021 |
} |
6022 |
|
6023 |
strMsg += string.Format(" 処理件数={0}", DataCnt.ToString("#,0")); |
6024 |
|
6025 |
return true; |
6026 |
} |
6027 |
catch (Exception ex) |
6028 |
{ |
6029 |
OutDB.rollback(); |
6030 |
|
6031 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
6032 |
strMsg += string.Format(" システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
6033 |
return false; |
6034 |
} |
6035 |
finally |
6036 |
{ |
6037 |
InDB.close(); InDB = null; |
6038 |
OutDB.commit(); |
6039 |
OutDB.close(); OutDB = null; |
6040 |
} |
6041 |
} |
6042 |
#endregion |
6043 |
|
6044 |
#region 協力会社施工工種データ(Subcontractorjobitem) |
6045 |
/// <summary> |
6046 |
/// 協力会社施工工種データ(Subcontractorjobitem) |
6047 |
/// </summary> |
6048 |
/// <param name="strMsg"></param> |
6049 |
/// <returns></returns> |
6050 |
private bool CnvSubcontractorjobitem(int ino, ref string strMsg) |
6051 |
{ |
6052 |
ProcessManagement.OracleDB.IOAccess.IOMSubContractorJobItem InDB = new ProcessManagement.OracleDB.IOAccess.IOMSubContractorJobItem(); |
6053 |
ProcessManagement.DB.IOAccess.IOMSubContractorJobItem OutDB = new ProcessManagement.DB.IOAccess.IOMSubContractorJobItem(); |
6054 |
strMsg = string.Format("№{0}:テーブル:{1}({2})", (ino + 1).ToString("00"), s_OracleTables[ino].Value, s_OracleTables[ino].Key); |
6055 |
try |
6056 |
{ |
6057 |
EditDspLength(ref strMsg); |
6058 |
|
6059 |
string strSQL = CreateOrder(s_OracleTables[ino].Key); |
6060 |
List<SubContractorJobItem> getList = new List<SubContractorJobItem>(); |
6061 |
if (!InDB.SelectAction(strSQL, ref getList)) return false; |
6062 |
|
6063 |
OutDB.connect(); OutDB.beginTran(); |
6064 |
strSQL = string.Format("TRUNCATE TABLE {0}", s_OracleTables[ino].Key); |
6065 |
OutDB.ExecuteNonQuery(strSQL, false); |
6066 |
|
6067 |
List<SubContractorJobItem> BuffList = new List<SubContractorJobItem>(); |
6068 |
int DataCnt = 0; |
6069 |
while (DataCnt < getList.Count) |
6070 |
{ |
6071 |
BuffList.Clear(); |
6072 |
|
6073 |
for (int ii = 0; ii < s_LoopCount; ii++, DataCnt++) |
6074 |
{ |
6075 |
if (DataCnt >= getList.Count) break; |
6076 |
|
6077 |
BuffList.Add(getList[DataCnt]); |
6078 |
} |
6079 |
|
6080 |
if (!OutDB.InsertAction(BuffList, false)) |
6081 |
{ |
6082 |
OutDB.rollback(); |
6083 |
strMsg += " DB処理異常"; |
6084 |
return false; |
6085 |
} |
6086 |
} |
6087 |
|
6088 |
strMsg += string.Format(" 処理件数={0}", DataCnt.ToString("#,0")); |
6089 |
|
6090 |
return true; |
6091 |
} |
6092 |
catch (Exception ex) |
6093 |
{ |
6094 |
OutDB.rollback(); |
6095 |
|
6096 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
6097 |
strMsg += string.Format(" システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
6098 |
return false; |
6099 |
} |
6100 |
finally |
6101 |
{ |
6102 |
InDB.close(); InDB = null; |
6103 |
OutDB.commit(); |
6104 |
OutDB.close(); OutDB = null; |
6105 |
} |
6106 |
} |
6107 |
#endregion |
6108 |
|
6109 |
#region 協力会社職種リンクマスタ(Subcontractorjoblink) |
6110 |
/// <summary> |
6111 |
/// 協力会社職種リンクマスタ(Subcontractorjoblink) |
6112 |
/// </summary> |
6113 |
/// <param name="strMsg"></param> |
6114 |
/// <returns></returns> |
6115 |
private bool CnvSubcontractorjoblink(int ino, ref string strMsg) |
6116 |
{ |
6117 |
ProcessManagement.OracleDB.IOAccess.IOMSubContractorJobLink InDB = new ProcessManagement.OracleDB.IOAccess.IOMSubContractorJobLink(); |
6118 |
ProcessManagement.DB.IOAccess.IOMSubContractorJobLink OutDB = new ProcessManagement.DB.IOAccess.IOMSubContractorJobLink(); |
6119 |
strMsg = string.Format("№{0}:テーブル:{1}({2})", (ino + 1).ToString("00"), s_OracleTables[ino].Value, s_OracleTables[ino].Key); |
6120 |
try |
6121 |
{ |
6122 |
EditDspLength(ref strMsg); |
6123 |
|
6124 |
string strSQL = CreateOrder(s_OracleTables[ino].Key); |
6125 |
List<SubContractorJobLink> getList = new List<SubContractorJobLink>(); |
6126 |
if (!InDB.SelectAction(strSQL, ref getList)) return false; |
6127 |
|
6128 |
OutDB.connect(); OutDB.beginTran(); |
6129 |
strSQL = string.Format("TRUNCATE TABLE {0}", s_OracleTables[ino].Key); |
6130 |
OutDB.ExecuteNonQuery(strSQL, false); |
6131 |
|
6132 |
List<SubContractorJobLink> BuffList = new List<SubContractorJobLink>(); |
6133 |
int DataCnt = 0; |
6134 |
while (DataCnt < getList.Count) |
6135 |
{ |
6136 |
BuffList.Clear(); |
6137 |
|
6138 |
for (int ii = 0; ii < s_LoopCount; ii++, DataCnt++) |
6139 |
{ |
6140 |
if (DataCnt >= getList.Count) break; |
6141 |
|
6142 |
BuffList.Add(getList[DataCnt]); |
6143 |
} |
6144 |
|
6145 |
if (!OutDB.InsertAction(BuffList, false)) |
6146 |
{ |
6147 |
OutDB.rollback(); |
6148 |
strMsg += " DB処理異常"; |
6149 |
return false; |
6150 |
} |
6151 |
} |
6152 |
|
6153 |
strMsg += string.Format(" 処理件数={0}", DataCnt.ToString("#,0")); |
6154 |
|
6155 |
return true; |
6156 |
} |
6157 |
catch (Exception ex) |
6158 |
{ |
6159 |
OutDB.rollback(); |
6160 |
|
6161 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
6162 |
strMsg += string.Format(" システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
6163 |
return false; |
6164 |
} |
6165 |
finally |
6166 |
{ |
6167 |
InDB.close(); InDB = null; |
6168 |
OutDB.commit(); |
6169 |
OutDB.close(); OutDB = null; |
6170 |
} |
6171 |
} |
6172 |
#endregion |
6173 |
|
6174 |
#region 協力会社マスタ(Subcontractormaster) |
6175 |
/// <summary> |
6176 |
/// 協力会社マスタ(Subcontractormaster) |
6177 |
/// </summary> |
6178 |
/// <param name="strMsg"></param> |
6179 |
/// <returns></returns> |
6180 |
private bool CnvSubcontractormaster(int ino, ref string strMsg) |
6181 |
{ |
6182 |
ProcessManagement.OracleDB.IOAccess.IOMSubContractor InDB = new ProcessManagement.OracleDB.IOAccess.IOMSubContractor(); |
6183 |
ProcessManagement.DB.IOAccess.IOMSubContractor OutDB = new ProcessManagement.DB.IOAccess.IOMSubContractor(); |
6184 |
strMsg = string.Format("№{0}:テーブル:{1}({2})", (ino + 1).ToString("00"), s_OracleTables[ino].Value, s_OracleTables[ino].Key); |
6185 |
try |
6186 |
{ |
6187 |
EditDspLength(ref strMsg); |
6188 |
|
6189 |
string strSQL = CreateOrder(s_OracleTables[ino].Key); |
6190 |
List<SubContractorMaster> getList = new List<SubContractorMaster>(); |
6191 |
if (!InDB.SelectAction(strSQL, ref getList)) return false; |
6192 |
|
6193 |
OutDB.connect(); OutDB.beginTran(); |
6194 |
strSQL = string.Format("TRUNCATE TABLE {0}", s_OracleTables[ino].Key); |
6195 |
OutDB.ExecuteNonQuery(strSQL, false); |
6196 |
|
6197 |
List<SubContractorMaster> BuffList = new List<SubContractorMaster>(); |
6198 |
int DataCnt = 0; |
6199 |
while (DataCnt < getList.Count) |
6200 |
{ |
6201 |
BuffList.Clear(); |
6202 |
|
6203 |
for (int ii = 0; ii < s_LoopCount; ii++, DataCnt++) |
6204 |
{ |
6205 |
if (DataCnt >= getList.Count) break; |
6206 |
|
6207 |
BuffList.Add(getList[DataCnt]); |
6208 |
} |
6209 |
|
6210 |
if (!OutDB.InsertAction(BuffList, false)) |
6211 |
{ |
6212 |
OutDB.rollback(); |
6213 |
strMsg += " DB処理異常"; |
6214 |
return false; |
6215 |
} |
6216 |
} |
6217 |
|
6218 |
strMsg += string.Format(" 処理件数={0}", DataCnt.ToString("#,0")); |
6219 |
|
6220 |
return true; |
6221 |
} |
6222 |
catch (Exception ex) |
6223 |
{ |
6224 |
OutDB.rollback(); |
6225 |
|
6226 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
6227 |
strMsg += string.Format(" システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
6228 |
return false; |
6229 |
} |
6230 |
finally |
6231 |
{ |
6232 |
InDB.close(); InDB = null; |
6233 |
OutDB.commit(); |
6234 |
OutDB.close(); OutDB = null; |
6235 |
} |
6236 |
} |
6237 |
#endregion |
6238 |
|
6239 |
#region 仕入先マスタ(Suppliersmaster) |
6240 |
/// <summary> |
6241 |
/// 仕入先マスタ(Suppliersmaster) |
6242 |
/// </summary> |
6243 |
/// <param name="strMsg"></param> |
6244 |
/// <returns></returns> |
6245 |
private bool CnvSuppliersmaster(int ino, ref string strMsg) |
6246 |
{ |
6247 |
ProcessManagement.OracleDB.IOAccess.IOMSuppliers InDB = new ProcessManagement.OracleDB.IOAccess.IOMSuppliers(); |
6248 |
ProcessManagement.DB.IOAccess.IOMSuppliers OutDB = new ProcessManagement.DB.IOAccess.IOMSuppliers(); |
6249 |
strMsg = string.Format("№{0}:テーブル:{1}({2})", (ino + 1).ToString("00"), s_OracleTables[ino].Value, s_OracleTables[ino].Key); |
6250 |
try |
6251 |
{ |
6252 |
EditDspLength(ref strMsg); |
6253 |
|
6254 |
string strSQL = CreateOrder(s_OracleTables[ino].Key); |
6255 |
List<SuppliersMaster> getList = new List<SuppliersMaster>(); |
6256 |
if (!InDB.SelectAction(strSQL, ref getList)) return false; |
6257 |
|
6258 |
OutDB.connect(); OutDB.beginTran(); |
6259 |
strSQL = string.Format("TRUNCATE TABLE {0}", s_OracleTables[ino].Key); |
6260 |
OutDB.ExecuteNonQuery(strSQL, false); |
6261 |
|
6262 |
List<SuppliersMaster> BuffList = new List<SuppliersMaster>(); |
6263 |
int DataCnt = 0; |
6264 |
while (DataCnt < getList.Count) |
6265 |
{ |
6266 |
BuffList.Clear(); |
6267 |
|
6268 |
for (int ii = 0; ii < s_LoopCount; ii++, DataCnt++) |
6269 |
{ |
6270 |
if (DataCnt >= getList.Count) break; |
6271 |
|
6272 |
BuffList.Add(getList[DataCnt]); |
6273 |
} |
6274 |
|
6275 |
if (!OutDB.InsertAction(BuffList, false)) |
6276 |
{ |
6277 |
OutDB.rollback(); |
6278 |
strMsg += " DB処理異常"; |
6279 |
return false; |
6280 |
} |
6281 |
} |
6282 |
|
6283 |
strMsg += string.Format(" 処理件数={0}", DataCnt.ToString("#,0")); |
6284 |
|
6285 |
return true; |
6286 |
} |
6287 |
catch (Exception ex) |
6288 |
{ |
6289 |
OutDB.rollback(); |
6290 |
|
6291 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
6292 |
strMsg += string.Format(" システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
6293 |
return false; |
6294 |
} |
6295 |
finally |
6296 |
{ |
6297 |
InDB.close(); InDB = null; |
6298 |
OutDB.commit(); |
6299 |
OutDB.close(); OutDB = null; |
6300 |
} |
6301 |
} |
6302 |
#endregion |
6303 |
|
6304 |
#region システム起動確認データ(Systemexecute) |
6305 |
/// <summary> |
6306 |
/// システム起動確認データ(Systemexecute) |
6307 |
/// </summary> |
6308 |
/// <param name="strMsg"></param> |
6309 |
/// <returns></returns> |
6310 |
private bool CnvSystemexecute(int ino, ref string strMsg) |
6311 |
{ |
6312 |
ProcessManagement.OracleDB.IOAccess.IOSystemExecute InDB = new ProcessManagement.OracleDB.IOAccess.IOSystemExecute(); |
6313 |
ProcessManagement.DB.IOAccess.IOSystemExecute OutDB = new ProcessManagement.DB.IOAccess.IOSystemExecute(); |
6314 |
strMsg = string.Format("№{0}:テーブル:{1}({2})", (ino + 1).ToString("00"), s_OracleTables[ino].Value, s_OracleTables[ino].Key); |
6315 |
try |
6316 |
{ |
6317 |
EditDspLength(ref strMsg); |
6318 |
|
6319 |
string strSQL = CreateOrder(s_OracleTables[ino].Key); |
6320 |
List<SystemExecute> getList = new List<SystemExecute>(); |
6321 |
if (!InDB.SelectAction(strSQL, ref getList)) return false; |
6322 |
|
6323 |
OutDB.connect(); OutDB.beginTran(); |
6324 |
strSQL = string.Format("TRUNCATE TABLE {0}", s_OracleTables[ino].Key); |
6325 |
OutDB.ExecuteNonQuery(strSQL, false); |
6326 |
|
6327 |
List<SystemExecute> BuffList = new List<SystemExecute>(); |
6328 |
int DataCnt = 0; |
6329 |
while (DataCnt < getList.Count) |
6330 |
{ |
6331 |
BuffList.Clear(); |
6332 |
|
6333 |
for (int ii = 0; ii < s_LoopCount; ii++, DataCnt++) |
6334 |
{ |
6335 |
if (DataCnt >= getList.Count) break; |
6336 |
|
6337 |
BuffList.Add(getList[DataCnt]); |
6338 |
} |
6339 |
|
6340 |
if (!OutDB.InsertAction(BuffList, false)) |
6341 |
{ |
6342 |
OutDB.rollback(); |
6343 |
strMsg += " DB処理異常"; |
6344 |
return false; |
6345 |
} |
6346 |
} |
6347 |
|
6348 |
strMsg += string.Format(" 処理件数={0}", DataCnt.ToString("#,0")); |
6349 |
|
6350 |
return true; |
6351 |
} |
6352 |
catch (Exception ex) |
6353 |
{ |
6354 |
OutDB.rollback(); |
6355 |
|
6356 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
6357 |
strMsg += string.Format(" システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
6358 |
return false; |
6359 |
} |
6360 |
finally |
6361 |
{ |
6362 |
InDB.close(); InDB = null; |
6363 |
OutDB.commit(); |
6364 |
OutDB.close(); OutDB = null; |
6365 |
} |
6366 |
} |
6367 |
#endregion |
6368 |
|
6369 |
#region 管理マスタ(Systemmaster) |
6370 |
/// <summary> |
6371 |
/// 管理マスタ(Systemmaster) |
6372 |
/// </summary> |
6373 |
/// <param name="strMsg"></param> |
6374 |
/// <returns></returns> |
6375 |
private bool CnvSystemmaster(int ino, ref string strMsg) |
6376 |
{ |
6377 |
ProcessManagement.OracleDB.IOAccess.IOMSystem InDB = new ProcessManagement.OracleDB.IOAccess.IOMSystem(); |
6378 |
ProcessManagement.DB.IOAccess.IOMSystem OutDB = new ProcessManagement.DB.IOAccess.IOMSystem(); |
6379 |
strMsg = string.Format("№{0}:テーブル:{1}({2})", (ino + 1).ToString("00"), s_OracleTables[ino].Value, s_OracleTables[ino].Key); |
6380 |
try |
6381 |
{ |
6382 |
EditDspLength(ref strMsg); |
6383 |
|
6384 |
string strSQL = CreateOrder(s_OracleTables[ino].Key); |
6385 |
List<SystemMaster> getList = new List<SystemMaster>(); |
6386 |
if (!InDB.SelectAction(strSQL, ref getList)) return false; |
6387 |
|
6388 |
OutDB.connect(); OutDB.beginTran(); |
6389 |
strSQL = string.Format("TRUNCATE TABLE {0}", s_OracleTables[ino].Key); |
6390 |
OutDB.ExecuteNonQuery(strSQL, false); |
6391 |
|
6392 |
List<SystemMaster> BuffList = new List<SystemMaster>(); |
6393 |
int DataCnt = 0; |
6394 |
while (DataCnt < getList.Count) |
6395 |
{ |
6396 |
BuffList.Clear(); |
6397 |
|
6398 |
for (int ii = 0; ii < s_LoopCount; ii++, DataCnt++) |
6399 |
{ |
6400 |
if (DataCnt >= getList.Count) break; |
6401 |
|
6402 |
BuffList.Add(getList[DataCnt]); |
6403 |
} |
6404 |
|
6405 |
if (!OutDB.InsertAction(BuffList, false)) |
6406 |
{ |
6407 |
OutDB.rollback(); |
6408 |
strMsg += " DB処理異常"; |
6409 |
return false; |
6410 |
} |
6411 |
} |
6412 |
|
6413 |
strMsg += string.Format(" 処理件数={0}", DataCnt.ToString("#,0")); |
6414 |
|
6415 |
return true; |
6416 |
} |
6417 |
catch (Exception ex) |
6418 |
{ |
6419 |
OutDB.rollback(); |
6420 |
|
6421 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
6422 |
strMsg += string.Format(" システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
6423 |
return false; |
6424 |
} |
6425 |
finally |
6426 |
{ |
6427 |
InDB.close(); InDB = null; |
6428 |
OutDB.commit(); |
6429 |
OutDB.close(); OutDB = null; |
6430 |
} |
6431 |
} |
6432 |
#endregion |
6433 |
|
6434 |
#region 期限マスタ(Termmaster) |
6435 |
/// <summary> |
6436 |
/// 期限マスタ(Termmaster) |
6437 |
/// </summary> |
6438 |
/// <param name="strMsg"></param> |
6439 |
/// <returns></returns> |
6440 |
private bool CnvTermmaster(int ino, ref string strMsg) |
6441 |
{ |
6442 |
ProcessManagement.OracleDB.IOAccess.IOMTerm InDB = new ProcessManagement.OracleDB.IOAccess.IOMTerm(); |
6443 |
ProcessManagement.DB.IOAccess.IOMTerm OutDB = new ProcessManagement.DB.IOAccess.IOMTerm(); |
6444 |
strMsg = string.Format("№{0}:テーブル:{1}({2})", (ino + 1).ToString("00"), s_OracleTables[ino].Value, s_OracleTables[ino].Key); |
6445 |
try |
6446 |
{ |
6447 |
EditDspLength(ref strMsg); |
6448 |
|
6449 |
string strSQL = CreateOrder(s_OracleTables[ino].Key); |
6450 |
List<TermMaster> getList = new List<TermMaster>(); |
6451 |
if (!InDB.SelectAction(strSQL, ref getList)) return false; |
6452 |
|
6453 |
OutDB.connect(); OutDB.beginTran(); |
6454 |
strSQL = string.Format("TRUNCATE TABLE {0}", s_OracleTables[ino].Key); |
6455 |
OutDB.ExecuteNonQuery(strSQL, false); |
6456 |
|
6457 |
List<TermMaster> BuffList = new List<TermMaster>(); |
6458 |
int DataCnt = 0; |
6459 |
while (DataCnt < getList.Count) |
6460 |
{ |
6461 |
BuffList.Clear(); |
6462 |
|
6463 |
for (int ii = 0; ii < s_LoopCount; ii++, DataCnt++) |
6464 |
{ |
6465 |
if (DataCnt >= getList.Count) break; |
6466 |
|
6467 |
BuffList.Add(getList[DataCnt]); |
6468 |
} |
6469 |
|
6470 |
if (!OutDB.InsertAction(BuffList, false)) |
6471 |
{ |
6472 |
OutDB.rollback(); |
6473 |
strMsg += " DB処理異常"; |
6474 |
return false; |
6475 |
} |
6476 |
} |
6477 |
|
6478 |
strMsg += string.Format(" 処理件数={0}", DataCnt.ToString("#,0")); |
6479 |
|
6480 |
return true; |
6481 |
} |
6482 |
catch (Exception ex) |
6483 |
{ |
6484 |
OutDB.rollback(); |
6485 |
|
6486 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
6487 |
strMsg += string.Format(" システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
6488 |
return false; |
6489 |
} |
6490 |
finally |
6491 |
{ |
6492 |
InDB.close(); InDB = null; |
6493 |
OutDB.commit(); |
6494 |
OutDB.close(); OutDB = null; |
6495 |
} |
6496 |
} |
6497 |
#endregion |
6498 |
|
6499 |
#region 出勤交通費データ(Tranceportdailydata) |
6500 |
/// <summary> |
6501 |
/// 出勤交通費データ(Tranceportdailydata) |
6502 |
/// </summary> |
6503 |
/// <param name="strMsg"></param> |
6504 |
/// <returns></returns> |
6505 |
private bool CnvTranceportdailydata(int ino, ref string strMsg) |
6506 |
{ |
6507 |
ProcessManagement.OracleDB.IOAccess.IOTranceportDailyData InDB = new ProcessManagement.OracleDB.IOAccess.IOTranceportDailyData(); |
6508 |
ProcessManagement.DB.IOAccess.IOTranceportDailyData OutDB = new ProcessManagement.DB.IOAccess.IOTranceportDailyData(); |
6509 |
strMsg = string.Format("№{0}:テーブル:{1}({2})", (ino + 1).ToString("00"), s_OracleTables[ino].Value, s_OracleTables[ino].Key); |
6510 |
try |
6511 |
{ |
6512 |
EditDspLength(ref strMsg); |
6513 |
|
6514 |
string strSQL = CreateOrder(s_OracleTables[ino].Key); |
6515 |
List<TranceportDailyData> getList = new List<TranceportDailyData>(); |
6516 |
if (!InDB.SelectAction(strSQL, ref getList)) return false; |
6517 |
|
6518 |
OutDB.connect(); OutDB.beginTran(); |
6519 |
strSQL = string.Format("TRUNCATE TABLE {0}", s_OracleTables[ino].Key); |
6520 |
OutDB.ExecuteNonQuery(strSQL, false); |
6521 |
|
6522 |
List<TranceportDailyData> BuffList = new List<TranceportDailyData>(); |
6523 |
int DataCnt = 0; |
6524 |
while (DataCnt < getList.Count) |
6525 |
{ |
6526 |
BuffList.Clear(); |
6527 |
|
6528 |
for (int ii = 0; ii < s_LoopCount; ii++, DataCnt++) |
6529 |
{ |
6530 |
if (DataCnt >= getList.Count) break; |
6531 |
|
6532 |
BuffList.Add(getList[DataCnt]); |
6533 |
} |
6534 |
|
6535 |
if (!OutDB.InsertAction(BuffList, false)) |
6536 |
{ |
6537 |
OutDB.rollback(); |
6538 |
strMsg += " DB処理異常"; |
6539 |
return false; |
6540 |
} |
6541 |
} |
6542 |
|
6543 |
strMsg += string.Format(" 処理件数={0}", DataCnt.ToString("#,0")); |
6544 |
|
6545 |
return true; |
6546 |
} |
6547 |
catch (Exception ex) |
6548 |
{ |
6549 |
OutDB.rollback(); |
6550 |
|
6551 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
6552 |
strMsg += string.Format(" システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
6553 |
return false; |
6554 |
} |
6555 |
finally |
6556 |
{ |
6557 |
InDB.close(); InDB = null; |
6558 |
OutDB.commit(); |
6559 |
OutDB.close(); OutDB = null; |
6560 |
} |
6561 |
} |
6562 |
#endregion |
6563 |
|
6564 |
#region 工事種別経費率マスタ(Typeexpensesmaster) |
6565 |
/// <summary> |
6566 |
/// 工事種別経費率マスタ(Typeexpensesmaster) |
6567 |
/// </summary> |
6568 |
/// <param name="strMsg"></param> |
6569 |
/// <returns></returns> |
6570 |
private bool CnvTypeexpensesmaster(int ino, ref string strMsg) |
6571 |
{ |
6572 |
ProcessManagement.OracleDB.IOAccess.IOMTypeExpenses InDB = new ProcessManagement.OracleDB.IOAccess.IOMTypeExpenses(); |
6573 |
ProcessManagement.DB.IOAccess.IOMTypeExpenses OutDB = new ProcessManagement.DB.IOAccess.IOMTypeExpenses(); |
6574 |
strMsg = string.Format("№{0}:テーブル:{1}({2})", (ino + 1).ToString("00"), s_OracleTables[ino].Value, s_OracleTables[ino].Key); |
6575 |
try |
6576 |
{ |
6577 |
EditDspLength(ref strMsg); |
6578 |
|
6579 |
string strSQL = CreateOrder(s_OracleTables[ino].Key); |
6580 |
List<TypeExpensesMaster> getList = new List<TypeExpensesMaster>(); |
6581 |
if (!InDB.SelectAction(strSQL, ref getList)) return false; |
6582 |
|
6583 |
OutDB.connect(); OutDB.beginTran(); |
6584 |
strSQL = string.Format("TRUNCATE TABLE {0}", s_OracleTables[ino].Key); |
6585 |
OutDB.ExecuteNonQuery(strSQL, false); |
6586 |
|
6587 |
List<TypeExpensesMaster> BuffList = new List<TypeExpensesMaster>(); |
6588 |
int DataCnt = 0; |
6589 |
while (DataCnt < getList.Count) |
6590 |
{ |
6591 |
BuffList.Clear(); |
6592 |
|
6593 |
for (int ii = 0; ii < s_LoopCount; ii++, DataCnt++) |
6594 |
{ |
6595 |
if (DataCnt >= getList.Count) break; |
6596 |
|
6597 |
BuffList.Add(getList[DataCnt]); |
6598 |
} |
6599 |
|
6600 |
if (!OutDB.InsertAction(BuffList, false)) |
6601 |
{ |
6602 |
OutDB.rollback(); |
6603 |
strMsg += " DB処理異常"; |
6604 |
return false; |
6605 |
} |
6606 |
} |
6607 |
|
6608 |
strMsg += string.Format(" 処理件数={0}", DataCnt.ToString("#,0")); |
6609 |
|
6610 |
return true; |
6611 |
} |
6612 |
catch (Exception ex) |
6613 |
{ |
6614 |
OutDB.rollback(); |
6615 |
|
6616 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
6617 |
strMsg += string.Format(" システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
6618 |
return false; |
6619 |
} |
6620 |
finally |
6621 |
{ |
6622 |
InDB.close(); InDB = null; |
6623 |
OutDB.commit(); |
6624 |
OutDB.close(); OutDB = null; |
6625 |
} |
6626 |
} |
6627 |
#endregion |
6628 |
|
6629 |
#region 単位マスタ(Unitmaster) |
6630 |
/// <summary> |
6631 |
/// 単位マスタ(Unitmaster) |
6632 |
/// </summary> |
6633 |
/// <param name="strMsg"></param> |
6634 |
/// <returns></returns> |
6635 |
private bool CnvUnitmaster(int ino, ref string strMsg) |
6636 |
{ |
6637 |
ProcessManagement.OracleDB.IOAccess.IOMUnit InDB = new ProcessManagement.OracleDB.IOAccess.IOMUnit(); |
6638 |
ProcessManagement.DB.IOAccess.IOMUnit OutDB = new ProcessManagement.DB.IOAccess.IOMUnit(); |
6639 |
strMsg = string.Format("№{0}:テーブル:{1}({2})", (ino + 1).ToString("00"), s_OracleTables[ino].Value, s_OracleTables[ino].Key); |
6640 |
try |
6641 |
{ |
6642 |
EditDspLength(ref strMsg); |
6643 |
|
6644 |
string strSQL = CreateOrder(s_OracleTables[ino].Key); |
6645 |
List<UnitMaster> getList = new List<UnitMaster>(); |
6646 |
if (!InDB.SelectAction(strSQL, ref getList)) return false; |
6647 |
|
6648 |
OutDB.connect(); OutDB.beginTran(); |
6649 |
strSQL = string.Format("TRUNCATE TABLE {0}", s_OracleTables[ino].Key); |
6650 |
OutDB.ExecuteNonQuery(strSQL, false); |
6651 |
|
6652 |
List<UnitMaster> BuffList = new List<UnitMaster>(); |
6653 |
int DataCnt = 0; |
6654 |
while (DataCnt < getList.Count) |
6655 |
{ |
6656 |
BuffList.Clear(); |
6657 |
|
6658 |
for (int ii = 0; ii < s_LoopCount; ii++, DataCnt++) |
6659 |
{ |
6660 |
if (DataCnt >= getList.Count) break; |
6661 |
|
6662 |
BuffList.Add(getList[DataCnt]); |
6663 |
} |
6664 |
|
6665 |
if (!OutDB.InsertAction(BuffList, false)) |
6666 |
{ |
6667 |
OutDB.rollback(); |
6668 |
strMsg += " DB処理異常"; |
6669 |
return false; |
6670 |
} |
6671 |
} |
6672 |
|
6673 |
strMsg += string.Format(" 処理件数={0}", DataCnt.ToString("#,0")); |
6674 |
|
6675 |
return true; |
6676 |
} |
6677 |
catch (Exception ex) |
6678 |
{ |
6679 |
OutDB.rollback(); |
6680 |
|
6681 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
6682 |
strMsg += string.Format(" システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
6683 |
return false; |
6684 |
} |
6685 |
finally |
6686 |
{ |
6687 |
InDB.close(); InDB = null; |
6688 |
OutDB.commit(); |
6689 |
OutDB.close(); OutDB = null; |
6690 |
} |
6691 |
} |
6692 |
#endregion |
6693 |
|
6694 |
#region 車両マスタ(Vehiclemaster) |
6695 |
/// <summary> |
6696 |
/// 車両マスタ(Vehiclemaster) |
6697 |
/// </summary> |
6698 |
/// <param name="strMsg"></param> |
6699 |
/// <returns></returns> |
6700 |
private bool CnvVehiclemaster(int ino, ref string strMsg) |
6701 |
{ |
6702 |
ProcessManagement.OracleDB.IOAccess.IOMVehicle InDB = new ProcessManagement.OracleDB.IOAccess.IOMVehicle(); |
6703 |
ProcessManagement.DB.IOAccess.IOMVehicle OutDB = new ProcessManagement.DB.IOAccess.IOMVehicle(); |
6704 |
strMsg = string.Format("№{0}:テーブル:{1}({2})", (ino + 1).ToString("00"), s_OracleTables[ino].Value, s_OracleTables[ino].Key); |
6705 |
try |
6706 |
{ |
6707 |
EditDspLength(ref strMsg); |
6708 |
|
6709 |
string strSQL = CreateOrder(s_OracleTables[ino].Key); |
6710 |
List<VehicleMaster> getList = new List<VehicleMaster>(); |
6711 |
if (!InDB.SelectAction(strSQL, ref getList)) return false; |
6712 |
|
6713 |
OutDB.connect(); OutDB.beginTran(); |
6714 |
strSQL = string.Format("TRUNCATE TABLE {0}", s_OracleTables[ino].Key); |
6715 |
OutDB.ExecuteNonQuery(strSQL, false); |
6716 |
|
6717 |
List<VehicleMaster> BuffList = new List<VehicleMaster>(); |
6718 |
int DataCnt = 0; |
6719 |
while (DataCnt < getList.Count) |
6720 |
{ |
6721 |
BuffList.Clear(); |
6722 |
|
6723 |
for (int ii = 0; ii < s_LoopCount; ii++, DataCnt++) |
6724 |
{ |
6725 |
if (DataCnt >= getList.Count) break; |
6726 |
|
6727 |
BuffList.Add(getList[DataCnt]); |
6728 |
} |
6729 |
|
6730 |
if (!OutDB.InsertAction(BuffList, false)) |
6731 |
{ |
6732 |
OutDB.rollback(); |
6733 |
strMsg += " DB処理異常"; |
6734 |
return false; |
6735 |
} |
6736 |
} |
6737 |
|
6738 |
strMsg += string.Format(" 処理件数={0}", DataCnt.ToString("#,0")); |
6739 |
|
6740 |
return true; |
6741 |
} |
6742 |
catch (Exception ex) |
6743 |
{ |
6744 |
OutDB.rollback(); |
6745 |
|
6746 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
6747 |
strMsg += string.Format(" システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
6748 |
return false; |
6749 |
} |
6750 |
finally |
6751 |
{ |
6752 |
InDB.close(); InDB = null; |
6753 |
OutDB.commit(); |
6754 |
OutDB.close(); OutDB = null; |
6755 |
} |
6756 |
} |
6757 |
#endregion |
6758 |
|
6759 |
#region 車両記録データ(Vehiclerecorddata) |
6760 |
/// <summary> |
6761 |
/// 車両記録データ(Vehiclerecorddata) |
6762 |
/// </summary> |
6763 |
/// <param name="strMsg"></param> |
6764 |
/// <returns></returns> |
6765 |
private bool CnvVehiclerecorddata(int ino, ref string strMsg) |
6766 |
{ |
6767 |
ProcessManagement.OracleDB.IOAccess.IOMVehicleRecordData InDB = new ProcessManagement.OracleDB.IOAccess.IOMVehicleRecordData(); |
6768 |
ProcessManagement.DB.IOAccess.IOMVehicleRecordData OutDB = new ProcessManagement.DB.IOAccess.IOMVehicleRecordData(); |
6769 |
strMsg = string.Format("№{0}:テーブル:{1}({2})", (ino + 1).ToString("00"), s_OracleTables[ino].Value, s_OracleTables[ino].Key); |
6770 |
try |
6771 |
{ |
6772 |
EditDspLength(ref strMsg); |
6773 |
|
6774 |
string strSQL = CreateOrder(s_OracleTables[ino].Key); |
6775 |
List<VehicleRecordData> getList = new List<VehicleRecordData>(); |
6776 |
if (!InDB.SelectAction(strSQL, ref getList)) return false; |
6777 |
|
6778 |
OutDB.connect(); OutDB.beginTran(); |
6779 |
strSQL = string.Format("TRUNCATE TABLE {0}", s_OracleTables[ino].Key); |
6780 |
OutDB.ExecuteNonQuery(strSQL, false); |
6781 |
|
6782 |
List<VehicleRecordData> BuffList = new List<VehicleRecordData>(); |
6783 |
int DataCnt = 0; |
6784 |
while (DataCnt < getList.Count) |
6785 |
{ |
6786 |
BuffList.Clear(); |
6787 |
|
6788 |
for (int ii = 0; ii < s_LoopCount; ii++, DataCnt++) |
6789 |
{ |
6790 |
if (DataCnt >= getList.Count) break; |
6791 |
|
6792 |
BuffList.Add(getList[DataCnt]); |
6793 |
} |
6794 |
|
6795 |
if (!OutDB.InsertAction(BuffList, false)) |
6796 |
{ |
6797 |
OutDB.rollback(); |
6798 |
strMsg += " DB処理異常"; |
6799 |
return false; |
6800 |
} |
6801 |
} |
6802 |
|
6803 |
strMsg += string.Format(" 処理件数={0}", DataCnt.ToString("#,0")); |
6804 |
|
6805 |
return true; |
6806 |
} |
6807 |
catch (Exception ex) |
6808 |
{ |
6809 |
OutDB.rollback(); |
6810 |
|
6811 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
6812 |
strMsg += string.Format(" システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
6813 |
return false; |
6814 |
} |
6815 |
finally |
6816 |
{ |
6817 |
InDB.close(); InDB = null; |
6818 |
OutDB.commit(); |
6819 |
OutDB.close(); OutDB = null; |
6820 |
} |
6821 |
} |
6822 |
#endregion |
6823 |
|
6824 |
#region 車両予約データ(Vehiclescheduledata) |
6825 |
/// <summary> |
6826 |
/// 車両予約データ(Vehiclescheduledata) |
6827 |
/// </summary> |
6828 |
/// <param name="strMsg"></param> |
6829 |
/// <returns></returns> |
6830 |
private bool CnvVehiclescheduledata(int ino, ref string strMsg) |
6831 |
{ |
6832 |
ProcessManagement.OracleDB.IOAccess.IOVehicleScheduleData InDB = new ProcessManagement.OracleDB.IOAccess.IOVehicleScheduleData(); |
6833 |
ProcessManagement.DB.IOAccess.IOVehicleScheduleData OutDB = new ProcessManagement.DB.IOAccess.IOVehicleScheduleData(); |
6834 |
strMsg = string.Format("№{0}:テーブル:{1}({2})", (ino + 1).ToString("00"), s_OracleTables[ino].Value, s_OracleTables[ino].Key); |
6835 |
try |
6836 |
{ |
6837 |
EditDspLength(ref strMsg); |
6838 |
|
6839 |
string strSQL = CreateOrder(s_OracleTables[ino].Key); |
6840 |
List<VehicleScheduleData> getList = new List<VehicleScheduleData>(); |
6841 |
if (!InDB.SelectAction(strSQL, ref getList)) return false; |
6842 |
|
6843 |
OutDB.connect(); OutDB.beginTran(); |
6844 |
strSQL = string.Format("TRUNCATE TABLE {0}", s_OracleTables[ino].Key); |
6845 |
OutDB.ExecuteNonQuery(strSQL, false); |
6846 |
|
6847 |
List<VehicleScheduleData> BuffList = new List<VehicleScheduleData>(); |
6848 |
int DataCnt = 0; |
6849 |
while (DataCnt < getList.Count) |
6850 |
{ |
6851 |
BuffList.Clear(); |
6852 |
|
6853 |
for (int ii = 0; ii < s_LoopCount; ii++, DataCnt++) |
6854 |
{ |
6855 |
if (DataCnt >= getList.Count) break; |
6856 |
|
6857 |
BuffList.Add(getList[DataCnt]); |
6858 |
} |
6859 |
|
6860 |
if (!OutDB.InsertAction(BuffList, false)) |
6861 |
{ |
6862 |
OutDB.rollback(); |
6863 |
strMsg += " DB処理異常"; |
6864 |
return false; |
6865 |
} |
6866 |
} |
6867 |
|
6868 |
strMsg += string.Format(" 処理件数={0}", DataCnt.ToString("#,0")); |
6869 |
|
6870 |
return true; |
6871 |
} |
6872 |
catch (Exception ex) |
6873 |
{ |
6874 |
OutDB.rollback(); |
6875 |
|
6876 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
6877 |
strMsg += string.Format(" システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
6878 |
return false; |
6879 |
} |
6880 |
finally |
6881 |
{ |
6882 |
InDB.close(); InDB = null; |
6883 |
OutDB.commit(); |
6884 |
OutDB.close(); OutDB = null; |
6885 |
} |
6886 |
} |
6887 |
#endregion |
6888 |
|
6889 |
#region 年マスタ(YearMaster) |
6890 |
/// <summary> |
6891 |
/// 年マスタ(YearMaster) |
6892 |
/// </summary> |
6893 |
/// <param name="strMsg"></param> |
6894 |
/// <returns></returns> |
6895 |
private bool CnvYearMaster(int ino, ref string strMsg) |
6896 |
{ |
6897 |
ProcessManagement.DB.IOAccess.IOSystemExecute OutDB = new ProcessManagement.DB.IOAccess.IOSystemExecute(); |
6898 |
strMsg = string.Format("№{0}:テーブル:{1}({2})", (ino + 1).ToString("00"), s_OracleTables[ino].Value, s_OracleTables[ino].Key); |
6899 |
try |
6900 |
{ |
6901 |
EditDspLength(ref strMsg); |
6902 |
|
6903 |
OutDB.connect(); OutDB.beginTran(); |
6904 |
string strSQL = string.Format("TRUNCATE TABLE {0}", s_OracleTables[ino].Key); |
6905 |
OutDB.ExecuteNonQuery(strSQL, false); |
6906 |
|
6907 |
bool bDataFirst = true; |
6908 |
int DataCnt = 0; |
6909 |
string BuffList = string.Format("INSERT INTO {0} (years) VALUES", s_OracleTables[ino].Key); |
6910 |
|
6911 |
for (int i = 0; i < 100; i++, DataCnt++) |
6912 |
{ |
6913 |
if (bDataFirst) BuffList += " ("; |
6914 |
else BuffList += ", ("; |
6915 |
|
6916 |
BuffList += string.Format("{0}", 2015 + i); |
6917 |
BuffList += ")"; |
6918 |
|
6919 |
bDataFirst = false; |
6920 |
} |
6921 |
|
6922 |
if (!OutDB.ExecuteNonQuery(BuffList, false)) |
6923 |
{ |
6924 |
OutDB.rollback(); |
6925 |
strMsg += " DB処理異常"; |
6926 |
return false; |
6927 |
} |
6928 |
|
6929 |
strMsg += string.Format(" 処理件数={0}", DataCnt.ToString("#,0")); |
6930 |
|
6931 |
return true; |
6932 |
} |
6933 |
catch (Exception ex) |
6934 |
{ |
6935 |
OutDB.rollback(); |
6936 |
|
6937 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
6938 |
strMsg += string.Format(" システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
6939 |
return false; |
6940 |
} |
6941 |
finally |
6942 |
{ |
6943 |
OutDB.commit(); |
6944 |
OutDB.close(); OutDB = null; |
6945 |
} |
6946 |
} |
6947 |
#endregion |
6948 |
|
6949 |
#region 月マスタ(Monthmaster) |
6950 |
/// <summary> |
6951 |
/// 月マスタ(Monthmaster) |
6952 |
/// </summary> |
6953 |
/// <param name="strMsg"></param> |
6954 |
/// <returns></returns> |
6955 |
private bool CnvMonthmaster(int ino, ref string strMsg) |
6956 |
{ |
6957 |
ProcessManagement.DB.IOAccess.IOSystemExecute OutDB = new ProcessManagement.DB.IOAccess.IOSystemExecute(); |
6958 |
strMsg = string.Format("№{0}:テーブル:{1}({2})", (ino + 1).ToString("00"), s_OracleTables[ino].Value, s_OracleTables[ino].Key); |
6959 |
try |
6960 |
{ |
6961 |
EditDspLength(ref strMsg); |
6962 |
|
6963 |
OutDB.connect(); OutDB.beginTran(); |
6964 |
string strSQL = string.Format("TRUNCATE TABLE {0}", s_OracleTables[ino].Key); |
6965 |
OutDB.ExecuteNonQuery(strSQL, false); |
6966 |
|
6967 |
bool bDataFirst = true; |
6968 |
int DataCnt = 0; |
6969 |
string BuffList = string.Format("INSERT INTO {0} (month) VALUES", s_OracleTables[ino].Key); |
6970 |
|
6971 |
for (int i = 0; i < 12; i++, DataCnt++) |
6972 |
{ |
6973 |
if (bDataFirst) BuffList += " ("; |
6974 |
else BuffList += ", ("; |
6975 |
|
6976 |
BuffList += string.Format("{0}", 1 + i); |
6977 |
BuffList += ")"; |
6978 |
|
6979 |
bDataFirst = false; |
6980 |
} |
6981 |
|
6982 |
if (!OutDB.ExecuteNonQuery(BuffList, false)) |
6983 |
{ |
6984 |
OutDB.rollback(); |
6985 |
strMsg += " DB処理異常"; |
6986 |
return false; |
6987 |
} |
6988 |
|
6989 |
strMsg += string.Format(" 処理件数={0}", DataCnt.ToString("#,0")); |
6990 |
|
6991 |
return true; |
6992 |
} |
6993 |
catch (Exception ex) |
6994 |
{ |
6995 |
OutDB.rollback(); |
6996 |
|
6997 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
6998 |
strMsg += string.Format(" システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
6999 |
return false; |
7000 |
} |
7001 |
finally |
7002 |
{ |
7003 |
OutDB.commit(); |
7004 |
OutDB.close(); OutDB = null; |
7005 |
} |
7006 |
} |
7007 |
#endregion |
7008 |
|
7009 |
#region 日マスタ(Daymaster) |
7010 |
/// <summary> |
7011 |
/// 日マスタ(Daymaster) |
7012 |
/// </summary> |
7013 |
/// <param name="strMsg"></param> |
7014 |
/// <returns></returns> |
7015 |
private bool CnvDaymaster(int ino, ref string strMsg) |
7016 |
{ |
7017 |
ProcessManagement.DB.IOAccess.IOSystemExecute OutDB = new ProcessManagement.DB.IOAccess.IOSystemExecute(); |
7018 |
strMsg = string.Format("№{0}:テーブル:{1}({2})", (ino + 1).ToString("00"), s_OracleTables[ino].Value, s_OracleTables[ino].Key); |
7019 |
try |
7020 |
{ |
7021 |
EditDspLength(ref strMsg); |
7022 |
|
7023 |
OutDB.connect(); OutDB.beginTran(); |
7024 |
string strSQL = string.Format("TRUNCATE TABLE {0}", s_OracleTables[ino].Key); |
7025 |
OutDB.ExecuteNonQuery(strSQL, false); |
7026 |
|
7027 |
bool bDataFirst = true; |
7028 |
int DataCnt = 0; |
7029 |
string BuffList = string.Format("INSERT INTO {0} (days) VALUES", s_OracleTables[ino].Key); |
7030 |
|
7031 |
for (int i = 0; i < 31; i++, DataCnt++) |
7032 |
{ |
7033 |
if (bDataFirst) BuffList += " ("; |
7034 |
else BuffList += ", ("; |
7035 |
|
7036 |
BuffList += string.Format("{0}", 1 + i); |
7037 |
BuffList += ")"; |
7038 |
|
7039 |
bDataFirst = false; |
7040 |
} |
7041 |
|
7042 |
if (!OutDB.ExecuteNonQuery(BuffList, false)) |
7043 |
{ |
7044 |
OutDB.rollback(); |
7045 |
strMsg += " DB処理異常"; |
7046 |
return false; |
7047 |
} |
7048 |
|
7049 |
strMsg += string.Format(" 処理件数={0}", DataCnt.ToString("#,0")); |
7050 |
|
7051 |
return true; |
7052 |
} |
7053 |
catch (Exception ex) |
7054 |
{ |
7055 |
OutDB.rollback(); |
7056 |
|
7057 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
7058 |
strMsg += string.Format(" システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
7059 |
return false; |
7060 |
} |
7061 |
finally |
7062 |
{ |
7063 |
OutDB.commit(); |
7064 |
OutDB.close(); OutDB = null; |
7065 |
} |
7066 |
} |
7067 |
#endregion |
7068 |
} |
7069 |
} |