プロジェクト

全般

プロフィール

リビジョン 228

堀内7年以上前に追加

積算見積・積算予算承認処理、割付チェック不具合修正

差分を表示:

branches/src/ProcessManagement/ProcessManagement/Common/CommonDefine.cs
1720 1720
        /// </summary>
1721 1721
        public static int s_DefalutShiftValue = 30;
1722 1722
        #endregion
1723

  
1724
        #region 画面終了時ボタン
1725
        /// <summary>
1726
        /// 画面終了時ボタン
1727
        /// </summary>
1728
        public enum FormEndButton
1729
        {
1730
            /// <summary>
1731
            /// 登録時終了
1732
            /// </summary>
1733
            AsSaved = 0,
1734
            /// <summary>
1735
            /// 削除時終了
1736
            /// </summary>
1737
            AsRemoved,
1738
            /// <summary>
1739
            /// 普通終了
1740
            /// </summary>
1741
            AsNormalEnd,
1742
        }
1743
        #endregion
1723 1744
    }
1724 1745
}
branches/src/ProcessManagement/ProcessManagement/Common/CommonVersion.cs
14 14
        /// <summary>
15 15
        /// 本体バージョン
16 16
        /// </summary>
17
        public static int s_SystemVersion = 52;
17
        public static int s_SystemVersion = 53;
18 18

  
19 19
        /// <summary>
20 20
        /// コピー・環境バージョン
branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionBaseInfo/FrmConstructionBaseInfoAuxiliary.cs
20 20
using ProcessManagement.Forms.CustomControls;
21 21
using ProcessManagement.Forms.ControlsAction;
22 22
using ProcessManagement.Forms.SubForms;
23
using ProcessManagement.Forms.Master;
23 24
//*---------------------------- ?H????????? ------------------------------*
24 25
//  2015/07/13  Ver1.0.0.0      Create Source           
25 26
//
branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/EstimateBudget/FrmEstimateBudgetAuxiliary.cs
157 157
            IOConstructionBaseInfo cbDB = new IOConstructionBaseInfo();
158 158
            try
159 159
            {
160
                string strSQL = cbDB.CreatePrimarykeyString(m_ConstructionCode);
161
                if (!cbDB.SelectAction(strSQL, ref m_ConstructionBaseInfo)) return false;
160
                StringBuilder strSQL = new StringBuilder();
161
                strSQL.Append(cbDB.CreatePrimarykeyString(m_ConstructionCode));
162
                if (!cbDB.SelectAction(strSQL.ToString(), ref m_ConstructionBaseInfo)) return false;
162 163

  
163 164
                return true;
164 165
            }
......
185 186
            {
186 187
                // データ初期表示
187 188
                // 積算予算書を取得する
188
                string strSQL = ebDB.CreatePrimarykeyString(m_ConstructionCode);
189
                StringBuilder strSQL = new StringBuilder();
190
                strSQL.Append(ebDB.CreatePrimarykeyString(m_ConstructionCode));
189 191
                EstimateBudget ebRec = new EstimateBudget();
190
                bool bRet = ebDB.SelectAction(strSQL, ref ebRec);
192
                bool bRet = ebDB.SelectAction(strSQL.ToString(), ref ebRec);
191 193

  
192 194
                // データ取得
193 195
                m_CostCalcEditValue1 = ebRec.RetValue1;     // 予定価格
......
348 350
            try
349 351
            {
350 352
                // 積算予算書を取得する
351
                string strSQL = ebDB.CreatePrimarykeyString(m_ConstructionCode);
353
                StringBuilder strSQL = new StringBuilder();
354
                strSQL.Append(ebDB.CreatePrimarykeyString(m_ConstructionCode));
352 355
                EstimateBudget ebRec = new EstimateBudget();
353
                ebDB.SelectAction(strSQL, ref ebRec);
356
                ebDB.SelectAction(strSQL.ToString(), ref ebRec);
354 357

  
355 358
                // データ表示
356 359
                m_dispLabelControl[(int)DispControl.ConstructionCode].Text = CommonMotions.cnvStringCodeFromInt(m_ConstructionBaseInfo.ConstructionCode, "-", 8);   // 工事コード
357 360
                m_dispLabelControl[(int)DispControl.SubmittedDate].Text = CommonMotions.cnvDateToUndecidedString(m_ConstructionBaseInfo.EstimatesSubmittedDate);    // 見積提出日
358 361

  
359 362
                // 工事基本情報明細取得
360
                strSQL = cbidDB.CreatePrimarykeyString(m_ConstructionCode, (int)ConstructionBaseInfoDetail.DetailDataNo.ConstructionName);
363
                strSQL.Clear();
364
                strSQL.Append(cbidDB.CreatePrimarykeyString(m_ConstructionCode, (int)ConstructionBaseInfoDetail.DetailDataNo.ConstructionName));
361 365
                List<ConstructionBaseInfoDetail> workdlist = new List<ConstructionBaseInfoDetail>();
362
                if (!cbidDB.SelectAction(strSQL, ref workdlist) || workdlist.Count == 0) return false;
366
                if (!cbidDB.SelectAction(strSQL.ToString(), ref workdlist) || workdlist.Count == 0) return false;
363 367
                m_dispLabelControl[(int)DispControl.ConstructionName].Text = workdlist[0].DetailString;                                                             // 工事名称
364 368

  
365 369
                m_dispLabelControl[(int)DispControl.PredeterminedPrice].Text = ebRec.RetValue1.ToString("#,0");                                                     // 予定価格
......
367 371

  
368 372
                // 工事種別マスタ取得
369 373
                // 担当者マスタ取得
370
                strSQL = ctypeDB.CreatePrimarykeyString(m_ConstructionBaseInfo.ConstructionType);
374
                strSQL.Clear();
375
                strSQL.Append(ctypeDB.CreatePrimarykeyString(m_ConstructionBaseInfo.ConstructionType));
371 376
                ConstructionTypeMaster ctypeRec = new ConstructionTypeMaster();
372
                ctypeDB.SelectAction(strSQL, ref ctypeRec);
377
                ctypeDB.SelectAction(strSQL.ToString(), ref ctypeRec);
373 378
                m_dispLabelControl[(int)DispControl.ConstructionType].Text = ctypeRec.NameString;                                                                   // 工事種別
374 379

  
375 380
                // 担当者マスタ取得
376 381
                int PersonCode = ebRec.IntegratedCode;
377 382
                if (PersonCode == 0) PersonCode = CommonMotions.LoginUserData.PersonCode;
378
                strSQL = picDB.CreatePrimarykeyString(PersonCode);
383
                strSQL.Clear();
384
                strSQL.Append(picDB.CreatePrimarykeyString(PersonCode));
379 385
                PersonInChargeMaster personRec = new PersonInChargeMaster();
380
                picDB.SelectAction(strSQL, ref personRec);
386
                picDB.SelectAction(strSQL.ToString(), ref personRec);
381 387
                m_dispLabelControl[(int)DispControl.IntegratedPerson].Text = personRec.PersonName;                                                                  // 積算者
382 388
                lblPersonCode.Text = PersonCode.ToString();
383 389

  
......
418 424

  
419 425
                // 積算見積明細に入力用の大項目があれば公共工事とする
420 426
                List<EstimateDataDetail> DetailList = new List<EstimateDataDetail>();
421
                string strSQL = DetailDB.CreatePrimarykeyString(m_ConstructionCode);
422
                strSQL += " And (";
427
                StringBuilder strSQL = new StringBuilder();
428
                strSQL.Append(DetailDB.CreatePrimarykeyString(m_ConstructionCode));
429
                strSQL.Append(" And (");
423 430
                int i = 0;
424 431
                foreach (int Comp in ClsCommonCosts.s_BiddingCode)
425 432
                {
426
                    if (i != 0) strSQL += " Or";
427
                    strSQL += string.Format(" ComponentCode = {0}", Comp);
433
                    if (i != 0) strSQL.Append(" Or");
434
                    strSQL.AppendFormat(" ComponentCode = {0}", Comp);
428 435
                    i++;
429 436
                }
430
                strSQL += ")";
431
                if (!DetailDB.SelectAction(strSQL, ref DetailList)) return;
437
                strSQL.Append(")");
438
                if (!DetailDB.SelectAction(strSQL.ToString(), ref DetailList)) return;
432 439
                // データがあれば公共工事
433 440
                if (DetailList.Count > 0) m_PublicConstruction = true;
434 441
            }
......
441 448
                DetailDB.close(); DetailDB = null;
442 449
            }
