Index: trunk/src/ProcessManagement/ProcessManagement/Common/CommonDefine.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/Common/CommonDefine.cs	(revision 393)
+++ trunk/src/ProcessManagement/ProcessManagement/Common/CommonDefine.cs	(revision 394)
@@ -353,11 +353,24 @@
         /// </summary>
         public static string s_AllMembersString = "全　　員";
         public static int s_AllMembersCode = 99999999;
+        #endregion
 
         /// <summary>
+        /// 部署引継色
+        /// </summary>
+        public static Color s_SuccessionBackColor = Color.LightSkyBlue;
+        public static Color s_SuccessionForeColor = Color.LightYellow;
+
+        /// <summary>
+        /// 担当割当色
+        /// </summary>
+        public static Color s_AssignBackColor = Color.LightBlue;
+        public static Color s_AssignForeColor = Color.LightYellow;
+
+        /// <summary>
         /// 社長室コード（部署コード）
         /// </summary>
-        public static int s_PresidentsOffice = 7;
+        //public static int s_PresidentsOffice = 7;
 
         /// <summary>
         /// 総務部コード（部署コード）
@@ -364,7 +377,6 @@
         /// </summary>
         public static int s_GeneralAffairsDevision = 4;
         #endregion
-        #endregion
 
         #region 行動予定 会社行事名称・コード
         /// <summary>
Index: trunk/src/ProcessManagement/ProcessManagement/Common/Process/ClsExcute.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/Common/Process/ClsExcute.cs	(revision 393)
+++ trunk/src/ProcessManagement/ProcessManagement/Common/Process/ClsExcute.cs	(revision 394)
@@ -419,6 +419,14 @@
         static int m_EditFlg = (int)CommonDefine.ProcessDataEdit.Reference;
         #endregion
 
+        #region 起動不許可時メッセージ
+        /// <summary>
+        /// 起動不許可時メッセージ
+        /// </summary>
+        private const string s_NotExecuteMessage = "選択された処理の起動権限が設定されていません。";
+        private const string s_NotExecuteTitile = "起動権限確認";
+        #endregion
+
         #region 起動処理
         /// <summary>
         /// プロセス起動
@@ -435,7 +443,7 @@
                     // 起動チェック
                     if (!ClsSecurityPermission.GetExecutePermission(m_ProcControlPara[NowPoint].ProcNo, ref m_EditFlg))
                     {
-                        MessageBox.Show("選択された処理の起動権限が設定されていません。", "起動権限確認", MessageBoxButtons.OK, MessageBoxIcon.Stop);
+                        MessageBox.Show(s_NotExecuteMessage, s_NotExecuteTitile, MessageBoxButtons.OK, MessageBoxIcon.Stop);
                         BackProcess();
                     }
 
@@ -444,6 +452,15 @@
                         #region 通常処理
                         // ----- 通常処理
                         case (int)ProcessExecuteNo.ConstructionList:                    //  1:工事情報一覧
+                            // 一覧の次処理の起動チェック
+                            int NextProcNo = m_ProcControlPara[NowPoint].IntExecParameter[0];
+                            if (!ClsSecurityPermission.GetExecutePermission(NextProcNo, ref m_EditFlg))
+                            {
+                                MessageBox.Show(s_NotExecuteMessage, s_NotExecuteTitile, MessageBoxButtons.OK, MessageBoxIcon.Stop);
+                                BackProcess();
+                                break;
+                            }
+
                             ProcessExecuteNo_ConstructionList(m_ProcControlPara[NowPoint]);
                             break;
 
@@ -921,6 +938,7 @@
             {
                 // 次起動プロセスセット
                 frm.ExecuteFlg = CurrentPara.IntExecParameter[0];
+
                 // データ追加フラグ
                 frm.DataAddtionButton = CurrentPara.BoolExecParameter[0];
 
Index: trunk/src/ProcessManagement/ProcessManagement/Common/Process/ClsSecurityPermission.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/Common/Process/ClsSecurityPermission.cs	(revision 393)
+++ trunk/src/ProcessManagement/ProcessManagement/Common/Process/ClsSecurityPermission.cs	(revision 394)
@@ -366,39 +366,39 @@
         #endregion
 
         #region 総務部の対象プロセスへの起動許可判定
-        /// <summary>
-        /// 総務部の対象プロセスへの起動許可判定
-        /// </summary>
-        /// <param name="ProcessNo"></param>
-        /// <returns></returns>
-        public static bool PermitGeneralAffairsDevision(int ProcessNo)
-        {
-            try
-            {
-                bool bReturn = false;
-                if (CommonMotions.LoginUserData.DepartmentCode != CommonDefine.s_GeneralAffairsDevision) return false;
+        ///// <summary>
+        ///// 総務部の対象プロセスへの起動許可判定
+        ///// </summary>
+        ///// <param name="ProcessNo"></param>
+        ///// <returns></returns>
+        //public static bool PermitGeneralAffairsDevision(int ProcessNo)
+        //{
+        //    try
+        //    {
+        //        bool bReturn = false;
+        //        if (CommonMotions.LoginUserSecurity.GeneralAffairs != (int)SecurityMaster.GeneAffDef.GeneralDep) return false;
                     
-                switch (ProcessNo)
-                {
-                    case (int)ClsExcute.ProcessExecuteNo.ConstructionBaseInfo:  //  2:工事情報入力
-                    case (int)ClsExcute.ProcessExecuteNo.ConstructionBudget:    //  6:工事予算書入力
-                    case (int)ClsExcute.ProcessExecuteNo.PurchaseOrderPrint:    // 10:注文書印刷
-                    case (int)ClsExcute.ProcessExecuteNo.ConstructionLedger:    // 13:工事詳細台帳
-                        bReturn = true;
-                        break;
-                    default:
-                        bReturn = false;
-                        break;
-                }
+        //        switch (ProcessNo)
+        //        {
+        //            case (int)ClsExcute.ProcessExecuteNo.ConstructionBaseInfo:  //  2:工事情報入力
+        //            case (int)ClsExcute.ProcessExecuteNo.ConstructionBudget:    //  6:工事予算書入力
+        //            case (int)ClsExcute.ProcessExecuteNo.PurchaseOrderPrint:    // 10:注文書印刷
+        //            case (int)ClsExcute.ProcessExecuteNo.ConstructionLedger:    // 13:工事詳細台帳
+        //                bReturn = true;
+        //                break;
+        //            default:
+        //                bReturn = false;
+        //                break;
+        //        }
 
-                return bReturn;
-            }
-            catch (Exception ex)
-            {
-                logger.ErrorFormat("システムエラー：{0}：{1}", CommonMotions.GetMethodName(), ex.Message);
-                return false;
-            }
-        }
+        //        return bReturn;
+        //    }
+        //    catch (Exception ex)
+        //    {
+        //        logger.ErrorFormat("システムエラー：{0}：{1}", CommonMotions.GetMethodName(), ex.Message);
+        //        return false;
+        //    }
+        //}
         #endregion
         #endregion
 
Index: trunk/src/ProcessManagement/ProcessManagement/DataModel/ComponentMaster.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/DataModel/ComponentMaster.cs	(revision 393)
+++ trunk/src/ProcessManagement/ProcessManagement/DataModel/ComponentMaster.cs	(revision 394)
@@ -10,6 +10,59 @@
     /// </summary>
     public class ComponentMaster
     {
+        #region 定数
+        #region 下位項目フラグ定義
+        /// <summary>
+        /// 下位項目フラグ定義
+        /// </summary>
+        public enum SubitemsFlgDef
+        {
+            /// <summary>
+            /// 0:下位項目無
+            /// </summary>
+            NoneData = 0,
+            /// <summary>
+            /// 1:下位項目有
+            /// </summary>
+            ExistsData
+        }
+        #endregion
+
+        #region 直接入力フラグ
+        /// <summary>
+        /// 直接入力フラグ
+        /// </summary>
+        public enum DirectInputFlgDef
+        {
+            /// <summary>
+            /// 0:直接入力不許可
+            /// </summary>
+            NoneInput = 0,
+            /// <summary>
+            /// 1:直接入力許可
+            /// </summary>
+            DirectInput,
+        }
+        #endregion
+
+        #region 自社経費フラグ
+        /// <summary>
+        /// 自社経費フラグ
+        /// </summary>
+        public enum MyExpensesFlgDef
+        {
+            /// <summary>
+            /// 0:施工費
+            /// </summary>
+            ConstrCost = 0,
+            /// <summary>
+            /// 1:経費
+            /// </summary>
+            Expenses,
+        }
+        #endregion
+        #endregion
+
         #region メンバ変数
         private int         m_ComponentCode = 0;	            // 構成キー
         private int         m_DisplayOrder = 0;	                // 表示順
Index: trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ApprovalScreen/FrmApprovalScreen.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ApprovalScreen/FrmApprovalScreen.cs	(revision 393)
+++ trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ApprovalScreen/FrmApprovalScreen.cs	(revision 394)
@@ -244,6 +244,9 @@
             //�R���g���[���I�u�W�F�N�g�擾
             SetDisplayObject();
 
+            // ��������ʃ��C�A�E�g�ݒ�
+            InitDispLayout();
+
             // �f�[�^�\��
             AllDataDisplay();
 
Index: trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ApprovalScreen/FrmApprovalScreenAuxiliary.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ApprovalScreen/FrmApprovalScreenAuxiliary.cs	(revision 393)
+++ trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ApprovalScreen/FrmApprovalScreenAuxiliary.cs	(revision 394)
@@ -326,35 +326,23 @@
                     m_ApprovalCode = Code2;
                 }
 
-                // 申請レコード更新
-                // 承認時は条件を満たすかをチェックする
-                switch (statusCode)
-                {
-                    case (int)CommonDefine.ApprovalStatus.Approval:
-                        // ----- 承認
-                        // 案件に対して最終承認がされているかを確認する
-                        if (!ClsCommonApproval.CheckProcessApprovalFinal(m_ConstructionCode, m_ApprovalCode, m_OrderNo)) break;
+                // ----- 申請レコード更新
+                // 承認以外は以下を処理しない
+                if (statusCode != (int)CommonDefine.ApprovalStatus.Approval) return true;
 
-                        // 最終承認がされていれば申請レコードを承認へ変更する
-                        if (!ClsCommonApproval.SetPrimaryRecStatus(m_ConstructionCode,
-                                                                        m_ApprovalCode,
-                                                                        m_OrderNo,
-                                                                        statusCode)) return false;
+                // ----- 承認
+                // 案件に対して最終承認がされているかを確認する
+                if (!ClsCommonApproval.CheckProcessApprovalFinal(m_ConstructionCode, m_ApprovalCode, m_OrderNo)) return true;
 
-                        // 承認完了後に処理があるものは処理する
-                        ApprovalNextProcess();
+                // 最終承認がされていれば申請レコードを承認へ変更する
+                if (!ClsCommonApproval.SetPrimaryRecStatus(m_ConstructionCode,
+                                                                m_ApprovalCode,
+                                                                m_OrderNo,
+                                                                statusCode)) return false;
 
-                        break;
+                // 承認完了後に処理があるものは処理する
+                ApprovalNextProcess();
 
-                    default:
-                        // ----- 承認以外
-                        if (!ClsCommonApproval.SetPrimaryRecStatus(m_ConstructionCode,
-                                                                        m_ApprovalCode,
-                                                                        m_OrderNo,
-                                                                        statusCode)) return false;
-                        break;
-                }
-
                 return true;
             }
             catch (Exception ex)
