プロジェクト

全般

プロフィール

リビジョン 273

堀内7年以上前に追加

業者請求明細データ行番号更新処理追加
積算予算書実行金額表示ループの修正

差分を表示:

branches/src/ProcessManagement/ProcessManagement/Common/CommonVersion.cs
14 14
        /// <summary>
15 15
        /// 本体バージョン
16 16
        /// </summary>
17
        public static int s_SystemVersion = 82;
17
        public static int s_SystemVersion = 84;
18 18

  
19 19
        /// <summary>
20 20
        /// コピー・環境バージョン
branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ApprovalScreen/FrmAppScrnAux.cs
319 319
                switch (m_ApprovalCode)
320 320
                {
321 321
                    case (int)ClsExcute.ApprovalListNo.SafetyPatrol:
322
                        // 安全パトロール申請
322 323
                        strSQL.AppendFormat("UPDATE sfpdata SET ORDERNO = {0}", m_OrderNo);
323 324
                        strSQL.AppendFormat(" WHERE ConstructionCode = {0}", m_ConstructionCode);
324 325
                        strSQL.AppendFormat(" AND DataCount = {0}", m_DataCount);
branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionLedger/FrmConstructionLedgerAuxiliary.cs
3976 3976
            IOConstructionLedgerDetail DetailDB = new IOConstructionLedgerDetail();
3977 3977
            IOConstructionLedgerExcute ExcuteDB = new IOConstructionLedgerExcute();
3978 3978
            IOPurchaseOrderDetail PDetailDB = new IOPurchaseOrderDetail();
3979
            IOBillingDataDetail BDetailDB = new IOBillingDataDetail();
3979 3980
            try
3980 3981
            {
3981 3982
                //データチェック
......
3992 3993
                DetailDB.connect(); DetailDB.beginTran();
3993 3994
                ExcuteDB.connect(); ExcuteDB.beginTran();
3994 3995
                PDetailDB.connect(); PDetailDB.beginTran();
3996
                BDetailDB.connect(); BDetailDB.beginTran();
3995 3997

  
3996 3998
                // 詳細台帳データ
3997 3999
                if (!ConstructionLedgerDataEntry(LedgerDB))
......
4001 4003
                }
4002 4004

  
4003 4005
                // 詳細台帳明細データ
4004
                if (!ConstructionLedgerDetailEntry(DetailDB, PDetailDB))
4006
                if (!ConstructionLedgerDetailEntry(DetailDB, PDetailDB, BDetailDB))
4005 4007
                {
4006 4008
                    LedgerDB.rollback();
4007 4009
                    DetailDB.rollback();
4008 4010
                    PDetailDB.rollback();
4011
                    BDetailDB.rollback();
4009 4012
                    return false;
4010 4013
                }
4011 4014

  
......
4016 4019
                    DetailDB.rollback();
4017 4020
                    ExcuteDB.rollback();
4018 4021
                    PDetailDB.rollback();
4022
                    BDetailDB.rollback();
4019 4023
                    return false;
4020 4024
                }
4021 4025

  
......
4024 4028
                DetailDB.commit();
4025 4029
                ExcuteDB.commit();
4026 4030
                PDetailDB.commit();
4031
                BDetailDB.commit();
4027 4032

  
4028 4033
                // データ変更フラグOff
4029 4034
                m_bChengeAns = false;
......
4040 4045
                LedgerDB.close(); LedgerDB = null;
4041 4046
                DetailDB.close(); DetailDB = null;
4042 4047
                ExcuteDB.close(); ExcuteDB = null;
4048
                PDetailDB.close(); PDetailDB = null;
4049
                BDetailDB.close(); BDetailDB = null;
4043 4050
            }
4044 4051
        }
4045 4052
        #endregion
......
4269 4276
        /// <summary>
4270 4277
        /// 工事詳細台帳データ明細登録
4271 4278
        /// </summary>
4272
        private bool ConstructionLedgerDetailEntry(IOConstructionLedgerDetail DetailDB, IOPurchaseOrderDetail PDetailDB)
