リビジョン 371
工事詳細台帳一覧:表示行の計算を固定に変更
承認カラー定義をシステムカラー定義としてCommonDefineへ移動
請求主力DBトランザクションが効いていなかったため修正
請求取消画面コメント入力チェック追加
branches/src/ProcessManagement/ProcessManagement/Common/CommonDefine.cs | ||
---|---|---|
256 | 256 |
public static Color s_clrNormal = Color.White; |
257 | 257 |
#endregion |
258 | 258 |
|
259 |
#region システムカラーテーブル |
|
260 |
/// <summary> |
|
261 |
/// システムカラーテーブル |
|
262 |
/// </summary> |
|
263 |
public static Color[] DefineColorList = new Color[]{ |
|
264 |
Color.White, |
|
265 |
Color.RoyalBlue, |
|
266 |
Color.DarkOrange, |
|
267 |
Color.IndianRed, |
|
268 |
Color.Gray, |
|
269 |
Color.Chartreuse, |
|
270 |
Color.SteelBlue, |
|
271 |
Color.LightSeaGreen, |
|
272 |
Color.LawnGreen, |
|
273 |
Color.DarkViolet, |
|
274 |
Color.MediumVioletRed, |
|
275 |
Color.MediumSeaGreen, |
|
276 |
Color.Chocolate, |
|
277 |
Color.DarkGoldenrod, |
|
278 |
Color.OrangeRed, |
|
279 |
Color.DimGray, |
|
280 |
Color.LimeGreen, |
|
281 |
Color.Crimson, |
|
282 |
Color.Sienna, |
|
283 |
Color.OliveDrab, |
|
284 |
Color.DarkMagenta, |
|
285 |
Color.DarkCyan, |
|
286 |
Color.DarkSlateBlue, |
|
287 |
Color.SeaGreen, |
|
288 |
Color.Olive, |
|
289 |
Color.Teal, |
|
290 |
Color.Purple, |
|
291 |
Color.Blue, |
|
292 |
Color.Red, |
|
293 |
Color.Lime, |
|
294 |
Color.Brown, |
|
295 |
Color.Firebrick, |
|
296 |
Color.DarkOliveGreen, |
|
297 |
Color.SaddleBrown, |
|
298 |
Color.ForestGreen, |
|
299 |
Color.DarkSlateGray, |
|
300 |
Color.Indigo, |
|
301 |
Color.MediumBlue, |
|
302 |
Color.MidnightBlue, |
|
303 |
Color.DarkRed, |
|
304 |
Color.DarkBlue, |
|
305 |
Color.Green, |
|
306 |
Color.Navy, |
|
307 |
Color.Maroon, |
|
308 |
Color.DarkGreen, |
|
309 |
Color.Black |
|
310 |
}; |
|
311 |
|
|
312 |
#endregion |
|
313 |
|
|
259 | 314 |
#region 曜日文字 |
260 | 315 |
/// <summary> |
261 | 316 |
/// 曜日文字 |
branches/src/ProcessManagement/ProcessManagement/Common/CommonVersion.cs | ||
---|---|---|
14 | 14 |
/// <summary> |
15 | 15 |
/// 本体バージョン |
16 | 16 |
/// </summary> |
17 |
public static int s_SystemVersion = 228;
|
|
17 |
public static int s_SystemVersion = 229;
|
|
18 | 18 |
|
19 | 19 |
/// <summary> |
20 | 20 |
/// コピー・環境バージョン |
branches/src/ProcessManagement/ProcessManagement/Common/Process/ClsExcute.cs | ||
---|---|---|
376 | 376 |
|
377 | 377 |
#endregion |
378 | 378 |
|
379 |
#region 承認種別カラーテーブル |
|
380 |
/// <summary> |
|
381 |
/// 承認種別カラーテーブル(承認処理定義と同じ並び) |
|
382 |
/// </summary> |
|
383 |
#region 旧テーブル |
|
384 |
//public static Color[] ApprovalTypeColorList = new Color[]{ Color.White, |
|
385 |
// Color.RoyalBlue, |
|
386 |
// Color.DarkOrange, |
|
387 |
// Color.IndianRed, |
|
388 |
// Color.Gray, |
|
389 |
// Color.Chartreuse, |
|
390 |
// Color.SpringGreen, |
|
391 |
// Color.SlateGray, |
|
392 |
// Color.LightSeaGreen, |
|
393 |
// Color.SteelBlue, |
|
394 |
// Color.LawnGreen, |
|
395 |
// Color.DarkViolet, |
|
396 |
// Color.MediumVioletRed, |
|
397 |
// Color.MediumSeaGreen, |
|
398 |
// }; |
|
399 |
#endregion |
|
400 |
public static Color[] ApprovalTypeColorList = new Color[]{ |
|
401 |
Color.White, |
|
402 |
Color.RoyalBlue, |
|
403 |
Color.DarkOrange, |
|
404 |
Color.IndianRed, |
|
405 |
Color.Gray, |
|
406 |
Color.Chartreuse, |
|
407 |
Color.SteelBlue, |
|
408 |
Color.LightSeaGreen, |
|
409 |
Color.LawnGreen, |
|
410 |
Color.DarkViolet, |
|
411 |
Color.MediumVioletRed, |
|
412 |
Color.MediumSeaGreen, |
|
413 |
Color.Chocolate, |
|
414 |
Color.DarkGoldenrod, |
|
415 |
Color.OrangeRed, |
|
416 |
Color.DimGray, |
|
417 |
Color.LimeGreen, |
|
418 |
Color.Crimson, |
|
419 |
Color.Sienna, |
|
420 |
Color.OliveDrab, |
|
421 |
Color.DarkMagenta, |
|
422 |
Color.DarkCyan, |
|
423 |
Color.DarkSlateBlue, |
|
424 |
Color.SeaGreen, |
|
425 |
Color.Olive, |
|
426 |
Color.Teal, |
|
427 |
Color.Purple, |
|
428 |
Color.Blue, |
|
429 |
Color.Red, |
|
430 |
Color.Lime, |
|
431 |
Color.Brown, |
|
432 |
Color.Firebrick, |
|
433 |
Color.DarkOliveGreen, |
|
434 |
Color.SaddleBrown, |
|
435 |
Color.ForestGreen, |
|
436 |
Color.DarkSlateGray, |
|
437 |
Color.Indigo, |
|
438 |
Color.MediumBlue, |
|
439 |
Color.MidnightBlue, |
|
440 |
Color.DarkRed, |
|
441 |
Color.DarkBlue, |
|
442 |
Color.Green, |
|
443 |
Color.Navy, |
|
444 |
Color.Maroon, |
|
445 |
Color.DarkGreen, |
|
446 |
Color.Black |
|
447 |
}; |
|
448 |
|
|
449 |
#endregion |
|
450 |
|
|
451 | 379 |
#region 変数 |
452 | 380 |
/// <summary> |
453 | 381 |
/// 起動プロセス管理テーブル |
branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionLedgerList/FrmConstructionLedgerListAuxiliary.cs | ||
---|---|---|
1118 | 1118 |
{ |
1119 | 1119 |
foreach (DataGridViewColumn wrkCol in dgv.Columns) |
1120 | 1120 |
wrkCol.SortMode = DataGridViewColumnSortMode.NotSortable; |
1121 |
//// ?f?[?^??????????\?[?g????? |
|
1122 |
if (CommonDefine.s_MaxInitLineCount > dgv.RowCount) |
|
1123 |
//{ |
|
1124 |
// foreach (DataGridViewColumn wrkCol in dgv.Columns) |
|
1125 |
// wrkCol.SortMode = DataGridViewColumnSortMode.Automatic; |
|
1126 |
//} |
|
1127 |
//else |
|
1128 |
{ |
|
1129 |
dgv.RowCount += (CommonDefine.s_MaxInitLineCount - m_initDataCount); |
|
1130 |
} |
|
1121 |
// ?f?[?^??????????\?[?g????? |
|
1122 |
if (CommonDefine.s_MaxInitLineCount > dgv.RowCount) dgv.RowCount = CommonDefine.s_MaxInitLineCount; |
|
1131 | 1123 |
|
1132 | 1124 |
LedgerDB.close(); LedgerDB = null; |
1133 | 1125 |
SalaryDB.close(); SalaryDB = null; |
branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/RequestInput/FrmRequestInput.cs | ||
---|---|---|
392 | 392 |
{ |
393 | 393 |
if (m_bDirty) |
394 | 394 |
{ // ----- データ変更有時はデータ登録 |
395 |
DataEntryProcess();
|
|
395 |
if (!DataEntryProcess()) return;
|
|
396 | 396 |
} |
397 | 397 |
|
398 | 398 |
// ボタンの真上にメニューを表示する |
branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/RequestInput/FrmRequestInputAuxiliary.cs | ||
---|---|---|
3083 | 3083 |
ClearErrorIndicate(); |
3084 | 3084 |
|
3085 | 3085 |
// 登録確認メッセージ表示 |
3086 |
if (ShowMessageBox("表示中のデータを登録します。", "登録確認", MessageBoxButtons.YesNo, MessageBoxIcon.Question) != DialogResult.Yes) |
|
3086 |
if (ShowMessageBox("表示中のデータを登録します。" |
|
3087 |
, "登録確認" |
|
3088 |
, MessageBoxButtons.YesNo |
|
3089 |
, MessageBoxIcon.Question) != DialogResult.Yes) |
|
3087 | 3090 |
{ |
3088 | 3091 |
return false; |
3089 | 3092 |
} |
... | ... | |
3117 | 3120 |
IORequestData ioReqData = new IORequestData(); |
3118 | 3121 |
IORequestDataDetail ioReqDetail = new IORequestDataDetail(); |
3119 | 3122 |
IOConstructionLedgerExcute ioLdgExcute = new IOConstructionLedgerExcute(); |
3123 |
IOConstructionLedgerDetail ioLdgDetail = new IOConstructionLedgerDetail(); |
|
3120 | 3124 |
|
3121 |
ioReqHead.beginTran(); |
|
3122 |
ioReqData.beginTran(); |
|
3123 |
ioReqDetail.beginTran(); |
|
3124 |
ioLdgExcute.beginTran(); |
|
3125 |
ioReqHead.connect(); ioReqHead.beginTran(); |
|
3126 |
ioReqData.connect(); ioReqData.beginTran(); |
|
3127 |
ioReqDetail.connect(); ioReqDetail.beginTran(); |
|
3128 |
ioLdgExcute.connect(); ioLdgExcute.beginTran(); |
|
3129 |
ioLdgDetail.connect(); ioLdgDetail.beginTran(); |
|
3125 | 3130 |
|
3126 | 3131 |
RequestHead ReqHead = m_lstRequestHead[m_nMaxOrderNo - 1]; |
3127 | 3132 |
|
3133 |
bool bRet = true; |
|
3128 | 3134 |
try |
3129 | 3135 |
{ |
3130 | 3136 |
string sql; |
3131 | 3137 |
|
3132 | 3138 |
nRequestNo = ReqHead.RequestNo; |
3133 | 3139 |
|
3134 |
if (nRequestNo != 0) |
|
3140 |
// DB未登録の場合 |
|
3141 |
if (nRequestNo == 0) |
|
3135 | 3142 |
{ |
3143 |
// 請求Noを採番 |
|
3144 |
nRequestNo = ioReqHead.NumberingRequestNo(ReqHead.RequestMonth, false); |
|
3145 |
bAdd = true; |
|
3146 |
} |
|
3147 |
else |
|
3148 |
{ |
|
3136 | 3149 |
// 請求Noの要素である請求月を求める |
3137 | 3150 |
int nMonth = CommonMotions.cnvTruncate((double)nRequestNo / 1000); |
3138 | 3151 |
|
... | ... | |
3141 | 3154 |
{ |
3142 | 3155 |
// 当該受付回目の請求データ明細を削除 |
3143 | 3156 |
sql = ioReqDetail.CreatePrimarykeyString(nRequestNo); |
3144 |
if (ioReqDetail.DeleteAction(sql) == false) |
|
3157 |
if (ioReqDetail.DeleteAction(sql, false) == false)
|
|
3145 | 3158 |
{ |
3146 |
ioReqHead.rollback(); |
|
3147 |
ioReqData.rollback(); |
|
3148 |
ioReqDetail.rollback(); |
|
3149 |
ioLdgExcute.rollback(); |
|
3150 |
return false; |
|
3159 |
MessageBox.Show("請求明細データ削除エラー" |
|
3160 |
, "登録エラー" |
|
3161 |
, MessageBoxButtons.OK |
|
3162 |
, MessageBoxIcon.Error); |
|
3163 |
bRet = false; |
|
3164 |
return bRet; |
|
3151 | 3165 |
} |
3152 | 3166 |
|
3153 | 3167 |
// 当該受付回目の請求データを削除 |
3154 | 3168 |
sql = ioReqData.CreatePrimarykeyString(nRequestNo); |
3155 |
if (ioReqData.DeleteAction(sql) == false) |
|
3169 |
if (ioReqData.DeleteAction(sql, false) == false)
|
|
3156 | 3170 |
{ |
3157 |
ioReqHead.rollback(); |
|
3158 |
ioReqData.rollback(); |
|
3159 |
ioReqDetail.rollback(); |
|
3160 |
ioLdgExcute.rollback(); |
|
3161 |
return false; |
|
3171 |
MessageBox.Show("請求データ削除エラー" |
|
3172 |
, "登録エラー" |
|
3173 |
, MessageBoxButtons.OK |
|
3174 |
, MessageBoxIcon.Error); |
|
3175 |
bRet = false; |
|
3176 |
return bRet; |
|
3162 | 3177 |
} |
3163 | 3178 |
|
3164 | 3179 |
// 請求ヘッダを削除 |
3165 | 3180 |
sql = ioReqHead.CreatePrimarykeyString(nRequestNo); |
3166 |
if (ioReqHead.DeleteAction(sql) == false) |
|
3181 |
if (ioReqHead.DeleteAction(sql, false) == false)
|
|
3167 | 3182 |
{ |
3168 |
ioReqHead.rollback(); |
|
3169 |
ioReqData.rollback(); |
|
3170 |
ioReqDetail.rollback(); |
|
3171 |
ioLdgExcute.rollback(); |
|
3172 |
return false; |
|
3183 |
MessageBox.Show("請求ヘッダ削除エラー" |
|
3184 |
, "登録エラー" |
|
3185 |
, MessageBoxButtons.OK |
|
3186 |
, MessageBoxIcon.Error); |
|
3187 |
bRet = false; |
|
3188 |
return bRet; |
|
3173 | 3189 |
} |
3174 | 3190 |
|
3175 | 3191 |
nRequestNo = 0; |
3176 | 3192 |
} |
3177 | 3193 |
} |
3178 | 3194 |
|
3179 |
// DB未登録の場合 |
|
3180 |
if (nRequestNo == 0) |
|
3181 |
{ |
|
3182 |
// 請求Noを採番 |
|
3183 |
nRequestNo = ioReqHead.NumberingRequestNo(ReqHead.RequestMonth); |
|
3184 |
|
|
3185 |
bAdd = true; |
|
3186 |
} |
|
3187 |
|
|
3188 | 3195 |
// 更新の場合 |
3189 |
if (bAdd == false)
|
|
3196 |
if (!bAdd)
|
|
3190 | 3197 |
{ |
3191 | 3198 |
// 請求ヘッダの更新 |
3192 | 3199 |
sql = ioReqHead.CreatePrimarykeyString(nRequestNo); |
3193 |
if (ioReqHead.UpdateAction(sql, ReqHead) == false) |
|
3200 |
if (ioReqHead.UpdateAction(sql, ReqHead, false) == false)
|
|
3194 | 3201 |
{ |
3195 |
ioReqHead.rollback(); |
|
3196 |
ioReqData.rollback(); |
|
3197 |
ioReqDetail.rollback(); |
|
3198 |
ioLdgExcute.rollback(); |
|
3199 |
return false; |
|
3202 |
MessageBox.Show("請求ヘッダ更新エラー" |
|
3203 |
, "登録エラー" |
|
3204 |
, MessageBoxButtons.OK |
|
3205 |
, MessageBoxIcon.Error); |
|
3206 |
bRet = false; |
|
3207 |
return bRet; |
|
3200 | 3208 |
} |
3201 | 3209 |
|
3202 | 3210 |
// 当該受付回目の請求データ明細を削除 |
3203 | 3211 |
sql = ioReqDetail.CreatePrimarykeyString(nRequestNo); |
3204 |
if (ioReqDetail.DeleteAction(sql) == false) |
|
3212 |
if (ioReqDetail.DeleteAction(sql, false) == false)
|
|
3205 | 3213 |
{ |
3206 |
ioReqHead.rollback(); |
|
3207 |
ioReqData.rollback(); |
|
3208 |
ioReqDetail.rollback(); |
|
3209 |
ioLdgExcute.rollback(); |
|
3210 |
return false; |
|
3214 |
MessageBox.Show("請求明細データ更新エラー" |
|
3215 |
, "登録エラー" |
|
3216 |
, MessageBoxButtons.OK |
|
3217 |
, MessageBoxIcon.Error); |
|
3218 |
bRet = false; |
|
3219 |
return bRet; |
|
3211 | 3220 |
} |
3212 | 3221 |
|
3213 | 3222 |
// 当該受付回目の請求データを削除 |
3214 | 3223 |
sql = ioReqData.CreatePrimarykeyString(nRequestNo); |
3215 |
if (ioReqData.DeleteAction(sql) == false) |
|
3224 |
if (ioReqData.DeleteAction(sql, false) == false)
|
|
3216 | 3225 |
{ |
3217 |
ioReqHead.rollback(); |
|
3218 |
ioReqData.rollback(); |
|
3219 |
ioReqDetail.rollback(); |
|
3220 |
ioLdgExcute.rollback(); |
|
3221 |
return false; |
|
3226 |
MessageBox.Show("請求データ更新エラー" |
|
3227 |
, "登録エラー" |
|
3228 |
, MessageBoxButtons.OK |
|
3229 |
, MessageBoxIcon.Error); |
|
3230 |
bRet = false; |
|
3231 |
return bRet; |
|
3222 | 3232 |
} |
3223 | 3233 |
|
3224 | 3234 |
} |
... | ... | |
3226 | 3236 |
{ |
3227 | 3237 |
// 請求ヘッダの追加 |
3228 | 3238 |
ReqHead.RequestNo = nRequestNo; |
3229 |
if (ioReqHead.InsertAction(ReqHead) == false) |
|
3239 |
if (ioReqHead.InsertAction(ReqHead, false) == false)
|
|
3230 | 3240 |
{ |
3231 |
ioReqHead.rollback(); |
|
3232 |
ioReqData.rollback(); |
|
3233 |
ioReqDetail.rollback(); |
|
3234 |
ioLdgExcute.rollback(); |
|
3235 |
return false; |
|
3241 |
MessageBox.Show("請求ヘッダ追加エラー" |
|
3242 |
, "登録エラー" |
|
3243 |
, MessageBoxButtons.OK |
|
3244 |
, MessageBoxIcon.Error); |
|
3245 |
bRet = false; |
|
3246 |
return bRet; |
|
3236 | 3247 |
} |
3237 | 3248 |
} |
3238 | 3249 |
|
... | ... | |
3243 | 3254 |
SetRequestDataList(nRequestNo, ref lstData); |
3244 | 3255 |
|
3245 | 3256 |
// 請求データの追加 |
3246 |
if (ioReqData.InsertAction(lstData) == false) |
|
3257 |
if (ioReqData.InsertAction(lstData, false) == false)
|
|
3247 | 3258 |
{ |
3248 |
ioReqHead.rollback(); |
|
3249 |
ioReqData.rollback(); |
|
3250 |
ioReqDetail.rollback(); |
|
3251 |
ioLdgExcute.rollback(); |
|
3252 |
return false; |
|
3259 |
MessageBox.Show("請求データ追加エラー" |
|
3260 |
, "登録エラー" |
|
3261 |
, MessageBoxButtons.OK |
|
3262 |
, MessageBoxIcon.Error); |
|
3263 |
bRet = false; |
|
3264 |
return bRet; |
|
3253 | 3265 |
} |
3254 | 3266 |
|
3255 | 3267 |
// 請求データ明細リストに設定 |
... | ... | |
3257 | 3269 |
SetRequestDataDetailList(nRequestNo, ref lstDetail); |
3258 | 3270 |
|
3259 | 3271 |
// 請求データ明細の追加 |
3260 |
if (ioReqDetail.InsertAction(lstDetail) == false) |
|
3272 |
if (ioReqDetail.InsertAction(lstDetail, false) == false)
|
|
3261 | 3273 |
{ |
3262 |
ioReqHead.rollback(); |
|
3263 |
ioReqData.rollback(); |
|
3264 |
ioReqDetail.rollback(); |
|
3265 |
ioLdgExcute.rollback(); |
|
3266 |
return false; |
|
3274 |
MessageBox.Show("請求明細データ追加エラー" |
|
3275 |
, "登録エラー" |
|
3276 |
, MessageBoxButtons.OK |
|
3277 |
, MessageBoxIcon.Error); |
|
3278 |
bRet = false; |
|
3279 |
return bRet; |
|
3267 | 3280 |
} |
3268 | 3281 |
|
3269 | 3282 |
// 詳細台帳へ請求金額の反映 |
3270 |
if (UpdateRequestAmount(ref ioLdgExcute, ReqHead) == false)
|
|
3283 |
if (UpdateRequestAmount(ioLdgExcute, ioLdgDetail, ReqHead) == false)
|
|
3271 | 3284 |
{ |
3272 |
ioReqHead.rollback();
|
|
3273 |
ioReqData.rollback();
|
|
3274 |
ioReqDetail.rollback();
|
|
3275 |
ioLdgExcute.rollback();
|
|
3276 |
|
|
3277 |
return false;
|
|
3285 |
MessageBox.Show("工事詳細台帳更新エラー"
|
|
3286 |
, "登録エラー"
|
|
3287 |
, MessageBoxButtons.OK
|
|
3288 |
, MessageBoxIcon.Error);
|
|
3289 |
bRet = false; |
|
3290 |
return bRet;
|
|
3278 | 3291 |
} |
3279 | 3292 |
|
3280 | 3293 |
// コミット |
... | ... | |
3282 | 3295 |
ioReqData.commit(); |
3283 | 3296 |
ioReqDetail.commit(); |
3284 | 3297 |
ioLdgExcute.commit(); |
3298 |
ioLdgDetail.commit(); |
|
3285 | 3299 |
} |
3286 | 3300 |
catch (Exception ex) |
3287 | 3301 |
{ |
... | ... | |
3289 | 3303 |
} |
3290 | 3304 |
finally |
3291 | 3305 |
{ |
3292 |
ioReqHead.close(); |
|
3293 |
ioReqHead = null; |
|
3294 |
ioReqData.close(); |
|
3295 |
ioReqData = null; |
|
3296 |
ioReqDetail.close(); |
|
3297 |
ioReqDetail = null; |
|
3298 |
ioLdgExcute.close(); |
|
3299 |
ioLdgExcute = null; |
|
3306 |
if (!bRet) |
|
3307 |
{ |
|
3308 |
ioReqHead.rollback(); |
|
3309 |
ioReqData.rollback(); |
|
3310 |
ioReqDetail.rollback(); |
|
3311 |
ioLdgExcute.rollback(); |
|
3312 |
ioLdgDetail.rollback(); |
|
3313 |
} |
|
3314 |
|
|
3315 |
ioReqHead.close(); ioReqHead = null; |
|
3316 |
ioReqData.close(); ioReqData = null; |
|
3317 |
ioReqDetail.close(); ioReqDetail = null; |
|
3318 |
ioLdgExcute.close(); ioLdgExcute = null; |
|
3319 |
ioLdgDetail.close(); ioLdgDetail = null; |
|
3300 | 3320 |
} |
3301 | 3321 |
|
3302 | 3322 |
return true; |
... | ... | |
3370 | 3390 |
/// <summary> |
3371 | 3391 |
/// 詳細台帳の請求金額の更新 |
3372 | 3392 |
/// </summary> |
3373 |
private bool UpdateRequestAmount(ref IOConstructionLedgerExcute ioLdgExcute, RequestHead ReqHead) |
|
3393 |
private bool UpdateRequestAmount(IOConstructionLedgerExcute ioLdgExcute |
|
3394 |
, IOConstructionLedgerDetail ioLdgDetail |
|
3395 |
, RequestHead ReqHead) |
|
3374 | 3396 |
{ |
3375 |
|
|
3376 |
IOConstructionLedgerDetail ioLdgDetail = new IOConstructionLedgerDetail(); |
|
3377 |
List<ConstructionLedgerDetail> lstDetail = new List<ConstructionLedgerDetail>(); |
|
3378 |
|
|
3379 | 3397 |
try |
3380 | 3398 |
{ |
3399 |
List<ConstructionLedgerDetail> lstDetail = new List<ConstructionLedgerDetail>(); |
|
3381 | 3400 |
StringBuilder sql = new StringBuilder(); |
3382 | 3401 |
// 請求金額の行番号を取得 |
3383 |
sql.Append(ioLdgDetail.CreatePrimarykeyString(m_nLeaderConstructionCode, (int)FrmConstructionLedger.DataGroup.BillingAmount)); |
|
3384 |
if (ioLdgDetail.SelectAction(sql.ToString(), ref lstDetail) == false) |
|
3385 |
{ |
|
3386 |
return false; |
|
3387 |
} |
|
3402 |
sql.Append(ioLdgDetail.CreatePrimarykeyString(m_nLeaderConstructionCode |
|
3403 |
, (int)FrmConstructionLedger.DataGroup.BillingAmount)); |
|
3404 |
if (!ioLdgDetail.SelectAction(sql.ToString(), ref lstDetail, false)) return false; |
|
3388 | 3405 |
|
3389 | 3406 |
// 詳細台帳がない場合は終了 |
3390 |
if (lstDetail.Count == 0) |
|
3391 |
{ |
|
3392 |
return true; |
|
3393 |
} |
|
3407 |
if (lstDetail.Count == 0) return true; |
|
3394 | 3408 |
|
3395 | 3409 |
int yyyy = 0; |
3396 | 3410 |
int mm = 0; |
... | ... | |
3409 | 3423 |
dt = new DateTime(yyyy, mm, 1); |
3410 | 3424 |
|
3411 | 3425 |
sql.Clear(); |
3412 |
sql.Append(ioLdgExcute.CreatePrimarykeyString(m_nLeaderConstructionCode, lstDetail[0].GroupCount, lstDetail[0].LineCount)); |
|
3413 |
sql.AppendFormat(" AND DATE(TargetMonth) = STR_TO_DATE('{0}', '%Y%m%d') ", dt.ToString("yyyyMMdd")); |
|
3426 |
sql.Append(ioLdgExcute.CreatePrimarykeyString(m_nLeaderConstructionCode |
|
3427 |
, lstDetail[0].GroupCount |
|
3428 |
, lstDetail[0].LineCount)); |
|
3429 |
sql.AppendFormat(" AND DATE(TargetMonth) = DATE('{0}') ", dt.ToShortDateString()); |
|
3414 | 3430 |
|
3415 |
if (ioLdgExcute.SelectAction(sql.ToString(), ref lstExcute) == false) |
|
3416 |
{ |
|
3417 |
return false; |
|
3418 |
} |
|
3431 |
if (!ioLdgExcute.SelectAction(sql.ToString(), ref lstExcute, false)) return false; |
|
3419 | 3432 |
|
3420 | 3433 |
// 旧請求年月があってレコードなしはありえない |
3421 |
if (lstExcute.Count == 0) |
|
3422 |
{ |
|
3423 |
return false; |
|
3424 |
} |
|
3434 |
if (lstExcute.Count == 0) return false; |
|
3425 | 3435 |
|
3426 | 3436 |
LdgExcute = lstExcute[0]; |
3427 | 3437 |
|
3428 | 3438 |
// 請求金額から旧請求金額を差し引いた金額で更新 |
3429 | 3439 |
LdgExcute.PaymentAmount -= (double)m_lOldRequestAmount; |
3430 | 3440 |
sql.Clear(); |
3431 |
sql.Append(ioLdgExcute.CreatePrimarykeyString(LdgExcute.ConstructionCode, LdgExcute.GroupCount, LdgExcute.LineCount, LdgExcute.ColumnCount));
|
|
3432 |
if (ioLdgExcute.UpdateAction(sql.ToString(), LdgExcute) == false)
|
|
3433 |
{
|
|
3434 |
return false;
|
|
3435 |
}
|
|
3441 |
sql.Append(ioLdgExcute.CreatePrimarykeyString(LdgExcute.ConstructionCode |
|
3442 |
, LdgExcute.GroupCount
|
|
3443 |
, LdgExcute.LineCount
|
|
3444 |
, LdgExcute.ColumnCount));
|
|
3445 |
if (!ioLdgExcute.UpdateAction(sql.ToString(), LdgExcute, false)) return false;
|
|
3436 | 3446 |
|
3437 | 3447 |
// リストをクリア |
3438 | 3448 |
lstExcute.Clear(); |
... | ... | |
3445 | 3455 |
|
3446 | 3456 |
// 当該月の請求金額のレコードがあるか取得してみる |
3447 | 3457 |
sql.Clear(); |
3448 |
sql.Append(ioLdgExcute.CreatePrimarykeyString(m_nLeaderConstructionCode, lstDetail[0].GroupCount, lstDetail[0].LineCount)); |
|
3449 |
sql.AppendFormat(" AND DATE(TargetMonth) = STR_TO_DATE('{0}', '%Y%m%d') ", dt.ToString("yyyyMMdd")); |
|
3450 |
if (ioLdgExcute.SelectAction(sql.ToString(), ref lstExcute) == false) |
|
3451 |
{ |
|
3452 |
return false; |
|
3453 |
} |
|
3458 |
sql.Append(ioLdgExcute.CreatePrimarykeyString(m_nLeaderConstructionCode |
|
3459 |
, lstDetail[0].GroupCount |
|
3460 |
, lstDetail[0].LineCount)); |
|
3461 |
sql.AppendFormat(" AND DATE(TargetMonth) = DATE('{0}') ", dt.ToShortDateString()); |
|
3462 |
if (!ioLdgExcute.SelectAction(sql.ToString(), ref lstExcute, false)) return false; |
|
3454 | 3463 |
|
3455 | 3464 |
// レコードが存在する場合 |
3456 | 3465 |
if (lstExcute.Count > 0) |
... | ... | |
3460 | 3469 |
// 請求金額を加算して更新 |
3461 | 3470 |
LdgExcute.PaymentAmount += ReqHead.RequestAmount; |
3462 | 3471 |
sql.Clear(); |
3463 |
sql.Append(ioLdgExcute.CreatePrimarykeyString(LdgExcute.ConstructionCode, LdgExcute.GroupCount, LdgExcute.LineCount, LdgExcute.ColumnCount));
|
|
3464 |
if (ioLdgExcute.UpdateAction(sql.ToString(), LdgExcute) == false)
|
|
3465 |
{
|
|
3466 |
return false;
|
|
3467 |
}
|
|
3472 |
sql.Append(ioLdgExcute.CreatePrimarykeyString(LdgExcute.ConstructionCode |
|
3473 |
, LdgExcute.GroupCount
|
|
3474 |
, LdgExcute.LineCount
|
|
3475 |
, LdgExcute.ColumnCount));
|
|
3476 |
if (!ioLdgExcute.UpdateAction(sql.ToString(), LdgExcute, false)) return false;
|
|
3468 | 3477 |
} |
3469 | 3478 |
else |
3470 | 3479 |
{ |
... | ... | |
3474 | 3483 |
LdgExcute.ConstructionCode = m_nLeaderConstructionCode; |
3475 | 3484 |
LdgExcute.GroupCount = lstDetail[0].GroupCount; |
3476 | 3485 |
LdgExcute.LineCount = lstDetail[0].LineCount; |
3477 |
LdgExcute.ColumnCount = CalcTargetMonthToColumn(dt); |
|
3486 |
LdgExcute.ColumnCount = CalcTargetMonthToColumn(ioLdgExcute, dt);
|
|
3478 | 3487 |
LdgExcute.PaymentAmount = ReqHead.RequestAmount; |
3479 | 3488 |
LdgExcute.TargetMonth = dt; |
3480 | 3489 |
|
3481 | 3490 |
// レコードを挿入 |
3482 |
if (ioLdgExcute.InsertAction(LdgExcute) == false) |
|
3483 |
{ |
|
3484 |
return false; |
|
3485 |
} |
|
3491 |
if (!ioLdgExcute.InsertAction(LdgExcute, false)) return false; |
|
3486 | 3492 |
} |
3487 | 3493 |
|
3488 | 3494 |
// 更新した場合は、退避した詳細管理台帳用の情報は今回の内容に変更(対象月、請求金額) |
3489 | 3495 |
m_nOldRequestMonth = ReqHead.RequestMonth; |
3490 | 3496 |
m_lOldRequestAmount = ReqHead.RequestAmount; |
3491 | 3497 |
|
3498 |
return true; |
|
3492 | 3499 |
} |
3493 | 3500 |
catch (Exception ex) |
3494 | 3501 |
{ |
3495 | 3502 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
3503 |
return false; |
|
3496 | 3504 |
} |
3497 |
finally |
|
3498 |
{ |
|
3499 |
ioLdgDetail.close(); |
|
3500 |
ioLdgDetail = null; |
|
3501 |
} |
|
3502 |
|
|
3503 |
return true; |
|
3504 | 3505 |
} |
3505 | 3506 |
#endregion |
3506 | 3507 |
|
... | ... | |
3508 | 3509 |
/// <summary> |
3509 | 3510 |
/// 請求月のカラム位置を算出 |
3510 | 3511 |
/// </summary> |
3511 |
private int CalcTargetMonthToColumn(DateTime dtTarget) |
|
3512 |
private int CalcTargetMonthToColumn(IOConstructionLedgerExcute ioExcute, DateTime dtTarget)
|
|
3512 | 3513 |
{ |
3513 | 3514 |
int tcol = -1; |
3514 | 3515 |
|
3515 |
IOConstructionLedgerExcute ioExcute; |
|
3516 |
|
|
3517 |
ioExcute = new IOConstructionLedgerExcute(); |
|
3518 |
|
|
3519 | 3516 |
try |
3520 | 3517 |
{ |
3521 | 3518 |
StringBuilder sql = new StringBuilder(); |
... | ... | |
3523 | 3520 |
sql.AppendFormat(" AND ColumnCount = {0}", ClsChangeLedgerData.GetLedgerColumnCount()); |
3524 | 3521 |
|
3525 | 3522 |
ConstructionLedgerExcute lstExcute = new ConstructionLedgerExcute(); |
3526 |
if (!ioExcute.SelectAction(sql.ToString(), ref lstExcute)) return tcol; |
|
3523 |
if (!ioExcute.SelectAction(sql.ToString(), ref lstExcute, false)) return tcol;
|
|
3527 | 3524 |
|
3528 | 3525 |
tcol = ClsChangeLedgerData.CalcTargetMonthToColumn(lstExcute.TargetMonth, dtTarget); |
3529 | 3526 |
|
... | ... | |
3532 | 3529 |
{ |
3533 | 3530 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
3534 | 3531 |
} |
3535 |
finally |
|
3536 |
{ |
|
3537 |
ioExcute.close(); |
|
3538 |
ioExcute = null; |
|
3539 |
} |
|
3540 | 3532 |
|
3541 | 3533 |
return tcol; |
3542 | 3534 |
} |
branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/RequestPrint/FrmCancelInvoice.cs | ||
---|---|---|
141 | 141 |
{ |
142 | 142 |
try |
143 | 143 |
{ |
144 |
// 実行時エラーチェック |
|
145 |
if (!CheckCancelExec()) return; |
|
146 |
|
|
144 | 147 |
// データを画面より取り込む |
145 | 148 |
GetEditData(); |
146 | 149 |
|
... | ... | |
345 | 348 |
} |
346 | 349 |
} |
347 | 350 |
#endregion |
351 |
|
|
352 |
#region 実行時エラーチェック |
|
353 |
/// <summary> |
|
354 |
/// 実行時エラーチェック |
|
355 |
/// </summary> |
|
356 |
/// <returns></returns> |
|
357 |
private bool CheckCancelExec() |
|
358 |
{ |
|
359 |
try |
|
360 |
{ |
|
361 |
if (textBox1.Text.Length < 1) |
|
362 |
{ |
|
363 |
MessageBox.Show("取消理由が入力されていません。" |
|
364 |
, "実行時エラー" |
|
365 |
, MessageBoxButtons.OK |
|
366 |
, MessageBoxIcon.Error); |
|
367 |
return false; |
|
368 |
} |
|
369 |
|
|
370 |
return true; |
|
371 |
} |
|
372 |
catch (Exception ex) |
|
373 |
{ |
|
374 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
|
375 |
return false; |
|
376 |
} |
|
377 |
} |
|
378 |
#endregion |
|
348 | 379 |
} |
349 | 380 |
} |
branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/RequestPrint/FrmRequestPrintSel.Designer.cs | ||
---|---|---|
43 | 43 |
this.panel1 = new System.Windows.Forms.Panel(); |
44 | 44 |
this.PrintProgress = new System.Windows.Forms.ProgressBar(); |
45 | 45 |
this.lbTotalAmount = new System.Windows.Forms.Label(); |
46 |
this.dgv1 = new ProcessManagement.Forms.CustomControls.DataGridViewEX(); |
|
47 | 46 |
this.label8 = new System.Windows.Forms.Label(); |
48 | 47 |
this.label7 = new System.Windows.Forms.Label(); |
49 | 48 |
this.lbSelect = new System.Windows.Forms.Label(); |
... | ... | |
53 | 52 |
this.label1 = new System.Windows.Forms.Label(); |
54 | 53 |
this.lblProcessTitil = new System.Windows.Forms.Label(); |
55 | 54 |
this.btnCancel = new System.Windows.Forms.Button(); |
55 |
this.dgv1 = new ProcessManagement.Forms.CustomControls.DataGridViewEX(); |
|
56 | 56 |
this.Column1 = new System.Windows.Forms.DataGridViewTextBoxColumn(); |
57 | 57 |
this.col1 = new System.Windows.Forms.DataGridViewCheckBoxColumn(); |
58 | 58 |
this.col2 = new System.Windows.Forms.DataGridViewTextBoxColumn(); |
... | ... | |
61 | 61 |
this.col5 = new System.Windows.Forms.DataGridViewTextBoxColumn(); |
62 | 62 |
this.col6 = new System.Windows.Forms.DataGridViewTextBoxColumn(); |
63 | 63 |
this.panel1.SuspendLayout(); |
64 |
this.panel2.SuspendLayout(); |
|
64 | 65 |
((System.ComponentModel.ISupportInitialize)(this.dgv1)).BeginInit(); |
65 |
this.panel2.SuspendLayout(); |
|
66 | 66 |
this.SuspendLayout(); |
67 | 67 |
// |
68 | 68 |
// label4 |
... | ... | |
113 | 113 |
// |
114 | 114 |
// btnEnd |
115 | 115 |
// |
116 |
this.btnEnd.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); |
|
116 | 117 |
this.btnEnd.BackColor = System.Drawing.Color.Blue; |
117 | 118 |
this.btnEnd.Cursor = System.Windows.Forms.Cursors.Default; |
118 | 119 |
this.btnEnd.Font = new System.Drawing.Font("MS 明朝", 11.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128))); |
... | ... | |
127 | 128 |
// |
128 | 129 |
// btnGenerate |
129 | 130 |
// |
131 |
this.btnGenerate.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); |
|
130 | 132 |
this.btnGenerate.BackColor = System.Drawing.Color.DarkSeaGreen; |
131 | 133 |
this.btnGenerate.Cursor = System.Windows.Forms.Cursors.Default; |
132 | 134 |
this.btnGenerate.Enabled = false; |
... | ... | |
142 | 144 |
// |
143 | 145 |
// panel1 |
144 | 146 |
// |
147 |
this.panel1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) |
|
148 |
| System.Windows.Forms.AnchorStyles.Left) |
|
149 |
| System.Windows.Forms.AnchorStyles.Right))); |
|
145 | 150 |
this.panel1.BackColor = System.Drawing.Color.LightGray; |
146 | 151 |
this.panel1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; |
147 | 152 |
this.panel1.Controls.Add(this.PrintProgress); |
... | ... | |
178 | 183 |
this.lbTotalAmount.TabIndex = 42; |
179 | 184 |
this.lbTotalAmount.TextAlign = System.Drawing.ContentAlignment.MiddleRight; |
180 | 185 |
// |
181 |
// dgv1 |
|
182 |
// |
|
183 |
this.dgv1.AllowUserToAddRows = false; |
|
184 |
this.dgv1.AllowUserToDeleteRows = false; |
|
185 |
this.dgv1.AllowUserToResizeColumns = false; |
|
186 |
this.dgv1.AllowUserToResizeRows = false; |
|
187 |
this.dgv1.BackgroundColor = System.Drawing.Color.White; |
|
188 |
dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; |
|
189 |
dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Control; |
|
190 |
dataGridViewCellStyle1.Font = new System.Drawing.Font("MS 明朝", 11.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128))); |
|
191 |
dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.WindowText; |
|
192 |
dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight; |
|
193 |
dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText; |
|
194 |
dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.True; |
|
195 |
this.dgv1.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle1; |
|
196 |
this.dgv1.ColumnHeadersHeight = 24; |
|
197 |
this.dgv1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing; |
|
198 |
this.dgv1.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { |
|
199 |
this.Column1, |
|
200 |
this.col1, |
|
201 |
this.col2, |
|
202 |
this.col3, |
|
203 |
this.col4, |
|
204 |
this.col5, |
|
205 |
this.col6}); |
|
206 |
this.dgv1.EnableHeadersVisualStyles = false; |
|
207 |
this.dgv1.Location = new System.Drawing.Point(8, 34); |
|
208 |
this.dgv1.Name = "dgv1"; |
|
209 |
this.dgv1.RowHeadersVisible = false; |
|
210 |
this.dgv1.RowHeadersWidthSizeMode = System.Windows.Forms.DataGridViewRowHeadersWidthSizeMode.DisableResizing; |
|
211 |
this.dgv1.RowTemplate.Height = 20; |
|
212 |
this.dgv1.Size = new System.Drawing.Size(1240, 414); |
|
213 |
this.dgv1.TabIndex = 43; |
|
214 |
this.dgv1.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgv1_CellContentClick); |
|
215 |
// |
|
216 | 186 |
// label8 |
217 | 187 |
// |
218 | 188 |
this.label8.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(128))))); |
... | ... | |
268 | 238 |
// |
269 | 239 |
// btnDel |
270 | 240 |
// |
241 |
this.btnDel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); |
|
271 | 242 |
this.btnDel.BackColor = System.Drawing.Color.Red; |
272 | 243 |
this.btnDel.Cursor = System.Windows.Forms.Cursors.Default; |
273 | 244 |
this.btnDel.Enabled = false; |
... | ... | |
283 | 254 |
// |
284 | 255 |
// panel2 |
285 | 256 |
// |
257 |
this.panel2.Anchor = System.Windows.Forms.AnchorStyles.Top; |
|
286 | 258 |
this.panel2.BackColor = System.Drawing.Color.DarkKhaki; |
287 | 259 |
this.panel2.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; |
288 | 260 |
this.panel2.Controls.Add(this.label4); |
... | ... | |
333 | 305 |
this.btnCancel.Visible = false; |
334 | 306 |
this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click); |
335 | 307 |
// |
308 |
// dgv1 |
|
309 |
// |
|
310 |
this.dgv1.AllowUserToAddRows = false; |
|
311 |
this.dgv1.AllowUserToDeleteRows = false; |
|
312 |
this.dgv1.AllowUserToResizeColumns = false; |
|
313 |
this.dgv1.AllowUserToResizeRows = false; |
|
314 |
this.dgv1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) |
|
315 |
| System.Windows.Forms.AnchorStyles.Left) |
|
316 |
| System.Windows.Forms.AnchorStyles.Right))); |
|
317 |
this.dgv1.BackgroundColor = System.Drawing.Color.White; |
|
318 |
dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; |
|
319 |
dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Control; |
|
320 |
dataGridViewCellStyle1.Font = new System.Drawing.Font("MS 明朝", 11.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128))); |
|
321 |
dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.WindowText; |
|
322 |
dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight; |
|
323 |
dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText; |
|
324 |
dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.True; |
|
325 |
this.dgv1.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle1; |
|
326 |
this.dgv1.ColumnHeadersHeight = 24; |
|
327 |
this.dgv1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing; |
|
328 |
this.dgv1.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { |
|
329 |
this.Column1, |
|
330 |
this.col1, |
|
331 |
this.col2, |
|
332 |
this.col3, |
|
333 |
this.col4, |
|
334 |
this.col5, |
|
335 |
this.col6}); |
|
336 |
this.dgv1.EnableHeadersVisualStyles = false; |
|
337 |
this.dgv1.Location = new System.Drawing.Point(8, 34); |
|
338 |
this.dgv1.Name = "dgv1"; |
|
339 |
this.dgv1.RowHeadersVisible = false; |
|
340 |
this.dgv1.RowHeadersWidthSizeMode = System.Windows.Forms.DataGridViewRowHeadersWidthSizeMode.DisableResizing; |
|
341 |
this.dgv1.RowTemplate.Height = 20; |
|
342 |
this.dgv1.Size = new System.Drawing.Size(1240, 414); |
|
343 |
this.dgv1.TabIndex = 43; |
|
344 |
this.dgv1.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgv1_CellContentClick); |
|
345 |
// |
|
336 | 346 |
// Column1 |
337 | 347 |
// |
338 | 348 |
dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; |
... | ... | |
360 | 370 |
// |
361 | 371 |
// col2 |
362 | 372 |
// |
363 |
this.col2.Frozen = true; |
|
364 | 373 |
this.col2.HeaderText = "請 求 案 件"; |
365 | 374 |
this.col2.Name = "col2"; |
366 | 375 |
this.col2.ReadOnly = true; |
367 |
this.col2.Resizable = System.Windows.Forms.DataGridViewTriState.False; |
|
368 | 376 |
this.col2.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; |
369 | 377 |
this.col2.Width = 830; |
370 | 378 |
// |
... | ... | |
374 | 382 |
dataGridViewCellStyle4.Font = new System.Drawing.Font("Century", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); |
375 | 383 |
dataGridViewCellStyle4.ForeColor = System.Drawing.Color.Black; |
376 | 384 |
this.col3.DefaultCellStyle = dataGridViewCellStyle4; |
377 |
this.col3.Frozen = true; |
|
378 | 385 |
this.col3.HeaderText = "請 求 金 額"; |
379 | 386 |
this.col3.Name = "col3"; |
380 | 387 |
this.col3.ReadOnly = true; |
381 |
this.col3.Resizable = System.Windows.Forms.DataGridViewTriState.False; |
|
382 | 388 |
this.col3.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; |
383 | 389 |
this.col3.Width = 160; |
384 | 390 |
// |
... | ... | |
388 | 394 |
dataGridViewCellStyle5.Font = new System.Drawing.Font("Century", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); |
389 | 395 |
dataGridViewCellStyle5.ForeColor = System.Drawing.Color.Black; |
390 | 396 |
this.col4.DefaultCellStyle = dataGridViewCellStyle5; |
391 |
this.col4.Frozen = true; |
|
392 | 397 |
this.col4.HeaderText = "請求書作成日"; |
393 | 398 |
this.col4.Name = "col4"; |
394 | 399 |
this.col4.ReadOnly = true; |
395 |
this.col4.Resizable = System.Windows.Forms.DataGridViewTriState.False; |
|
396 | 400 |
this.col4.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; |
397 | 401 |
this.col4.Width = 140; |
398 | 402 |
// |
... | ... | |
434 | 438 |
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.FrmRequestPrintSel_FormClosing); |
435 | 439 |
this.Load += new System.EventHandler(this.FrmRequestPrintSel_Load); |
436 | 440 |
this.panel1.ResumeLayout(false); |
441 |
this.panel2.ResumeLayout(false); |
|
437 | 442 |
((System.ComponentModel.ISupportInitialize)(this.dgv1)).EndInit(); |
438 |
this.panel2.ResumeLayout(false); |
|
439 | 443 |
this.ResumeLayout(false); |
440 | 444 |
|
441 | 445 |
} |
branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/RequestPrint/FrmRequestPrintSelAux.cs | ||
---|---|---|
950 | 950 |
if (!ioReqData.SelectAction(sql.ToString(), ref lstReqData, false)) return false; |
951 | 951 |
|
952 | 952 |
m_dicReqData.Add(ReqHead.RequestNo, lstReqData); |
953 |
|
|
954 |
// 請求金額集計 |
|
955 |
//m_lTotalAmount += ReqHead.RequestTotalAmount; |
|
956 |
//m_lTaxAmount += ReqHead.TaxAmount; |
|
957 | 953 |
} |
958 | 954 |
|
959 | 955 |
return true; |
... | ... | |
1278 | 1274 |
return; |
1279 | 1275 |
} |
1280 | 1276 |
|
1277 |
// 取消不可のチェック |
|
1278 |
//if (!NotCancelCheck()) |
|
1279 |
//{ |
|
1280 |
// MessageBox.Show("入金データが作成されているものは請求取消できません。" |
|
1281 |
// , "取消エラー" |
|
1282 |
// , MessageBoxButtons.OK |
|
1283 |
// , MessageBoxIcon.Error); |
|
1284 |
// return; |
|
1285 |
//} |
|
1286 |
|
|
1281 | 1287 |
int nInvoiceNo = GetSelInvoiceNo(); |
1282 | 1288 |
|
1283 | 1289 |
// 取消理由入力 |
... | ... | |
1286 | 1292 |
if (frm.ShowDialog() == DialogResult.Cancel) return; |
1287 | 1293 |
string strReason = frm.Reason; |
1288 | 1294 |
|
1289 |
if (MessageBox.Show("選択されている請求書を取り消しますがよろしいですか?", "削除確認" |
|
1295 |
if (MessageBox.Show("選択されている請求書を取り消しますがよろしいですか?" |
|
1296 |
, "削除確認" |
|
1290 | 1297 |
, MessageBoxButtons.YesNo |
1291 | 1298 |
, MessageBoxIcon.Information) == DialogResult.No) |
1292 | 1299 |
{ |
... | ... | |
1309 | 1316 |
} |
1310 | 1317 |
} |
1311 | 1318 |
#endregion |
1319 |
|
|
1320 |
#region 取消不可のチェック |
|
1321 |
/// <summary> |
|
1322 |
/// 取消不可のチェック |
|
1323 |
/// </summary> |
|
1324 |
/// <returns></returns> |
|
1325 |
private bool NotCancelCheck() |
|
1326 |
{ |
|
1327 |
IODepositDataDetail iODepositDataDetail = new IODepositDataDetail(); |
|
1328 |
try |
|
1329 |
{ |
|
1330 |
bool bRet = true; |
|
1331 |
StringBuilder strSQL = new StringBuilder(); |
|
1332 |
foreach (DataGridViewRow CurRow in dgv1.Rows) |
|
1333 |
{ |
|
1334 |
// 請求ヘッダが紐づいていない行はダミー |
|
1335 |
if (CommonMotions.cnvInt(CurRow.Cells[(int)DispColumn.RequestNo].Value) < 1) continue; |
|
1336 |
|
|
1337 |
// 選択されていない場合 |
|
1338 |
if (!CurRow.Cells[(int)DispColumn.CheckFlg].EditedFormattedValue.Equals(true)) continue; |
|
1339 |
|
|
1340 |
// 対象データの請求番号取得 |
|
1341 |
int nIndex = CommonMotions.cnvInt(CurRow.Cells[(int)DispColumn.DataNo].Value) - 1; |
|
1342 |
int nReqNo = CommonMotions.cnvInt(CurRow.Cells[(int)DispColumn.RequestNo].Value); |
|
1343 |
|
|
1344 |
// 入金データが存在するか確認する |
|
1345 |
strSQL.Append("select * from depositdatadetail As A"); |
|
1346 |
strSQL.Append(" Inner Join requesthead As B On B.REQUESTNO = A.REQUESTNO"); |
|
1347 |
strSQL.AppendFormat(" Where A.ORDERERSDIVISION = {0}", m_nOrderersDivision); |
|
1348 |
strSQL.AppendFormat(" And A.ORDERERSCODE = {0}", m_nOrderersCode); |
|
1349 |
strSQL.AppendFormat(" And A.TARGETDATE = {0}", m_nRequestMonth); |
|
1350 |
strSQL.AppendFormat(" And A.REQUESTNO = {0}", nReqNo); |
|
1351 |
ArrayList arrayList = new ArrayList(); |
|
1352 |
if (!iODepositDataDetail.ExecuteReader(strSQL.ToString(), ref arrayList)) return false; |
|
1353 |
if (arrayList.Count > 0) |
|
1354 |
{ // 入金データがあれば処理を終了する |
|
1355 |
bRet = false; |
|
1356 |
break; |
|
1357 |
} |
|
1358 |
} |
|
1359 |
|
|
1360 |
return bRet; |
|
1361 |
} |
|
1362 |
catch (Exception ex) |
|
1363 |
{ |
|
1364 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
|
1365 |
return false; |
|
1366 |
} |
|
1367 |
finally |
|
1368 |
{ |
|
1369 |
iODepositDataDetail.close(); iODepositDataDetail = null; |
|
1370 |
} |
|
1371 |
} |
|
1372 |
#endregion |
|
1312 | 1373 |
} |
1313 | 1374 |
} |
branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/RequestPrint/FrmRequestPrintSelPrtOut.cs | ||
---|---|---|
732 | 732 |
strSQLSeal.Append("SELECT"); |
733 | 733 |
strSQLSeal.Append(CreatePersonSQL("B.")); |
734 | 734 |
strSQLSeal.Append(", C.SECRANK FROM PROCESSAPPROVAL A, PERSONINCHARGEMASTER B, SECURITYMASTER C"); |
735 |
strSQLSeal.Append(paDB.CreatePrimarykeyString(m_lstReqHead[0].ReqConstructionCode, (int)ClsExcute.ApprovalListNo.OrderRequestApproval, m_lstReqHead[0].OrderNo)); |
|
735 |
strSQLSeal.Append(paDB.CreatePrimarykeyString(m_lstReqHead[0].ReqConstructionCode |
|
736 |
, (int)ClsExcute.ApprovalListNo.OrderRequestApproval |
|
737 |
, m_lstReqHead[0].OrderNo)); |
|
736 | 738 |
strSQLSeal.Append(" AND A.PERSONCODE = B.PERSONCODE"); |
737 | 739 |
strSQLSeal.Append(" AND C.SECCODE = B.SECCODE"); |
738 | 740 |
strSQLSeal.Append(" Order By C.SecRank ASC"); |
... | ... | |
954 | 956 |
commentData.AddPrintData("C", 21, m_InvData.Comment5); // コメント5(22行目 C列) |
955 | 957 |
commentData.ExcelCellSet(m_UsedExcel); |
956 | 958 |
|
957 |
m_dicConstructionBaseInfo.TryGetValue(m_lstReqHead[0].ReqConstructionCode, out ConstructionBaseInfo Info); |
|
959 |
if (m_dicConstructionBaseInfo.TryGetValue(m_lstReqHead[0].ReqConstructionCode, out ConstructionBaseInfo Info)) |
|
960 |
{ |
|
961 |
// 印鑑描画 |
|
962 |
PrintCoverSeal(Info.ConstructionPersonCode); |
|
963 |
} |
|
958 | 964 |
|
959 |
// 印鑑描画 |
|
960 |
PrintCoverSeal(Info.ConstructionPersonCode); |
|
961 |
|
|
962 | 965 |
return CommonDefine.RetunAnswer.Answer0; |
963 | 966 |
} |
964 | 967 |
catch (Exception ex) |
branches/src/ProcessManagement/ProcessManagement/Forms/ZMenu/FrmMenuAuxiliary.cs | ||
---|---|---|
3011 | 3011 |
strLimitDate); |
3012 | 3012 |
|
3013 | 3013 |
// 承認種別と種別名に色を付ける |
3014 |
Color SelColor =ClsExcute.ApprovalTypeColorList[iApprovalCode];
|
|
3014 |
Color SelColor =CommonDefine.DefineColorList[iApprovalCode];
|
|
3015 | 3015 |
dgv.Rows[CurRowCnt].Cells[(int)ConstrAppGridCount.ApprovalName].Style.BackColor = SelColor; |
3016 | 3016 |
//dgv.Rows[CurRowCnt].Cells[(int)ConstrAppGridCount.ApprovalName].Style.ForeColor = CommonMotions.GetComplementaryColor(SelColor); |
3017 | 3017 |
string wrkname = MenuTabName.First(x => x.Value.Equals((int)TabNameEnum.ConstructApproval)).Key; |
... | ... | |
3438 | 3438 |
strLimitDate); |
3439 | 3439 |
|
3440 | 3440 |
// 承認種別と種別名に色を付ける |
3441 |
Color SelColor = ClsExcute.ApprovalTypeColorList[iApprovalCode];
|
|
3441 |
Color SelColor = CommonDefine.DefineColorList[iApprovalCode];
|
|
3442 | 3442 |
dgv.Rows[CurRowCnt].Cells[(int)PersonAppGridCount.ApprovalName].Style.BackColor = SelColor; |
3443 | 3443 |
string wrkname = MenuTabName.First(x => x.Value.Equals((int)TabNameEnum.PersonApproval)).Key; |
3444 | 3444 |
int Tabcount = MenuTabName[wrkname] - 1; |
... | ... | |
4890 | 4890 |
return; |
4891 | 4891 |
} |
4892 | 4892 |
|
4893 |
CurCell.Style.BackColor = ClsExcute.ApprovalTypeColorList[iApprovalCode];
|
|
4893 |
CurCell.Style.BackColor = CommonDefine.DefineColorList[iApprovalCode];
|
|
4894 | 4894 |
CurCell.ToolTipText = CommonDefine.ApprovalStatusString[iApprovalStatus]; |
4895 | 4895 |
} |
4896 | 4896 |
catch (Exception ex) |
branches/src/ProcessManagement/ProcessManagement/Properties/AssemblyInfo.cs | ||
---|---|---|
32 | 32 |
// すべての値を指定するか、下のように '*' を使ってビルドおよびリビジョン番号を |
33 | 33 |
// 既定値にすることができます: |
34 | 34 |
// [assembly: AssemblyVersion("1.0.*")] |
35 |
[assembly: AssemblyVersion("1.0.1.228")]
|
|
36 |
[assembly: AssemblyFileVersion("1.0.1.228")]
|
|
35 |
[assembly: AssemblyVersion("1.0.1.229")]
|
|
36 |
[assembly: AssemblyFileVersion("1.0.1.229")]
|
|
37 | 37 |
// Log4netを使用する |
38 | 38 |
[assembly: log4net.Config.XmlConfigurator(ConfigFile = @"log4net.config", Watch = true)] |
他の形式にエクスポート: Unified diff