@@ -441,6 +429,24 @@
         }
         #endregion
 
+        #region 初期時画面レイアウト設定
+        /// <summary>
+        /// 初期時画面レイアウト設定
+        /// </summary>
+        private void InitDispLayout()
+        {
+            try
+            {
+                label14.Text = CommonMotions.GetYearTitle();
+                label19.Text = CommonMotions.GetYearTitle(false).Replace("度", "");
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("システムエラー：{0}：{1}", CommonMotions.GetMethodName(), ex.Message);
+            }
+        }
+        #endregion
+
         #region 表示オブジェクトの取得
         /// <summary>
         /// 表示オブジェクトの取得
@@ -742,9 +748,16 @@
                 ArrayList workdlist = new ArrayList();
                 if (!cbidDB.ExecuteReader(strSQL.ToString(), ref workdlist)) return false;
                 if (workdlist.Count == 0) return false;
-                
+
                 // 営業期数セット
-                m_dispLabelControl[(int)DispHeader.ConstrPeriod].Text = string.Format("{0}", m_ConstrBaseRec.ConstructionPeriod);
+                if (CommonMotions.BasePeriodYear())
+                {
+                    m_dispLabelControl[(int)DispHeader.ConstrPeriod].Text = string.Format("{0}", m_ConstrBaseRec.ConstructionPeriod);
+                }
+                else
+                {
+                    m_dispLabelControl[(int)DispHeader.ConstrPeriod].Text = string.Format("{0}", m_ConstrBaseRec.ConstructionYear);
+                }
 
                 object[] objRec = (object[])workdlist[0];
                 // データ表示
Index: trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstractionList/FrmConstructionListAuxiliary.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstractionList/FrmConstructionListAuxiliary.cs	(revision 393)
+++ trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstractionList/FrmConstructionListAuxiliary.cs	(revision 394)
@@ -485,6 +485,15 @@
                     for (int i = 0; i < s_SQLPart3_1_2.Length; i++) wrkFormat.Append(s_SQLPart3_1_2[i]);
                 }
 
+                if (CommonMotions.BasePeriodYear())
+                {
+                    for (int i = 0; i < s_SQLPart5.Length; i++) wrkFormat.Append(s_SQLPart5[i]);
+                }
+                else
+                {
+                    for (int i = 0; i < s_SQLPart5.Length; i++) wrkFormat.Append(s_SQLPart5_1[i]);
+                }
+
                 strSQL.AppendFormat(wrkFormat.ToString(), numUDConstPro.Value);
                 strSQL.AppendFormat(" AND A.ConstructionStatusFlg < {0}", ProgressComplete);
 
Index: trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionBaseInfo/FrmConstructionBaseInfo.designer.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionBaseInfo/FrmConstructionBaseInfo.designer.cs	(revision 393)
+++ trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionBaseInfo/FrmConstructionBaseInfo.designer.cs	(revision 394)
@@ -3677,7 +3677,7 @@
             this.cmbConstructionYear.FormattingEnabled = true;
             this.cmbConstructionYear.Location = new System.Drawing.Point(639, 4);
             this.cmbConstructionYear.Name = "cmbConstructionYear";
-            this.cmbConstructionYear.Size = new System.Drawing.Size(134, 24);
+            this.cmbConstructionYear.Size = new System.Drawing.Size(115, 24);
             this.cmbConstructionYear.TabIndex = 1;
             this.toolTip1.SetToolTip(this.cmbConstructionYear, "工事の着工開始年度を入力してください");
             this.cmbConstructionYear.Visible = false;
Index: trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionBaseInfo/FrmConstructionBaseInfoAuxiliary.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionBaseInfo/FrmConstructionBaseInfoAuxiliary.cs	(revision 393)
+++ trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionBaseInfo/FrmConstructionBaseInfoAuxiliary.cs	(revision 394)
@@ -4707,12 +4707,12 @@
                 data.LinkCode = string.Format("{0}", m_DspCtrl[(int)DspCnt.ConstructionCode].Text);
 
                 // ���b�Z�[�W�F�Z�b�g
-                data.MessageColor = String.Format("0x{0:X2}{1:X2}{2:X2}", Color.Black.R
-                                                                        , Color.Black.G
-                                                                        , Color.Black.B);
-                data.BackColor = String.Format("0x{0:X2}{1:X2}{2:X2}", Color.LightSkyBlue.R
-                                                                        , Color.LightSkyBlue.G
-                                                                        , Color.LightSkyBlue.B);
+                data.MessageColor = String.Format("0x{0:X2}{1:X2}{2:X2}", CommonDefine.s_SuccessionForeColor.R
+                                                                        , CommonDefine.s_SuccessionForeColor.G
+                                                                        , CommonDefine.s_SuccessionForeColor.B);
+                data.BackColor = String.Format("0x{0:X2}{1:X2}{2:X2}", CommonDefine.s_SuccessionBackColor.R
+                                                                        , CommonDefine.s_SuccessionBackColor.G
+                                                                        , CommonDefine.s_SuccessionBackColor.B);
                 data.WritingDate = DateTime.Now;
                 data.PersonCode = CommonMotions.LoginUserData.PersonCode;
                 data.ShareFlag = 1;
