リビジョン 477
製品版:玄武ソース
trunk/src/ProcessManagement/ProcessManagement/Common/CommonMotions.cs | ||
---|---|---|
3063 | 3063 |
try |
3064 | 3064 |
{ |
3065 | 3065 |
// SQL作成 |
3066 |
string strSQL = "SELECT A.MONTHLYSALARY, A.YEARSALARY, A.PERSONCODE, A.STARTDATE FROM PERSONSALARYMASTER A,"; |
|
3067 |
strSQL += " (SELECT PERSONCODE, MAX(STARTDATE) sDate FROM PERSONSALARYMASTER"; |
|
3068 |
strSQL += string.Format(" WHERE PERSONCODE = {0}", PersonCode); |
|
3069 |
strSQL += string.Format(" AND DATE(NOW()) <= '{0}'", GetData.ToShortDateString()); |
|
3070 |
strSQL += " GROUP BY PERSONCODE) B"; |
|
3071 |
strSQL += " WHERE A.PERSONCODE = B.PERSONCODE AND A.STARTDATE = B.sDate"; |
|
3066 |
StringBuilder strSQL = new StringBuilder(); |
|
3067 |
strSQL.Append("SELECT"); |
|
3068 |
strSQL.Append(" A.MONTHLYSALARY"); |
|
3069 |
strSQL.Append(", A.YEARSALARY"); |
|
3070 |
strSQL.Append(", A.PERSONCODE"); |
|
3071 |
strSQL.Append(", A.STARTDATE"); |
|
3072 |
strSQL.Append(" FROM PERSONSALARYMASTER As A"); |
|
3073 |
strSQL.Append(" , (SELECT"); |
|
3074 |
strSQL.Append(" BB.PERSONCODE"); |
|
3075 |
strSQL.Append(" , MAX(BB.STARTDATE) sDate"); |
|
3076 |
strSQL.Append(" FROM PERSONSALARYMASTER As BB"); |
|
3077 |
strSQL.AppendFormat(" WHERE BB.PERSONCODE = {0}", PersonCode); |
|
3078 |
strSQL.AppendFormat(" AND DATE(BB.StartDate) <= DATE('{0}')", GetData.ToShortDateString()); |
|
3079 |
strSQL.Append(" GROUP BY BB.PERSONCODE) As B"); |
|
3080 |
strSQL.Append(" WHERE A.PERSONCODE = B.PERSONCODE"); |
|
3081 |
strSQL.Append(" AND A.STARTDATE = B.sDate"); |
|
3072 | 3082 |
|
3073 |
return strSQL; |
|
3083 |
return strSQL.ToString();
|
|
3074 | 3084 |
} |
3075 | 3085 |
catch (Exception ex) |
3076 | 3086 |
{ |
... | ... | |
3511 | 3521 |
{ |
3512 | 3522 |
try |
3513 | 3523 |
{ |
3514 |
|
|
3524 |
if (TargetList.Count < 1) return; |
|
3515 | 3525 |
StringBuilder strSQL = new StringBuilder(); |
3516 | 3526 |
|
3517 | 3527 |
// 非受注コード |
... | ... | |
3604 | 3614 |
strSQL.AppendFormat(" And C.LedgerFlg = {0}", (int)PersonInChargeMaster.LedgerDivNoDef.CalcTarget); |
3605 | 3615 |
|
3606 | 3616 |
strSQL.AppendFormat(" WHERE B.PERSONCODE = {0}", PersonCode); |
3607 |
strSQL.Append(" AND B.STARTDATE <= A.d"); |
|
3617 |
//strSQL.Append(" AND B.STARTDATE <= A.d"); |
|
3618 |
strSQL.Append(" AND B.STARTDATE = "); |
|
3619 |
strSQL.Append(" (Select BB.STARTDATE From PERSONSALARYMASTER AS BB"); |
|
3620 |
strSQL.AppendFormat(" Where BB.PERSONCODE = {0}", PersonCode); |
|
3621 |
strSQL.Append(" AND BB.STARTDATE <= A.d"); |
|
3622 |
strSQL.Append(" Order By BB.STARTDATE DESC"); |
|
3623 |
strSQL.Append(" Limit 1)"); |
|
3608 | 3624 |
|
3609 | 3625 |
strSQL.Append(" ORDER BY A.d, B.STARTDATE DESC) AS AX"); |
3610 | 3626 |
strSQL.Append(" GROUP BY AX.hiduke"); |
... | ... | |
3641 | 3657 |
{ |
3642 | 3658 |
try |
3643 | 3659 |
{ |
3660 |
if (TargetList.Count < 1) return; |
|
3661 |
|
|
3644 | 3662 |
// デフォルト開始・終了を取得する |
3645 | 3663 |
DateTime dtDefaultStart = CommonMotions.GetOpeningEndDate(TargetYear, true); |
3646 | 3664 |
DateTime dtDefaultEnd = CommonMotions.GetOpeningEndDate(TargetYear, false); |
trunk/src/ProcessManagement/ProcessManagement/Common/ProductDefine.cs | ||
---|---|---|
162 | 162 |
/// <summary> |
163 | 163 |
/// 製品種別 |
164 | 164 |
/// </summary> |
165 |
private static int m_ProductType = (int)ProductTypeDef.ProductsModelType1;
|
|
165 |
private static int m_ProductType = (int)ProductTypeDef.ProductsModelType3;
|
|
166 | 166 |
#endregion |
167 | 167 |
|
168 | 168 |
#region 更新機能実装 |
169 | 169 |
/// <summary> |
170 | 170 |
/// 更新機能実装 |
171 | 171 |
/// </summary> |
172 |
private static int m_UpdateProcess = (int)UpdateProcessDef.None;
|
|
172 |
private static int m_UpdateProcess = (int)UpdateProcessDef.Exists;
|
|
173 | 173 |
#endregion |
174 | 174 |
|
175 | 175 |
#region Webサービス機能定義 |
... | ... | |
183 | 183 |
/// <summary> |
184 | 184 |
/// DBサーバータイプ |
185 | 185 |
/// </summary> |
186 |
private static int m_StorageType = (int)StorageTypeDef.Internal_LAN;
|
|
186 |
private static int m_StorageType = (int)StorageTypeDef.VPS;
|
|
187 | 187 |
#endregion |
188 | 188 |
|
189 | 189 |
#endregion |
trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IORequestHead.cs | ||
---|---|---|
399 | 399 |
} |
400 | 400 |
#endregion |
401 | 401 |
|
402 |
#region 1項目更新処理 |
|
403 |
/// <summary> |
|
404 |
/// 1項目の更新を行う |
|
405 |
/// </summary> |
|
406 |
public bool UpdateFeild(string strWhere, int FeildNo, object value, bool bConnect = true) |
|
407 |
{ |
|
408 |
StringBuilder strcmd = new StringBuilder(); |
|
409 |
try |
|
410 |
{ |
|
411 |
strcmd.Append("UPDATE RequestHead"); |
|
412 |
|
|
413 |
strcmd.Append(" SET"); |
|
414 |
switch (FeildNo) |
|
415 |
{ |
|
416 |
case (int)NameColumn.RequestNo: |
|
417 |
strcmd.AppendFormat(" RequestNo = {0}", (int)value); |
|
418 |
break; |
|
419 |
case (int)NameColumn.ReqConstructionCode: |
|
420 |
strcmd.AppendFormat(" ReqConstructionCode = {0}", (int)value); |
|
421 |
break; |
|
422 |
case (int)NameColumn.OrderNo: |
|
423 |
strcmd.AppendFormat(" OrderNo = {0}", (int)value); |
|
424 |
break; |
|
425 |
case (int)NameColumn.RequestMonth: |
|
426 |
strcmd.AppendFormat(" RequestMonth = {0}", (int)value); |
|
427 |
break; |
|
428 |
case (int)NameColumn.OrderersDivision: |
|
429 |
strcmd.AppendFormat(" OrderersDivision = {0}", (int)value); |
|
430 |
break; |
|
431 |
case (int)NameColumn.OrderersCode: |
|
432 |
strcmd.AppendFormat(" OrderersCode = {0}", (int)value); |
|
433 |
break; |
|
434 |
case (int)NameColumn.OrderersName: |
|
435 |
strcmd.AppendFormat(" OrderersName = '{0}'", value.ToString()); |
|
436 |
break; |
|
437 |
case (int)NameColumn.ReqConstructionName: |
|
438 |
strcmd.AppendFormat(" ReqConstructionName = '{0}'", value.ToString()); |
|
439 |
break; |
|
440 |
case (int)NameColumn.RequestTotalAmount: |
|
441 |
strcmd.AppendFormat(" RequestTotalAmount = {0}", (long)value); |
|
442 |
break; |
|
443 |
case (int)NameColumn.RequestAmount: |
|
444 |
strcmd.AppendFormat(" RequestAmount = {0}", (long)value); |
|
445 |
break; |
|
446 |
case (int)NameColumn.TaxAmount: |
|
447 |
strcmd.AppendFormat(" TaxAmount = {0}", (long)value); |
|
448 |
break; |
|
449 |
case (int)NameColumn.UnpaidAmount: |
|
450 |
strcmd.AppendFormat(" UnpaidAmount = {0}", (long)value); |
|
451 |
break; |
|
452 |
case (int)NameColumn.Note: |
|
453 |
strcmd.AppendFormat(" Note = '{0}'", value.ToString()); |
|
454 |
break; |
|
455 |
case (int)NameColumn.AssignedFlg: |
|
456 |
strcmd.AppendFormat(" AssignedFlg = {0}", (long)value); |
|
457 |
break; |
|
458 |
case (int)NameColumn.InvoiceNo: |
|
459 |
strcmd.AppendFormat(" InvoiceNo = {0}", (long)value); |
|
460 |
break; |
|
461 |
case (int)NameColumn.BillingDate: |
|
462 |
strcmd.AppendFormat(" BillingDate = DATE('{0}')", ((DateTime)value).Date.ToString()); |
|
463 |
break; |
|
464 |
case (int)NameColumn.BillConfirmDate: |
|
465 |
strcmd.AppendFormat(" BillingDate = DATE('{0}')", ((DateTime)value).Date.ToString()); |
|
466 |
break; |
|
467 |
} |
|
468 |
|
|
469 |
strcmd.Append(", UpdateDate = NOW()"); |
|
470 |
strcmd.Append(strWhere); |
|
471 |
|
|
472 |
if (!ExecuteNonQuery(strcmd.ToString(), bConnect)) return false; |
|
473 |
|
|
474 |
return true; |
|
475 |
} |
|
476 |
catch (Exception ex) |
|
477 |
{ |
|
478 |
logger.ErrorFormat("システムエラー:{0}:{1}:{2}", CommonMotions.GetMethodName(2), ex.Message, strcmd.ToString()); |
|
479 |
return false; |
|
480 |
} |
|
481 |
} |
|
482 |
#endregion |
|
483 |
|
|
402 | 484 |
#region MySQLDataReaderより構造体へセットする |
403 | 485 |
/// <summary> |
404 | 486 |
/// MySQLDataReaderより構造体へセットする |
trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ApprovalList/FrmApprovalList.designer.cs | ||
---|---|---|
124 | 124 |
// btnDataUpDate |
125 | 125 |
// |
126 | 126 |
this.btnDataUpDate.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); |
127 |
this.btnDataUpDate.BackColor = System.Drawing.Color.Aquamarine;
|
|
128 |
this.btnDataUpDate.Font = new System.Drawing.Font("MS 明朝", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128))); |
|
127 |
this.btnDataUpDate.BackColor = System.Drawing.Color.SpringGreen;
|
|
128 |
this.btnDataUpDate.Font = new System.Drawing.Font("MS 明朝", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
|
|
129 | 129 |
this.btnDataUpDate.ForeColor = System.Drawing.Color.Black; |
130 | 130 |
this.btnDataUpDate.Location = new System.Drawing.Point(1120, 5); |
131 | 131 |
this.btnDataUpDate.Name = "btnDataUpDate"; |
trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ApprovalScreen/FrmAppScrnAux.cs | ||
---|---|---|
404 | 404 |
ArrayList ReqData = new ArrayList(); |
405 | 405 |
if (!ReqHDB.ExecuteReader(sql.ToString(), ref ReqData)) return false; |
406 | 406 |
if (ReqData.Count < 1) return false; |
407 |
|
|
408 |
ExcuteDB.connect(); ExcuteDB.beginTran(); |
|
409 |
ReqHDB.connect(); ReqHDB.beginTran(); |
|
410 |
BCLDB.connect(); BCLDB.beginTran(); |
|
411 |
|
|
407 | 412 |
object[] ObjRec = (object[])ReqData[0]; |
408 | 413 |
long lAmountValue = CommonMotions.cnvLong(ObjRec[2]); |
409 | 414 |
|
... | ... | |
418 | 423 |
// 工事詳細台帳作成前データ作成 |
419 | 424 |
if (!CaretaBeforeCreatingLedger(BCLDB |
420 | 425 |
, HeadRec.RequestMonth |
421 |
, lAmountValue)) return false; |
|
426 |
, lAmountValue)) |
|
427 |
{ |
|
428 |
BCLDB.rollback(); |
|
429 |
return false; |
|
430 |
} |
|
422 | 431 |
return true; |
423 | 432 |
} |
424 | 433 |
|
... | ... | |
427 | 436 |
sql.Clear(); |
428 | 437 |
sql.Append(DetailDB.CreatePrimarykeyString(m_ConstructionCode |
429 | 438 |
, (int)FrmConstructionLedger.DataGroup.BillingAmount)); |
430 |
if (!DetailDB.SelectAction(sql.ToString(), ref lstDetail)) return false; |
|
439 |
if (!DetailDB.SelectAction(sql.ToString(), ref lstDetail)) |
|
440 |
{ |
|
441 |
BCLDB.rollback(); |
|
442 |
return false; |
|
443 |
} |
|
431 | 444 |
|
432 | 445 |
// 当該月の請求金額のレコードがあるか取得してみる |
433 | 446 |
sql.Clear(); |
... | ... | |
437 | 450 |
sql.AppendFormat(" AND DATE(TargetMonth) = DATE('{0}') ", dt.ToShortDateString()); |
438 | 451 |
|
439 | 452 |
List<ConstructionLedgerExcute> lstExcute = new List<ConstructionLedgerExcute>(); |
440 |
if (!ExcuteDB.SelectAction(sql.ToString(), ref lstExcute)) return false; |
|
453 |
if (!ExcuteDB.SelectAction(sql.ToString(), ref lstExcute, false)) |
|
454 |
{ |
|
455 |
BCLDB.rollback(); |
|
456 |
return false; |
|
457 |
} |
|
441 | 458 |
|
442 | 459 |
// 請求月よりカラム番号を取得する |
443 |
int ColCnt = ClsChangeLedgerData.CalcTargetMonthToColumn(ExcuteDB, true, ConstructionCode, dt);
|
|
460 |
int ColCnt = ClsChangeLedgerData.CalcTargetMonthToColumn(ExcuteDB, false, ConstructionCode, dt);
|
|
444 | 461 |
|
445 | 462 |
// 台帳更新 |
446 | 463 |
ConstructionLedgerExcute LdgExcute = new ConstructionLedgerExcute(); |
... | ... | |
460 | 477 |
, LdgExcute.LineCount |
461 | 478 |
, LdgExcute.ColumnCount)); |
462 | 479 |
|
463 |
if (!ExcuteDB.UpdateAction(sql.ToString(), LdgExcute)) return false; |
|
480 |
if (!ExcuteDB.UpdateAction(sql.ToString(), LdgExcute, false)) |
|
481 |
{ |
|
482 |
ExcuteDB.rollback(); |
|
483 |
BCLDB.rollback(); |
|
484 |
return false; |
|
485 |
} |
|
464 | 486 |
} |
465 | 487 |
else |
466 | 488 |
{ |
467 | 489 |
|
468 | 490 |
// レコードを挿入 |
469 |
if (!ExcuteDB.InsertAction(LdgExcute)) return false; |
|
491 |
if (!ExcuteDB.InsertAction(LdgExcute, false)) |
|
492 |
{ |
|
493 |
ExcuteDB.rollback(); |
|
494 |
BCLDB.rollback(); |
|
495 |
return false; |
|
496 |
} |
|
470 | 497 |
} |
471 | 498 |
|
499 |
// 請求ヘッダ確認日セット |
|
500 |
StringBuilder strWhere = new StringBuilder(); |
|
501 |
strWhere.Append(ReqHDB.CreateSubkeyString(m_ConstructionCode, m_OrderNo)); |
|
502 |
if (!ReqHDB.UpdateFeild(strWhere.ToString() |
|
503 |
, (int)IORequestHead.NameColumn.BillConfirmDate |
|
504 |
, DateTime.Now, false)) |
|
505 |
{ |
|
506 |
ExcuteDB.rollback(); |
|
507 |
BCLDB.rollback(); |
|
508 |
ReqHDB.rollback(); |
|
509 |
return false; |
|
510 |
} |
|
511 |
|
|
512 |
ExcuteDB.commit(); |
|
513 |
ReqHDB.commit(); |
|
514 |
BCLDB.commit(); |
|
515 |
|
|
472 | 516 |
return true; |
473 | 517 |
} |
474 | 518 |
catch (Exception ex) |
... | ... | |
510 | 554 |
, BclRec.GroupCount |
511 | 555 |
, BclRec.TargetMonth)); |
512 | 556 |
List<BeforeCreatingLedger> ReadList = new List<BeforeCreatingLedger>(); |
513 |
if (!BCLDB.SelectAction(sql.ToString(), ref ReadList)) return false; |
|
557 |
if (!BCLDB.SelectAction(sql.ToString(), ref ReadList, false)) return false;
|
|
514 | 558 |
if (ReadList.Count < 1) |
515 | 559 |
{ |
516 |
if (!BCLDB.InsertAction(BclRec)) return false; |
|
560 |
if (!BCLDB.InsertAction(BclRec, false)) return false;
|
|
517 | 561 |
} |
518 | 562 |
else |
519 | 563 |
{ |
520 |
if (!BCLDB.UpdateAction(sql.ToString(), BclRec)) return false; |
|
564 |
if (!BCLDB.UpdateAction(sql.ToString(), BclRec, false)) return false;
|
|
521 | 565 |
} |
522 | 566 |
|
523 | 567 |
return true; |
... | ... | |
559 | 603 |
strSQL.Append(" From processapprovaldetail As A"); |
560 | 604 |
strSQL.Append(" Inner Join purchaseorder AS B"); |
561 | 605 |
strSQL.Append(" On B.ConstructionCode = A.ConstructionCode"); |
562 |
strSQL.Append(" And B.SeqNo = A.SerialNo");
|
|
606 |
strSQL.Append(" And B.SeqNo = A.LinkCode");
|
|
563 | 607 |
strSQL.Append(" Where"); |
564 | 608 |
strSQL.AppendFormat(" A.ConstructionCode = {0}", m_ConstructionCode); |
565 | 609 |
strSQL.AppendFormat(" And A.ApprovalCode = {0}", (int)ClsExcute.ApprovalListNo.PurchaseOrderEntryApproval); |
trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstractionList/FrmConstructionList.designer.cs | ||
---|---|---|
165 | 165 |
this.ProgressBar.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); |
166 | 166 |
this.ProgressBar.Location = new System.Drawing.Point(10, 619); |
167 | 167 |
this.ProgressBar.Name = "ProgressBar"; |
168 |
this.ProgressBar.Size = new System.Drawing.Size(400, 30);
|
|
168 |
this.ProgressBar.Size = new System.Drawing.Size(1134, 30);
|
|
169 | 169 |
this.ProgressBar.TabIndex = 31; |
170 | 170 |
this.ProgressBar.Visible = false; |
171 | 171 |
// |
trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstractionList/FrmConstructionListAuxiliary.cs | ||
---|---|---|
439 | 439 |
if(radioButton1.Checked) |
440 | 440 |
{ |
441 | 441 |
// ?c???I?? |
442 |
strRet.AppendFormat(" AND (C.DEPARTMENTCODE = {0} And C.DEPARTMENTNAME = '{1}')", DepartmentCode, DepartmentName); |
|
442 |
//strRet.AppendFormat(" AND (C.DEPARTMENTCODE = {0} And C.DEPARTMENTNAME = '{1}')", DepartmentCode, DepartmentName); |
|
443 |
strRet.AppendFormat(" AND C.DEPARTMENTCODE = {0}", DepartmentCode); |
|
443 | 444 |
} |
444 | 445 |
else |
445 | 446 |
{ |
446 | 447 |
// ?H????I?? |
447 |
strRet.AppendFormat(" AND (D.DEPARTMENTCODE = {0} And D.DEPARTMENTNAME = '{1}')", DepartmentCode, DepartmentName); |
|
448 |
//strRet.AppendFormat(" AND (D.DEPARTMENTCODE = {0} And D.DEPARTMENTNAME = '{1}')", DepartmentCode, DepartmentName); |
|
449 |
strRet.AppendFormat(" AND D.DEPARTMENTCODE = {0}", DepartmentCode); |
|
448 | 450 |
} |
449 | 451 |
} |
450 | 452 |
else |
451 | 453 |
{ |
452 |
strRet.AppendFormat(" AND ((C.DEPARTMENTCODE = {0} And C.DEPARTMENTNAME = '{1}')", DepartmentCode, DepartmentName); |
|
453 |
strRet.AppendFormat(" OR (D.DEPARTMENTCODE = {0} And D.DEPARTMENTNAME = '{1}'))", DepartmentCode, DepartmentName); |
|
454 |
//strRet.AppendFormat(" AND ((C.DEPARTMENTCODE = {0} And C.DEPARTMENTNAME = '{1}')", DepartmentCode, DepartmentName); |
|
455 |
//strRet.AppendFormat(" OR (D.DEPARTMENTCODE = {0} And D.DEPARTMENTNAME = '{1}'))", DepartmentCode, DepartmentName); |
|
456 |
strRet.AppendFormat(" AND (C.DEPARTMENTCODE = {0}", DepartmentCode); |
|
457 |
strRet.AppendFormat(" OR D.DEPARTMENTCODE = {0})", DepartmentCode); |
|
454 | 458 |
} |
455 | 459 |
|
456 | 460 |
return strRet.ToString(); |
trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionBaseInfo/FrmConstructionBaseInfo.cs | ||
---|---|---|
1065 | 1065 |
|
1066 | 1066 |
CommonMotions.EntryEndMessage("?H?????f?[?^"); |
1067 | 1067 |
// ?I?? |
1068 |
this.Close(); |
|
1068 |
//this.Close();
|
|
1069 | 1069 |
} |
1070 | 1070 |
catch (System.Exception ex) |
1071 | 1071 |
{ |
... | ... | |
1422 | 1422 |
/// <param name="e"></param> |
1423 | 1423 |
private async void FrmConstructionBaseInfo_Shown(object sender, EventArgs e) |
1424 | 1424 |
{ |
1425 |
await Task.Delay(300);
|
|
1425 |
await Task.Delay(100);
|
|
1426 | 1426 |
// ?t?H?[?????[?h??????? |
1427 | 1427 |
InitFormLoad(); |
1428 | 1428 |
|
... | ... | |
1930 | 1930 |
ClearDepartment(); |
1931 | 1931 |
} |
1932 | 1932 |
|
1933 |
// ?H???m?F?`?F?b?N |
|
1934 |
if (!ConstrCloseCheck()) |
|
1935 |
{ |
|
1936 |
bInitFlg = true; |
|
1937 |
if(m_BeforeObject != null) ((RadioButton)m_BeforeObject).Checked = true; |
|
1938 |
bInitFlg = false; |
|
1939 |
} |
|
1940 |
// ?O?`?F?b?N???W?I?{?^???N???A |
|
1941 |
m_BeforeObject = null; |
|
1942 |
|
|
1933 | 1943 |
// ??X?t???OON |
1934 | 1944 |
valueChange(sender, e); |
1935 | 1945 |
} |
... | ... | |
1940 | 1950 |
} |
1941 | 1951 |
#endregion |
1942 | 1952 |
|
1953 |
#region ?????m?F???W?I?{?^???I???????? |
|
1954 |
object m_BeforeObject = null; |
|
1955 |
/// <summary> |
|
1956 |
/// ?????m?F???W?I?{?^???I???????? |
|
1957 |
/// </summary> |
|
1958 |
/// <param name="sender"></param> |
|
1959 |
/// <param name="e"></param> |
|
1960 |
private void rdbStatus_Validating(object sender, CancelEventArgs e) |
|
1961 |
{ |
|
1962 |
m_BeforeObject = sender; |
|
1963 |
} |
|
1964 |
#endregion |
|
1965 |
|
|
1943 | 1966 |
#region ???F????N???[?Y???????? |
1944 | 1967 |
/// <summary> |
1945 | 1968 |
/// ???F????N???[?Y???????? |
trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionBaseInfo/FrmConstructionBaseInfo.designer.cs | ||
---|---|---|
317 | 317 |
this.lblConstructionCode = new System.Windows.Forms.Label(); |
318 | 318 |
this.label16 = new System.Windows.Forms.Label(); |
319 | 319 |
this.panel5 = new System.Windows.Forms.Panel(); |
320 |
this.rdbStatus17 = new System.Windows.Forms.RadioButton(); |
|
320 | 321 |
this.btnRestore = new System.Windows.Forms.Button(); |
321 | 322 |
this.rdbStatus16 = new System.Windows.Forms.RadioButton(); |
322 | 323 |
this.rdbStatus8 = new System.Windows.Forms.RadioButton(); |
323 | 324 |
this.rdbStatus6 = new System.Windows.Forms.RadioButton(); |
324 |
this.rdbStatus17 = new System.Windows.Forms.RadioButton(); |
|
325 | 325 |
this.radioButton1 = new System.Windows.Forms.RadioButton(); |
326 | 326 |
this.rdbStatus13 = new System.Windows.Forms.RadioButton(); |
327 | 327 |
this.rdbStatus12 = new System.Windows.Forms.RadioButton(); |
... | ... | |
3973 | 3973 |
| System.Windows.Forms.AnchorStyles.Right))); |
3974 | 3974 |
this.panel5.BackColor = System.Drawing.Color.Red; |
3975 | 3975 |
this.panel5.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; |
3976 |
this.panel5.Controls.Add(this.rdbStatus17); |
|
3976 | 3977 |
this.panel5.Controls.Add(this.btnRestore); |
3977 | 3978 |
this.panel5.Controls.Add(this.rdbStatus16); |
3978 | 3979 |
this.panel5.Controls.Add(this.rdbStatus8); |
3979 | 3980 |
this.panel5.Controls.Add(this.rdbStatus6); |
3980 |
this.panel5.Controls.Add(this.rdbStatus17); |
|
3981 | 3981 |
this.panel5.Controls.Add(this.radioButton1); |
3982 | 3982 |
this.panel5.Controls.Add(this.rdbStatus13); |
3983 | 3983 |
this.panel5.Controls.Add(this.rdbStatus12); |
... | ... | |
3996 | 3996 |
this.panel5.Size = new System.Drawing.Size(1204, 44); |
3997 | 3997 |
this.panel5.TabIndex = 0; |
3998 | 3998 |
// |
3999 |
// rdbStatus17 |
|
4000 |
// |
|
4001 |
this.rdbStatus17.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) |
|
4002 |
| System.Windows.Forms.AnchorStyles.Right))); |
|
4003 |
this.rdbStatus17.AutoSize = true; |
|
4004 |
this.rdbStatus17.BackColor = System.Drawing.Color.Transparent; |
|
4005 |
this.rdbStatus17.Font = new System.Drawing.Font("MS 明朝", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128))); |
|
4006 |
this.rdbStatus17.ForeColor = System.Drawing.Color.White; |
|
4007 |
this.rdbStatus17.Location = new System.Drawing.Point(282, 23); |
|
4008 |
this.rdbStatus17.Name = "rdbStatus17"; |
|
4009 |
this.rdbStatus17.Size = new System.Drawing.Size(94, 20); |
|
4010 |
this.rdbStatus17.TabIndex = 100; |
|
4011 |
this.rdbStatus17.Text = "特殊工事"; |
|
4012 |
this.rdbStatus17.UseVisualStyleBackColor = false; |
|
4013 |
this.rdbStatus17.Visible = false; |
|
4014 |
// |
|
3999 | 4015 |
// btnRestore |
4000 | 4016 |
// |
4001 | 4017 |
this.btnRestore.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); |
... | ... | |
4027 | 4043 |
this.rdbStatus16.Text = "空家補修工事"; |
4028 | 4044 |
this.rdbStatus16.UseVisualStyleBackColor = false; |
4029 | 4045 |
this.rdbStatus16.CheckedChanged += new System.EventHandler(this.rdbStatusCheckedChanged); |
4046 |
this.rdbStatus16.Validating += new System.ComponentModel.CancelEventHandler(this.rdbStatus_Validating); |
|
4030 | 4047 |
// |
4031 | 4048 |
// rdbStatus8 |
4032 | 4049 |
// |
... | ... | |
4043 | 4060 |
this.rdbStatus8.Text = "一般補修工事"; |
4044 | 4061 |
this.rdbStatus8.UseVisualStyleBackColor = false; |
4045 | 4062 |
this.rdbStatus8.CheckedChanged += new System.EventHandler(this.rdbStatusCheckedChanged); |
4063 |
this.rdbStatus8.Validating += new System.ComponentModel.CancelEventHandler(this.rdbStatus_Validating); |
|
4046 | 4064 |
// |
4047 | 4065 |
// rdbStatus6 |
4048 | 4066 |
// |
... | ... | |
4059 | 4077 |
this.rdbStatus6.Text = "施工開始"; |
4060 | 4078 |
this.rdbStatus6.UseVisualStyleBackColor = false; |
4061 | 4079 |
this.rdbStatus6.CheckedChanged += new System.EventHandler(this.rdbStatusCheckedChanged); |
4080 |
this.rdbStatus6.Validating += new System.ComponentModel.CancelEventHandler(this.rdbStatus_Validating); |
|
4062 | 4081 |
// |
4063 |
// rdbStatus17 |
|
4064 |
// |
|
4065 |
this.rdbStatus17.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) |
|
4066 |
| System.Windows.Forms.AnchorStyles.Right))); |
|
4067 |
this.rdbStatus17.AutoSize = true; |
|
4068 |
this.rdbStatus17.BackColor = System.Drawing.Color.Transparent; |
|
4069 |
this.rdbStatus17.Font = new System.Drawing.Font("MS 明朝", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128))); |
|
4070 |
this.rdbStatus17.ForeColor = System.Drawing.Color.White; |
|
4071 |
this.rdbStatus17.Location = new System.Drawing.Point(282, 23); |
|
4072 |
this.rdbStatus17.Name = "rdbStatus17"; |
|
4073 |
this.rdbStatus17.Size = new System.Drawing.Size(145, 20); |
|
4074 |
this.rdbStatus17.TabIndex = 90; |
|
4075 |
this.rdbStatus17.Text = "山本組特殊工事"; |
|
4076 |
this.rdbStatus17.UseVisualStyleBackColor = false; |
|
4077 |
this.rdbStatus17.Visible = false; |
|
4078 |
this.rdbStatus17.CheckedChanged += new System.EventHandler(this.rdbStatusCheckedChanged); |
|
4079 |
// |
|
4080 | 4082 |
// radioButton1 |
4081 | 4083 |
// |
4082 | 4084 |
this.radioButton1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) |
... | ... | |
4147 | 4149 |
this.rdbStatus10.Text = "請求確認"; |
4148 | 4150 |
this.rdbStatus10.UseVisualStyleBackColor = false; |
4149 | 4151 |
this.rdbStatus10.CheckedChanged += new System.EventHandler(this.rdbStatusCheckedChanged); |
4152 |
this.rdbStatus10.Validating += new System.ComponentModel.CancelEventHandler(this.rdbStatus_Validating); |
|
4150 | 4153 |
// |
4151 | 4154 |
// rdbStatus9 |
4152 | 4155 |
// |
... | ... | |
4163 | 4166 |
this.rdbStatus9.Text = "請求準備"; |
4164 | 4167 |
this.rdbStatus9.UseVisualStyleBackColor = false; |
4165 | 4168 |
this.rdbStatus9.CheckedChanged += new System.EventHandler(this.rdbStatusCheckedChanged); |
4169 |
this.rdbStatus9.Validating += new System.ComponentModel.CancelEventHandler(this.rdbStatus_Validating); |
|
4166 | 4170 |
// |
4167 | 4171 |
// rdbStatus7 |
4168 | 4172 |
// |
... | ... | |
4179 | 4183 |
this.rdbStatus7.Text = "施工完了"; |
4180 | 4184 |
this.rdbStatus7.UseVisualStyleBackColor = false; |
4181 | 4185 |
this.rdbStatus7.CheckedChanged += new System.EventHandler(this.rdbStatusCheckedChanged); |
4186 |
this.rdbStatus7.Validating += new System.ComponentModel.CancelEventHandler(this.rdbStatus_Validating); |
|
4182 | 4187 |
// |
4183 | 4188 |
// rdbStatus11 |
4184 | 4189 |
// |
... | ... | |
4195 | 4200 |
this.rdbStatus11.Text = "仮 受 注"; |
4196 | 4201 |
this.rdbStatus11.UseVisualStyleBackColor = false; |
4197 | 4202 |
this.rdbStatus11.CheckedChanged += new System.EventHandler(this.rdbStatusCheckedChanged); |
4203 |
this.rdbStatus11.Validating += new System.ComponentModel.CancelEventHandler(this.rdbStatus_Validating); |
|
4198 | 4204 |
// |
4199 | 4205 |
// rdbStatus2 |
4200 | 4206 |
// |
... | ... | |
4211 | 4217 |
this.rdbStatus2.Text = "受 注"; |
4212 | 4218 |
this.rdbStatus2.UseVisualStyleBackColor = false; |
4213 | 4219 |
this.rdbStatus2.CheckedChanged += new System.EventHandler(this.rdbStatusCheckedChanged); |
4220 |
this.rdbStatus2.Validating += new System.ComponentModel.CancelEventHandler(this.rdbStatus_Validating); |
|
4214 | 4221 |
// |
4215 | 4222 |
// rdbStatus5 |
4216 | 4223 |
// |
... | ... | |
4227 | 4234 |
this.rdbStatus5.Text = "施工準備"; |
4228 | 4235 |
this.rdbStatus5.UseVisualStyleBackColor = false; |
4229 | 4236 |
this.rdbStatus5.CheckedChanged += new System.EventHandler(this.rdbStatusCheckedChanged); |
4237 |
this.rdbStatus5.Validating += new System.ComponentModel.CancelEventHandler(this.rdbStatus_Validating); |
|
4230 | 4238 |
// |
4231 | 4239 |
// rdbStatus4 |
4232 | 4240 |
// |
... | ... | |
4243 | 4251 |
this.rdbStatus4.Text = "部署引継"; |
4244 | 4252 |
this.rdbStatus4.UseVisualStyleBackColor = false; |
4245 | 4253 |
this.rdbStatus4.CheckedChanged += new System.EventHandler(this.rdbStatusCheckedChanged); |
4254 |
this.rdbStatus4.Validating += new System.ComponentModel.CancelEventHandler(this.rdbStatus_Validating); |
|
4246 | 4255 |
// |
4247 | 4256 |
// rdbStatus3 |
4248 | 4257 |
// |
... | ... | |
4275 | 4284 |
this.rdbStatus1.Text = "見積提出"; |
4276 | 4285 |
this.rdbStatus1.UseVisualStyleBackColor = false; |
4277 | 4286 |
this.rdbStatus1.CheckedChanged += new System.EventHandler(this.rdbStatusCheckedChanged); |
4287 |
this.rdbStatus1.Validating += new System.ComponentModel.CancelEventHandler(this.rdbStatus_Validating); |
|
4278 | 4288 |
// |
4279 | 4289 |
// rdbStatus0 |
4280 | 4290 |
// |
... | ... | |
4336 | 4346 |
this.Load += new System.EventHandler(this.FrmConstructionBaseInfo_Load); |
4337 | 4347 |
this.Shown += new System.EventHandler(this.FrmConstructionBaseInfo_Shown); |
4338 | 4348 |
this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.FrmConstructionBaseInfo_KeyDown); |
4349 |
this.Validating += new System.ComponentModel.CancelEventHandler(this.rdbStatus_Validating); |
|
4339 | 4350 |
this.BasePanel.ResumeLayout(false); |
4340 | 4351 |
this.tableLayoutPanel2.ResumeLayout(false); |
4341 | 4352 |
this.panel10.ResumeLayout(false); |
... | ... | |
4412 | 4423 |
private System.Windows.Forms.RadioButton rdbStatus12; |
4413 | 4424 |
private System.Windows.Forms.Button btnApprovalList; |
4414 | 4425 |
private System.Windows.Forms.Button btnOtherProc; |
4415 |
private System.Windows.Forms.RadioButton rdbStatus17; |
|
4416 | 4426 |
private System.Windows.Forms.RadioButton radioButton1; |
4417 | 4427 |
private System.Windows.Forms.RadioButton rdbStatus16; |
4418 | 4428 |
private System.Windows.Forms.Label lblJointLabel; |
... | ... | |
4662 | 4672 |
private System.Windows.Forms.Label lblProgress; |
4663 | 4673 |
private System.Windows.Forms.TrackBar trkProgress; |
4664 | 4674 |
private System.Windows.Forms.NumericUpDown numProgress; |
4675 |
private System.Windows.Forms.RadioButton rdbStatus17; |
|
4665 | 4676 |
} |
4666 | 4677 |
} |
trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionBaseInfo/FrmConstructionBaseInfoAuxiliary.cs | ||
---|---|---|
56 | 56 |
SetcmbConstructionPeriod(); // ?c??? |
57 | 57 |
SetDepartmentCombbox(); // ???? |
58 | 58 |
SetcmbPersonInCharge(); // ?S???? |
59 |
//SetConstrManCombbox(); // ?H???S????i???p????????????j
|
|
59 |
//SetConstrManCombbox(); // ?H???S????i???p????????????j |
|
60 | 60 |
SetcmbDivisionCombBox(); // ??????? |
61 | 61 |
SetcmbConstructionTypeCombBox(); // ?H????? |
62 | 62 |
SetcmbTransferConstructionCombBox(); // ?H?????p |
... | ... | |
619 | 619 |
return false; |
620 | 620 |
} |
621 | 621 |
|
622 |
// ?{?H?J?n???E?I?????????`?F?b?N |
|
623 |
DateTime dtwork = CommonMotions.cnvUndecidedStringToDate(m_DspCtrl[(int)DspCnt.ConstructionStartingDate].Text); |
|
624 |
if(DateTime.Today.Date < dtwork.Date) |
|
625 |
{ |
|
626 |
// ?w?i?F??X |
|
627 |
CommonMotions.chgBackColor(m_DspCtrl[(int)DspCnt.ConstructionStartingDate], false); |
|
628 |
MessageBox.Show("?{?H?J?n??????????t????????????B", "?f?[?^?m?F", MessageBoxButtons.OK, MessageBoxIcon.Warning); |
|
629 |
return false; |
|
630 |
} |
|
631 |
dtwork = CommonMotions.cnvUndecidedStringToDate(m_DspCtrl[(int)DspCnt.ConstructionCompletionDate].Text); |
|
632 |
if (DateTime.Today.Date < dtwork.Date) |
|
633 |
{ |
|
634 |
// ?w?i?F??X |
|
635 |
CommonMotions.chgBackColor(m_DspCtrl[(int)DspCnt.ConstructionCompletionDate], false); |
|
636 |
MessageBox.Show("?{?H?I????????????t????????????B", "?f?[?^?m?F", MessageBoxButtons.OK, MessageBoxIcon.Warning); |
|
637 |
return false; |
|
638 |
} |
|
639 |
|
|
622 | 640 |
// ???????O??`?F?b?N |
623 | 641 |
List<int> FieldNo = new List<int>(); |
624 | 642 |
if (!CheckCurrentTerm(ref FieldNo)) |
... | ... | |
631 | 649 |
} |
632 | 650 |
strMsg.Append("???????????????????A\r\n?o?^??????????????????H"); |
633 | 651 |
DialogResult drAns = MessageBox.Show(strMsg.ToString() |
634 |
, "?f?[?^?m?F" |
|
635 |
, MessageBoxButtons.OKCancel, MessageBoxIcon.Warning); |
|
652 |
, "?f?[?^?m?F"
|
|
653 |
, MessageBoxButtons.OKCancel, MessageBoxIcon.Warning);
|
|
636 | 654 |
|
637 | 655 |
if (drAns == DialogResult.Cancel) return false; |
638 | 656 |
} |
... | ... | |
1340 | 1358 |
|
1341 | 1359 |
lblLastUpdate.Text = "?V?K??"; |
1342 | 1360 |
|
1361 |
m_BeforeObject = rdbStatus0; |
|
1362 |
|
|
1343 | 1363 |
// ??????????Z?b?g |
1344 | 1364 |
SetBillingTypeName(); |
1345 | 1365 |
// ????????A???t?O???b?h??????? |
... | ... | |
1524 | 1544 |
{ |
1525 | 1545 |
case (int)CommonDefine.StatNumArray.Status0: |
1526 | 1546 |
rdbStatus0.Checked = true; |
1547 |
m_BeforeObject = rdbStatus0; |
|
1527 | 1548 |
break; |
1528 | 1549 |
case (int)CommonDefine.StatNumArray.Status1: |
1529 | 1550 |
rdbStatus1.Checked = true; |
1551 |
m_BeforeObject = rdbStatus1; |
|
1530 | 1552 |
break; |
1531 | 1553 |
case (int)CommonDefine.StatNumArray.Status2: |
1532 | 1554 |
rdbStatus8.Checked = true; |
1555 |
m_BeforeObject = rdbStatus8; |
|
1533 | 1556 |
break; |
1534 | 1557 |
case (int)CommonDefine.StatNumArray.Status3: |
1535 | 1558 |
rdbStatus11.Checked = true; |
1559 |
m_BeforeObject = rdbStatus11; |
|
1536 | 1560 |
break; |
1537 | 1561 |
case (int)CommonDefine.StatNumArray.Status4: |
1538 | 1562 |
rdbStatus2.Checked = true; |
1563 |
m_BeforeObject = rdbStatus2; |
|
1539 | 1564 |
break; |
1540 | 1565 |
case (int)CommonDefine.StatNumArray.Status5: |
1541 | 1566 |
rdbStatus4.Checked = true; |
1542 | 1567 |
rdbStatusHikitugiFlg.Checked = true; |
1568 |
m_BeforeObject = rdbStatus4; |
|
1543 | 1569 |
break; |
1544 | 1570 |
case (int)CommonDefine.StatNumArray.Status6: |
1545 | 1571 |
rdbStatus5.Checked = true; |
1572 |
m_BeforeObject = rdbStatus5; |
|
1546 | 1573 |
break; |
1547 | 1574 |
case (int)CommonDefine.StatNumArray.Status7: |
1548 | 1575 |
rdbStatus6.Checked = true; |
1576 |
m_BeforeObject = rdbStatus6; |
|
1549 | 1577 |
break; |
1550 | 1578 |
case (int)CommonDefine.StatNumArray.Status8: |
1551 | 1579 |
rdbStatus7.Checked = true; |
1580 |
m_BeforeObject = rdbStatus7; |
|
1552 | 1581 |
break; |
1553 | 1582 |
case (int)CommonDefine.StatNumArray.Status9: |
1554 | 1583 |
rdbStatus9.Checked = true; |
1584 |
m_BeforeObject = rdbStatus9; |
|
1555 | 1585 |
break; |
1556 | 1586 |
case (int)CommonDefine.StatNumArray.Status10: |
1557 | 1587 |
rdbStatus10.Checked = true; |
1588 |
m_BeforeObject = rdbStatus10; |
|
1558 | 1589 |
break; |
1559 | 1590 |
case (int)CommonDefine.StatNumArray.Status11: |
1560 | 1591 |
rdbStatus3.Checked = true; |
1561 | 1592 |
m_EditLock = true; // ?Q?? |
1593 |
m_BeforeObject = rdbStatus3; |
|
1562 | 1594 |
break; |
1563 | 1595 |
case (int)CommonDefine.StatNumArray.Status16: |
1564 | 1596 |
rdbStatus16.Checked = true; |
1597 |
m_BeforeObject = rdbStatus16; |
|
1565 | 1598 |
break; |
1566 | 1599 |
case (int)CommonDefine.StatNumArray.Status17: |
1567 | 1600 |
rdbStatus17.Checked = true; |
1601 |
m_BeforeObject = rdbStatus17; |
|
1568 | 1602 |
break; |
1569 | 1603 |
} |
1570 | 1604 |
#endregion |
... | ... | |
3184 | 3218 |
cmbConstructionPeriod.Items.Clear(); |
3185 | 3219 |
cmbConstructionPeriod.Text = ""; |
3186 | 3220 |
|
3187 |
// ?????Z?b?g?i-2?N?`+2?N?j |
|
3221 |
// ?????Z?b?g?i-2?N?`+2?N?j->?i-1?N?`+1?N?j
|
|
3188 | 3222 |
int NowPeriod = CommonMotions.SystemMasterData.BusinessPeriod; |
3189 |
if (NowPeriod > 2) cmbConstructionPeriod.Items.Add((NowPeriod - 2).ToString()); |
|
3223 |
//if (NowPeriod > 2) cmbConstructionPeriod.Items.Add((NowPeriod - 2).ToString());
|
|
3190 | 3224 |
if (NowPeriod > 1) cmbConstructionPeriod.Items.Add((NowPeriod - 1).ToString()); |
3191 |
cmbConstructionPeriod.Items.Add(NowPeriod.ToString()); |
|
3225 |
int nIndex = cmbConstructionPeriod.Items.Add(NowPeriod.ToString());
|
|
3192 | 3226 |
cmbConstructionPeriod.Items.Add((NowPeriod + 1).ToString()); |
3193 |
cmbConstructionPeriod.Items.Add((NowPeriod + 2).ToString()); |
|
3227 |
//cmbConstructionPeriod.Items.Add((NowPeriod + 2).ToString());
|
|
3194 | 3228 |
|
3195 | 3229 |
// ???G?Z?b?g |
3196 |
if (cmbConstructionPeriod.Items.Count == 5) |
|
3197 |
cmbConstructionPeriod.SelectedIndex = 2; |
|
3198 |
else if (cmbConstructionPeriod.Items.Count == 4) |
|
3199 |
cmbConstructionPeriod.SelectedIndex = 1; |
|
3200 |
else if (cmbConstructionPeriod.Items.Count == 3) |
|
3201 |
cmbConstructionPeriod.SelectedIndex = 0; |
|
3230 |
cmbConstructionPeriod.SelectedIndex = nIndex; |
|
3202 | 3231 |
|
3203 | 3232 |
} |
3204 | 3233 |
catch (Exception ex) |
... | ... | |
3616 | 3645 |
IOConstructionProgressDate cpdDB, |
3617 | 3646 |
bool MsgOn) |
3618 | 3647 |
{ |
3648 |
IOConstructionBaseInfo cbiADB = new IOConstructionBaseInfo(); |
|
3619 | 3649 |
try |
3620 | 3650 |
{ |
3621 | 3651 |
// ?`?F?b?N?{?b?N?X???i???????????? |
... | ... | |
3628 | 3658 |
work.ConstructionCode = CommonMotions.cnvIntFromStringCode(m_DspCtrl[(int)DspCnt.ConstructionCode].Text, "-"); |
3629 | 3659 |
|
3630 | 3660 |
// ?H????{??????? |
3631 |
string strWhere = string.Format(" Where ConstructionCode = {0}", work.ConstructionCode);
|
|
3661 |
string strWhere = cbiADB.CreatePrimarykeyString(work.ConstructionCode);
|
|
3632 | 3662 |
|
3633 |
if (!cbiDB.SelectAction(strWhere, ref workList, false)) |
|
3663 |
//if (!cbiADB.SelectAction(strWhere, ref workList, false)) |
|
3664 |
if (!cbiADB.SelectAction(strWhere, ref workList)) |
|
3634 | 3665 |
{ |
3635 | 3666 |
MessageBox.Show("?H????{???F?o?^?m?F????s????????B", "?o?^?G???[", MessageBoxButtons.OK, MessageBoxIcon.Error); |
3636 | 3667 |
return false; |
... | ... | |
3893 | 3924 |
logger.ErrorFormat("?V?X?e???G???[?F{0}?F{1}", CommonMotions.GetMethodName(), ex.Message); |
3894 | 3925 |
return false; |
3895 | 3926 |
} |
3927 |
finally |
|
3928 |
{ |
|
3929 |
cbiADB.close(); cbiADB = null; |
|
3930 |
} |
|
3896 | 3931 |
} |
3897 | 3932 |
#endregion |
3898 | 3933 |
|
... | ... | |
3935 | 3970 |
for(int i = 0; i < frm.TergetList.Count; i++) |
3936 | 3971 |
{ |
3937 | 3972 |
int nCode = frm.TergetList[i]; |
3938 |
if (!cbiDB.UpdateFeild(nCode |
|
3973 |
// ?X?e?[?^?X??X |
|
3974 |
if (!(bRet = cbiDB.UpdateFeild(nCode |
|
3939 | 3975 |
, (int)IOConstructionBaseInfo.TableColumn.ConstructionStatusFlg |
3940 | 3976 |
, nStatus |
3941 |
, false)) |
|
3942 |
{ |
|
3943 |
bRet = false; |
|
3944 |
break; |
|
3945 |
} |
|
3977 |
, false))) break; |
|
3978 |
|
|
3979 |
// ?X?e?[?^?X?????????t?Z?b?g |
|
3980 |
if (!(bRet = SetSyncDate(cbiDB, nCode))) break; |
|
3946 | 3981 |
} |
3947 | 3982 |
|
3948 | 3983 |
return bRet; |
... | ... | |
3959 | 3994 |
} |
3960 | 3995 |
#endregion |
3961 | 3996 |
|
3997 |
#region ?X?e?[?^?X?????????t?Z?b?g |
|
3998 |
/// <summary> |
|
3999 |
/// ?X?e?[?^?X?????????t?Z?b?g |
|
4000 |
/// </summary> |
|
4001 |
private bool SetSyncDate(IOConstructionBaseInfo cbiDB, int ConstrCode) |
|
4002 |
{ |
|
4003 |
try |
|
4004 |
{ |
|
4005 |
// ???? |
|
4006 |
int iStatusCount = GetStatusForCheckBox(); |
|
4007 |
DateTime wrkDate = DateTime.Now.Date; |
|
4008 |
StringBuilder strSet = new StringBuilder(); |
|
4009 |
switch (iStatusCount) |
|
4010 |
{ |
|
4011 |
case (int)CommonDefine.StatNumArray.Status0: // 0, ?????? |
|
4012 |
break; |
|
4013 |
case (int)CommonDefine.StatNumArray.Status1: // 1, ?????o |
|
4014 |
break; |
|
4015 |
case (int)CommonDefine.StatNumArray.Status2: // 2, ????C?H?? |
|
4016 |
break; |
|
4017 |
case (int)CommonDefine.StatNumArray.Status3: // 3, ?? ?? ?? |
|
4018 |
strSet.AppendFormat(" ProvisionalOrderDate = DATE('{0}')", wrkDate); // ????????? |
|
4019 |
strSet.AppendFormat(" Where ConstructionCode = {0}", ConstrCode); |
|
4020 |
strSet.Append(" And DATE (ProvisionalOrderDate) = DATE ('0001/01/01')"); |
|
4021 |
break; |
|
4022 |
case (int)CommonDefine.StatNumArray.Status4: // 4, ??@?@?? |
|
4023 |
strSet.AppendFormat(" OrderDate = DATE('{0}')", wrkDate); // ??????? |
|
4024 |
strSet.AppendFormat(" Where ConstructionCode = {0}", ConstrCode); |
|
4025 |
strSet.Append(" And DATE (OrderDate) = DATE ('0001/01/01')"); |
|
4026 |
break; |
|
4027 |
case (int)CommonDefine.StatNumArray.Status5: // 5, ???????p |
|
4028 |
strSet.AppendFormat(" TransferConstructionDate = DATE('{0}')", wrkDate); // ???????p?????? |
|
4029 |
strSet.AppendFormat(" Where ConstructionCode = {0}", ConstrCode); |
|
4030 |
strSet.Append(" And DATE (TransferConstructionDate) = DATE ('0001/01/01')"); |
|
4031 |
break; |
|
4032 |
case (int)CommonDefine.StatNumArray.Status6: // 6, ?{?H???? |
|
4033 |
strSet.AppendFormat(" PreparationStartDate = DATE('{0}')", wrkDate); // ?{?H?????J?n?????? |
|
4034 |
strSet.AppendFormat(" Where ConstructionCode = {0}", ConstrCode); |
|
4035 |
strSet.Append(" And DATE (PreparationStartDate) = DATE ('0001/01/01')"); |
|
4036 |
break; |
|
4037 |
case (int)CommonDefine.StatNumArray.Status7: // 7, ?{?H?J?n |
|
4038 |
strSet.AppendFormat(" ConstructionStartingDate = DATE('{0}')", wrkDate); // ?{?H?J?n?????? |
|
4039 |
strSet.AppendFormat(" Where ConstructionCode = {0}", ConstrCode); |
|
4040 |
strSet.Append(" And DATE (ConstructionStartingDate) = DATE ('0001/01/01')"); |
|
4041 |
break; |
|
4042 |
case (int)CommonDefine.StatNumArray.Status8: // 8, ?{?H???? |
|
4043 |
strSet.AppendFormat(" ConstructionCompletionDate = DATE('{0}')", wrkDate); // ?{?H?????????? |
|
4044 |
strSet.AppendFormat(" Where ConstructionCode = {0}", ConstrCode); |
|
4045 |
strSet.Append(" And DATE (ConstructionCompletionDate) = DATE ('0001/01/01')"); |
|
4046 |
break; |
|
4047 |
case (int)CommonDefine.StatNumArray.Status9: // 9, ???????? |
|
4048 |
strSet.AppendFormat(" BillingStartDate = DATE('{0}')", wrkDate); // ?????????J?n?????? |
|
4049 |
strSet.AppendFormat(" Where ConstructionCode = {0}", ConstrCode); |
|
4050 |
strSet.Append(" And DATE (BillingStartDate) = DATE ('0001/01/01')"); |
|
4051 |
break; |
|
4052 |
case (int)CommonDefine.StatNumArray.Status10: // 10, ?????m?F |
|
4053 |
strSet.AppendFormat(" BillingComplateDate = DATE('{0}')", wrkDate); // ?????m?F?????? |
|
4054 |
strSet.AppendFormat(" Where ConstructionCode = {0}", ConstrCode); |
|
4055 |
strSet.Append(" And DATE (BillingComplateDate) = DATE ('0001/01/01')"); |
|
4056 |
break; |
|
4057 |
case (int)CommonDefine.StatNumArray.Status11: // 11, ?? ?? ?? |
|
4058 |
strSet.AppendFormat(" NonOrderDate = DATE('{0}')", wrkDate); // ???????? |
|
4059 |
strSet.AppendFormat(" Where ConstructionCode = {0}", ConstrCode); |
|
4060 |
strSet.Append(" And DATE (NonOrderDate) = DATE ('0001/01/01')"); |
|
4061 |
break; |
|
4062 |
} |
|
4063 |
if (strSet.Length < 1) return true; |
|
4064 |
|
|
4065 |
StringBuilder strSQL = new StringBuilder(); |
|
4066 |
strSQL.Append("Update ConstructionBaseInfo Set"); |
|
4067 |
strSQL.Append(strSet.ToString()); |
|
4068 |
|
|
4069 |
if (!cbiDB.ExecuteNonQuery(strSQL.ToString(), false)) return false; |
|
4070 |
|
|
4071 |
return true; |
|
4072 |
} |
|
4073 |
catch (Exception ex) |
|
4074 |
{ |
|
4075 |
logger.ErrorFormat("?V?X?e???G???[?F{0}?F{1}", CommonMotions.GetMethodName(), ex.Message); |
|
4076 |
return false; |
|
4077 |
} |
|
4078 |
} |
|
4079 |
#endregion |
|
4080 |
|
|
3962 | 4081 |
#region ?????H????e?q??H???I??????????????T?? |
3963 | 4082 |
/// <summary> |
3964 | 4083 |
/// ?????H????e?q??H???I??????????????T?? |
... | ... | |
7119 | 7238 |
} |
7120 | 7239 |
} |
7121 | 7240 |
#endregion |
7241 |
|
|
7242 |
#region ?????m?F?`?F?b?N |
|
7243 |
/// <summary> |
|
7244 |
/// ?????m?F?`?F?b?N |
|
7245 |
/// </summary> |
|
7246 |
/// <returns></returns> |
|
7247 |
private bool ConstrCloseCheck() |
|
7248 |
{ |
|
7249 |
IOProcessApproval AppDB = new IOProcessApproval(); |
|
7250 |
try |
|
7251 |
{ |
|
7252 |
// ?V?K????`?F?b?N?? |
|
7253 |
if (m_ConstructionCode < 1) return true; |
|
7254 |
// ?????m?F??O?????????? |
|
7255 |
if (!rdbStatus10.Checked) return true; |
|
7256 |
|
|
7257 |
StringBuilder builder = new StringBuilder(); |
|
7258 |
builder.Append(AppDB.CreatePrimarykeyString(m_ConstructionCode)); |
|
7259 |
builder.Append(" And SeqNo = 1"); |
|
7260 |
builder.AppendFormat(" And ApprovalStatus != {0}", (int)CommonDefine.ApprovalStatus.Approval); |
|
7261 |
List<ProcessApproval> DataList = new List<ProcessApproval>(); |
|
7262 |
if (!AppDB.SelectAction(builder.ToString(), ref DataList)) return false; |
|
7263 |
if (DataList.Count > 0) |
|
7264 |
{ |
|
7265 |
MessageBox.Show("???F?\???f?[?^?????????A?m?F????????????B", "?????m?F?G???[", MessageBoxButtons.OK, MessageBoxIcon.Error); |
|
7266 |
return false; |
|
7267 |
} |
|
7268 |
|
|
7269 |
return true; |
|
7270 |
} |
|
7271 |
catch (Exception ex) |
|
7272 |
{ |
|
7273 |
logger.ErrorFormat("?V?X?e???G???[?F{0}?F{1}", CommonMotions.GetMethodName(), ex.Message); |
|
7274 |
return false; |
|
7275 |
} |
|
7276 |
finally |
|
7277 |
{ |
|
7278 |
AppDB.close(); AppDB = null; |
|
7279 |
} |
|
7280 |
} |
|
7281 |
#endregion |
|
7122 | 7282 |
} |
7123 | 7283 |
} |
trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionBudget/FrmConstructionBudget.cs | ||
---|---|---|
1000 | 1000 |
} |
1001 | 1001 |
#endregion |
1002 | 1002 |
|
1003 |
|
|
1004 | 1003 |
#region ?Z?????????? |
1005 | 1004 |
/// <summary> |
1006 | 1005 |
/// ?Z?????????? |
trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionLedger/FrmConstructionLedger.cs | ||
---|---|---|
1449 | 1449 |
|
1450 | 1450 |
CommonMotions.EntryEndMessage("?H???????f?[?^"); |
1451 | 1451 |
|
1452 |
m_EndButton = DialogResult.OK; |
|
1452 |
// ?f?[?^?\?? |
|
1453 |
InitDataLoad(); |
|
1453 | 1454 |
|
1455 |
//m_EndButton = DialogResult.OK; |
|
1456 |
|
|
1454 | 1457 |
// ?I?? |
1455 |
this.Close(); |
|
1458 |
//this.Close();
|
|
1456 | 1459 |
} |
1457 | 1460 |
#endregion |
1458 | 1461 |
|
trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionLedger/FrmConstructionLedgerAuxiliary.cs | ||
---|---|---|
183 | 183 |
switch (ProductDefine.ProductType) |
184 | 184 |
{ |
185 | 185 |
case (int)ProductDefine.ProductTypeDef.Originals: |
186 |
// ----- オリジナル版
|
|
186 |
// ----- オリジナル版 |
|
187 | 187 |
case (int)ProductDefine.ProductTypeDef.ProductsModelType2_1: |
188 | 188 |
case (int)ProductDefine.ProductTypeDef.ProductsModelType2_2: |
189 | 189 |
// ----- 製品版(承認バージョン) |
... | ... | |
529 | 529 |
} |
530 | 530 |
// 入力完了後は確定した受注金額を持ってくる |
531 | 531 |
if (LedgerRec.ComplateFlg == (int)ConstructionLedger.CompFlagDef.Complated) OrdersPrice = (int)LedgerRec.OrdersDecisionPrice; |
532 |
|
|
532 |
|
|
533 | 533 |
m_DspLabelCtrl[(int)DspLblCtrlName.OrdersPrice].Text = @"\" + OrdersPrice.ToString("#,0"); // 受注金額 |
534 | 534 |
|
535 | 535 |
// 工事基本情報明細取得 |
... | ... | |
685 | 685 |
break; |
686 | 686 |
|
687 | 687 |
} |
688 |
|
|
688 |
|
|
689 | 689 |
switch (DetailRec.SalaryFlg) |
690 | 690 |
{ |
691 | 691 |
case (int)CommonDefine.SalaryDevision.All: // 全日 |
... | ... | |
733 | 733 |
|
734 | 734 |
strSQL += ", CONSTRUCTIONBASEINFO B, PROCESSAPPROVAL C"; |
735 | 735 |
|
736 |
strSQL += string.Format(" WHERE A.CONSTRUCTIONCODE = {0}",m_ConstructionCode); |
|
736 |
strSQL += string.Format(" WHERE A.CONSTRUCTIONCODE = {0}", m_ConstructionCode);
|
|
737 | 737 |
strSQL += string.Format(" AND A.LINKTYPE = {0}", (int)ConstructionLink.DataTypeDef.JoinType); |
738 | 738 |
strSQL += " AND B.CONSTRUCTIONCODE = A.FLUCTUATIONCODE"; |
739 | 739 |
strSQL += " AND (C.CONSTRUCTIONCODE = B.CONSTRUCTIONCODE"; |
... | ... | |
1545 | 1545 |
try |
1546 | 1546 |
{ |
1547 | 1547 |
DataGridViewEX dgv = dgvAllDisplay; |
1548 |
|
|
1548 |
|
|
1549 | 1549 |
// 支払可能額のカラム位置 |
1550 | 1550 |
int ResultCols = dgv.ColumnCount + (int)ColPayTotal.Results; |
1551 | 1551 |
int OrverCols = dgv.ColumnCount + (int)ColPayTotal.Overpayments; |
... | ... | |
1647 | 1647 |
#endregion |
1648 | 1648 |
|
1649 | 1649 |
#region データ表示処理 |
1650 |
private DateTime m_dtLoadData = DateTime.Now; |
|
1650 | 1651 |
/// <summary> |
1651 | 1652 |
/// 初期時データ取得 |
1652 | 1653 |
/// </summary> |
... | ... | |
1679 | 1680 |
CreateAllTotal(false); |
1680 | 1681 |
/// 現在利益計算 |
1681 | 1682 |
CalculateCurrentProfit(); |
1683 |
|
|
1684 |
// 読込時間を退避する |
|
1685 |
m_dtLoadData = DateTime.Now; |
|
1682 | 1686 |
} |
1683 | 1687 |
catch (Exception ex) |
1684 | 1688 |
{ |
... | ... | |
1783 | 1787 |
// 工事予算書明細データを読み込む |
1784 | 1788 |
StringBuilder strSQL = new StringBuilder(); |
1785 | 1789 |
strSQL.Append(DetailDB.CreatePrimarykeyString(m_ConstructionCode)); |
1786 |
strSQL.AppendFormat(" AND GROUPCOUNT IN ({0}, {1}, {2}, {3}, {4}, {5}, {6}, {7}, {8}, {9}, {10}, {11})",
|
|
1790 |
strSQL.AppendFormat(" AND GROUPCOUNT IN ({0}, {1}, {2}, {3}, {4}, {5}, {6}, {7}, {8}, {9}, {10}, {11})", |
|
1787 | 1791 |
(int)FrmConstructionBudget.DataGroup.CommonTempCosts, // 共通仮設 |
1788 | 1792 |
(int)FrmConstructionBudget.DataGroup.OutSourceCosts, // 外注費 |
1789 | 1793 |
(int)FrmConstructionBudget.DataGroup.MyConstruction, // 自社施工 |
... | ... | |
2039 | 2043 |
// 経費率取得 |
2040 | 2044 |
double dExpenses = CommonMotions.cnvDouble(ObjCurRec[(int)ExpRecDef.AmountConfigRate]); |
2041 | 2045 |
// 経費名称取得 |
2042 |
string strVallue= CommonMotions.cnvString(ObjCurRec[(int)ExpRecDef.ExpensesName]); |
|
2046 |
string strVallue = CommonMotions.cnvString(ObjCurRec[(int)ExpRecDef.ExpensesName]);
|
|
2043 | 2047 |
|
2044 | 2048 |
DataGridViewEX dgv = dgvAllDisplay; |
2045 | 2049 |
object[] RowSetData = new object[dgv.Columns.Count]; |
... | ... | |
2223 | 2227 |
ArrayList DetailList = new ArrayList(); |
2224 | 2228 |
if (!DetailDB.ExecuteReader(strSQL.ToString(), ref DetailList)) return; |
2225 | 2229 |
if (DetailList.Count == 0) return; |
2226 |
|
|
2230 |
|
|
2227 | 2231 |
m_ExpensesList.Clear(); |
2228 | 2232 |
|
2229 | 2233 |
foreach (object[] CurRec in DetailList) |
... | ... | |
2365 | 2369 |
double Estimateprice = 0; |
2366 | 2370 |
double ExecutionAmount = 0; |
2367 | 2371 |
double AmountConfigRate = 0; |
2368 |
SumBudgetDataFromList(FromData, ref Estimateprice, ref ExecutionAmount, ref AmountConfigRate, (int)FrmConstructionBudget.DataGroup.PurchaseCosts);
|
|
2372 |
SumBudgetDataFromList(FromData, ref Estimateprice, ref ExecutionAmount, ref AmountConfigRate, (int)FrmConstructionBudget.DataGroup.PurchaseCosts);
|
|
2369 | 2373 |
DataGridViewEX dgv = dgvAllDisplay; |
2370 | 2374 |
int GroupNo = (int)DataGroup.PurchaseCosts; |
2371 | 2375 |
object[] wrkobj = new object[] { Estimateprice, ExecutionAmount, AmountConfigRate }; |
... | ... | |
2474 | 2478 |
|
2475 | 2479 |
// 内部リストへデータをセットする |
2476 | 2480 |
CreatePersonCosts(GroupNo, DetailRec, bExists, ref RowData); |
2477 |
|
|
2481 |
|
|
2478 | 2482 |
// 一般ユーザーは指導員の給与を見えないようにする |
2479 | 2483 |
if (CheckLeaderOrUser()) DetailRec.SecondString = string.Empty; |
2480 | 2484 |
break; |
... | ... | |
2568 | 2572 |
switch (ProductDefine.ProductType) |
2569 | 2573 |
{ |
2570 | 2574 |
case (int)ProductDefine.ProductTypeDef.Originals: |
2571 |
// ----- オリジナル
|
|
2575 |
// ----- オリジナル |
|
2572 | 2576 |
case (int)ProductDefine.ProductTypeDef.ProductsModelType2_1: |
2573 | 2577 |
case (int)ProductDefine.ProductTypeDef.ProductsModelType2_2: |
2574 | 2578 |
// ----- 製品版(承認バージョン) |
... | ... | |
2629 | 2633 |
SalaryDays = BudgetRec.SalaryDays; // 給与振分日数 |
2630 | 2634 |
RowData[(int)GridColumn.SalaryOnRegist] = BudgetRec.CreatorCosts; // 登録時月額給与 |
2631 | 2635 |
break; |
2632 |
|
|
2636 |
|
|
2633 | 2637 |
case (int)DataGroup.Assistant: // 副担当者 |
2634 | 2638 |
if (BudgetRec.AssistantCode == 0) // 給与振分区分 |
2635 | 2639 |
SalaryFlg = (int)CommonDefine.SalaryDevision.Noting; |
... | ... | |
2714 | 2718 |
//ExecValue = WorkRow.Sum(y => CommonMotions.cnvInt(y.Cells[(int)GridColumn.ExecPrice].Value)); // 実行金額 |
2715 | 2719 |
//PercentValue = WorkRow.Sum(y => CommonMotions.cnvDouble(y.Cells[(int)GridColumn.Percent].Value)); // 構成比率 |
2716 | 2720 |
|
2717 |
ExecValue = WorkRow.Where(x=> !CommonMotions.cnvBool(x.Cells[(int)GridColumn.InvalidLine].Value)) |
|
2721 |
ExecValue = WorkRow.Where(x => !CommonMotions.cnvBool(x.Cells[(int)GridColumn.InvalidLine].Value))
|
|
2718 | 2722 |
.Sum(y => CommonMotions.cnvInt(y.Cells[(int)GridColumn.ExecPrice].Value)); // 実行金額 |
2719 | 2723 |
|
2720 | 2724 |
PercentValue = WorkRow.Where(x => !CommonMotions.cnvBool(x.Cells[(int)GridColumn.InvalidLine].Value)) |
... | ... | |
2751 | 2755 |
{ |
2752 | 2756 |
long lRet = 0; |
2753 | 2757 |
|
2754 |
foreach(DataGridViewRow CurRow in dgvAllDisplay.Rows) |
|
2758 |
foreach (DataGridViewRow CurRow in dgvAllDisplay.Rows)
|
|
2755 | 2759 |
{ |
2756 | 2760 |
int nGroupNo = CommonMotions.cnvInt(CurRow.Cells[(int)GridColumn.GroupCount].Value); |
2757 | 2761 |
// 施工費から担当者給与までの行を加算する |
... | ... | |
2849 | 2853 |
{ |
2850 | 2854 |
int nPo = 0; |
2851 | 2855 |
int i = 0; |
2852 |
foreach(object[] CurObj in DetailList) |
|
2856 |
foreach (object[] CurObj in DetailList)
|
|
2853 | 2857 |
{ |
2854 | 2858 |
// 同じコードの行数を取得する |
2855 | 2859 |
int nCurCode = CommonMotions.cnvInt(CurObj[(int)IOConstructionLedgerDetail.TableColumn.SourceCode]); |
... | ... | |
2994 | 2998 |
RowData[(int)GridColumn.FixFlg] = "*"; |
2995 | 2999 |
RowData[(int)GridColumn.GroupCount] = (int)DataGroup.NetIncome; |
2996 | 3000 |
if (nRowCnt < 1) RowData[(int)GridColumn.ItemName] = s_GroupTitle[(int)DataGroup.NetIncome]; |
3001 |
|
|
2997 | 3002 |
RowData[(int)GridColumn.EstimatePrice] = DispVal[0].ToString("#,0"); |
2998 | 3003 |
RowData[(int)GridColumn.ExecPrice] = DispVal[1].ToString("#,0"); |
2999 | 3004 |
RowData[(int)GridColumn.Percent] = CalculattionPercent((double)DispVal[1]).ToString("0.00"); |
3000 | 3005 |
RowData[(int)GridColumn.OrderPrice] = DispVal[2].ToString("#,0"); |
3006 |
|
|
3001 | 3007 |
RowData[(int)GridColumn.IndependentFlg] = "1"; |
3002 | 3008 |
RowData[(int)GridColumn.SourceCode] = CurCode; |
3003 | 3009 |
// 増減フラグ |
... | ... | |
3601 | 3607 |
{ |
3602 | 3608 |
DataGridView dgv = dgvAllDisplay; |
3603 | 3609 |
bool bRet = false; |
3604 |
foreach(DataGridViewRow CurRow in dgv.Rows) |
|
3610 |
foreach (DataGridViewRow CurRow in dgv.Rows)
|
|
3605 | 3611 |
{ |
3606 | 3612 |
int nNo = CommonMotions.cnvInt(CurRow.Cells[(int)GridColumn.No].Value); |
3607 |
if(nNo==((int)DataGroup.TransportationCosts + 1))
|
|
3613 |
if (nNo == ((int)DataGroup.TransportationCosts + 1))
|
|
3608 | 3614 |
{ |
3609 | 3615 |
bRet = true; |
3610 | 3616 |
break; |
... | ... | |
3722 | 3728 |
{ |
3723 | 3729 |
try |
3724 | 3730 |
{ |
3731 |
// 対象工事番号を取得する |
|
3732 |
List<long> CodeList = GetTargetCode(); |
|
3733 |
|
|
3725 | 3734 |
// 工事詳細台帳明細データを読み込む |
3726 | 3735 |
strcmd.Append("SELECT"); |
3727 | 3736 |
strcmd.Append(" A.*"); |
... | ... | |
3779 | 3788 |
, m_CommonCosts.NormalManagementPublic |
3780 | 3789 |
, m_CommonCosts.NormalManagementPrivate); |
3781 | 3790 |
strcmd.Append(" On EstSum.ConstructionCode = Bdd.ConstructionCode"); |
3782 |
strcmd.AppendFormat(" Where Bdd.ConstructionCode = {0}", m_ConstructionCode); |
|
3791 |
|
|
3792 |
//strcmd.AppendFormat(" Where Bdd.ConstructionCode = {0}", m_ConstructionCode); |
|
3793 |
strcmd.Append(" Where Bdd.ConstructionCode in ("); |
|
3794 |
bool bFirst = false; |
|
3795 |
foreach (long CurCode in CodeList) |
|
3796 |
{ |
|
3797 |
if (bFirst) strcmd.Append(", "); |
|
3798 |
strcmd.AppendFormat(" {0}", CurCode); |
|
3799 |
bFirst = true; |
|
3800 |
} |
|
3801 |
strcmd.Append(")"); |
|
3802 |
|
|
3783 | 3803 |
strcmd.AppendFormat(" AND Bdd.GroupCount = {0}", (int)FrmConstructionBudget.DataGroup.Expenses); |
3784 | 3804 |
strcmd.Append(" Group By Bdd.ConstructionCode) As Budget1 ON Budget1.ConstructionCode = A.SourceCode"); |
3785 | 3805 |
|
3786 | 3806 |
// 施工費取得 |
3787 | 3807 |
strcmd.Append(" LEFT JOIN(Select Bdd.ConstructionCode, SUM(Bdd.EstimatePrice) As SumOdrVal, SUM(Bdd.ExecutionAmount) As SumExecVal"); |
3788 | 3808 |
strcmd.Append(" From ConstructionBudgetdetail As Bdd"); |
3789 |
strcmd.AppendFormat(" WHERE Bdd.ConstructionCode = {0}", m_ConstructionCode); |
|
3809 |
|
|
3810 |
//strcmd.AppendFormat(" WHERE Bdd.ConstructionCode = {0}", m_ConstructionCode); |
|
3811 |
strcmd.Append(" Where Bdd.ConstructionCode in ("); |
|
3812 |
bFirst = false; |
|
3813 |
foreach (long CurCode in CodeList) |
|
3814 |
{ |
|
3815 |
if (bFirst) strcmd.Append(", "); |
|
3816 |
strcmd.AppendFormat(" {0}", CurCode); |
|
3817 |
bFirst = true; |
|
3818 |
} |
|
3819 |
strcmd.Append(")"); |
|
3820 |
|
|
3790 | 3821 |
strcmd.AppendFormat(" AND Bdd.GroupCount In ({0}, {1}, {2})", (int)FrmConstructionBudget.DataGroup.CommonTempCosts |
3791 | 3822 |
, (int)FrmConstructionBudget.DataGroup.OutSourceCosts |
3792 | 3823 |
, (int)FrmConstructionBudget.DataGroup.MyConstruction); |
... | ... | |
3795 | 3826 |
// 諸経費取得 |
3796 | 3827 |
strcmd.Append(" LEFT JOIN(Select Bdd.ConstructionCode, SUM(Bdd.EstimatePrice) As SumOdrVal, SUM(Bdd.ExecutionAmount) As SumExecVal"); |
3797 | 3828 |
strcmd.Append(" From ConstructionBudgetdetail As Bdd"); |
3798 |
strcmd.AppendFormat(" WHERE Bdd.ConstructionCode = {0}", m_ConstructionCode); |
|
3829 |
|
|
3830 |
//strcmd.AppendFormat(" WHERE Bdd.ConstructionCode = {0}", m_ConstructionCode); |
|
3831 |
strcmd.Append(" Where Bdd.ConstructionCode in ("); |
|
3832 |
bFirst = false; |
|
3833 |
foreach (long CurCode in CodeList) |
|
3834 |
{ |
|
3835 |
if (bFirst) strcmd.Append(", "); |
|
3836 |
strcmd.AppendFormat(" {0}", CurCode); |
|
3837 |
bFirst = true; |
|
3838 |
} |
|
3839 |
strcmd.Append(")"); |
|
3840 |
|
|
3799 | 3841 |
strcmd.AppendFormat(" AND Bdd.GroupCount In ({0}, {1}, {2}, {3}, {4}, {5})" |
3800 | 3842 |
, (int)FrmConstructionBudget.DataGroup.PurchaseCosts |
3801 | 3843 |
, (int)FrmConstructionBudget.DataGroup.VehicleLeaseFee |
... | ... | |
3813 | 3855 |
strcmd.AppendFormat(" And EstSumA.ComponentCode in ({0}, {1})) As EstSum", m_CommonCosts.FieldManagementPublic |
3814 | 3856 |
, m_CommonCosts.FieldManagementPrivate); |
3815 | 3857 |
strcmd.Append(" On EstSum.ConstructionCode = Bdd.ConstructionCode"); |
3816 |
strcmd.AppendFormat(" WHERE Bdd.ConstructionCode = {0}", m_ConstructionCode); |
|
3858 |
|
|
3859 |
//strcmd.AppendFormat(" WHERE Bdd.ConstructionCode = {0}", m_ConstructionCode); |
|
3860 |
strcmd.Append(" Where Bdd.ConstructionCode in ("); |
|
3861 |
bFirst = false; |
|
3862 |
foreach (long CurCode in CodeList) |
|
3863 |
{ |
|
3864 |
if (bFirst) strcmd.Append(", "); |
|
3865 |
strcmd.AppendFormat(" {0}", CurCode); |
|
3866 |
bFirst = true; |
|
3867 |
} |
|
3868 |
strcmd.Append(")"); |
|
3869 |
|
|
3817 | 3870 |
strcmd.AppendFormat(" AND Bdd.GroupCount In ({0}, {1}, {2})" |
3818 | 3871 |
, (int)FrmConstructionBudget.DataGroup.InstructorCosts |
3819 | 3872 |
, (int)FrmConstructionBudget.DataGroup.AssistantCosts |
... | ... | |
3829 | 3882 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
3830 | 3883 |
} |
3831 | 3884 |
} |
3885 |
#endregion |
|
3832 | 3886 |
|
3887 |
#region 対象工事番号を取得する |
|
3888 |
/// <summary> |
|
3889 |
/// 対象工事番号を取得する |
|
3890 |
/// </summary> |
|
3891 |
/// <returns></returns> |
|
3892 |
private List<long> GetTargetCode() |
|
3893 |
{ |
|
3894 |
IOConstructionLink LinkDB = new IOConstructionLink(); |
|
3895 |
List<long> GetList = new List<long>(); |
|
3896 |
try |
|
3897 |
{ |
|
3898 |
int iStatus = CommonDefine.ProjectsStatus.First(x => x.Value.Equals("非 受 注")).Key; |
|
3899 |
StringBuilder strSQL = new StringBuilder(); |
|
3900 |
strSQL.Append("Select A.FluctuationCode From constructionlink As A"); |
|
3901 |
strSQL.Append(" Inner Join processapproval As B"); |
|
3902 |
strSQL.Append(" On B.ConstructionCode = A.FluctuationCode"); |
|
3903 |
strSQL.AppendFormat(" And B.ApprovalCode = {0}", (int)ClsExcute.ApprovalListNo.ConstructionBudgetApproval); |
|
3904 |
strSQL.Append(" And B.SeqNo = 1"); |
|
3905 |
strSQL.AppendFormat(" And B.ApprovalStatus = {0}", (int)CommonDefine.ApprovalStatus.Approval); |
|
3906 |
strSQL.Append(" Inner Join constructionbaseinfo As C"); |
|
3907 |
strSQL.Append(" On C.ConstructionCode = A.FluctuationCode"); |
|
3908 |
strSQL.AppendFormat(" And C.ConstructionStatusFlg <> {0}", iStatus); |
|
3909 |
strSQL.AppendFormat(" Where A.ConstructionCode = {0}", m_ConstructionCode); |
|
3910 |
|
|
3911 |
ArrayList getdata = new ArrayList(); |
|
3912 |
if (!LinkDB.ExecuteReader(strSQL.ToString(), ref getdata)) return GetList; |
|
3913 |
|
|
3914 |
GetList.Add(m_ConstructionCode); |
|
3915 |
foreach (object[] curObj in getdata) |
|
3916 |
{ |
|
3917 |
GetList.Add(CommonMotions.cnvLong(curObj[0])); |
|
3918 |
} |
|
3919 |
} |
|
3920 |
catch (Exception ex) |
|
3921 |
{ |
|
3922 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
|
3923 |
} |
|
3924 |
finally |
|
3925 |
{ |
|
3926 |
LinkDB.close(); LinkDB = null; |
|
3927 |
} |
|
3928 |
return GetList; |
|
3929 |
} |
|
3833 | 3930 |
#endregion |
3834 | 3931 |
|
3835 | 3932 |
#region 表示データ読込順 |
... | ... | |
4110 | 4207 |
|
4111 | 4208 |
DateTime ExcuteRec_TargetMonth = CommonMotions.cnvDate(objExcuteRec[DetailCnt]); |
4112 | 4209 |
double ExcuteRec_PaymentAmount = CommonMotions.cnvDouble(objExcuteRec[DetailCnt + 1]); |
4113 |
|
|
4210 |
|
|
4114 | 4211 |
// 年月が最小値はデータ無 |
4115 | 4212 |
if (ExcuteRec_TargetMonth == DateTime.MinValue) break; |
4116 | 4213 |
|
... | ... | |
4393 | 4490 |
PaymentPoint = ix; |
4394 | 4491 |
break; |
4395 | 4492 |
} |
4396 |
|
|
4493 |
|
|
4397 | 4494 |
// 計上月を確認する |
4398 | 4495 |
RowData[PaymentPoint] = dExpenss.ToString("#,0"); |
4399 | 4496 |
|
... | ... | |
4798 | 4895 |
|
4799 | 4896 |
// 追加できるかの判定 |
4800 | 4897 |
int InsertCnt = 0; |
4801 |
if(!CheckNewMakeRow(ref InsertCnt)) return; |
|
4898 |
if (!CheckNewMakeRow(ref InsertCnt)) return;
|
|
4802 | 4899 |
|
4803 | 4900 |
// 選択行が不正ならば処理しない |
4804 | 4901 |
if (InsertCnt == 0) return; |
... | ... | |
5118 | 5215 |
{ |
5119 | 5216 |
if (CommonMotions.cnvInt(dgv.Rows[i].Cells[(int)GridColumn.BlankFlg].Value) == 1) break; |
5120 | 5217 |
if (CommonMotions.cnvInt(dgv.Rows[i].Cells[(int)GridColumn.JoinTitleFlg].Value) == 1) break; |
5121 |
|
|
5218 |
|
|
5122 | 5219 |
// 従属項目がある行は子行を採番する |
5123 | 5220 |
if (CommonMotions.cnvInt(dgv.Rows[i].Cells[(int)GridColumn.IndependentFlg].Value) != 1) |
5124 | 5221 |
{ |
... | ... | |
5336 | 5433 |
, MessageBoxButtons.YesNo, MessageBoxIcon.Question) != DialogResult.Yes) return false; |
5337 | 5434 |
} |
5338 | 5435 |
|
5436 |
// データ最新時間チェック |
|
5437 |
if (!CheckDataLoadTime(LedgerDB, Display)) return false; |
|
5438 |
|
|
5339 | 5439 |
// データ接続 |
5340 | 5440 |
LedgerDB.connect(); LedgerDB.beginTran(); |
5341 | 5441 |
DetailDB.connect(); DetailDB.beginTran(); |
... | ... | |
5651 | 5751 |
CurRec.NameCode = CommonMotions.cnvInt(CurRow.Cells[RCnt].Value); |
5652 | 5752 |
if (CurRec.NameCode < 1) continue; |
5653 | 5753 |
RCnt = (int)GridColumn.Percent; // 経費率 |
5654 |
CurRec.ExpensesRaito = CommonMotions.cnvDouble(CurRow.Cells[RCnt].Value);
|
|
5754 |
CurRec.ExpensesRaito = CommonMotions.cnvDouble(CurRow.Cells[RCnt].Value); |
|
5655 | 5755 |
RCnt = dgv.ColumnCount + (int)ColPayTotal.Totals; // 経費金額 |
5656 | 5756 |
CurRec.ExpensesValue = CommonMotions.cnvLong(CurRow.Cells[RCnt].Value); |
5657 | 5757 |
|
... | ... | |
5830 | 5930 |
|
5831 | 5931 |
// 金額構成率 |
5832 | 5932 |
NewRec.AmountConfigRate = CommonMotions.cnvDouble(wrkRow.Cells[(int)GridColumn.Percent].Value); |
5833 |
|
|
5933 |
|
|
5834 | 5934 |
// 支払補填額 |
5835 | 5935 |
if (GroupCnt == (int)DataGroup.Expenses) NewRec.PaymentBurden = 0; |
5836 | 5936 |
NewRec.PaymentBurden = CommonMotions.cnvDouble(wrkRow.Cells[PaymentBurdenCol].Value); |
... | ... | |
5973 | 6073 |
|
5974 | 6074 |
NewRec.ConstructionCode = m_ConstructionCode; // 工事番号 |
5975 | 6075 |
NewRec.GroupCount = CommonMotions.cnvInt(wrkRow.Cells[(int)GridColumn.GroupCount].Value); // グループ番号 |
5976 |
NewRec.LineCount = RowLineCnt; // 行番号
|
|
6076 |
NewRec.LineCount = RowLineCnt; // 行番号 |
|
5977 | 6077 |
NewRec.ColumnCount = ColCnt; // 列番号 |
5978 | 6078 |
NewRec.PaymentAmount = CommonMotions.cnvDouble(wrkRow.Cells[ColCnt].Value); // 支払金額 |
5979 | 6079 |
string strTarget = CommonMotions.cnvString(dgvAllDisplay.Columns[ColCnt].HeaderCell.Value).Replace("年", "/").Replace("月", "/") + "01"; |
... | ... | |
5989 | 6089 |
#endregion |
5990 | 6090 |
// ---------- データ登録↑↑ |
5991 | 6091 |
|
6092 |
#region データ最新時間チェック |
|
6093 |
/// <summary> |
|
6094 |
/// データ最新時間チェック |
|
6095 |
/// </summary> |
|
6096 |
private bool CheckDataLoadTime(IOConstructionLedger LedgerDB, bool Display) |
|
6097 |
{ |
|
6098 |
FrmCustomMsgBox frm = new FrmCustomMsgBox(); |
|
6099 |
try |
|
6100 |
{ |
|
6101 |
// 画面表示無時処理しない。 |
|
6102 |
if (!Display) return true; |
|
6103 |
|
|
6104 |
StringBuilder strSQL = new StringBuilder(); |
|
6105 |
strSQL.Append("Select Max(UpdateDate) From constructionledgerdetail"); |
|
6106 |
strSQL.AppendFormat(" Where ConstructionCode = {0}", m_ConstructionCode); |
|
6107 |
strSQL.AppendFormat(" And GroupCount = {0}", (int)FrmConstructionLedger.DataGroup.ConstructionCosts); |
|
6108 |
ArrayList arData = new ArrayList(); |
|
6109 |
if (!LedgerDB.ExecuteReader(strSQL.ToString(), ref arData)) return false; |
|
6110 |
if (arData.Count < 1) return true; |
|
6111 |
|
|
6112 |
object[] vs = (object[])arData[0]; |
|
6113 |
DateTime dtwrk = CommonMotions.cnvDate(vs[0]); |
|
6114 |
|
|
6115 |
// 読込時間比較 |
|
6116 |
if (m_dtLoadData < dtwrk) |
|
6117 |
{ |
|
6118 |
// 表示文字表示/非表示 |
|
6119 |
frm.DisplayVisbleType1 = true; |
|
6120 |
frm.DisplayVisbleType2 = false; |
|
6121 |
frm.VisibleType2_1 = false; |
|
6122 |
frm.VisibleType2_2 = false; |
|
6123 |
// Type1表示文字 |
|
6124 |
frm.DisplayTextType1 = "データ読込み後に更新されています!\r\n上書きしますか?\r\n上書きしない場合はCANCEL後、\r\n最新状態に更新して下さい。"; |
|
6125 |
// Type1表示文字色 |
|
6126 |
frm.DisplayTextForeColorType1 = Color.Yellow; |
|
6127 |
frm.DisplayTextBackColorType1 = Color.Black; |
|
6128 |
// Type1表示文字フォント |
|
6129 |
frm.DisplayTextFontType1 = new Font(frm.DisplayTextFontType1.Name, 16f, FontStyle.Bold); |
|
6130 |
|
|
6131 |
frm.ShowDialog(); |
|
6132 |
if (frm.ReturnValue == DialogResult.Cancel) return false; |
|
6133 |
|
|
6134 |
} |
|
6135 |
|
|
6136 |
return true; |
|
6137 |
} |
|
6138 |
catch (System.Exception ex) |
|
6139 |
{ |
|
6140 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
|
6141 |
return false; |
|
6142 |
} |
|
6143 |
finally |
|
6144 |
{ |
|
6145 |
frm.Dispose(); frm = null; |
|
6146 |
} |
|
6147 |
} |
|
6148 |
#endregion |
|
6149 |
|
|
5992 | 6150 |
#region 画面項目のチェック |
5993 | 6151 |
/// <summary> |
5994 | 6152 |
/// 画面項目のチェック |
... | ... | |
6404 | 6562 |
try |
6405 | 6563 |
{ |
6406 | 6564 |
DataGridViewEX dgv = dgvAllDisplay; |
6407 |
|
|
6565 |
|
|
6408 | 6566 |
int ResultCols = dgv.ColumnCount + (int)ColPayTotal.Results; |
6409 | 6567 |
int OverpaymentCols = dgv.ColumnCount + (int)ColPayTotal.Overpayments; |
6410 | 6568 |
|
... | ... | |
6413 | 6571 |
// 実行金額がマイナスの場合は計算しない 2017/09/04 |
6414 | 6572 |
// 利益計が合わなくなるので計算する 2017/10/13 |
6415 | 6573 |
// if (CommonMotions.cnvInt(CurRow.Cells[(int)GridColumn.ExecPrice].Value) < 0) return; |
6416 |
|
|
6574 |
|
|
6417 | 6575 |
int ResultValue = CommonMotions.cnvInt(CurRow.Cells[ResultCols].Value); |
6418 | 6576 |
// 支払可能額がマイナスになったら文字を赤にする |
6419 | 6577 |
if (ResultValue < 0) |
... | ... | |
6596 | 6754 |
/// 担当者/副担当者/指導員にコード・名前をセットする |
6597 | 6755 |
/// </summary> |
6598 | 6756 |
/// <param name="DetailRec"></param> |
6599 |
private void SetFirstStringName(int GroupNo,ref ConstructionBudgetDetail DetailRec) |
|
6757 |
private void SetFirstStringName(int GroupNo, ref ConstructionBudgetDetail DetailRec)
|
|
6600 | 6758 |
{ |
6601 | 6759 |
IOMPersonInCharge PersonDB = new IOMPersonInCharge(); |
6602 | 6760 |
try |
... | ... | |
6635 | 6793 |
|
6636 | 6794 |
DetailRec.FirstString = string.Format("{0}【{1}氏】", s_GroupTitle[GroupNo], PersonRec.SealPrintName); |
6637 | 6795 |
DetailRec.ComponentCode = PersonRec.DepartmentCode; |
6638 |
|
|
6796 |
|
|
6639 | 6797 |
} |
6640 | 6798 |
catch (Exception ex) |
6641 | 6799 |
{ |
... | ... | |
6757 | 6915 |
//int nextRowCnt = CurRow.Index + 1; |
6758 | 6916 |
//if (nextRowCnt < dgv.RowCount) |
6759 | 6917 |
//{ |
6760 |
// 自行は独立項目 |
|
6761 |
//if (CommonMotions.cnvInt(CurRow.Cells[(int)GridColumn.IndependentFlg].Value) == 1) |
他の形式にエクスポート: Unified diff