リビジョン 52
担当者承認途中
trunk/src/ProcessManagement/ProcessManagement/Common/CommonVersion.cs | ||
---|---|---|
14 | 14 |
/// <summary> |
15 | 15 |
/// 本体バージョン |
16 | 16 |
/// </summary> |
17 |
public static int s_SystemVersion = 3;
|
|
17 |
public static int s_SystemVersion = 6;
|
|
18 | 18 |
|
19 | 19 |
/// <summary> |
20 | 20 |
/// コピー・環境バージョン |
trunk/src/ProcessManagement/ProcessManagement/Common/Process/ClsApprovalPermission.cs | ||
---|---|---|
1 | 1 |
using System; |
2 | 2 |
using System.Collections.Generic; |
3 |
using System.Collections; |
|
3 | 4 |
using System.Linq; |
4 | 5 |
using System.Text; |
5 | 6 |
using System.Threading.Tasks; |
... | ... | |
26 | 27 |
private static readonly log4net.ILog logger = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); |
27 | 28 |
#endregion |
28 | 29 |
|
29 |
#region 承認申請・承認をする |
|
30 |
#region 承認申請・承認をする(工事承認)
|
|
30 | 31 |
/// <summary> |
31 |
/// 案件の承認申請・承認をする |
|
32 |
/// 案件の承認申請・承認をする(工事承認)
|
|
32 | 33 |
/// </summary> |
33 |
/// <param name="ConstructionCode">工事番号</param> |
|
34 |
/// <param name="ApprovalCode">機能番号</param> |
|
35 |
/// <param name="Status">承認状態</param> |
|
36 | 34 |
/// <returns>成功:true 失敗:false</returns> |
37 | 35 |
public static bool CreatePetitionApproval(ProcessApproval Rec) |
38 | 36 |
{ |
... | ... | |
68 | 66 |
} |
69 | 67 |
#endregion |
70 | 68 |
|
71 |
#region 申請レコード更新
|
|
69 |
#region 承認申請・承認をする(担当者承認)
|
|
72 | 70 |
/// <summary> |
73 |
/// 申請レコードを更新する
|
|
71 |
/// 案件の承認申請・承認をする(担当者承認)
|
|
74 | 72 |
/// </summary> |
73 |
/// <returns>成功:true 失敗:false</returns> |
|
74 |
public static bool CreatePetitionApproval(PersonApproval Rec) |
|
75 |
{ |
|
76 |
IOPersonApproval ApprDB = new IOPersonApproval(); |
|
77 |
try |
|
78 |
{ |
|
79 |
string strSQL = ApprDB.CreatePrimarykeyString(Rec.PersonCode, Rec.ApprovalCode, Rec.OrderDate, Rec.SeqNo); |
|
80 |
List<PersonApproval> DataList = new List<PersonApproval>(); |
|
81 |
// データがあるかをチェックする |
|
82 |
if (!ApprDB.SelectAction(strSQL, ref DataList)) return false; |
|
83 |
|
|
84 |
// データ追加時 |
|
85 |
if (DataList.Count == 0) |
|
86 |
{ |
|
87 |
if (!ApprDB.InsertAction(Rec)) return false; |
|
88 |
return true; |
|
89 |
} |
|
90 |
|
|
91 |
// データ更新時 |
|
92 |
if (!ApprDB.UpdateAction(strSQL, Rec)) return false; |
|
93 |
|
|
94 |
return true; |
|
95 |
} |
|
96 |
catch (Exception ex) |
|
97 |
{ |
|
98 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
|
99 |
return false; |
|
100 |
} |
|
101 |
finally |
|
102 |
{ |
|
103 |
ApprDB.close(); ApprDB = null; |
|
104 |
} |
|
105 |
} |
|
106 |
#endregion |
|
107 |
|
|
108 |
#region 申請レコード更新(工事承認) |
|
109 |
/// <summary> |
|
110 |
/// 申請レコードを更新する(工事承認) |
|
111 |
/// </summary> |
|
75 | 112 |
/// <param name="ConstructionCode"></param> |
76 | 113 |
/// <param name="ApprovalCode"></param> |
77 | 114 |
/// <param name="Status"></param> |
... | ... | |
81 | 118 |
IOProcessApproval ApprDB = new IOProcessApproval(); |
82 | 119 |
try |
83 | 120 |
{ |
84 |
// 申請レコードを取得する |
|
85 |
//string strSQL = ApprDB.CreatePrimarykeyString(ConstructionCode, ApprovalCode, OrderNO, 1); |
|
86 |
//ProcessApproval DataRec = new ProcessApproval(); |
|
87 |
//// データがあるかをチェックする |
|
88 |
//if (!ApprDB.SelectAction(strSQL, ref DataRec)) return false; |
|
89 |
|
|
90 |
// レコードのステータスを変える |
|
91 |
//DataRec.ApprovalStatus = Status; |
|
92 |
//if (!ApprDB.UpdateAction(strSQL, DataRec)) return false; |
|
93 | 121 |
if (!ApprDB.UpdateFeild(ConstructionCode, |
94 | 122 |
(int)IOProcessApproval.ColumnName.ApprovalStatus, |
95 | 123 |
Status, |
... | ... | |
112 | 140 |
} |
113 | 141 |
#endregion |
114 | 142 |
|
115 |
#region 申請確認
|
|
143 |
#region 申請レコード更新(担当者承認)
|
|
116 | 144 |
/// <summary> |
145 |
/// 申請レコードを更新する(担当者承認) |
|
146 |
/// </summary> |
|
147 |
/// <param name="ConstructionCode"></param> |
|
148 |
/// <param name="ApprovalCode"></param> |
|
149 |
/// <param name="Status"></param> |
|
150 |
/// <returns></returns> |
|
151 |
public static bool SetPrimaryRecStatus(int ConstructionCode, int ApprovalCode, DateTime OrderDate, int Status) |
|
152 |
{ |
|
153 |
IOPersonApproval ApprDB = new IOPersonApproval(); |
|
154 |
try |
|
155 |
{ |
|
156 |
if (!ApprDB.UpdateFeild(ConstructionCode, |
|
157 |
ApprovalCode, |
|
158 |
OrderDate, |
|
159 |
(int)IOProcessApproval.ColumnName.ApprovalStatus, |
|
160 |
Status, |
|
161 |
true, |
|
162 |
1)) return false; |
|
163 |
|
|
164 |
return true; |
|
165 |
} |
|
166 |
catch (Exception ex) |
|
167 |
{ |
|
168 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
|
169 |
return false; |
|
170 |
} |
|
171 |
finally |
|
172 |
{ |
|
173 |
ApprDB.close(); ApprDB = null; |
|
174 |
} |
|
175 |
} |
|
176 |
#endregion |
|
177 |
|
|
178 |
#region 申請確認(工事承認) |
|
179 |
/// <summary> |
|
117 | 180 |
/// 案件に対して申請がされているかを確認する |
118 | 181 |
/// </summary> |
119 | 182 |
/// <param name="ConstructionCode"></param> |
120 | 183 |
/// <param name="ApprovalCode"></param> |
121 | 184 |
/// <returns></returns> |
122 |
public static bool CheckPetition(int ConstructionCode, int ApprovalCode, int ApprovalCount) |
|
185 |
public static bool CheckProcessPetition(int ConstructionCode, int ApprovalCode, int ApprovalCount)
|
|
123 | 186 |
{ |
124 | 187 |
IOProcessApproval ApprDB = new IOProcessApproval(); |
125 | 188 |
try |
... | ... | |
146 | 209 |
} |
147 | 210 |
#endregion |
148 | 211 |
|
149 |
#region 最終承認確認
|
|
212 |
#region 申請確認(担当者承認)
|
|
150 | 213 |
/// <summary> |
214 |
/// 担当者申請がされているかを確認する |
|
215 |
/// </summary> |
|
216 |
/// <param name="PersonCode"></param> |
|
217 |
/// <param name="ApprovalCode"></param> |
|
218 |
/// <returns></returns> |
|
219 |
public static bool CheckPersonPetition(int PersonCode, int ApprovalCode, DateTime ApprovalDate) |
|
220 |
{ |
|
221 |
IOPersonApproval ApprDB = new IOPersonApproval(); |
|
222 |
try |
|
223 |
{ |
|
224 |
bool bPetition = false; |
|
225 |
// 申請データ取得 |
|
226 |
string strSQL = ApprDB.CreatePrimarykeyString(PersonCode, ApprovalCode, ApprovalDate, 1); |
|
227 |
List<PersonApproval> PetitionList = new List<PersonApproval>(); |
|
228 |
if (!ApprDB.SelectAction(strSQL, ref PetitionList)) return bPetition; |
|
229 |
// 申請データが無い場合 |
|
230 |
if (PetitionList.Count != 0) bPetition = true; |
|
231 |
|
|
232 |
return bPetition; |
|
233 |
} |
|
234 |
catch (Exception ex) |
|
235 |
{ |
|
236 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
|
237 |
return false; |
|
238 |
} |
|
239 |
finally |
|
240 |
{ |
|
241 |
ApprDB.close(); ApprDB = null; |
|
242 |
} |
|
243 |
} |
|
244 |
#endregion |
|
245 |
|
|
246 |
#region 最終承認確認(工事承認) |
|
247 |
/// <summary> |
|
151 | 248 |
/// 案件に対して承認がされているかを確認する |
152 | 249 |
/// </summary> |
153 | 250 |
/// <param name="ConstructionCode"></param> |
154 | 251 |
/// <param name="ApprovalCode"></param> |
155 | 252 |
/// <returns></returns> |
156 |
public static bool CheckApproval(int ConstructionCode, int ApprovalCode, int Approvalcount) |
|
253 |
public static bool CheckProcessApproval(int ConstructionCode, int ApprovalCode, int Approvalcount)
|
|
157 | 254 |
{ |
158 | 255 |
IOMApproval mApprDB = new IOMApproval(); |
159 | 256 |
IOProcessApproval ApprDB = new IOProcessApproval(); |
... | ... | |
181 | 278 |
} |
182 | 279 |
#endregion |
183 | 280 |
|
184 |
#region 承認確認
|
|
281 |
#region 最終承認確認(担当者承認)
|
|
185 | 282 |
/// <summary> |
186 |
/// 案件に対して最終承認がされているかを確認する
|
|
283 |
/// 担当者申請に対して承認がされているかを確認する
|
|
187 | 284 |
/// </summary> |
285 |
/// <param name="PersonCode"></param> |
|
286 |
/// <param name="ApprovalCode"></param> |
|
287 |
/// <returns></returns> |
|
288 |
public static bool CheckPersonApproval(int PersonCode, int ApprovalCode, DateTime ApprovalDate) |
|
289 |
{ |
|
290 |
IOPersonApproval ApprDB = new IOPersonApproval(); |
|
291 |
try |
|
292 |
{ |
|
293 |
// 承認データを取得する(申請データを除く) |
|
294 |
string strData = ApprDB.CreatePrimarykeyString(PersonCode, ApprovalCode, ApprovalDate, 1); |
|
295 |
PersonApproval DataRec = new PersonApproval(); |
|
296 |
if (!ApprDB.SelectAction(strData, ref DataRec)) return false; |
|
297 |
|
|
298 |
if (DataRec.ApprovalStatus != (int)CommonDefine.ApprovalStatus.Approval) return false; |
|
299 |
|
|
300 |
return true; |
|
301 |
} |
|
302 |
catch (Exception ex) |
|
303 |
{ |
|
304 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
|
305 |
return false; |
|
306 |
} |
|
307 |
finally |
|
308 |
{ |
|
309 |
ApprDB.close(); ApprDB = null; |
|
310 |
} |
|
311 |
} |
|
312 |
#endregion |
|
313 |
|
|
314 |
#region 承認確認(工事承認) |
|
315 |
/// <summary> |
|
316 |
/// 工事案件に対して最終承認がされているかを確認する |
|
317 |
/// </summary> |
|
188 | 318 |
/// <param name="ConstructionCode"></param> |
189 | 319 |
/// <param name="ApprovalCode"></param> |
190 | 320 |
/// <returns></returns> |
191 |
public static bool CheckApprovalData(int ConstructionCode, int ApprovalCode, int OrderNo) |
|
321 |
public static bool CheckProcessApprovalData(int ConstructionCode, int ApprovalCode, int OrderNo)
|
|
192 | 322 |
{ |
193 | 323 |
IOConstructionBaseInfo cbiDB = new IOConstructionBaseInfo(); |
194 | 324 |
IOMApproval mApprDB = new IOMApproval(); |
... | ... | |
260 | 390 |
} |
261 | 391 |
#endregion |
262 | 392 |
|
393 |
#region 承認確認(担当者承認) |
|
394 |
/// <summary> |
|
395 |
/// 担当者申請に対して最終承認がされているかを確認する |
|
396 |
/// </summary> |
|
397 |
/// <param name="PersonCode"></param> |
|
398 |
/// <param name="ApprovalCode"></param> |
|
399 |
/// <returns></returns> |
|
400 |
public static bool CheckPersonApprovalData(int PersonCode, int ApprovalCode, DateTime OrderDate) |
|
401 |
{ |
|
402 |
IOConstructionBaseInfo cbiDB = new IOConstructionBaseInfo(); |
|
403 |
IOMApproval mApprDB = new IOMApproval(); |
|
404 |
IOPersonApproval ApprDB = new IOPersonApproval(); |
|
405 |
try |
|
406 |
{ |
|
407 |
bool bApproval = false; |
|
408 |
|
|
409 |
// 承認データを取得する(申請データを除く) |
|
410 |
string strSQL = "SELECT A.DISPLAYORDER, A.APPROVALPERSON, A.APPROVALAUTHORITY, B.SEQNO, B.APPROVALSTATUS"; |
|
411 |
strSQL += " FROM APPROVALMASTER A"; |
|
412 |
strSQL += " LEFT JOIN PERSONAPPROVAL B ON B.PERSONCODE = A.APPROVALPERSON AND B.APPROVALCODE = A.APPROVALCODE"; |
|
413 |
strSQL += string.Format(" AND B.ORDERDATE = TO_DATE('{0}') AND B.SEQNO != 1", OrderDate); |
|
414 |
strSQL += string.Format(" WHERE A.APPROVALCODE = {0}", ApprovalCode); |
|
415 |
strSQL += " AND A.DEPARTMENTCODE = (SELECT C.DEPARTMENTCODE FROM PERSONINCHARGEMASTER C"; |
|
416 |
strSQL += string.Format(" WHERE C.PERSONCODE = {0})", PersonCode); |
|
417 |
strSQL += " ORDER BY A.DISPLAYORDER"; |
|
418 |
|
|
419 |
ArrayList DataList = new ArrayList(); |
|
420 |
if (!ApprDB.ExecuteReader(strSQL, ref DataList)) return false; |
|
421 |
if (DataList.Count == 0) return false; |
|
422 |
|
|
423 |
int NoCnt = DataList.Count; |
|
424 |
foreach (object[] DataRec in DataList) |
|
425 |
{ |
|
426 |
// 承認以外は対象にしない |
|
427 |
int StatData= CommonMotions.cnvInt(DataRec[4]); |
|
428 |
if (StatData != (int)CommonDefine.ApprovalStatus.Approval) continue; |
|
429 |
|
|
430 |
// 最終承認権限が設定されていれば承認済み |
|
431 |
int ApprovalAuthority = CommonMotions.cnvInt(DataRec[2]); |
|
432 |
if (ApprovalAuthority == 1) |
|
433 |
{ |
|
434 |
bApproval = true; |
|
435 |
break; |
|
436 |
} |
|
437 |
|
|
438 |
// 承認していればデータ件数からマイナス |
|
439 |
--NoCnt; |
|
440 |
} |
|
441 |
// マスタに設定されている承認者全員が承認していれば承認 |
|
442 |
if (NoCnt == 0) bApproval = true; |
|
443 |
|
|
444 |
return bApproval; |
|
445 |
} |
|
446 |
catch (Exception ex) |
|
447 |
{ |
|
448 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
|
449 |
return false; |
|
450 |
} |
|
451 |
finally |
|
452 |
{ |
|
453 |
ApprDB.close(); ApprDB = null; |
|
454 |
mApprDB.close(); mApprDB = null; |
|
455 |
cbiDB.close(); cbiDB = null; |
|
456 |
} |
|
457 |
} |
|
458 |
#endregion |
|
459 |
|
|
263 | 460 |
#region ログインユーザーの承認者確認 |
264 | 461 |
/// <summary> |
265 | 462 |
/// ログインユーザーは承認者かどうかを確認する |
... | ... | |
270 | 467 |
public static bool CheckUserForApprover(int ApprovalCode, int DepartmentCode) |
271 | 468 |
{ |
272 | 469 |
IOMApproval mApprDB = new IOMApproval(); |
273 |
IOProcessApproval ApprDB = new IOProcessApproval(); |
|
274 | 470 |
try |
275 | 471 |
{ |
276 | 472 |
// システム管理者は全ての権限を持つ |
... | ... | |
306 | 502 |
} |
307 | 503 |
finally |
308 | 504 |
{ |
309 |
ApprDB.close(); ApprDB = null; |
|
310 | 505 |
mApprDB.close(); mApprDB = null; |
311 | 506 |
} |
312 | 507 |
} |
... | ... | |
370 | 565 |
/// <summary> |
371 | 566 |
/// 工事コードと承認機能コードより現在管理担当部署コードを取得する |
372 | 567 |
/// </summary> |
373 |
/// <param name="PersonCode"></param> |
|
374 | 568 |
/// <returns></returns> |
375 | 569 |
public static int GetFromConstructionAndApprovalTheDepartment(int ConstructionCode, int ApprovalCode, int OrderNo) |
376 | 570 |
{ |
... | ... | |
412 | 606 |
} |
413 | 607 |
#endregion |
414 | 608 |
|
609 |
#region 担当者コードと承認機能コードより現在管理担当部署コードを取得 |
|
610 |
/// <summary> |
|
611 |
/// 担当者コードと承認機能コードより現在管理担当部署コードを取得する |
|
612 |
/// </summary> |
|
613 |
/// <returns></returns> |
|
614 |
public static int GetFromPersonAndApprovalTheDepartment(int PersonCode, int ApprovalCode, DateTime OrderDate) |
|
615 |
{ |
|
616 |
IOMPersonInCharge picDB = new IOMPersonInCharge(); |
|
617 |
IOPersonApproval ApprovalDB = new IOPersonApproval(); |
|
618 |
try |
|
619 |
{ |
|
620 |
// 管理担当者コードを取得する |
|
621 |
string strSQL = ApprovalDB.CreatePrimarykeyString(PersonCode, ApprovalCode, OrderDate, 1); |
|
622 |
PersonApproval ApprovalRec = new PersonApproval(); |
|
623 |
int CurrentPersonCode = 0; |
|
624 |
if (ApprovalDB.SelectAction(strSQL, ref ApprovalRec)) |
|
625 |
{ // 申請データがある時はそのデータ |
|
626 |
CurrentPersonCode = ApprovalRec.PersonCode; |
|
627 |
} |
|
628 |
else |
|
629 |
{ |
|
630 |
// データが無い場合(申請時)はログインユーザー |
|
631 |
CurrentPersonCode = CommonMotions.LoginUserData.PersonCode; |
|
632 |
} |
|
633 |
|
|
634 |
// 担当者部署取得 |
|
635 |
PersonInChargeMaster PersonRec = new PersonInChargeMaster(); |
|
636 |
string strPerson = picDB.CreatePrimarykeyString(CurrentPersonCode); |
|
637 |
if (!picDB.SelectAction(strPerson, ref PersonRec)) return 0; |
|
638 |
|
|
639 |
return PersonRec.DepartmentCode; |
|
640 |
} |
|
641 |
catch (Exception ex) |
|
642 |
{ |
|
643 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
|
644 |
return 0; |
|
645 |
} |
|
646 |
finally |
|
647 |
{ |
|
648 |
ApprovalDB.close(); ApprovalDB = null; |
|
649 |
picDB.close(); picDB = null; |
|
650 |
} |
|
651 |
} |
|
652 |
#endregion |
|
653 |
|
|
415 | 654 |
#region 工事コードと承認機能コードより現在管理担当者コードを取得 |
416 | 655 |
/// <summary> |
417 | 656 |
/// 工事コードと承認機能コードより現在管理担当者コードを取得する |
... | ... | |
481 | 720 |
} |
482 | 721 |
#endregion |
483 | 722 |
|
484 |
#region 承認数取得 |
|
723 |
#region 承認数取得(工事承認)
|
|
485 | 724 |
/// <summary> |
486 | 725 |
/// 該当工事より承認数取得する |
487 | 726 |
/// </summary> |
488 | 727 |
/// <returns></returns> |
489 |
public static int GetApprovalDataCount(int ConstructionCode, int ApprovalCode, int ApprovalCount) |
|
728 |
public static int GetProcessApprovalDataCount(int ConstructionCode, int ApprovalCode, int ApprovalCount)
|
|
490 | 729 |
{ |
491 | 730 |
IOProcessApproval paDB = new IOProcessApproval(); |
492 | 731 |
try |
493 | 732 |
{ |
494 | 733 |
// 承認データ取得 |
495 | 734 |
string strSQL = paDB.CreatePrimarykeyString(ConstructionCode, ApprovalCode, ApprovalCount); |
496 |
strSQL += " And SeqNo != 1 And ApprovalStatus = 2";
|
|
735 |
strSQL += string.Format(" And SeqNo != 1 And ApprovalStatus = {0}",(int)CommonDefine.ApprovalStatus.Approval);
|
|
497 | 736 |
List<ProcessApproval> ApprovalList = new List<ProcessApproval>(); |
498 | 737 |
if (!paDB.SelectAction(strSQL, ref ApprovalList)) return 0; |
499 | 738 |
|
... | ... | |
511 | 750 |
} |
512 | 751 |
#endregion |
513 | 752 |
|
753 |
#region 承認数取得(担当者承認) |
|
754 |
/// <summary> |
|
755 |
/// 担当者申請より承認数取得する |
|
756 |
/// </summary> |
|
757 |
/// <returns></returns> |
|
758 |
public static int GetPersonApprovalDataCount(int PersonCode, int ApprovalCode, DateTime ApprovalDate) |
|
759 |
{ |
|
760 |
IOPersonApproval paDB = new IOPersonApproval(); |
|
761 |
try |
|
762 |
{ |
|
763 |
// 承認データ取得 |
|
764 |
string strSQL = paDB.CreatePrimarykeyString(PersonCode, ApprovalCode, ApprovalDate); |
|
765 |
strSQL += string.Format(" And SeqNo != 1 And ApprovalStatus = {0}", (int)CommonDefine.ApprovalStatus.Approval); |
|
766 |
List<PersonApproval> ApprovalList = new List<PersonApproval>(); |
|
767 |
if (!paDB.SelectAction(strSQL, ref ApprovalList)) return 0; |
|
768 |
|
|
769 |
return ApprovalList.Count; |
|
770 |
} |
|
771 |
catch (Exception ex) |
|
772 |
{ |
|
773 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
|
774 |
return 0; |
|
775 |
} |
|
776 |
finally |
|
777 |
{ |
|
778 |
paDB.close(); paDB = null; |
|
779 |
} |
|
780 |
} |
|
781 |
#endregion |
|
782 |
|
|
514 | 783 |
#region 承認経路数を取得する |
515 | 784 |
/// <summary> |
516 | 785 |
/// 承認マスタより承認経路数を取得する |
... | ... | |
548 | 817 |
/// 承認画面が起動しているかを確認する |
549 | 818 |
/// </summary> |
550 | 819 |
/// <returns></returns> |
551 |
public static bool ExceApprovalScreen() |
|
820 |
public static bool ExceApprovalScreen(int ApprovalNo = (int)ClsExcute.SubFormExecuteNo.ApprovalScreen)
|
|
552 | 821 |
{ |
553 | 822 |
try |
554 | 823 |
{ |
... | ... | |
556 | 825 |
// 承認画面からの画面遷移は1画面(対象画面)のみになったのですぐ前にあるはず |
557 | 826 |
for (int i = ClsExcute.GetNowProcessPoint() - 1; 0 <= i; i--) |
558 | 827 |
{ |
559 |
if (ClsExcute.ProcControlPara[i].ProcNo == (int)ClsExcute.SubFormExecuteNo.ApprovalScreen)
|
|
828 |
if (ClsExcute.ProcControlPara[i].ProcNo == ApprovalNo)
|
|
560 | 829 |
{ |
561 | 830 |
bRet = true; |
562 | 831 |
break; |
trunk/src/ProcessManagement/ProcessManagement/Common/Process/ClsChangeLedgerData.cs | ||
---|---|---|
566 | 566 |
if (CheckPaymentValue(CurRec)) |
567 | 567 |
{ |
568 | 568 |
// 日数分掛ける |
569 |
dSaraly *= CurRec.SalaryDays; |
|
569 |
dSaraly *= WorkingDay; |
|
570 |
// 元の値を加算する |
|
571 |
dSaraly += NowValue; |
|
570 | 572 |
} |
571 | 573 |
else |
572 | 574 |
{ |
trunk/src/ProcessManagement/ProcessManagement/Common/Process/ClsExcute.cs | ||
---|---|---|
66 | 66 |
PurchaseOrderStatus = 19, // 19:注文書発給一覧 |
67 | 67 |
OrderJoin = 20, // 20:工事結合 |
68 | 68 |
ConstructionSplit = 21, // 21:工事分割 |
69 |
DRTransport = 22, // 22:通勤交通費 |
|
69 |
PersonApprovalList = 22, // 22:担当者承認一覧 |
|
70 |
MaterialList = 23, // 23:資材一覧 |
|
71 |
MaterialHistory = 24, // 24:資材履歴画面 |
|
72 |
MaterialCountEntry = 25, // 25:資材数変更画面 |
|
73 |
MaterialReserveEntry = 26, // 26:資材貸出 |
|
74 |
MaterialReturnEntry = 27, // 27:資材返却 |
|
75 |
MaterialSelect = 28, // 28;資材選択 |
|
76 |
RequestSummaryList = 29, // 29:請求まとめ |
|
77 |
PaymentConfirmation = 30, // 30:入金確認 |
|
78 |
RequestInput = 31, // 31:請求入力 |
|
79 |
RequestPrint = 32, // 32:請求書印刷 |
|
70 | 80 |
} |
71 | 81 |
#endregion |
72 | 82 |
|
... | ... | |
102 | 112 |
Security = 124, // 124:セキュリティ区分マスタ |
103 | 113 |
OrderDivision = 125, // 125:発注者区分登録 |
104 | 114 |
ConstructionExpenses = 126, // 126:施工経費区分登録 |
115 |
MaterialKind = 127, // 127:資材種類マスタ |
|
116 |
MaterialItem = 128, // 128:資材品目マスタ |
|
117 |
SalesConfirm = 129, // 129:売上確認 |
|
105 | 118 |
} |
106 | 119 |
#endregion |
107 | 120 |
|
... | ... | |
115 | 128 |
MessageReader = 202, // 202:掲示板読込 |
116 | 129 |
ActionSchdule = 203, // 203:行動予定入力 |
117 | 130 |
VehicleSchdule = 204, // 204:車両予約入力 |
118 |
ApprovalScreen = 205, // 205:承認画面 |
|
131 |
ApprovalScreen = 205, // 205:工事承認画面
|
|
119 | 132 |
SubconstractorDiag = 206, // 206:協力会社検索画面 |
120 | 133 |
SuppliersDiag = 207, // 207:仕入先検索 |
121 | 134 |
SubConJobDiag = 208, // 208:協力会社職種検索画面 |
135 |
ApprovalPerson = 209, // 209:担当者承認画面 |
|
122 | 136 |
} |
123 | 137 |
#endregion |
124 | 138 |
|
... | ... | |
145 | 159 |
{ (int)ProcessExecuteNo.DRList, "工事日報-一覧"}, |
146 | 160 |
{ (int)ProcessExecuteNo.DRConstruction, "工事日報-入力"}, |
147 | 161 |
{ (int)ProcessExecuteNo.Proceedings, "打合せ議事録-入力"}, |
162 |
{ (int)ProcessExecuteNo.MaterialList, "資材入力"}, |
|
163 |
{ (int)ProcessExecuteNo.MaterialReserveEntry, "資材貸出"}, |
|
164 |
{ (int)ProcessExecuteNo.MaterialReturnEntry, "資材返却"}, |
|
165 |
{ (int)ProcessExecuteNo.RequestSummaryList, "請求まとめ"}, |
|
166 |
{ (int)ProcessExecuteNo.PaymentConfirmation, "入金確認"}, |
|
167 |
{ (int)ProcessExecuteNo.RequestInput, "請求入力"}, |
|
168 |
{ (int)ProcessExecuteNo.RequestPrint, "請求書印刷"}, |
|
148 | 169 |
//{ (int)ProcessExecuteNo.DailyReportList, "出勤日報-入力"}, |
149 | 170 |
//{ (int)ProcessExecuteNo.PurchaseOrderStatus, "注文書発給状況-一覧"}, |
150 | 171 |
//{ (int)ProcessExecuteNo.OrderJoin, "工事結合-入力"}, |
... | ... | |
185 | 206 |
{ (int)MaintenanceExecuteNo.Security, "セキュリティ区分登録"}, // 124 |
186 | 207 |
{ (int)MaintenanceExecuteNo.OrderDivision, "発注者区分登録"}, // 125 |
187 | 208 |
{ (int)MaintenanceExecuteNo.ConstructionExpenses, "施工経費区分登録"}, // 126 |
209 |
{ (int)MaintenanceExecuteNo.MaterialKind, "資材種類登録"}, // 127 |
|
210 |
{ (int)MaintenanceExecuteNo.MaterialItem, "資材品目登録"}, // 128 |
|
211 |
{ (int)MaintenanceExecuteNo.SalesConfirm, "売上確認"}, // 129 |
|
188 | 212 |
}; |
189 | 213 |
#endregion |
190 | 214 |
|
... | ... | |
222 | 246 |
/// 6:工事日報承認 |
223 | 247 |
/// </summary> |
224 | 248 |
DRConstructionApproval, |
249 |
/// <summary> |
|
250 |
/// 7:出勤日報承認 |
|
251 |
/// </summary> |
|
252 |
DRWorkApproval, |
|
225 | 253 |
} |
226 | 254 |
#endregion |
227 | 255 |
|
... | ... | |
414 | 442 |
ProcessExecuteNo_ConstructionSplit(m_ProcControlPara[NowPoint]); |
415 | 443 |
break; |
416 | 444 |
|
445 |
case (int)ProcessExecuteNo.PersonApprovalList: // 22:担当者承認申請一覧 |
|
446 |
ProcessExecuteNo_PersonAppList(m_ProcControlPara[NowPoint]); |
|
447 |
break; |
|
417 | 448 |
#endregion |
418 | 449 |
|
419 | 450 |
#region マスタメンテ |
... | ... | |
501 | 532 |
|
502 | 533 |
#region サブフォーム |
503 | 534 |
// ----- サブフォーム |
504 |
case (int)SubFormExecuteNo.MessageWriter: // 1:掲示板入力(新バージョン)
|
|
535 |
case (int)SubFormExecuteNo.MessageWriter: // 201:掲示板入力(新バージョン)
|
|
505 | 536 |
SubFormExecuteNo_MessageWriter(m_ProcControlPara[NowPoint]); |
506 | 537 |
break; |
507 | 538 |
|
508 |
case (int)SubFormExecuteNo.MessageReader: // 2:掲示板読込
|
|
539 |
case (int)SubFormExecuteNo.MessageReader: // 202:掲示板読込
|
|
509 | 540 |
SubFormExecuteNo_MessageReader(m_ProcControlPara[NowPoint]); |
510 | 541 |
break; |
511 | 542 |
|
512 |
case (int)SubFormExecuteNo.ActionSchdule: // 3:行動予定入力
|
|
543 |
case (int)SubFormExecuteNo.ActionSchdule: // 203:行動予定入力
|
|
513 | 544 |
SubFormExecuteNo_ActionSchdule(m_ProcControlPara[NowPoint]); |
514 | 545 |
break; |
515 | 546 |
|
516 |
case (int)SubFormExecuteNo.VehicleSchdule: // 4:車両予約入力
|
|
547 |
case (int)SubFormExecuteNo.VehicleSchdule: // 204:車両予約入力
|
|
517 | 548 |
SubFormExecuteNo_VehicleSchdule(m_ProcControlPara[NowPoint]); |
518 | 549 |
break; |
519 | 550 |
|
520 |
case (int)SubFormExecuteNo.ApprovalScreen: // 5:承認画面
|
|
551 |
case (int)SubFormExecuteNo.ApprovalScreen: // 205:承認画面
|
|
521 | 552 |
SubFormExecuteNo_ApprovalScreen(m_ProcControlPara[NowPoint]); |
522 | 553 |
break; |
554 |
case (int)SubFormExecuteNo.ApprovalPerson: // 209:担当者承認画面 |
|
555 |
SubFormExecuteNo_ApprovalPerson(m_ProcControlPara[NowPoint]); |
|
556 |
break; |
|
557 |
|
|
523 | 558 |
#endregion |
524 | 559 |
} |
525 | 560 |
} |
... | ... | |
1521 | 1556 |
} |
1522 | 1557 |
#endregion |
1523 | 1558 |
|
1559 |
#region 担当者承認申請一覧リスト |
|
1560 |
/// <summary> |
|
1561 |
/// 担当者承認申請一覧リスト |
|
1562 |
/// </summary> |
|
1563 |
/// <param name="CurrentPara"></param> |
|
1564 |
public static void ProcessExecuteNo_PersonAppList(ProcessParameter CurrentPara) |
|
1565 |
{ |
|
1566 |
// 担当者承認申請一覧 |
|
1567 |
FrmPersonApprList frm = new FrmPersonApprList(); |
|
1568 |
try |
|
1569 |
{ |
|
1570 |
// 次起動プロセスが設定されていない場合は終了 |
|
1571 |
if (CurrentPara.IntExecParameter[0] == 0) |
|
1572 |
{ |
|
1573 |
// 前プロセスに戻る |
|
1574 |
BackProcess(); |
|
1575 |
return; |
|
1576 |
} |
|
1577 |
|
|
1578 |
// 次起動プロセスセット |
|
1579 |
frm.ExecuteFlg = CurrentPara.IntExecParameter[0]; |
|
1580 |
|
|
1581 |
// フォーム表示 |
|
1582 |
frm.ShowDialog(); |
|
1583 |
|
|
1584 |
} |
|
1585 |
catch (Exception ex) |
|
1586 |
{ |
|
1587 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
|
1588 |
BackProcess(); |
|
1589 |
} |
|
1590 |
finally |
|
1591 |
{ |
|
1592 |
frm.Dispose(); frm = null; |
|
1593 |
} |
|
1594 |
} |
|
1595 |
#endregion |
|
1596 |
|
|
1524 | 1597 |
#region 出勤管理入力 |
1525 | 1598 |
/// <summary> |
1526 | 1599 |
/// 出勤管理入力 |
... | ... | |
2524 | 2597 |
} |
2525 | 2598 |
#endregion |
2526 | 2599 |
|
2527 |
#region 承認画面 |
|
2600 |
#region 工事承認画面
|
|
2528 | 2601 |
/// <summary> |
2529 |
/// 承認画面 |
|
2602 |
/// 工事承認画面
|
|
2530 | 2603 |
/// </summary> |
2531 | 2604 |
/// <returns></returns> |
2532 | 2605 |
public static void SubFormExecuteNo_ApprovalScreen(ProcessParameter CurrentPara) |
... | ... | |
2557 | 2630 |
} |
2558 | 2631 |
} |
2559 | 2632 |
#endregion |
2633 |
|
|
2634 |
#region 担当者承認画面 |
|
2635 |
/// <summary> |
|
2636 |
/// 担当者承認画面 |
|
2637 |
/// </summary> |
|
2638 |
/// <returns></returns> |
|
2639 |
public static void SubFormExecuteNo_ApprovalPerson(ProcessParameter CurrentPara) |
|
2640 |
{ |
|
2641 |
// 承認画面 |
|
2642 |
FrmApprovalPerson frm = new FrmApprovalPerson(); |
|
2643 |
try |
|
2644 |
{ |
|
2645 |
frm.PersonCode = CurrentPara.IntExecParameter[0]; |
|
2646 |
frm.ApprovalCode = CurrentPara.IntExecParameter[1]; |
|
2647 |
frm.OrderDate = CommonMotions.cnvDate(CurrentPara.StringExecParameter[0]); |
|
2648 |
for (int i = 3; i < CurrentPara.IntExecParameter.Count; i++) |
|
2649 |
{ |
|
2650 |
frm.PurchaseOrderSeqNo.Add(CurrentPara.IntExecParameter[i]); |
|
2651 |
} |
|
2652 |
|
|
2653 |
// フォーム表示 |
|
2654 |
frm.ShowDialog(); |
|
2655 |
} |
|
2656 |
catch (Exception ex) |
|
2657 |
{ |
|
2658 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
|
2659 |
BackProcess(); |
|
2660 |
} |
|
2661 |
finally |
|
2662 |
{ |
|
2663 |
frm.Dispose(); frm = null; |
|
2664 |
} |
|
2665 |
} |
|
2560 | 2666 |
#endregion |
2667 |
#endregion |
|
2561 | 2668 |
|
2562 | 2669 |
} |
2563 | 2670 |
} |
trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOAttendanceDailyData.cs | ||
---|---|---|
1 |
using System; |
|
2 |
using System.Collections.Generic; |
|
3 |
using System.Linq; |
|
4 |
using System.Text; |
|
5 |
using System.Data; |
|
6 |
using System.Collections; |
|
7 |
|
|
8 |
using log4net; |
|
9 |
using Oracle.ManagedDataAccess.Client; |
|
10 |
|
|
11 |
using ProcessManagement.DB.Oracle; |
|
12 |
using ProcessManagement.DB.Core; |
|
13 |
using ProcessManagement.DataModel; |
|
14 |
using ProcessManagement.Common; |
|
15 |
|
|
16 |
namespace ProcessManagement.DB.IOAccess |
|
17 |
{ |
|
18 |
/// <summary> |
|
19 |
/// 出勤日報データDBアクセス |
|
20 |
/// </summary> |
|
21 |
public class IOAttendanceDailyData : OracleProcess |
|
22 |
{ |
|
23 |
#region 定義部 |
|
24 |
/// <summary> |
|
25 |
/// log4netログを使用する |
|
26 |
/// </summary> |
|
27 |
private static readonly ILog logger = LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); |
|
28 |
#endregion |
|
29 |
|
|
30 |
#region 定数 |
|
31 |
/// <summary> |
|
32 |
/// データフィールド並び |
|
33 |
/// </summary> |
|
34 |
public enum DataColumn |
|
35 |
{ |
|
36 |
/// <summary> |
|
37 |
/// 作成者コード |
|
38 |
/// </summary> |
|
39 |
PersonCode, |
|
40 |
/// <summary> |
|
41 |
/// 日報作成日 |
|
42 |
/// </summary> |
|
43 |
AttendanceDate, |
|
44 |
/// <summary> |
|
45 |
/// 明細行番号 |
|
46 |
/// </summary> |
|
47 |
SeqNo, |
|
48 |
/// <summary> |
|
49 |
/// 工事番号 |
|
50 |
/// </summary> |
|
51 |
ConstructionCode, |
|
52 |
/// <summary> |
|
53 |
/// 残業時間 |
|
54 |
/// </summary> |
|
55 |
OvertimeHours, |
|
56 |
/// <summary> |
|
57 |
/// コメント |
|
58 |
/// </summary> |
|
59 |
WorkingComment, |
|
60 |
/// <summary> |
|
61 |
/// 登録年月日 |
|
62 |
/// </summary> |
|
63 |
EntryDate, |
|
64 |
/// <summary> |
|
65 |
/// 更新年月日 |
|
66 |
/// </summary> |
|
67 |
UpdateDate, |
|
68 |
} |
|
69 |
#endregion |
|
70 |
|
|
71 |
#region コンストラクタ |
|
72 |
/// <summary> |
|
73 |
/// コンストラクタ |
|
74 |
/// </summary> |
|
75 |
/// <param name="ConnectionString"></param> |
|
76 |
public IOAttendanceDailyData() |
|
77 |
: base(DBCommon.Instance.DBConnectString) |
|
78 |
{ |
|
79 |
} |
|
80 |
|
|
81 |
#endregion |
|
82 |
|
|
83 |
#region SQL作成 |
|
84 |
/// <summary> |
|
85 |
/// SQL作成 |
|
86 |
/// </summary> |
|
87 |
private string CreateSelectSQL() |
|
88 |
{ |
|
89 |
// SQL作成(oracleのDateTime型が変換できないのでCharに変換しておく) |
|
90 |
string strcmd = "SELECT"; |
|
91 |
|
|
92 |
strcmd += " PersonCode"; // 担当者コード |
|
93 |
strcmd += " ,TO_CHAR(AttendanceDate, 'YYYY/MM/DD')"; // 日報作成日 |
|
94 |
strcmd += " ,SeqNo"; // 明細行番号 |
|
95 |
strcmd += " ,ConstructionCode"; // 工事番号 |
|
96 |
strcmd += " ,OvertimeHours"; // 残業時間 |
|
97 |
strcmd += " ,WorkingComment"; // コメント |
|
98 |
strcmd += ", TO_CHAR(EntryDate, 'YYYY/MM/DD HH24:MI:ss')"; // 登録年月日 |
|
99 |
strcmd += ", TO_CHAR(UpdateDate, 'YYYY/MM/DD HH24:MI:ss')"; // 更新年月日 |
|
100 |
strcmd += " FROM AttendanceDailyData"; |
|
101 |
|
|
102 |
return strcmd; |
|
103 |
} |
|
104 |
#endregion |
|
105 |
|
|
106 |
#region 複数読込み処理 |
|
107 |
public bool SelectAction(string AddSQLString, ref List<AttendanceDailyData> data, bool bConnect = true) |
|
108 |
{ |
|
109 |
//Oracle インターフェース |
|
110 |
string strcmd = ""; |
|
111 |
ArrayList arData = new ArrayList(); |
|
112 |
|
|
113 |
try |
|
114 |
{ |
|
115 |
// SQL作成 |
|
116 |
strcmd = CreateSelectSQL() + AddSQLString; |
|
117 |
|
|
118 |
// SQL実行 |
|
119 |
if (!ExecuteReader(strcmd, ref arData, bConnect)) return false; |
|
120 |
|
|
121 |
// データセット |
|
122 |
foreach (object[] objwrk in arData) |
|
123 |
{ |
|
124 |
AttendanceDailyData work = new AttendanceDailyData(); |
|
125 |
Reader2Struct(objwrk, ref work); |
|
126 |
data.Add(work); |
|
127 |
} |
|
128 |
|
|
129 |
return true; |
|
130 |
} |
|
131 |
catch (Exception ex) |
|
132 |
{ |
|
133 |
logger.ErrorFormat("システムエラー:{0}:{1}:{2}", CommonMotions.GetMethodName(2), ex.Message, strcmd); |
|
134 |
return false; |
|
135 |
} |
|
136 |
} |
|
137 |
#endregion |
|
138 |
|
|
139 |
#region 1件読込み処理 |
|
140 |
public bool SelectAction(string AddSQLString, ref AttendanceDailyData data, bool bConnect = true) |
|
141 |
{ |
|
142 |
//Oracle インターフェース |
|
143 |
string strcmd = ""; |
|
144 |
ArrayList arData = new ArrayList(); |
|
145 |
|
|
146 |
try |
|
147 |
{ |
|
148 |
strcmd = CreateSelectSQL() + AddSQLString; |
|
149 |
|
|
150 |
// SQL実行 |
|
151 |
if (!ExecuteReader(strcmd, ref arData, bConnect)) return false; |
|
152 |
if (arData.Count == 0) return false; |
|
153 |
|
|
154 |
// データセット |
|
155 |
foreach (object[] objwrk in arData) |
|
156 |
{ |
|
157 |
Reader2Struct(objwrk, ref data); |
|
158 |
break; |
|
159 |
} |
|
160 |
|
|
161 |
return true; |
|
162 |
} |
|
163 |
catch (Exception ex) |
|
164 |
{ |
|
165 |
logger.ErrorFormat("システムエラー:{0}:{1}:{2}", CommonMotions.GetMethodName(2), ex.Message, strcmd); |
|
166 |
return false; |
|
167 |
} |
|
168 |
} |
|
169 |
#endregion |
|
170 |
|
|
171 |
#region 1件追加処理 |
|
172 |
/// <summary> |
|
173 |
/// 担当者毎経費データ追加 |
|
174 |
/// </summary> |
|
175 |
/// <param name="data">担当者毎経費データデータ</param> |
|
176 |
/// <returns>true:成功 false:失敗</returns> |
|
177 |
public bool InsertAction(AttendanceDailyData work, bool bConnect = true) |
|
178 |
{ |
|
179 |
string strcmd = ""; |
|
180 |
try |
|
181 |
{ |
|
182 |
strcmd = "INSERT INTO AttendanceDailyData"; |
|
183 |
strcmd += " (PersonCode"; // 担当者コード |
|
184 |
strcmd += " ,AttendanceDate"; // 日報作成日 |
|
185 |
strcmd += " ,SeqNo"; // 明細行番号 |
|
186 |
strcmd += " ,ConstructionCode"; // 工事番号 |
|
187 |
strcmd += " ,OvertimeHours"; // 残業時間 |
|
188 |
strcmd += " ,WorkingComment"; // コメント |
|
189 |
strcmd += " ,EntryDate"; // 登録年月日 |
|
190 |
strcmd += " ,UpdateDate)"; // 更新年月日 |
|
191 |
|
|
192 |
strcmd += " VALUES ("; |
|
193 |
|
|
194 |
strcmd += string.Format(" {0}", work.PersonCode); // 担当者コード |
|
195 |
strcmd += string.Format(", TO_DATE('{0}','YYYY/MM/DD')" |
|
196 |
, work.AttendanceDate.ToShortDateString()); // 日報作成日 |
|
197 |
strcmd += string.Format(", {0}", work.SeqNo); // 明細行番号 |
|
198 |
strcmd += string.Format(", {0}", work.ConstructionCode); // 工事番号 |
|
199 |
strcmd += string.Format(", {0}", work.OvertimeHours); // 残業時間 |
|
200 |
strcmd += string.Format(",'{0}'", work.WorkingComment); // コメント |
|
201 |
|
|
202 |
strcmd += ", TO_DATE(TO_CHAR(sysdate,'YYYY/MM/DD HH24:MI:SS'),'YYYY/MM/DD HH24:MI:SS')"; |
|
203 |
strcmd += ", TO_DATE(TO_CHAR(sysdate,'YYYY/MM/DD HH24:MI:SS'),'YYYY/MM/DD HH24:MI:SS')"; |
|
204 |
strcmd = strcmd + ")"; |
|
205 |
|
|
206 |
if (!ExecuteNonQuery(strcmd, bConnect)) return false; |
|
207 |
|
|
208 |
return true; |
|
209 |
} |
|
210 |
catch (Exception ex) |
|
211 |
{ |
|
212 |
logger.ErrorFormat("システムエラー:{0}:{1}:{2}", CommonMotions.GetMethodName(2), ex.Message, strcmd); |
|
213 |
return false; |
|
214 |
} |
|
215 |
} |
|
216 |
#endregion |
|
217 |
|
|
218 |
#region 複数追加処理 |
|
219 |
public bool InsertAction(List<AttendanceDailyData> data, bool bConnect = true) |
|
220 |
{ |
|
221 |
string strcmd = ""; |
|
222 |
try |
|
223 |
{ |
|
224 |
foreach (AttendanceDailyData work in data) |
|
225 |
{ |
|
226 |
if (!InsertAction(work, bConnect)) return false; |
|
227 |
} |
|
228 |
return true; |
|
229 |
} |
|
230 |
catch (Exception ex) |
|
231 |
{ |
|
232 |
logger.ErrorFormat("システムエラー:{0}:{1}:{2}", CommonMotions.GetMethodName(2), ex.Message, strcmd); |
|
233 |
return false; |
|
234 |
} |
|
235 |
} |
|
236 |
#endregion |
|
237 |
|
|
238 |
#region 更新処理 |
|
239 |
/// <summary> |
|
240 |
/// 担当者毎経費データ更新 |
|
241 |
/// </summary> |
|
242 |
/// <param name="AddSQLString">更新条件SQL文字列</param> |
|
243 |
/// <param name="data">担当者毎経費データデータ</param> |
|
244 |
/// <returns>true:成功 false:失敗</returns> |
|
245 |
public bool UpdateAction(string AddSQLString, AttendanceDailyData data, bool bConnect = true) |
|
246 |
{ |
|
247 |
string strcmd = ""; |
|
248 |
try |
|
249 |
{ |
|
250 |
|
|
251 |
strcmd = "UPDATE AttendanceDailyData"; |
|
252 |
|
|
253 |
strcmd += " SET"; |
|
254 |
|
|
255 |
strcmd += string.Format(" PersonCode = {0}", data.PersonCode); // 担当者コード |
|
256 |
strcmd += string.Format(",AttendanceDate = TO_DATE('{0}','YYYY/MM/DD')" |
|
257 |
, data.AttendanceDate.ToShortDateString()); // 日報作成日 |
|
258 |
strcmd += string.Format(",SeqNo = {0} ", data.SeqNo); // 明細行番号 |
|
259 |
strcmd += string.Format(",ConstructionCode = {0}", data.ConstructionCode); // 工事番号 |
|
260 |
strcmd += string.Format(",OvertimeHours = {0}", data.OvertimeHours); // 残業時間 |
|
261 |
strcmd += string.Format(",WorkingComment = '{0}'", data.WorkingComment); // コメント |
|
262 |
|
|
263 |
strcmd += ", UpdateDate = TO_DATE(TO_CHAR(sysdate,'YYYY/MM/DD HH24:MI:SS'),'YYYY/MM/DD HH24:MI:SS')"; |
|
264 |
strcmd += AddSQLString; |
|
265 |
|
|
266 |
if (!ExecuteNonQuery(strcmd, bConnect)) return false; |
|
267 |
|
|
268 |
return true; |
|
269 |
} |
|
270 |
catch (Exception ex) |
|
271 |
{ |
|
272 |
logger.ErrorFormat("システムエラー:{0}:{1}:{2}", CommonMotions.GetMethodName(2), ex.Message, strcmd); |
|
273 |
return false; |
|
274 |
} |
|
275 |
} |
|
276 |
#endregion |
|
277 |
|
|
278 |
#region 削除処理 |
|
279 |
/// <summary> |
|
280 |
/// 担当者毎経費データ削除 |
|
281 |
/// </summary> |
|
282 |
/// <param name="AddSQLString">削除条件SQL文字列</param> |
|
283 |
/// <param name="data">担当者毎経費データデータ</param> |
|
284 |
/// <returns>true:成功 false:失敗</returns> |
|
285 |
public bool DeleteAction(string AddSQLString, bool bConnect = true) |
|
286 |
{ |
|
287 |
//Oracle インターフェース |
|
288 |
string strcmd = ""; |
|
289 |
try |
|
290 |
{ |
|
291 |
strcmd = string.Format("{0}{1}", "DELETE FROM AttendanceDailyData", AddSQLString); |
|
292 |
|
|
293 |
if (!ExecuteNonQuery(strcmd, bConnect)) return false; |
|
294 |
|
|
295 |
return true; |
|
296 |
} |
|
297 |
catch (Exception ex) |
|
298 |
{ |
|
299 |
logger.ErrorFormat("システムエラー:{0}:{1}:{2}", CommonMotions.GetMethodName(2), ex.Message, strcmd); |
|
300 |
return false; |
|
301 |
} |
|
302 |
} |
|
303 |
#endregion |
|
304 |
|
|
305 |
#region 1項目更新処理 |
|
306 |
/// <summary> |
|
307 |
/// 1項目の更新を行う |
|
308 |
/// </summary> |
|
309 |
/// <param name="ConstructionCode"></param> |
|
310 |
/// <param name="FeildNo"></param> |
|
311 |
/// <param name="value"></param> |
|
312 |
/// <param name="bConnect"></param> |
|
313 |
/// <returns></returns> |
|
314 |
public bool UpdateFeild(int PersonCode, DateTime AttendanceDate, int SeqNo, int FeildNo, object value, bool bConnect = true) |
|
315 |
{ |
|
316 |
string strcmd = ""; |
|
317 |
try |
|
318 |
{ |
|
319 |
strcmd = "UPDATE AttendanceDailyData"; |
|
320 |
|
|
321 |
strcmd += " SET"; |
|
322 |
switch (FeildNo) |
|
323 |
{ |
|
324 |
case (int)DataColumn.PersonCode: |
|
325 |
strcmd += string.Format(" PersonCode = {0}", (int)value); |
|
326 |
break; |
|
327 |
case (int)DataColumn.AttendanceDate: |
|
328 |
strcmd += string.Format(" AttendanceDate = TO_DATE('{0}','YYYY/MM/DD')", ((DateTime)value).ToShortDateString()); |
|
329 |
break; |
|
330 |
case (int)DataColumn.SeqNo: |
|
331 |
strcmd += string.Format(" SeqNo = {0}", (int)value); |
|
332 |
break; |
|
333 |
case (int)DataColumn.ConstructionCode: |
|
334 |
strcmd += string.Format(" ConstructionCode = {0}", (int)value); |
|
335 |
break; |
|
336 |
case (int)DataColumn.OvertimeHours: |
|
337 |
strcmd += string.Format(" OvertimeHours = {0}", (double)value); |
|
338 |
break; |
|
339 |
case (int)DataColumn.WorkingComment: |
|
340 |
strcmd += string.Format(" WorkingComment = '{0}'", CommonMotions.cnvString(value)); |
|
341 |
break; |
|
342 |
} |
|
343 |
|
|
344 |
strcmd += ", UpdateDate = TO_DATE(TO_CHAR(sysdate,'YYYY/MM/DD HH24:MI:SS'),'YYYY/MM/DD HH24:MI:SS')"; |
|
345 |
strcmd += CreatePrimarykeyString(PersonCode, AttendanceDate, SeqNo); |
|
346 |
|
|
347 |
if (!ExecuteNonQuery(strcmd, bConnect)) return false; |
|
348 |
|
|
349 |
return true; |
|
350 |
} |
|
351 |
catch (Exception ex) |
|
352 |
{ |
|
353 |
logger.ErrorFormat("システムエラー:{0}:{1}:{2}", CommonMotions.GetMethodName(2), ex.Message, strcmd); |
|
354 |
return false; |
|
355 |
} |
|
356 |
} |
|
357 |
#endregion |
|
358 |
|
|
359 |
#region データセット処理 |
|
360 |
/// <summary> |
|
361 |
/// OracleDataReaderより構造体へセットする |
|
362 |
/// </summary> |
|
363 |
/// <param name="reader">OracleDataReader</param> |
|
364 |
/// <param name="wrk">構造体</param> |
|
365 |
public void Reader2Struct(object[] objwrk, ref AttendanceDailyData wrk) |
|
366 |
{ |
|
367 |
try |
|
368 |
{ |
|
369 |
// データ取得 |
|
370 |
wrk.PersonCode = int.Parse(objwrk[(int)DataColumn.PersonCode].ToString()); // 担当者コード |
|
371 |
wrk.AttendanceDate = DateTime.Parse(objwrk[(int)DataColumn.AttendanceDate].ToString()); // 日報作成日 |
|
372 |
wrk.SeqNo = int.Parse(objwrk[(int)DataColumn.SeqNo].ToString()); // 明細行番号 |
|
373 |
wrk.ConstructionCode = int.Parse(objwrk[(int)DataColumn.ConstructionCode].ToString()); // 工事番号 |
|
374 |
wrk.OvertimeHours = double.Parse(objwrk[(int)DataColumn.OvertimeHours].ToString()); // 残業時間 |
|
375 |
wrk.WorkingComment = objwrk[(int)DataColumn.WorkingComment].ToString(); // 当日作業内容 |
|
376 |
|
|
377 |
wrk.EntryDate = DateTime.Parse(objwrk[(int)DataColumn.EntryDate].ToString()); |
|
378 |
wrk.UpdateDate = DateTime.Parse(objwrk[(int)DataColumn.UpdateDate].ToString()); |
|
379 |
} |
|
380 |
catch (OracleException oraex) |
|
381 |
{ |
|
382 |
logger.ErrorFormat("オラクルエラー:{0}:{1}", CommonMotions.GetMethodName(2), oraex.Message); |
|
383 |
} |
|
384 |
catch (Exception ex) |
|
385 |
{ |
|
386 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(2), ex.Message); |
|
387 |
} |
|
388 |
} |
|
389 |
#endregion |
|
390 |
|
|
391 |
#region 検索文字列作成処理 |
|
392 |
/// <summary> |
|
393 |
/// 主キー検索の文字列を返す |
|
394 |
/// </summary> |
|
395 |
/// <param name="PersonCode"></param> |
|
396 |
/// <param name="ActionDate"></param> |
|
397 |
/// <param name="DataType"></param> |
|
398 |
/// <param name="DataAddCount"></param> |
|
399 |
/// <returns></returns> |
|
400 |
public string CreatePrimarykeyString(int PersonCode, DateTime AttendanceDate, int SeqNo = 0) |
|
401 |
{ |
|
402 |
string strWork = ""; |
|
403 |
try |
|
404 |
{ |
|
405 |
strWork = string.Format(" WHERE PersonCode = {0}", PersonCode); |
|
406 |
if (AttendanceDate != DateTime.MinValue) |
|
407 |
strWork += string.Format(" AND AttendanceDate = TO_DATE('{0}','YYYY/MM/DD')", AttendanceDate.ToShortDateString()); |
|
408 |
if (SeqNo != 0) |
|
409 |
strWork += string.Format(" AND SeqNo = {0}", SeqNo); |
|
410 |
} |
|
411 |
catch (Exception ex) |
|
412 |
{ |
|
413 |
logger.ErrorFormat("システムエラー:{0}:{1}:{2}", CommonMotions.GetMethodName(2), ex.Message, strWork); |
|
414 |
} |
|
415 |
|
|
416 |
return strWork; |
|
417 |
} |
|
418 |
#endregion |
|
419 |
|
|
420 |
#region 追加番号の最大値を取得 |
|
421 |
/// <summary> |
|
422 |
/// 追加番号の最大値を取得する |
|
423 |
/// </summary> |
|
424 |
/// <param name="AddSQLString"></param> |
|
425 |
/// <param name="bConnect"></param> |
|
426 |
/// <returns></returns> |
|
427 |
public int SelectMaxAddDataCount(string AddSQLString, bool bConnect = true) |
|
428 |
{ |
|
429 |
//Oracle インターフェース |
|
430 |
string strcmd = ""; |
|
431 |
ArrayList arData = new ArrayList(); |
|
432 |
int iRet = 0; |
|
433 |
try |
|
434 |
{ |
|
435 |
// SQL作成 |
|
436 |
strcmd = "SELECT NVL(MAX(SeqNo), 0) FROM AttendanceDailyData" + AddSQLString; |
|
437 |
|
|
438 |
// SQL実行 |
|
439 |
if (!ExecuteReader(strcmd, ref arData, bConnect)) return iRet; |
|
440 |
|
|
441 |
// データセット |
|
442 |
foreach (object[] objwrk in arData) |
|
443 |
{ |
|
444 |
if (objwrk[0].ToString().Equals("null")) |
|
445 |
iRet = 0; |
|
446 |
else |
|
447 |
iRet = int.Parse(objwrk[0].ToString()); |
|
448 |
} |
|
449 |
|
|
450 |
} |
|
451 |
catch (Exception ex) |
|
452 |
{ |
|
453 |
logger.ErrorFormat("システムエラー:{0}:{1}:{2}", CommonMotions.GetMethodName(2), ex.Message, strcmd); |
|
454 |
} |
|
455 |
return iRet; |
|
456 |
} |
|
457 |
#endregion |
|
458 |
} |
|
459 |
} |
trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOPersonApproval.cs | ||
---|---|---|
1 |
using System; |
|
2 |
using System.Collections.Generic; |
|
3 |
using System.Linq; |
|
4 |
using System.Text; |
|
5 |
using System.Collections; |
|
6 |
|
|
7 |
using log4net; |
|
8 |
using Oracle.ManagedDataAccess.Client; |
|
9 |
|
|
10 |
using ProcessManagement.DB.Oracle; |
|
11 |
using ProcessManagement.DB.Core; |
|
12 |
using ProcessManagement.DataModel; |
|
13 |
|
|
14 |
using ProcessManagement.Common; |
|
15 |
|
|
16 |
namespace ProcessManagement.DB.IOAccess |
|
17 |
{ |
|
18 |
/// <summary> |
|
19 |
/// 担当者承認データアクセスクラス |
|
20 |
/// </summary> |
|
21 |
public class IOPersonApproval : OracleProcess |
|
22 |
{ |
|
23 |
#region 定義部 |
|
24 |
/// <summary> |
|
25 |
/// log4netログを使用する |
|
26 |
/// </summary> |
|
27 |
private static readonly ILog logger = LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); |
|
28 |
#endregion |
|
29 |
|
|
30 |
#region 定数 |
|
31 |
/// <summary> |
|
32 |
/// 承認データフィールド並び |
|
33 |
/// </summary> |
|
34 |
public enum ColumnName |
|
35 |
{ |
|
36 |
PersonCode = 0, |
|
37 |
ApprovalCode, |
|
38 |
OrderDate, |
|
39 |
OrderNo, |
|
40 |
SeqNo, |
|
41 |
PersonCodeApproval, |
|
42 |
PetitionApprovalDate, |
|
43 |
ApprovalLimitDates, |
|
44 |
ApprovalStatus, |
|
45 |
ENTRYDATE, |
|
46 |
UPDATEDATE |
|
47 |
} |
|
48 |
#endregion |
|
49 |
|
|
50 |
#region コンストラクタ |
|
51 |
/// <summary> |
|
52 |
/// コンストラクタ |
|
53 |
/// </summary> |
|
54 |
/// <param name="ConnectionString"></param> |
|
55 |
public IOPersonApproval() |
|
56 |
: base(DBCommon.Instance.DBConnectString) |
|
57 |
{ |
|
58 |
} |
|
59 |
|
|
60 |
#endregion |
|
61 |
|
|
62 |
#region 承認データ検索文字列作成 |
|
63 |
/// <summary> |
|
64 |
/// 承認データ検索文字列作成 |
|
65 |
/// </summary> |
|
66 |
/// <param name="AddSQLString">検索条件SQL文字列</param> |
|
67 |
/// <param name="data">承認データデータ</param> |
|
68 |
/// <returns>true:成功 false:失敗</returns> |
|
69 |
private string CreateSelectSQL() |
|
70 |
{ |
|
71 |
// SQL作成(oracleのDateTime型が変換できないのでCharに変換しておく) |
|
72 |
string strcmd = "SELECT"; |
|
73 |
strcmd += " PersonCode"; |
|
74 |
strcmd += ",ApprovalCode"; |
|
75 |
strcmd += ",OrderDate"; |
|
76 |
strcmd += ",OrderNo"; |
|
77 |
strcmd += ",SeqNo"; |
|
78 |
strcmd += ",PersonCodeApproval"; |
|
79 |
strcmd += ",TO_CHAR(PetitionApprovalDate, 'YYYY/MM/DD HH24:MI:ss')"; |
|
80 |
strcmd += ",TO_CHAR(ApprovalLimitDates, 'YYYY/MM/DD HH24:MI:ss')"; |
|
81 |
strcmd += ",ApprovalStatus"; |
|
82 |
strcmd += ",TO_CHAR(EntryDate, 'YYYY/MM/DD HH24:MI:ss')"; |
|
83 |
strcmd += ",TO_CHAR(UpdateDate, 'YYYY/MM/DD HH24:MI:ss')"; |
|
84 |
strcmd += " FROM PersonApproval"; |
|
85 |
|
|
86 |
return strcmd; |
|
87 |
} |
|
88 |
#endregion |
|
89 |
|
|
90 |
#region 承認データ検索(複数) |
|
91 |
/// <summary> |
|
92 |
/// 承認データ検索(複数) |
|
93 |
/// </summary> |
|
94 |
/// <param name="AddSQLString"></param> |
|
95 |
/// <param name="data"></param> |
|
96 |
/// <param name="bConnect"></param> |
|
97 |
/// <returns></returns> |
|
98 |
public bool SelectAction(string AddSQLString, ref List<PersonApproval> data, bool bConnect = true) |
|
99 |
{ |
|
100 |
//Oracle インターフェース |
|
101 |
string strcmd = ""; |
|
102 |
ArrayList arData = new ArrayList(); |
|
103 |
|
|
104 |
try |
|
105 |
{ |
|
106 |
// SQL作成 |
|
107 |
strcmd = CreateSelectSQL() + AddSQLString; |
|
108 |
|
|
109 |
// SQL実行 |
|
110 |
if (!ExecuteReader(strcmd, ref arData, bConnect)) return false; |
|
111 |
|
|
112 |
// データセット |
|
113 |
foreach (object[] objwrk in arData) |
|
114 |
{ |
|
115 |
PersonApproval work = new PersonApproval(); |
|
116 |
Reader2Struct(objwrk, ref work); |
|
117 |
data.Add(work); |
|
118 |
} |
|
119 |
|
|
120 |
return true; |
|
121 |
} |
|
122 |
catch (Exception ex) |
|
123 |
{ |
|
124 |
logger.ErrorFormat("システムエラー:{0}:{1}:{2}", CommonMotions.GetMethodName(2), ex.Message, strcmd); |
|
125 |
return false; |
|
126 |
} |
|
127 |
|
|
128 |
} |
|
129 |
#endregion |
|
130 |
|
|
131 |
#region 承認データ検索(1件) |
|
132 |
/// <summary> |
|
133 |
/// 承認データ検索(1件) |
|
134 |
/// </summary> |
|
135 |
/// <param name="AddSQLString"></param> |
|
136 |
/// <param name="data"></param> |
|
137 |
/// <param name="bConnect"></param> |
|
138 |
/// <returns></returns> |
|
139 |
public bool SelectAction(string AddSQLString, ref PersonApproval data, bool bConnect = true) |
|
140 |
{ |
|
141 |
//Oracle インターフェース |
|
142 |
string strcmd = ""; |
|
143 |
ArrayList arData = new ArrayList(); |
|
144 |
|
|
145 |
try |
|
146 |
{ |
|
147 |
// SQL作成 |
|
148 |
strcmd = CreateSelectSQL() + AddSQLString; |
|
149 |
|
|
150 |
// SQL実行 |
|
151 |
if (!ExecuteReader(strcmd, ref arData, bConnect)) return false; |
|
152 |
if (arData.Count == 0) return false; |
|
153 |
|
|
154 |
// データセット |
|
155 |
object[] objwrk = (object[])arData[0]; |
|
156 |
Reader2Struct(objwrk, ref data); |
|
157 |
|
|
158 |
return true; |
|
159 |
} |
|
160 |
catch (Exception ex) |
|
161 |
{ |
|
162 |
logger.ErrorFormat("システムエラー:{0}:{1}:{2}", CommonMotions.GetMethodName(2), ex.Message, strcmd); |
|
163 |
return false; |
|
164 |
} |
|
165 |
|
|
166 |
} |
|
167 |
#endregion |
|
168 |
|
|
169 |
#region 承認データ追加(複数) |
|
170 |
/// <summary> |
|
171 |
/// 承認データ追加(複数) |
|
172 |
/// </summary> |
|
173 |
/// <param name="data">承認データデータ</param> |
|
174 |
/// <returns>true:成功 false:失敗</returns> |
|
175 |
public bool InsertAction(List<PersonApproval> data, bool bConnect = true) |
|
176 |
{ |
|
177 |
string strcmd = ""; |
|
178 |
try |
|
179 |
{ |
|
180 |
foreach (PersonApproval work in data) |
|
181 |
{ |
|
182 |
if (!InsertAction(work, bConnect)) return false; |
|
183 |
} |
|
184 |
return true; |
|
185 |
} |
|
186 |
catch (Exception ex) |
|
187 |
{ |
|
188 |
logger.ErrorFormat("システムエラー:{0}:{1}:{2}", CommonMotions.GetMethodName(2), ex.Message, strcmd); |
|
189 |
return false; |
|
190 |
} |
|
191 |
} |
|
192 |
#endregion |
|
193 |
|
|
194 |
#region 承認データ追加(1件) |
|
195 |
/// <summary> |
|
196 |
/// 承認データ追加(1件) |
|
197 |
/// </summary> |
|
198 |
/// <param name="data"></param> |
|
199 |
/// <param name="bConnect"></param> |
|
200 |
/// <returns></returns> |
|
201 |
public bool InsertAction(PersonApproval data, bool bConnect = true) |
|
202 |
{ |
|
203 |
string strcmd = ""; |
|
204 |
try |
|
205 |
{ |
|
206 |
|
|
207 |
strcmd = "INSERT INTO PersonApproval"; |
|
208 |
strcmd += " (PersonCode"; |
|
209 |
strcmd += ",ApprovalCode"; |
|
210 |
strcmd += ",OrderDate"; |
|
211 |
strcmd += ",OrderNo"; |
|
212 |
strcmd += ",SeqNo"; |
|
213 |
strcmd += ",PersonCodeApproval"; |
|
214 |
strcmd += ",PetitionApprovalDate"; |
|
215 |
strcmd += ",ApprovalLimitDates"; |
|
216 |
strcmd += ",ApprovalStatus"; |
|
217 |
strcmd += ",EntryDate"; |
|
218 |
strcmd += ",UpdateDate)"; |
|
219 |
|
|
220 |
strcmd += " VALUES ("; |
|
221 |
|
|
222 |
strcmd += string.Format(" {0}", data.PersonCode.ToString()); |
|
223 |
strcmd += string.Format(", {0}", data.ApprovalCode.ToString()); |
|
224 |
strcmd += string.Format(", TO_DATE('{0}','YYYY/MM/DD')", data.OrderDate.ToShortDateString()); |
|
225 |
strcmd += string.Format(", {0}", data.OrderNo.ToString()); |
|
226 |
strcmd += string.Format(", {0}", data.SeqNo.ToString()); |
|
227 |
strcmd += string.Format(", {0}", data.PersonCodeApproval.ToString()); |
|
228 |
strcmd += string.Format(", TO_DATE('{0}','YYYY/MM/DD HH24:MI:SS')", data.PetitionApprovalDate.ToString()); |
|
229 |
|
|
230 |
strcmd += string.Format(", TO_DATE('{0}','YYYY/MM/DD HH24:MI:SS')", data.ApprovalLimitDates.ToString()); |
|
231 |
strcmd += string.Format(", {0}", data.ApprovalStatus.ToString()); |
|
232 |
|
|
233 |
strcmd += ", TO_DATE(TO_CHAR(sysdate,'YYYY/MM/DD HH24:MI:SS'),'YYYY/MM/DD HH24:MI:SS')"; |
|
234 |
strcmd += ", TO_DATE(TO_CHAR(sysdate,'YYYY/MM/DD HH24:MI:SS'),'YYYY/MM/DD HH24:MI:SS')"; |
|
235 |
strcmd = strcmd + ")"; |
|
236 |
|
|
237 |
if (!ExecuteNonQuery(strcmd, bConnect)) return false; |
|
238 |
|
|
239 |
return true; |
|
240 |
} |
|
241 |
catch (Exception ex) |
|
242 |
{ |
|
243 |
logger.ErrorFormat("システムエラー:{0}:{1}:{2}", CommonMotions.GetMethodName(2), ex.Message, strcmd); |
|
244 |
return false; |
|
245 |
} |
|
246 |
} |
|
247 |
#endregion |
|
248 |
|
|
249 |
#region 承認データ更新 |
|
250 |
/// <summary> |
|
251 |
/// 承認データ更新 |
|
252 |
/// </summary> |
|
253 |
/// <param name="AddSQLString">更新条件SQL文字列</param> |
|
254 |
/// <param name="data">承認データデータ</param> |
|
255 |
/// <returns>true:成功 false:失敗</returns> |
|
256 |
public bool UpdateAction(string AddSQLString, PersonApproval data, bool bConnect = true) |
|
257 |
{ |
|
258 |
string strcmd = ""; |
|
259 |
try |
|
260 |
{ |
|
261 |
|
|
262 |
strcmd = "UPDATE PersonApproval"; |
|
263 |
|
|
264 |
strcmd += " SET"; |
|
265 |
|
|
266 |
strcmd += string.Format(" PersonCode = {0}", data.PersonCode.ToString()); |
|
267 |
strcmd += string.Format(",ApprovalCode = {0}", data.ApprovalCode.ToString()); |
|
268 |
strcmd += string.Format(",OrderDate = TO_DATE('{0}','YYYY/MM/DD')", data.OrderDate.ToShortDateString()); |
|
269 |
strcmd += string.Format(",SeqNo = {0}", data.SeqNo.ToString()); |
|
270 |
strcmd += string.Format(",OrderNo = {0}", data.OrderNo.ToString()); |
|
271 |
strcmd += string.Format(",PersonCodeApproval = {0}", data.PersonCodeApproval.ToString()); |
|
272 |
strcmd += string.Format(",PetitionApprovalDate = TO_DATE('{0}','YYYY/MM/DD HH24:MI:SS')", data.PetitionApprovalDate.ToString()); |
|
273 |
strcmd += string.Format(",ApprovalLimitDates = TO_DATE('{0}','YYYY/MM/DD HH24:MI:SS')", data.ApprovalLimitDates.ToString()); |
|
274 |
strcmd += string.Format(",ApprovalStatus = {0}", data.ApprovalStatus.ToString()); |
|
275 |
|
|
276 |
strcmd += ", UpdateDate = TO_DATE(TO_CHAR(sysdate,'YYYY/MM/DD HH24:MI:SS'),'YYYY/MM/DD HH24:MI:SS')"; |
|
277 |
strcmd += AddSQLString; |
|
278 |
|
|
279 |
if (!ExecuteNonQuery(strcmd, bConnect)) return false; |
|
280 |
|
|
281 |
return true; |
|
282 |
} |
|
283 |
catch (Exception ex) |
|
284 |
{ |
|
285 |
logger.ErrorFormat("システムエラー:{0}:{1}:{2}", CommonMotions.GetMethodName(2), ex.Message, strcmd); |
|
286 |
return false; |
|
287 |
} |
|
288 |
} |
|
289 |
#endregion |
|
290 |
|
|
291 |
#region 承認データ削除 |
|
292 |
/// <summary> |
|
293 |
/// 承認データ削除 |
|
294 |
/// </summary> |
|
295 |
/// <param name="AddSQLString">削除条件SQL文字列</param> |
|
296 |
/// <param name="data">承認データデータ</param> |
|
297 |
/// <returns>true:成功 false:失敗</returns> |
|
298 |
public bool DeleteAction(string AddSQLString, bool bConnect = true) |
|
299 |
{ |
|
300 |
//Oracle インターフェース |
|
301 |
string strcmd = ""; |
他の形式にエクスポート: Unified diff