@@ -4809,12 +4809,12 @@
                 data.LinkCode = string.Format("{0}", m_DspCtrl[(int)DspCnt.ConstructionCode].Text);
 
                 // ���b�Z�[�W�F�Z�b�g
-                data.MessageColor = String.Format("0x{0:X2}{1:X2}{2:X2}", Color.Black.R
-                                                                        , Color.Black.G
-                                                                        , Color.Black.B);
-                data.BackColor = String.Format("0x{0:X2}{1:X2}{2:X2}", Color.LightBlue.R
-                                                                        , Color.LightBlue.G
-                                                                        , Color.LightBlue.B);
+                data.MessageColor = String.Format("0x{0:X2}{1:X2}{2:X2}", CommonDefine.s_AssignForeColor.R
+                                                                        , CommonDefine.s_AssignForeColor.G
+                                                                        , CommonDefine.s_AssignForeColor.B);
+                data.BackColor = String.Format("0x{0:X2}{1:X2}{2:X2}", CommonDefine.s_AssignBackColor.R
+                                                                        , CommonDefine.s_AssignBackColor.G
+                                                                        , CommonDefine.s_AssignBackColor.B);
 
                 data.WritingDate = DateTime.Now;
                 data.PersonCode = CommonMotions.LoginUserData.PersonCode;
@@ -6006,11 +6006,11 @@
             try
             {
                 // �������������������͂���Ă��Ȃ���Γ��͂̂��߃��b�N����
-                if (m_DspCtrl[(int)DspCnt.RevCompleteDate].Text.Length < 1
-                || m_DspCtrl[(int)DspCnt.RevCompleteDate].Text.Equals(CommonDefine.s_UndecidedString))
+                TextBox txtRevComp = (TextBox)m_DspCtrl[(int)DspCnt.RevCompleteDate];
+                if (txtRevComp.Text.Length < 1 || txtRevComp.Text.Equals(CommonDefine.s_UndecidedString))
                 {
                     // ��������������
-                    m_DspCtrl[(int)DspCnt.RevCompleteDate].Enabled = true;
+                    txtRevComp.Enabled = true;
                     // �������������R�����g
                     m_DspCtrl[(int)DspCnt.RevCompleteComment].Enabled = true;
                 }
@@ -6020,14 +6020,35 @@
                     btnDataEntry.Visible = true;
                 }
                 // �����m�F�������͂���Ă��Ȃ���Γ��͂̂��߃��b�N����
-                if (m_DspCtrl[(int)DspCnt.BillingComplateDate].Text.Length < 1
-                || m_DspCtrl[(int)DspCnt.BillingComplateDate].Text.Equals(CommonDefine.s_UndecidedString))
+                TextBox txtBillComp = (TextBox)m_DspCtrl[(int)DspCnt.BillingComplateDate];
+                if (txtBillComp.Text.Length < 1 || txtBillComp.Text.Equals(CommonDefine.s_UndecidedString))
                 {
                     // �����m�F��
-                    m_DspCtrl[(int)DspCnt.BillingComplateDate].Enabled = true;
+                    txtBillComp.Enabled = true;
                     // �����R�����g
                     m_DspCtrl[(int)DspCnt.BillingComment].Enabled = true;
                 }
