リビジョン 362
工事詳細台帳明細データ作成時、部署コードセット抜け修正
他の画面へボタン:処理追加、ロジック統一
branches/src/ProcessManagement/ProcessManagement/Common/CommonVersion.cs | ||
---|---|---|
14 | 14 |
/// <summary> |
15 | 15 |
/// 本体バージョン |
16 | 16 |
/// </summary> |
17 |
public static int s_SystemVersion = 213;
|
|
17 |
public static int s_SystemVersion = 215;
|
|
18 | 18 |
|
19 | 19 |
/// <summary> |
20 | 20 |
/// コピー・環境バージョン |
branches/src/ProcessManagement/ProcessManagement/Common/Process/ClsOtherProc.cs | ||
---|---|---|
1 |
using System; |
|
2 |
using System.Collections.Generic; |
|
3 |
using System.ComponentModel; |
|
4 |
using System.Data; |
|
5 |
using System.Drawing; |
|
6 |
using System.Text; |
|
7 |
using System.Windows.Forms; |
|
8 |
using System.Collections; |
|
9 |
using System.Linq; |
|
10 |
using System.Diagnostics; |
|
11 |
|
|
12 |
using log4net; |
|
13 |
using log4net.Appender; |
|
14 |
using log4net.Repository.Hierarchy; |
|
15 |
|
|
16 |
using ProcessManagement.Common; |
|
17 |
using ProcessManagement.DB.IOAccess; |
|
18 |
using ProcessManagement.DataModel; |
|
19 |
using ProcessManagement.DB.Core; |
|
20 |
using ProcessManagement.Forms.CustomControls; |
|
21 |
using ProcessManagement.Forms.ControlsAction; |
|
22 |
using ProcessManagement.Forms.DataEntry; |
|
23 |
using ProcessManagement.Forms.SubForms; |
|
24 |
using ProcessManagement.Forms.Master; |
|
25 |
|
|
26 |
|
|
27 |
//*---------------------------- 他画面起動処理クラス --------------------------* |
|
28 |
// 2017/06/25 Ver1.0.0.0 Create Source |
|
29 |
// |
|
30 |
// |
|
31 |
// |
|
32 |
//*----------------------------------------------------------------------------* |
|
33 |
namespace ProcessManagement.Common |
|
34 |
{ |
|
35 |
public static class ClsOtherProc |
|
36 |
{ |
|
37 |
#region ログ定義 |
|
38 |
/// <summary> |
|
39 |
/// log4netログを使用する |
|
40 |
/// </summary> |
|
41 |
private static readonly ILog logger = LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); |
|
42 |
#endregion |
|
43 |
|
|
44 |
#region < ---------- 起動処理 ↓↓↓↓↓ |
|
45 |
#region 一気にメニューへ戻る |
|
46 |
/// <summary> |
|
47 |
/// 一気にメニューへ戻る |
|
48 |
/// </summary> |
|
49 |
public static void ProcExec_MainMenu() |
|
50 |
{ |
|
51 |
try |
|
52 |
{ |
|
53 |
// 起動テーブルをクリアする |
|
54 |
ClsExcute.ClearProcess(); |
|
55 |
} |
|
56 |
catch (Exception ex) |
|
57 |
{ |
|
58 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
|
59 |
} |
|
60 |
} |
|
61 |
#endregion |
|
62 |
|
|
63 |
#region 工事情報入力起動 |
|
64 |
/// <summary> |
|
65 |
/// 工事情報入力起動 |
|
66 |
/// </summary> |
|
67 |
public static void ProcExec_ConstructionBaseInfo(ref FrmConstructionBaseInfo frm |
|
68 |
, int ConstrCode |
|
69 |
, bool bLinkFlg |
|
70 |
, int CurProcNo |
|
71 |
, bool EditLock |
|
72 |
, Form ParentsForm) |
|
73 |
{ |
|
74 |
try |
|
75 |
{ |
|
76 |
int ProcessNo = (int)ClsExcute.ProcessExecuteNo.ConstructionBaseInfo; |
|
77 |
int SelConstrCode = ConstrCode; |
|
78 |
// 増減工事はサブフォームを表示する |
|
79 |
if (bLinkFlg) |
|
80 |
{ |
|
81 |
if (!DispTyingForm(ProcessNo, ref SelConstrCode)) return; |
|
82 |
} |
|
83 |
|
|
84 |
// フォーム登録 |
|
85 |
ExecFormEntry(ProcessNo, CurProcNo, (Form)frm); |
|
86 |
|
|
87 |
// 工事情報入力起動 |
|
88 |
frm.ConstructionCode = SelConstrCode; |
|
89 |
frm.EditLock = EditLock; |
|
90 |
frm.SubForm = true; |
|
91 |
frm.ShowInTaskbar = true; |
|
92 |
|
|
93 |
frm.Show(); |
|
94 |
|
|
95 |
// フォームをずらす |
|
96 |
frm.Location = CommonMotions.SetFormPosion(ParentsForm.Location); |
|
97 |
} |
|
98 |
catch (Exception ex) |
|
99 |
{ |
|
100 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
|
101 |
} |
|
102 |
} |
|
103 |
#endregion |
|
104 |
|
|
105 |
#region 積算見積書入力 |
|
106 |
/// <summary> |
|
107 |
/// 積算見積書入力 |
|
108 |
/// </summary> |
|
109 |
public static void ProcExec_EstimateInput(ref FrmEstimateInput frm |
|
110 |
, int ConstrCode |
|
111 |
, bool bLinkFlg |
|
112 |
, int CurProcNo |
|
113 |
, bool EditLock |
|
114 |
, Form ParentsForm) |
|
115 |
|
|
116 |
{ |
|
117 |
try |
|
118 |
{ |
|
119 |
int ProcessNo = (int)ClsExcute.ProcessExecuteNo.EstimateInput; |
|
120 |
int SelConstrCode = ConstrCode; |
|
121 |
// 増減工事はサブフォームを表示する |
|
122 |
if (bLinkFlg) |
|
123 |
{ |
|
124 |
if (!DispTyingForm(ProcessNo, ref SelConstrCode)) return; |
|
125 |
} |
|
126 |
|
|
127 |
// フォーム登録 |
|
128 |
ExecFormEntry(ProcessNo, CurProcNo, (Form)frm); |
|
129 |
|
|
130 |
// 積算見積書入力起動 |
|
131 |
frm.ConstructionCode = SelConstrCode; |
|
132 |
frm.EditLock = EditLock; |
|
133 |
frm.SubForm = true; |
|
134 |
frm.ShowInTaskbar = true; |
|
135 |
|
|
136 |
frm.Show(); |
|
137 |
|
|
138 |
// フォームをずらす |
|
139 |
frm.Location = CommonMotions.SetFormPosion(ParentsForm.Location); |
|
140 |
} |
|
141 |
catch (Exception ex) |
|
142 |
{ |
|
143 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
|
144 |
} |
|
145 |
} |
|
146 |
#endregion |
|
147 |
|
|
148 |
#region 積算見積書印刷 |
|
149 |
/// <summary> |
|
150 |
/// 積算見積書印刷 |
|
151 |
/// </summary> |
|
152 |
public static void ProcExec_EstimatePrint(ref FrmEstimatePrint frm |
|
153 |
, int ConstrCode |
|
154 |
, bool bLinkFlg |
|
155 |
, int CurProcNo |
|
156 |
, bool EditLock |
|
157 |
, Form ParentsForm) |
|
158 |
|
|
159 |
{ |
|
160 |
try |
|
161 |
{ |
|
162 |
int ProcessNo = (int)ClsExcute.ProcessExecuteNo.EstimatePrint; |
|
163 |
int SelConstrCode = ConstrCode; |
|
164 |
// 増減工事はサブフォームを表示する |
|
165 |
if (bLinkFlg) |
|
166 |
{ |
|
167 |
if (!DispTyingForm(ProcessNo, ref SelConstrCode)) return; |
|
168 |
} |
|
169 |
|
|
170 |
// フォーム登録 |
|
171 |
ExecFormEntry(ProcessNo, CurProcNo, (Form)frm); |
|
172 |
|
|
173 |
// 積算見積書印刷起動 |
|
174 |
frm.ConstructionCode = SelConstrCode; |
|
175 |
frm.EditLock = EditLock; |
|
176 |
frm.SubForm = true; |
|
177 |
frm.ShowInTaskbar = true; |
|
178 |
|
|
179 |
frm.Show(); |
|
180 |
|
|
181 |
// フォームをずらす |
|
182 |
frm.Location = CommonMotions.SetFormPosion(ParentsForm.Location); |
|
183 |
} |
|
184 |
catch (Exception ex) |
|
185 |
{ |
|
186 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
|
187 |
} |
|
188 |
} |
|
189 |
#endregion |
|
190 |
|
|
191 |
#region 積算予算書入力 |
|
192 |
/// <summary> |
|
193 |
/// 積算予算書入力 |
|
194 |
/// </summary> |
|
195 |
public static void ProcExec_EstimateBudget(ref FrmEstimateBudget frm |
|
196 |
, int ConstrCode |
|
197 |
, bool bLinkFlg |
|
198 |
, int CurProcNo |
|
199 |
, bool EditLock |
|
200 |
, Form ParentsForm) |
|
201 |
{ |
|
202 |
try |
|
203 |
{ |
|
204 |
int ProcessNo = (int)ClsExcute.ProcessExecuteNo.EstimateBudget; |
|
205 |
int SelConstrCode = ConstrCode; |
|
206 |
// 増減工事はサブフォームを表示する |
|
207 |
if (bLinkFlg) |
|
208 |
{ |
|
209 |
if (!DispTyingForm(ProcessNo, ref SelConstrCode)) return; |
|
210 |
} |
|
211 |
|
|
212 |
// フォーム登録 |
|
213 |
ExecFormEntry(ProcessNo, CurProcNo, (Form)frm); |
|
214 |
|
|
215 |
// 積算予算書入力起動 |
|
216 |
frm.ConstructionCode = SelConstrCode; |
|
217 |
frm.EditLock = EditLock; |
|
218 |
frm.SubForm = true; |
|
219 |
frm.ShowInTaskbar = true; |
|
220 |
|
|
221 |
frm.Show(); |
|
222 |
|
|
223 |
// フォームをずらす |
|
224 |
frm.Location = CommonMotions.SetFormPosion(ParentsForm.Location); |
|
225 |
} |
|
226 |
catch (Exception ex) |
|
227 |
{ |
|
228 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
|
229 |
} |
|
230 |
} |
|
231 |
#endregion |
|
232 |
|
|
233 |
#region 工事予算書入力 |
|
234 |
/// <summary> |
|
235 |
/// 工事予算書入力 |
|
236 |
/// </summary> |
|
237 |
public static void ProcExec_ConstructionBudget(ref FrmConstructionBudget frm |
|
238 |
, int ConstrCode |
|
239 |
, bool bLinkFlg |
|
240 |
, int CurProcNo |
|
241 |
, bool EditLock |
|
242 |
, Form ParentsForm) |
|
243 |
{ |
|
244 |
try |
|
245 |
{ |
|
246 |
int ProcessNo = (int)ClsExcute.ProcessExecuteNo.ConstructionBudget; |
|
247 |
int SelConstrCode = ConstrCode; |
|
248 |
// 増減工事はサブフォームを表示する |
|
249 |
if (bLinkFlg) |
|
250 |
{ |
|
251 |
if (!DispTyingForm(ProcessNo, ref SelConstrCode)) return; |
|
252 |
} |
|
253 |
|
|
254 |
// フォーム登録 |
|
255 |
ExecFormEntry(ProcessNo, CurProcNo, (Form)frm); |
|
256 |
|
|
257 |
// 工事予算書入力起動 |
|
258 |
frm.ConstructionCode = SelConstrCode; |
|
259 |
frm.EditLock = EditLock; |
|
260 |
frm.SubForm = true; |
|
261 |
frm.ShowInTaskbar = true; |
|
262 |
|
|
263 |
frm.Show(); |
|
264 |
|
|
265 |
// フォームをずらす |
|
266 |
frm.Location = CommonMotions.SetFormPosion(ParentsForm.Location); |
|
267 |
} |
|
268 |
catch (Exception ex) |
|
269 |
{ |
|
270 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
|
271 |
} |
|
272 |
} |
|
273 |
#endregion |
|
274 |
|
|
275 |
#region 工事案件コピー機能 |
|
276 |
/// <summary> |
|
277 |
/// 工事案件コピー機能 |
|
278 |
/// </summary> |
|
279 |
public static void ProcExec_ConstructionCopyList(ref FrmNewOrContinueCopy frm |
|
280 |
, int ConstrCode |
|
281 |
, bool bLinkFlg |
|
282 |
, int CurProcNo |
|
283 |
, bool EditLock |
|
284 |
, Form ParentsForm) |
|
285 |
{ |
|
286 |
try |
|
287 |
{ |
|
288 |
int ProcessNo = (int)ClsExcute.ProcessExecuteNo.ConstructionCopyList; |
|
289 |
int SelConstrCode = ConstrCode; |
|
290 |
// 増減工事はサブフォームを表示する |
|
291 |
if (bLinkFlg) |
|
292 |
{ |
|
293 |
if (!DispTyingForm(ProcessNo, ref SelConstrCode)) return; |
|
294 |
} |
|
295 |
|
|
296 |
// フォーム登録 |
|
297 |
ExecFormEntry(ProcessNo, CurProcNo, (Form)frm); |
|
298 |
|
|
299 |
// 工事案件コピー起動 |
|
300 |
frm.ConstructionCode = SelConstrCode; |
|
301 |
frm.ShowInTaskbar = true; |
|
302 |
|
|
303 |
frm.Show(); |
|
304 |
|
|
305 |
// フォームをずらす |
|
306 |
//frm.Location = CommonMotions.SetFormPosion(ParentsForm.Location); |
|
307 |
frm.StartPosition = FormStartPosition.CenterParent; |
|
308 |
} |
|
309 |
catch (Exception ex) |
|
310 |
{ |
|
311 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
|
312 |
} |
|
313 |
} |
|
314 |
#endregion |
|
315 |
|
|
316 |
#region 注文書入力 |
|
317 |
/// <summary> |
|
318 |
/// 注文書入力 |
|
319 |
/// </summary> |
|
320 |
public static void ProcExec_PurchaseOrderEntry(ref FrmPurchaseOrderEntry frm |
|
321 |
, int ConstrCode |
|
322 |
, bool bLinkFlg |
|
323 |
, int CurProcNo |
|
324 |
, bool EditLock |
|
325 |
, Form ParentsForm) |
|
326 |
{ |
|
327 |
try |
|
328 |
{ |
|
329 |
|
|
330 |
int ProcessNo = (int)ClsExcute.ProcessExecuteNo.PurchaseOrderEntry; |
|
331 |
int SelConstrCode = ConstrCode; |
|
332 |
// 増減工事はサブフォームを表示する |
|
333 |
if (bLinkFlg) |
|
334 |
{ |
|
335 |
if (!DispTyingForm(ProcessNo, ref SelConstrCode)) return; |
|
336 |
} |
|
337 |
|
|
338 |
// フォーム登録 |
|
339 |
ExecFormEntry(ProcessNo, CurProcNo, (Form)frm); |
|
340 |
|
|
341 |
// 注文書入力起動 |
|
342 |
frm.ConstructionCode = SelConstrCode; |
|
343 |
frm.EditLock = EditLock; |
|
344 |
frm.SubForm = true; |
|
345 |
frm.ShowInTaskbar = true; |
|
346 |
|
|
347 |
frm.Show(); |
|
348 |
|
|
349 |
// フォームをずらす |
|
350 |
frm.Location = CommonMotions.SetFormPosion(ParentsForm.Location); |
|
351 |
} |
|
352 |
catch (Exception ex) |
|
353 |
{ |
|
354 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
|
355 |
} |
|
356 |
} |
|
357 |
#endregion |
|
358 |
|
|
359 |
#region 注文書印刷 |
|
360 |
/// <summary> |
|
361 |
/// 注文書印刷 |
|
362 |
/// </summary> |
|
363 |
public static void ProcExec_PurchaseOrderPrint(ref FrmPurchaseOrderPrint frm |
|
364 |
, int ConstrCode |
|
365 |
, bool bLinkFlg |
|
366 |
, int CurProcNo |
|
367 |
, bool EditLock |
|
368 |
, Form ParentsForm) |
|
369 |
{ |
|
370 |
try |
|
371 |
{ |
|
372 |
int ProcessNo = (int)ClsExcute.ProcessExecuteNo.PurchaseOrderPrint; |
|
373 |
int SelConstrCode = ConstrCode; |
|
374 |
// 増減工事はサブフォームを表示する |
|
375 |
if (bLinkFlg) |
|
376 |
{ |
|
377 |
if (!DispTyingForm(ProcessNo, ref SelConstrCode)) return; |
|
378 |
} |
|
379 |
|
|
380 |
// フォーム登録 |
|
381 |
ExecFormEntry(ProcessNo, CurProcNo, (Form)frm); |
|
382 |
|
|
383 |
// 注文書印刷起動 |
|
384 |
frm.ConstructionCode = SelConstrCode; |
|
385 |
frm.EditLock = EditLock; |
|
386 |
frm.SubForm = true; |
|
387 |
frm.ShowInTaskbar = true; |
|
388 |
|
|
389 |
frm.Show(); |
|
390 |
|
|
391 |
// フォームをずらす |
|
392 |
frm.Location = CommonMotions.SetFormPosion(ParentsForm.Location); |
|
393 |
} |
|
394 |
catch (Exception ex) |
|
395 |
{ |
|
396 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
|
397 |
} |
|
398 |
} |
|
399 |
#endregion |
|
400 |
|
|
401 |
#region 工事詳細台帳 |
|
402 |
/// <summary> |
|
403 |
/// 工事詳細台帳 |
|
404 |
/// </summary> |
|
405 |
public static void ProcExec_ConstructionLedger(ref FrmConstructionLedger frm |
|
406 |
, int ConstrCode |
|
407 |
, int CurProcNo |
|
408 |
, bool EditLock |
|
409 |
, Form ParentsForm) |
|
410 |
{ |
|
411 |
try |
|
412 |
{ |
|
413 |
// フォーム登録 |
|
414 |
int ProcessNo = (int)ClsExcute.ProcessExecuteNo.ConstructionLedger; |
|
415 |
ExecFormEntry(ProcessNo, CurProcNo, (Form)frm); |
|
416 |
|
|
417 |
// 工事詳細台帳入力起動 |
|
418 |
frm.ConstructionCode = ClsProcessExist.GetParentConstrCode(ConstrCode); |
|
419 |
//frm.EditLock = m_EditLock; |
|
420 |
frm.SubForm = true; |
|
421 |
frm.ShowInTaskbar = true; |
|
422 |
|
|
423 |
frm.Show(); |
|
424 |
|
|
425 |
// フォームをずらす |
|
426 |
frm.Location = CommonMotions.SetFormPosion(ParentsForm.Location); |
|
427 |
} |
|
428 |
catch (Exception ex) |
|
429 |
{ |
|
430 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
|
431 |
} |
|
432 |
} |
|
433 |
#endregion |
|
434 |
|
|
435 |
#region 交通費及び購入品等入力 |
|
436 |
/// <summary> |
|
437 |
/// 交通費及び購入品等入力 |
|
438 |
/// </summary> |
|
439 |
public static void ProcExec_TAndPCosts(ref FrmTAndPCosts frm |
|
440 |
, int ConstrCode |
|
441 |
, int DepCode |
|
442 |
, int PersonCode |
|
443 |
, int CurProcNo |
|
444 |
, bool EditLock |
|
445 |
, Form ParentsForm) |
|
446 |
{ |
|
447 |
try |
|
448 |
{ |
|
449 |
// フォーム登録 |
|
450 |
int ProcessNo = (int)ClsExcute.ProcessExecuteNo.TAndPCosts; |
|
451 |
ExecFormEntry(ProcessNo, CurProcNo, (Form)frm); |
|
452 |
|
|
453 |
// 交通費及び購入品等入力起動 |
|
454 |
frm.ConstructionCode = ConstrCode; |
|
455 |
frm.DepartmentCode = DepCode; |
|
456 |
frm.PersonCode = PersonCode; |
|
457 |
frm.EditLock = EditLock; |
|
458 |
frm.SubForm = true; |
|
459 |
frm.ShowInTaskbar = true; |
|
460 |
|
|
461 |
frm.Show(); |
|
462 |
|
|
463 |
// フォームをずらす |
|
464 |
frm.Location = CommonMotions.SetFormPosion(ParentsForm.Location); |
|
465 |
} |
|
466 |
catch (Exception ex) |
|
467 |
{ |
|
468 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
|
469 |
} |
|
470 |
} |
|
471 |
#endregion |
|
472 |
|
|
473 |
#region 工事日報入力 |
|
474 |
/// <summary> |
|
475 |
/// 工事日報入力 |
|
476 |
/// </summary> |
|
477 |
public static void ProcExec_DRConstruction(ref FrmDRConstruction frm |
|
478 |
, int ConstrCode |
|
479 |
, int CurProcNo |
|
480 |
, int PersonCode |
|
481 |
, bool EditLock |
|
482 |
, Form ParentsForm) |
|
483 |
{ |
|
484 |
try |
|
485 |
{ |
|
486 |
// フォーム登録 |
|
487 |
int ProcessNo = (int)ClsExcute.ProcessExecuteNo.DRConstruction; |
|
488 |
ExecFormEntry(ProcessNo, CurProcNo, (Form)frm); |
|
489 |
|
|
490 |
// 工事日報入力起動 |
|
491 |
frm.ConstructionCode = ClsProcessExist.GetParentConstrCode(ConstrCode); |
|
492 |
frm.PersonCode = PersonCode; |
|
493 |
frm.EditLock = EditLock; |
|
494 |
frm.SubForm = true; |
|
495 |
frm.ShowInTaskbar = true; |
|
496 |
|
|
497 |
frm.Show(); |
|
498 |
|
|
499 |
// フォームをずらす |
|
500 |
frm.Location = CommonMotions.SetFormPosion(ParentsForm.Location); |
|
501 |
} |
|
502 |
catch (Exception ex) |
|
503 |
{ |
|
504 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
|
505 |
} |
|
506 |
} |
|
507 |
#endregion |
|
508 |
|
|
509 |
#region 打合せ議事録入力 |
|
510 |
/// <summary> |
|
511 |
/// 打合せ議事録入力 |
|
512 |
/// </summary> |
|
513 |
public static void ProcExec_Proceedings(ref FrmProceedings frm |
|
514 |
, int ConstrCode |
|
515 |
, int CurProcNo |
|
516 |
, int PersonCode |
|
517 |
, bool EditLock |
|
518 |
, Form ParentsForm) |
|
519 |
{ |
|
520 |
try |
|
521 |
{ |
|
522 |
// フォーム登録 |
|
523 |
int ProcessNo = (int)ClsExcute.ProcessExecuteNo.Proceedings; |
|
524 |
ExecFormEntry(ProcessNo, CurProcNo, (Form)frm); |
|
525 |
|
|
526 |
// 打合せ議事録入力起動 |
|
527 |
frm.ConstructionCode = ClsProcessExist.GetParentConstrCode(ConstrCode); |
|
528 |
frm.EditLock = EditLock; |
|
529 |
frm.SubForm = true; |
|
530 |
frm.ShowInTaskbar = true; |
|
531 |
|
|
532 |
frm.Show(); |
|
533 |
|
|
534 |
// フォームをずらす |
|
535 |
frm.Location = CommonMotions.SetFormPosion(ParentsForm.Location); |
|
536 |
} |
|
537 |
catch (Exception ex) |
|
538 |
{ |
|
539 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
|
540 |
} |
|
541 |
} |
|
542 |
#endregion |
|
543 |
|
|
544 |
#region 出勤日報入力 |
|
545 |
/// <summary> |
|
546 |
/// 出勤日報入力 |
|
547 |
/// </summary> |
|
548 |
public static void ProcExec_DRWork(ref FrmDRWork frm |
|
549 |
, int CurProcNo |
|
550 |
, bool EditLock |
|
551 |
, Form ParentsForm) |
|
552 |
{ |
|
553 |
try |
|
554 |
{ |
|
555 |
// フォーム登録 |
|
556 |
int ProcessNo = (int)ClsExcute.ProcessExecuteNo.DRWork; |
|
557 |
ExecFormEntry(ProcessNo, CurProcNo, (Form)frm); |
|
558 |
|
|
559 |
// 出勤日報入力起動 |
|
560 |
frm.PersonCode = CommonMotions.LoginUserData.PersonCode; |
|
561 |
frm.EditLock = EditLock; |
|
562 |
frm.SubForm = true; |
|
563 |
frm.ShowInTaskbar = true; |
|
564 |
|
|
565 |
frm.Show(); |
|
566 |
|
|
567 |
// フォームをずらす |
|
568 |
frm.Location = CommonMotions.SetFormPosion(ParentsForm.Location); |
|
569 |
} |
|
570 |
catch (Exception ex) |
|
571 |
{ |
|
572 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
|
573 |
} |
|
574 |
} |
|
575 |
#endregion |
|
576 |
|
|
577 |
#region 資材貸出 |
|
578 |
/// <summary> |
|
579 |
/// 資材貸出 |
|
580 |
/// </summary> |
|
581 |
public static void ProcExec_MaterialReserve(ref FrmMaterialReserveEntry frm |
|
582 |
, int ConstrCode |
|
583 |
, int CurProcNo |
|
584 |
, bool EditLock |
|
585 |
, Form ParentsForm) |
|
586 |
{ |
|
587 |
try |
|
588 |
{ |
|
589 |
// フォーム登録 |
|
590 |
int ProcessNo = (int)ClsExcute.ProcessExecuteNo.MaterialReserveEntry; |
|
591 |
ExecFormEntry(ProcessNo, CurProcNo, (Form)frm); |
|
592 |
|
|
593 |
// 資材貸出入力起動 |
|
594 |
frm.ConstructionCode = ClsProcessExist.GetParentConstrCode(ConstrCode); |
|
595 |
frm.EditLock = EditLock; |
|
596 |
frm.SubForm = true; |
|
597 |
frm.ShowInTaskbar = true; |
|
598 |
|
|
599 |
frm.Show(); |
|
600 |
|
|
601 |
// フォームをずらす |
|
602 |
frm.Location = CommonMotions.SetFormPosion(ParentsForm.Location); |
|
603 |
} |
|
604 |
catch (Exception ex) |
|
605 |
{ |
|
606 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
|
607 |
} |
|
608 |
} |
|
609 |
#endregion |
|
610 |
|
|
611 |
#region 資材返却 |
|
612 |
/// <summary> |
|
613 |
/// 資材返却 |
|
614 |
/// </summary> |
|
615 |
public static void ProcExec_MaterialReturn(ref FrmMaterialReturnEntry frm |
|
616 |
, int ConstrCode |
|
617 |
, int CurProcNo |
|
618 |
, bool EditLock |
|
619 |
, Form ParentsForm) |
|
620 |
{ |
|
621 |
try |
|
622 |
{ |
|
623 |
// フォーム登録 |
|
624 |
int ProcessNo = (int)ClsExcute.ProcessExecuteNo.MaterialReturnEntry; |
|
625 |
ExecFormEntry(ProcessNo, CurProcNo, (Form)frm); |
|
626 |
|
|
627 |
// 資材返却入力起動 |
|
628 |
frm.ConstructionCode = ClsProcessExist.GetParentConstrCode(ConstrCode); |
|
629 |
frm.EditLock = EditLock; |
|
630 |
frm.SubForm = true; |
|
631 |
frm.ShowInTaskbar = true; |
|
632 |
|
|
633 |
frm.Show(); |
|
634 |
|
|
635 |
// フォームをずらす |
|
636 |
frm.Location = CommonMotions.SetFormPosion(ParentsForm.Location); |
|
637 |
} |
|
638 |
catch (Exception ex) |
|
639 |
{ |
|
640 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
|
641 |
} |
|
642 |
} |
|
643 |
#endregion |
|
644 |
|
|
645 |
#region 請求入力 |
|
646 |
/// <summary> |
|
647 |
/// 請求入力 |
|
648 |
/// </summary> |
|
649 |
public static void ProcExec_RequestInput(ref FrmRequestInput frm |
|
650 |
, int ConstrCode |
|
651 |
, int CurProcNo |
|
652 |
, bool EditLock |
|
653 |
, Form ParentsForm) |
|
654 |
{ |
|
655 |
try |
|
656 |
{ |
|
657 |
// フォーム登録 |
|
658 |
int ProcessNo = (int)ClsExcute.ProcessExecuteNo.RequestInput; |
|
659 |
ExecFormEntry(ProcessNo, CurProcNo, (Form)frm); |
|
660 |
|
|
661 |
// 請求入力入力起動 |
|
662 |
frm.ConstructionCode = ClsProcessExist.GetParentConstrCode(ConstrCode); |
|
663 |
frm.EditFlg = EditLock; |
|
664 |
frm.SubForm = true; |
|
665 |
frm.ShowInTaskbar = true; |
|
666 |
|
|
667 |
frm.Show(); |
|
668 |
|
|
669 |
// フォームをずらす |
|
670 |
frm.Location = CommonMotions.SetFormPosion(ParentsForm.Location); |
|
671 |
} |
|
672 |
catch (Exception ex) |
|
673 |
{ |
|
674 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
|
675 |
} |
|
676 |
} |
|
677 |
#endregion |
|
678 |
|
|
679 |
#region 請求書印刷 |
|
680 |
/// <summary> |
|
681 |
/// 請求書印刷 |
|
682 |
/// </summary> |
|
683 |
public static void ProcExec_RequestPrint(ref FrmRequestPrint frm |
|
684 |
, int ConstrCode |
|
685 |
, int CurProcNo |
|
686 |
, Form ParentsForm) |
|
687 |
{ |
|
688 |
try |
|
689 |
{ |
|
690 |
// フォーム登録 |
|
691 |
int ProcessNo = (int)ClsExcute.ProcessExecuteNo.RequestPrint; |
|
692 |
ExecFormEntry(ProcessNo, CurProcNo, (Form)frm); |
|
693 |
|
|
694 |
// 請求書印刷起動 |
|
695 |
frm.ConstructionCode = ClsProcessExist.GetParentConstrCode(ConstrCode); |
|
696 |
frm.SubForm = true; |
|
697 |
frm.ShowInTaskbar = true; |
|
698 |
|
|
699 |
frm.Show(); |
|
700 |
|
|
701 |
// フォームをずらす |
|
702 |
frm.Location = CommonMotions.SetFormPosion(ParentsForm.Location); |
|
703 |
} |
|
704 |
catch (Exception ex) |
|
705 |
{ |
|
706 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
|
707 |
} |
|
708 |
} |
|
709 |
#endregion |
|
710 |
|
|
711 |
#endregion < ---------- 起動処理 ↑↑↑↑↑ |
|
712 |
|
|
713 |
#region フォームのクローズ・クリア |
|
714 |
/// <summary> |
|
715 |
/// フォームのクローズ・クリア |
|
716 |
/// </summary> |
|
717 |
public static void ProcFormClose(int ProcessNo) |
|
718 |
{ |
|
719 |
try |
|
720 |
{ |
|
721 |
PreserveSubFormHandle CurForm = ClsExcute.SubFormHandleList[ProcessNo]; |
|
722 |
// 表示無は処理しない |
|
723 |
if (CurForm.SubFormHandle == null) return; |
|
724 |
|
|
725 |
// 破棄中以外は処理は破棄する |
|
726 |
if (!CurForm.SubFormHandle.Disposing) |
|
727 |
CurForm.SubFormHandle.Dispose(); |
|
728 |
|
|
729 |
// 終了処理 |
|
730 |
CurForm.SubFormHandle = null; |
|
731 |
CurForm.ProcessNo = (int)ClsExcute.ProcessExecuteNo.MainMenu; |
|
732 |
} |
|
733 |
catch (Exception ex) |
|
734 |
{ |
|
735 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
|
736 |
} |
|
737 |
} |
|
738 |
#endregion |
|
739 |
|
|
740 |
#region 増減工事一覧表示 |
|
741 |
/// <summary> |
|
742 |
/// 増減工事一覧表示 |
|
743 |
/// </summary> |
|
744 |
private static bool DispTyingForm(int ProcessNo, ref int ConstrCode) |
|
745 |
{ |
|
746 |
FrmTyingConstrDiag frmTying = new FrmTyingConstrDiag(); |
|
747 |
try |
|
748 |
{ |
|
749 |
// 増減工事はサブフォームを表示する |
|
750 |
frmTying.ParentAdd = true; |
|
751 |
frmTying.OperationProcess = ProcessNo; |
|
752 |
frmTying.ConstructionCode = ConstrCode; |
|
753 |
frmTying.ShowDialog(); |
|
754 |
if (frmTying.EndButton == DialogResult.No) return false; |
|
755 |
ConstrCode = frmTying.ConstructionCode; |
|
756 |
|
|
757 |
return true; |
|
758 |
} |
|
759 |
catch (Exception ex) |
|
760 |
{ |
|
761 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
|
762 |
return false; |
|
763 |
} |
|
764 |
finally |
|
765 |
{ |
|
766 |
frmTying.Dispose(); frmTying = null; |
|
767 |
} |
|
768 |
} |
|
769 |
#endregion |
|
770 |
|
|
771 |
#region 起動フォーム登録 |
|
772 |
/// <summary> |
|
773 |
/// 起動フォーム登録 |
|
774 |
/// </summary> |
|
775 |
private static void ExecFormEntry(int ProcessNo, int CurProcNo, Form CurForm) |
|
776 |
{ |
|
777 |
try |
|
778 |
{ |
|
779 |
ClsExcute.SubFormHandleList[ProcessNo].ProcessNo = CurProcNo; |
|
780 |
ClsExcute.SubFormHandleList[ProcessNo].SubFormHandle = CurForm; |
|
781 |
} |
|
782 |
catch (Exception ex) |
|
783 |
{ |
|
784 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
|
785 |
} |
|
786 |
} |
|
787 |
#endregion |
|
788 |
} |
|
789 |
} |
branches/src/ProcessManagement/ProcessManagement/Common/Process/ClsProcessExist.cs | ||
---|---|---|
21 | 21 |
using ProcessManagement.Forms.ControlsAction; |
22 | 22 |
using ProcessManagement.Forms.SubForms; |
23 | 23 |
|
24 |
//*---------------------------- 他プロセスボタン実行可能確認クラス ------------*
|
|
24 |
//*-------------------- 他プロセスボタン実行可能確認クラス --------------------*
|
|
25 | 25 |
// 2016/04/15 Ver1.0.0.0 Create Source |
26 | 26 |
// |
27 | 27 |
// |
... | ... | |
327 | 327 |
try |
328 | 328 |
{ |
329 | 329 |
// 対象工事の結合・増減を確認する |
330 |
string strSQL = "SELECT CONSTRUCTIONCODE, JoinFlg, TyingFlg FROM CONSTRUCTIONBASEINFO A"; |
|
331 |
strSQL += BaseDB.CreatePrimarykeyString(m_ConstructionCode); |
|
330 |
StringBuilder strSQL = new StringBuilder(); |
|
331 |
strSQL.Append("SELECT CONSTRUCTIONCODE, JoinFlg, TyingFlg FROM CONSTRUCTIONBASEINFO A"); |
|
332 |
strSQL.Append(BaseDB.CreatePrimarykeyString(m_ConstructionCode)); |
|
332 | 333 |
ArrayList BaseList = new ArrayList(); |
333 | 334 |
|
334 |
if (!BaseDB.ExecuteReader(strSQL, ref BaseList)) return; |
|
335 |
if (!BaseDB.ExecuteReader(strSQL.ToString(), ref BaseList)) return;
|
|
335 | 336 |
if (BaseList.Count == 0) return; |
336 | 337 |
|
337 | 338 |
object[] objRec1 = (object[])BaseList[0]; |
... | ... | |
340 | 341 |
|
341 | 342 |
// 結合・増減工事は構成工事コードを全てとる |
342 | 343 |
m_SearchCode = m_ConstructionCode; |
343 |
if (m_BaseInfoJoinFlg != (int)ConstructionBaseInfo.JoinFlgDef.Standard || m_BaseInfoTyingFlg != (int)ConstructionBaseInfo.TyingFlgDef.Standard) |
|
344 |
if (m_BaseInfoJoinFlg != (int)ConstructionBaseInfo.JoinFlgDef.Standard |
|
345 |
|| m_BaseInfoTyingFlg != (int)ConstructionBaseInfo.TyingFlgDef.Standard) |
|
344 | 346 |
{ |
345 | 347 |
// 検索工事番号を返す |
346 | 348 |
m_SearchCode = GetParentConstrCode(m_ConstructionCode); |
... | ... | |
353 | 355 |
string MenuProcName = "メニューへ戻る"; |
354 | 356 |
ProcList.Add(new KeyValuePair<int, string>(MenuProcNo, MenuProcName)); |
355 | 357 |
|
358 |
int ProcNo = 0; |
|
356 | 359 |
// 2:工事情報入力データの存在確認 |
357 | 360 |
if (ExistBaseInfoData()) |
358 | 361 |
{ |
359 |
int ProcNo = (int)ClsExcute.ProcessExecuteNo.ConstructionBaseInfo;
|
|
362 |
ProcNo = (int)ClsExcute.ProcessExecuteNo.ConstructionBaseInfo; |
|
360 | 363 |
string ProcName = ClsExcute.ProcessExecuteName[ProcNo].Replace("-", "").Replace("入力", ""); |
361 | 364 |
ProcList.Add(new KeyValuePair<int, string>(ProcNo, ProcName)); |
362 | 365 |
} |
363 | 366 |
// 3:積算見積書入力データ存在確認 |
364 | 367 |
if (ExistEstimateData(OperationPrcess)) |
365 | 368 |
{ |
366 |
int ProcNo = (int)ClsExcute.ProcessExecuteNo.EstimateInput;
|
|
369 |
ProcNo = (int)ClsExcute.ProcessExecuteNo.EstimateInput; |
|
367 | 370 |
string ProcName = ClsExcute.ProcessExecuteName[ProcNo].Replace("-", "").Replace("入力", ""); |
368 | 371 |
ProcList.Add(new KeyValuePair<int, string>(ProcNo, ProcName)); |
369 | 372 |
} |
370 | 373 |
// 4:積算見積書印刷データ存在確認 |
371 | 374 |
if (ExistEstimateDataPrint()) |
372 | 375 |
{ |
373 |
int ProcNo = (int)ClsExcute.ProcessExecuteNo.EstimatePrint;
|
|
376 |
ProcNo = (int)ClsExcute.ProcessExecuteNo.EstimatePrint; |
|
374 | 377 |
string ProcName = ClsExcute.ProcessExecuteName[ProcNo].Replace("-", "").Replace("入力", ""); |
375 | 378 |
ProcList.Add(new KeyValuePair<int, string>(ProcNo, ProcName)); |
376 | 379 |
} |
377 | 380 |
// 5:積算予算書入力データ存在確認 |
378 | 381 |
if (ExistEstimateBudget(OperationPrcess)) |
379 | 382 |
{ |
380 |
int ProcNo = (int)ClsExcute.ProcessExecuteNo.EstimateBudget;
|
|
383 |
ProcNo = (int)ClsExcute.ProcessExecuteNo.EstimateBudget; |
|
381 | 384 |
string ProcName = ClsExcute.ProcessExecuteName[ProcNo].Replace("-", "").Replace("入力", ""); |
382 | 385 |
ProcList.Add(new KeyValuePair<int, string>(ProcNo, ProcName)); |
383 | 386 |
} |
384 | 387 |
// 6:工事予算書入力データ存在確認 |
385 | 388 |
if (ExistConstructionBudget()) |
386 | 389 |
{ |
387 |
int ProcNo = (int)ClsExcute.ProcessExecuteNo.ConstructionBudget;
|
|
390 |
ProcNo = (int)ClsExcute.ProcessExecuteNo.ConstructionBudget; |
|
388 | 391 |
string ProcName = ClsExcute.ProcessExecuteName[ProcNo].Replace("-", "").Replace("入力", ""); |
389 | 392 |
ProcList.Add(new KeyValuePair<int, string>(ProcNo, ProcName)); |
390 | 393 |
} |
391 | 394 |
// 8:工事案件コピー機能データ存在確認 |
392 | 395 |
if (ExistConstructionDataCopy()) |
393 | 396 |
{ |
394 |
int ProcNo = (int)ClsExcute.ProcessExecuteNo.ConstructionCopyList;
|
|
397 |
ProcNo = (int)ClsExcute.ProcessExecuteNo.ConstructionCopyList; |
|
395 | 398 |
string ProcName = ClsExcute.ProcessExecuteName[ProcNo].Replace("-", "").Replace("入力", ""); |
396 | 399 |
ProcList.Add(new KeyValuePair<int, string>(ProcNo, ProcName)); |
397 | 400 |
} |
398 | 401 |
// 9:注文書入力データ存在確認 |
399 | 402 |
if (ExistPurchaseOrder()) |
400 | 403 |
{ |
401 |
int ProcNo = (int)ClsExcute.ProcessExecuteNo.PurchaseOrderEntry;
|
|
404 |
ProcNo = (int)ClsExcute.ProcessExecuteNo.PurchaseOrderEntry; |
|
402 | 405 |
string ProcName = ClsExcute.ProcessExecuteName[ProcNo].Replace("-", "").Replace("入力", ""); |
403 | 406 |
ProcList.Add(new KeyValuePair<int, string>(ProcNo, ProcName)); |
404 | 407 |
} |
405 | 408 |
//10:注文書印刷データ存在確認 |
406 | 409 |
if (ExistPurchasePrint()) |
407 | 410 |
{ |
408 |
int ProcNo = (int)ClsExcute.ProcessExecuteNo.PurchaseOrderPrint;
|
|
411 |
ProcNo = (int)ClsExcute.ProcessExecuteNo.PurchaseOrderPrint; |
|
409 | 412 |
string ProcName = ClsExcute.ProcessExecuteName[ProcNo].Replace("-", "").Replace("入力", ""); |
410 | 413 |
ProcList.Add(new KeyValuePair<int, string>(ProcNo, ProcName)); |
411 | 414 |
} |
412 | 415 |
// 13:工事詳細台帳 |
413 | 416 |
if (ExistConstructionLedger()) |
414 | 417 |
{ |
415 |
int ProcNo = (int)ClsExcute.ProcessExecuteNo.ConstructionLedger;
|
|
418 |
ProcNo = (int)ClsExcute.ProcessExecuteNo.ConstructionLedger; |
|
416 | 419 |
string ProcName = ClsExcute.ProcessExecuteName[ProcNo].Replace("-", "").Replace("入力", ""); |
417 | 420 |
ProcList.Add(new KeyValuePair<int, string>(ProcNo, ProcName)); |
418 | 421 |
} |
419 | 422 |
// 14:交通費及び購入品入力 |
420 | 423 |
if (ExistTAndPCosts()) |
421 | 424 |
{ |
422 |
int ProcNo = (int)ClsExcute.ProcessExecuteNo.TAndPCosts;
|
|
425 |
ProcNo = (int)ClsExcute.ProcessExecuteNo.TAndPCosts; |
|
423 | 426 |
string ProcName = ClsExcute.ProcessExecuteName[ProcNo].Replace("-", "").Replace("入力", ""); |
424 | 427 |
ProcList.Add(new KeyValuePair<int, string>(ProcNo, ProcName)); |
425 | 428 |
} |
426 |
// 14:請求書印刷
|
|
427 |
if (ExistRequestPrint())
|
|
429 |
// 16:工事日報入力
|
|
430 |
if (ExistDRConstruction())
|
|
428 | 431 |
{ |
429 |
int ProcNo = (int)ClsExcute.ProcessExecuteNo.RequestPrint;
|
|
432 |
ProcNo = (int)ClsExcute.ProcessExecuteNo.DRConstruction;
|
|
430 | 433 |
string ProcName = ClsExcute.ProcessExecuteName[ProcNo].Replace("-", "").Replace("入力", ""); |
431 | 434 |
ProcList.Add(new KeyValuePair<int, string>(ProcNo, ProcName)); |
432 | 435 |
} |
433 |
//// 15:日報一覧 |
|
434 |
//if (ExistDRConstruction()) |
|
435 |
//{ |
|
436 |
// int ProcNo = (int)ClsExcute.ProcessExecuteNo.DRConstruction; |
|
437 |
// string ProcName = ClsExcute.ProcessExecuteName[ProcNo].Replace("-", "").Replace("入力", ""); |
|
438 |
// ProcList.Add(new KeyValuePair<int, string>(ProcNo, ProcName)); |
|
439 |
//} |
|
436 |
// 17:打合せ議事録入力 |
|
437 |
if (ExistProceedings()) |
|
438 |
{ |
|
439 |
ProcNo = (int)ClsExcute.ProcessExecuteNo.Proceedings; |
|
440 |
string ProcName = ClsExcute.ProcessExecuteName[ProcNo].Replace("-", "").Replace("入力", ""); |
|
441 |
ProcList.Add(new KeyValuePair<int, string>(ProcNo, ProcName)); |
|
442 |
} |
|
443 |
// 18:出勤日報入力 |
|
444 |
if (ExistDRWork()) |
|
445 |
{ |
|
446 |
ProcNo = (int)ClsExcute.ProcessExecuteNo.DRWork; |
|
447 |
string ProcName = ClsExcute.ProcessExecuteName[ProcNo].Replace("-", "").Replace("入力", ""); |
|
448 |
ProcList.Add(new KeyValuePair<int, string>(ProcNo, ProcName)); |
|
449 |
} |
|
450 |
// 26:資材貸出入力 |
|
451 |
if (ExistMaterialReserve()) |
|
452 |
{ |
|
453 |
ProcNo = (int)ClsExcute.ProcessExecuteNo.MaterialReserveEntry; |
|
454 |
string ProcName = ClsExcute.ProcessExecuteName[ProcNo].Replace("-", "").Replace("入力", ""); |
|
455 |
ProcList.Add(new KeyValuePair<int, string>(ProcNo, ProcName)); |
|
456 |
} |
|
457 |
// 27:資材返却入力 |
|
458 |
if (ExistMaterialReturn()) |
|
459 |
{ |
|
460 |
ProcNo = (int)ClsExcute.ProcessExecuteNo.MaterialReturnEntry; |
|
461 |
string ProcName = ClsExcute.ProcessExecuteName[ProcNo].Replace("-", "").Replace("入力", ""); |
|
462 |
ProcList.Add(new KeyValuePair<int, string>(ProcNo, ProcName)); |
|
463 |
} |
|
464 |
// 31:請求入力データ存在確認 |
|
465 |
if(ExistRequestInput()) |
|
466 |
{ |
|
467 |
ProcNo = (int)ClsExcute.ProcessExecuteNo.RequestInput; |
|
468 |
string ProcName = ClsExcute.ProcessExecuteName[ProcNo].Replace("-", "").Replace("入力", ""); |
|
469 |
ProcList.Add(new KeyValuePair<int, string>(ProcNo, ProcName)); |
|
470 |
} |
|
471 |
// 32:請求書印刷データ存在確認 |
|
472 |
if(ExistRequestPrint()) |
|
473 |
{ |
|
474 |
ProcNo = (int)ClsExcute.ProcessExecuteNo.RequestPrint; |
|
475 |
string ProcName = ClsExcute.ProcessExecuteName[ProcNo].Replace("-", "").Replace("入力", ""); |
|
476 |
ProcList.Add(new KeyValuePair<int, string>(ProcNo, ProcName)); |
|
477 |
} |
|
440 | 478 |
} |
441 | 479 |
catch (Exception ex) |
442 | 480 |
{ |
... | ... | |
458 | 496 |
{ |
459 | 497 |
try |
460 | 498 |
{ |
461 |
string strSQL = string.Empty;
|
|
499 |
StringBuilder strSQL = new StringBuilder();
|
|
462 | 500 |
|
463 | 501 |
if (para.Length == 0) |
464 |
strSQL = " WHERE CONSTRUCTIONCODE IN (";
|
|
502 |
strSQL.Append(" WHERE CONSTRUCTIONCODE IN (");
|
|
465 | 503 |
else |
466 |
strSQL = string.Format(" WHERE {0}CONSTRUCTIONCODE IN (", para);
|
|
504 |
strSQL.AppendFormat(" WHERE {0}CONSTRUCTIONCODE IN (", para);
|
|
467 | 505 |
|
468 | 506 |
for (int i = 0; i < m_CodeList.Count; i++) |
469 | 507 |
{ |
470 |
if (i != 0) strSQL += ", ";
|
|
471 |
strSQL += m_CodeList[i].ToString();
|
|
508 |
if (i != 0) strSQL.Append(", ");
|
|
509 |
strSQL.Append(m_CodeList[i]);
|
|
472 | 510 |
} |
473 |
strSQL += ")";
|
|
474 |
return strSQL; |
|
511 |
strSQL.Append(")");
|
|
512 |
return strSQL.ToString();
|
|
475 | 513 |
} |
476 | 514 |
catch (Exception ex) |
477 | 515 |
{ |
... | ... | |
495 | 533 |
int Editflg = 0; |
496 | 534 |
if (!ClsSecurityPermission.GetExecutePermission((int)ClsExcute.ProcessExecuteNo.ConstructionBaseInfo, ref Editflg)) return false; |
497 | 535 |
|
498 |
string strSQL = BaseDB.CreatePrimarykeyString(m_ConstructionCode); |
|
536 |
StringBuilder strSQL = new StringBuilder(); |
|
537 |
strSQL.Append(BaseDB.CreatePrimarykeyString(m_ConstructionCode)); |
|
499 | 538 |
ConstructionBaseInfo BaseRec = new ConstructionBaseInfo(); |
500 |
if (!BaseDB.SelectAction(strSQL, ref BaseRec)) return false; |
|
539 |
if (!BaseDB.SelectAction(strSQL.ToString(), ref BaseRec)) return false;
|
|
501 | 540 |
|
502 | 541 |
return true; |
503 | 542 |
} |
... | ... | |
530 | 569 |
// 工事情報入力時は新規入力があるためデータ存在チェックをしない |
531 | 570 |
if (OperationPrcess == (int)ClsExcute.ProcessExecuteNo.ConstructionBaseInfo) return true; |
532 | 571 |
|
533 |
string strSQL = string.Empty;
|
|
572 |
StringBuilder strSQL = new StringBuilder();
|
|
534 | 573 |
// 結合工事以外の場合は自データのチェック |
535 | 574 |
if (m_BaseInfoJoinFlg == (int)ConstructionBaseInfo.JoinFlgDef.Standard) |
536 | 575 |
{ |
537 |
strSQL = EdimateDB.CreatePrimarykeyString(m_ConstructionCode);
|
|
576 |
strSQL.Append(EdimateDB.CreatePrimarykeyString(m_ConstructionCode));
|
|
538 | 577 |
} |
539 | 578 |
else |
540 | 579 |
{ |
541 |
strSQL = WhereString();
|
|
580 |
strSQL.Append(WhereString());
|
|
542 | 581 |
} |
543 | 582 |
List<EstimateData> EstimateList = new List<EstimateData>(); |
544 |
if (!EdimateDB.SelectAction(strSQL, ref EstimateList)) return false; |
|
583 |
if (!EdimateDB.SelectAction(strSQL.ToString(), ref EstimateList)) return false;
|
|
545 | 584 |
if (EstimateList.Count == 0) return false; |
546 | 585 |
|
547 | 586 |
return true; |
... | ... | |
573 | 612 |
if (!ClsSecurityPermission.GetExecutePermission((int)ClsExcute.ProcessExecuteNo.EstimatePrint, ref Editflg)) return false; |
574 | 613 |
|
575 | 614 |
// データの存在確認 |
576 |
string strSQL = "SELECT A.CONSTRUCTIONCODE, B.APPROVALCODE, B.APPROVALSTATUS"; |
|
577 |
strSQL += " FROM ESTIMATEDATA A, PROCESSAPPROVAL B"; |
|
615 |
StringBuilder strSQL = new StringBuilder(); |
|
616 |
strSQL.Append("SELECT A.CONSTRUCTIONCODE, B.APPROVALCODE, B.APPROVALSTATUS"); |
|
617 |
strSQL.Append(" FROM ESTIMATEDATA A, PROCESSAPPROVAL B"); |
|
578 | 618 |
|
579 | 619 |
// 結合工事以外の場合は自データのチェック |
580 | 620 |
if (m_BaseInfoJoinFlg == (int)ConstructionBaseInfo.JoinFlgDef.Standard) |
581 | 621 |
{ |
582 |
strSQL += string.Format(" WHERE A.CONSTRUCTIONCODE = {0}", m_ConstructionCode);
|
|
622 |
strSQL.AppendFormat(" WHERE A.CONSTRUCTIONCODE = {0}", m_ConstructionCode);
|
|
583 | 623 |
} |
584 | 624 |
else |
585 | 625 |
{ |
586 |
strSQL += WhereString("A.");
|
|
626 |
strSQL.Append(WhereString("A."));
|
|
587 | 627 |
} |
588 | 628 |
|
589 |
strSQL += " AND B.CONSTRUCTIONCODE = A.CONSTRUCTIONCODE";
|
|
590 |
strSQL += string.Format(" AND B.APPROVALCODE = {0}", (int)ClsExcute.ApprovalListNo.EstimateApproval);
|
|
591 |
strSQL += string.Format(" AND B.ORDERNO = {0}", CommonDefine.s_Default_OrderNo);
|
|
592 |
strSQL += " AND B.SEQNO = 1";
|
|
593 |
strSQL += string.Format(" AND B.APPROVALSTATUS = {0}", (int)CommonDefine.ApprovalStatus.Approval);
|
|
594 |
strSQL += " GROUP BY A.CONSTRUCTIONCODE, B.APPROVALCODE, B.APPROVALSTATUS";
|
|
629 |
strSQL.Append(" AND B.CONSTRUCTIONCODE = A.CONSTRUCTIONCODE");
|
|
630 |
strSQL.AppendFormat(" AND B.APPROVALCODE = {0}", (int)ClsExcute.ApprovalListNo.EstimateApproval);
|
|
631 |
strSQL.AppendFormat(" AND B.ORDERNO = {0}", CommonDefine.s_Default_OrderNo);
|
|
632 |
strSQL.Append(" AND B.SEQNO = 1");
|
|
633 |
strSQL.AppendFormat(" AND B.APPROVALSTATUS = {0}", (int)CommonDefine.ApprovalStatus.Approval);
|
|
634 |
strSQL.Append(" GROUP BY A.CONSTRUCTIONCODE, B.APPROVALCODE, B.APPROVALSTATUS");
|
|
595 | 635 |
ArrayList EstimateList = new ArrayList(); |
596 |
if (!EstimateDB.ExecuteReader(strSQL, ref EstimateList)) return false; |
|
636 |
if (!EstimateDB.ExecuteReader(strSQL.ToString(), ref EstimateList)) return false;
|
|
597 | 637 |
if (EstimateList.Count == 0) return false; |
598 | 638 |
|
599 | 639 |
return true; |
... | ... | |
627 | 667 |
// 積算見積書入力は新規入力があるためデータ存在チェックをしない |
628 | 668 |
if (OperationPrcess != (int)ClsExcute.ProcessExecuteNo.EstimateInput) return true; |
629 | 669 |
|
630 |
string strSQL = string.Empty;
|
|
670 |
StringBuilder strSQL = new StringBuilder();
|
|
631 | 671 |
// 結合工事以外の場合は自データのチェック |
632 | 672 |
if (m_BaseInfoJoinFlg == (int)ConstructionBaseInfo.JoinFlgDef.Standard) |
633 | 673 |
{ |
634 |
strSQL = EdimateDB.CreatePrimarykeyString(m_ConstructionCode);
|
|
674 |
strSQL.Append(EdimateDB.CreatePrimarykeyString(m_ConstructionCode));
|
|
635 | 675 |
} |
636 | 676 |
else |
637 | 677 |
{ |
638 |
strSQL = WhereString();
|
|
678 |
strSQL.Append(WhereString());
|
|
639 | 679 |
} |
640 | 680 |
List<EstimateData> EstimateList = new List<EstimateData>(); |
641 | 681 |
|
642 |
if (!EdimateDB.SelectAction(strSQL, ref EstimateList)) return false; |
|
682 |
if (!EdimateDB.SelectAction(strSQL.ToString(), ref EstimateList)) return false;
|
|
643 | 683 |
if (EstimateList.Count == 0) return false; |
644 | 684 |
|
645 | 685 |
return true; |
... | ... | |
671 | 711 |
if (!ClsSecurityPermission.GetExecutePermission((int)ClsExcute.ProcessExecuteNo.ConstructionBudget, ref Editflg)) return false; |
672 | 712 |
|
673 | 713 |
// データの存在チェック |
674 |
string strSQL = "SELECT A.CONSTRUCTIONCODE, C.APPROVALCODE, C.APPROVALSTATUS"; |
|
675 |
strSQL += " FROM CONSTRUCTIONBASEINFO A,ESTIMATEDATA B, PROCESSAPPROVAL C"; |
|
714 |
StringBuilder strSQL = new StringBuilder(); |
|
715 |
strSQL.Append("SELECT A.CONSTRUCTIONCODE, C.APPROVALCODE, C.APPROVALSTATUS"); |
|
716 |
strSQL.Append(" FROM CONSTRUCTIONBASEINFO A,ESTIMATEDATA B, PROCESSAPPROVAL C"); |
|
676 | 717 |
|
677 | 718 |
// 結合工事以外の場合は自データのチェック |
678 | 719 |
if (m_BaseInfoJoinFlg == (int)ConstructionBaseInfo.JoinFlgDef.Standard) |
679 | 720 |
{ |
680 |
strSQL += string.Format(" WHERE A.CONSTRUCTIONCODE = {0}", m_ConstructionCode);
|
|
721 |
strSQL.AppendFormat(" WHERE A.CONSTRUCTIONCODE = {0}", m_ConstructionCode);
|
|
681 | 722 |
} |
682 | 723 |
else |
683 | 724 |
{ |
684 |
strSQL += WhereString("A.");
|
|
725 |
strSQL.Append(WhereString("A."));
|
|
685 | 726 |
} |
686 | 727 |
|
687 |
strSQL += " AND A.CONSTRUCTIONPERSONCODE != 0";
|
|
688 |
strSQL += " AND B.CONSTRUCTIONCODE = A.CONSTRUCTIONCODE";
|
|
689 |
strSQL += " AND C.CONSTRUCTIONCODE = A.CONSTRUCTIONCODE";
|
|
690 |
strSQL += string.Format(" AND C.APPROVALCODE = {0}", (int)ClsExcute.ApprovalListNo.EstimateApproval);
|
|
691 |
strSQL += string.Format(" AND C.ORDERNO = {0}", (int)CommonDefine.s_Default_OrderNo);
|
|
692 |
strSQL += " AND C.SEQNO = 1";
|
|
693 |
strSQL += string.Format(" AND C.APPROVALSTATUS = {0}", (int)CommonDefine.ApprovalStatus.Approval);
|
|
694 |
strSQL += " GROUP BY A.CONSTRUCTIONCODE, C.APPROVALCODE, C.APPROVALSTATUS";
|
|
728 |
strSQL.Append(" AND A.CONSTRUCTIONPERSONCODE != 0");
|
|
729 |
strSQL.Append(" AND B.CONSTRUCTIONCODE = A.CONSTRUCTIONCODE");
|
|
730 |
strSQL.Append(" AND C.CONSTRUCTIONCODE = A.CONSTRUCTIONCODE");
|
|
731 |
strSQL.AppendFormat(" AND C.APPROVALCODE = {0}", (int)ClsExcute.ApprovalListNo.EstimateApproval);
|
|
732 |
strSQL.AppendFormat(" AND C.ORDERNO = {0}", (int)CommonDefine.s_Default_OrderNo);
|
|
733 |
strSQL.Append(" AND C.SEQNO = 1");
|
|
734 |
strSQL.AppendFormat(" AND C.APPROVALSTATUS = {0}", (int)CommonDefine.ApprovalStatus.Approval);
|
|
735 |
strSQL.Append(" GROUP BY A.CONSTRUCTIONCODE, C.APPROVALCODE, C.APPROVALSTATUS");
|
|
695 | 736 |
|
696 | 737 |
ArrayList BaseRec = new ArrayList(); |
697 |
if (!BaseDB.ExecuteReader(strSQL, ref BaseRec)) return false; |
|
738 |
if (!BaseDB.ExecuteReader(strSQL.ToString(), ref BaseRec)) return false;
|
|
698 | 739 |
if (BaseRec.Count == 0) return false; |
699 | 740 |
|
700 | 741 |
return true; |
... | ... | |
726 | 767 |
if (!ClsSecurityPermission.GetExecutePermission((int)ClsExcute.ProcessExecuteNo.ConstructionCopyList, ref Editflg)) return false; |
727 | 768 |
|
728 | 769 |
// 工事情報の存在確認 |
729 |
string strSQL = "SELECT A.CONSTRUCTIONCODE, COUNT(*)"; |
|
730 |
strSQL += " FROM CONSTRUCTIONBASEINFO A,ESTIMATEDATA B"; |
|
770 |
StringBuilder strSQL = new StringBuilder(); |
|
771 |
strSQL.Append("SELECT A.CONSTRUCTIONCODE, COUNT(*)"); |
|
772 |
strSQL.Append(" FROM CONSTRUCTIONBASEINFO A,ESTIMATEDATA B"); |
|
731 | 773 |
|
732 | 774 |
// 結合工事以外の場合は自データのチェック |
733 | 775 |
if (m_BaseInfoJoinFlg == (int)ConstructionBaseInfo.JoinFlgDef.Standard) |
734 | 776 |
{ |
735 |
strSQL += string.Format(" WHERE A.CONSTRUCTIONCODE = {0}", m_ConstructionCode);
|
|
777 |
strSQL.AppendFormat(" WHERE A.CONSTRUCTIONCODE = {0}", m_ConstructionCode);
|
|
736 | 778 |
} |
737 | 779 |
else |
738 | 780 |
{ |
739 |
strSQL += WhereString("A.");
|
|
781 |
strSQL.Append(WhereString("A."));
|
|
740 | 782 |
} |
741 | 783 |
|
742 |
strSQL += " AND B.CONSTRUCTIONCODE = A.CONSTRUCTIONCODE";
|
|
743 |
strSQL += " GROUP BY A.CONSTRUCTIONCODE";
|
|
784 |
strSQL.Append(" AND B.CONSTRUCTIONCODE = A.CONSTRUCTIONCODE");
|
|
785 |
strSQL.Append(" GROUP BY A.CONSTRUCTIONCODE");
|
|
744 | 786 |
|
745 | 787 |
ArrayList BaseRec = new ArrayList(); |
746 |
if (!BaseDB.ExecuteReader(strSQL, ref BaseRec)) return false; |
|
788 |
if (!BaseDB.ExecuteReader(strSQL.ToString(), ref BaseRec)) return false;
|
|
747 | 789 |
if (BaseRec.Count == 0) return false; |
748 | 790 |
|
749 | 791 |
return true; |
... | ... | |
775 | 817 |
if (!ClsSecurityPermission.GetExecutePermission((int)ClsExcute.ProcessExecuteNo.PurchaseOrderEntry, ref Editflg)) return false; |
776 | 818 |
|
777 | 819 |
// データの存在確認 |
778 |
string strSQL = "SELECT A.CONSTRUCTIONCODE, B.APPROVALCODE, B.APPROVALSTATUS"; |
|
779 |
strSQL += " FROM CONSTRUCTIONBUDGET A, PROCESSAPPROVAL B"; |
|
820 |
StringBuilder strSQL = new StringBuilder(); |
|
821 |
strSQL.Append("SELECT A.CONSTRUCTIONCODE, B.APPROVALCODE, B.APPROVALSTATUS"); |
|
822 |
strSQL.Append(" FROM CONSTRUCTIONBUDGET A, PROCESSAPPROVAL B"); |
|
780 | 823 |
|
781 | 824 |
// 結合工事以外の場合は自データのチェック |
782 | 825 |
if (m_BaseInfoJoinFlg == (int)ConstructionBaseInfo.JoinFlgDef.Standard) |
783 | 826 |
{ |
784 |
strSQL += string.Format(" WHERE A.CONSTRUCTIONCODE = {0}", m_ConstructionCode);
|
|
827 |
strSQL.AppendFormat(" WHERE A.CONSTRUCTIONCODE = {0}", m_ConstructionCode);
|
|
785 | 828 |
} |
786 | 829 |
else |
787 | 830 |
{ |
788 |
strSQL += WhereString("A.");
|
|
831 |
strSQL.Append(WhereString("A."));
|
|
789 | 832 |
} |
790 | 833 |
|
791 |
strSQL += " AND B.CONSTRUCTIONCODE = A.CONSTRUCTIONCODE";
|
|
792 |
strSQL += string.Format(" AND B.APPROVALCODE = {0}", (int)ClsExcute.ApprovalListNo.ConstructionBudgetApproval);
|
|
793 |
strSQL += string.Format(" AND B.ORDERNO = {0}", m_OrderNo);
|
|
794 |
strSQL += " AND B.SEQNO = 1";
|
|
795 |
strSQL += string.Format(" AND B.APPROVALSTATUS = {0}", (int)CommonDefine.ApprovalStatus.Approval);
|
|
796 |
strSQL += " GROUP BY A.CONSTRUCTIONCODE, B.APPROVALCODE, B.APPROVALSTATUS";
|
|
834 |
strSQL.Append(" AND B.CONSTRUCTIONCODE = A.CONSTRUCTIONCODE");
|
|
835 |
strSQL.AppendFormat(" AND B.APPROVALCODE = {0}", (int)ClsExcute.ApprovalListNo.ConstructionBudgetApproval);
|
|
836 |
strSQL.AppendFormat(" AND B.ORDERNO = {0}", m_OrderNo);
|
|
837 |
strSQL.Append(" AND B.SEQNO = 1");
|
|
838 |
strSQL.AppendFormat(" AND B.APPROVALSTATUS = {0}", (int)CommonDefine.ApprovalStatus.Approval);
|
|
839 |
strSQL.Append(" GROUP BY A.CONSTRUCTIONCODE, B.APPROVALCODE, B.APPROVALSTATUS");
|
|
797 | 840 |
ArrayList BudgetList = new ArrayList(); |
798 |
if (!BudgetDB.ExecuteReader(strSQL, ref BudgetList)) return false; |
|
841 |
if (!BudgetDB.ExecuteReader(strSQL.ToString(), ref BudgetList)) return false;
|
|
799 | 842 |
if (BudgetList.Count == 0) return false; |
800 | 843 |
|
801 | 844 |
return true; |
... | ... | |
828 | 871 |
if (!ClsSecurityPermission.GetExecutePermission((int)ClsExcute.ProcessExecuteNo.PurchaseOrderPrint, ref Editflg)) return false; |
829 | 872 |
|
830 | 873 |
// データの存在確認 |
831 |
string strSQL = "SELECT A.CONSTRUCTIONCODE, B.APPROVALCODE, B.APPROVALSTATUS"; |
|
832 |
strSQL += " FROM PURCHASEORDER A, PROCESSAPPROVAL B"; |
|
874 |
StringBuilder strSQL = new StringBuilder(); |
|
875 |
strSQL.Append("SELECT A.CONSTRUCTIONCODE, B.APPROVALCODE, B.APPROVALSTATUS"); |
|
876 |
strSQL.Append(" FROM PURCHASEORDER A, PROCESSAPPROVAL B"); |
|
833 | 877 |
|
834 | 878 |
// 結合工事以外の場合は自データのチェック |
835 | 879 |
if (m_BaseInfoJoinFlg == (int)ConstructionBaseInfo.JoinFlgDef.Standard) |
836 | 880 |
{ |
837 |
strSQL += string.Format(" WHERE A.CONSTRUCTIONCODE = {0}", m_ConstructionCode);
|
|
881 |
strSQL.AppendFormat(" WHERE A.CONSTRUCTIONCODE = {0}", m_ConstructionCode);
|
|
838 | 882 |
} |
839 | 883 |
else |
840 | 884 |
{ |
841 |
strSQL += WhereString("A.");
|
|
885 |
strSQL.Append(WhereString("A."));
|
|
842 | 886 |
} |
843 | 887 |
|
844 |
strSQL += " AND B.CONSTRUCTIONCODE = A.CONSTRUCTIONCODE";
|
|
845 |
strSQL += string.Format(" AND B.APPROVALCODE = {0}", (int)ClsExcute.ApprovalListNo.PurchaseOrderEntryApproval);
|
|
846 |
strSQL += string.Format(" AND B.ORDERNO = {0}", m_OrderNo);
|
|
847 |
strSQL += " AND B.SEQNO = 1";
|
|
848 |
strSQL += string.Format(" AND B.APPROVALSTATUS = {0}", (int)CommonDefine.ApprovalStatus.Approval);
|
|
849 |
strSQL += " GROUP BY A.CONSTRUCTIONCODE, B.APPROVALCODE, B.APPROVALSTATUS";
|
|
888 |
strSQL.Append(" AND B.CONSTRUCTIONCODE = A.CONSTRUCTIONCODE");
|
|
889 |
strSQL.AppendFormat(" AND B.APPROVALCODE = {0}", (int)ClsExcute.ApprovalListNo.PurchaseOrderEntryApproval);
|
|
890 |
strSQL.AppendFormat(" AND B.ORDERNO = {0}", m_OrderNo);
|
|
891 |
strSQL.Append(" AND B.SEQNO = 1");
|
|
892 |
strSQL.AppendFormat(" AND B.APPROVALSTATUS = {0}", (int)CommonDefine.ApprovalStatus.Approval);
|
|
893 |
strSQL.Append(" GROUP BY A.CONSTRUCTIONCODE, B.APPROVALCODE, B.APPROVALSTATUS");
|
|
850 | 894 |
ArrayList OrderList = new ArrayList(); |
851 |
if (!OrderDB.ExecuteReader(strSQL, ref OrderList)) return false; |
|
895 |
if (!OrderDB.ExecuteReader(strSQL.ToString(), ref OrderList)) return false;
|
|
852 | 896 |
if (OrderList.Count == 0) return false; |
853 | 897 |
|
854 | 898 |
return true; |
... | ... | |
881 | 925 |
if (!ClsSecurityPermission.GetExecutePermission((int)ClsExcute.ProcessExecuteNo.ConstructionLedger, ref Editflg)) return false; |
882 | 926 |
|
883 | 927 |
// データの存在確認 |
884 |
string strSQL = "SELECT A.CONSTRUCTIONCODE, B.APPROVALCODE, B.APPROVALSTATUS, C.CONSTRUCTIONCODE"; |
|
885 |
strSQL += " FROM CONSTRUCTIONLEDGER A"; |
|
886 |
strSQL += " LEFT JOIN PROCESSAPPROVAL B"; |
|
887 |
strSQL += " ON B.CONSTRUCTIONCODE = A.CONSTRUCTIONCODE"; |
|
888 |
strSQL += string.Format(" AND B.APPROVALCODE = {0}", (int)ClsExcute.ApprovalListNo.ConstructionBudgetApproval); |
|
889 |
strSQL += string.Format(" AND B.ORDERNO = {0}", CommonDefine.s_Default_OrderNo); |
|
890 |
strSQL += " AND B.SEQNO = 1"; |
|
891 |
strSQL += string.Format(" AND B.APPROVALSTATUS = {0}", (int)CommonDefine.ApprovalStatus.Approval); |
|
892 |
strSQL += " LEFT JOIN CONSTRUCTIONLEDGER C"; |
|
893 |
strSQL += " ON C.CONSTRUCTIONCODE = A.CONSTRUCTIONCODE"; |
|
894 |
strSQL += string.Format(" WHERE A.CONSTRUCTIONCODE = {0}", m_SearchCode); |
|
895 |
strSQL += " GROUP BY A.CONSTRUCTIONCODE, B.APPROVALCODE, B.APPROVALSTATUS, C.CONSTRUCTIONCODE"; |
|
928 |
StringBuilder strSQL = new StringBuilder(); |
|
929 |
strSQL.Append("SELECT A.CONSTRUCTIONCODE, B.APPROVALCODE, B.APPROVALSTATUS, C.CONSTRUCTIONCODE"); |
|
930 |
strSQL.Append(" FROM CONSTRUCTIONLEDGER A"); |
|
931 |
strSQL.Append(" LEFT JOIN PROCESSAPPROVAL B"); |
|
932 |
strSQL.Append(" ON B.CONSTRUCTIONCODE = A.CONSTRUCTIONCODE"); |
|
933 |
strSQL.AppendFormat(" AND B.APPROVALCODE = {0}", (int)ClsExcute.ApprovalListNo.ConstructionBudgetApproval); |
|
934 |
strSQL.AppendFormat(" AND B.ORDERNO = {0}", CommonDefine.s_Default_OrderNo); |
|
935 |
strSQL.Append(" AND B.SEQNO = 1"); |
|
936 |
strSQL.AppendFormat(" AND B.APPROVALSTATUS = {0}", (int)CommonDefine.ApprovalStatus.Approval); |
|
937 |
strSQL.Append(" LEFT JOIN CONSTRUCTIONLEDGER C"); |
|
938 |
strSQL.Append(" ON C.CONSTRUCTIONCODE = A.CONSTRUCTIONCODE"); |
|
939 |
strSQL.AppendFormat(" WHERE A.CONSTRUCTIONCODE = {0}", m_SearchCode); |
|
940 |
strSQL.Append(" GROUP BY A.CONSTRUCTIONCODE, B.APPROVALCODE, B.APPROVALSTATUS, C.CONSTRUCTIONCODE"); |
|
896 | 941 |
|
897 | 942 |
ArrayList LedgerList = new ArrayList(); |
898 |
if (!LedgerDB.ExecuteReader(strSQL, ref LedgerList)) return false; |
|
943 |
if (!LedgerDB.ExecuteReader(strSQL.ToString(), ref LedgerList)) return false;
|
|
899 | 944 |
if (LedgerList.Count == 0) return false; |
900 | 945 |
|
901 | 946 |
return true; |
... | ... | |
927 | 972 |
if (!ClsSecurityPermission.GetExecutePermission((int)ClsExcute.ProcessExecuteNo.TAndPCosts, ref Editflg)) return false; |
928 | 973 |
|
929 | 974 |
// 工事詳細台帳データの存在チェック |
930 |
string strSQL = string.Empty;
|
|
975 |
StringBuilder strSQL = new StringBuilder();
|
|
931 | 976 |
|
932 | 977 |
// 結合工事以外の場合は自データのチェック |
933 | 978 |
if (m_BaseInfoJoinFlg == (int)ConstructionBaseInfo.JoinFlgDef.Standard) |
934 | 979 |
{ |
935 |
strSQL = LedgerDB.CreatePrimarykeyString(m_ConstructionCode);
|
|
980 |
strSQL.Append(LedgerDB.CreatePrimarykeyString(m_ConstructionCode));
|
|
936 | 981 |
} |
937 | 982 |
else |
938 | 983 |
{ |
939 |
strSQL = WhereString();
|
|
984 |
strSQL.Append(WhereString());
|
|
940 | 985 |
} |
941 | 986 |
|
942 | 987 |
ConstructionLedger LedgerList = new ConstructionLedger(); |
943 |
if (!LedgerDB.SelectAction(strSQL, ref LedgerList)) return false; |
|
988 |
if (!LedgerDB.SelectAction(strSQL.ToString(), ref LedgerList)) return false;
|
|
944 | 989 |
|
945 | 990 |
return true; |
946 | 991 |
} |
... | ... | |
956 | 1001 |
} |
957 | 1002 |
#endregion |
958 | 1003 |
|
959 |
#region 14:請求書印刷データ存在確認
|
|
1004 |
#region 16:工事日報入力存在確認
|
|
960 | 1005 |
/// <summary> |
961 |
/// 14:請求書印刷データ存在確認
|
|
1006 |
/// 16:工事日報入力存在確認
|
|
962 | 1007 |
/// </summary> |
963 | 1008 |
/// <returns></returns> |
964 |
private static bool ExistRequestPrint()
|
|
1009 |
private static bool ExistDRConstruction()
|
|
965 | 1010 |
{ |
966 |
IORequestDataDetail db = new IORequestDataDetail();
|
|
1011 |
IOConstructionBaseInfo BaseDB = new IOConstructionBaseInfo();
|
|
967 | 1012 |
try |
968 | 1013 |
{ |
969 | 1014 |
// 起動権限チェック |
970 | 1015 |
int Editflg = 0; |
971 |
if (!ClsSecurityPermission.GetExecutePermission((int)ClsExcute.ProcessExecuteNo.RequestPrint, ref Editflg)) return false;
|
|
1016 |
if (!ClsSecurityPermission.GetExecutePermission((int)ClsExcute.ProcessExecuteNo.DRConstruction, ref Editflg)) return false;
|
|
972 | 1017 |
|
1018 |
// 工事情報データの存在チェック |
|
1019 |
StringBuilder strSQL = new StringBuilder(); |
|
1020 |
strSQL.Append(BaseDB.CreatePrimarykeyString(ClsProcessExist.GetParentConstrCode(m_ConstructionCode))); |
|
1021 |
strSQL.Append(" And ConstructionPersonCode > 0"); |
|
973 | 1022 |
|
974 |
string strSQL = string.Empty; |
|
1023 |
ConstructionBaseInfo BaseRec = new ConstructionBaseInfo(); |
|
1024 |
if (!BaseDB.SelectAction(strSQL.ToString(), ref BaseRec)) return false; |
|
975 | 1025 |
|
976 |
List<RequestDataDetail> ReqDtlList = new List<RequestDataDetail>(); |
|
977 |
strSQL = string.Format(" WHERE CONSTRUCTIONCODE = {0} ", m_ConstructionCode); |
|
978 |
if (!db.SelectAction(strSQL, ref ReqDtlList)) return false; |
|
1026 |
return true; |
|
1027 |
} |
|
1028 |
catch (Exception ex) |
|
1029 |
{ |
|
1030 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
|
1031 |
return false; |
|
1032 |
} |
|
1033 |
finally |
|
1034 |
{ |
|
1035 |
BaseDB.close(); BaseDB = null; |
|
1036 |
} |
|
1037 |
} |
|
1038 |
#endregion |
|
979 | 1039 |
|
980 |
bool Approvedflg = false; |
|
1040 |
#region 17:打合せ議事録入力 |
|
1041 |
/// <summary> |
|
1042 |
/// 17:打合せ議事録入力 |
|
1043 |
/// </summary> |
|
1044 |
/// <returns></returns> |
|
1045 |
private static bool ExistProceedings() |
|
1046 |
{ |
|
1047 |
IOConstructionBaseInfo BaseDB = new IOConstructionBaseInfo(); |
|
1048 |
try |
|
1049 |
{ |
|
1050 |
// 起動権限チェック |
|
1051 |
int Editflg = 0; |
|
1052 |
if (!ClsSecurityPermission.GetExecutePermission((int)ClsExcute.ProcessExecuteNo.DRConstruction, ref Editflg)) return false; |
|
981 | 1053 |
|
982 |
foreach (RequestDataDetail dt in ReqDtlList) |
|
983 |
{ |
|
984 |
// 最終承認されている(承認済)の場合 |
|
985 |
// if (ClsApprovalPermission.CheckProcessApprovalData(m_ConstructionCode, (int)ClsExcute.ApprovalListNo.OrderBillingApproval, dt.OrderNo)) |
|
986 |
// { |
|
987 |
// Approvedflg = true; |
|
988 |
// break; |
|
989 |
// } |
|
990 |
} |
|
1054 |
// 工事情報データの存在チェック |
|
1055 |
StringBuilder strSQL = new StringBuilder(); |
|
1056 |
strSQL.Append(BaseDB.CreatePrimarykeyString(ClsProcessExist.GetParentConstrCode(m_ConstructionCode))); |
|
991 | 1057 |
|
992 |
return Approvedflg; |
|
1058 |
ConstructionBaseInfo BaseRec = new ConstructionBaseInfo(); |
|
1059 |
if (!BaseDB.SelectAction(strSQL.ToString(), ref BaseRec)) return false; |
|
1060 |
|
|
1061 |
return true; |
|
993 | 1062 |
} |
994 | 1063 |
catch (Exception ex) |
995 | 1064 |
{ |
... | ... | |
998 | 1067 |
} |
999 | 1068 |
finally |
1000 | 1069 |
{ |
1001 |
db.close(); db = null;
|
|
1070 |
BaseDB.close(); BaseDB = null;
|
|
1002 | 1071 |
} |
1003 | 1072 |
} |
1004 | 1073 |
#endregion |
1005 | 1074 |
|
1006 |
#region 15:日報入力存在確認
|
|
1075 |
#region 18:出勤日報データ存在確認
|
|
1007 | 1076 |
/// <summary> |
1008 |
/// 15:日報入力存在確認
|
|
1077 |
/// 18:出勤日報データ存在確認
|
|
1009 | 1078 |
/// </summary> |
1010 | 1079 |
/// <returns></returns> |
1011 |
private static bool ExistDRConstruction()
|
|
1080 |
private static bool ExistDRWork()
|
|
1012 | 1081 |
{ |
1013 |
IOConstructionLedger LedgerDB = new IOConstructionLedger(); |
|
1014 | 1082 |
try |
1015 | 1083 |
{ |
1084 |
return false; |
|
1085 |
} |
|
1086 |
catch (Exception ex) |
|
1087 |
{ |
|
1088 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
|
1089 |
return false; |
|
1090 |
} |
|
1091 |
finally |
|
1092 |
{ |
|
1093 |
} |
|
1094 |
} |
|
1095 |
#endregion |
|
1096 |
|
|
1097 |
#region 26:資材貸出入力 |
|
1098 |
/// <summary> |
|
1099 |
/// 26:資材貸出入力 |
|
1100 |
/// </summary> |
|
1101 |
/// <returns></returns> |
|
1102 |
private static bool ExistMaterialReserve() |
|
1103 |
{ |
|
1104 |
IOConstructionBaseInfo BaseDB = new IOConstructionBaseInfo(); |
|
1105 |
try |
|
1106 |
{ |
|
1016 | 1107 |
// 起動権限チェック |
1017 | 1108 |
int Editflg = 0; |
1018 | 1109 |
if (!ClsSecurityPermission.GetExecutePermission((int)ClsExcute.ProcessExecuteNo.DRConstruction, ref Editflg)) return false; |
1019 | 1110 |
|
1020 |
// 工事詳細台帳データの存在チェック |
|
1021 |
string strSQL = LedgerDB.CreatePrimarykeyString(m_ConstructionCode); |
|
1022 |
ConstructionLedger LedgerList = new ConstructionLedger(); |
|
1023 |
if (!LedgerDB.SelectAction(strSQL, ref LedgerList)) return false; |
|
1111 |
// 工事情報データの存在チェック |
|
1112 |
StringBuilder strSQL = new StringBuilder(); |
|
1113 |
strSQL.Append(BaseDB.CreatePrimarykeyString(ClsProcessExist.GetParentConstrCode(m_ConstructionCode))); |
|
1024 | 1114 |
|
1115 |
ConstructionBaseInfo BaseRec = new ConstructionBaseInfo(); |
|
1116 |
if (!BaseDB.SelectAction(strSQL.ToString(), ref BaseRec)) return false; |
|
1117 |
|
|
1025 | 1118 |
return true; |
1026 | 1119 |
} |
1027 | 1120 |
catch (Exception ex) |
... | ... | |
1031 | 1124 |
} |
1032 | 1125 |
finally |
他の形式にエクスポート: Unified diff