4279
        private bool ConstructionLedgerDetailEntry(IOConstructionLedgerDetail DetailDB,
4280
                                                    IOPurchaseOrderDetail PDetailDB,
4281
                                                    IOBillingDataDetail BDetailDB)
4273 4282
        {
4274 4283
            try
4275 4284
            {
......
4340 4349

  
4341 4350
                } // iRows
4342 4351

  
4352
                // 登録
4343 4353
                if (NewList.Count > 0)
4344 4354
                {
4345 4355
                    if (!DetailDB.InsertAction(NewList, false))
......
4349 4359
                    }
4350 4360
                }
4351 4361

  
4362
                // ----- 登録後処理
4352 4363
                if (PDetailList.Count > 0)
4353 4364
                {
4365
                    // 注文書明細データ行番号更新
4354 4366
                    if (!SetPurchaseOrderDetailLineCount(PDetailDB, PDetailList))
4355 4367
                    {
4356 4368
                        MessageBox.Show("注文書明細データ:更新登録に失敗しました。", "登録エラー", MessageBoxButtons.OK, MessageBoxIcon.Error);
4357 4369
                        return false;
4358 4370
                    }
4371

  
4372
                    // 業者請求明細データ行番号更新
4373
                    if (!SetBillingDataDetailLineCount(BDetailDB, PDetailList))
4374
                    {
4375
                        MessageBox.Show("業者請求明細データ:更新登録に失敗しました。", "登録エラー", MessageBoxButtons.OK, MessageBoxIcon.Error);
4376
                        return false;
4377
                    }
4359 4378
                }
4360 4379

  
4361 4380
                return true;
......
4608 4627
            }
4609 4628
        }
4610 4629
        #endregion
4630

  
4631
        #region 業者請求明細台帳行番号更新
4632
        /// <summary>
4633
        /// 業者請求明細台帳行番号更新
4634
        /// </summary>
4635
        private bool SetBillingDataDetailLineCount(IOBillingDataDetail BDetailDB, List<KeyValuePair<int, int>> PDetailList)
4636
        {
4637
            try
4638
            {
4639
                StringBuilder strSQL = new StringBuilder();
4640
                List<BillingDataDetail> DataList = new List<BillingDataDetail>();
4641
                foreach (KeyValuePair<int, int> CurCount in PDetailList)
4642
                {
4643
                    // 行番号変化リストより更新を行う
4644
                    strSQL.Clear();
4645
                    strSQL.AppendFormat(" Where CONSTRUCTIONCODE = {0}", m_ConstructionCode);
4646
                    strSQL.AppendFormat(" And CONSTRUCTIONROWCNT = {0}", CurCount.Key);
4647
                    DataList.Clear();
4648
                    if (!BDetailDB.SelectAction(strSQL.ToString(), ref DataList, false)) return false;
4649
                    // 注文書が無い場合は処理しない
4650
                    if (DataList.Count == 0) continue;
4651

  
4652
                    // 注文書があれば行番号を更新する
4653
                    strSQL.Clear();
4654
                    strSQL.Append("UPDATE billingdatadetail");
4655
                    strSQL.Append(" SET");
4656
                    strSQL.AppendFormat(" CONSTRUCTIONROWCNT = {0}", CurCount.Value);
4657
                    strSQL.Append(BDetailDB.CreatePrimarykeyString(DataList[0].CompanyCode,
4658
                                                                    DataList[0].TargetDate,
4659
                                                                    DataList[0].SeqNo,
4660
                                                                    DataList[0].LineCount));
4661
                    if (!BDetailDB.ExecuteNonQuery(strSQL.ToString(), false)) return false;
4662
                }
4663
                return true;
4664
            }
4665
            catch (System.Exception ex)
4666
            {
4667
                logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message);
4668
                return false;
4669
            }
4670
        }
4671
        #endregion
4611 4672
        // ---------- データ登録↑↑
4612 4673

  
4613 4674
        #region 画面項目のチェック
branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/EstimateBudget/FrmEstimateBudgetAuxiliary.cs
3050 3050
                m_dispLabelControl[(int)DispControl.ConstructionTime].Text = m_ConstructionTimes.ToString("0.00");
3051 3051

  
3052 3052
                DataGridView dgv = dgvAllDisplay;
3053
                int nGroupCount=0;
3054
                int nComponentCode=0;
3055
                int nSubContractorCode=0;
3056
                string strFirstString=string.Empty;
3057
                string strSecondString=string.Empty;
3058
                int GetData = -1;
3053 3059
                foreach (DataGridViewRow wrkRow in dgv.Rows)
3054 3060
                {
3055 3061
                    // 小計を計算する
......
3074 3080

  
3075 3081
                    // グリッドデータのグループで金額を取得する
3076 3082
                    string Notes = string.Empty;
3077
                    int GetData = GetSaveDataToNegotiationPrice(CommonMotions.cnvInt(wrkRow.Cells[(int)DispGridColumn.GroupCount].Value),
3078
                                                                CommonMotions.cnvInt(wrkRow.Cells[(int)DispGridColumn.ComponentCode].Value),
3079
                                                                CommonMotions.cnvInt(wrkRow.Cells[(int)DispGridColumn.SubContractorCode].Value),
3080
                                                                CommonMotions.cnvString(wrkRow.Cells[(int)DispGridColumn.FirstString].Value),
3081
                                                                CommonMotions.cnvString(wrkRow.Cells[(int)DispGridColumn.SecondString].Value),
3083
                    nGroupCount = CommonMotions.cnvInt(wrkRow.Cells[(int)DispGridColumn.GroupCount].Value);
3084
                    nComponentCode = CommonMotions.cnvInt(wrkRow.Cells[(int)DispGridColumn.ComponentCode].Value);
3085
                    nSubContractorCode = CommonMotions.cnvInt(wrkRow.Cells[(int)DispGridColumn.SubContractorCode].Value);
3086
                    strFirstString = CommonMotions.cnvString(wrkRow.Cells[(int)DispGridColumn.FirstString].Value);
3087
                    strSecondString = CommonMotions.cnvString(wrkRow.Cells[(int)DispGridColumn.SecondString].Value);
3088
                    GetData = -1;
3089
                    GetData = GetSaveDataToNegotiationPrice(nGroupCount,
3090
                                                                nComponentCode,
3091
                                                                nSubContractorCode,
3092
                                                                strFirstString,
3093
                                                                strSecondString,
3082 3094
                                                                ref Notes);
3083 3095
                    // 注意事項
3084 3096
                    wrkRow.Cells[(int)DispGridColumn.Notes].Value = Notes;
3085 3097

  
3086 3098
                    // 交渉金額復元
3087
                    if (GetData != -1)
3088
                    {
3089
                        wrkRow.Cells[(int)DispGridColumn.NegotiationPrice].Value = GetData.ToString("#,0");
3090
                    }
3099
                    if (GetData == -1) continue;
3100

  
3101
                    wrkRow.Cells[(int)DispGridColumn.NegotiationPrice].Value = GetData.ToString("#,0");
3091 3102
                }
3092 3103
            }
3093 3104
            catch (System.Exception ex)
branches/src/ProcessManagement/ProcessManagement/Properties/AssemblyInfo.cs
32 32
// すべての値を指定するか、下のように '*' を使ってビルドおよびリビジョン番号を 
33 33
// 既定値にすることができます:
34 34
// [assembly: AssemblyVersion("1.0.*")]
35
[assembly: AssemblyVersion("1.0.0.82")]
36
[assembly: AssemblyFileVersion("1.0.0.82")]
35
[assembly: AssemblyVersion("1.0.0.84")]
36
[assembly: AssemblyFileVersion("1.0.0.84")]
37 37
// Log4netを使用する
38 38
[assembly: log4net.Config.XmlConfigurator(ConfigFile = @"log4net.config", Watch = true)]

他の形式にエクスポート: Unified diff