リビジョン 366
承認ボタンパネル共通化実装中
申請・承認共通クラス名前変更
部署名検索SQLバグ修正
データコピー機能工事番号作成年度バグ修正
メニュー増減工事データ検索SQLバグ修正
工事情報担当者変更履歴追加
branches/src/ProcessManagement/ProcessManagement/Common/CommonMotions.cs | ||
---|---|---|
3631 | 3631 |
strSQL.AppendFormat(" OR DATE('{0}') = DATE(B.CompDate)))", DateTime.MinValue.ToShortDateString()); |
3632 | 3632 |
|
3633 | 3633 |
strSQL.AppendFormat(" AND A.PersonCode = {0}", nPersonCode); |
3634 |
strSQL.Append(" Order By B.ComplateDate desc");
|
|
3634 |
strSQL.Append(" Order By B.CompDate desc"); |
|
3635 | 3635 |
} |
3636 | 3636 |
catch (Exception ex) |
3637 | 3637 |
{ |
... | ... | |
3754 | 3754 |
} |
3755 | 3755 |
#endregion |
3756 | 3756 |
|
3757 |
#region ベースコントロールコレクションよりボタン取得 |
|
3758 |
/// <summary> |
|
3759 |
/// ベースコントロールコレクションよりボタン取得 |
|
3760 |
/// </summary> |
|
3761 |
public static Button GetButtton2Collection(Control.ControlCollection BasePnl, string ButtonName) |
|
3762 |
{ |
|
3763 |
Button buttonRet = null; |
|
3764 |
try |
|
3765 |
{ |
|
3766 |
foreach (Control CurCtrl in BasePnl) |
|
3767 |
{ |
|
3768 |
// 申請ボタン取得 |
|
3769 |
if (CurCtrl.Name.Equals(ButtonName)) |
|
3770 |
{ |
|
3771 |
buttonRet = (Button)CurCtrl; |
|
3772 |
break; |
|
3773 |
} |
|
3774 |
} |
|
3775 |
return buttonRet; |
|
3776 |
} |
|
3777 |
catch (Exception ex) |
|
3778 |
{ |
|
3779 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
|
3780 |
return buttonRet; |
|
3781 |
} |
|
3782 |
} |
|
3757 | 3783 |
#endregion |
3758 | 3784 |
|
3785 |
#region 申請パネルより承認数ラベル取得 |
|
3786 |
/// <summary> |
|
3787 |
/// 申請パネルより承認数ラベル取得 |
|
3788 |
/// </summary> |
|
3789 |
public static Label GetLabel2Collection(Control.ControlCollection BasePnl, string LabelName) |
|
3790 |
{ |
|
3791 |
Label LabelRet = null; |
|
3792 |
try |
|
3793 |
{ |
|
3794 |
foreach (Control CurCtrl in BasePnl) |
|
3795 |
{ |
|
3796 |
// 申請ボタン取得 |
|
3797 |
if (CurCtrl.Name.Equals(LabelName)) |
|
3798 |
{ |
|
3799 |
LabelRet = (Label)CurCtrl; |
|
3800 |
break; |
|
3801 |
} |
|
3802 |
} |
|
3803 |
return LabelRet; |
|
3804 |
} |
|
3805 |
catch (Exception ex) |
|
3806 |
{ |
|
3807 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
|
3808 |
return LabelRet; |
|
3809 |
} |
|
3810 |
} |
|
3811 |
#endregion |
|
3812 |
|
|
3813 |
#endregion |
|
3814 |
|
|
3759 | 3815 |
#region ---------- Excel向け操作メソッド |
3760 | 3816 |
#region オブジェクト開放 |
3761 | 3817 |
/// <summary> |
branches/src/ProcessManagement/ProcessManagement/Common/CommonVersion.cs | ||
---|---|---|
14 | 14 |
/// <summary> |
15 | 15 |
/// 本体バージョン |
16 | 16 |
/// </summary> |
17 |
public static int s_SystemVersion = 220;
|
|
17 |
public static int s_SystemVersion = 224;
|
|
18 | 18 |
|
19 | 19 |
/// <summary> |
20 | 20 |
/// コピー・環境バージョン |
branches/src/ProcessManagement/ProcessManagement/Common/Process/ClsApprovalPermission.cs | ||
---|---|---|
1 |
using System; |
|
2 |
using System.Collections.Generic; |
|
3 |
using System.Collections; |
|
4 |
using System.Linq; |
|
5 |
using System.Text; |
|
6 |
using System.Threading.Tasks; |
|
7 |
|
|
8 |
using log4net; |
|
9 |
using log4net.Appender; |
|
10 |
using log4net.Repository.Hierarchy; |
|
11 |
|
|
12 |
using ProcessManagement.Common; |
|
13 |
using ProcessManagement.DB.IOAccess; |
|
14 |
using ProcessManagement.DataModel; |
|
15 |
using ProcessManagement.Forms.ControlsAction; |
|
16 |
using ProcessManagement.Forms.CustomControls; |
|
17 |
|
|
18 |
namespace ProcessManagement.Common |
|
19 |
{ |
|
20 |
/// <summary> |
|
21 |
/// 承認許可確認クラス |
|
22 |
/// </summary> |
|
23 |
public static class ClsApprovalPermission |
|
24 |
{ |
|
25 |
#region 使用定義 |
|
26 |
//log4netログを使用する |
|
27 |
private static readonly log4net.ILog logger = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); |
|
28 |
#endregion |
|
29 |
|
|
30 |
#region 定数 |
|
31 |
|
|
32 |
#region 申請レコード番号 |
|
33 |
/// <summary> |
|
34 |
/// 申請レコード枝番 |
|
35 |
/// </summary> |
|
36 |
private const int s_PrimartyRecord = 1; |
|
37 |
#endregion |
|
38 |
#endregion |
|
39 |
|
|
40 |
#region 承認申請・承認をする(工事承認) |
|
41 |
/// <summary> |
|
42 |
/// 案件の承認申請・承認をする(工事承認) |
|
43 |
/// </summary> |
|
44 |
/// <returns>成功:true 失敗:false</returns> |
|
45 |
public static bool CreatePetitionApproval(ProcessApproval Rec) |
|
46 |
{ |
|
47 |
IOProcessApproval ApprDB = new IOProcessApproval(); |
|
48 |
try |
|
49 |
{ |
|
50 |
string strSQL = ApprDB.CreatePrimarykeyString(Rec.ConstructionCode, Rec.ApprovalCode, Rec.OrderNo, Rec.SeqNo); |
|
51 |
List<ProcessApproval> DataList = new List<ProcessApproval>(); |
|
52 |
// データがあるかをチェックする |
|
53 |
if (!ApprDB.SelectAction(strSQL, ref DataList)) return false; |
|
54 |
|
|
55 |
// データ追加時 |
|
56 |
if (DataList.Count == 0) |
|
57 |
{ |
|
58 |
if (!ApprDB.InsertAction(Rec)) return false; |
|
59 |
return true; |
|
60 |
} |
|
61 |
|
|
62 |
// データ更新時 |
|
63 |
if (!ApprDB.UpdateAction(strSQL, Rec)) return false; |
|
64 |
|
|
65 |
return true; |
|
66 |
} |
|
67 |
catch (Exception ex) |
|
68 |
{ |
|
69 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
|
70 |
return false; |
|
71 |
} |
|
72 |
finally |
|
73 |
{ |
|
74 |
ApprDB.close(); ApprDB = null; |
|
75 |
} |
|
76 |
} |
|
77 |
#endregion |
|
78 |
|
|
79 |
#region 承認申請・承認をする(担当者承認) |
|
80 |
/// <summary> |
|
81 |
/// 案件の承認申請・承認をする(担当者承認) |
|
82 |
/// </summary> |
|
83 |
/// <returns>成功:true 失敗:false</returns> |
|
84 |
public static bool CreatePetitionApproval(PersonApproval Rec) |
|
85 |
{ |
|
86 |
IOPersonApproval ApprDB = new IOPersonApproval(); |
|
87 |
try |
|
88 |
{ |
|
89 |
string strSQL = ApprDB.CreatePrimarykeyString(Rec.PersonCode, Rec.ApprovalCode, Rec.OrderDate, Rec.OrderNo, Rec.SeqNo); |
|
90 |
List<PersonApproval> DataList = new List<PersonApproval>(); |
|
91 |
// データがあるかをチェックする |
|
92 |
if (!ApprDB.SelectAction(strSQL, ref DataList)) return false; |
|
93 |
|
|
94 |
if (DataList.Count == 0) |
|
95 |
{ // データ追加時 |
|
96 |
if (!ApprDB.InsertAction(Rec)) return false; |
|
97 |
} |
|
98 |
else |
|
99 |
{ // データ更新時 |
|
100 |
if (!ApprDB.UpdateAction(strSQL, Rec)) return false; |
|
101 |
} |
|
102 |
|
|
103 |
return true; |
|
104 |
} |
|
105 |
catch (Exception ex) |
|
106 |
{ |
|
107 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
|
108 |
return false; |
|
109 |
} |
|
110 |
finally |
|
111 |
{ |
|
112 |
ApprDB.close(); ApprDB = null; |
|
113 |
} |
|
114 |
} |
|
115 |
#endregion |
|
116 |
|
|
117 |
#region 申請レコード更新(工事承認) |
|
118 |
/// <summary> |
|
119 |
/// 申請レコードを更新する(工事承認) |
|
120 |
/// </summary> |
|
121 |
/// <param name="ConstructionCode"></param> |
|
122 |
/// <param name="ApprovalCode"></param> |
|
123 |
/// <param name="Status"></param> |
|
124 |
/// <returns></returns> |
|
125 |
public static bool SetPrimaryRecStatus(int ConstructionCode, int ApprovalCode, int OrderNO, int Status) |
|
126 |
{ |
|
127 |
IOProcessApproval ApprDB = new IOProcessApproval(); |
|
128 |
try |
|
129 |
{ |
|
130 |
if (!ApprDB.UpdateFeild(ConstructionCode, |
|
131 |
(int)IOProcessApproval.ColumnName.ApprovalStatus, |
|
132 |
Status, |
|
133 |
true, |
|
134 |
ApprovalCode, |
|
135 |
OrderNO, |
|
136 |
s_PrimartyRecord)) return false; |
|
137 |
|
|
138 |
return true; |
|
139 |
} |
|
140 |
catch (Exception ex) |
|
141 |
{ |
|
142 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
|
143 |
return false; |
|
144 |
} |
|
145 |
finally |
|
146 |
{ |
|
147 |
ApprDB.close(); ApprDB = null; |
|
148 |
} |
|
149 |
} |
|
150 |
#endregion |
|
151 |
|
|
152 |
#region 申請レコード更新(担当者承認) |
|
153 |
/// <summary> |
|
154 |
/// 申請レコードを更新する(担当者承認) |
|
155 |
/// </summary> |
|
156 |
/// <param name="PersonCode"></param> |
|
157 |
/// <param name="ApprovalCode"></param> |
|
158 |
/// <param name="Status"></param> |
|
159 |
/// <returns></returns> |
|
160 |
public static bool SetPrimaryRecStatus(int PersonCode, int ApprovalCode, DateTime OrderDate, int OrderNo, int Status) |
|
161 |
{ |
|
162 |
IOPersonApproval ApprDB = new IOPersonApproval(); |
|
163 |
try |
|
164 |
{ |
|
165 |
if (!ApprDB.UpdateFeild(PersonCode, |
|
166 |
ApprovalCode, |
|
167 |
OrderDate, |
|
168 |
(int)IOPersonApproval.ColumnName.ApprovalStatus, |
|
169 |
Status, |
|
170 |
true, |
|
171 |
OrderNo, |
|
172 |
s_PrimartyRecord)) return false; |
|
173 |
|
|
174 |
return true; |
|
175 |
} |
|
176 |
catch (Exception ex) |
|
177 |
{ |
|
178 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
|
179 |
return false; |
|
180 |
} |
|
181 |
finally |
|
182 |
{ |
|
183 |
ApprDB.close(); ApprDB = null; |
|
184 |
} |
|
185 |
} |
|
186 |
#endregion |
|
187 |
|
|
188 |
#region 申請確認(工事承認) |
|
189 |
/// <summary> |
|
190 |
/// 案件に対して申請がされているかを確認する |
|
191 |
/// </summary> |
|
192 |
/// <param name="ConstructionCode"></param> |
|
193 |
/// <param name="ApprovalCode"></param> |
|
194 |
/// <returns></returns> |
|
195 |
public static bool CheckProcessPetition(int ConstructionCode, int ApprovalCode, int OrderNo) |
|
196 |
{ |
|
197 |
IOProcessApproval ApprDB = new IOProcessApproval(); |
|
198 |
try |
|
199 |
{ |
|
200 |
bool bPetition = false; |
|
201 |
// 申請データ取得 |
|
202 |
string strSQL = ApprDB.CreatePrimarykeyString(ConstructionCode, ApprovalCode, OrderNo, s_PrimartyRecord); |
|
203 |
List<ProcessApproval> PetitionList = new List<ProcessApproval>(); |
|
204 |
if (!ApprDB.SelectAction(strSQL, ref PetitionList)) return bPetition; |
|
205 |
// 申請データが無い場合 |
|
206 |
if (PetitionList.Count != 0) bPetition = true; |
|
207 |
|
|
208 |
return bPetition; |
|
209 |
} |
|
210 |
catch (Exception ex) |
|
211 |
{ |
|
212 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
|
213 |
return false; |
|
214 |
} |
|
215 |
finally |
|
216 |
{ |
|
217 |
ApprDB.close(); ApprDB = null; |
|
218 |
} |
|
219 |
} |
|
220 |
#endregion |
|
221 |
|
|
222 |
#region 申請確認(担当者承認) |
|
223 |
/// <summary> |
|
224 |
/// 担当者申請がされているかを確認する |
|
225 |
/// </summary> |
|
226 |
/// <param name="PersonCode"></param> |
|
227 |
/// <param name="ApprovalCode"></param> |
|
228 |
/// <returns></returns> |
|
229 |
public static bool CheckPersonPetition(int PersonCode, int ApprovalCode, DateTime ApprovalDate, int OrderNo) |
|
230 |
{ |
|
231 |
IOPersonApproval ApprDB = new IOPersonApproval(); |
|
232 |
try |
|
233 |
{ |
|
234 |
bool bPetition = false; |
|
235 |
// 申請データ取得 |
|
236 |
StringBuilder strSQL = new StringBuilder(); |
|
237 |
strSQL.Append(ApprDB.CreatePrimarykeyString(PersonCode, ApprovalCode, ApprovalDate, OrderNo)); |
|
238 |
List<PersonApproval> PetitionList = new List<PersonApproval>(); |
|
239 |
if (!ApprDB.SelectAction(strSQL.ToString(), ref PetitionList)) return bPetition; |
|
240 |
// 申請データが無い場合 |
|
241 |
if (PetitionList.Count != 0) bPetition = true; |
|
242 |
|
|
243 |
return bPetition; |
|
244 |
} |
|
245 |
catch (Exception ex) |
|
246 |
{ |
|
247 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
|
248 |
return false; |
|
249 |
} |
|
250 |
finally |
|
251 |
{ |
|
252 |
ApprDB.close(); ApprDB = null; |
|
253 |
} |
|
254 |
} |
|
255 |
public static bool CheckPersonPetition2(int PersonCode, int ApprovalCode, DateTime ApprovalDate, int OrderNo) |
|
256 |
{ |
|
257 |
IOPersonApproval ApprDB = new IOPersonApproval(); |
|
258 |
try |
|
259 |
{ |
|
260 |
bool bPetition = false; |
|
261 |
// 申請データ取得 |
|
262 |
StringBuilder strSQL = new StringBuilder(); |
|
263 |
strSQL.AppendFormat(" Where PersonCode = {0}", PersonCode); |
|
264 |
strSQL.AppendFormat(" And ApprovalCode = {0}", ApprovalCode); |
|
265 |
strSQL.AppendFormat(" And DATE(EntryDate) = DATE(STR_TO_DATE('{0}','%Y/%m/%d'))", ApprovalDate.ToShortDateString()); |
|
266 |
strSQL.AppendFormat(" And OrderNo = {0}", OrderNo); |
|
267 |
List<PersonApproval> PetitionList = new List<PersonApproval>(); |
|
268 |
if (!ApprDB.SelectAction(strSQL.ToString(), ref PetitionList)) return bPetition; |
|
269 |
// 申請データが無い場合 |
|
270 |
if (PetitionList.Count != 0) bPetition = true; |
|
271 |
|
|
272 |
return bPetition; |
|
273 |
} |
|
274 |
catch (Exception ex) |
|
275 |
{ |
|
276 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
|
277 |
return false; |
|
278 |
} |
|
279 |
finally |
|
280 |
{ |
|
281 |
ApprDB.close(); ApprDB = null; |
|
282 |
} |
|
283 |
} |
|
284 |
#endregion |
|
285 |
|
|
286 |
#region 最終承認確認(工事承認) |
|
287 |
/// <summary> |
|
288 |
/// 案件に対して承認がされているかを確認する |
|
289 |
/// </summary> |
|
290 |
/// <param name="ConstructionCode"></param> |
|
291 |
/// <param name="ApprovalCode"></param> |
|
292 |
/// <returns></returns> |
|
293 |
public static bool CheckProcessApproval(int ConstructionCode, int ApprovalCode, int Approvalcount) |
|
294 |
{ |
|
295 |
IOMApproval mApprDB = new IOMApproval(); |
|
296 |
IOProcessApproval ApprDB = new IOProcessApproval(); |
|
297 |
try |
|
298 |
{ |
|
299 |
// 承認データを取得する(申請データを除く) |
|
300 |
string strData = ApprDB.CreatePrimarykeyString(ConstructionCode, ApprovalCode, Approvalcount, s_PrimartyRecord); |
|
301 |
ProcessApproval DataRec = new ProcessApproval(); |
|
302 |
if (!ApprDB.SelectAction(strData, ref DataRec)) return false; |
|
303 |
|
|
304 |
if (DataRec.ApprovalStatus != (int)CommonDefine.ApprovalStatus.Approval) return false; |
|
305 |
|
|
306 |
return true; |
|
307 |
} |
|
308 |
catch (Exception ex) |
|
309 |
{ |
|
310 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
|
311 |
return false; |
|
312 |
} |
|
313 |
finally |
|
314 |
{ |
|
315 |
ApprDB.close(); ApprDB = null; |
|
316 |
mApprDB.close(); mApprDB = null; |
|
317 |
} |
|
318 |
} |
|
319 |
#endregion |
|
320 |
|
|
321 |
#region 最終承認確認(担当者承認) |
|
322 |
/// <summary> |
|
323 |
/// 担当者申請に対して承認がされているかを確認する |
|
324 |
/// </summary> |
|
325 |
/// <param name="PersonCode"></param> |
|
326 |
/// <param name="ApprovalCode"></param> |
|
327 |
/// <returns></returns> |
|
328 |
public static bool CheckPersonApproval(int PersonCode, int ApprovalCode, DateTime OrderDate, int OrderNo) |
|
329 |
{ |
|
330 |
IOPersonApproval ApprDB = new IOPersonApproval(); |
|
331 |
try |
|
332 |
{ |
|
333 |
// 承認データを取得する(申請データを除く) |
|
334 |
string strData = ApprDB.CreatePrimarykeyString(PersonCode, ApprovalCode, OrderDate, OrderNo, s_PrimartyRecord); |
|
335 |
PersonApproval DataRec = new PersonApproval(); |
|
336 |
if (!ApprDB.SelectAction(strData, ref DataRec)) return false; |
|
337 |
|
|
338 |
if (DataRec.ApprovalStatus != (int)CommonDefine.ApprovalStatus.Approval) return false; |
|
339 |
|
|
340 |
return true; |
|
341 |
} |
|
342 |
catch (Exception ex) |
|
343 |
{ |
|
344 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
|
345 |
return false; |
|
346 |
} |
|
347 |
finally |
|
348 |
{ |
|
349 |
ApprDB.close(); ApprDB = null; |
|
350 |
} |
|
351 |
} |
|
352 |
#endregion |
|
353 |
|
|
354 |
#region 承認確認(工事承認) |
|
355 |
/// <summary> |
|
356 |
/// 工事案件に対して最終承認がされているかを確認する |
|
357 |
/// </summary> |
|
358 |
/// <param name="ConstructionCode"></param> |
|
359 |
/// <param name="ApprovalCode"></param> |
|
360 |
/// <returns></returns> |
|
361 |
public static bool CheckProcessApprovalData(int ConstructionCode, int ApprovalCode, int OrderNo) |
|
362 |
{ |
|
363 |
IOConstructionBaseInfo cbiDB = new IOConstructionBaseInfo(); |
|
364 |
IOMApproval mApprDB = new IOMApproval(); |
|
365 |
IOProcessApproval ApprDB = new IOProcessApproval(); |
|
366 |
try |
|
367 |
{ |
|
368 |
bool bApproval = false; |
|
369 |
// 申請部署の取得 |
|
370 |
string strSQL = cbiDB.CreatePrimarykeyString(ConstructionCode); |
|
371 |
ConstructionBaseInfo cbiData = new ConstructionBaseInfo(); |
|
372 |
if (!cbiDB.SelectAction(strSQL, ref cbiData)) return false; |
|
373 |
int DepartmentCode = GetFromConstrAndAppTheDep(ConstructionCode, ApprovalCode, OrderNo); |
|
374 |
|
|
375 |
// 承認経路マスタを取得する |
|
376 |
string strMaster = mApprDB.CreatePrimarykeyString(ApprovalCode, DepartmentCode); |
|
377 |
List<ApprovalMaster> MasterList = new List<ApprovalMaster>(); |
|
378 |
if (!mApprDB.SelectAction(strMaster, ref MasterList)) |
|
379 |
{ |
|
380 |
logger.ErrorFormat("承認確認処理:{0}:承認経路マスタ取得エラー", CommonMotions.GetMethodName()); |
|
381 |
return false; |
|
382 |
} |
|
383 |
if (MasterList.Count == 0) return false; |
|
384 |
|
|
385 |
// 承認データを取得する |
|
386 |
string strData = ApprDB.CreatePrimarykeyString(ConstructionCode, ApprovalCode, OrderNo); |
|
387 |
//strData += string.Format(" And SeqNo != {0} And ApprovalStatus = {1}", s_PrimartyRecord, (int)CommonDefine.ApprovalStatus.Approval); |
|
388 |
strData += " Order By SeqNo ASC"; |
|
389 |
List<ProcessApproval> DataList = new List<ProcessApproval>(); |
|
390 |
if (!ApprDB.SelectAction(strData, ref DataList)) return false; |
|
391 |
if (DataList.Count == 0) return false; |
|
392 |
|
|
393 |
// 申請データを取得する |
|
394 |
ProcessApproval RequestData = DataList.Find(x => x.SeqNo == s_PrimartyRecord); |
|
395 |
if (RequestData == null) return false; |
|
396 |
|
|
397 |
int NoCnt = MasterList.Count; |
|
398 |
foreach (ProcessApproval DataRec in DataList) |
|
399 |
{ |
|
400 |
// 申請データは対象にしない |
|
401 |
if (DataRec.SeqNo == s_PrimartyRecord) continue; |
|
402 |
|
|
403 |
// 承認以外は対象にしない |
|
404 |
if (DataRec.ApprovalStatus != (int)CommonDefine.ApprovalStatus.Approval) continue; |
|
405 |
|
|
406 |
foreach (ApprovalMaster MasterRec in MasterList) |
|
407 |
{ |
|
408 |
// 承認者コードが違えば次レコードへ |
|
409 |
if (DataRec.PersonCode != MasterRec.ApprovalPerson) continue; |
|
410 |
|
|
411 |
// 承認していればデータ件数からマイナス |
|
412 |
--NoCnt; |
|
413 |
|
|
414 |
// 最終承認権限が設定されていれば承認済み |
|
415 |
if (MasterRec.ApprovalAuthority == (int)ApprovalMaster.ApprovalAuthorityDef.LastApproval) |
|
416 |
{ |
|
417 |
// 最終承認済みは処理しない |
|
418 |
if (RequestData.ApprovalStatus == (int)CommonDefine.ApprovalStatus.Approval) break; |
|
419 |
|
|
420 |
bApproval = true; |
|
421 |
break; |
|
422 |
} |
|
423 |
} |
|
424 |
// 最終決裁者が承認していれば処理終了 |
|
425 |
if (bApproval) break; |
|
426 |
} |
|
427 |
// マスタに設定されている承認者全員が承認していれば承認 |
|
428 |
if (NoCnt == 0) |
|
429 |
{ |
|
430 |
// 最終承認済みは処理しない |
|
431 |
if (RequestData.ApprovalStatus != (int)CommonDefine.ApprovalStatus.Approval) |
|
432 |
{ |
|
433 |
bApproval = true; |
|
434 |
} |
|
435 |
} |
|
436 |
|
|
437 |
return bApproval; |
|
438 |
} |
|
439 |
catch (Exception ex) |
|
440 |
{ |
|
441 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
|
442 |
return false; |
|
443 |
} |
|
444 |
finally |
|
445 |
{ |
|
446 |
ApprDB.close(); ApprDB = null; |
|
447 |
mApprDB.close(); mApprDB = null; |
|
448 |
cbiDB.close(); cbiDB = null; |
|
449 |
} |
|
450 |
} |
|
451 |
#endregion |
|
452 |
|
|
453 |
#region 承認確認(担当者承認) |
|
454 |
/// <summary> |
|
455 |
/// 担当者申請に対して最終承認がされているかを確認する |
|
456 |
/// </summary> |
|
457 |
/// <param name="PersonCode"></param> |
|
458 |
/// <param name="ApprovalCode"></param> |
|
459 |
/// <returns></returns> |
|
460 |
public static bool CheckPersonApprovalData(int PersonCode, int ApprovalCode, DateTime OrderDate, int OrderNo) |
|
461 |
{ |
|
462 |
IOConstructionBaseInfo cbiDB = new IOConstructionBaseInfo(); |
|
463 |
IOMApproval mApprDB = new IOMApproval(); |
|
464 |
IOPersonApproval ApprDB = new IOPersonApproval(); |
|
465 |
try |
|
466 |
{ |
|
467 |
bool bApproval = false; |
|
468 |
|
|
469 |
// 承認データを取得する(申請データを除く) |
|
470 |
StringBuilder strSQL = new StringBuilder(); |
|
471 |
strSQL.Append("SELECT"); |
|
472 |
strSQL.Append(" A.DISPLAYORDER"); |
|
473 |
strSQL.Append(", A.APPROVALPERSON"); |
|
474 |
strSQL.Append(", A.APPROVALAUTHORITY"); |
|
475 |
strSQL.Append(", B.SEQNO"); |
|
476 |
strSQL.Append(", B.APPROVALSTATUS"); |
|
477 |
strSQL.Append(" FROM APPROVALMASTER A"); |
|
478 |
strSQL.Append(" LEFT JOIN PERSONAPPROVAL B"); |
|
479 |
strSQL.Append(" ON B.PERSONCODEAPPROVAL = A.APPROVALPERSON"); |
|
480 |
strSQL.Append(" AND B.APPROVALCODE = A.APPROVALCODE"); |
|
481 |
strSQL.AppendFormat(" AND DATE(B.ORDERDATE) = STR_TO_DATE('{0}','%Y/%m/%d')", OrderDate.ToShortDateString()); |
|
482 |
strSQL.AppendFormat(" AND B.ORDERNO = {0} AND B.SEQNO != {1}", OrderNo, s_PrimartyRecord); |
|
483 |
strSQL.AppendFormat(" WHERE A.APPROVALCODE = {0}", ApprovalCode); |
|
484 |
strSQL.Append(" AND A.DEPARTMENTCODE = "); |
|
485 |
strSQL.Append(" (SELECT C.DEPARTMENTCODE"); |
|
486 |
strSQL.Append(" FROM PERSONINCHARGEMASTER C"); |
|
487 |
strSQL.AppendFormat(" WHERE C.PERSONCODE = {0})", PersonCode); |
|
488 |
strSQL.Append(" ORDER BY A.DISPLAYORDER"); |
|
489 |
|
|
490 |
ArrayList DataList = new ArrayList(); |
|
491 |
if (!ApprDB.ExecuteReader(strSQL.ToString(), ref DataList)) return false; |
|
492 |
if (DataList.Count == 0) return false; |
|
493 |
|
|
494 |
int NoCnt = DataList.Count; |
|
495 |
foreach (object[] DataRec in DataList) |
|
496 |
{ |
|
497 |
// 承認以外は対象にしない |
|
498 |
int StatData= CommonMotions.cnvInt(DataRec[4]); |
|
499 |
if (StatData != (int)CommonDefine.ApprovalStatus.Approval) continue; |
|
500 |
|
|
501 |
// 最終承認権限が設定されていれば承認済み |
|
502 |
int ApprovalAuthority = CommonMotions.cnvInt(DataRec[2]); |
|
503 |
if (ApprovalAuthority == 1) |
|
504 |
{ |
|
505 |
bApproval = true; |
|
506 |
break; |
|
507 |
} |
|
508 |
|
|
509 |
// 承認していればデータ件数からマイナス |
|
510 |
--NoCnt; |
|
511 |
} |
|
512 |
// マスタに設定されている承認者全員が承認していれば承認 |
|
513 |
if (NoCnt == 0) bApproval = true; |
|
514 |
|
|
515 |
return bApproval; |
|
516 |
} |
|
517 |
catch (Exception ex) |
|
518 |
{ |
|
519 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
|
520 |
return false; |
|
521 |
} |
|
522 |
finally |
|
523 |
{ |
|
524 |
ApprDB.close(); ApprDB = null; |
|
525 |
mApprDB.close(); mApprDB = null; |
|
526 |
cbiDB.close(); cbiDB = null; |
|
527 |
} |
|
528 |
} |
|
529 |
#endregion |
|
530 |
|
|
531 |
#region ログインユーザーの承認者確認 |
|
532 |
/// <summary> |
|
533 |
/// ログインユーザーは承認者かどうかを確認する |
|
534 |
/// </summary> |
|
535 |
/// <param name="ConstructionCode"></param> |
|
536 |
/// <param name="ApprovalCode"></param> |
|
537 |
/// <returns></returns> |
|
538 |
public static bool CheckUserForApprover(int ApprovalCode, int DepartmentCode) |
|
539 |
{ |
|
540 |
IOMApproval mApprDB = new IOMApproval(); |
|
541 |
try |
|
542 |
{ |
|
543 |
// システム管理者は全ての権限を持つ |
|
544 |
if (CommonMotions.LoginUserData.SecurityManagement == CommonDefine.AdminSecurityManagement) return true; |
|
545 |
|
|
546 |
bool bApproval = false; |
|
547 |
|
|
548 |
// 承認経路マスタを取得する |
|
549 |
string strMaster = mApprDB.CreatePrimarykeyString(ApprovalCode, DepartmentCode); |
|
550 |
List<ApprovalMaster> MasterList = new List<ApprovalMaster>(); |
|
551 |
if (!mApprDB.SelectAction(strMaster, ref MasterList)) |
|
552 |
{ |
|
553 |
logger.ErrorFormat("承認確認処理:{0}:承認経路マスタ取得エラー", CommonMotions.GetMethodName()); |
|
554 |
return false; |
|
555 |
} |
|
556 |
if (MasterList.Count == 0) return false; |
|
557 |
|
|
558 |
foreach (ApprovalMaster MasterRec in MasterList) |
|
559 |
{ |
|
560 |
// 承認者コードが違えば次レコードへ |
|
561 |
if (MasterRec.ApprovalPerson != CommonMotions.LoginUserData.PersonCode) continue; |
|
562 |
// 承認者の場合は処理終了 |
|
563 |
bApproval = true; |
|
564 |
break; |
|
565 |
} |
|
566 |
|
|
567 |
return bApproval; |
|
568 |
} |
|
569 |
catch (Exception ex) |
|
570 |
{ |
|
571 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
|
572 |
return false; |
|
573 |
} |
|
574 |
finally |
|
575 |
{ |
|
576 |
mApprDB.close(); mApprDB = null; |
|
577 |
} |
|
578 |
} |
|
579 |
#endregion |
|
580 |
|
|
581 |
#region 工事コードより現在管理担当部署コードを取得 |
|
582 |
/// <summary> |
|
583 |
/// 工事コードより現在管理担当部署コードを取得する |
|
584 |
/// </summary> |
|
585 |
/// <param name="PersonCode"></param> |
|
586 |
/// <returns></returns> |
|
587 |
public static int GetFromConstructionTheDepartment(int ConstructionCode) |
|
588 |
{ |
|
589 |
IOConstructionBaseInfo cbiDB = new IOConstructionBaseInfo(); |
|
590 |
IOMPersonInCharge picDB = new IOMPersonInCharge(); |
|
591 |
try |
|
592 |
{ |
|
593 |
// 工事基本情報取得 |
|
594 |
ConstructionBaseInfo baseRec = new ConstructionBaseInfo(); |
|
595 |
string strSQL = string.Format(" Where ConstructionCode = {0}", ConstructionCode); |
|
596 |
if (!cbiDB.SelectAction(strSQL, ref baseRec)) return 0; |
|
597 |
|
|
598 |
// 担当者取得 |
|
599 |
int CurrentPersonCode = 0; |
|
600 |
int iCode1 = CommonDefine.ProjectsStatus.First(x => x.Value.Equals("依頼受け中")).Key; |
|
601 |
int iCode2 = CommonDefine.ProjectsStatus.First(x => x.Value.Equals("見積提出")).Key; |
|
602 |
int iCode3 = CommonDefine.ProjectsStatus.First(x => x.Value.Equals("仮 受 注")).Key; |
|
603 |
if (baseRec.ConstructionStatusFlg == iCode1 || |
|
604 |
baseRec.ConstructionStatusFlg == iCode2 || |
|
605 |
baseRec.ConstructionStatusFlg == iCode3) |
|
606 |
{ |
|
607 |
CurrentPersonCode = baseRec.SalesPersonCode; |
|
608 |
} |
|
609 |
else |
|
610 |
{ |
|
611 |
CurrentPersonCode = baseRec.ConstructionPersonCode; |
|
612 |
} |
|
613 |
|
|
614 |
// 工事部署取得 |
|
615 |
PersonInChargeMaster PersonRec = new PersonInChargeMaster(); |
|
616 |
string strPerson = picDB.CreatePrimarykeyString(CurrentPersonCode); |
|
617 |
if (!picDB.SelectAction(strPerson, ref PersonRec)) return 0; |
|
618 |
|
|
619 |
return PersonRec.DepartmentCode; |
|
620 |
} |
|
621 |
catch (Exception ex) |
|
622 |
{ |
|
623 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
|
624 |
return 0; |
|
625 |
} |
|
626 |
finally |
|
627 |
{ |
|
628 |
picDB.close(); picDB = null; |
|
629 |
cbiDB.close(); cbiDB = null; |
|
630 |
} |
|
631 |
|
|
632 |
} |
|
633 |
#endregion |
|
634 |
|
|
635 |
#region 工事コードと承認機能コードより現在管理担当部署コードを取得 |
|
636 |
/// <summary> |
|
637 |
/// 工事コードと承認機能コードより現在管理担当部署コードを取得する |
|
638 |
/// </summary> |
|
639 |
/// <returns></returns> |
|
640 |
public static int GetFromConstrAndAppTheDep(int ConstructionCode, int ApprovalCode, int OrderNo) |
|
641 |
{ |
|
642 |
IOMPersonInCharge picDB = new IOMPersonInCharge(); |
|
643 |
IOProcessApproval ApprovalDB = new IOProcessApproval(); |
|
644 |
try |
|
645 |
{ |
|
646 |
// 管理担当者コードを取得する |
|
647 |
string strSQL = ApprovalDB.CreatePrimarykeyString(ConstructionCode, ApprovalCode, OrderNo, s_PrimartyRecord); |
|
648 |
ProcessApproval ApprovalRec = new ProcessApproval(); |
|
649 |
int CurrentPersonCode = 0; |
|
650 |
if (ApprovalDB.SelectAction(strSQL, ref ApprovalRec)) |
|
651 |
{ // 申請データがある時はそのデータ |
|
652 |
CurrentPersonCode = ApprovalRec.PersonCode; |
|
653 |
} |
|
654 |
else |
|
655 |
{ |
|
656 |
// データが無い場合(申請時)はログインユーザー |
|
657 |
CurrentPersonCode = CommonMotions.LoginUserData.PersonCode; |
|
658 |
} |
|
659 |
|
|
660 |
// 担当者部署取得 |
|
661 |
PersonInChargeMaster PersonRec = new PersonInChargeMaster(); |
|
662 |
string strPerson = picDB.CreatePrimarykeyString(CurrentPersonCode); |
|
663 |
if (!picDB.SelectAction(strPerson, ref PersonRec)) return 0; |
|
664 |
|
|
665 |
return PersonRec.DepartmentCode; |
|
666 |
} |
|
667 |
catch (Exception ex) |
|
668 |
{ |
|
669 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
|
670 |
return 0; |
|
671 |
} |
|
672 |
finally |
|
673 |
{ |
|
674 |
ApprovalDB.close(); ApprovalDB = null; |
|
675 |
picDB.close(); picDB = null; |
|
676 |
} |
|
677 |
} |
|
678 |
#endregion |
|
679 |
|
|
680 |
#region 担当者コードと承認機能コードより現在管理担当部署コードを取得 |
|
681 |
/// <summary> |
|
682 |
/// 担当者コードと承認機能コードより現在管理担当部署コードを取得する |
|
683 |
/// </summary> |
|
684 |
/// <returns></returns> |
|
685 |
public static int GetFromPersonAndApprovalTheDepartment(int PersonCode, int ApprovalCode, DateTime OrderDate, int OrderNo) |
|
686 |
{ |
|
687 |
IOMPersonInCharge picDB = new IOMPersonInCharge(); |
|
688 |
IOPersonApproval ApprovalDB = new IOPersonApproval(); |
|
689 |
try |
|
690 |
{ |
|
691 |
// 管理担当者コードを取得する |
|
692 |
string strSQL = ApprovalDB.CreatePrimarykeyString(PersonCode, ApprovalCode, OrderDate, OrderNo, s_PrimartyRecord); |
|
693 |
PersonApproval ApprovalRec = new PersonApproval(); |
|
694 |
int CurrentPersonCode = 0; |
|
695 |
if (ApprovalDB.SelectAction(strSQL, ref ApprovalRec)) |
|
696 |
{ // 申請データがある時はそのデータ |
|
697 |
CurrentPersonCode = ApprovalRec.PersonCode; |
|
698 |
} |
|
699 |
else |
|
700 |
{ |
|
701 |
// データが無い場合(申請時)は申請ユーザー |
|
702 |
CurrentPersonCode = PersonCode; |
|
703 |
} |
|
704 |
|
|
705 |
// 担当者部署取得 |
|
706 |
PersonInChargeMaster PersonRec = new PersonInChargeMaster(); |
|
707 |
string strPerson = picDB.CreatePrimarykeyString(CurrentPersonCode); |
|
708 |
if (!picDB.SelectAction(strPerson, ref PersonRec)) return 0; |
|
709 |
|
|
710 |
return PersonRec.DepartmentCode; |
|
711 |
} |
|
712 |
catch (Exception ex) |
|
713 |
{ |
|
714 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
|
715 |
return 0; |
|
716 |
} |
|
717 |
finally |
|
718 |
{ |
|
719 |
ApprovalDB.close(); ApprovalDB = null; |
|
720 |
picDB.close(); picDB = null; |
|
721 |
} |
|
722 |
} |
|
723 |
#endregion |
|
724 |
|
|
725 |
#region 工事コードと承認機能コードより現在管理担当者コードを取得 |
|
726 |
/// <summary> |
|
727 |
/// 工事コードと承認機能コードより現在管理担当者コードを取得する |
|
728 |
/// </summary> |
|
729 |
/// <returns></returns> |
|
730 |
public static int GetFromConstructionAndApprovalThePerson(int ConstructionCode, int ApprovalCode) |
|
731 |
{ |
|
732 |
IOConstructionBaseInfo cbiDB = new IOConstructionBaseInfo(); |
|
733 |
try |
|
734 |
{ |
|
735 |
// 工事基本情報取得 |
|
736 |
ConstructionBaseInfo baseRec = new ConstructionBaseInfo(); |
|
737 |
string strSQL = string.Format(" Where ConstructionCode = {0}", ConstructionCode); |
|
738 |
if (!cbiDB.SelectAction(strSQL, ref baseRec)) return 0; |
|
739 |
|
|
740 |
// 承認機能コードにより取得する担当者コードを取得する |
|
741 |
string AppString = ClsExcute.AppovalList[ApprovalCode]; |
|
742 |
int CurrentPersonCode = 0; |
|
743 |
if (AppString.Equals("積算見積書承認")) |
|
744 |
{ |
|
745 |
CurrentPersonCode = baseRec.SalesPersonCode; |
|
746 |
} |
|
747 |
else if (AppString.Equals("積算予算書承認")) |
|
748 |
{ |
|
749 |
CurrentPersonCode = baseRec.SalesPersonCode; |
|
750 |
} |
|
751 |
else if (AppString.Equals("工事予算書承認")) |
|
752 |
{ |
|
753 |
CurrentPersonCode = baseRec.ConstructionPersonCode; |
|
754 |
} |
|
755 |
else if (AppString.Equals("注文書承認")) |
|
756 |
{ |
|
757 |
CurrentPersonCode = baseRec.ConstructionPersonCode; |
|
758 |
} |
|
759 |
else if (AppString.Equals("継続案件承認")) |
|
760 |
{ |
|
761 |
CurrentPersonCode = baseRec.ConstructionPersonCode; |
|
762 |
} |
|
763 |
else if (AppString.Equals("請求承認")) |
|
764 |
{ |
|
765 |
CurrentPersonCode = baseRec.ConstructionPersonCode; |
|
766 |
} |
|
767 |
else if (AppString.Equals("工事日報承認")) |
|
768 |
{ |
|
769 |
CurrentPersonCode = baseRec.ConstructionPersonCode; |
|
770 |
} |
|
771 |
else if (AppString.Equals("議事録承認")) |
|
772 |
{ |
|
773 |
CurrentPersonCode = baseRec.ConstructionPersonCode; |
|
774 |
} |
|
775 |
else if (AppString.Equals("質疑承認")) |
|
776 |
{ |
|
777 |
CurrentPersonCode = baseRec.ConstructionPersonCode; |
|
778 |
} |
|
779 |
|
|
780 |
return CurrentPersonCode; |
|
781 |
} |
|
782 |
catch (Exception ex) |
|
783 |
{ |
|
784 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
|
785 |
return 0; |
|
786 |
} |
|
787 |
finally |
|
788 |
{ |
|
789 |
cbiDB.close(); cbiDB = null; |
|
790 |
} |
|
791 |
} |
|
792 |
#endregion |
|
793 |
|
|
794 |
#region 承認数取得(工事承認) |
|
795 |
/// <summary> |
|
796 |
/// 該当工事より承認数取得する |
|
797 |
/// </summary> |
|
798 |
/// <returns></returns> |
|
799 |
public static int GetProcessApprovalDataCount(int ConstructionCode, int ApprovalCode, int ApprovalCount) |
|
800 |
{ |
|
801 |
IOProcessApproval paDB = new IOProcessApproval(); |
|
802 |
try |
|
803 |
{ |
|
804 |
// 承認データ取得 |
|
805 |
string strSQL = paDB.CreatePrimarykeyString(ConstructionCode, ApprovalCode, ApprovalCount); |
|
806 |
strSQL += string.Format(" And SeqNo != {0} And ApprovalStatus = {1}", s_PrimartyRecord, (int)CommonDefine.ApprovalStatus.Approval); |
|
807 |
List<ProcessApproval> ApprovalList = new List<ProcessApproval>(); |
|
808 |
if (!paDB.SelectAction(strSQL, ref ApprovalList)) return 0; |
|
809 |
|
|
810 |
return ApprovalList.Count; |
|
811 |
} |
|
812 |
catch (Exception ex) |
|
813 |
{ |
|
814 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
|
815 |
return 0; |
|
816 |
} |
|
817 |
finally |
|
818 |
{ |
|
819 |
paDB.close(); paDB = null; |
|
820 |
} |
|
821 |
} |
|
822 |
#endregion |
|
823 |
|
|
824 |
#region 承認数取得(担当者承認) |
|
825 |
/// <summary> |
|
826 |
/// 担当者申請より承認数取得する |
|
827 |
/// </summary> |
|
828 |
/// <returns></returns> |
|
829 |
public static int GetPersonApprovalDataCount(int PersonCode, int ApprovalCode, DateTime ApprovalDate) |
|
830 |
{ |
|
831 |
IOPersonApproval paDB = new IOPersonApproval(); |
|
832 |
try |
|
833 |
{ |
|
834 |
// 承認データ取得 |
|
835 |
string strSQL = paDB.CreatePrimarykeyString(PersonCode, ApprovalCode, ApprovalDate); |
|
836 |
strSQL += string.Format(" And SeqNo != {0} And ApprovalStatus = {1}", s_PrimartyRecord, (int)CommonDefine.ApprovalStatus.Approval); |
|
837 |
List<PersonApproval> ApprovalList = new List<PersonApproval>(); |
|
838 |
if (!paDB.SelectAction(strSQL, ref ApprovalList)) return 0; |
|
839 |
|
|
840 |
return ApprovalList.Count; |
|
841 |
} |
|
842 |
catch (Exception ex) |
|
843 |
{ |
|
844 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
|
845 |
return 0; |
|
846 |
} |
|
847 |
finally |
|
848 |
{ |
|
849 |
paDB.close(); paDB = null; |
|
850 |
} |
|
851 |
} |
|
852 |
#endregion |
|
853 |
|
|
854 |
#region 承認経路数を取得する |
|
855 |
/// <summary> |
|
856 |
/// 承認マスタより承認経路数を取得する |
|
857 |
/// </summary> |
|
858 |
/// <param name="ApprovalCode"></param> |
|
859 |
/// <param name="DepartmentCode"></param> |
|
860 |
/// <returns></returns> |
|
861 |
public static int GetApprovalMasterCount(int ApprovalCode, int DepartmentCode) |
|
862 |
{ |
|
863 |
IOMApproval mpaDB = new IOMApproval(); |
|
864 |
try |
|
865 |
{ |
|
866 |
// 承認経路マスタ取得 |
|
867 |
string strMSQL = mpaDB.CreatePrimarykeyString(ApprovalCode, DepartmentCode); |
|
868 |
List<ApprovalMaster> MasterList = new List<ApprovalMaster>(); |
|
869 |
if (!mpaDB.SelectAction(strMSQL, ref MasterList)) return 0; |
|
870 |
|
|
871 |
// 初期値セット |
|
872 |
return MasterList.Count; |
|
873 |
} |
|
874 |
catch (Exception ex) |
|
875 |
{ |
|
876 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
|
877 |
return 0; |
|
878 |
} |
|
879 |
finally |
|
880 |
{ |
|
881 |
mpaDB.close(); mpaDB = null; |
|
882 |
} |
|
883 |
} |
|
884 |
#endregion |
|
885 |
|
|
886 |
#region 承認画面の起動を確認する |
|
887 |
/// <summary> |
|
888 |
/// 承認画面が起動しているかを確認する |
|
889 |
/// </summary> |
|
890 |
/// <returns></returns> |
|
891 |
public static bool ExceApprovalScreen(int ApprovalNo = (int)ClsExcute.SubFormExecuteNo.ApprovalScreen) |
|
892 |
{ |
|
893 |
try |
|
894 |
{ |
|
895 |
bool bRet = false; |
|
896 |
// 承認画面からの画面遷移は1画面(対象画面)のみになったのですぐ前にあるはず |
|
897 |
for (int i = ClsExcute.GetNowProcessPoint() - 1; 0 <= i; i--) |
|
898 |
{ |
|
899 |
if (ClsExcute.ProcControlPara[i].ProcNo == ApprovalNo) |
|
900 |
{ |
|
901 |
bRet = true; |
|
902 |
break; |
|
903 |
} |
|
904 |
} |
|
905 |
|
|
906 |
return bRet; |
|
907 |
} |
|
908 |
catch (Exception ex) |
|
909 |
{ |
|
910 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
|
911 |
return false; |
|
912 |
} |
|
913 |
} |
|
914 |
#endregion |
|
915 |
} |
|
916 |
} |
branches/src/ProcessManagement/ProcessManagement/Common/Process/ClsCommonApproval.cs | ||
---|---|---|
1 |
using System; |
|
2 |
using System.Collections.Generic; |
|
3 |
using System.ComponentModel; |
|
4 |
using System.Diagnostics; |
|
5 |
using System.Data; |
|
6 |
using System.Drawing; |
|
7 |
using System.Text; |
|
8 |
using System.Windows.Forms; |
|
9 |
using System.Collections; |
|
10 |
using System.Linq; |
|
11 |
using System.Threading.Tasks; |
|
12 |
|
|
13 |
using log4net; |
|
14 |
using log4net.Appender; |
|
15 |
using log4net.Repository.Hierarchy; |
|
16 |
|
|
17 |
using ProcessManagement.Common; |
|
18 |
using ProcessManagement.DB.IOAccess; |
|
19 |
using ProcessManagement.DataModel; |
|
20 |
using ProcessManagement.Forms.ControlsAction; |
|
21 |
using ProcessManagement.Forms.CustomControls; |
|
22 |
|
|
23 |
namespace ProcessManagement.Common |
|
24 |
{ |
|
25 |
/// <summary> |
|
26 |
/// 申請・承認共通クラス |
|
27 |
/// </summary> |
|
28 |
public static class ClsCommonApproval |
|
29 |
{ |
|
30 |
#region 使用定義 |
|
31 |
//log4netログを使用する |
|
32 |
private static readonly log4net.ILog logger = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); |
|
33 |
#endregion |
|
34 |
|
|
35 |
#region 定数 |
|
36 |
|
|
37 |
#region 申請レコード番号 |
|
38 |
/// <summary> |
|
39 |
/// 申請レコード枝番 |
|
40 |
/// </summary> |
|
41 |
private const int s_PrimartyRecord = 1; |
|
42 |
#endregion |
|
43 |
|
|
44 |
#region 承認マスタ・データ一括取得読込順(工事承認) |
|
45 |
/// <summary> |
|
46 |
/// 承認マスタ・データ一括取得読込順(工事承認) |
|
47 |
/// </summary> |
|
48 |
private enum AppRoteNo |
|
49 |
{ |
|
50 |
/// <summary> |
|
51 |
/// 0:マスタ承認番号 |
|
52 |
/// </summary> |
|
53 |
ApprovalCode = 0, |
|
54 |
/// <summary> |
|
55 |
/// 1:マスタ部署コード |
|
56 |
/// </summary> |
|
57 |
DepartmentCode, |
|
58 |
/// <summary> |
|
59 |
/// 2:マスタSEQNO |
|
60 |
/// </summary> |
|
61 |
SeqNo, |
|
62 |
/// <summary> |
|
63 |
/// 3:マスタ承認順序 |
|
64 |
/// </summary> |
|
65 |
DisplayOrder, |
|
66 |
/// <summary> |
|
67 |
/// 4:マスタ承認者コード |
|
68 |
/// </summary> |
|
69 |
ApprovalPerson, |
|
70 |
/// <summary> |
|
71 |
/// 5:マスタ最終承認者フラグ |
|
72 |
/// </summary> |
|
73 |
ApprovalAuthority, |
|
74 |
/// <summary> |
|
75 |
/// 6:データ工事コード |
|
76 |
/// </summary> |
|
77 |
ConstructionCode, |
|
78 |
/// <summary> |
|
79 |
/// 7:データ承認回数 |
|
80 |
/// </summary> |
|
81 |
OrderNo, |
|
82 |
/// <summary> |
|
83 |
/// 8:データ承認者コード |
|
84 |
/// </summary> |
|
85 |
PersonCode, |
|
86 |
/// <summary> |
|
87 |
/// 9:データ承認者状態 |
|
88 |
/// </summary> |
|
89 |
ApprovalStatus, |
|
90 |
} |
|
91 |
#endregion |
|
92 |
|
|
93 |
#region 承認マスタ・データ一括取得処理SQL(工事承認) |
|
94 |
/// <summary> |
|
95 |
/// 承認マスタ・データ一括取得処理SQL(工事承認) |
|
96 |
/// </summary> |
|
97 |
private static string[] s_SQLAppRote = new string[] { "Select", |
|
98 |
" A.ApprovalCode", |
|
99 |
", A.DepartmentCode", |
|
100 |
", A.SeqNo", |
|
101 |
", A.DisplayOrder", |
|
102 |
", A.ApprovalPerson", |
|
103 |
", A.ApprovalAuthority", |
|
104 |
", B.ConstructionCode", |
|
105 |
", B.OrderNo", |
|
106 |
", B.PersonCode", |
|
107 |
", B.ApprovalStatus", |
|
108 |
" From", |
|
109 |
|
|
110 |
" processapproval As P", |
|
111 |
|
|
112 |
" Inner Join(Select", |
|
113 |
" H.PersonCode", |
|
114 |
" , H.StartDate", |
|
115 |
string.Format(" , Case When DATE (H.CompDate) = DATE('{0}')",DateTime.MinValue.ToShortDateString()), |
|
116 |
string.Format(" Then DATE ('{0}')", DateTime.MaxValue.ToShortDateString()), |
|
117 |
" Else DATE(H.CompDate) End As CompDate", |
|
118 |
" , H.DepartmentCode", |
|
119 |
" , H.DepartmentName", |
|
120 |
" From ChgChargeDep As H) As ChgMan", |
|
121 |
" On ChgMan.PersonCode = P.PersonCode", |
|
122 |
" And(DATE(ChgMan.StartDate) <= DATE(P.PetitionApprovalDate)", |
|
123 |
" And DATE(P.PetitionApprovalDate) <= DATE(ChgMan.CompDate))", |
|
124 |
|
|
125 |
" Inner Join approvalmaster As A", |
|
126 |
" On A.ApprovalCode = P.ApprovalCode", |
|
127 |
" And A.DepartmentCode = ChgMan.DepartmentCode", |
|
128 |
|
|
129 |
" Left Join processapproval As B", |
|
130 |
" On B.ConstructionCode = P.ConstructionCode", |
|
131 |
" And B.ApprovalCode = P.ApprovalCode", |
|
132 |
" And B.OrderNo = P.OrderNo", |
|
133 |
" And B.PersonCode = A.ApprovalPerson", |
|
134 |
" And B.SeqNo > 1", |
|
135 |
|
|
136 |
" Where P.ConstructionCode = {0}", // 34 |
|
137 |
" And P.ApprovalCode = {0}", // 35 |
|
138 |
" And P.OrderNo = {0}", // 36 |
|
139 |
" And P.SeqNo = {0}", // 37 |
|
140 |
" Order by A.DisplayOrder desc" }; |
|
141 |
#endregion |
|
142 |
|
|
143 |
#endregion |
|
144 |
|
|
145 |
#region 承認申請・承認をする(工事承認) |
|
146 |
/// <summary> |
|
147 |
/// 案件の承認申請・承認をする(工事承認) |
|
148 |
/// </summary> |
|
149 |
/// <returns>成功:true 失敗:false</returns> |
|
150 |
public static bool CreatePetitionApproval(ProcessApproval Rec) |
|
151 |
{ |
|
152 |
IOProcessApproval ApprDB = new IOProcessApproval(); |
|
153 |
try |
|
154 |
{ |
|
155 |
string strSQL = ApprDB.CreatePrimarykeyString(Rec.ConstructionCode, Rec.ApprovalCode, Rec.OrderNo, Rec.SeqNo); |
|
156 |
List<ProcessApproval> DataList = new List<ProcessApproval>(); |
|
157 |
// データがあるかをチェックする |
|
158 |
if (!ApprDB.SelectAction(strSQL, ref DataList)) return false; |
|
159 |
|
|
160 |
// データ追加時 |
|
161 |
if (DataList.Count == 0) |
|
162 |
{ |
|
163 |
if (!ApprDB.InsertAction(Rec)) return false; |
|
164 |
return true; |
|
165 |
} |
|
166 |
|
|
167 |
// データ更新時 |
|
168 |
if (!ApprDB.UpdateAction(strSQL, Rec)) return false; |
|
169 |
|
|
170 |
return true; |
|
171 |
} |
|
172 |
catch (Exception ex) |
|
173 |
{ |
|
174 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
|
175 |
return false; |
|
176 |
} |
|
177 |
finally |
|
178 |
{ |
|
179 |
ApprDB.close(); ApprDB = null; |
|
180 |
} |
|
181 |
} |
|
182 |
#endregion |
|
183 |
|
|
184 |
#region 承認申請・承認をする(担当者承認) |
|
185 |
/// <summary> |
|
186 |
/// 案件の承認申請・承認をする(担当者承認) |
|
187 |
/// </summary> |
|
188 |
/// <returns>成功:true 失敗:false</returns> |
|
189 |
public static bool CreatePetitionApproval(PersonApproval Rec) |
|
190 |
{ |
|
191 |
IOPersonApproval ApprDB = new IOPersonApproval(); |
|
192 |
try |
|
193 |
{ |
|
194 |
string strSQL = ApprDB.CreatePrimarykeyString(Rec.PersonCode, Rec.ApprovalCode, Rec.OrderDate, Rec.OrderNo, Rec.SeqNo); |
|
195 |
List<PersonApproval> DataList = new List<PersonApproval>(); |
|
196 |
// データがあるかをチェックする |
|
197 |
if (!ApprDB.SelectAction(strSQL, ref DataList)) return false; |
|
198 |
|
|
199 |
if (DataList.Count == 0) |
|
200 |
{ // データ追加時 |
|
201 |
if (!ApprDB.InsertAction(Rec)) return false; |
|
202 |
} |
|
203 |
else |
|
204 |
{ // データ更新時 |
|
205 |
if (!ApprDB.UpdateAction(strSQL, Rec)) return false; |
|
206 |
} |
|
207 |
|
|
208 |
return true; |
|
209 |
} |
|
210 |
catch (Exception ex) |
|
211 |
{ |
|
212 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
|
213 |
return false; |
|
214 |
} |
|
215 |
finally |
|
216 |
{ |
|
217 |
ApprDB.close(); ApprDB = null; |
|
218 |
} |
|
219 |
} |
|
220 |
#endregion |
|
221 |
|
|
222 |
#region 申請レコード更新(工事承認) |
|
223 |
/// <summary> |
|
224 |
/// 申請レコードを更新する(工事承認) |
|
225 |
/// </summary> |
|
226 |
/// <param name="ConstructionCode"></param> |
|
227 |
/// <param name="ApprovalCode"></param> |
|
228 |
/// <param name="Status"></param> |
|
229 |
/// <returns></returns> |
|
230 |
public static bool SetPrimaryRecStatus(int ConstructionCode, int ApprovalCode, int OrderNO, int Status) |
|
231 |
{ |
|
232 |
IOProcessApproval ApprDB = new IOProcessApproval(); |
|
233 |
try |
|
234 |
{ |
|
235 |
if (!ApprDB.UpdateFeild(ConstructionCode, |
|
236 |
(int)IOProcessApproval.ColumnName.ApprovalStatus, |
|
237 |
Status, |
|
238 |
true, |
|
239 |
ApprovalCode, |
|
240 |
OrderNO, |
|
241 |
s_PrimartyRecord)) return false; |
|
242 |
|
|
243 |
return true; |
|
244 |
} |
|
245 |
catch (Exception ex) |
|
246 |
{ |
|
247 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
|
248 |
return false; |
|
249 |
} |
|
250 |
finally |
|
251 |
{ |
|
252 |
ApprDB.close(); ApprDB = null; |
|
253 |
} |
|
254 |
} |
|
255 |
#endregion |
|
256 |
|
|
257 |
#region 申請レコード更新(担当者承認) |
|
258 |
/// <summary> |
|
259 |
/// 申請レコードを更新する(担当者承認) |
|
260 |
/// </summary> |
|
261 |
/// <param name="PersonCode"></param> |
|
262 |
/// <param name="ApprovalCode"></param> |
|
263 |
/// <param name="Status"></param> |
|
264 |
/// <returns></returns> |
|
265 |
public static bool SetPrimaryRecStatus(int PersonCode, int ApprovalCode, DateTime OrderDate, int OrderNo, int Status) |
|
266 |
{ |
|
267 |
IOPersonApproval ApprDB = new IOPersonApproval(); |
|
268 |
try |
|
269 |
{ |
|
270 |
if (!ApprDB.UpdateFeild(PersonCode, |
|
271 |
ApprovalCode, |
|
272 |
OrderDate, |
|
273 |
(int)IOPersonApproval.ColumnName.ApprovalStatus, |
|
274 |
Status, |
|
275 |
true, |
|
276 |
OrderNo, |
|
277 |
s_PrimartyRecord)) return false; |
|
278 |
|
|
279 |
return true; |
|
280 |
} |
|
281 |
catch (Exception ex) |
|
282 |
{ |
|
283 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
|
284 |
return false; |
|
285 |
} |
|
286 |
finally |
|
287 |
{ |
|
288 |
ApprDB.close(); ApprDB = null; |
|
289 |
} |
|
290 |
} |
|
291 |
#endregion |
|
292 |
|
|
293 |
#region 申請確認(工事承認) |
|
294 |
/// <summary> |
|
295 |
/// 案件に対して申請がされているかを確認する |
|
296 |
/// </summary> |
|
297 |
/// <param name="ConstructionCode"></param> |
|
298 |
/// <param name="ApprovalCode"></param> |
|
299 |
/// <returns></returns> |
|
300 |
public static bool CheckProcessPetition(int ConstructionCode, int ApprovalCode, int OrderNo) |
|
301 |
{ |
|
302 |
IOProcessApproval ApprDB = new IOProcessApproval(); |
|
303 |
try |
|
304 |
{ |
|
305 |
bool bPetition = false; |
|
306 |
// 申請データ取得 |
|
307 |
string strSQL = ApprDB.CreatePrimarykeyString(ConstructionCode, ApprovalCode, OrderNo, s_PrimartyRecord); |
|
308 |
List<ProcessApproval> PetitionList = new List<ProcessApproval>(); |
|
309 |
if (!ApprDB.SelectAction(strSQL, ref PetitionList)) return bPetition; |
|
310 |
// 申請データが無い場合 |
|
311 |
if (PetitionList.Count != 0) bPetition = true; |
|
312 |
|
|
313 |
return bPetition; |
|
314 |
} |
|
315 |
catch (Exception ex) |
|
316 |
{ |
|
317 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
|
318 |
return false; |
|
319 |
} |
|
320 |
finally |
|
321 |
{ |
|
322 |
ApprDB.close(); ApprDB = null; |
|
323 |
} |
|
324 |
} |
|
325 |
#endregion |
|
326 |
|
|
327 |
#region 申請確認(担当者承認) |
|
328 |
/// <summary> |
|
329 |
/// 担当者申請がされているかを確認する |
|
330 |
/// </summary> |
|
331 |
/// <param name="PersonCode"></param> |
|
332 |
/// <param name="ApprovalCode"></param> |
|
333 |
/// <returns></returns> |
|
334 |
public static bool CheckPersonPetition(int PersonCode, int ApprovalCode, DateTime ApprovalDate, int OrderNo) |
|
335 |
{ |
|
336 |
IOPersonApproval ApprDB = new IOPersonApproval(); |
|
337 |
try |
|
338 |
{ |
|
339 |
bool bPetition = false; |
|
340 |
// 申請データ取得 |
|
341 |
StringBuilder strSQL = new StringBuilder(); |
|
342 |
strSQL.Append(ApprDB.CreatePrimarykeyString(PersonCode, ApprovalCode, ApprovalDate, OrderNo)); |
|
343 |
List<PersonApproval> PetitionList = new List<PersonApproval>(); |
|
344 |
if (!ApprDB.SelectAction(strSQL.ToString(), ref PetitionList)) return bPetition; |
|
345 |
// 申請データが無い場合 |
|
346 |
if (PetitionList.Count != 0) bPetition = true; |
|
347 |
|
|
348 |
return bPetition; |
|
349 |
} |
|
350 |
catch (Exception ex) |
|
351 |
{ |
|
352 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
|
353 |
return false; |
|
354 |
} |
|
355 |
finally |
|
356 |
{ |
|
357 |
ApprDB.close(); ApprDB = null; |
|
358 |
} |
|
359 |
} |
|
360 |
public static bool CheckPersonPetition2(int PersonCode, int ApprovalCode, DateTime ApprovalDate, int OrderNo) |
|
361 |
{ |
|
362 |
IOPersonApproval ApprDB = new IOPersonApproval(); |
|
363 |
try |
|
364 |
{ |
|
365 |
bool bPetition = false; |
|
366 |
// 申請データ取得 |
|
367 |
StringBuilder strSQL = new StringBuilder(); |
|
368 |
strSQL.AppendFormat(" Where PersonCode = {0}", PersonCode); |
|
369 |
strSQL.AppendFormat(" And ApprovalCode = {0}", ApprovalCode); |
|
370 |
strSQL.AppendFormat(" And DATE(EntryDate) = DATE(STR_TO_DATE('{0}','%Y/%m/%d'))", ApprovalDate.ToShortDateString()); |
|
371 |
strSQL.AppendFormat(" And OrderNo = {0}", OrderNo); |
|
372 |
List<PersonApproval> PetitionList = new List<PersonApproval>(); |
|
373 |
if (!ApprDB.SelectAction(strSQL.ToString(), ref PetitionList)) return bPetition; |
|
374 |
// 申請データが無い場合 |
|
375 |
if (PetitionList.Count != 0) bPetition = true; |
|
376 |
|
|
377 |
return bPetition; |
|
378 |
} |
|
379 |
catch (Exception ex) |
|
380 |
{ |
|
381 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
|
382 |
return false; |
|
383 |
} |
|
384 |
finally |
|
385 |
{ |
|
386 |
ApprDB.close(); ApprDB = null; |
|
387 |
} |
|
388 |
} |
|
389 |
#endregion |
|
390 |
|
|
391 |
#region 最終承認確認(工事承認) |
|
392 |
/// <summary> |
|
393 |
/// 最終承認確認(工事承認) |
|
394 |
/// </summary> |
|
395 |
/// <param name="ConstructionCode"></param> |
|
396 |
/// <param name="ApprovalCode"></param> |
|
397 |
/// <returns></returns> |
|
398 |
public static bool CheckProcessApproval(int ConstructionCode, int ApprovalCode, int Approvalcount) |
|
399 |
{ |
|
400 |
IOMApproval mApprDB = new IOMApproval(); |
|
401 |
IOProcessApproval ApprDB = new IOProcessApproval(); |
|
402 |
try |
|
403 |
{ |
|
404 |
// 承認データを取得する(申請データを除く) |
|
405 |
string strData = ApprDB.CreatePrimarykeyString(ConstructionCode, ApprovalCode, Approvalcount, s_PrimartyRecord); |
|
406 |
ProcessApproval DataRec = new ProcessApproval(); |
|
407 |
if (!ApprDB.SelectAction(strData, ref DataRec)) return false; |
|
408 |
|
|
409 |
if (DataRec.ApprovalStatus != (int)CommonDefine.ApprovalStatus.Approval) return false; |
|
410 |
|
|
411 |
return true; |
|
412 |
} |
|
413 |
catch (Exception ex) |
|
414 |
{ |
|
415 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
|
416 |
return false; |
|
417 |
} |
|
418 |
finally |
|
419 |
{ |
|
420 |
ApprDB.close(); ApprDB = null; |
|
421 |
mApprDB.close(); mApprDB = null; |
|
422 |
} |
|
423 |
} |
|
424 |
#endregion |
|
425 |
|
|
426 |
#region 最終承認確認(担当者承認) |
|
427 |
/// <summary> |
|
428 |
/// 担当者申請に対して承認がされているかを確認する |
|
429 |
/// </summary> |
|
430 |
/// <param name="PersonCode"></param> |
|
431 |
/// <param name="ApprovalCode"></param> |
|
432 |
/// <returns></returns> |
|
433 |
public static bool CheckPersonApproval(int PersonCode, int ApprovalCode, DateTime OrderDate, int OrderNo) |
|
434 |
{ |
|
435 |
IOPersonApproval ApprDB = new IOPersonApproval(); |
|
436 |
try |
|
437 |
{ |
|
438 |
// 承認データを取得する(申請データを除く) |
|
439 |
string strData = ApprDB.CreatePrimarykeyString(PersonCode, ApprovalCode, OrderDate, OrderNo, s_PrimartyRecord); |
|
440 |
PersonApproval DataRec = new PersonApproval(); |
|
441 |
if (!ApprDB.SelectAction(strData, ref DataRec)) return false; |
|
442 |
|
|
443 |
if (DataRec.ApprovalStatus != (int)CommonDefine.ApprovalStatus.Approval) return false; |
|
444 |
|
|
445 |
return true; |
|
446 |
} |
|
447 |
catch (Exception ex) |
|
448 |
{ |
|
449 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
|
450 |
return false; |
|
451 |
} |
|
452 |
finally |
|
453 |
{ |
|
454 |
ApprDB.close(); ApprDB = null; |
|
455 |
} |
|
456 |
} |
|
457 |
#endregion |
|
458 |
|
|
459 |
#region 承認確認(工事承認) |
|
460 |
/// <summary> |
|
461 |
/// 工事案件に対して最終承認がされているかを確認する |
|
462 |
/// </summary> |
|
463 |
/// <param name="ConstructionCode"></param> |
|
464 |
/// <param name="ApprovalCode"></param> |
|
465 |
/// <returns></returns> |
|
466 |
public static bool CheckProcessApprovalData(int ConstructionCode, int ApprovalCode, int OrderNo) |
|
467 |
{ |
|
468 |
IOConstructionBaseInfo cbiDB = new IOConstructionBaseInfo(); |
|
469 |
IOMApproval mApprDB = new IOMApproval(); |
|
470 |
IOProcessApproval ApprDB = new IOProcessApproval(); |
|
471 |
try |
|
472 |
{ |
|
473 |
bool bApproval = false; |
|
474 |
// 申請部署の取得 |
|
475 |
string strSQL = cbiDB.CreatePrimarykeyString(ConstructionCode); |
|
476 |
ConstructionBaseInfo cbiData = new ConstructionBaseInfo(); |
|
477 |
if (!cbiDB.SelectAction(strSQL, ref cbiData)) return false; |
|
478 |
int DepartmentCode = GetFromConstrAndAppTheDep(ConstructionCode, ApprovalCode, OrderNo); |
|
479 |
|
|
480 |
// 承認経路マスタを取得する |
|
481 |
string strMaster = mApprDB.CreatePrimarykeyString(ApprovalCode, DepartmentCode); |
|
482 |
List<ApprovalMaster> MasterList = new List<ApprovalMaster>(); |
|
483 |
if (!mApprDB.SelectAction(strMaster, ref MasterList)) |
|
484 |
{ |
他の形式にエクスポート: Unified diff