+
+                // ----- �V�X�e����l�ɂ��I��
+                // �����E�N�x���̑I��
+                if (CommonMotions.BasePeriodYear())
+                {
+                    label28.Visible = true;
+                    cmbConstructionPeriod.Visible = true;
+
+                    label2.Visible = false;
+                    cmbConstructionYear.Visible = false;
+                }
+                else
+                {
+                    label28.Visible = false;
+                    cmbConstructionPeriod.Visible = false;
+
+                    label2.Visible = true;
+                    cmbConstructionYear.Visible = true;
+                    label2.Location = label28.Location;
+                    cmbConstructionYear.Location = cmbConstructionPeriod.Location;
+                }
             }
             catch (Exception ex)
             {
Index: trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionBudget/FrmConstructionBudget.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionBudget/FrmConstructionBudget.cs	(revision 393)
+++ trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionBudget/FrmConstructionBudget.cs	(revision 394)
@@ -794,7 +794,7 @@
                     new Font("�l�r ����", 6F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
 
                 // �����������҂��f�[�^�ɃA�N�Z�X����ꍇ�͏�ɎQ�ƃ��[�h  // DEBUG 2016/05/19
-                if (CommonMotions.LoginUserData.DepartmentCode == CommonDefine.s_GeneralAffairsDevision)
+                if (CommonMotions.LoginUserSecurity.GeneralAffairs == (int)SecurityMaster.GeneAffDef.GeneralDep)
                 {
                     m_EditLock = true;
                 }
Index: trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/EstimateInput/FrmEstimateInputAuxiliary.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/EstimateInput/FrmEstimateInputAuxiliary.cs	(revision 393)
+++ trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/EstimateInput/FrmEstimateInputAuxiliary.cs	(revision 394)
@@ -3526,9 +3526,9 @@
                     if (GetComponentRec(ComponentCode, ref wrkRec))
                     {
                         // 直接入力ができる項目は金額入力可にする
-                        if (wrkRec.DirectInputFlg == 1) InputFlg = true;
+                        if (wrkRec.DirectInputFlg == (int)ComponentMaster.DirectInputFlgDef.DirectInput) InputFlg = true;
                         // 下位データが無い場合は入力許可
-                        if (wrkRec.SubitemsFlg == 0)
+                        if (wrkRec.SubitemsFlg == (int)ComponentMaster.SubitemsFlgDef.NoneData)
                         {
                             dgvGrid.Rows[NewRowCnt].Cells[(int)GridTotalColumn.LineTotal].ReadOnly = false;
                             dgvGrid.Rows[NewRowCnt].Cells[(int)GridTotalColumn.InputFlg].Value = (int)CommonDefine.DirectInput.Input;
@@ -4482,11 +4482,11 @@
                     iExpensesFlg = CompList[iy].MyExpensesFlg;
 
                     // 下位に項目が無ければ直接入力
-                    if (CompList[iy].SubitemsFlg == 0) iInputFlg = 1;
+                    if (CompList[iy].SubitemsFlg == (int)ComponentMaster.SubitemsFlgDef.NoneData) iInputFlg = 1;
                     else iInputFlg = 0;
 
                     // 直接入力フラグがOnの場合は直接入力可能をOnにする
-                    if (CompList[iy].DirectInputFlg == 1) iInputFlg = 1;
+                    if (CompList[iy].DirectInputFlg == (int)ComponentMaster.DirectInputFlgDef.DirectInput) iInputFlg = 1;
 
                     // ----- 入力許可フラグと自社経費フラグを見えないセルに持つ
                     dgvEntryData.Rows[CurrentRow].Cells[(int)GridTotalColumn.ExpensesFlg].Value = iExpensesFlg;
@@ -4595,13 +4595,24 @@
 
                 // 積算見積ページデータ取得
                 StringBuilder strSQL = new StringBuilder();
-                strSQL.Append("SELECT A.*, B.CNT, B.COMPONENTCODE FROM ESTIMATEDATABODY A,");
-                strSQL.Append(" (SELECT COMPONENTCODE, COUNT(*) CNT FROM COMPONENTLINKMASTER BB");
-                strSQL.Append(" WHERE BB.COMPONENTCODE IN (SELECT BBB.COMPONENTCODE FROM ESTIMATEDATABODY BBB");
-                strSQL.AppendFormat(" WHERE BBB.CONSTRUCTIONCODE = {0}) GROUP BY BB.COMPONENTCODE) B", m_ConstructionCode);
+                strSQL.Append("SELECT");
+                strSQL.Append(" A.*");
+                strSQL.Append(", B.CNT");
+                strSQL.Append(", B.COMPONENTCODE");
+                strSQL.Append(" FROM");
+                strSQL.Append(" ESTIMATEDATABODY A");
+                strSQL.Append(" LEFT JOIN(SELECT");
+                strSQL.Append("                BBB.CONSTRUCTIONCODE");
+                strSQL.Append("              , BBB.COMPONENTCODE");
+                strSQL.Append("              , COUNT(*) As CNT");
+                strSQL.Append("           FROM ESTIMATEDATABODY BBB");
+                strSQL.AppendFormat("     WHERE BBB.CONSTRUCTIONCODE = {0}", m_ConstructionCode);
+                strSQL.Append("           GROUP BY BBB.COMPONENTCODE) AS B");
+                strSQL.Append(" On B.CONSTRUCTIONCODE = A.ConstructionCode");
+                strSQL.Append(" And B.COMPONENTCODE = A.COMPONENTCODE");
                 strSQL.AppendFormat(" WHERE A.CONSTRUCTIONCODE = {0}", m_ConstructionCode);
-                strSQL.Append(" AND B.COMPONENTCODE = A.COMPONENTCODE");
                 strSQL.Append(" ORDER BY A.PAGECOUNT");
+
                 ArrayList MiddleDataList = new ArrayList();
                 if (!etbDB.ExecuteReader(strSQL.ToString(), ref MiddleDataList)) return false;
 
Index: trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/PurchaseOrderPrint/FrmPurchaseOrderPrintAuxiliary.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/PurchaseOrderPrint/FrmPurchaseOrderPrintAuxiliary.cs	(revision 393)
+++ trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/PurchaseOrderPrint/FrmPurchaseOrderPrintAuxiliary.cs	(revision 394)
@@ -367,7 +367,7 @@
                 bool bRet = false;
 
                 // 総務部所属者のみ注文書を印刷できる
-                if (CommonMotions.LoginUserData.DepartmentCode == CommonDefine.s_GeneralAffairsDevision)
+                if (CommonMotions.LoginUserSecurity.GeneralAffairs == (int)SecurityMaster.GeneAffDef.GeneralDep)
                 {
                     bRet = true;
                 }
Index: trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/RequestInput/FrmRequestInput.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/RequestInput/FrmRequestInput.cs	(revision 393)
+++ trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/RequestInput/FrmRequestInput.cs	(revision 394)
@@ -312,10 +312,24 @@
         {
             try
             {
+                // 今は15回まででお茶を濁す
+                if (m_nMaxOrderNo > 14)
+                {
+                    MessageBox.Show("請求回数は15回までです。"
+                                        , "請求回数エラー"
+                                        , MessageBoxButtons.OK
+                                        , MessageBoxIcon.Error);
+                    return;
+                }
+
+
                 // データが変更されている場合
                 if (m_bDirty == true)
                 {
-                    if (ShowMessageBox("データが保存されます。よろしいですか？", "保存確認", MessageBoxButtons.YesNo, MessageBoxIcon.Information) == DialogResult.No)
+                    if (ShowMessageBox("データが保存されます。よろしいですか？"
+                                        , "保存確認"
+                                        , MessageBoxButtons.YesNo
+                                        , MessageBoxIcon.Information) == DialogResult.No)
                     {
                         return;
                     }
Index: trunk/src/ProcessManagement/ProcessManagement/Forms/Master/Component/FrmComponent.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/Forms/Master/Component/FrmComponent.cs	(revision 393)
+++ trunk/src/ProcessManagement/ProcessManagement/Forms/Master/Component/FrmComponent.cs	(revision 394)
@@ -913,21 +913,15 @@
                 foreach (ComponentMaster work in wrk)
                 {
                     // 作業項目の有無を選択
-                    if (work.SubitemsFlg == 0)
-                        sflg = "無";
-                    else
-                        sflg = "有";
-                    
-                    if (work.DirectInputFlg == 0)
-                        dflg = "不許可";
-                    else
-                        dflg = "許可";
+                    if (work.SubitemsFlg == (int)ComponentMaster.SubitemsFlgDef.NoneData) { sflg = "無"; }
+                    else { sflg = "有"; }
 
-                    if (work.MyExpensesFlg == 0)
-                        lflg = "施工費";
-                    else
-                        lflg = "経費";
+                    if (work.DirectInputFlg == (int)ComponentMaster.DirectInputFlgDef.NoneInput) { dflg = "不許可"; }
+                    else { dflg = "許可"; }
 
+                    if (work.MyExpensesFlg == (int)ComponentMaster.MyExpensesFlgDef.ConstrCost) { lflg = "施工費"; }
+                    else { lflg = "経費"; }
+
                     dgvWorkList.Rows.Add((ino++)
                                         , work.ComponentCode
                                         , work.ComponentName
Index: trunk/src/ProcessManagement/ProcessManagement/Forms/Master/ComponentLink/FrmComponentLink.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/Forms/Master/ComponentLink/FrmComponentLink.cs	(revision 393)
+++ trunk/src/ProcessManagement/ProcessManagement/Forms/Master/ComponentLink/FrmComponentLink.cs	(revision 394)
@@ -776,10 +776,17 @@
             try
             {
                 // 作業名称取得クラス領域
-                List<ComponentMaster> wrk = new List<ComponentMaster>();
                 // 作業名称取得SQL
                 StringBuilder strSql = new StringBuilder();
-                strSql.AppendFormat(" Where DeleteFlg = {0} Order By DisplayOrder ASC", (int)CommonDefine.DataRowDeleteDef.Exists);
+                strSql.Append("SELECT * From componentmaster As A");
+                strSql.Append(" Left Join(Select");
+                strSql.Append("            BB.ComponentCode");
+                strSql.Append("          , Count(*) As LinkCount");
+                strSql.Append("           From componentlinkmaster As BB");
+                strSql.Append("           Group By BB.ComponentCode) As B");
+                strSql.Append(" On B.ComponentCode = A.ComponentCode");
+                strSql.AppendFormat(" Where A.DeleteFlg = {0}", (int)CommonDefine.DataRowDeleteDef.Exists);
+                strSql.Append(" Order By A.DisplayOrder ASC");
 
                 // グリッドの行を0に戻す
                 dgvComponentList.Rows.Clear();
@@ -787,32 +794,31 @@
                 lblSelectName.Text = "";
 
                 // 作業名称取得
-                if (!sbDB.SelectAction(strSql.ToString(), ref wrk)) return false;
+                ArrayList wrk = new ArrayList();
+                if (!sbDB.ExecuteReader(strSql.ToString(), ref wrk)) return false;
 
                 // データ表示
+                int DataCnt = Enum.GetNames(typeof(IOMComponent.NameColumn)).Length;
                 string sflg = string.Empty;
                 string dflg = string.Empty;
                 string lflg = string.Empty;
                 int ino = 1;
-                foreach (ComponentMaster work in wrk)
+                ComponentMaster work = new ComponentMaster();
+                foreach (object[] objWrk in wrk)
                 {
+                    sbDB.Reader2Struct(objWrk, ref work);
+
                     // 作業項目の有無を選択
-                    if (work.SubitemsFlg == 0)
-                        sflg = "無";
-                    else
-                        sflg = "有";
+                    if (work.SubitemsFlg == (int)ComponentMaster.SubitemsFlgDef.NoneData) { sflg = "無"; }
+                    else { sflg = "有"; }
 
-                    if (work.DirectInputFlg == 0)
-                        dflg = "不許可";
-                    else
-                        dflg = "許可";
+                    if (work.DirectInputFlg == (int)ComponentMaster.DirectInputFlgDef.NoneInput) { dflg = "不許可"; }
+                    else { dflg = "許可"; }
 
-                    if (work.MyExpensesFlg == 0)
-                        lflg = "施工費";
-                    else
-                        lflg = "経費";
+                    if (work.MyExpensesFlg == (int)ComponentMaster.MyExpensesFlgDef.ConstrCost) { lflg = "施工費"; }
+                    else { lflg = "経費"; }
 
-                    dgvComponentList.Rows.Add((ino++)
+                    int Rowcnt = dgvComponentList.Rows.Add((ino++)
                                         , work.ComponentCode
                                         , work.ComponentName
                                         , sflg
@@ -820,6 +826,23 @@
                                         , lflg
                                         );
 
+                    // ----- 設定エラーを色で返す
+                    bool bErrsubItems = false;
+                    int nCout = CommonMotions.cnvInt(objWrk[DataCnt + 1]);
+                    if (work.SubitemsFlg == (int)ComponentMaster.SubitemsFlgDef.ExistsData)
+                    {
+                        // 下位項目有で中項目の設定が無い
+                        if (nCout < 1) bErrsubItems = true;
+                    }
+                    else if (work.SubitemsFlg == (int)ComponentMaster.SubitemsFlgDef.NoneData)
+                    {
+                        // 下位項目無で中項目の設定が有る
+                        if (nCout > 0) bErrsubItems = true;
+                    }
+                    if (bErrsubItems)
+                    {
+                        dgvComponentList.Rows[Rowcnt].Cells[(int)DispColumn.subItems].Style.BackColor = Color.Yellow;
+                    }
                 }
                 // 表示行が足りない場合は追加する
                 //if (dgvComponentList.Rows.Count <= CommonDefine.s_MaxInitLineCountMastamente)
Index: trunk/src/ProcessManagement/ProcessManagement/Forms/Master/ComponentLink/FrmComponentLink.designer.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/Forms/Master/ComponentLink/FrmComponentLink.designer.cs	(revision 393)
+++ trunk/src/ProcessManagement/ProcessManagement/Forms/Master/ComponentLink/FrmComponentLink.designer.cs	(revision 394)
@@ -44,6 +44,10 @@
             this.panel1 = new System.Windows.Forms.Panel();
             this.btnLineDel = new System.Windows.Forms.Button();
             this.btnLineAdd = new System.Windows.Forms.Button();
+            this.dgvItemList = new ProcessManagement.Forms.CustomControls.DataGridViewEX();
+            this.dataGridViewTextBoxColumn1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.dataGridViewTextBoxColumn3 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.dataGridViewTextBoxColumn4 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.btnDispDown = new System.Windows.Forms.Button();
             this.btnDispUp = new System.Windows.Forms.Button();
             this.btnEnd = new System.Windows.Forms.Button();
@@ -50,10 +54,6 @@
             this.btnDataSelect = new System.Windows.Forms.Button();
             this.groupBoxEx1 = new ProcessManagement.Forms.CustomControls.GroupBoxEx();
             this.lblSelectName = new System.Windows.Forms.Label();
-            this.dgvItemList = new ProcessManagement.Forms.CustomControls.DataGridViewEX();
-            this.dataGridViewTextBoxColumn1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.dataGridViewTextBoxColumn3 = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.dataGridViewTextBoxColumn4 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.dgvComponentList = new ProcessManagement.Forms.CustomControls.DataGridViewEX();
             this.Column0 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.Column1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
@@ -62,8 +62,8 @@
             this.Column4 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.Column6 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.panel1.SuspendLayout();
+            ((System.ComponentModel.ISupportInitialize)(this.dgvItemList)).BeginInit();
             this.groupBoxEx1.SuspendLayout();
-            ((System.ComponentModel.ISupportInitialize)(this.dgvItemList)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.dgvComponentList)).BeginInit();
             this.SuspendLayout();
             // 
@@ -147,6 +147,74 @@
             this.btnLineAdd.UseVisualStyleBackColor = false;
             this.btnLineAdd.Click += new System.EventHandler(this.btnLineAdd_Click);
             // 
+            // dgvItemList
+            // 
+            this.dgvItemList.AllowUserToAddRows = false;
+            this.dgvItemList.AllowUserToDeleteRows = false;
+            this.dgvItemList.AllowUserToResizeColumns = false;
+            this.dgvItemList.AllowUserToResizeRows = false;
+            this.dgvItemList.BackgroundColor = System.Drawing.Color.White;
+            this.dgvItemList.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
+            dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
+            dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Control;
+            dataGridViewCellStyle1.Font = new System.Drawing.Font("ＭＳ 明朝", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
+            dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.WindowText;
+            dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight;
+            dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
+            dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
+            this.dgvItemList.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle1;
+            this.dgvItemList.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing;
+            this.dgvItemList.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
+            this.dataGridViewTextBoxColumn1,
+            this.dataGridViewTextBoxColumn3,
+            this.dataGridViewTextBoxColumn4});
+            this.dgvItemList.EditMode = System.Windows.Forms.DataGridViewEditMode.EditProgrammatically;
+            this.dgvItemList.EnableHeadersVisualStyles = false;
+            this.dgvItemList.Location = new System.Drawing.Point(13, 3);
+            this.dgvItemList.Name = "dgvItemList";
+            this.dgvItemList.RowHeadersWidth = 20;
+            this.dgvItemList.RowHeadersWidthSizeMode = System.Windows.Forms.DataGridViewRowHeadersWidthSizeMode.DisableResizing;
+            this.dgvItemList.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
+            this.dgvItemList.Size = new System.Drawing.Size(540, 510);
+            this.dgvItemList.TabIndex = 52;
+            // 
+            // dataGridViewTextBoxColumn1
+            // 
+            this.dataGridViewTextBoxColumn1.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
+            dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
+            dataGridViewCellStyle2.Font = new System.Drawing.Font("ＭＳ 明朝", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
+            dataGridViewCellStyle2.ForeColor = System.Drawing.Color.Black;
+            this.dataGridViewTextBoxColumn1.DefaultCellStyle = dataGridViewCellStyle2;
+            this.dataGridViewTextBoxColumn1.Frozen = true;
+            this.dataGridViewTextBoxColumn1.HeaderText = "№";
+            this.dataGridViewTextBoxColumn1.Name = "dataGridViewTextBoxColumn1";
+            this.dataGridViewTextBoxColumn1.ReadOnly = true;
+            this.dataGridViewTextBoxColumn1.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
+            this.dataGridViewTextBoxColumn1.Width = 60;
+            // 
+            // dataGridViewTextBoxColumn3
+            // 
+            this.dataGridViewTextBoxColumn3.Frozen = true;
+            this.dataGridViewTextBoxColumn3.HeaderText = "工種キー";
+            this.dataGridViewTextBoxColumn3.Name = "dataGridViewTextBoxColumn3";
+            this.dataGridViewTextBoxColumn3.Resizable = System.Windows.Forms.DataGridViewTriState.False;
+            this.dataGridViewTextBoxColumn3.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
+            this.dataGridViewTextBoxColumn3.Visible = false;
+            // 
+            // dataGridViewTextBoxColumn4
+            // 
+            dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
+            dataGridViewCellStyle3.Font = new System.Drawing.Font("ＭＳ 明朝", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
+            dataGridViewCellStyle3.ForeColor = System.Drawing.Color.Black;
+            this.dataGridViewTextBoxColumn4.DefaultCellStyle = dataGridViewCellStyle3;
+            this.dataGridViewTextBoxColumn4.Frozen = true;
+            this.dataGridViewTextBoxColumn4.HeaderText = "中項目名称";
+            this.dataGridViewTextBoxColumn4.MaxInputLength = 50;
+            this.dataGridViewTextBoxColumn4.Name = "dataGridViewTextBoxColumn4";
+            this.dataGridViewTextBoxColumn4.ReadOnly = true;
+            this.dataGridViewTextBoxColumn4.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
+            this.dataGridViewTextBoxColumn4.Width = 440;
+            // 
             // btnDispDown
             // 
             this.btnDispDown.BackColor = System.Drawing.Color.Gainsboro;
@@ -228,74 +296,6 @@
             this.lblSelectName.TabIndex = 0;
             this.lblSelectName.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
             // 
-            // dgvItemList
-            // 
-            this.dgvItemList.AllowUserToAddRows = false;
-            this.dgvItemList.AllowUserToDeleteRows = false;
-            this.dgvItemList.AllowUserToResizeColumns = false;
-            this.dgvItemList.AllowUserToResizeRows = false;
-            this.dgvItemList.BackgroundColor = System.Drawing.Color.White;
-            this.dgvItemList.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
-            dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
-            dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Control;
-            dataGridViewCellStyle1.Font = new System.Drawing.Font("ＭＳ 明朝", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
-            dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.WindowText;
-            dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight;
-            dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
-            dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
-            this.dgvItemList.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle1;
-            this.dgvItemList.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing;
-            this.dgvItemList.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
-            this.dataGridViewTextBoxColumn1,
-            this.dataGridViewTextBoxColumn3,
-            this.dataGridViewTextBoxColumn4});
-            this.dgvItemList.EditMode = System.Windows.Forms.DataGridViewEditMode.EditProgrammatically;
-            this.dgvItemList.EnableHeadersVisualStyles = false;
-            this.dgvItemList.Location = new System.Drawing.Point(13, 3);
-            this.dgvItemList.Name = "dgvItemList";
-            this.dgvItemList.RowHeadersWidth = 20;
-            this.dgvItemList.RowHeadersWidthSizeMode = System.Windows.Forms.DataGridViewRowHeadersWidthSizeMode.DisableResizing;
-            this.dgvItemList.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
-            this.dgvItemList.Size = new System.Drawing.Size(540, 510);
-            this.dgvItemList.TabIndex = 52;
-            // 
-            // dataGridViewTextBoxColumn1
-            // 
-            this.dataGridViewTextBoxColumn1.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
-            dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
-            dataGridViewCellStyle2.Font = new System.Drawing.Font("ＭＳ 明朝", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
-            dataGridViewCellStyle2.ForeColor = System.Drawing.Color.Black;
-            this.dataGridViewTextBoxColumn1.DefaultCellStyle = dataGridViewCellStyle2;
-            this.dataGridViewTextBoxColumn1.Frozen = true;
-            this.dataGridViewTextBoxColumn1.HeaderText = "№";
-            this.dataGridViewTextBoxColumn1.Name = "dataGridViewTextBoxColumn1";
-            this.dataGridViewTextBoxColumn1.ReadOnly = true;
-            this.dataGridViewTextBoxColumn1.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
-            this.dataGridViewTextBoxColumn1.Width = 60;
-            // 
-            // dataGridViewTextBoxColumn3
-            // 
-            this.dataGridViewTextBoxColumn3.Frozen = true;
-            this.dataGridViewTextBoxColumn3.HeaderText = "工種キー";
-            this.dataGridViewTextBoxColumn3.Name = "dataGridViewTextBoxColumn3";
-            this.dataGridViewTextBoxColumn3.Resizable = System.Windows.Forms.DataGridViewTriState.False;
-            this.dataGridViewTextBoxColumn3.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
-            this.dataGridViewTextBoxColumn3.Visible = false;
-            // 
-            // dataGridViewTextBoxColumn4
-            // 
-            dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
-            dataGridViewCellStyle3.Font = new System.Drawing.Font("ＭＳ 明朝", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
-            dataGridViewCellStyle3.ForeColor = System.Drawing.Color.Black;
-            this.dataGridViewTextBoxColumn4.DefaultCellStyle = dataGridViewCellStyle3;
-            this.dataGridViewTextBoxColumn4.Frozen = true;
-            this.dataGridViewTextBoxColumn4.HeaderText = "中項目名称";
-            this.dataGridViewTextBoxColumn4.MaxInputLength = 50;
-            this.dataGridViewTextBoxColumn4.Name = "dataGridViewTextBoxColumn4";
-            this.dataGridViewTextBoxColumn4.ReadOnly = true;
-            this.dataGridViewTextBoxColumn4.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
-            this.dataGridViewTextBoxColumn4.Width = 440;
-            // 
             // dgvComponentList
             // 
             this.dgvComponentList.AllowUserToAddRows = false;
@@ -417,10 +417,10 @@
             this.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
             this.BackColor = System.Drawing.Color.Black;
             this.ClientSize = new System.Drawing.Size(1220, 687);
+            this.Controls.Add(this.dgvComponentList);
             this.Controls.Add(this.groupBoxEx1);
             this.Controls.Add(this.btnDataSelect);
             this.Controls.Add(this.panel1);
-            this.Controls.Add(this.dgvComponentList);
             this.Controls.Add(this.label1);
             this.Controls.Add(this.btnDataDelete);
             this.Controls.Add(this.btnDataEntry);
@@ -438,8 +438,8 @@
             this.Load += new System.EventHandler(this.FrmComponentLink_Load);
             this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.FrmComponentLink_KeyDown);
             this.panel1.ResumeLayout(false);
+            ((System.ComponentModel.ISupportInitialize)(this.dgvItemList)).EndInit();
             this.groupBoxEx1.ResumeLayout(false);
-            ((System.ComponentModel.ISupportInitialize)(this.dgvItemList)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.dgvComponentList)).EndInit();
             this.ResumeLayout(false);
 
Index: trunk/src/ProcessManagement/ProcessManagement/Forms/Master/Security/FrmSecurity.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/Forms/Master/Security/FrmSecurity.cs	(revision 393)
+++ trunk/src/ProcessManagement/ProcessManagement/Forms/Master/Security/FrmSecurity.cs	(revision 394)
@@ -889,11 +889,8 @@
         /// <param name="e"></param>
         private void FrmSecurity_SizeChanged(object sender, EventArgs e)
         {
-            if (this.WindowState == FormWindowState.Normal)
-            {
-                // Normalサイズ設定
-                OrignalSizeSet();
-            }
+            // Normalサイズ設定
+            OrignalSizeSet();
         }
         #endregion
     }
Index: trunk/src/ProcessManagement/ProcessManagement/Forms/Master/Security/FrmSecurityAuxiliary.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/Forms/Master/Security/FrmSecurityAuxiliary.cs	(revision 393)
+++ trunk/src/ProcessManagement/ProcessManagement/Forms/Master/Security/FrmSecurityAuxiliary.cs	(revision 394)
@@ -670,8 +670,9 @@
             try
             {
                 DataGridViewEX dgv = dgvProcess;
+                int DspCtrlCnt = Enum.GetNames(typeof(GridColumn)).Length;
                 // 最前列は処理しない
-                if (dgv.CurrentCell.ColumnIndex <= ((int)GridColumn.SecName + 2)) return;
+                if (dgv.CurrentCell.ColumnIndex <= (DspCtrlCnt + 1)) return;
 
                 // カレント行数取得
                 int curRow = dgv.CurrentCell.RowIndex;
@@ -763,8 +764,12 @@
             try
             {
                 DataGridViewEX dgv = dgvProcess;
+
+                int DspCtrlCnt = Enum.GetNames(typeof(GridColumn)).Length;
                 // 最前列は処理しない
-                if (dgv.CurrentCell.ColumnIndex > dgv.ColumnCount - 3) return;
+                if (dgv.CurrentCell.ColumnIndex < DspCtrlCnt) return;
+                // 最後尾は処理しない
+                if ((dgv.ColumnCount - 2) <= dgv.CurrentCell.ColumnIndex) return;
 
                 // カレント行数取得
                 int curRow = dgv.CurrentCell.RowIndex;
Index: trunk/src/ProcessManagement/ProcessManagement/Forms/ZMenu/FrmMenu.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/Forms/ZMenu/FrmMenu.cs	(revision 393)
+++ trunk/src/ProcessManagement/ProcessManagement/Forms/ZMenu/FrmMenu.cs	(revision 394)
@@ -961,6 +961,15 @@
             {
                 // 自画面再表示
                 this.Visible = true;
+
+                // 画面初期データセット
+                DisplayDataLoad();
+
+                // サブフォームハンドルリスト初期化
+                InitSubFormHandleList();
+
+                // 初期化フラグOFF
+                m_bInitFlg = false;
             }
             else if (drRet == DialogResult.No)
             {
@@ -1305,7 +1314,7 @@
                 bExecFlg = ClsSecurityPermission.PersonDataAccess(iConstructionCode);
 
                 // 総務部所属者は工事基本情報の全データを対象にできるただし参照のみ
-                if (CommonMotions.LoginUserData.DepartmentCode == CommonDefine.s_GeneralAffairsDevision) bExecFlg = true;
+                if (CommonMotions.LoginUserSecurity.GeneralAffairs == (int)SecurityMaster.GeneAffDef.GeneralDep) bExecFlg = true;
 
                 if (bExecFlg)
                 {
Index: trunk/src/ProcessManagement/ProcessManagement/Forms/ZMenu/FrmMenuAuxiliary.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/Forms/ZMenu/FrmMenuAuxiliary.cs	(revision 393)
+++ trunk/src/ProcessManagement/ProcessManagement/Forms/ZMenu/FrmMenuAuxiliary.cs	(revision 394)
@@ -587,48 +587,55 @@
         {
             try
             {
+                // 使用しないボタンを消す
+                ButtonControlVisibleSet(tblLayoutOrder.Controls);
+
                 // ----- 受注管理
-                int None = (int)CommonDefine.SecurityRangePos.None;                 // 担当のみ
-                if (CommonMotions.LoginUserSecurity.SecRange == CommonDefine.SecurityRangeList[None].Key)
+                int Normal = (int)CommonDefine.SecurityRankPos.NormalAuthority;             // 担当のみ
+                int Limited = (int)CommonDefine.SecurityRankPos.LimitedAuthority;           // 所属長
+
+                btnOrder0300.Visible = true;
+                btnOrder0301.Visible = true;
+                // 結合・分割は上位2クラスのみ使える
+                if (CommonMotions.LoginUserSecurity.SecRank == CommonDefine.SecurityRankList[Normal].Key
+                    || CommonMotions.LoginUserSecurity.SecRank == CommonDefine.SecurityRankList[Limited].Key)
                 {
-                    btnOrder0300.Text = string.Empty;
-                    btnOrder0301.Text = string.Empty;
+                    btnOrder0300.Visible = false;
+                    btnOrder0301.Visible = false;
                 }
 
-                // 使用しないボタンを消す
-                ButtonControlVisibleSet(tblLayoutOrder.Controls);
-
+                // ----- 使用ボタンはすべて表示する
                 // 実行権限が無いものは表示しない
-                int editflg = 0;
-                int RowFalseCnt = 0;
-                string strButtonName = string.Empty;
-                bool bDsp = true;
-                for (int iy = 0; iy < OrderMenuButton.GetLength(0); iy++)
-                {
-                    RowFalseCnt = 0;
-                    for (int ix = 0; ix < OrderMenuButton.GetLength(1); ix++)
-                    {
-                        // ボタンをさがす。
-                        strButtonName = string.Format("{0}{1}{2}", s_btnOrder, iy.ToString("00"), ix.ToString("00"));
-                        Control[] findCtrl = this.Controls.Find(strButtonName, true);
-                        // ボタンが無ければ処理しない
-                        if (findCtrl.Length < 1) continue;
+                //int editflg = 0;
+                //int RowFalseCnt = 0;
+                //string strButtonName = string.Empty;
+                //bool bDsp = true;
+                //for (int iy = 0; iy < OrderMenuButton.GetLength(0); iy++)
+                //{
+                //    RowFalseCnt = 0;
+                //    for (int ix = 0; ix < OrderMenuButton.GetLength(1); ix++)
+                //    {
+                //        // ボタンをさがす。
+                //        strButtonName = string.Format("{0}{1}{2}", s_btnOrder, iy.ToString("00"), ix.ToString("00"));
+                //        Control[] findCtrl = this.Controls.Find(strButtonName, true);
+                //        // ボタンが無ければ処理しない
+                //        if (findCtrl.Length < 1) continue;
 
-                        if (ClsSecurityPermission.GetExecutePermission(OrderMenuButton[iy, ix], ref editflg))
-                        {
-                            // ボタンが見つかれば、表示を変更する
-                            bDsp = true;
-                        }
-                        else
-                        {
-                            // ボタンが見つかれば、表示を変更する
-                            bDsp = false;
-                            RowFalseCnt++;
-                        }
-                        // ボタンが見つかれば、表示を変更する
-                        ((Button)findCtrl[0]).Visible = bDsp;
-                    }
-                }
+                //        if (ClsSecurityPermission.GetExecutePermission(OrderMenuButton[iy, ix], ref editflg))
+                //        {
+                //            // ボタンが見つかれば、表示を変更する
+                //            bDsp = true;
+                //        }
+                //        else
+                //        {
+                //            // ボタンが見つかれば、表示を変更する
+                //            bDsp = false;
+                //            RowFalseCnt++;
+                //        }
+                //        // ボタンが見つかれば、表示を変更する
+                //        ((Button)findCtrl[0]).Visible = bDsp;
+                //    }
+                //}
             }
             catch (Exception ex)
             {
@@ -2574,38 +2581,128 @@
                 strSQL.Append("SELECT");
                 strSQL.Append(" A.*");
                 strSQL.Append(", B.TONAME");
+                strSQL.Append(", B.TOCODE");
                 strSQL.Append(" FROM");
                 strSQL.Append(" MESSAGEBOARDDATA A");
-                strSQL.Append(", MESSAGEBOARDTERGET B");
+                strSQL.Append(" INNER JOIN MESSAGEBOARDTERGET B");
+                strSQL.Append("        ON B.RECORDNUMBER = A.RECORDNUMBER");
+                strSQL.Append("        AND B.BRANCHNUMBER = A.BRANCHNUMBER");
+
                 strSQL.Append(" Where");
-                if (exeflg == (int)TabNameEnum.MessageBoard)
-                {   // 掲示板データ
-                    strSQL.Append(" A.WritingDate > DATE_ADD(NOW(), INTERVAL - 1 MONTH)");
-                    strSQL.AppendFormat(" And A.MessageFlag = {0}", (int)MessageBoardData.MessageFlgDef.Normal);
+                switch (exeflg)
+                {
+                    case (int)TabNameEnum.MessageBoard:
+                        // 掲示板データ
+                        strSQL.Append(" DATE(A.WritingDate) > DATE(DATE_ADD(NOW(), INTERVAL - 1 MONTH))");
+                        strSQL.AppendFormat(" And A.MessageFlag = {0}", (int)MessageBoardData.MessageFlgDef.Normal);
+
+                        DispMessageSelect(exeflg, ref strSQL);
+
+                        strSQL.Append(" Order By");
+                        strSQL.Append(" A.RecordNumber Desc");
+                        strSQL.Append(", A.BranchNumber Asc");
+                        strSQL.Append(", B.SeqNum ASC");
+                        break;
+
+                    case (int)TabNameEnum.BusinessMessage:
+                        // 秘書からの連絡
+                        strSQL.Append(" DATE(A.WritingDate) > DATE(DATE_ADD(NOW(), INTERVAL - 10 DAY))");
+                        strSQL.AppendFormat(" And A.MessageFlag = {0}", (int)MessageBoardData.MessageFlgDef.Secretary);
+
+                        DispMessageSelect(exeflg, ref strSQL);
+
+                        strSQL.Append(" Order By");
+                        strSQL.Append(" A.WritingDate Desc");
+                        strSQL.Append(", A.MessageTitile Asc");
+                        strSQL.Append(", B.SeqNum ASC");
+                        break;
                 }
-                else
-                {   // 秘書からの連絡
-                    strSQL.Append(" A.WritingDate > DATE_ADD(NOW(), INTERVAL - 10 DAY)");
-                    strSQL.AppendFormat(" And A.MessageFlag = {0}", (int)MessageBoardData.MessageFlgDef.Secretary);
-                }
-                strSQL.Append(" AND B.RECORDNUMBER = A.RECORDNUMBER");
-                strSQL.Append(" AND B.BRANCHNUMBER = A.BRANCHNUMBER");
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("システムエラー：{0}：{1}", CommonMotions.GetMethodName(), ex.Message);
+            }
+        }
+        #endregion
 
-                if (exeflg == (int)TabNameEnum.MessageBoard)
+
+        #region 秘書からの連絡の表示範囲を設定するＳＱＬ作成
+        /// <summary>
+        /// 秘書からの連絡の表示範囲を設定するＳＱＬ作成
+        /// </summary>
+        private void DispMessageSelect(int exeflg, ref StringBuilder strSQL)
+        {
+            try
+            {
+                // キー値取得
+                int AllPath = (int)CommonDefine.SecurityRangePos.AllPath;           // 全部署
+                int Multiple = (int)CommonDefine.SecurityRangePos.Multiple;         // 複数部署
+                int Only = (int)CommonDefine.SecurityRangePos.Only;                 // 自部署のみ
+                int None = (int)CommonDefine.SecurityRangePos.None;                 // 自担当者のみ
+
+                // データアクセスに権限により制限がある
+                if (CommonMotions.LoginUserData.PersonCode == CommonDefine.AdminCode
+                || CommonMotions.LoginUserSecurity.SecRange == CommonDefine.SecurityRangeList[AllPath].Key)
                 {
-                    strSQL.Append(" Order By");
-                    strSQL.Append(" A.RecordNumber Desc");
-                    strSQL.Append(", A.BranchNumber Asc");
-                    strSQL.Append(", B.SeqNum ASC");
-
+                    // すべて対象（制限SQL無）
                 }
-                else
-                {   // 掲示板データ
-                    strSQL.Append(" Order By");
-                    strSQL.Append(" A.WritingDate Desc");
-                    strSQL.Append(", A.MessageTitile Asc");
-                    strSQL.Append(", B.SeqNum ASC");
+                else if (CommonMotions.LoginUserSecurity.SecRange == CommonDefine.SecurityRangeList[Multiple].Key
+                        || CommonMotions.LoginUserSecurity.SecRange == CommonDefine.SecurityRangeList[Only].Key)
+                {
+                    // 一部制限有
+                    strSQL.Append(" And (");
+                    // 機密管理者（自部署のみ）
+                    switch (exeflg)
+                    {
+                        case (int)TabNameEnum.MessageBoard:
+                            // 掲示板データ
+                            strSQL.AppendFormat(" (A.FromCode = {0})", CommonMotions.LoginUserData.PersonCode);
+                            strSQL.Append(" Or (A.RecordNumber IN(Select B1.RecordNumber From MESSAGEBOARDTERGET As B1");
+                            strSQL.AppendFormat("                  Where B1.ToCode = {0}))", CommonDefine.s_AllMembersCode);
+                            strSQL.Append(" Or (A.RecordNumber IN(Select B2.RecordNumber From MESSAGEBOARDTERGET As B2");
+                            strSQL.AppendFormat("                  Where B2.ToCode = {0}))", CommonMotions.LoginUserData.PersonCode);
+                            strSQL.Append(" Or (A.RecordNumber IN(Select B3.RecordNumber From MESSAGEBOARDTERGET As B3");
+                            strSQL.Append("                        Where B3.ToCode In (Select A2.PersonCode From PERSONDEPARTMENTMASTER As A1");
+                            strSQL.AppendFormat("                                     Inner Join  personinchargemaster As A2");
+                            strSQL.Append("                                                On A2.DepartmentCode = A1.DepartmentCode");
+                            strSQL.AppendFormat("                                     Where A1.PersonCode = {0})))", CommonMotions.LoginUserData.PersonCode);
+                            strSQL.Append(" Or (A.RecordNumber IN(Select B4.RecordNumber From MESSAGEBOARDTERGET As B4");
+                            strSQL.Append("                        Where B4.ToCode In (Select A3.DepartmentCode From PERSONDEPARTMENTMASTER As A3");
+                            strSQL.AppendFormat("                                    Where A3.PersonCode = {0})))", CommonMotions.LoginUserData.PersonCode);
+                            break;
+                        case (int)TabNameEnum.BusinessMessage:
+                            // 秘書からの連絡
+                            strSQL.AppendFormat("(B.ToCode = {0})", CommonMotions.LoginUserData.PersonCode);
+                            strSQL.Append(" Or (B.ToCode In (Select A1.PersonCode From personinchargemaster As A1");
+                            strSQL.AppendFormat("                 Inner Join PERSONDEPARTMENTMASTER As A2");
+                            strSQL.Append("                       On A2.DepartmentCode = A1.DepartmentCode");
+                            strSQL.AppendFormat("            Where A2.PersonCode = {0}))", CommonMotions.LoginUserData.PersonCode);
+                            break;
+                    }
+                    strSQL.Append(")");
                 }
+                else if (CommonMotions.LoginUserSecurity.SecRange == CommonDefine.SecurityRangeList[None].Key)
+                {
+                    strSQL.Append(" And (");
+                    switch (exeflg)
+                    {
+                        case (int)TabNameEnum.MessageBoard:
+                            // 掲示板データ
+                            strSQL.AppendFormat(" (A.FromCode = {0})", CommonMotions.LoginUserData.PersonCode);
+                            strSQL.Append(" Or (A.RecordNumber IN(Select B1.RecordNumber From MESSAGEBOARDTERGET As B1");
+                            strSQL.AppendFormat("                  Where B1.ToCode = {0}))", CommonDefine.s_AllMembersCode);
+                            strSQL.Append(" Or (A.RecordNumber IN(Select B2.RecordNumber From MESSAGEBOARDTERGET As B2");
+                            strSQL.AppendFormat("                  Where B2.ToCode = {0}))", CommonMotions.LoginUserData.PersonCode);
+                            strSQL.Append(" Or (A.RecordNumber IN(Select B3.RecordNumber From MESSAGEBOARDTERGET As B3");
+                            strSQL.AppendFormat("                  Where B3.ToCode = {0}))", CommonMotions.LoginUserData.DepartmentCode);
+                            break;
+                        case (int)TabNameEnum.BusinessMessage:
+                            // 秘書からの連絡
+                            strSQL.AppendFormat(" (B.ToCode = {0})", CommonMotions.LoginUserData.PersonCode);
+                            break;
+                    }
+                    strSQL.Append(")");
+                }
             }
             catch (Exception ex)
             {
@@ -2658,8 +2755,14 @@
 
                 int nProgCount = 0;
 
+                int None = (int)CommonDefine.SecurityRangePos.None;                 // 自担当者のみ
+
                 // 掲示板データフィールド数取得
                 int ToNameCnt = Enum.GetNames(typeof(IOMessageBoardData.ColumnCnt)).Length;
+                // 部署引継色を文字列で取得
+                string cBackColor = String.Format("0x{0:X2}{1:X2}{2:X2}", CommonDefine.s_SuccessionBackColor.R
+                                                        , CommonDefine.s_SuccessionBackColor.G
+                                                        , CommonDefine.s_SuccessionBackColor.B);
 
                 // １件目のデータ取得
                 object[] firstRec = (object[])mbdData[0];
@@ -2668,7 +2771,7 @@
                 MessageBoardData wrkRow = new MessageBoardData();
                 mbdDB.Reader2Struct(firstRec, ref wrkRow);
                 StringBuilder TergetName = new StringBuilder();
-
+                List<int> TergetCode = new List<int>();
                 foreach (object[] DataRec in mbdData)
                 {
                     // 同じメッセージならば相手先を結合する
@@ -2678,13 +2781,40 @@
                     {
                         if (TergetName.Length != 0) TergetName.Append(",");
                         TergetName.Append(CommonMotions.cnvString(DataRec[ToNameCnt]));
+                        TergetCode.Add(CommonMotions.cnvInt(DataRec[ToNameCnt + 1]));
                         continue;
                     }
 
+                    // 掲示板の場合、部署引継データで自分に関係がないデータは担当者に表示しない
+                    if (exeflg == (int)TabNameEnum.MessageBoard
+                        && wrkRow.LinkType == (int)MessageBoardData.LinkTypeDef.ConstructionInfo
+                        && CommonMotions.LoginUserSecurity.SecRange == CommonDefine.SecurityRangeList[None].Key)
+                    {
+                        // 部署引継を色で判定する
+                        if (wrkRow.BackColor.Equals(cBackColor))
+                        {
+                            bool bMatch = false;
+                            foreach (int CurCode in TergetCode)
+                            {
+                                if (CurCode == CommonMotions.LoginUserData.PersonCode)
+                                {
+                                    bMatch = true;
+                                    break;
+                                }
+                            }
+                            // 書込み者がログイン者
+                            if (wrkRow.FromCode == CommonMotions.LoginUserData.PersonCode) bMatch = true;
+
+                            // 表示しない
+                            if (!bMatch) goto AfterSet;
+                        }
+                    }
+
                     // データセット
                     SetMessageBoardGrid(wrkRow, exeflg, TergetName.ToString());
                     nProgCount++;
 
+                AfterSet:
                     // ブレイクキーセット
                     BreakRecordNo = NowRecordNo;
                     BreakBranchNo = NowBranchNo;
@@ -2693,7 +2823,9 @@
                     mbdDB.ClearStruct(ref wrkRow);
                     mbdDB.Reader2Struct(DataRec, ref wrkRow);
                     TergetName.Clear();
+                    TergetCode.Clear();
                     TergetName.Append(CommonMotions.cnvString(DataRec[ToNameCnt]));
+                    TergetCode.Add(CommonMotions.cnvInt(DataRec[ToNameCnt+1]));
 
                     // ProgressBarの値を変更する
                     prgber.Value = nProgCount;
Index: trunk/src/ProcessManagement/ProcessManagement/Properties/AssemblyInfo.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/Properties/AssemblyInfo.cs	(revision 393)
+++ trunk/src/ProcessManagement/ProcessManagement/Properties/AssemblyInfo.cs	(revision 394)
@@ -33,8 +33,8 @@
 // すべての値を指定するか、下のように '*' を使ってビルドおよびリビジョン番号を 
 // 既定値にすることができます:
 // [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.1.1.1")]
-[assembly: AssemblyFileVersion("1.1.1.1")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.1.0")]
 // Log4netを使用する
 [assembly: log4net.Config.XmlConfigurator(ConfigFile = @"log4net.config", Watch = true)]
 [assembly: NeutralResourcesLanguage("ja-JP")]