443 450
        }
444

  
445 451
        #endregion
446 452

  
447 453
        #region 明細データをグリッドにセットする
......
882 888
            IOEstimateBudgetDetail DetailDB = new IOEstimateBudgetDetail();
883 889
            try
884 890
            {
885
                string strSQL = string.Format(" WHERE CONSTRUCTIONCODE = {0}", m_ConstructionCode);
886
                strSQL += " ORDER BY GROUPCOUNT, LINECOUNT";
891
                StringBuilder strSQL = new StringBuilder();
892
                strSQL.AppendFormat(" WHERE CONSTRUCTIONCODE = {0}", m_ConstructionCode);
893
                strSQL.Append(" ORDER BY GROUPCOUNT, LINECOUNT");
887 894

  
888 895
                m_DetailDataList.Clear();
889
                if (!DetailDB.SelectAction(strSQL, ref m_DetailDataList)) return false;
896
                if (!DetailDB.SelectAction(strSQL.ToString(), ref m_DetailDataList)) return false;
890 897
                // データ無は処理しない
891 898
                if (m_DetailDataList.Count == 0) return true;
892 899

  
......
998 1005
            IOEstimateDataDetail DetailDB = new IOEstimateDataDetail();
999 1006
            try
1000 1007
            {
1001
                string strSQL = "SELECT B.COMPANYNAME, C.COMPONENTNAME, SUM(A.LINETOTAL), A.COMPANYCODE, A.COMPONENTCODE, D.ITEMCODE, D.ITEMNAME";
1002
                strSQL += " FROM ESTIMATEDATADETAIL A";
1003
                strSQL += " LEFT JOIN SUBCONTRACTORMASTER B ON A.COMPANYCODE = B.COMPANYCODE";
1004
                strSQL += " LEFT JOIN  COMPONENTMASTER C ON A.COMPONENTCODE = C.COMPONENTCODE";
1005
                strSQL += " LEFT JOIN  CONSTRUCTIONITEMMASTER D ON A.ITEMCODE = D.ITEMCODE";
1006
                strSQL += string.Format(" WHERE A.CONSTRUCTIONCODE = {0}", m_ConstructionCode);                                     // 対象工事のみ
1007
                strSQL += string.Format(" And A.COMPONENTCODE != {0}", ClsCommonCosts.s_CommunityCompCode);                         // 共通仮設費以外を対象にする
1008
                strSQL += " And A.MYEXPENSESFLG = 0";                                                                               // 経費を除外する
1009
                strSQL += " And (A.COMPANYCODE != 0";
1010
                strSQL += string.Format(" And A.COMPANYCODE != {0})", CommonDefine.s_AmountMoney[(int)CommonDefine.AmountMoneyNo.MyCosts].Key);   // 自社施工・会社割当無を除外する
1011
                strSQL += " GROUP BY B.COMPANYNAME, C.COMPONENTNAME, D.ITEMNAME, A.COMPANYCODE, A.COMPONENTCODE, D.ITEMCODE";
1012
                strSQL += " ORDER BY B.COMPANYNAME, C.COMPONENTNAME, D.ITEMNAME";
1008
                StringBuilder strSQL = new StringBuilder();
1009
                strSQL.Append("SELECT");
1010
                strSQL.Append(" ifnull(B.COMPANYNAME,'不 明'),");
1011
                strSQL.Append(" C.COMPONENTNAME,");
1012
                strSQL.Append(" SUM(A.LINETOTAL),");
1013
                strSQL.Append(" A.COMPANYCODE,");
1014
                strSQL.Append(" A.COMPONENTCODE,");
1015
                strSQL.Append(" D.ITEMCODE,");
1016
                strSQL.Append(" D.ITEMNAME");
1017
                strSQL.Append(" FROM ESTIMATEDATADETAIL A");
1018
                strSQL.Append(" LEFT JOIN SUBCONTRACTORMASTER B ON A.COMPANYCODE = B.COMPANYCODE");
1019
                strSQL.Append(" LEFT JOIN  COMPONENTMASTER C ON A.COMPONENTCODE = C.COMPONENTCODE");
1020
                strSQL.Append(" LEFT JOIN  CONSTRUCTIONITEMMASTER D ON A.ITEMCODE = D.ITEMCODE");
1021
                strSQL.AppendFormat(" WHERE A.CONSTRUCTIONCODE = {0}", m_ConstructionCode);                                     // 対象工事のみ
1022
                strSQL.AppendFormat(" And A.COMPONENTCODE != {0}", ClsCommonCosts.s_CommunityCompCode);                         // 共通仮設費以外を対象にする
1023
                strSQL.Append(" And A.MYEXPENSESFLG = 0");                                                                      // 経費を除外する
1024
                //strSQL.Append(" And (A.COMPANYCODE != 0");
1025
                strSQL.AppendFormat(" And A.COMPANYCODE != {0}",
1026
                                                    CommonDefine.s_AmountMoney[(int)CommonDefine.AmountMoneyNo.MyCosts].Key);   // 自社施工・会社割当無を除外する
1027
                strSQL.AppendFormat(" And ((A.DataType = {0} And  A.InputFlg = {1})",
1028
                                                    (int)CommonDefine.TabCotegory.Item,
1029
                                                    (int)CommonDefine.DirectInput.Input);
1030
                strSQL.AppendFormat(" Or (A.DataType = {0} And A.LineTotal != 0))",
1031
                                                    (int)CommonDefine.TabCotegory.Spec);
1032

  
1033
                strSQL.Append(" GROUP BY B.COMPANYNAME, C.COMPONENTNAME, D.ITEMNAME, A.COMPANYCODE, A.COMPONENTCODE, D.ITEMCODE");
1034
                strSQL.Append(" ORDER BY B.COMPANYNAME, C.COMPONENTNAME, D.ITEMNAME");
1013 1035
                ArrayList arList = new ArrayList();
1014
                if (!DetailDB.ExecuteReader(strSQL, ref arList)) return;
1036
                if (!DetailDB.ExecuteReader(strSQL.ToString(), ref arList)) return;
1015 1037
                // データ無は処理しない
1016 1038
                if (arList.Count == 0) return;
1017 1039

  
......
1132 1154
            IOEstimateDataDetail DetailDB = new IOEstimateDataDetail();
1133 1155
            try
1134 1156
            {
1135
                string strSQL = "SELECT B.COMPONENTNAME,A.ITEMNAME,SUM(A.LINETOTAL),A.COMPONENTCODE,A.ITEMCODE";
1136
                strSQL += " FROM ESTIMATEDATADETAIL A, COMPONENTMASTER B";
1137
                strSQL += string.Format(" WHERE A.CONSTRUCTIONCODE = {0}", m_ConstructionCode);                 // 対象工事のみ
1138
                strSQL += string.Format(" AND A.COMPONENTCODE != {0}", ClsCommonCosts.s_CommunityCompCode);     // 共通仮設費以外を対象にする
1139
                strSQL += " And A.MYEXPENSESFLG = 0";                                                           // 経費を除外する
1140
                strSQL += string.Format(" And A.COMPANYCODE = {0}",
1141
                            CommonDefine.s_AmountMoney[(int)CommonDefine.AmountMoneyNo.MyCosts].Key);           // 自社施工を除外する
1142
                strSQL += " And A.COMPONENTCODE = B.COMPONENTCODE";
1143
                strSQL += " GROUP BY B.COMPONENTNAME, A.COMPONENTCODE, A.ITEMNAME, A.ITEMCODE, A.PageCount";
1144
                strSQL += " ORDER BY A.COMPONENTCODE, A.ITEMCODE, A.PAGECOUNT";
1145
                //strSQL += " GROUP BY B.COMPONENTNAME, A.COMPONENTCODE, A.ITEMNAME, A.ITEMCODE, A.PageCount, A.LineCount";
1146
                //strSQL += " ORDER BY A.COMPONENTCODE, A.ITEMCODE, A.PAGECOUNT, A.LINECOUNT";
1157
                StringBuilder strSQL = new StringBuilder();
1158
                strSQL.Append("SELECT B.COMPONENTNAME,A.ITEMNAME,SUM(A.LINETOTAL),A.COMPONENTCODE,A.ITEMCODE");
1159
                strSQL.Append(" FROM ESTIMATEDATADETAIL A, COMPONENTMASTER B");
1160
                strSQL.AppendFormat(" WHERE A.CONSTRUCTIONCODE = {0}", m_ConstructionCode);                 // 対象工事のみ
1161
                strSQL.AppendFormat(" AND A.COMPONENTCODE != {0}", ClsCommonCosts.s_CommunityCompCode);     // 共通仮設費以外を対象にする
1162
                strSQL.Append(" And A.MYEXPENSESFLG = 0");                                                  // 経費を除外する
1163
                strSQL.AppendFormat(" And A.COMPANYCODE = {0}",
1164
                            CommonDefine.s_AmountMoney[(int)CommonDefine.AmountMoneyNo.MyCosts].Key);       // 自社施工を除外する
1165
                strSQL.Append(" And A.COMPONENTCODE = B.COMPONENTCODE");
1166
                strSQL.Append(" GROUP BY B.COMPONENTNAME, A.COMPONENTCODE, A.ITEMNAME, A.ITEMCODE, A.PageCount");
1167
                strSQL.Append(" ORDER BY A.COMPONENTCODE, A.ITEMCODE, A.PAGECOUNT");
1147 1168
                ArrayList arList = new ArrayList();
1148
                if (!DetailDB.ExecuteReader(strSQL, ref arList)) return;
1169
                if (!DetailDB.ExecuteReader(strSQL.ToString(), ref arList)) return;
1149 1170
                // データ無は処理しない
1150 1171
                if (arList.Count == 0) return;
1151 1172

  
......
1217 1238
            IOMConstructionItem ItemDB = new IOMConstructionItem();
1218 1239
            try
1219 1240
            {
1220
                string strSQL = string.Format(" WHERE CONSTRUCTIONCODE = {0}", m_ConstructionCode);
1221
                strSQL += string.Format(" AND COMPONENTCODE = {0}", ClsCommonCosts.s_CommunityCompCode); // 共通仮設費を対象にする
1222
                strSQL += " AND COMPANYCODE != 0";                                                          // 会社割当のあるものを対象
1223
                strSQL += " ORDER BY PageCount, LineCount";
1241
                StringBuilder strSQL = new StringBuilder();
1242
                strSQL.AppendFormat(" WHERE CONSTRUCTIONCODE = {0}", m_ConstructionCode);
1243
                strSQL.AppendFormat(" AND COMPONENTCODE = {0}", ClsCommonCosts.s_CommunityCompCode);    // 共通仮設費を対象にする
1244
                strSQL.Append(" AND COMPANYCODE != 0");                                                 // 会社割当のあるものを対象
1245
                strSQL.Append(" ORDER BY PageCount, LineCount");
1224 1246

  
1225 1247
                List<EstimateDataDetail> DetailList = new List<EstimateDataDetail>();
1226
                if (!DetailDB.SelectAction(strSQL, ref DetailList)) return;
1248
                if (!DetailDB.SelectAction(strSQL.ToString(), ref DetailList)) return;
1227 1249

  
1228 1250
                // データ無は処理しない
1229 1251
                if (DetailList.Count == 0) return;
......
1285 1307
                SetPublicCommonTempFix();
1286 1308

  
1287 1309
                // ----- 積み上げ共通仮設費
1288
                string strSQL = string.Format(" WHERE CONSTRUCTIONCODE = {0}", m_ConstructionCode);
1289
                strSQL += string.Format(" AND COMPONENTCODE = {0}", ClsCommonCosts.s_CommunityCompCode);    // 共通仮設費を対象にする
1290
                strSQL += string.Format(" AND ITEMCODE = {0}", ClsCommonCosts.s_PileUpCommonTempory);       // 積み上げ共通仮設費を対象とする
1291
                strSQL += " AND COMPANYCODE != 0";                                                          // 会社割当のあるものを対象
1292
                strSQL += " ORDER BY PageCount, LineCount";                                                 // 見積入力と同じ並びにする
1310
                StringBuilder strSQL = new StringBuilder();
1311
                strSQL.AppendFormat(" WHERE CONSTRUCTIONCODE = {0}", m_ConstructionCode);
1312
                strSQL.AppendFormat(" AND COMPONENTCODE = {0}", ClsCommonCosts.s_CommunityCompCode);        // 共通仮設費を対象にする
1313
                strSQL.AppendFormat(" AND ITEMCODE = {0}", ClsCommonCosts.s_PileUpCommonTempory);           // 積み上げ共通仮設費を対象とする
1314
                strSQL.Append(" AND COMPANYCODE != 0");                                                     // 会社割当のあるものを対象
1315
                strSQL.Append(" ORDER BY PageCount, LineCount");                                            // 見積入力と同じ並びにする
1293 1316
                List<EstimateDataDetail> DetailList = new List<EstimateDataDetail>();
1294
                if (!DetailDB.SelectAction(strSQL, ref DetailList)) return;
1317
                if (!DetailDB.SelectAction(strSQL.ToString(), ref DetailList)) return;
1295 1318

  
1296 1319
                InsertBlankLine(1);
1297 1320
                // 積み上げ共通仮設費タイトルセット
......
1402 1425
                dgv.Rows[m_CommonItemLine].Cells[(int)DispGridColumn.NegotiationPrice].ReadOnly = true;
1403 1426

  
1404 1427
                // ----- 明細項目をセットする
1405
                string strSQL = "SELECT A.LARGECODE, A.MIDDLECODE, B.LARGENAME, C.MIDDLENAME, C.COMMENTTEXT, C.DISPLAYORDER, IFNULL(D.TOTAL, 0)";
1406
                strSQL += " FROM COMMONCOSTLINKMS A";
1428
                StringBuilder strSQL = new StringBuilder();
1429
                strSQL.Append("SELECT A.LARGECODE, A.MIDDLECODE, B.LARGENAME, C.MIDDLENAME, C.COMMENTTEXT, C.DISPLAYORDER, IFNULL(D.TOTAL, 0)");
1430
                strSQL.Append(" FROM COMMONCOSTLINKMS A");
1407 1431
                
1408
                strSQL += " LEFT JOIN (SELECT E.COMPONENTCODE, E.ITEMCODE, SUM(E.LINETOTAL) TOTAL FROM ESTIMATEDATADETAIL E";
1409
                strSQL += string.Format(" WHERE E.CONSTRUCTIONCODE = {0} GROUP BY E.COMPONENTCODE, E.ITEMCODE) D ON A.ITEMCODE = D.ITEMCODE", m_ConstructionCode);
1432
                strSQL.Append(" LEFT JOIN (SELECT E.COMPONENTCODE, E.ITEMCODE, SUM(E.LINETOTAL) TOTAL FROM ESTIMATEDATADETAIL E");
1433
                strSQL.AppendFormat(" WHERE E.CONSTRUCTIONCODE = {0} GROUP BY E.COMPONENTCODE, E.ITEMCODE) D ON A.ITEMCODE = D.ITEMCODE", m_ConstructionCode);
1410 1434

  
1411
                strSQL += " , COMMONCOSTLARGE B, COMMONCOSTMIDDLE C";
1435
                strSQL.Append(" , COMMONCOSTLARGE B, COMMONCOSTMIDDLE C");
1412 1436
                
1413
                strSQL += string.Format(" WHERE A.LARGECODE = {0}", ClsCommonCosts.s_CommunityCompCode);
1414
                strSQL += " AND A.LARGECODE = B.LARGECODE";
1415
                strSQL += " AND A.LARGECODE = C.LARGECODE";
1416
                strSQL += " AND A.MIDDLECODE = C.MIDDLECODE";
1417
                strSQL += " GROUP BY A.LARGECODE, A.MIDDLECODE, B.LARGENAME, C.MIDDLENAME, C.COMMENTTEXT, C.DISPLAYORDER, IFNULL(D.TOTAL, 0)";
1418
                strSQL += " ORDER BY C.DISPLAYORDER";
1437
                strSQL.AppendFormat(" WHERE A.LARGECODE = {0}", ClsCommonCosts.s_CommunityCompCode);
1438
                strSQL.Append(" AND A.LARGECODE = B.LARGECODE");
1439
                strSQL.Append(" AND A.LARGECODE = C.LARGECODE");
1440
                strSQL.Append(" AND A.MIDDLECODE = C.MIDDLECODE");
1441
                strSQL.Append(" GROUP BY A.LARGECODE, A.MIDDLECODE, B.LARGENAME, C.MIDDLENAME, C.COMMENTTEXT, C.DISPLAYORDER, IFNULL(D.TOTAL, 0)");
1442
                strSQL.Append(" ORDER BY C.DISPLAYORDER");
1419 1443

  
1420 1444
                ArrayList LinkList = new ArrayList();
1421
                if (!LinkMSDB.ExecuteReader(strSQL, ref LinkList)) return;
1445
                if (!LinkMSDB.ExecuteReader(strSQL.ToString(), ref LinkList)) return;
1422 1446
                if (LinkList.Count == 0) return;
1423 1447

  
1424 1448
                // 金額のセット
......
1507 1531
            IOMComponent CompDB = new IOMComponent();
1508 1532
            try
1509 1533
            {
1510
                string strSQL = "SELECT COMPONENTCODE, ITEMNAME, SPECNAME, PRICEVALUE, FIXEDITEMCODE";
1511
                strSQL += " FROM ESTIMATEDATA";
1512
                strSQL += string.Format(" WHERE CONSTRUCTIONCODE = {0}", m_ConstructionCode);
1513
                strSQL += string.Format(" AND (COMPONENTCODE <> {0}", ClsCommonCosts.s_MaterialDisposal);
1514
                strSQL += string.Format(" AND COMPONENTCODE <> {0}", ClsCommonCosts.s_FieldManagementCompCode);
1515
                strSQL += string.Format(" AND COMPONENTCODE <> {0})", ClsCommonCosts.s_NormalManagementCompCode);
1516
                strSQL += string.Format(" AND InputFlg = {0}", (int)CommonDefine.DirectInput.Input);
1517
                strSQL += " ORDER BY LineCount";
1534
                StringBuilder strSQL = new StringBuilder();
1535
                strSQL.Append("SELECT COMPONENTCODE, ITEMNAME, SPECNAME, PRICEVALUE, FIXEDITEMCODE");
1536
                strSQL.Append(" FROM ESTIMATEDATA");
1537
                strSQL.AppendFormat(" WHERE CONSTRUCTIONCODE = {0}", m_ConstructionCode);
1538
                strSQL.AppendFormat(" AND (COMPONENTCODE <> {0}", ClsCommonCosts.s_MaterialDisposal);
1539
                strSQL.AppendFormat(" AND COMPONENTCODE <> {0}", ClsCommonCosts.s_FieldManagementCompCode);
1540
                strSQL.AppendFormat(" AND COMPONENTCODE <> {0})", ClsCommonCosts.s_NormalManagementCompCode);
1541
                strSQL.AppendFormat(" AND InputFlg = {0}", (int)CommonDefine.DirectInput.Input);
1542
                strSQL.Append(" ORDER BY LineCount");
1518 1543

  
1519 1544
                ArrayList arList = new ArrayList();
1520
                if (!esDB.ExecuteReader(strSQL, ref arList)) return;
1545
                if (!esDB.ExecuteReader(strSQL.ToString(), ref arList)) return;
1521 1546

  
1522 1547
                // データ無は処理しない
1523 1548
                if (arList.Count == 0) return;
......
1584 1609
            IOEstimateData esDB = new IOEstimateData();
1585 1610
            try
1586 1611
            {
1587
                string strSQL = "SELECT COMPONENTCODE, ITEMNAME, SPECNAME, PRICEVALUE, FIXEDITEMCODE";
1588
                strSQL += " FROM ESTIMATEDATA";
1589
                strSQL += string.Format(" WHERE CONSTRUCTIONCODE = {0}", m_ConstructionCode);
1590
                strSQL += string.Format(" AND COMPONENTCODE = {0}", ClsCommonCosts.s_MaterialDisposal);
1591
                strSQL += " ORDER BY COMPONENTCODE";
1612
                StringBuilder strSQL = new StringBuilder();
1613
                strSQL.Append("SELECT COMPONENTCODE, ITEMNAME, SPECNAME, PRICEVALUE, FIXEDITEMCODE");
1614
                strSQL.Append(" FROM ESTIMATEDATA");
1615
                strSQL.AppendFormat(" WHERE CONSTRUCTIONCODE = {0}", m_ConstructionCode);
1616
                strSQL.AppendFormat(" AND COMPONENTCODE = {0}", ClsCommonCosts.s_MaterialDisposal);
1617
                strSQL.Append(" ORDER BY COMPONENTCODE");
1592 1618

  
1593 1619
                ArrayList arList = new ArrayList();
1594
                if (!esDB.ExecuteReader(strSQL, ref arList)) return;
1620
                if (!esDB.ExecuteReader(strSQL.ToString(), ref arList)) return;
1595 1621

  
1596 1622
                // データ無は処理しない
1597 1623
                if (arList.Count == 0) return;
......
1767 1793

  
1768 1794
                // 現場管理費明細
1769 1795
                EstimateData DataRec = new EstimateData();
1770
                string strSQL = DataDB.CreatePrimarykeyString(m_ConstructionCode);
1771
                strSQL += string.Format(" AND ComponentCode = {0}", ClsCommonCosts.s_FieldManagementCompCode);
1772
                DataDB.SelectAction(strSQL, ref DataRec);
1796
                StringBuilder strSQL = new StringBuilder();
1797
                strSQL.Append(DataDB.CreatePrimarykeyString(m_ConstructionCode));
1798
                strSQL.AppendFormat(" AND ComponentCode = {0}", ClsCommonCosts.s_FieldManagementCompCode);
1799
                DataDB.SelectAction(strSQL.ToString(), ref DataRec);
1773 1800

  
1774 1801
                EstimateBudgetDetail DetailRec = new EstimateBudgetDetail();
1775 1802
                DetailRec.GroupCount = (int)GroupName_EstimateBudget.FieldManage;                          // グループ番号
......
1868 1895

  
1869 1896
                // 一般管理費明細
1870 1897
                EstimateData DataRec = new EstimateData();
1871
                string strSQL = DataDB.CreatePrimarykeyString(m_ConstructionCode);
1872
                strSQL += string.Format(" AND ComponentCode = {0}", ClsCommonCosts.s_NormalManagementCompCode);
1873
                DataDB.SelectAction(strSQL, ref DataRec);
1898
                StringBuilder strSQL = new StringBuilder();
1899
                strSQL.Append(DataDB.CreatePrimarykeyString(m_ConstructionCode));
1900
                strSQL.AppendFormat(" AND ComponentCode = {0}", ClsCommonCosts.s_NormalManagementCompCode);
1901
                DataDB.SelectAction(strSQL.ToString(), ref DataRec);
1874 1902

  
1875 1903
                EstimateBudgetDetail DetailRec = new EstimateBudgetDetail();
1876 1904
                DetailRec.GroupCount = (int)GroupName_EstimateBudget.UsualManage;                          // グループ番号
......
3204 3232
                foreach (int[] wrkData in m_ChangeOutSourceList)
3205 3233
                {
3206 3234
                    // 積算見積データ更新
3207
                    string strSQL = string.Format("UPDATE EstimateDataDetail SET CompanyCode = {0}", wrkData[1]);		    // 協力会社コード
3208
                    strSQL += string.Format(" WHERE CONSTRUCTIONCODE = {0}", m_ConstructionCode);
3209
                    strSQL += string.Format(" AND COMPANYCODE = {0}", wrkData[0]);
3235
                    StringBuilder strSQL = new StringBuilder();
3236
                    strSQL.AppendFormat("UPDATE EstimateDataDetail SET CompanyCode = {0}", wrkData[1]);		    // 協力会社コード
3237
                    strSQL.AppendFormat(" WHERE CONSTRUCTIONCODE = {0}", m_ConstructionCode);
3238
                    strSQL.AppendFormat(" AND COMPANYCODE = {0}", wrkData[0]);
3210 3239

  
3211
                    if (!DetailDB.ExecuteNonQuery(strSQL, false))
3240
                    if (!DetailDB.ExecuteNonQuery(strSQL.ToString(), false))
3212 3241
                    {
3213 3242
                        MessageBox.Show("積算予算書明細データ:協力会社コード更新に失敗しました。",
3214 3243
                                        "登録エラー",
......
3235 3264
        private bool EstimateLinkCheck()
3236 3265
        {
3237 3266
            IOProcessApproval ProcAppDB = new IOProcessApproval();
3267
            IOEstimateDataDetail DetailDB = new IOEstimateDataDetail();
3238 3268
            try
3239 3269
            {
3240 3270
                // 積算見積の申請が承認されているかをチェックする
......
3250 3280
                    if (ProcAppRec.ApprovalStatus == (int)CommonDefine.ApprovalStatus.Approval) return true;
3251 3281
                }
3252 3282

  
3253
                // 積算見積入力を見えないように表示して割付チェックを行う
3254
                object sender = new object();
3255
                EventArgs e = new EventArgs();
3256
                ProcessExecute_EstimateInput(sender, e);
3257

  
3258
                int ProcessNo = (int)ClsExcute.ProcessExecuteNo.EstimateInput;
3259
                FrmEstimateInput frm = (FrmEstimateInput)ClsExcute.SubFormHandleList[ProcessNo].SubFormHandle;
3260
                frm.Hide();
3261
                if (!frm.LinkBudgetPetition)
3283
                // 業社割付のチェック
3284
                strSQL.Clear();
3285
                strSQL.Append("SELECT");
3286
                strSQL.Append(" count(*)");
3287
                strSQL.Append(" FROM ESTIMATEDATADETAIL A");
3288
                strSQL.AppendFormat(" WHERE A.CONSTRUCTIONCODE = {0}", m_ConstructionCode);                                     // 対象工事のみ
3289
                strSQL.AppendFormat(" And A.COMPONENTCODE != {0}", ClsCommonCosts.s_CommunityCompCode);                         // 共通仮設費以外を対象にする
3290
                strSQL.Append(" And A.MYEXPENSESFLG = 0");                                                                      // 経費を除外する
3291
                strSQL.AppendFormat(" And A.COMPANYCODE != {0}",
3292
                                                    CommonDefine.s_AmountMoney[(int)CommonDefine.AmountMoneyNo.MyCosts].Key);   // 自社施工・会社割当無を除外する
3293
                strSQL.AppendFormat(" And ((A.DataType = {0} And  A.InputFlg = {1} And A.CompanyCode = 0 And A.LineTotal != 0)",
3294
                                                    (int)CommonDefine.TabCotegory.Item,
3295
                                                    (int)CommonDefine.DirectInput.Input);
3296
                strSQL.AppendFormat(" Or (A.DataType = {0} And A.CompanyCode = 0 And A.LineTotal != 0))",
3297
                                                    (int)CommonDefine.TabCotegory.Spec);
3298
                ArrayList arList = new ArrayList();
3299
                DetailDB.ExecuteReader(strSQL.ToString(), ref arList);
3300
                object[] ObjRec = (object[])arList[0];
3301
                if (CommonMotions.cnvInt(ObjRec[0]) != 0)
3262 3302
                {
3303
                    // エラー時、積算見積入力を表示
3304
                    EstimateInputErrorDisp();
3263 3305
                    return false;
3264 3306
                }
3265 3307

  
......
3273 3315
            finally
3274 3316
            {
3275 3317
                ProcAppDB.close(); ProcAppDB = null;
3318
                DetailDB.close(); DetailDB = null;
3276 3319
            }
3277 3320
        }
3278 3321
        #endregion
3322

  
3323
        #region 見積予算書エラー表示
3324
        /// <summary>
3325
        /// 見積予算書エラー表示
3326
        /// </summary>
3327
        private void EstimateInputErrorDisp()
3328
        {
3329
            try
3330
            {
3331
                int ProcessNo = (int)ClsExcute.ProcessExecuteNo.EstimateInput;
3332
                // 積算見積書入力起動
3333
                FrmEstimateInput frm = new FrmEstimateInput();
3334
                ClsExcute.SubFormHandleList[ProcessNo].ProcessNo = s_CurrentProcessNo;
3335
                ClsExcute.SubFormHandleList[ProcessNo].SubFormHandle = (Form)frm;
3336
                frm.ConstructionCode = m_ConstructionCode;
3337
                frm.EditLock = m_EditLock;
3338
                frm.SubForm = true;
3339
                frm.ShowInTaskbar = true;
3340

  
3341
                // クロースドハンドラをこちらで定義する
3342
                frm.FormClosed += new FormClosedEventHandler(FrmEstimateInputClosed);
3343
                frm.Show();
3344
                bool bErr = frm.LinkBudgetPetition;
3345
            }
3346
            catch (Exception ex)
3347
            {
3348
                logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message);
3349
            }
3350
        }
3351
        #endregion
3279 3352
    }
3280 3353
}
branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/EstimateBudget/ProcessControl.cs
929 929
                else
930 930
                {
931 931
                    UpDateProcessContextMenu();
932
                    // 通常終了以外は再読込
933
                    if (frm.EndingButton != (int)CommonDefine.FormEndButton.AsNormalEnd)
934
                    {
935
                        ClearDisplay();
936
                        dgvAllDisplay.Rows.Clear();
937
                        // ヘッダーの表示
938
                        DispHeader();
939
                        // 初期表示
940
                        InitDataLoad();
941
                    }
942
                    
932 943
                    this.Activate();
933 944
                }
934 945
            }
branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/EstimateInput/FrmEstimateInput.cs
336 336
        /// ??A????????\???{?^???\??
337 337
        /// </summary>
338 338
        private bool m_Panel3Visible = true;
339

  
340
        /// <summary>
341
        /// ?I?????????{?^??
342
        /// </summary>
343
        private int m_EndingButton = -1;
339 344
        #endregion
340 345

  
341 346
        #region ?v???p?e?B
......
407 412
        {
408 413
            get { return LinkBudgetPetitionProc(); }
409 414
        }
415

  
416
        /// <summary>
417
        /// ?I?????????{?^??
418
        /// </summary>
419
        public int EndingButton
420
        {
421
            get { return m_EndingButton; }
422
            set { m_EndingButton = value; }
423
        }
410 424
        #endregion
411 425

  
412 426
        #region ?R???X?g???N?^
......
481 495
            // ?T?u?t?H?[???N????O??I?????????s??
482 496
            if (!m_SubForm) m_CloseingProcessOn = true;
483 497

  
498
            // ?I???{?^???Z?b?g
499
            m_EndingButton = (int)CommonDefine.FormEndButton.AsNormalEnd;
500

  
484 501
            this.Close();
485 502
        }
486 503
        #endregion
......
519 536
                else
520 537
                    m_CloseingProcessOn = false;
521 538

  
539
                // ?o?^?{?^???Z?b?g
540
                m_EndingButton = (int)CommonDefine.FormEndButton.AsSaved;
541

  
522 542
                CommonMotions.EntryEndMessage("??Z??????f?[?^");
523 543

  
524 544
                // ?I??
......
550 570
                else
551 571
                    m_CloseingProcessOn = false;
552 572

  
573
                // ???{?^???Z?b?g
574
                m_EndingButton = (int)CommonDefine.FormEndButton.AsRemoved;
575

  
553 576
                CommonMotions.RemoveEndMessage("??Z??????f?[?^");
554 577

  
555 578
                // ?I??
......
1055 1078
            try
1056 1079
            {
1057 1080
                // ??Z?\?Z?f?[?^??????????o?^????
1058
                string strSQL = EstimateDB.CreatePrimarykeyString(m_ConstructionCode);
1081
                StringBuilder strSQL = new StringBuilder();
1082
                strSQL.Append(EstimateDB.CreatePrimarykeyString(m_ConstructionCode));
1059 1083
                EstimateData DataRec = new EstimateData();
1060
                if (!EstimateDB.SelectAction(strSQL, ref DataRec)) m_bChengeAns = true;
1084
                if (!EstimateDB.SelectAction(strSQL.ToString(), ref DataRec)) m_bChengeAns = true;
1061 1085

  
1062 1086
                // ?f?[?^??X?L????f?[?^?o?^
1063 1087
                if (m_bChengeAns) if (!DataEntryProcess()) return;
branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/EstimateInput/FrmEstimateInput.designer.cs
182 182
            this.panel1.Controls.Add(this.panel3);
183 183
            this.panel1.Controls.Add(this.pnlApproval);
184 184
            this.panel1.Controls.Add(this.pnlApprovalButton);
185
            this.panel1.Controls.Add(this.pnlComent);
186 185
            this.panel1.Controls.Add(this.panel2);
187 186
            this.panel1.Controls.Add(this.label7);
188 187
            this.panel1.Controls.Add(this.lblDispCnt03);
......
359 358
            this.pnlComent.BackColor = System.Drawing.Color.LemonChiffon;
360 359
            this.pnlComent.Controls.Add(this.btnDelComment);
361 360
            this.pnlComent.Controls.Add(this.btnAddComment);
362
            this.pnlComent.Location = new System.Drawing.Point(577, 95);
361
            this.pnlComent.Location = new System.Drawing.Point(73, 5);
363 362
            this.pnlComent.Name = "pnlComent";
364 363
            this.pnlComent.Size = new System.Drawing.Size(272, 34);
365 364
            this.pnlComent.TabIndex = 30;
......
977 976
            this.Controls.Add(this.lblWrok);
978 977
            this.Controls.Add(this.btnDispDown);
979 978
            this.Controls.Add(this.btnDispUp);
979
            this.Controls.Add(this.pnlComent);
980 980
            this.Controls.Add(this.btnLineDel);
981 981
            this.Controls.Add(this.btnLineAdd);
982 982
            this.Controls.Add(this.btnStructure);
branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/EstimateInput/FrmEstimateInputAuxiliary.cs
1104 1104
                }
1105 1105

  
1106 1106
                string strName = string.Empty;
1107
                string strSQL = scDB.CreatePrimarykeyString(SubConstructorCode);
1107
                StringBuilder strSQL = new StringBuilder();
1108
                strSQL.Append(scDB.CreatePrimarykeyString(SubConstructorCode));
1108 1109
                SubContractorMaster scData = new SubContractorMaster();
1109 1110

  
1110
                if (scDB.SelectAction(strSQL, ref scData)) strName = scData.CompanyName;
1111
                if (scDB.SelectAction(strSQL.ToString(), ref scData)) strName = scData.CompanyName;
1111 1112

  
1112 1113
                return strName;
1113 1114
            }
......
2460 2461
            IOMComponent ioDB = new IOMComponent();
2461 2462
            try
2462 2463
            {
2463
                string strSQL = ioDB.CreatePrimarykeyString(ComponentKey);
2464
                if (!ioDB.SelectAction(strSQL, ref cm)) return false;
2464
                StringBuilder strSQL = new StringBuilder();
2465
                strSQL.Append(ioDB.CreatePrimarykeyString(ComponentKey));
2466
                if (!ioDB.SelectAction(strSQL.ToString(), ref cm)) return false;
2465 2467

  
2466 2468
                return true;
2467 2469
            }
......
2489 2491
            {
2490 2492
                if (ItemKey == 0) return false;
2491 2493

  
2492
                string strSQL = ioDB.CreatePrimarykeyString(ItemKey);
2493
                if (!ioDB.SelectAction(strSQL, ref cm)) return false;
2494
                StringBuilder strSQL = new StringBuilder();
2495
                strSQL.Append(ioDB.CreatePrimarykeyString(ItemKey));
2496
                if (!ioDB.SelectAction(strSQL.ToString(), ref cm)) return false;
2494 2497

  
2495 2498
                return true;
2496 2499
            }
......
2582 2585
            {
2583 2586
                List<ConstructionBaseInfoDetail> workdlist = new List<ConstructionBaseInfoDetail>();
2584 2587

  
2585
                string strSQL = string.Format(" Where ConstructionCode = {0}", m_ConstructionCode);
2588
                StringBuilder strSQL = new StringBuilder();
2589
                strSQL.AppendFormat(" Where ConstructionCode = {0}", m_ConstructionCode);
2586 2590
                // 工事基本情報取得
2587
                if (!cbiDB.SelectAction(strSQL, ref m_ConstructionBaseInfo)) return false;
2591
                if (!cbiDB.SelectAction(strSQL.ToString(), ref m_ConstructionBaseInfo)) return false;
2588 2592

  
2589 2593

  
2590 2594
                // データ表示
......
2597 2601
                m_ConsumptionTaxFlg = m_ConstructionBaseInfo.ConsumptionTaxFlg;
2598 2602

  
2599 2603

  
2600
                strSQL += string.Format(" And DetailNo = {0}", (int)ConstructionBaseInfoDetail.DetailDataNo.ConstructionName);
2604
                strSQL.AppendFormat(" And DetailNo = {0}", (int)ConstructionBaseInfoDetail.DetailDataNo.ConstructionName);
2601 2605
                // 工事基本情報明細取得
2602
                if (!cbidDB.SelectAction(strSQL, ref workdlist)) return false;
2606
                if (!cbidDB.SelectAction(strSQL.ToString(), ref workdlist)) return false;
2603 2607

  
2604 2608
                if (workdlist.Count == 0) return false;
2605 2609

  
......
4026 4030
        private void EntryConstructionSpecMaster(int iTabCnt)
4027 4031
        {
4028 4032
            IOMConstructionSpec csDB = new IOMConstructionSpec();
4029
            //IOMConstructionSpecUnitPrice csuDB = new IOMConstructionSpecUnitPrice();
4030 4033

  
4031 4034
            try
4032 4035
            {
......
4034 4037
                int CurComponentCode = m_EntryPage[iTabCnt].ComponentCode;
4035 4038
                int CurItemCode = m_EntryPage[iTabCnt].ItemCode;
4036 4039

  
4037
                string strSQL = csDB.CreatePrimarykeyString(CurItemCode);
4038
                int CurSpecCode = csDB.GetMaxSpecCodeCount(strSQL);
4039
                int CurDisplayOrder = csDB.GetMaxDisplayOrder(strSQL);
4040
                StringBuilder strSQL = new StringBuilder();
4041
                strSQL.Append(csDB.CreatePrimarykeyString(CurItemCode));
4042
                int CurSpecCode = csDB.GetMaxSpecCodeCount(strSQL.ToString());
4043
                int CurDisplayOrder = csDB.GetMaxDisplayOrder(strSQL.ToString());
4040 4044

  
4041 4045
                List<ConstructionSpecMaster> cwmList = new List<ConstructionSpecMaster>();
4042 4046
                List<ConstructionSpecUnitPrice> csuList = new List<ConstructionSpecUnitPrice>();
......
4069 4073
                    cwmSpec.DisplayOrder = ++CurDisplayOrder;
4070 4074

  
4071 4075
                    cwmList.Add(cwmSpec);
4072

  
4073
                    //// 単価マスタデータセット
4074
                    //ConstructionSpecUnitPrice csuSpec = new ConstructionSpecUnitPrice();
4075
                    //csuSpec.ComponentCode = m_EntryPage[iTabCnt].ComponentCode;
4076
                    //csuSpec.ItemCode = cwmSpec.ItemCode;
4077
                    //csuSpec.SpecCode = cwmSpec.SpecCode;
4078
                    //csuSpec.TypeCode = m_ConstructionBaseInfo.ConstructionType;
4079
                    //if (!CommonMotions.chkCellBlank(wrkRow.Cells[(int)GridItemColumn.UnitPrice].Value))
4080
                    //    csuSpec.UnitPrice = CommonMotions.cnvDouble(wrkRow.Cells[(int)GridItemColumn.UnitPrice].Value.ToString());
4081

  
4082
                    //csuList.Add(csuSpec);
4083

  
4084 4076
                }
4085 4077
                // トランザクション開始
4086 4078
                csDB.connect(); csDB.beginTran();
4087
                //csuDB.connect(); csuDB.beginTran();
4088 4079

  
4089 4080
                // データ登録
4090 4081
                if (!csDB.InsertAction(cwmList, false))
......
4095 4086
                    csDB.rollback();
4096 4087
                    return;
4097 4088
                }
4098
                //if (!csuDB.InsertAction(csuList, false))
4099
                //{
4100
                //    MessageBox.Show("小項目単価マスタ追加に失敗しました。\n小項目マスタでデータを追加してください。",
4101
                //                    "データ作成エラー", MessageBoxButtons.OK, MessageBoxIcon.Error);
4102 4089

  
4103
                //    csDB.rollback();
4104
                //    csuDB.rollback();
4105
                //    return;
4106
                //}
4107

  
4108 4090
                // Commit
4109 4091
                csDB.commit();
4110
                //csuDB.commit();
4111 4092

  
4112 4093
                MessageBox.Show("小項目マスタ追加を終了しました。", "データ作成完了", MessageBoxButtons.OK, MessageBoxIcon.Information);
4113 4094

  
......
4127 4108
            finally
4128 4109
            {
4129 4110
                csDB.close(); csDB = null;
4130
                //csuDB.close(); csuDB = null;
4131 4111
            }
4132 4112
        }
4133 4113
        #endregion
......
4480 4460
                // ++++++++++++++++++++++++++++++++++++++++ 積算見積データ
4481 4461
                // 積算見積データ取得
4482 4462
                ArrayList LargeDataList = new ArrayList();
4483
                string strSQL = "SELECT A.*, B.* FROM ESTIMATEDATA A LEFT JOIN COMPONENTMASTER B ON B.COMPONENTCODE = A.COMPONENTCODE";
4484
                strSQL += string.Format(" WHERE A.CONSTRUCTIONCODE = {0} ORDER BY A.LineCount",m_ConstructionCode);
4485
                if (!etDB.ExecuteReader(strSQL, ref LargeDataList)) return false;
4463
                StringBuilder strSQL = new StringBuilder();
4464
                strSQL.Append("SELECT A.*, B.* FROM ESTIMATEDATA A LEFT JOIN COMPONENTMASTER B ON B.COMPONENTCODE = A.COMPONENTCODE");
4465
                strSQL.AppendFormat(" WHERE A.CONSTRUCTIONCODE = {0} ORDER BY A.LineCount", m_ConstructionCode);
4466
                if (!etDB.ExecuteReader(strSQL.ToString(), ref LargeDataList)) return false;
4486 4467

  
4487 4468
                // データ無は表示せずに入力へ
4488 4469
                if (LargeDataList.Count == 0) return false;
......
4648 4629
                List<EstimateDataBody> MiddleList = new List<EstimateDataBody>();
4649 4630

  
4650 4631
                // 積算見積ページデータ取得
4651
                //string strSQL = etbDB.CreatePrimarykeyString(m_ConstructionCode) + " Order By PageCount";
4652
                //if (!etbDB.SelectAction(strSQL, ref MiddleList)) return false;
4653
                string strSQL = "SELECT A.*, B.CNT, B.COMPONENTCODE FROM ESTIMATEDATABODY A,";
4654
                strSQL += " (SELECT COMPONENTCODE, COUNT(*) CNT FROM COMPONENTLINKMASTER BB";
4655
                strSQL += " WHERE BB.COMPONENTCODE IN (SELECT BBB.COMPONENTCODE FROM ESTIMATEDATABODY BBB";
4656
                strSQL += string.Format(" WHERE BBB.CONSTRUCTIONCODE = {0}) GROUP BY BB.COMPONENTCODE) B", m_ConstructionCode);
4657
                strSQL += string.Format(" WHERE A.CONSTRUCTIONCODE = {0}",m_ConstructionCode);
4658
                strSQL += " AND B.COMPONENTCODE = A.COMPONENTCODE";
4659
                strSQL += " ORDER BY A.PAGECOUNT";
4632
                StringBuilder strSQL = new StringBuilder();
4633
                strSQL.Append("SELECT A.*, B.CNT, B.COMPONENTCODE FROM ESTIMATEDATABODY A,");
4634
                strSQL.Append(" (SELECT COMPONENTCODE, COUNT(*) CNT FROM COMPONENTLINKMASTER BB");
4635
                strSQL.Append(" WHERE BB.COMPONENTCODE IN (SELECT BBB.COMPONENTCODE FROM ESTIMATEDATABODY BBB");
4636
                strSQL.AppendFormat(" WHERE BBB.CONSTRUCTIONCODE = {0}) GROUP BY BB.COMPONENTCODE) B", m_ConstructionCode);
4637
                strSQL.AppendFormat(" WHERE A.CONSTRUCTIONCODE = {0}", m_ConstructionCode);
4638
                strSQL.Append(" AND B.COMPONENTCODE = A.COMPONENTCODE");
4639
                strSQL.Append(" ORDER BY A.PAGECOUNT");
4660 4640
                ArrayList MiddleDataList = new ArrayList();
4661
                if (!etbDB.ExecuteReader(strSQL, ref MiddleDataList)) return false;
4641
                if (!etbDB.ExecuteReader(strSQL.ToString(), ref MiddleDataList)) return false;
4662 4642

  
4663 4643
                // データ無は次処理
4664 4644
                if (MiddleDataList.Count == 0) return true;
......
4711 4691
                    SubConstr.Clear();
4712 4692
                    
4713 4693
                    // 積算見積データ取得
4714
                    strSQL = "SELECT A.*, B.*, C.COMPANYNAME FROM ESTIMATEDATADETAIL A";
4715
                    strSQL += " LEFT JOIN CONSTRUCTIONITEMMASTER B ON B.ITEMCODE = A.ITEMCODE";
4716
                    strSQL += " LEFT JOIN SUBCONTRACTORMASTER C ON C.COMPANYCODE = A.COMPANYCODE";
4717
                    strSQL += string.Format(" WHERE A.CONSTRUCTIONCODE = {0} AND A.PAGECOUNT = {1}", MiddleList[ix].ConstructionCode, MiddleList[ix].PageCount);
4718
                    strSQL += " Order By A.PAGECOUNT, A.LINECOUNT";
4694
                    strSQL.Clear();
4695
                    strSQL.Append("SELECT A.*, B.*, C.COMPANYNAME FROM ESTIMATEDATADETAIL A");
4696
                    strSQL.Append(" LEFT JOIN CONSTRUCTIONITEMMASTER B ON B.ITEMCODE = A.ITEMCODE");
4697
                    strSQL.Append(" LEFT JOIN SUBCONTRACTORMASTER C ON C.COMPANYCODE = A.COMPANYCODE");
4698
                    strSQL.AppendFormat(" WHERE A.CONSTRUCTIONCODE = {0} AND A.PAGECOUNT = {1}", MiddleList[ix].ConstructionCode, MiddleList[ix].PageCount);
4699
                    strSQL.Append(" Order By A.PAGECOUNT, A.LINECOUNT");
4719 4700
                    ArrayList SmallDataList = new ArrayList();
4720
                    if (!etdDB.ExecuteReader(strSQL, ref SmallDataList)) continue;
4701
                    if (!etdDB.ExecuteReader(strSQL.ToString(), ref SmallDataList)) continue;
4721 4702

  
4722 4703
                    // データ無は次処理
4723 4704
                    if (SmallDataList.Count == 0) continue;
branches/src/ProcessManagement/ProcessManagement/Properties/AssemblyInfo.cs
32 32
// すべての値を指定するか、下のように '*' を使ってビルドおよびリビジョン番号を 
33 33
// 既定値にすることができます:
34 34
// [assembly: AssemblyVersion("1.0.*")]
35
[assembly: AssemblyVersion("1.0.0.52")]
36
[assembly: AssemblyFileVersion("1.0.0.52")]
35
[assembly: AssemblyVersion("1.0.0.53")]
36
[assembly: AssemblyFileVersion("1.0.0.53")]
37 37
// Log4netを使用する
38 38
[assembly: log4net.Config.XmlConfigurator(ConfigFile = @"log4net.config", Watch = true)]

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