プロジェクト

全般

プロフィール

リビジョン 381

堀内6年以上前に追加

管理マスタの営業期・工事年切り替え処理を実装
製品版メニュータブ削除対応

差分を表示:

trunk/src/ProcessManagement/ProcessManagement/Common/CommonMotions.cs
1719 1719
        }
1720 1720
        #endregion
1721 1721

  
1722
        #region システム設定が営業期数の時にtrueを返す
1723
        /// <summary>
1724
        /// システム設定が営業期数の時にtrueを返す
1725
        /// </summary>
1726
        /// <returns></returns>
1727
        public static bool BasePeriodYear()
1728
        {
1729
            bool bret = false;
1730
            try
1731
            {
1732
                switch (CommonMotions.SystemMasterData.ConstructionNoBase)
1733
                {
1734
                    case (int)SystemMaster.ConstrNoBaseDef.BusinessPeriod:
1735
                        bret = true;
1736
                        break;
1737
                    default:
1738
                        bret = false;
1739
                        break;
1740
                }
1741

  
1742
                return bret;
1743
            }
1744
            catch (Exception ex)
1745
            {
1746
                logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message);
1747
                return bret;
1748
            }
1749
        }
1750
        #endregion
1751

  
1752
        #region 年度選択ラベル初期セット
1753
        /// <summary>
1754
        /// 年度選択ラベル初期セット
1755
        /// </summary>
1756
        /// <param name="control"></param>
1757
        public static void SetSerchTitle(Label lbl1, Label lbl2, NumericUpDown updown, Label lbl3)
1758
        {
1759
            try
1760
            {
1761
                int nlabelX = lbl1.Location.X;
1762
                int nCtrlDef = updown.Location.X - lbl2.Location.X;
1763

  
1764
                // タイトル文字セット
1765
                lbl1.Text = GetYearTitle();
1766
                lbl3.Text = GetYearTitle(false);
1767

  
1768
                // タイトル表示制御
1769
                if (BasePeriodYear())
1770
                {
1771
                    lbl2.Visible = true;
1772
                }
1773
                else
1774
                {
1775
                    lbl2.Visible = false;
1776

  
1777
                    Point po = updown.Location;
1778
                    po.X -= nCtrlDef;
1779
                    updown.Location = po;
1780

  
1781
                    Point po2 = lbl3.Location;
1782
                    po2.X -= nCtrlDef;
1783
                    lbl3.Location = po2;
1784
                }
1785
            }
1786
            catch (Exception ex)
1787
            {
1788
                logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message);
1789
            }
1790
        }
1791
        #endregion
1792

  
1793
        #region 管理マスタの指定により年度名称を返す
1794
        /// <summary>
1795
        /// 管理マスタの指定により年度名称を返す
1796
        /// </summary>
1797
        /// <returns></returns>
1798
        public static string GetYearTitle(bool bTitle = true)
1799
        {
1800
            string strTitle = string.Empty;
1801
            try
1802
            {
1803
                if (bTitle)
1804
                {
1805
                    if (BasePeriodYear())
1806
                    {
1807
                        strTitle = "営業期数";
1808
                    }
1809
                    else
1810
                    {
1811
                        strTitle = "工事年度";
1812
                    }
1813
                }
1814
                else
1815
                {
1816
                    if (BasePeriodYear())
1817
                    {
1818
                        strTitle = "期";
1819
                    }
1820
                    else
1821
                    {
1822
                        strTitle = "年度";
1823
                    }
1824
                }
1825

  
1826
                return strTitle;
1827
            }
1828
            catch (Exception ex)
1829
            {
1830
                logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message);
1831
                return strTitle;
1832
            }
1833
        }
1834
        #endregion
1835

  
1722 1836
        #region 工事情報より期の最大・最少を取得する
1723 1837
        /// <summary>
1724 1838
        /// 工事情報より期の最大・最少を取得する
......
1731 1845
            try
1732 1846
            {
1733 1847
                StringBuilder strSQL = new StringBuilder();
1734
                if (CommonMotions.SystemMasterData.ConstructionNoBase == (int)SystemMaster.ConstrNoBaseDef.BusinessPeriod)
1848
                if (CommonMotions.BasePeriodYear())
1735 1849
                {   // ----- 営業期ベースの時
1736 1850
                    strSQL.Append("SELECT MIN(CONSTRUCTIONPERIOD), MAX(CONSTRUCTIONPERIOD) FROM CONSTRUCTIONBASEINFO");
1737 1851
                }
......
1770 1884
            {
1771 1885
                int nYearVal = DateTime.Now.Year;
1772 1886

  
1773
                if (CommonMotions.SystemMasterData.ConstructionNoBase == (int)SystemMaster.ConstrNoBaseDef.BusinessPeriod)
1887
                if (CommonMotions.BasePeriodYear())
1774 1888
                {
1775 1889
                    // ----- 営業期ベースの時
1776 1890
                    nYearVal = CommonMotions.SystemMasterData.BusinessPeriod;
......
2319 2433
                int Beginning = 0;
2320 2434
                int diffwork = 0;
2321 2435
                string strwork = string.Empty;
2322
                if (CommonMotions.SystemMasterData.ConstructionNoBase == (int)SystemMaster.ConstrNoBaseDef.BusinessPeriod)
2436
                if (CommonMotions.BasePeriodYear())
2323 2437
                {   // ----- 営業期ベースの時
2324 2438

  
2325 2439
                    // 現在期との差分を求める
......
2364 2478
        /// 指定期・指定年度の期首日・期末日を取得する
2365 2479
        /// </summary>
2366 2480
        /// <param name="nYear"></param>
2367
        /// <param name="bOpen"></param>
2481
        /// <param name="bBeginDay"></param>
2368 2482
        /// <param name="bPeriod"></param>
2369 2483
        /// <returns></returns>
2370
        public static DateTime GetOpeningEndDate(int nYear, bool bOpen = true, bool bAuto = true, int nConstrNoBase = 0)
2484
        public static DateTime GetOpeningEndDate(int nYear, bool bBeginDay = true)
2371 2485
        {
2372 2486
            IOMBizPeriodHistory BizHisDB = new IOMBizPeriodHistory();
2373 2487
            try
......
2377 2491
                StringBuilder strSQL = new StringBuilder();
2378 2492
                BizPeriodHistory BizHisRec = new BizPeriodHistory();
2379 2493

  
2380
                // システム基準自動判定
2381
                int nCheckFlag = -1;
2382
                if (bAuto)
2383
                {
2384
                    nCheckFlag = m_systemMaster.ConstructionNoBase;
2385
                }
2386
                else
2387
                {
2388
                    nCheckFlag = nConstrNoBase;
2389
                }
2390

  
2391
                // 対象設定
2392
                bool bPeriod = true;
2393
                switch (nCheckFlag)
2394
                {
2395
                    case (int)SystemMaster.ConstrNoBaseDef.BusinessPeriod:
2396
                        bPeriod = true;
2397
                        break;
2398
                    case (int)SystemMaster.ConstrNoBaseDef.ConstructionYear:
2399
                        bPeriod = false;
2400
                        break;
2401
                }
2402

  
2403
                if (bPeriod)
2494
                if (BasePeriodYear())
2404 2495
                {   // 営業期
2405 2496
                    strSQL.Append(BizHisDB.CreatePrimarykeyString(nYear, (int)BizPeriodHistory.PeriodFlagDef.BizPeriod));
2406 2497
                }
......
2412 2503
                // 運営期履歴情報読込
2413 2504
                if (!BizHisDB.SelectAction(strSQL.ToString(), ref BizHisRec)) return dtRet;
2414 2505

  
2415
                if (bOpen)
2506
                if (bBeginDay)
2416 2507
                {
2417 2508
                    // 期首取得時
2418 2509
                    dtRet = BizHisRec.BeginDate;
......
3401 3492
        {
3402 3493
            try
3403 3494
            {
3404
                if (m_systemMaster.ConstructionNoBase == (int)SystemMaster.ConstrNoBaseDef.BusinessPeriod)
3495
                if (CommonMotions.BasePeriodYear())
3405 3496
                {   // 営業期数
3406 3497
                    if (nTarget < m_systemMaster.BusinessPeriod) return false;
3407 3498
                }
......
3455 3546
                    strSQL.AppendFormat("  And B1.DetailNo = {0}", (int)ConstructionBaseInfoDetail.DataNoDef.SalesDepartmentName);
3456 3547
                    strSQL.Append("  Left Join departmentmaster As C1");
3457 3548
                    strSQL.Append("       On C1.DepartmentCode = A1.SalesDepCode");
3458
                    strSQL.AppendFormat(" Where A1.ConstructionPeriod = {0}", nTargetCount);
3549

  
3550
                    if (CommonMotions.BasePeriodYear())
3551
                        strSQL.AppendFormat(" Where A1.ConstructionPeriod = {0}", nTargetCount);
3552
                    else
3553
                        strSQL.AppendFormat(" Where A1.ConstructionYear = {0}", nTargetCount);
3554

  
3459 3555
                    strSQL.Append("       And A1.SalesDepCode != 0");
3460 3556

  
3461 3557
                    strSQL.Append(" Union Select");
......
3468 3564
                    strSQL.AppendFormat(" And B2.DetailNo = {0}", (int)ConstructionBaseInfoDetail.DataNoDef.ConstrDepartmentName);
3469 3565
                    strSQL.Append(" Left Join departmentmaster As C2");
3470 3566
                    strSQL.Append("      On C2.DepartmentCode = A2.ConstrDepCode");
3471
                    strSQL.AppendFormat(" Where A2.ConstructionPeriod = {0}", nTargetCount);
3567

  
3568
                    if (CommonMotions.BasePeriodYear())
3569
                        strSQL.AppendFormat(" Where A2.ConstructionPeriod = {0}", nTargetCount);
3570
                    else
3571
                        strSQL.AppendFormat(" Where A2.ConstructionYear = {0}", nTargetCount);
3572

  
3472 3573
                    strSQL.Append("       And A2.ConstrDepCode != 0");
3473 3574

  
3474 3575
                    strSQL.Append(" Union Select");
......
3481 3582
                    strSQL.AppendFormat(" And B3.DetailNo = {0}", (int)ConstructionBaseInfoDetail.DataNoDef.ConstrSubDepartmentName);
3482 3583
                    strSQL.Append(" Left Join departmentmaster As C3");
3483 3584
                    strSQL.Append("      On C3.DepartmentCode = A3.ConstrSubDepCode");
3484
                    strSQL.AppendFormat(" Where A3.ConstructionPeriod = {0}", nTargetCount);
3585

  
3586
                    if (CommonMotions.BasePeriodYear())
3587
                        strSQL.AppendFormat(" Where A3.ConstructionPeriod = {0}", nTargetCount);
3588
                    else
3589
                        strSQL.AppendFormat(" Where A3.ConstructionYear = {0}", nTargetCount);
3590

  
3485 3591
                    strSQL.Append("       And A3.ConstrSubDepCode != 0");
3486 3592

  
3487 3593
                    strSQL.Append(" Union Select");
......
3494 3600
                    strSQL.AppendFormat(" And B4.DetailNo = {0}", (int)ConstructionBaseInfoDetail.DataNoDef.InstrDepartmentName);
3495 3601
                    strSQL.Append(" Left Join departmentmaster As C4");
3496 3602
                    strSQL.Append("      On C4.DepartmentCode = A4.ConstrInstrDepCode");
3497
                    strSQL.AppendFormat(" Where A4.ConstructionPeriod = {0}", nTargetCount);
3603

  
3604
                    if (CommonMotions.BasePeriodYear())
3605
                        strSQL.AppendFormat(" Where A4.ConstructionPeriod = {0}", nTargetCount);
3606
                    else
3607
                        strSQL.AppendFormat(" Where A4.ConstructionYear = {0}", nTargetCount);
3608

  
3498 3609
                    strSQL.Append("       And A4.ConstrInstrDepCode != 0");
3499 3610
                    strSQL.Append(") As A");
3500 3611
                }
......
3525 3636
                    strSQL.Append(", CONSTRUCTIONBASEINFO C");
3526 3637
                    strSQL.Append(" WHERE");
3527 3638

  
3528
                    strSQL.AppendFormat(" (C.ConstructionPeriod = {0}", nTargetCount);
3639
                    if (CommonMotions.BasePeriodYear())
3640
                        strSQL.AppendFormat(" (C.ConstructionPeriod = {0}", nTargetCount);
3641
                    else
3642
                        strSQL.AppendFormat(" (C.ConstructionYear = {0}", nTargetCount);
3643

  
3529 3644
                    strSQL.Append(" And A.DepartmentCode IN(C.SalesDepCode, C.ConstrDepCode, C.ConstrSubDepCode, C.ConstrInstrDepCode))");
3530 3645
                }
3531 3646
                strSQL.Append(" GROUP BY A.DEPARTMENTCODE, A.DEPARTMENTSTRING, A.DISPLAYORDER");
......
3570 3685

  
3571 3686
                // 今期のデータかどうかを判定する
3572 3687
                string FieldName = string.Empty;
3573
                if (CommonMotions.SystemMasterData.ConstructionNoBase == (int)SystemMaster.ConstrNoBaseDef.BusinessPeriod)
3688
                if (CommonMotions.BasePeriodYear())
3574 3689
                {
3575 3690
                    FieldName = "ConstructionPeriod";
3576 3691
                }
trunk/src/ProcessManagement/ProcessManagement/Common/CommonVersion.cs
14 14
        /// <summary>
15 15
        /// 本体バージョン
16 16
        /// </summary>
17
        public static int s_SystemVersion = 229;
17
        public static int s_SystemVersion = 232;
18 18

  
19 19
        /// <summary>
20 20
        /// コピー・環境バージョン
trunk/src/ProcessManagement/ProcessManagement/Common/Process/ClsCommonApproval.cs
223 223
        /// <summary>
224 224
        /// 申請レコードを更新する(工事承認)
225 225
        /// </summary>
226
        /// <param name="ConstructionCode"></param>
227
        /// <param name="ApprovalCode"></param>
228
        /// <param name="Status"></param>
229 226
        /// <returns></returns>
230 227
        public static bool SetPrimaryRecStatus(int ConstructionCode, int ApprovalCode, int OrderNO, int Status)
231 228
        {
......
666 663
                            break;
667 664
                    }
668 665
                }
669
                strSQL.Append(" Order By A.DisplayOrder");
666
                strSQL.Append(" Order By A.DisplayOrder Desc");
670 667
                ArrayList arList = new ArrayList();
671 668
                if (!ApprDB.ExecuteReader(strSQL.ToString(), ref arList)) return false;
672 669

  
trunk/src/ProcessManagement/ProcessManagement/Common/Process/ClsExcute.cs
743 743
                            SubFormExecuteNo_VehicleSchdule(m_ProcControlPara[NowPoint]);
744 744
                            break;
745 745

  
746
                        case (int)SubFormExecuteNo.ApprovalScreen:                      // 205:承認画面
746
                        case (int)SubFormExecuteNo.ApprovalScreen:                      // 205:工事承認画面
747 747
                            SubFormExecuteNo_ApprovalScreen(m_ProcControlPara[NowPoint]);
748 748
                            break;
749 749

  
......
1975 1975
        /// <param name="CurrentPara"></param>
1976 1976
        public static void ProcessExecuteNo_MaterialSelect(ProcessParameter CurrentPara)
1977 1977
        {
1978
            // 承認画面
1978
            // 資材選択画面
1979 1979
            FrmMaterialSelect frm = new FrmMaterialSelect();
1980 1980
            try
1981 1981
            {
......
3882 3882
        /// <returns></returns>
3883 3883
        public static void SubFormExecuteNo_ApprovalScreen(ProcessParameter CurrentPara)
3884 3884
        {
3885
            // 承認画面
3885
            // 工事承認画面
3886 3886
            FrmApprovalScreen frm = new FrmApprovalScreen();
3887 3887
            try
3888 3888
            {
......
3928 3928
        /// <returns></returns>
3929 3929
        public static void SubFormExecuteNo_ApprovalPerson(ProcessParameter CurrentPara)
3930 3930
        {
3931
            // 承認画面
3931
            // 担当者承認画面
3932 3932
            FrmApprovalPerson frm = new FrmApprovalPerson();
3933 3933
            try
3934 3934
            {
trunk/src/ProcessManagement/ProcessManagement/Common/Process/ClsMessageBoradAccess.cs
52 52
                                                                        , (int)RecordKey.KeyNoDef.MessageKey, false);
53 53

  
54 54
                // データ登録
55
                if (!DataDB.OneRecInsertAction(WriteData, false))
55
                if (!DataDB.InsertAction(WriteData, false))
56 56
                {
57 57
                    logger.ErrorFormat("掲示板メッセージ:登録に失敗しました。");
58 58
                    DataDB.rollback();
......
121 121
                                                                                (int)RecordKey.KeyNoDef.MessageKey, false);
122 122

  
123 123
                // データ登録
124
                if (!mbdDB.OneRecInsertAction(WriteData, false))
124
                if (!mbdDB.InsertAction(WriteData, false))
125 125
                {
126 126
                    logger.ErrorFormat("掲示板メッセージ:登録に失敗しました。");
127 127
                    return false;
trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOMessageBoardData.cs
187 187
        /// </summary>
188 188
        /// <param name="data">掲示板データデータ</param>
189 189
        /// <returns>true:成功 false:失敗</returns>
190
        public bool OneRecInsertAction(MessageBoardData data, bool bConnect = true)
190
        public bool InsertAction(MessageBoardData data, bool bConnect = true)
191 191
        {
192 192
            StringBuilder strcmd = new StringBuilder();
193 193
            try
trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOProcessApproval.cs
353 353
        /// 1項目の更新を行う
354 354
        /// </summary>
355 355
        /// <returns></returns>
356
        public bool UpdateFeild(int ConstructionCode, int FeildNo, object value, bool bConnect = true, int ApprovalCode = 0, int OrderNo = 0, int SeqNo = 0)
356
        public bool UpdateFeild(int ConstructionCode
357
                                , int FeildNo, object value
358
                                , bool bConnect = true
359
                                , int ApprovalCode = 0
360
                                , int OrderNo = 0
361
                                , int SeqNo = 0)
357 362
        {
358 363
            StringBuilder strcmd = new StringBuilder();
359 364
            try
trunk/src/ProcessManagement/ProcessManagement/DataModel/MessageBoardData.cs
18 18
        public enum LinkTypeDef
19 19
        {
20 20
            /// <summary>
21
            /// リンク無
21
            ///  0:リンク無
22 22
            /// </summary>
23 23
            Nothing = 0,
24 24
            /// <summary>
25
            /// 工事情報
25
            ///  1:工事情報
26 26
            /// </summary>
27 27
            ConstructionInfo,
28 28
            /// <summary>
29
            /// 資材管理
29
            ///  2:資材管理
30 30
            /// </summary>
31 31
            MaterialInfo,
32
            /// <summary>
33
            ///  3:工事承認
34
            /// </summary>
35
            ProcessApproval,
32 36
        }
33 37
        #endregion
34 38

  
trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ApprovalList/FrmApprovalList.designer.cs
181 181
            // 
182 182
            // label5
183 183
            // 
184
            this.label5.AutoSize = true;
184 185
            this.label5.Font = new System.Drawing.Font("MS 明朝", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
185 186
            this.label5.ForeColor = System.Drawing.Color.Black;
186 187
            this.label5.Location = new System.Drawing.Point(253, 23);
......
454 455
            this.Load += new System.EventHandler(this.FrmConstructionBaseInfoList_Load);
455 456
            this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.FrmConstructionBaseInfoList_KeyDown);
456 457
            this.groupBox1.ResumeLayout(false);
458
            this.groupBox1.PerformLayout();
457 459
            ((System.ComponentModel.ISupportInitialize)(this.numUDConstPro)).EndInit();
458 460
            ((System.ComponentModel.ISupportInitialize)(this.dgvMaster)).EndInit();
459 461
            this.ResumeLayout(false);
trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ApprovalList/FrmApprovalListAuxiliary.cs
704 704
                strSQL.Append(" WHERE A.LINECOUNT = 1");
705 705
                strSQL.AppendFormat(" AND NOT EXISTS(SELECT * FROM PROCESSAPPROVAL APP WHERE APP.CONSTRUCTIONCODE = A.CONSTRUCTIONCODE AND APP.ApprovalCode = {0})", m_ApprovalCode);
706 706
                strSQL.Append(" AND A.CONSTRUCTIONCODE = B.CONSTRUCTIONCODE");
707
                strSQL.AppendFormat(" AND B.CONSTRUCTIONPERIOD = {0}", numUDConstPro.Value);
707
                if (CommonMotions.BasePeriodYear())
708
                    strSQL.AppendFormat(" AND B.CONSTRUCTIONPERIOD = {0}", numUDConstPro.Value);
709
                else
710
                    strSQL.AppendFormat(" AND B.ConstructionYear = {0}", numUDConstPro.Value);
711

  
708 712
                strSQL.AppendFormat(" AND B.CONSTRUCTIONSTATUSFLG <= {0}", ProgressComplete);
709 713
                strSQL.AppendFormat(" AND (A.CONSTRUCTIONCODE = C.CONSTRUCTIONCODE AND C.DetailNo = {0})", (int)ConstructionBaseInfoDetail.DataNoDef.ConstructionName);
710 714
                strSQL.Append(" AND B.SALESPERSONCODE = PERSON.PERSONCODE");
......
739 743
                strSQL.Append(", PERSONINCHARGEMASTER PERSON");
740 744
                strSQL.AppendFormat(" WHERE A.APPROVALCODE = {0} AND A.SEQNO = 1", m_ApprovalCode);
741 745
                strSQL.Append(" AND A.CONSTRUCTIONCODE = B.CONSTRUCTIONCODE");
742
                strSQL.AppendFormat(" AND B.CONSTRUCTIONPERIOD = {0}", numUDConstPro.Value);
746
                if (CommonMotions.BasePeriodYear())
747
                    strSQL.AppendFormat(" AND B.CONSTRUCTIONPERIOD = {0}", numUDConstPro.Value);
748
                else
749
                    strSQL.AppendFormat(" AND B.ConstructionYear = {0}", numUDConstPro.Value);
750

  
743 751
                strSQL.AppendFormat(" AND (B.CONSTRUCTIONCODE = C.CONSTRUCTIONCODE AND C.DetailNo = {0})", (int)ConstructionBaseInfoDetail.DataNoDef.ConstructionName);
744 752
                strSQL.Append(" AND B.SALESPERSONCODE = PERSON.PERSONCODE");
745 753
                if (DepartmentCode != 0)
......
806 814
                strSQL.Append(", PERSONINCHARGEMASTER PERSON");
807 815
                strSQL.AppendFormat(" WHERE NOT EXISTS(SELECT * FROM PROCESSAPPROVAL APP WHERE APP.CONSTRUCTIONCODE = A.CONSTRUCTIONCODE AND APP.ApprovalCode = {0})", m_ApprovalCode);
808 816
                strSQL.Append(" AND A.CONSTRUCTIONCODE = B.CONSTRUCTIONCODE");
809
                strSQL.AppendFormat(" AND B.CONSTRUCTIONPERIOD = {0}", numUDConstPro.Value);
817
                if (CommonMotions.BasePeriodYear())
818
                    strSQL.AppendFormat(" AND B.CONSTRUCTIONPERIOD = {0}", numUDConstPro.Value);
819
                else
820
                    strSQL.AppendFormat(" AND B.ConstructionYear = {0}", numUDConstPro.Value);
821

  
810 822
                strSQL.AppendFormat(" AND B.CONSTRUCTIONSTATUSFLG <= {0}", ProgressComplete);
811 823
                strSQL.AppendFormat(" AND (A.CONSTRUCTIONCODE = C.CONSTRUCTIONCODE AND C.DetailNo = {0})", (int)ConstructionBaseInfoDetail.DataNoDef.ConstructionName);
812 824
                strSQL.Append(" AND B.SALESPERSONCODE = PERSON.PERSONCODE");
......
840 852
                strSQL.Append(", PERSONINCHARGEMASTER PERSON");
841 853
                strSQL.AppendFormat(" WHERE A.APPROVALCODE = {0} AND A.SEQNO = 1", m_ApprovalCode);
842 854
                strSQL.Append(" AND A.CONSTRUCTIONCODE = B.CONSTRUCTIONCODE");
843
                strSQL.AppendFormat(" AND B.CONSTRUCTIONPERIOD = {0}", numUDConstPro.Value);
855
                if (CommonMotions.BasePeriodYear())
856
                    strSQL.AppendFormat(" AND B.CONSTRUCTIONPERIOD = {0}", numUDConstPro.Value);
857
                else
858
                    strSQL.AppendFormat(" AND B.ConstructionYear = {0}", numUDConstPro.Value);
859

  
844 860
                strSQL.AppendFormat(" AND (B.CONSTRUCTIONCODE = C.CONSTRUCTIONCODE AND C.DetailNo = {0})", (int)ConstructionBaseInfoDetail.DataNoDef.ConstructionName);
845 861
                strSQL.Append(" AND B.SALESPERSONCODE = PERSON.PERSONCODE");
846 862
                if (DepartmentCode != 0)
......
907 923
                strSQL.Append(", PERSONINCHARGEMASTER PERSON");
908 924
                strSQL.AppendFormat(" WHERE NOT EXISTS(SELECT * FROM PROCESSAPPROVAL APP WHERE APP.CONSTRUCTIONCODE = A.CONSTRUCTIONCODE AND APP.ApprovalCode = {0})", m_ApprovalCode);
909 925
                strSQL.Append(" AND A.CONSTRUCTIONCODE = B.CONSTRUCTIONCODE");
910
                strSQL.AppendFormat(" AND B.CONSTRUCTIONPERIOD = {0}", numUDConstPro.Value);
926
                if (CommonMotions.BasePeriodYear())
927
                    strSQL.AppendFormat(" AND B.CONSTRUCTIONPERIOD = {0}", numUDConstPro.Value);
928
                else
929
                    strSQL.AppendFormat(" AND B.ConstructionYear = {0}", numUDConstPro.Value);
930

  
911 931
                strSQL.AppendFormat(" AND B.CONSTRUCTIONSTATUSFLG <= {0}", ProgressComplete);
912 932
                strSQL.AppendFormat(" AND (A.CONSTRUCTIONCODE = C.CONSTRUCTIONCODE AND C.DetailNo = {0})", (int)ConstructionBaseInfoDetail.DataNoDef.ConstructionName);
913 933
                strSQL.Append(" AND B.CONSTRUCTIONPERSONCODE = PERSON.PERSONCODE");
......
941 961
                strSQL.Append(", PERSONINCHARGEMASTER PERSON");
942 962
                strSQL.AppendFormat(" WHERE A.APPROVALCODE = {0} AND A.SEQNO = 1", m_ApprovalCode);
943 963
                strSQL.Append(" AND A.CONSTRUCTIONCODE = B.CONSTRUCTIONCODE");
944
                strSQL.AppendFormat(" AND B.CONSTRUCTIONPERIOD = {0}", numUDConstPro.Value);
964
                if (CommonMotions.BasePeriodYear())
965
                    strSQL.AppendFormat(" AND B.CONSTRUCTIONPERIOD = {0}", numUDConstPro.Value);
966
                else
967
                    strSQL.AppendFormat(" AND B.ConstructionYear = {0}", numUDConstPro.Value);
968

  
945 969
                strSQL.AppendFormat(" AND (B.CONSTRUCTIONCODE = C.CONSTRUCTIONCODE AND C.DetailNo = {0})", (int)ConstructionBaseInfoDetail.DataNoDef.ConstructionName);
946 970
                strSQL.Append(" AND B.CONSTRUCTIONPERSONCODE = PERSON.PERSONCODE");
947 971
                if (DepartmentCode != 0)
......
1024 1048
                strSQL.Append(" And OdrDe.SourceDetailCnt = LedgerDetail.DetailCount)");
1025 1049

  
1026 1050
                strSQL.Append(" AND A.CONSTRUCTIONCODE = B.CONSTRUCTIONCODE");
1027
                strSQL.AppendFormat(" AND B.CONSTRUCTIONPERIOD = {0}", numUDConstPro.Value);
1051
                if (CommonMotions.BasePeriodYear())
1052
                    strSQL.AppendFormat(" AND B.CONSTRUCTIONPERIOD = {0}", numUDConstPro.Value);
1053
                else
1054
                    strSQL.AppendFormat(" AND B.ConstructionYear = {0}", numUDConstPro.Value);
1055

  
1028 1056
                strSQL.AppendFormat(" AND B.CONSTRUCTIONSTATUSFLG <= {0}", ProgressComplete);
1029 1057
                strSQL.AppendFormat(" AND (A.CONSTRUCTIONCODE = C.CONSTRUCTIONCODE AND C.DetailNo = {0})", (int)ConstructionBaseInfoDetail.DataNoDef.ConstructionName);
1030 1058
                strSQL.Append(" AND B.CONSTRUCTIONPERSONCODE = PERSON.PERSONCODE");
......
1060 1088

  
1061 1089
                strSQL.AppendFormat(" WHERE A.APPROVALCODE = {0} AND A.SEQNO = 1", m_ApprovalCode);
1062 1090
                strSQL.Append(" AND A.CONSTRUCTIONCODE = B.CONSTRUCTIONCODE");
1063
                strSQL.AppendFormat(" AND B.CONSTRUCTIONPERIOD = {0}", numUDConstPro.Value);
1091
                if (CommonMotions.BasePeriodYear())
1092
                    strSQL.AppendFormat(" AND B.CONSTRUCTIONPERIOD = {0}", numUDConstPro.Value);
1093
                else
1094
                    strSQL.AppendFormat(" AND B.ConstructionYear = {0}", numUDConstPro.Value);
1095

  
1064 1096
                strSQL.AppendFormat(" AND (B.CONSTRUCTIONCODE = C.CONSTRUCTIONCODE AND C.DetailNo = {0})", (int)ConstructionBaseInfoDetail.DataNoDef.ConstructionName);
1065 1097
                strSQL.Append(" AND B.CONSTRUCTIONPERSONCODE = PERSON.PERSONCODE");
1066 1098
                if (DepartmentCode != 0)
......
1133 1165
            strSQL.Append(", requestdata AS Req");
1134 1166
            strSQL.AppendFormat(" WHERE NOT EXISTS(SELECT * FROM PROCESSAPPROVAL APP WHERE APP.CONSTRUCTIONCODE = A.REQCONSTRUCTIONCODE AND APP.ApprovalCode = {0})", m_ApprovalCode);
1135 1167
            strSQL.Append(" AND A.REQCONSTRUCTIONCODE = B.CONSTRUCTIONCODE");
1136
            strSQL.AppendFormat(" AND B.CONSTRUCTIONPERIOD = {0}", numUDConstPro.Value);
1168
            if (CommonMotions.BasePeriodYear())
1169
                strSQL.AppendFormat(" AND B.CONSTRUCTIONPERIOD = {0}", numUDConstPro.Value);
1170
            else
1171
                strSQL.AppendFormat(" AND B.ConstructionYear = {0}", numUDConstPro.Value);
1172

  
1137 1173
            strSQL.AppendFormat(" AND B.CONSTRUCTIONSTATUSFLG >= {0}", ProgressComplete);
1138 1174
            strSQL.AppendFormat(" AND B.BillingSplitFlg = {0}", m_AllPurposeKinds);
1139 1175
            strSQL.AppendFormat(" AND (A.REQCONSTRUCTIONCODE = C.CONSTRUCTIONCODE AND C.DetailNo = {0})", (int)ConstructionBaseInfoDetail.DataNoDef.ConstructionName);
......
1170 1206

  
1171 1207
            strSQL.AppendFormat(" WHERE A.APPROVALCODE = {0} AND A.SEQNO = 1", m_ApprovalCode);
1172 1208
            strSQL.Append(" AND A.CONSTRUCTIONCODE = B.CONSTRUCTIONCODE");
1173
            strSQL.AppendFormat(" AND B.CONSTRUCTIONPERIOD = {0}", numUDConstPro.Value);
1209
            if (CommonMotions.BasePeriodYear())
1210
                strSQL.AppendFormat(" AND B.CONSTRUCTIONPERIOD = {0}", numUDConstPro.Value);
1211
            else
1212
                strSQL.AppendFormat(" AND B.ConstructionYear = {0}", numUDConstPro.Value);
1213

  
1174 1214
            strSQL.AppendFormat(" AND B.BillingSplitFlg = {0}", m_AllPurposeKinds);
1175 1215
            strSQL.AppendFormat(" AND (B.CONSTRUCTIONCODE = C.CONSTRUCTIONCODE AND C.DetailNo = {0})", (int)ConstructionBaseInfoDetail.DataNoDef.ConstructionName);
1176 1216
            strSQL.Append(" AND B.CONSTRUCTIONPERSONCODE = PERSON.PERSONCODE");
......
1361 1401
                numUDConstPro.Minimum = minval;
1362 1402
                numUDConstPro.Maximum = maxval;
1363 1403
                numUDConstPro.Value = CommonMotions.GetPeriodYear();
1404
                CommonMotions.SetSerchTitle(label4, label7, numUDConstPro, label5);
1364 1405
            }
1365 1406
            catch (Exception ex)
1366 1407
            {
trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ApprovalScreen/FrmApprovalScreen.cs
138 138
        private int m_DataCount = 0;
139 139

  
140 140
        /// <summary>
141
        /// ?Y???H????{???
141
        /// ?Y???H????{?????G???A
142 142
        /// </summary>
143 143
        private ConstructionBaseInfo m_ConstrBaseRec = new ConstructionBaseInfo();
144 144
        /// <summary>
145
        /// ???F?o?H?}?X?^??
145
        /// ?Y???H????{??????G???A
146 146
        /// </summary>
147
        private ConstructionBaseInfoDetail m_ConstrBaseDetailRec = new ConstructionBaseInfoDetail();
148
        /// <summary>
149
        /// ?\????s???G???A
150
        /// </summary>
151
        private ProcessApproval m_PettionData = new ProcessApproval();
152

  
153
        /// <summary>
154
        /// ???F?o?H?}?X?^???G???A
155
        /// </summary>
147 156
        private List<ApprovalMaster> m_ApprovalList = new List<ApprovalMaster>();
157
        /// <summary>
158
        /// ???F???????X?g???G???A
159
        /// </summary>
160
        private List<string> m_ApprovalerNameList = new List<string>();
148 161
        #endregion
149 162

  
150 163
        #region ?v???p?e?B
......
601 614
                // ?\?????f?[?^???t??????Z?b?g????
602 615
                SetApprovalOrderNo();
603 616

  
617
                // ----- ???F?????b?Z?[?W?????
618
                List<KeyValuePair<int, string>> ToData = new List<KeyValuePair<int, string>>();
619
                // ????i?\????j?Z?b?g
620
                SetReceiverList((int)CommonDefine.ApprovalStatus.Petition, ref ToData);
621
                // ???b?Z?[?W?????
622
                MessageBoardEntry((int)CommonDefine.ApprovalStatus.Petition, ToData);
623

  
604 624
                // ???????b?Z?[?W
605 625
                CommonMotions.EntryEndMessage("?H???\???f?[?^", "?\??");
606 626

  
......
654 674
                    return;
655 675
                }
656 676

  
677
                // ----- ???F?????b?Z?[?W?????
678
                List<KeyValuePair<int, string>> ToData = new List<KeyValuePair<int, string>>();
679
                // ????i?\????j?Z?b?g
680
                SetReceiverList((int)CommonDefine.ApprovalStatus.Petition, ref ToData);
681
                // ???b?Z?[?W?????
682
                MessageBoardEntry((int)CommonDefine.ApprovalStatus.Petition, ToData);
683

  
657 684
                // ???????b?Z?[?W
658 685
                CommonMotions.EntryEndMessage("?H???\???f?[?^??\??", "??\??");
659 686

  
trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ApprovalScreen/FrmApprovalScreenAuxiliary.cs
338 338
                                                                        statusCode)) return false;
339 339
                        break;
340 340
                }
341

  
342
                // ----- 承認時メッセージを作る
343
                List<KeyValuePair<int, string>> ToData = new List<KeyValuePair<int, string>>();
344
                // 対象者セット
345
                SetReceiverList(statusCode, ref ToData);
346
                // メッセージを作る
347
                MessageBoardEntry(statusCode, ToData);
348

  
341 349
                return true;
342 350
            }
343 351
            catch (Exception ex)
......
348 356
        }
349 357
        #endregion
350 358

  
359
        #region 対象者リストのセット
360
        /// <summary>
361
        /// 対象者リストのセット
362
        /// </summary>
363
        private void SetReceiverList(int statusCode, ref List<KeyValuePair<int, string>> ToData)
364
        {
365
            IOProcessApproval ApprDB = new IOProcessApproval();
366
            try
367
            {
368
                List<KeyValuePair<int, string>> wrkList = new List<KeyValuePair<int, string>>();
369
                for (int i = 0; i < m_ApprovalList.Count; i++)
370
                {
371
                    // 承認者は追加しない
372
                    if (m_ApprovalList[i].ApprovalPerson == CommonMotions.LoginUserData.PersonCode)
373
                        continue;
374

  
375
                    ToData.Add(new KeyValuePair<int, string>(m_ApprovalList[i].ApprovalPerson
376
                                                                , m_ApprovalerNameList[i]));
377
                }
378

  
379
                // 申請者を取得する
380
                StringBuilder strSQL = new StringBuilder();
381
                strSQL.Append(ApprDB.CreatePrimarykeyString(m_ConstructionCode, m_ApprovalCode, m_OrderNo));
382
                strSQL.Append(" And SeqNo = 1");
383
                ProcessApproval Rec = new ProcessApproval();
384
                if (!ApprDB.SelectAction(strSQL.ToString(), ref Rec)) return;
385

  
386
                // 申請者がログイン者の場合は処理終了
387
                if (Rec.PersonCode == CommonMotions.LoginUserData.PersonCode) return;
388

  
389
                // 申請者が既に登録されていれば取得しない
390
                bool bIns = true;
391
                foreach (KeyValuePair<int, string> Tardat in ToData)
392
                {
393
                    if (Tardat.Key == Rec.PersonCode)
394
                    {
395
                        bIns = false;
396
                        break;
397
                    }
398
                }
399

  
400
                // 申請者をセットする
401
                if (bIns)
402
                {
403
                    ToData.Insert(0, new KeyValuePair<int, string>(CommonMotions.LoginUserData.PersonCode
404
                                                                , CommonMotions.LoginUserData.PersonName));
405
                }
406
            }
407
            catch (Exception ex)
408
            {
409
                logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message);
410
            }
411
            finally
412
            {
413
                ApprDB.close(); ApprDB = null;
414
            }
415
        }
416
        #endregion
417

  
351 418
        #region 承認レコードデータ作成
352 419
        /// <summary>
353 420
        /// 承認レコードデータ作成
......
366 433
                strSQL.AppendFormat(" AND PersonCode = {0}", CommonMotions.LoginUserData.PersonCode);
367 434
                if (!ApprDB.SelectAction(strSQL.ToString(), ref Rec))
368 435
                {
436
                    // データが無い場合は新規レコードを作成する
369 437
                    Rec.ConstructionCode = m_ConstructionCode;                      // 工事番号
370 438
                    Rec.ApprovalCode = m_ApprovalCode;	                            // 承認機能番号
371 439
                    Rec.OrderNo = m_OrderNo;	                                    // 受付番号
......
633 701
        private bool SetBaseInfoData()
634 702
        {
635 703
            IOConstructionBaseInfo cbiDB = new IOConstructionBaseInfo();
704
            IOConstructionBaseInfoDetail cbDDB = new IOConstructionBaseInfoDetail();
636 705
            IOMApproval mAppDB = new IOMApproval();
637 706
            try
638 707
            {
639 708
                // 工事基本情報取得
640 709
                StringBuilder strSQL = new StringBuilder();
641
                strSQL.AppendFormat(" Where ConstructionCode = {0}", m_ConstructionCode);
710
                strSQL.AppendFormat(cbiDB.CreatePrimarykeyString( m_ConstructionCode));
642 711
                if (!cbiDB.SelectAction(strSQL.ToString(), ref m_ConstrBaseRec)) return false;
643 712

  
713
                // 工事基本情報明細取得
714
                strSQL.Clear();
715
                strSQL.AppendFormat(cbDDB.CreatePrimarykeyString(m_ConstructionCode
716
                                                                , (int)ConstructionBaseInfoDetail.DataNoDef.ConstructionName));
717
                if (!cbDDB.SelectAction(strSQL.ToString(), ref m_ConstrBaseDetailRec)) return false;
718

  
644 719
                // 担当部署取得
645 720
                int CurrentDepartmentCode = ClsCommonApproval.GetFromConstrAndAppTheDep(m_ConstructionCode, m_ApprovalCode, m_OrderNo);
646 721

  
647 722
                // 承認経路マスタ取得
648 723
                strSQL.Clear();
649
                strSQL.Append(mAppDB.CreatePrimarykeyString(m_ApprovalCode, CurrentDepartmentCode));
650
                strSQL.Append(" Order By DISPLAYORDER");
651
                if (!mAppDB.SelectAction(strSQL.ToString(), ref m_ApprovalList)) return false;
724
                strSQL.Append("SELECT");
725
                strSQL.Append(" A.ApprovalCode");
726
                strSQL.Append(", A.DepartmentCode");
727
                strSQL.Append(", A.SeqNo");
728
                strSQL.Append(", A.DisplayOrder");
729
                strSQL.Append(", A.ApprovalPerson");
730
                strSQL.Append(", A.ApprovalAuthority");
731
                strSQL.Append(", DATE_FORMAT(A.EntryDate, '%Y/%m/%d %H:%i:%s')");
732
                strSQL.Append(", DATE_FORMAT(A.UpdateDate, '%Y/%m/%d %H:%i:%s')");
733
                strSQL.Append(", B.PersonName");
734
                strSQL.Append(" FROM ApprovalMaster As A");
735
                strSQL.Append("      Inner Join personinchargemaster As B");
736
                strSQL.Append("             On B.PersonCode = A.ApprovalPerson");
737
                strSQL.AppendFormat(" Where A.ApprovalCode = {0}", m_ApprovalCode);
738
                strSQL.AppendFormat(" And A.DepartmentCode = {0}", CurrentDepartmentCode);
739
                strSQL.Append(" Order By A.DISPLAYORDER");
740
                ArrayList arrayList = new ArrayList();
741
                if (!mAppDB.ExecuteReader(strSQL.ToString(), ref arrayList)) return false;
652 742

  
743
                m_ApprovalList.Clear();
744
                foreach (object[] CurObj in arrayList)
745
                {
746
                    ApprovalMaster wrkRec = new ApprovalMaster();
747
                    mAppDB.Reader2Struct(CurObj, ref wrkRec);
748
                    m_ApprovalList.Add(wrkRec);
749
                    m_ApprovalerNameList.Add(CommonMotions.cnvString(CurObj[8]));
750
                }
751

  
653 752
                return true;
654 753
            }
655 754
            catch (Exception ex)
......
660 759
            finally
661 760
            {
662 761
                cbiDB.close(); cbiDB = null;
762
                cbDDB.close(); cbDDB = null;
663 763
                mAppDB.close(); mAppDB = null;
664 764
            }
665 765
        }
......
863 963
                StringBuilder strSQL = new StringBuilder();
864 964
                foreach (ApprovalMaster rec in m_ApprovalList)
865 965
                {
866
                    // 状態の取得
867
                    string strDate = "未処理";
868
                    string strComment = string.Empty;
869
                    int ApprovalStatus = (int)CommonDefine.ApprovalStatus.Undecided;
870
                    string strPersonName = string.Empty;
871
                    string strPersonPosion = string.Empty;
872
                    string strDepartment = string.Empty;
873

  
874 966
                    // 承認データを取得する
875 967
                    strSQL.Clear();
876 968
                    strSQL.Append("SELECT IFNULL(C.APPROVALSTATUS, -1),");
......
891 983

  
892 984
                    ArrayList pAppRec = new ArrayList();
893 985
                    if (!pAppDB.ExecuteReader(strSQL.ToString(), ref pAppRec)) return false;
894
                    
986

  
987
                    // 状態の取得
988
                    int ApprovalStatus = (int)CommonDefine.ApprovalStatus.Undecided;
989
                    string strDate = "未処理";
990
                    string strComment = string.Empty;
991

  
895 992
                    object[] objrec = (object[])pAppRec[0];
896
                    strPersonName = CommonMotions.cnvString(objrec[3]);
897
                    strPersonPosion = CommonMotions.cnvString(objrec[4]);
898
                    strDepartment = CommonMotions.cnvString(objrec[5]);
993
                    string strPersonName = CommonMotions.cnvString(objrec[3]);
994
                    string  strPersonPosion = CommonMotions.cnvString(objrec[4]);
995
                    string strDepartment = CommonMotions.cnvString(objrec[5]);
899 996
                    if (CommonMotions.cnvInt(objrec[0]) >= 0)
900 997
                    {
901 998
                        ApprovalStatus = CommonMotions.cnvInt(objrec[0]);
......
1338 1435
        }
1339 1436
        #endregion
1340 1437

  
1438
        #region メッセージデータ作成
1439
        /// <summary>
1440
        /// メッセージデータ作成
1441
        /// </summary>
1442
        /// <returns></returns>
1443
        private bool MessageBoardEntry(int nStatusFlg, List<KeyValuePair<int, string>> ToData)
1444
        {
1445
            IOMessageBoardData mbdDB = new IOMessageBoardData();
1446
            IOMessageBoardTerget mbtDB = new IOMessageBoardTerget();
1447
            IOMessageBrowsingHistory mbhDB = new IOMessageBrowsingHistory();
1448
            IORecordKey RecDB = new IORecordKey();
1449
            try
1450
            {
1451
                MessageBoardData data = new MessageBoardData();
1452

  
1453
                // ----- メッセージデータ書込み
1454
                // キーコードセット
1455
                data.RecordNumber = IOMessageBoardData.GetNewRecordNumber(mbdDB, mbtDB, mbhDB, RecDB,
1456
                                                                            (int)RecordKey.KeyNoDef.MessageKey);
1457
                data.BranchNumber = 0;
1458
                string strWhere = mbdDB.CreatePrimarykeyString(data.RecordNumber, data.BranchNumber);
1459

  
1460
                // 送信者セット(承認者)
1461
                data.FromCode = CommonMotions.LoginUserData.PersonCode;
1462
                data.FromName = CommonMotions.LoginUserData.PersonName;
1463

  
1464
                string ConstrName = m_ConstrBaseDetailRec.DetailString;
1465

  
1466
                StringBuilder strMsg = new StringBuilder();
1467
                strMsg.AppendFormat("『{0}』 【{1}】 承認申請", ConstrName, ClsExcute.AppovalList[m_ApprovalCode]);
1468
                if (m_ApprovalCode == (int)ClsExcute.ApprovalListNo.PurchaseOrderEntryApproval
1469
                    || m_ApprovalCode == (int)ClsExcute.ApprovalListNo.OrderRequestApproval)
1470
                {
1471
                    //  4:注文書承認 Or 5:請求承認の場合回数追加
1472
                    strMsg.AppendFormat(" {0}回目", ConstrName, m_OrderNo);
1473
                }
1474
                strMsg.Append(" 工事案件承認申請の件");
1475
                data.MessageTitle = strMsg.ToString();
1476

  
1477
                strMsg.Clear();
1478
                strMsg.AppendFormat(" 工事番号:{0}\r\n", m_ConstructionCode);
1479
                strMsg.AppendFormat(" 工事名称:{0}\r\n", ConstrName);
1480
                if (m_ApprovalCode == (int)ClsExcute.ApprovalListNo.PurchaseOrderEntryApproval
1481
                    || m_ApprovalCode == (int)ClsExcute.ApprovalListNo.OrderRequestApproval)
1482
                {
1483
                    //  4:注文書承認 Or 5:請求承認の場合回数追加
1484
                    strMsg.AppendFormat(" 申請受付:{0}回目\r\n", m_OrderNo);
1485
                }
1486
                strMsg.AppendFormat(" 『{0}』の申請を【{1}】とします。\r\n", ClsExcute.AppovalList[m_ApprovalCode]
1487
                                                                        , CommonDefine.ApprovalStatusString[nStatusFlg]);
1488
                strMsg.Append(" 連絡・指示コメント欄を確認の上対応してください。\r\n");
1489
                strMsg.Append(" よろしくお願いします。");
1490
                data.MessageContent = strMsg.ToString();
1491

  
1492
                // リンク情報
1493
                data.LinkType = (int)MessageBoardData.LinkTypeDef.ProcessApproval;
1494
                data.LinkMessage = string.Format("工事番号:{0} 工事名称:{1}", m_ConstructionCode, ConstrName);
1495
                data.LinkCode = string.Format("{0}:{1}:{2}", m_ConstructionCode, m_ApprovalCode, m_OrderNo);
1496

  
1497
                // メッセージ色セット
1498
                Color ClrBack = CommonDefine.ApprovalBackStatusColor[nStatusFlg];
1499
                Color ClrFore = CommonDefine.ApprovalForeStatusColor[nStatusFlg];
1500
                data.MessageColor = String.Format("0x{0:X2}{1:X2}{2:X2}", ClrFore.R, ClrFore.G, ClrFore.B);
1501
                data.BackColor = String.Format("0x{0:X2}{1:X2}{2:X2}", ClrBack.R, ClrBack.G, ClrBack.B);
1502

  
1503
                data.WritingDate = DateTime.Now;
1504
                data.PersonCode = CommonMotions.LoginUserData.PersonCode;
1505
                data.ShareFlag = 1;
1506
                data.MessageFlag = (int)MessageBoardData.MessageFlgDef.Normal;
1507

  
1508
                // データ登録
1509
                if (!mbdDB.InsertAction(data)) return false;
1510

  
1511
                // ----- 対象者書込み
1512
                MessageBoardTerget wrkTer = new MessageBoardTerget();
1513
                int cnt = 1;
1514
                foreach (KeyValuePair<int, string> CurDat in ToData)
1515
                {
1516
                    // キーコードセット
1517
                    wrkTer.RecordNumber = data.RecordNumber;
1518
                    wrkTer.BranchNumber = data.BranchNumber;
1519
                    wrkTer.SeqNum = cnt++;
1520
                    wrkTer.ToCode = CurDat.Key;
1521
                    wrkTer.ToName = CurDat.Value;
1522

  
1523
                    // データ登録
1524
                    if (!mbtDB.InsertAction(wrkTer)) return false;
1525
                }
1526

  
1527
                return true;
1528
            }
1529
            catch (Exception ex)
1530
            {
1531
                logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message);
1532
                return false;
1533
            }
1534
            finally
1535
            {
1536
                mbdDB.close(); mbdDB = null;
1537
                mbtDB.close(); mbtDB = null;
1538
                mbhDB.close(); mbhDB = null;
1539
                RecDB.close(); RecDB = null;
1540
            }
1541
        }
1542
        #endregion
1543

  
1341 1544
        #region ---------->> 指示連絡コメント処理
1342 1545
        #region 指示連絡コメント表示処理
1343 1546
        /// <summary>
trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstractionList/FrmConstructionList.designer.cs
315 315
            // 
316 316
            // label5
317 317
            // 
318
            this.label5.AutoSize = true;
318 319
            this.label5.Font = new System.Drawing.Font("MS 明朝", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
319 320
            this.label5.ForeColor = System.Drawing.Color.Black;
320 321
            this.label5.Location = new System.Drawing.Point(253, 23);
......
352 353
            this.cmbDepartment.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
353 354
            this.cmbDepartment.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
354 355
            this.cmbDepartment.FormattingEnabled = true;
356
            this.cmbDepartment.IntegralHeight = false;
355 357
            this.cmbDepartment.Location = new System.Drawing.Point(422, 20);
356 358
            this.cmbDepartment.Name = "cmbDepartment";
357 359
            this.cmbDepartment.Size = new System.Drawing.Size(200, 23);
trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstractionList/FrmConstructionListAuxiliary.cs
49 49
                                                            " ON A.CONSTRUCTIONCODE = B.CONSTRUCTIONCODE",
50 50
                                                            string.Format(" AND B.DETAILNO = {0}", (int)ConstructionBaseInfoDetail.DataNoDef.ConstructionName)};
51 51

  
52
        private static string[] s_SQLPart3 = new string[] { " LEFT JOIN (SELECT",
52
        private static string[] s_SQLPart3_0 = new string[] { " LEFT JOIN (SELECT",
53 53
                                                            " CA.CONSTRUCTIONCODE",
54 54
                                                            ", CA.SALESPERSONCODE As PERSONCODE",
55 55
                                                            ", CB.PERSONNAME As PERSONNAME",
......
65 65
                                                            "      ON CC.DepartmentCode = CA.SalesDepCode",
66 66
                                                            " LEFT JOIN constructionbaseinfodetail As CD",
67 67
                                                            "      ON CD.ConstructionCode = CA.ConstructionCode",
68
                                                            string.Format(" And CD.DetailNo = {0}",(int)ConstructionBaseInfoDetail.DataNoDef.SalesDepartmentName),
69
                                                            " WHERE CA.CONSTRUCTIONPERIOD = {0}) C ON A.CONSTRUCTIONCODE = C.CONSTRUCTIONCODE" };
68
                                                            string.Format(" And CD.DetailNo = {0}",(int)ConstructionBaseInfoDetail.DataNoDef.SalesDepartmentName)};
70 69

  
70
        private static string[] s_SQLPart3_0_1 = new string[] { " WHERE CA.CONSTRUCTIONPERIOD = {0}) C ON A.CONSTRUCTIONCODE = C.CONSTRUCTIONCODE" };
71
        private static string[] s_SQLPart3_0_2 = new string[] { " WHERE CA.ConstructionYear = {0}) C ON A.CONSTRUCTIONCODE = C.CONSTRUCTIONCODE" };
72

  
71 73
        private static string[] s_SQLPart3_1 = new string[] { " LEFT JOIN (SELECT",
72 74
                                                            " DA.CONSTRUCTIONCODE",
73 75
                                                            ", DA.CONSTRUCTIONPERSONCODE PERSONCODE",
......
84 86
                                                            "      ON DC.DepartmentCode = DA.ConstrDepCode",
85 87
                                                            " LEFT JOIN constructionbaseinfodetail As DD",
86 88
                                                            "      ON DD.ConstructionCode = DA.ConstructionCode",
87
                                                            string.Format(" And DD.DetailNo = {0}",(int)ConstructionBaseInfoDetail.DataNoDef.ConstrDepartmentName),
88
                                                            " WHERE DA.CONSTRUCTIONPERIOD = {0}) D ON A.CONSTRUCTIONCODE = D.CONSTRUCTIONCODE" };
89
                                                            string.Format(" And DD.DetailNo = {0}",(int)ConstructionBaseInfoDetail.DataNoDef.ConstrDepartmentName)};
89 90

  
91
        private static string[] s_SQLPart3_1_1 = new string[] { " WHERE DA.CONSTRUCTIONPERIOD = {0}) D ON A.CONSTRUCTIONCODE = D.CONSTRUCTIONCODE" };
92
        private static string[] s_SQLPart3_1_2 = new string[] { " WHERE DA.ConstructionYear = {0}) D ON A.CONSTRUCTIONCODE = D.CONSTRUCTIONCODE" };
93

  
90 94
        private static string[] s_SQLPart3_2 = new string[] { " LEFT JOIN processapproval AS App ON",
91 95
                                                            "     App.ConstructionCode = A.ConstructionCode",
92 96
                                                            " AND App.ApprovalCode = {0}",
......
94 98
                                                            " And App.SeqNo = 1"};
95 99

  
96 100
        private static string[] s_SQLPart5 = new string[] { " WHERE A.CONSTRUCTIONPERIOD = {0}" };
101
        private static string[] s_SQLPart5_1 = new string[] { " WHERE A.ConstructionYear = {0}" };
97 102

  
98 103
        private static string[] s_SQLPart5Tying = new string[] { " WHERE A.CONSTRUCTIONPERIOD = {0}",
99 104
                                                                string.Format(" AND A.TYINGFLG != {0}", (int)ConstructionBaseInfo.TyingFlgDef.Tying) };
......
406 411
                
407 412
                for (int i = 0; i < s_SQLPart2.Length; i++) wrkFormat.Append(s_SQLPart2[i]);
408 413
                
409
                for (int i = 0; i < s_SQLPart3.Length; i++) wrkFormat.Append(s_SQLPart3[i]);
414
                for (int i = 0; i < s_SQLPart3_0.Length; i++) wrkFormat.Append(s_SQLPart3_0[i]);
415
                if (CommonMotions.BasePeriodYear()) { for (int i = 0; i < s_SQLPart3_0_1.Length; i++) wrkFormat.Append(s_SQLPart3_0_1[i]); }
416
                else { for (int i = 0; i < s_SQLPart3_0_2.Length; i++) wrkFormat.Append(s_SQLPart3_0_2[i]); }
417

  
410 418
                for (int i = 0; i < s_SQLPart3_1.Length; i++) wrkFormat.Append(s_SQLPart3_1[i]);
411
                for (int i = 0; i < s_SQLPart5Tying.Length; i++) wrkFormat.Append(s_SQLPart5Tying[i]);
419
                if (CommonMotions.BasePeriodYear()) { for (int i = 0; i < s_SQLPart3_1_1.Length; i++) wrkFormat.Append(s_SQLPart3_1_1[i]); }
420
                else { for (int i = 0; i < s_SQLPart3_1_2.Length; i++) wrkFormat.Append(s_SQLPart3_1_2[i]); }
412 421

  
422
                if (CommonMotions.BasePeriodYear()) { for (int i = 0; i < s_SQLPart5.Length; i++) wrkFormat.Append(s_SQLPart5[i]); }
423
                else { for (int i = 0; i < s_SQLPart5.Length; i++) wrkFormat.Append(s_SQLPart5_1[i]); }
424

  
413 425
                strSQL.AppendFormat(wrkFormat.ToString(), numUDConstPro.Value);
414 426

  
415 427
                // ???????I???????????
......
454 466
                wrkFormat.Append(s_SQLPart1_1[0]);
455 467
                for (int i = 0; i < s_SQLPart2.Length; i++) wrkFormat.Append(s_SQLPart2[i]);
456 468
                
457
                for (int i = 0; i < s_SQLPart3.Length; i++) wrkFormat.Append(s_SQLPart3[i]);
469
                for (int i = 0; i < s_SQLPart3_0.Length; i++) wrkFormat.Append(s_SQLPart3_0[i]);
470
                if (CommonMotions.BasePeriodYear())
471
                {
472
                    for (int i = 0; i < s_SQLPart3_0_1.Length; i++) wrkFormat.Append(s_SQLPart3_0_1[i]);
473
                }
474
                else {
475
                    for (int i = 0; i < s_SQLPart3_0_2.Length; i++) wrkFormat.Append(s_SQLPart3_0_2[i]);
476
                }
477

  
458 478
                for (int i = 0; i < s_SQLPart3_1.Length; i++) wrkFormat.Append(s_SQLPart3_1[i]);
459
                for (int i = 0; i < s_SQLPart5.Length; i++) wrkFormat.Append(s_SQLPart5[i]);
479
                if (CommonMotions.BasePeriodYear())
480
                {
481
                    for (int i = 0; i < s_SQLPart3_1_1.Length; i++) wrkFormat.Append(s_SQLPart3_1_1[i]);
482
                }
483
                else
484
                {
485
                    for (int i = 0; i < s_SQLPart3_1_2.Length; i++) wrkFormat.Append(s_SQLPart3_1_2[i]);
486
                }
460 487

  
461 488
                strSQL.AppendFormat(wrkFormat.ToString(), numUDConstPro.Value);
462 489
                strSQL.AppendFormat(" AND A.ConstructionStatusFlg < {0}", ProgressComplete);
......
479 506

  
480 507
                for (int i = 0; i < s_SQLPart2.Length; i++) wrkFormat.Append(s_SQLPart2[i]);
481 508
                
482
                for (int i = 0; i < s_SQLPart3.Length; i++) wrkFormat.Append(s_SQLPart3[i]);
509
                for (int i = 0; i < s_SQLPart3_0.Length; i++) wrkFormat.Append(s_SQLPart3_0[i]);
510
                if (CommonMotions.BasePeriodYear())
511
                {
512
                    for (int i = 0; i < s_SQLPart3_0_1.Length; i++) wrkFormat.Append(s_SQLPart3_0_1[i]);
513
                }
514
                else
515
                {
516
                    for (int i = 0; i < s_SQLPart3_0_2.Length; i++) wrkFormat.Append(s_SQLPart3_0_2[i]);
517
                }
518

  
483 519
                for (int i = 0; i < s_SQLPart3_1.Length; i++) wrkFormat.Append(s_SQLPart3_1[i]);
520
                if (CommonMotions.BasePeriodYear())
521
                {
522
                    for (int i = 0; i < s_SQLPart3_1_1.Length; i++) wrkFormat.Append(s_SQLPart3_1_1[i]);
523
                }
524
                else
525
                {
526
                    for (int i = 0; i < s_SQLPart3_1_2.Length; i++) wrkFormat.Append(s_SQLPart3_1_2[i]);
527
                }
484 528

  
485 529
                wrkFormat.Append(s_SQLPart3_2[0]);
486 530
                wrkFormat.Append(s_SQLPart3_2[1]);
......
488 532
                wrkFormat.AppendFormat(s_SQLPart3_2[3], CommonDefine.s_Default_OrderNo);
489 533
                wrkFormat.Append(s_SQLPart3_2[4]);
490 534
                
491
                for (int i = 0; i < s_SQLPart5.Length; i++) wrkFormat.Append(s_SQLPart5[i]);
535
                if (CommonMotions.BasePeriodYear())
536
                {
537
                    for (int i = 0; i < s_SQLPart5.Length; i++) wrkFormat.Append(s_SQLPart5[i]);
538
                }
539
                else
540
                {
541
                    for (int i = 0; i < s_SQLPart5.Length; i++) wrkFormat.Append(s_SQLPart5_1[i]);
542
                }
543

  
492 544
                strSQL.AppendFormat(wrkFormat.ToString(), numUDConstPro.Value);
493 545

  
494 546
                strSQL.Append(" AND EXISTS (SELECT * FROM ESTIMATEDATA C WHERE C.CONSTRUCTIONCODE = A.CONSTRUCTIONCODE)");
......
536 588
                wrkFormat.Append(", DATE_FORMAT(A.EstimatesSubmittedDate, '%Y/%m/%d'), 0");    // ???t?B?[???h???????????
537 589
                for (int i = 0; i < s_SQLPart2.Length; i++) wrkFormat.Append(s_SQLPart2[i]);
538 590
                
539
                for (int i = 0; i < s_SQLPart3.Length; i++) wrkFormat.Append(s_SQLPart3[i]);
591
                for (int i = 0; i < s_SQLPart3_0.Length; i++) wrkFormat.Append(s_SQLPart3_0[i]);
592
                if (CommonMotions.BasePeriodYear()) { for (int i = 0; i < s_SQLPart3_0_1.Length; i++) wrkFormat.Append(s_SQLPart3_0_1[i]); }
593
                else { for (int i = 0; i < s_SQLPart3_0_2.Length; i++) wrkFormat.Append(s_SQLPart3_0_2[i]); }
594

  
540 595
                for (int i = 0; i < s_SQLPart3_1.Length; i++) wrkFormat.Append(s_SQLPart3_1[i]);
596
                if (CommonMotions.BasePeriodYear()) { for (int i = 0; i < s_SQLPart3_1_1.Length; i++) wrkFormat.Append(s_SQLPart3_1_1[i]); }
597
                else { for (int i = 0; i < s_SQLPart3_1_2.Length; i++) wrkFormat.Append(s_SQLPart3_1_2[i]); }
598

  
541 599
                wrkFormat.Append(", PROCESSAPPROVAL App");
542
                for (int i = 0; i < s_SQLPart5.Length; i++) wrkFormat.Append(s_SQLPart5[i]);
600
                if (CommonMotions.BasePeriodYear()) { for (int i = 0; i < s_SQLPart5.Length; i++) wrkFormat.Append(s_SQLPart5[i]); }
601
                else { for (int i = 0; i < s_SQLPart5.Length; i++) wrkFormat.Append(s_SQLPart5_1[i]); }
543 602

  
544 603
                strSQL.AppendFormat(wrkFormat.ToString(), numUDConstPro.Value);
545 604
                
......
593 652
                wrkFormat.Append(s_SQLPart1_1[0]);
594 653
                for (int i = 0; i < s_SQLPart2.Length; i++) wrkFormat.Append(s_SQLPart2[i]);
595 654

  
596
                for (int i = 0; i < s_SQLPart3.Length; i++) wrkFormat.Append(s_SQLPart3[i]);
655
                for (int i = 0; i < s_SQLPart3_0.Length; i++) wrkFormat.Append(s_SQLPart3_0[i]);
656
                if (CommonMotions.BasePeriodYear()) { for (int i = 0; i < s_SQLPart3_0_1.Length; i++) wrkFormat.Append(s_SQLPart3_0_1[i]); }
657
                else { for (int i = 0; i < s_SQLPart3_0_2.Length; i++) wrkFormat.Append(s_SQLPart3_0_2[i]); }
658

  
597 659
                for (int i = 0; i < s_SQLPart3_1.Length; i++) wrkFormat.Append(s_SQLPart3_1[i]);
598
                for (int i = 0; i < s_SQLPart5.Length; i++) wrkFormat.Append(s_SQLPart5[i]);
660
                if (CommonMotions.BasePeriodYear()) { for (int i = 0; i < s_SQLPart3_1_1.Length; i++) wrkFormat.Append(s_SQLPart3_1_1[i]); }
661
                else { for (int i = 0; i < s_SQLPart3_1_2.Length; i++) wrkFormat.Append(s_SQLPart3_1_2[i]); }
599 662

  
663
                if (CommonMotions.BasePeriodYear()) { for (int i = 0; i < s_SQLPart5.Length; i++) wrkFormat.Append(s_SQLPart5[i]); }
664
                else { for (int i = 0; i < s_SQLPart5.Length; i++) wrkFormat.Append(s_SQLPart5_1[i]); }
665

  
600 666
                strSQL.AppendFormat(wrkFormat.ToString(), numUDConstPro.Value);
601 667
                strSQL.Append(" AND EXISTS (SELECT * FROM ESTIMATEDATA C WHERE C.CONSTRUCTIONCODE = A.CONSTRUCTIONCODE)");
602 668
                strSQL.AppendFormat(" AND A.ConstructionStatusFlg < {0}", ProgressComplete);
......
619 685
                wrkFormat.Append(s_SQLPart1_2[0]);
620 686
                for (int i = 0; i < s_SQLPart2.Length; i++) wrkFormat.Append(s_SQLPart2[i]);
621 687

  
622
                for (int i = 0; i < s_SQLPart3.Length; i++) wrkFormat.Append(s_SQLPart3[i]);
688
                for (int i = 0; i < s_SQLPart3_0.Length; i++) wrkFormat.Append(s_SQLPart3_0[i]);
689
                if (CommonMotions.BasePeriodYear()) { for (int i = 0; i < s_SQLPart3_0_1.Length; i++) wrkFormat.Append(s_SQLPart3_0_1[i]); }
690
                else { for (int i = 0; i < s_SQLPart3_0_2.Length; i++) wrkFormat.Append(s_SQLPart3_0_2[i]); }
691

  
623 692
                for (int i = 0; i < s_SQLPart3_1.Length; i++) wrkFormat.Append(s_SQLPart3_1[i]);
693
                if (CommonMotions.BasePeriodYear()) { for (int i = 0; i < s_SQLPart3_1_1.Length; i++) wrkFormat.Append(s_SQLPart3_1_1[i]); }
694
                else { for (int i = 0; i < s_SQLPart3_1_2.Length; i++) wrkFormat.Append(s_SQLPart3_1_2[i]); }
624 695

  
625 696
                wrkFormat.Append(s_SQLPart3_2[0]);
626 697
                wrkFormat.Append(s_SQLPart3_2[1]);
......
628 699
                wrkFormat.AppendFormat(s_SQLPart3_2[3], CommonDefine.s_Default_OrderNo);
629 700
                wrkFormat.Append(s_SQLPart3_2[4]);
630 701

  
631
                for (int i = 0; i < s_SQLPart5.Length; i++) wrkFormat.Append(s_SQLPart5[i]);
702
                if (CommonMotions.BasePeriodYear()) { for (int i = 0; i < s_SQLPart5.Length; i++) wrkFormat.Append(s_SQLPart5[i]); }
703
                else { for (int i = 0; i < s_SQLPart5.Length; i++) wrkFormat.Append(s_SQLPart5_1[i]); }
632 704

  
633 705
                strSQL.AppendFormat(wrkFormat.ToString(), numUDConstPro.Value);
634 706
                strSQL.Append(" AND EXISTS (SELECT * FROM ESTIMATEBUDGET A1 WHERE A1.CONSTRUCTIONCODE = A.CONSTRUCTIONCODE)");
......
681 753
                wrkFormat.Append(s_SQLPart1_1[0]);
682 754
                for (int i = 0; i < s_SQLPart2.Length; i++) wrkFormat.Append(s_SQLPart2[i]);
683 755

  
684
                for (int i = 0; i < s_SQLPart3.Length; i++) wrkFormat.Append(s_SQLPart3[i]);
756
                for (int i = 0; i < s_SQLPart3_0.Length; i++) wrkFormat.Append(s_SQLPart3_0[i]);
757
                if (CommonMotions.BasePeriodYear()) { for (int i = 0; i < s_SQLPart3_0_1.Length; i++) wrkFormat.Append(s_SQLPart3_0_1[i]); }
758
                else { for (int i = 0; i < s_SQLPart3_0_2.Length; i++) wrkFormat.Append(s_SQLPart3_0_2[i]); }
759

  
685 760
                for (int i = 0; i < s_SQLPart3_1.Length; i++) wrkFormat.Append(s_SQLPart3_1[i]);
761
                if (CommonMotions.BasePeriodYear()) { for (int i = 0; i < s_SQLPart3_1_1.Length; i++) wrkFormat.Append(s_SQLPart3_1_1[i]); }
762
                else { for (int i = 0; i < s_SQLPart3_1_2.Length; i++) wrkFormat.Append(s_SQLPart3_1_2[i]); }
763

  
686 764
                wrkFormat.Append(", PROCESSAPPROVAL App");
687
                for (int i = 0; i < s_SQLPart5.Length; i++) wrkFormat.Append(s_SQLPart5[i]);
765

  
766
                if (CommonMotions.BasePeriodYear()) { for (int i = 0; i < s_SQLPart5.Length; i++) wrkFormat.Append(s_SQLPart5[i]); }
767
                else { for (int i = 0; i < s_SQLPart5.Length; i++) wrkFormat.Append(s_SQLPart5_1[i]); }
768

  
688 769
                wrkFormat.Append(" AND A.CONSTRUCTIONPERSONCODE != 0");
689 770
                strSQL.AppendFormat(wrkFormat.ToString(), numUDConstPro.Value);
690 771

  
......
719 800
                wrkFormat.Append(s_SQLPart1_2[0]);
720 801
                for (int i = 0; i < s_SQLPart2.Length; i++) wrkFormat.Append(s_SQLPart2[i]);
721 802

  
722
                for (int i = 0; i < s_SQLPart3.Length; i++) wrkFormat.Append(s_SQLPart3[i]);
803
                for (int i = 0; i < s_SQLPart3_0.Length; i++) wrkFormat.Append(s_SQLPart3_0[i]);
804
                if (CommonMotions.BasePeriodYear()) { for (int i = 0; i < s_SQLPart3_0_1.Length; i++) wrkFormat.Append(s_SQLPart3_0_1[i]); }
805
                else { for (int i = 0; i < s_SQLPart3_0_2.Length; i++) wrkFormat.Append(s_SQLPart3_0_2[i]); }
806

  
723 807
                for (int i = 0; i < s_SQLPart3_1.Length; i++) wrkFormat.Append(s_SQLPart3_1[i]);
808
                if (CommonMotions.BasePeriodYear()) { for (int i = 0; i < s_SQLPart3_1_1.Length; i++) wrkFormat.Append(s_SQLPart3_1_1[i]); }
809
                else { for (int i = 0; i < s_SQLPart3_1_2.Length; i++) wrkFormat.Append(s_SQLPart3_1_2[i]); }
724 810

  
725 811
                wrkFormat.Append(s_SQLPart3_2[0]);
726 812
                wrkFormat.Append(s_SQLPart3_2[1]);
......
729 815
                wrkFormat.Append(s_SQLPart3_2[4]);
730 816

  
731 817
                wrkFormat.Append(", constructionbudget E");
732
                for (int i = 0; i < s_SQLPart5.Length; i++) wrkFormat.Append(s_SQLPart5[i]);
818

  
819
                if (CommonMotions.BasePeriodYear()) { for (int i = 0; i < s_SQLPart5.Length; i++) wrkFormat.Append(s_SQLPart5[i]); }
820
                else { for (int i = 0; i < s_SQLPart5.Length; i++) wrkFormat.Append(s_SQLPart5_1[i]); }
821

  
733 822
                wrkFormat.Append(" AND A.CONSTRUCTIONPERSONCODE != 0");
734 823

  
735 824
                strSQL.AppendFormat(wrkFormat.ToString(), numUDConstPro.Value);
......
785 874
                wrkFormat.Append(s_SQLPart1_1[0]);
786 875
                for (int i = 0; i < s_SQLPart2.Length; i++) wrkFormat.Append(s_SQLPart2[i]);
787 876

  
788
                for (int i = 0; i < s_SQLPart3.Length; i++) wrkFormat.Append(s_SQLPart3[i]);
877
                for (int i = 0; i < s_SQLPart3_0.Length; i++) wrkFormat.Append(s_SQLPart3_0[i]);
878
                if (CommonMotions.BasePeriodYear()) { for (int i = 0; i < s_SQLPart3_0_1.Length; i++) wrkFormat.Append(s_SQLPart3_0_1[i]); }
879
                else { for (int i = 0; i < s_SQLPart3_0_2.Length; i++) wrkFormat.Append(s_SQLPart3_0_2[i]); }
880

  
789 881
                for (int i = 0; i < s_SQLPart3_1.Length; i++) wrkFormat.Append(s_SQLPart3_1[i]);
882
                if (CommonMotions.BasePeriodYear()) { for (int i = 0; i < s_SQLPart3_1_1.Length; i++) wrkFormat.Append(s_SQLPart3_1_1[i]); }
883
                else { for (int i = 0; i < s_SQLPart3_1_2.Length; i++) wrkFormat.Append(s_SQLPart3_1_2[i]); }
884

  
790 885
                wrkFormat.Append(" LEFT JOIN constructiontypemaster As ConstrType ON ConstrType.TypeCode = A.ConstructionType");
791 886
                wrkFormat.Append(", PROCESSAPPROVAL App");
792
                for (int i = 0; i < s_SQLPart5.Length; i++) wrkFormat.Append(s_SQLPart5[i]);
793 887

  
888
                if (CommonMotions.BasePeriodYear()) { for (int i = 0; i < s_SQLPart5.Length; i++) wrkFormat.Append(s_SQLPart5[i]); }
889
                else { for (int i = 0; i < s_SQLPart5.Length; i++) wrkFormat.Append(s_SQLPart5_1[i]); }
890

  
794 891
                strSQL.AppendFormat(wrkFormat.ToString(), numUDConstPro.Value);
795 892

  
796 893
                strSQL.Append(" AND NOT EXISTS");
......
843 940
                wrkFormat.Append(s_SQLPart1_2[0]);
844 941
                for (int i = 0; i < s_SQLPart2.Length; i++) wrkFormat.Append(s_SQLPart2[i]);
845 942

  
846
                for (int i = 0; i < s_SQLPart3.Length; i++) wrkFormat.Append(s_SQLPart3[i]);
943
                for (int i = 0; i < s_SQLPart3_0.Length; i++) wrkFormat.Append(s_SQLPart3_0[i]);
944
                if (CommonMotions.BasePeriodYear()) { for (int i = 0; i < s_SQLPart3_0_1.Length; i++) wrkFormat.Append(s_SQLPart3_0_1[i]); }
945
                else { for (int i = 0; i < s_SQLPart3_0_2.Length; i++) wrkFormat.Append(s_SQLPart3_0_2[i]); }
946

  
847 947
                for (int i = 0; i < s_SQLPart3_1.Length; i++) wrkFormat.Append(s_SQLPart3_1[i]);
948
                if (CommonMotions.BasePeriodYear()) { for (int i = 0; i < s_SQLPart3_1_1.Length; i++) wrkFormat.Append(s_SQLPart3_1_1[i]); }
949
                else { for (int i = 0; i < s_SQLPart3_1_2.Length; i++) wrkFormat.Append(s_SQLPart3_1_2[i]); }
848 950

  
849 951
                wrkFormat.Append(s_SQLPart3_2[0]);
850 952
                wrkFormat.Append(s_SQLPart3_2[1]);
......
853 955
                wrkFormat.Append(s_SQLPart3_2[4]);
854 956

  
855 957
                wrkFormat.Append(", PURCHASEORDER A1");
856
                for (int i = 0; i < s_SQLPart5.Length; i++) wrkFormat.Append(s_SQLPart5[i]);
857 958

  
959
                if (CommonMotions.BasePeriodYear()) { for (int i = 0; i < s_SQLPart5.Length; i++) wrkFormat.Append(s_SQLPart5[i]); }
960
                else { for (int i = 0; i < s_SQLPart5.Length; i++) wrkFormat.Append(s_SQLPart5_1[i]); }
961

  
858 962
                strSQL.Append(" UNION (");
859 963
                strSQL.AppendFormat(wrkFormat.ToString(), numUDConstPro.Value);
860 964
                
......
911 1015

  
912 1016
                for (int i = 0; i < s_SQLPart2.Length; i++) wrkFormat.Append(s_SQLPart2[i]);
913 1017

  
914
                for (int i = 0; i < s_SQLPart3.Length; i++) wrkFormat.Append(s_SQLPart3[i]);
1018
                for (int i = 0; i < s_SQLPart3_0.Length; i++) wrkFormat.Append(s_SQLPart3_0[i]);
1019
                if (CommonMotions.BasePeriodYear()) { for (int i = 0; i < s_SQLPart3_0_1.Length; i++) wrkFormat.Append(s_SQLPart3_0_1[i]); }
1020
                else { for (int i = 0; i < s_SQLPart3_0_2.Length; i++) wrkFormat.Append(s_SQLPart3_0_2[i]); }
1021

  
915 1022
                for (int i = 0; i < s_SQLPart3_1.Length; i++) wrkFormat.Append(s_SQLPart3_1[i]);
1023
                if (CommonMotions.BasePeriodYear()) { for (int i = 0; i < s_SQLPart3_1_1.Length; i++) wrkFormat.Append(s_SQLPart3_1_1[i]); }
1024
                else { for (int i = 0; i < s_SQLPart3_1_2.Length; i++) wrkFormat.Append(s_SQLPart3_1_2[i]); }
1025

  
916 1026
                wrkFormat.Append(", PROCESSAPPROVAL App");
917 1027
                wrkFormat.Append(", (Select CONSTRUCTIONCODE From PURCHASEORDER Group by CONSTRUCTIONCODE) As A2");
918
                for (int i = 0; i < s_SQLPart5.Length; i++) wrkFormat.Append(s_SQLPart5[i]);
919 1028

  
1029
                if (CommonMotions.BasePeriodYear()) { for (int i = 0; i < s_SQLPart5.Length; i++) wrkFormat.Append(s_SQLPart5[i]); }
1030
                else { for (int i = 0; i < s_SQLPart5.Length; i++) wrkFormat.Append(s_SQLPart5_1[i]); }
1031

  
920 1032
                strSQL.AppendFormat(wrkFormat.ToString(), numUDConstPro.Value);
921 1033
                strSQL.Append(" AND EXISTS (SELECT * FROM PURCHASEORDER B1 WHERE B1.CONSTRUCTIONCODE = A.CONSTRUCTIONCODE)");
922 1034

  
......
975 1087
                wrkFormat.Append(s_SQLPart1_2[0]);
976 1088
                for (int i = 0; i < s_SQLPart2.Length; i++) wrkFormat.Append(s_SQLPart2[i]);
977 1089

  
978
                for (int i = 0; i < s_SQLPart3.Length; i++) wrkFormat.Append(s_SQLPart3[i]);
1090
                for (int i = 0; i < s_SQLPart3_0.Length; i++) wrkFormat.Append(s_SQLPart3_0[i]);
1091
                if (CommonMotions.BasePeriodYear()) { for (int i = 0; i < s_SQLPart3_0_1.Length; i++) wrkFormat.Append(s_SQLPart3_0_1[i]); }
1092
                else { for (int i = 0; i < s_SQLPart3_0_2.Length; i++) wrkFormat.Append(s_SQLPart3_0_2[i]); }
1093

  
979 1094
                for (int i = 0; i < s_SQLPart3_1.Length; i++) wrkFormat.Append(s_SQLPart3_1[i]);
1095
                if (CommonMotions.BasePeriodYear()) { for (int i = 0; i < s_SQLPart3_1_1.Length; i++) wrkFormat.Append(s_SQLPart3_1_1[i]); }
1096
                else { for (int i = 0; i < s_SQLPart3_1_2.Length; i++) wrkFormat.Append(s_SQLPart3_1_2[i]); }
980 1097

  
981 1098
                wrkFormat.Append(s_SQLPart3_2[0]);
982 1099
                wrkFormat.Append(s_SQLPart3_2[1]);
......
986 1103

  
987 1104
                wrkFormat.Append(", constructionledger AS Ledger");
988 1105

  
989
                for (int i = 0; i < s_SQLPart5.Length; i++) wrkFormat.Append(s_SQLPart5[i]);
1106
                if (CommonMotions.BasePeriodYear()) { for (int i = 0; i < s_SQLPart5.Length; i++) wrkFormat.Append(s_SQLPart5[i]); }
1107
                else { for (int i = 0; i < s_SQLPart5.Length; i++) wrkFormat.Append(s_SQLPart5_1[i]); }
990 1108

  
991 1109
                wrkFormat.AppendFormat(" AND ({0} <= A.CONSTRUCTIONSTATUSFLG AND A.CONSTRUCTIONSTATUSFLG <= {1})", nStat1, nStat2);
992 1110
                wrkFormat.Append(" AND Ledger.ConstructionCode = A.ConstructionCode");
......
1475 1593
                numUDConstPro.Minimum = minval;
1476 1594
                numUDConstPro.Maximum = maxval;
1477 1595
                numUDConstPro.Value = CommonMotions.GetPeriodYear();
1596

  
1597
                CommonMotions.SetSerchTitle(label4, label7, numUDConstPro, label5);
1478 1598
            }
1479 1599
            catch (Exception ex)
1480 1600
            {
trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionBaseInfo/FrmConstructionBaseInfoAuxiliary.cs
796 796
                strSQL.Append("  , B.ORDERERSDIVISION");
797 797
                strSQL.Append("  , B.ORDERERSCODE");
798 798
                strSQL.Append("  , B.TARGETDATE");
799
                strSQL.Append("  , DATE_FORMAT(B.CONFIRMATIONDATE, '%Y/%m/%d') AS DEPOSITDATE");
799
                //strSQL.Append("  , DATE_FORMAT(B.CONFIRMATIONDATE, '%Y/%m/%d') AS DEPOSITDATE");
800
                strSQL.Append("  , DATE_FORMAT(C.DEPOSITDATE, '%Y/%m/%d') AS DEPOSITDATE");
800 801
                strSQL.Append("  , DATE_FORMAT(B.CONFIRMATIONDATE, '%Y/%m/%d') AS CONFIRMATIONDATE");
801 802
                strSQL.Append("  , B.DEPOSITAMOUNT");
802 803
                strSQL.Append("  , B.DIFFERENCEAMOUNT");
......
811 812
                strSQL.AppendFormat(" A1.MAINCONSTRUCTIONCODE = {0}", ConstrCode);
812 813
                strSQL.Append("  ) AS A");
813 814
                strSQL.Append("  , depositdatadetail AS B");
815
                strSQL.Append("    Left Join(Select");
816
                strSQL.Append("                  CC.ORDERERSDIVISION");
817
                strSQL.Append("                , CC.ORDERERSCODE");
818
                strSQL.Append("                , CC.TARGETDATE");
819
                strSQL.Append("                , MAX(CC.DEPOSITDATE) As DEPOSITDATE");
820
                strSQL.Append("              From depositdata As CC");
821
                strSQL.Append("              Group By CC.ORDERERSDIVISION, CC.ORDERERSCODE, CC.TARGETDATE) As C");
822
                strSQL.Append("         On C.ORDERERSDIVISION = B.ORDERERSDIVISION");
823
                strSQL.Append("        And C.ORDERERSCODE = B.ORDERERSCODE");
824
                strSQL.Append("        And C.TARGETDATE = B.TARGETDATE");
814 825
                strSQL.Append(" WHERE  B.REQUESTNO = A.REQUESTNO");
815 826
            }
816 827
            catch (Exception ex)
......
861 872
                    dgv.Rows[1].Cells[i].Value = CommonMotions.cnvInt(CurRec[(int)GetDepositData.OrderersDivision]);
862 873
                    dgv.Rows[2].Cells[i].Value = CommonMotions.cnvInt(CurRec[(int)GetDepositData.OrderersCode]);
863 874
                    dgv.Rows[3].Cells[i].Value = CommonMotions.cnvInt(CurRec[(int)GetDepositData.TargetDate]);
864
                    dgv.Rows[4].Cells[i].Value = CommonMotions.cnvDate(CurRec[(int)GetDepositData.DepositDate]).ToShortDateString();
865
                    dgv.Rows[5].Cells[i].Value = CommonMotions.cnvDate(CurRec[(int)GetDepositData.CheckDate]).ToShortDateString();
875

  
876
                    string strDepositDate = CommonMotions.cnvDate(CurRec[(int)GetDepositData.DepositDate]).ToShortDateString();
877
                    string strCheckDate = CommonMotions.cnvDate(CurRec[(int)GetDepositData.CheckDate]).ToShortDateString();
878
                    if (!strDepositDate.Equals(strDefDate)) dgv.Rows[4].Cells[i].Value = strDepositDate;
879
                    if (!strCheckDate.Equals(strDefDate)) dgv.Rows[5].Cells[i].Value = strCheckDate;
880

  
866 881
                    dgv.Rows[6].Cells[i].Value = CommonMotions.cnvInt(CurRec[(int)GetDepositData.DepositAmount]).ToString("#,0");
867 882
                    dgv.Rows[7].Cells[i].Value = CommonMotions.cnvInt(CurRec[(int)GetDepositData.DifferenceAmount]).ToString("#,0");
868 883

  
869 884
                    dgv.Rows[6].Cells[i].Style.Alignment = DataGridViewContentAlignment.MiddleRight;
870 885
                    dgv.Rows[7].Cells[i].Style.Alignment = DataGridViewContentAlignment.MiddleRight;
871

  
872
                    if (strDefDate.Equals(CommonMotions.cnvString(dgv.Rows[3].Cells[i].Value))) dgv.Rows[3].Cells[i].Value = "";
873
                    if (strDefDate.Equals(CommonMotions.cnvString(dgv.Rows[4].Cells[i].Value))) dgv.Rows[4].Cells[i].Value = "";
874 886
                }
875 887
            }
876 888
            catch (Exception ex)
......
3880 3892
                if (m_DspCtrl[(int)DspCnt.ConstructionCode].Text.Length == 0)
3881 3893
                {
3882 3894
                    int PeriodValue = 0;
3883
                    if (CommonMotions.SystemMasterData.ConstructionNoBase == (int)SystemMaster.ConstrNoBaseDef.BusinessPeriod)
3895
                    if (CommonMotions.BasePeriodYear())
3884 3896
                    {   // ----- ?c????x?[?X???
3885 3897

  
3886 3898
                        // ???????Z?b?g
......
4689 4701
                data.MessageContent += "???????????????B";
4690 4702

  
4691 4703
                // ?????N???
4692
                data.LinkType = 1;
4704
                data.LinkType = (int)MessageBoardData.LinkTypeDef.ConstructionInfo;
4693 4705
                data.LinkMessage = string.Format("?H??????F{0} ?H??????F{1}", m_DspCtrl[(int)DspCnt.ConstructionCode].Text,
4694 4706
                                                                                m_DspCtrl[(int)DspCnt.ConstructionName].Text);
4695 4707
                data.LinkCode = string.Format("{0}", m_DspCtrl[(int)DspCnt.ConstructionCode].Text);
......
4698 4710
                data.MessageColor = String.Format("0x{0:X2}{1:X2}{2:X2}", Color.White.R
4699 4711
                                                                        , Color.White.G
4700 4712
                                                                        , Color.White.B);
4701
                data.BackColor = String.Format("0x{0:X2}{1:X2}{2:X2}", Color.Green.R
4702
                                                                        , Color.Green.G
4703
                                                                        , Color.Green.B);
4713
                data.BackColor = String.Format("0x{0:X2}{1:X2}{2:X2}", Color.LightGreen.R
4714
                                                                        , Color.LightGreen.G
4715
                                                                        , Color.LightGreen.B);
4704 4716
                data.WritingDate = DateTime.Now;
4705 4717
                data.PersonCode = CommonMotions.LoginUserData.PersonCode;
4706 4718
                data.ShareFlag = 1;
......
4791 4803
                data.MessageContent += "???????????????B";
4792 4804

  
4793 4805
                // ?????N???
4794
                data.LinkType = 1;
4806
                data.LinkType = (int)MessageBoardData.LinkTypeDef.ConstructionInfo;
4795 4807
                data.LinkMessage = string.Format("?H??????F{0} ?H??????F{1}", m_DspCtrl[(int)DspCnt.ConstructionCode].Text,
4796 4808
                                                                                m_DspCtrl[(int)DspCnt.ConstructionName].Text);
4797 4809
                data.LinkCode = string.Format("{0}", m_DspCtrl[(int)DspCnt.ConstructionCode].Text);
......
4800 4812
                data.MessageColor = String.Format("0x{0:X2}{1:X2}{2:X2}", Color.White.R
4801 4813
                                                                        , Color.White.G
4802 4814
                                                                        , Color.White.B);
4803
                data.BackColor = String.Format("0x{0:X2}{1:X2}{2:X2}", Color.Green.R
4804
                                                                        , Color.Green.G
4805
                                                                        , Color.Green.B);
4815
                data.BackColor = String.Format("0x{0:X2}{1:X2}{2:X2}", Color.LightSeaGreen.R
4816
                                                                        , Color.LightSeaGreen.G
4817
                                                                        , Color.LightSeaGreen.B);
4806 4818

  
4807 4819
                data.WritingDate = DateTime.Now;
4808 4820
                data.PersonCode = CommonMotions.LoginUserData.PersonCode;
trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionJoin/FrmConstructionJoin.Designer.cs
28 28
        /// </summary>
29 29
        private void InitializeComponent()
30 30
        {
31
            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle();
32
            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle8 = new System.Windows.Forms.DataGridViewCellStyle();
33
            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle9 = new System.Windows.Forms.DataGridViewCellStyle();
34
            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle10 = new System.Windows.Forms.DataGridViewCellStyle();
35
            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle11 = new System.Windows.Forms.DataGridViewCellStyle();
36
            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle12 = new System.Windows.Forms.DataGridViewCellStyle();
31
            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
32
            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
33
            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
34
            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
35
            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle();
36
            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle();
37 37
            this.btnCancel = new System.Windows.Forms.Button();
38 38
            this.btnEntry = new System.Windows.Forms.Button();
39 39
            this.label1 = new System.Windows.Forms.Label();
40 40
            this.btnSerchWork = new System.Windows.Forms.Button();
41 41
            this.tvDispData = new System.Windows.Forms.TreeView();
42 42
            this.btnNewWork = new System.Windows.Forms.Button();
43
            this.dgvMaster = new CustomControls.DataGridViewEX();
43
            this.dgvMaster = new ProcessManagement.Forms.CustomControls.DataGridViewEX();
44 44
            this.Column1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
... 差分の行数が表示可能な上限を超えました。超過分は表示しません。

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