Index: branches/src/ProcessManagement/ProcessManagement/Common/CommonMotions.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Common/CommonMotions.cs	(revision 329)
+++ branches/src/ProcessManagement/ProcessManagement/Common/CommonMotions.cs	(revision 330)
@@ -283,7 +283,7 @@
         }
         #endregion
 
-        #region æ—¥ä»˜è¿”é‚„å¤‰æ�›
+        #region ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆã‚’æ—¥ä»˜ã�«å¤‰æ�›ã�™ã‚‹
         /// <summary>
         /// æ—¥ä»˜è¿”é‚„å¤‰æ�›
         /// </summary>
@@ -1699,31 +1699,43 @@
         }
         #endregion
 
-        #region å¯¾è±¡æ—¥ã‚ˆã‚Šå–¶æ¥­æœŸãƒ»å·¥äº‹å¹´åº¦ã‚’å�–å¾—ã�™ã‚‹ï¼ˆå®Ÿè£…é€”ä¸­ï¼‰
+        #region å¯¾è±¡æ—¥ã‚ˆã‚Šå–¶æ¥­æœŸãƒ»å·¥äº‹å¹´åº¦ã‚’å�–å¾—ã�™ã‚‹
         /// <summary>
-        /// å¯¾è±¡æ—¥ã‚ˆã‚Šå–¶æ¥­æœŸãƒ»å·¥äº‹å¹´åº¦ã‚’å�–å¾—ã�™ã‚‹ï¼ˆå®Ÿè£…é€”ä¸­ï¼‰
+        /// å¯¾è±¡æ—¥ã‚ˆã‚Šå–¶æ¥­æœŸãƒ»å·¥äº‹å¹´åº¦ã‚’å�–å¾—ã�™ã‚‹
         /// </summary>
         /// <param name="NowDay"></param>
         /// <returns></returns>
         public static int ConvDate2YearOrPeriod(DateTime NowDay)
         {
-            int nRetVal = 0;
-            // åˆ�æœŸå€¤ã‚»ãƒƒãƒˆ
-            if (m_systemMaster.ConstructionNoBase == (int)SystemMaster.ConstrNoBaseDef.BusinessPeriod)
-                nRetVal = m_systemMaster.BusinessPeriod;
-            else
-                nRetVal = m_systemMaster.ConstrYear;
+            IOMBizPeriodHistory BizHisDB = new IOMBizPeriodHistory();
             try
             {
+                int nRetVal = 0;
 
+                // ç¯„å›²ã�«å…¥ã‚‹ãƒ‡ãƒ¼ã‚¿ã‚’å�–å¾—ã�™ã‚‹
+                StringBuilder strSQL = new StringBuilder();
 
+                strSQL.AppendFormat(" WHERE (DATE(BeginDate) <= DATE('{0}'))", NowDay.ToShortDateString());
+                strSQL.AppendFormat(" AND (DATE('{0}') <= DATE(CompleteDate))", NowDay.ToShortDateString());
+                strSQL.AppendFormat(" And PeriodFlag = {0}", CommonMotions.SystemMasterData.ConstructionNoBase);
+                strSQL.Append(" Order By PeriodFlag Asc, PeriodYear Asc");
+
+                List<BizPeriodHistory> BizList = new List<BizPeriodHistory>();
+                if (!BizHisDB.SelectAction(strSQL.ToString(), ref BizList)) return 0;
+
+                nRetVal = BizList[0].PeriodYear;
+
                 return nRetVal;
             }
             catch (Exception ex)
             {
                 logger.ErrorFormat("ã‚·ã‚¹ãƒ†ãƒ ã‚¨ãƒ©ãƒ¼ï¼š{0}ï¼š{1}", CommonMotions.GetMethodName(), ex.Message);
-                return nRetVal;
+                return 0;
             }
+            finally
+            {
+                BizHisDB.close(); BizHisDB = null;
+            }
         }
         #endregion
 
@@ -2826,8 +2838,219 @@
         }
         #endregion
 
+        #region éƒ¨ç½²ã‚³ãƒ³ãƒœãƒœãƒƒã‚¯ã‚¹ãƒ‡ãƒ¼ã‚¿å�–å¾—ï¼³ï¼±ï¼¬ä½œæˆ�
+        /// <summary>
+        /// éƒ¨ç½²ã‚³ãƒ³ãƒœãƒœãƒƒã‚¯ã‚¹ãƒ‡ãƒ¼ã‚¿å�–å¾—ï¼³ï¼±ï¼¬ä½œæˆ�
+        /// </summary>
+        /// <param name="strSQL"></param>
+        public static void CreateDepCombBoxSQL(ref StringBuilder strSQL, int nTargetCount)
+        {
+            try
+            {
+                // ä»ŠæœŸã�®ãƒ‡ãƒ¼ã‚¿ã�‹ã�©ã�†ã�‹ã‚’åˆ¤å®šã�™ã‚‹
+                bool bNowSeason = true;
+                if (nTargetCount != CommonMotions.SystemMasterData.BusinessPeriod) bNowSeason = false;
+
+                strSQL.Append("SELECT");
+                strSQL.Append(" A.DEPARTMENTCODE");
+                strSQL.Append(", A.DEPARTMENTSTRING");
+                strSQL.Append(", A.DISPLAYORDER");
+                strSQL.Append(", COUNT(*)");
+                strSQL.Append(" FROM");
+                if (bNowSeason)
+                {
+                    // ä»ŠæœŸã�®ãƒ—ãƒ©ã‚¤ãƒžãƒªãƒ†ãƒ¼ãƒ–ãƒ«ã�¯éƒ¨ç½²ãƒžã‚¹ã‚¿
+                    strSQL.Append(" DEPARTMENTMASTER A");
+                }
+                else
+                {   // é�ŽåŽ»ã�®ãƒ‡ãƒ¼ã‚¿ã�¯å·¥äº‹æƒ…å ±ã‚ˆã‚Šå�–å¾—ã�™ã‚‹
+                    strSQL.Append(" (");
+                    strSQL.Append("Select");
+                    strSQL.Append(" A1.SalesDepCode As DEPARTMENTCODE");
+                    strSQL.Append(", B1.DetailString As DEPARTMENTSTRING");
+                    strSQL.Append(", ifnull(C1.DisplayOrder, 10) As DISPLAYORDER");
+                    strSQL.Append(" From Constructionbaseinfo As A1");
+                    strSQL.Append("  Inner Join constructionbaseinfodetail As B1");
+                    strSQL.Append("        On B1.ConstructionCode = A1.ConstructionCode");
+                    strSQL.AppendFormat("  And B1.DetailNo = {0}", (int)ConstructionBaseInfoDetail.DataNoDef.SalesDepartmentName);
+                    strSQL.Append("  Left Join departmentmaster As C1");
+                    strSQL.Append("       On C1.DepartmentCode = A1.SalesDepCode");
+                    strSQL.AppendFormat(" Where A1.ConstructionPeriod = {0}", nTargetCount);
+
+                    strSQL.Append(" Union Select");
+                    strSQL.Append(" A2.ConstrDepCode As DEPARTMENTCODE");
+                    strSQL.Append(" , B2.DetailString As DEPARTMENTSTRING");
+                    strSQL.Append(" , ifnull(C2.DisplayOrder, 10) As DISPLAYORDER");
+                    strSQL.Append(" From Constructionbaseinfo As A2");
+                    strSQL.Append(" Inner Join constructionbaseinfodetail As B2");
+                    strSQL.Append("       On B2.ConstructionCode = A2.ConstructionCode");
+                    strSQL.AppendFormat(" And B2.DetailNo = {0}", (int)ConstructionBaseInfoDetail.DataNoDef.ConstrDepartmentName);
+                    strSQL.Append(" Left Join departmentmaster As C2");
+                    strSQL.Append("      On C2.DepartmentCode = A2.ConstrDepCode");
+                    strSQL.AppendFormat(" Where A2.ConstructionPeriod = {0}", nTargetCount);
+
+                    strSQL.Append(" Union Select");
+                    strSQL.Append(" A3.ConstrSubDepCode As DEPARTMENTCODE");
+                    strSQL.Append(", B3.DetailString As DEPARTMENTSTRING");
+                    strSQL.Append(", ifnull(C3.DisplayOrder, 10) As DISPLAYORDER");
+                    strSQL.Append(" From Constructionbaseinfo As A3");
+                    strSQL.Append(" Inner Join constructionbaseinfodetail As B3");
+                    strSQL.Append("       On B3.ConstructionCode = A3.ConstructionCode");
+                    strSQL.AppendFormat(" And B3.DetailNo = {0}", (int)ConstructionBaseInfoDetail.DataNoDef.ConstrSubDepartmentName);
+                    strSQL.Append(" Left Join departmentmaster As C3");
+                    strSQL.Append("      On C3.DepartmentCode = A3.ConstrSubDepCode");
+                    strSQL.AppendFormat(" Where A3.ConstructionPeriod = {0}", nTargetCount);
+
+                    strSQL.Append(" Union Select");
+                    strSQL.Append(" A4.ConstrInstrDepCode As DEPARTMENTCODE");
+                    strSQL.Append(", B4.DetailString As DEPARTMENTSTRING");
+                    strSQL.Append(", ifnull(C4.DisplayOrder, 10) As DISPLAYORDER");
+                    strSQL.Append(" From Constructionbaseinfo As A4");
+                    strSQL.Append(" Inner Join constructionbaseinfodetail As B4");
+                    strSQL.Append("       On B4.ConstructionCode = A4.ConstructionCode");
+                    strSQL.AppendFormat(" And B4.DetailNo = {0}", (int)ConstructionBaseInfoDetail.DataNoDef.InstrDepartmentName);
+                    strSQL.Append(" Left Join departmentmaster As C4");
+                    strSQL.Append("      On C4.DepartmentCode = A4.ConstrInstrDepCode");
+                    strSQL.AppendFormat(" Where A4.ConstructionPeriod = {0}", nTargetCount);
+                    strSQL.Append(") As A");
+                }
+
+                strSQL.Append(", PERSONINCHARGEMASTER B");
+                strSQL.Append(", CONSTRUCTIONBASEINFO C");
+                strSQL.Append(" WHERE");
+
+                if (bNowSeason)
+                {   // ä»ŠæœŸã�¯å‰Šé™¤ã�•ã‚Œã�¦ã�„ã�ªã�„ã‚‚ã�®
+                    strSQL.Append(" A.DELETEFLG = 0");
+
+                    // ã‚·ã‚¹ãƒ†ãƒ ç®¡ç�†è€…ä»¥å¤–ã�¯éƒ¨ç½²å�‚ç…§ãƒžã‚¹ã‚¿ã‚ˆã‚Šãƒ‡ãƒ¼ã‚¿å�–å¾—
+                    if (CommonMotions.LoginUserData.PersonCode != CommonDefine.AdminCode)
+                    {
+                        // å�‚ç…§éƒ¨ç½²ãƒžã‚¹ã‚¿ã‚ˆã‚Šå�–å¾—ã�™ã‚‹
+                        strSQL.Append(" And A.DEPARTMENTCODE");
+                        strSQL.Append(" IN (SELECT A1.DEPARTMENTCODE FROM PERSONDEPARTMENTMASTER A1");
+                        strSQL.AppendFormat(" WHERE A1.PERSONCODE = {0})", CommonMotions.LoginUserData.PersonCode);
+                    }
+                    strSQL.Append(" AND");
+                }
+                strSQL.Append(" A.DEPARTMENTCODE = B.DEPARTMENTCODE");
+                strSQL.Append(" AND B.PERSONCODE = C.CONSTRUCTIONPERSONCODE");
+                strSQL.Append(" GROUP BY A.DEPARTMENTCODE, A.DEPARTMENTSTRING, A.DISPLAYORDER");
+                strSQL.Append(" ORDER BY A.DISPLAYORDER ASC");
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("ã‚·ã‚¹ãƒ†ãƒ ã‚¨ãƒ©ãƒ¼ï¼š{0}ï¼š{1}", CommonMotions.GetMethodName(), ex.Message);
+            }
+        }
         #endregion
 
+        #region æ‹…å½“è€…ã‚³ãƒ³ãƒœãƒœãƒƒã‚¯ã‚¹ãƒ‡ãƒ¼ã‚¿å�–å¾—ï¼³ï¼±ï¼¬ä½œæˆ�
+        /// <summary>
+        /// æ‹…å½“è€…ã‚³ãƒ³ãƒœãƒœãƒƒã‚¯ã‚¹ãƒ‡ãƒ¼ã‚¿å�–å¾—ï¼³ï¼±ï¼¬ä½œæˆ�
+        /// </summary>
+        /// <param name="strSQL"></param>
+        /// <param name="nTargetYear"></param>
+        public static void CreateManCombBoxSQL(ref StringBuilder strSQL, int nTargetYear, int nDepCode = 0, int nLEDGERFLG = -1)
+        {
+            try
+            {
+                DateTime dtDefaultStart = CommonMotions.GetOpeningEndDate(nTargetYear, true);
+                DateTime dtDefaultEnd = CommonMotions.GetOpeningEndDate(nTargetYear, false);
+
+                strSQL.Append("Select A.* From");
+                strSQL.Append(" personinchargemaster As A");
+                strSQL.Append(" Left Join chgchargedep As B");
+                strSQL.Append("       On B.PersonCode = A.PersonCode");
+
+                strSQL.AppendFormat(" WHERE ((DATE(A.STARTDATE) <= DATE('{0}'))", dtDefaultEnd.ToShortDateString());
+                strSQL.AppendFormat(" AND (DATE('{0}') <= DATE(A.ENDDATE)", dtDefaultStart.ToShortDateString());
+                strSQL.AppendFormat(" OR DATE('{0}') = DATE(A.ENDDATE)))", DateTime.MinValue.ToShortDateString());
+                strSQL.AppendFormat(" AND ((DATE(B.STARTDATE) <= DATE('{0}'))", dtDefaultEnd.ToShortDateString());
+                strSQL.AppendFormat(" AND(DATE('{0}') <= DATE(B.CompDate)", dtDefaultStart.ToShortDateString());
+                strSQL.AppendFormat(" OR DATE('{0}') = DATE(B.CompDate)))", DateTime.MinValue.ToShortDateString());
+
+                if (nDepCode != 0) strSQL.AppendFormat(" AND (B.DEPARTMENTCODE = {0})", nDepCode);
+
+                if (nLEDGERFLG == -1) strSQL.AppendFormat(" AND A.LEDGERFLG = {0}", (int)PersonInChargeMaster.LedgerDivNoDef.CalcTarget);
+                else if (nLEDGERFLG > -1) strSQL.AppendFormat(" AND A.LEDGERFLG = {0}", nLEDGERFLG);
+
+                // ä»ŠæœŸã�®ãƒ‡ãƒ¼ã‚¿ã�‹ã�©ã�†ã�‹ã‚’åˆ¤å®šã�™ã‚‹
+                bool bNowSeason = true;
+                string FieldName = string.Empty;
+                if (CommonMotions.SystemMasterData.ConstructionNoBase == (int)SystemMaster.ConstrNoBaseDef.BusinessPeriod)
+                {
+                    FieldName = "ConstructionPeriod";
+                    if (nTargetYear != CommonMotions.SystemMasterData.BusinessPeriod) bNowSeason = false;
+                }
+                else
+                {
+                    FieldName = "ConstructionYear";
+                    if (nTargetYear != CommonMotions.SystemMasterData.ConstrYear) bNowSeason = false;
+                }
+                if (!bNowSeason)
+                {
+                    strSQL.Append(" AND A.DepartmentCode IN(SELECT InDep.DEPARTMENTCODE FROM (");
+                    strSQL.Append(" Select A1.SalesDepCode As DEPARTMENTCODE From Constructionbaseinfo As A1");
+                    strSQL.AppendFormat(" Where A1.{0} = {1}", FieldName, nTargetYear);
+                    strSQL.Append(" Union Select A2.ConstrDepCode As DEPARTMENTCODE From Constructionbaseinfo As A2");
+                    strSQL.AppendFormat(" Where A2.{0} = {1}", FieldName, nTargetYear);
+                    strSQL.Append(" Union Select A3.ConstrSubDepCode As DEPARTMENTCODE From Constructionbaseinfo As A3");
+                    strSQL.AppendFormat(" Where A3.{0} = {1}", FieldName, nTargetYear);
+                    strSQL.Append(" Union Select A4.ConstrInstrDepCode As DEPARTMENTCODE From Constructionbaseinfo As A4");
+                    strSQL.AppendFormat(" Where A4.{0} = {1}", FieldName, nTargetYear);
+                    strSQL.Append(" ) As InDep");
+                    strSQL.Append(" GROUP BY InDep.DEPARTMENTCODE) ");
+                }
+
+                strSQL.Append(" Order By A.DeleteFlg ASC, A.EmployeeClassFlg ASC, A.DisplayOrder ASC");
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("ã‚·ã‚¹ãƒ†ãƒ ã‚¨ãƒ©ãƒ¼ï¼š{0}ï¼š{1}", CommonMotions.GetMethodName(), ex.Message);
+            }
+        }
+        #endregion
+
+        #region æ‹…å½“è€…ã‚ˆã‚ŠæŒ‡å®šå¹´åº¦ã�®éƒ¨ç½²ã‚’å�–å¾—ã�™ã‚‹ï¼³ï¼±ï¼¬ä½œæˆ�
+        /// <summary>
+        /// æ‹…å½“è€…ã‚ˆã‚ŠæŒ‡å®šå¹´åº¦ã�®éƒ¨ç½²ã‚’å�–å¾—ã�™ã‚‹ï¼³ï¼±ï¼¬ä½œæˆ�
+        /// </summary>
+        public static void CreateMan2DepSQL(ref StringBuilder strSQL, int nTargetYear, int nPersonCode)
+        {
+            try
+            {
+                DateTime dtDefaultStart = CommonMotions.GetOpeningEndDate(nTargetYear, true);
+                DateTime dtDefaultEnd = CommonMotions.GetOpeningEndDate(nTargetYear, false);
+
+                strSQL.Append("Select");
+                strSQL.Append(" A.PersonCode");
+                strSQL.Append(", A.PersonName");
+                strSQL.Append(", B.DepartmentCode");
+                strSQL.Append(", B.DepartmentName");
+                strSQL.Append(" From");
+                strSQL.Append(" personinchargemaster As A");
+                strSQL.Append(" Left Join chgchargedep As B");
+                strSQL.Append("       On B.PersonCode = A.PersonCode");
+
+                strSQL.AppendFormat(" WHERE ((DATE(A.STARTDATE) <= DATE('{0}'))", dtDefaultEnd.ToShortDateString());
+                strSQL.AppendFormat(" AND (DATE('{0}') <= DATE(A.ENDDATE)", dtDefaultStart.ToShortDateString());
+                strSQL.AppendFormat(" OR DATE('{0}') = DATE(A.ENDDATE)))", DateTime.MinValue.ToShortDateString());
+                strSQL.AppendFormat(" AND ((DATE(B.STARTDATE) <= DATE('{0}'))", dtDefaultEnd.ToShortDateString());
+                strSQL.AppendFormat(" AND(DATE('{0}') <= DATE(B.CompDate)", dtDefaultStart.ToShortDateString());
+                strSQL.AppendFormat(" OR DATE('{0}') = DATE(B.CompDate)))", DateTime.MinValue.ToShortDateString());
+
+                strSQL.AppendFormat(" AND A.PersonCode = {0}", nPersonCode);
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("ã‚·ã‚¹ãƒ†ãƒ ã‚¨ãƒ©ãƒ¼ï¼š{0}ï¼š{1}", CommonMotions.GetMethodName(), ex.Message);
+            }
+        }
+        #endregion
+
+        #endregion
+
         #region ---------- Excelå�‘ã�‘æ“�ä½œãƒ¡ã‚½ãƒƒãƒ‰
         #region ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆé–‹æ”¾
         /// <summary>
Index: branches/src/ProcessManagement/ProcessManagement/Common/CommonVersion.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Common/CommonVersion.cs	(revision 329)
+++ branches/src/ProcessManagement/ProcessManagement/Common/CommonVersion.cs	(revision 330)
@@ -14,7 +14,7 @@
         /// <summary>
         /// æœ¬ä½“ãƒ�ãƒ¼ã‚¸ãƒ§ãƒ³
         /// </summary>
-        public static int s_SystemVersion = 154;
+        public static int s_SystemVersion = 155;
 
         /// <summary>
         /// ã‚³ãƒ”ãƒ¼ãƒ»ç’°å¢ƒãƒ�ãƒ¼ã‚¸ãƒ§ãƒ³
Index: branches/src/ProcessManagement/ProcessManagement/Common/Process/ClsChangeBaseInfoData.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Common/Process/ClsChangeBaseInfoData.cs	(revision 329)
+++ branches/src/ProcessManagement/ProcessManagement/Common/Process/ClsChangeBaseInfoData.cs	(revision 330)
@@ -390,7 +390,7 @@
 
                 FuncCnt++;
 
-                if (DataList.Count == 0)
+                if (DataList.Count < 1)
                 {
                     if (FuncCnt > 2) return;
 
Index: branches/src/ProcessManagement/ProcessManagement/Common/Process/ClsMessageBoradAccess.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Common/Process/ClsMessageBoradAccess.cs	(revision 329)
+++ branches/src/ProcessManagement/ProcessManagement/Common/Process/ClsMessageBoradAccess.cs	(revision 330)
@@ -255,7 +255,7 @@
                     strSECSQL.Append(" PERSONINCHARGEMASTER A");
                     strSECSQL.Append(", SECURITYMASTER B");
                     strSECSQL.Append(" WHERE");
-                    strSECSQL.AppendFormat(" DEPARTMENTCODE = {0}", FromCode);
+                    strSECSQL.AppendFormat(" A.DEPARTMENTCODE = {0}", FromCode);
                     strSECSQL.Append(" AND B.SECCODE = A.SECCODE");
 
                     ArrayList SecarList = new ArrayList();
@@ -322,17 +322,11 @@
             {
                 // æ¨©é™�ãƒ©ãƒ³ã‚¯å�–å¾—
                 int SRank = (int)CommonDefine.SecurityRankPos.SpecialAuthority;   // çµŒå–¶è€…ã‚¢ã‚¯ã‚»ã‚¹
-                //int FRank = (int)CommonDefine.SecurityRankPos.FreeAuthority;      // çµ±æ‹¬è€…ã‚¢ã‚¯ã‚»ã‚¹
-                //int LRank = (int)CommonDefine.SecurityRankPos.LimitedAuthority;   // æ‰€å±žé•·ã‚¢ã‚¯ã‚»ã‚¹
-                int NRank = (int)CommonDefine.SecurityRankPos.NormalAuthority;    // ä¸€èˆ¬è€…ã‚¢ã‚¯ã‚»ã‚¹
 
-                if (CommonMotions.LoginUserData.PersonCode == CommonDefine.AdminCode)
+                if (CommonMotions.LoginUserData.PersonCode == CommonDefine.AdminCode
+                 || CommonMotions.LoginUserSecurity.SecRank == CommonDefine.SecurityRankList[SRank].Key)
                 {
                     // ----- ã‚·ã‚¹ãƒ†ãƒ ç®¡ç�†è€…ï¼ˆã�™ã�¹ã�¦å¯¾è±¡ï¼‰
-                    return true;
-                }
-                else if (CommonMotions.LoginUserSecurity.SecRank == CommonDefine.SecurityRankList[SRank].Key)
-                {
                     // ----- çµŒå–¶è€…ã‚¢ã‚¯ã‚»ã‚¹ï¼ˆã�™ã�¹ã�¦å¯¾è±¡ï¼‰
                     return true;
                 }
@@ -343,24 +337,44 @@
                 if (!GetReadTarget(mbtDB, RecoadNo, BuranchNo, ref TargetList)) return false;
                 if (TargetList.Count == 0) return false;
 
-                // å¯¾è±¡ãƒ†ãƒ¼ãƒ–ãƒ«ã�«ã�‚ã‚‹ã�‹ï¼Ÿ
                 int TergetCnt = Enum.GetNames(typeof(IOMessageBoardTerget.NameColumn)).Length;
+
+                // æ›¸è¾¼ã�¿è€…ã�¯æœ€ä¸Šä½�è€…ã�‹ï¼Ÿ
                 object[] objFirst = (object[])TargetList[0];
-                // æ›¸è¾¼ã�¿è€…ã�¯æœ€ä¸Šä½�è€…ã�‹ï¼Ÿ
                 int WriterCode = CommonMotions.cnvInt(objFirst[TergetCnt + (int)GetTarget.FromCode]);
                 bool bProtect = DecideLockData(WriterCode);
-
-                // æ›¸è¾¼ã�¿å�´å¯¾è±¡è€…åˆ¤å®š
-                if (WriterCode < 99999)
+                if (!bProtect)
                 {
-                    // å¯¾è±¡è€…ã‚³ãƒ¼ãƒ‰ã�Œ5æ¡�ä»¥ä¸‹ã�ªã‚‰ã�°éƒ¨ç½²ã‚³ãƒ¼ãƒ‰
-                    if (WriterCode == CommonMotions.LoginUserData.DepartmentCode) return true;
+                    // èª­è¾¼è€…ã�¯æœ€ä¸Šä½�è€…ã�Œå�«ã�¾ã‚Œã�¦ã�„ã‚‹ã�‹ï¼Ÿ
+                    int ReadCode = 0;
+                    foreach (object[] objRec in TargetList)
+                    {
+                        ReadCode = CommonMotions.cnvInt(objFirst[(int)IOMessageBoardTerget.NameColumn.ToCode]);
+                        bProtect = DecideLockData(ReadCode);
+                        if (bProtect) break;
+                    }
                 }
+
+                // ----- æ›¸è¾¼ã�¿å�´å¯¾è±¡è€…åˆ¤å®š
+                if (bProtect)
+                {   // æœ€ä¸Šä½�è€…ãƒ­ãƒƒã‚¯æœ‰
+                    if (WriterCode < 99999)
+                    {
+                        // å¯¾è±¡è€…ã‚³ãƒ¼ãƒ‰ã�Œ5æ¡�ä»¥ä¸‹ã�ªã‚‰ã�°éƒ¨ç½²ã‚³ãƒ¼ãƒ‰
+                        if (WriterCode == CommonMotions.LoginUserData.DepartmentCode) return true;
+                    }
+                    else
+                    {
+                        if (WriterCode == CommonMotions.LoginUserData.PersonCode) return true;
+                    }
+                }
                 else
-                {
-                    if (WriterCode == CommonMotions.LoginUserData.PersonCode) return true;
+                {   // æœ€ä¸Šä½�è€…ãƒ­ãƒƒã‚¯ç„¡
+                    if (DataReadPermission(WriterCode)) return true;
                 }
 
+                // ----- èª­è¾¼å�´å¯¾è±¡è€…åˆ¤å®š
+                // èª­è¾¼å¯¾è±¡ãƒ†ãƒ¼ãƒ–ãƒ«ã�«ã�‚ã‚‹ã�‹ï¼Ÿ èª­è¾¼å¯¾è±¡è€…ã‚’ãƒ�ã‚§ãƒƒã‚¯ã�™ã‚‹
                 MessageBoardTerget wrkRec = new MessageBoardTerget();
                 foreach (object[] objRec in TargetList)
                 {
@@ -367,59 +381,38 @@
                     mbtDB.ClearStruct(ref wrkRec);
                     mbtDB.Reader2Struct(objRec, ref wrkRec);
 
-                    // ----------
-                    int CurRecRank = 0;
-                    int DepCode = 0;
-                    // å¯¾è±¡è€…ã‚³ãƒ¼ãƒ‰ã�Œ5æ¡�ä»¥ä¸‹ã�ªã‚‰ã�°éƒ¨ç½²ã‚³ãƒ¼ãƒ‰
-                    if (wrkRec.ToCode < 99999)
+                    if (bProtect)
                     {
-                        // æ‰€å±žéƒ¨ç½²ã�Œå¯¾è±¡ã�ªã‚‰ã�°OK
-                        if (wrkRec.ToCode == CommonMotions.LoginUserData.DepartmentCode) return true;
+                        // ----- æœ€ä¸Šä½�è€…ãƒ­ãƒƒã‚¯æœ‰ï¼ˆå¯¾è±¡ã�®ã�¿ï¼‰
+                        if (wrkRec.ToCode < 99999)
+                        {   // å¯¾è±¡è€…ã‚³ãƒ¼ãƒ‰ã�Œ5æ¡�ä»¥ä¸‹ã�ªã‚‰ã�°éƒ¨ç½²ã‚³ãƒ¼ãƒ‰
+                            // æ‰€å±žéƒ¨ç½²ã�Œå¯¾è±¡ã�ªã‚‰ã�°OK
+                            if (wrkRec.ToCode == CommonMotions.LoginUserData.DepartmentCode) return true;
+                        }
+                        else
+                        {   // ä»¥å¤–ã�¯æ‹…å½“è€…ã‚³ãƒ¼ãƒ‰
+                            // å…¨å“¡ã�®å ´å�ˆã�¯OK
+                            if (wrkRec.ToCode == CommonDefine.s_AllMembersCode) return true;
 
-                        // ç®¡ç�†è€…å¯¾è±¡ãƒ•ãƒ©ã‚°ã�ŒONã�®æ™‚ã�«ãƒ­ã‚°ã‚¤ãƒ³è€…ã�Œä¸€èˆ¬ãƒ¦ãƒ¼ã‚¶ãƒ¼ã�®å ´å�ˆã�¯ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‚’è¦‹ã�›ã�ªã�„
-                        if (CommonMotions.LoginUserSecurity.SecRank == CommonDefine.SecurityRankList[NRank].Key)
-                        {
-                            int ShareFlag = CommonMotions.cnvInt(objRec[TergetCnt + (int)GetTarget.ShareFlag]);
-                            if (ShareFlag != 0) return false;
+                            // å¯¾è±¡ã�«è‡ªåˆ†ã�Œã�‚ã‚Œã�°OK
+                            if (wrkRec.ToCode == CommonMotions.LoginUserData.PersonCode) return true;
                         }
-                        DepCode = wrkRec.ToCode;
                     }
                     else
-                    {   // ----- ä»¥å¤–ã�¯æ‹…å½“è€…ã‚³ãƒ¼ãƒ‰
-                        // å…¨å“¡ã�®å ´å�ˆã�¯OK
-                        if (wrkRec.ToCode == CommonDefine.s_AllMembersCode) return true;
-
-                        // å¯¾è±¡ã�«è‡ªåˆ†ã�Œã�‚ã‚Œã�°OK
-                        if (wrkRec.ToCode == CommonMotions.LoginUserData.PersonCode) return true;
-
-                        // èª­è¾¼å¯¾è±¡è€…ã�®æ‰€å±žéƒ¨ç½²ã‚’å�–å¾—ã�™ã‚‹
-                        DepCode = CommonMotions.cnvInt(objRec[TergetCnt + (int)GetTarget.DepartmentCode]);
-
+                    {
+                        // æœ€ä¸Šä½�è€…ãƒ­ãƒƒã‚¯ç„¡ï¼ˆå�‚ç…§éƒ¨ç½²ã‚’å�«ã‚�ã�¦å¯¾è±¡ï¼‰
+                        // å�‚ç…§éƒ¨ç½²ã�«ã�‚ã‚‹ã�‹ã�®ãƒ�ã‚§ãƒƒã‚¯
+                        bool bmatch = DataReadPermission(wrkRec.ToCode);
+                        // å�‚ç…§éƒ¨ç½²ã�«ç„¡ã�‘ã‚Œã�°æ¬¡ã�¸
+                        if (!bmatch) continue;
+                        
                         // ã‚¢ã‚¯ã‚»ã‚¹ãƒ©ãƒ³ã‚¯ã‚’å�–å¾—ã�™ã‚‹
-                        CurRecRank = CommonMotions.cnvInt(objRec[TergetCnt + (int)GetTarget.SecRank]);
+                        int CurRecRank = CommonMotions.cnvInt(objRec[TergetCnt + (int)GetTarget.SecRank]);
                         // ãƒ©ãƒ³ã‚¯ç„¡ã�¯æœ€å¤§å€¤ã‚’ã‚»ãƒƒãƒˆ
                         if (CurRecRank == 0) CurRecRank = 9;
+                        // æ›¸è¾¼ã�¿è€…ã�Œè‡ªåˆ†ã‚ˆã‚Šä¸Šä½�è€…ã�§ã�¯ç„¡ã�„å ´å�ˆã�¯èª­ã�¿è¾¼ã‚�ã‚‹
+                        if (CommonMotions.LoginUserSecurity.SecRank <= CurRecRank) return true;
                     }
-
-                    if (!bProtect)
-                    {
-                        // å�‚ç…§éƒ¨ç½²ã�«ã�‚ã‚‹ã�‹ã�®ãƒ�ã‚§ãƒƒã‚¯
-                        foreach (PersonDepartmentMaster RefDepRec in CommonMotions.LoginUserRefDepartment)
-                        {
-                            if (DepCode == RefDepRec.DepartmentCode)
-                            {
-                                if (wrkRec.ToCode < 99999)
-                                {
-                                    return true;
-                                }
-                                else
-                                {
-                                    // æ›¸è¾¼ã�¿è€…ã�Œè‡ªåˆ†ã‚ˆã‚Šä¸Šä½�è€…ã�§ã�¯ç„¡ã�„å ´å�ˆã�¯èª­ã�¿è¾¼ã‚�ã‚‹
-                                    if (CommonMotions.LoginUserSecurity.SecRank <= CurRecRank) return true;
-                                }
-                            }
-                        }
-                    }
                 }
 
                 return false;
@@ -502,12 +495,10 @@
                     }
 
                     // ã‚¢ã‚¯ã‚»ã‚¹æ¨©å¯¾è±¡éƒ¨ç½²ã�®å ´å�ˆã�¯OK
-                    foreach (PersonDepartmentMaster wrkRec in CommonMotions.LoginUserRefDepartment)
+                    PersonDepartmentMaster FindDepRec = CommonMotions.LoginUserRefDepartment.Find(x => x.DepartmentCode == SourceCode);
+                    if (FindDepRec != null)
                     {
-                        if (SourceCode == wrkRec.DepartmentCode)
-                        {
-                            return true;
-                        }
+                        if (FindDepRec.DepartmentCode > 0) return true;
                     }
 
                     return false;
@@ -514,28 +505,23 @@
                 }
 
                 // ----- 5æ¡�ã‚ˆã‚Šå¤§ã��ã�„ã�ªã‚‰ã�°æ‹…å½“è€…ã‚³ãƒ¼ãƒ‰
+                // å…¨å“¡ã�®å ´å�ˆã�¯ç„¡æ�¡ä»¶ã�«OK
+                if (SourceCode == CommonDefine.s_AllMembersCode) return true;
+                
                 // ãƒ­ã‚°ã‚¤ãƒ³è€…ã�ªã‚‰ã�°OK
-                if (SourceCode == CommonMotions.LoginUserData.PersonCode)
-                {
-                    return true;
-                }
+                if (SourceCode == CommonMotions.LoginUserData.PersonCode) return true;
 
                 // å¯¾è±¡è€…ã�®å€‹äººæƒ…å ±ãƒ‡ãƒ¼ã‚¿ã‚’å�–å¾—ã�™ã‚‹
                 StringBuilder strSQL = new StringBuilder();
                 strSQL.Append(PersonDB.CreatePrimarykeyString(SourceCode));
                 PersonInChargeMaster PersonRec = new PersonInChargeMaster();
-                if (!PersonDB.SelectAction(strSQL.ToString(), ref PersonRec))
-                {
-                    return false;
-                }
+                if (!PersonDB.SelectAction(strSQL.ToString(), ref PersonRec)) return false;
 
                 // å¯¾è±¡éƒ¨ç½²æ‰€å±žè€…ã�¯OK
-                foreach (PersonDepartmentMaster wrkRec in CommonMotions.LoginUserRefDepartment)
+                PersonDepartmentMaster FindRec = CommonMotions.LoginUserRefDepartment.Find(x => x.DepartmentCode == PersonRec.DepartmentCode);
+                if (FindRec != null)
                 {
-                    if (PersonRec.DepartmentCode == wrkRec.DepartmentCode)
-                    {
-                        return true;
-                    }
+                    if (FindRec.DepartmentCode > 0) return true;
                 }
                     
                 return false;
Index: branches/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOConstructionBaseInfo.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOConstructionBaseInfo.cs	(revision 329)
+++ branches/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOConstructionBaseInfo.cs	(revision 330)
@@ -51,9 +51,13 @@
             NonOrderDate,
             OrdersDecisionPrice,
             OrdersDecisionPriceInTax,
+            SalesDepCode,
             SalesPersonCode,
+            ConstrDepCode,
             ConstructionPersonCode,
+            ConstrSubDepCode,
             ConstrSubPersonCode,
+            ConstrInstrDepCode,
             ConstructionInstructor,
             TransferConstruction,
             TransferConstructionDate,
@@ -173,6 +177,10 @@
         #endregion
 
         #region è¤‡æ•°ãƒ‡ãƒ¼ã‚¿èª­è¾¼ã�¿å‡¦ç�†
+        /// <summary>
+        /// è¤‡æ•°ãƒ‡ãƒ¼ã‚¿èª­è¾¼ã�¿å‡¦ç�†
+        /// </summary>
+        /// <returns></returns>
         public bool SelectAction(string AddSQLString, ref List<ConstructionBaseInfo> data, bool bConnect = true)
         {
             // ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ•ã‚§ãƒ¼ã‚¹
@@ -207,6 +215,10 @@
         #endregion
 
         #region 1ä»¶ãƒ‡ãƒ¼ã‚¿èª­è¾¼å‡¦ç�†
+        /// <summary>
+        /// 1ä»¶ãƒ‡ãƒ¼ã‚¿èª­è¾¼å‡¦ç�†
+        /// </summary>
+        /// <returns></returns>
         public bool SelectAction(string AddSQLString, ref ConstructionBaseInfo data, bool bConnect = true)
         {
             // ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ•ã‚§ãƒ¼ã‚¹
@@ -284,9 +296,13 @@
                 strcmd.AppendFormat(", {0}", data.OrdersDecisionPrice);
                 strcmd.AppendFormat(", {0}", data.OrdersDecisionPriceInTax);
 
+                strcmd.AppendFormat(", {0}", data.SalesDepCode);
                 strcmd.AppendFormat(", {0}", data.SalesPersonCode);
+                strcmd.AppendFormat(", {0}", data.ConstrDepCode);
                 strcmd.AppendFormat(", {0}", data.ConstructionPersonCode);
+                strcmd.AppendFormat(", {0}", data.ConstrSubDepCode);
                 strcmd.AppendFormat(", {0}", data.ConstrSubPersonCode);
+                strcmd.AppendFormat(", {0}", data.ConstrInstrDepCode);
                 strcmd.AppendFormat(", {0}", data.ConstructionInstructor);
 
                 strcmd.AppendFormat(", {0}", data.TransferConstruction);
@@ -389,9 +405,13 @@
                     strcmd.AppendFormat(", {0}", work.OrdersDecisionPrice);
                     strcmd.AppendFormat(", {0}", work.OrdersDecisionPriceInTax);
 
+                    strcmd.AppendFormat(", {0}", work.SalesDepCode);
                     strcmd.AppendFormat(", {0}", work.SalesPersonCode);
+                    strcmd.AppendFormat(", {0}", work.ConstrDepCode);
                     strcmd.AppendFormat(", {0}", work.ConstructionPersonCode);
+                    strcmd.AppendFormat(", {0}", work.ConstrSubDepCode);
                     strcmd.AppendFormat(", {0}", work.ConstrSubPersonCode);
+                    strcmd.AppendFormat(", {0}", work.ConstrInstrDepCode);
                     strcmd.AppendFormat(", {0}", work.ConstructionInstructor);
 
                     strcmd.AppendFormat(", {0}", work.TransferConstruction);
@@ -486,9 +506,13 @@
                 strcmd.AppendFormat(", OrdersDecisionPrice = {0}", data.OrdersDecisionPrice);
                 strcmd.AppendFormat(", OrdersDecisionPriceInTax = {0}", data.OrdersDecisionPriceInTax);
 
+                strcmd.AppendFormat(", SalesDepCode = {0}", data.SalesDepCode);
                 strcmd.AppendFormat(", SalesPersonCode = {0}", data.SalesPersonCode);
+                strcmd.AppendFormat(", ConstrDepCode = {0}", data.ConstrDepCode);
                 strcmd.AppendFormat(", ConstructionPersonCode = {0}", data.ConstructionPersonCode);
+                strcmd.AppendFormat(", ConstrSubDepCode = {0}", data.ConstrSubDepCode);
                 strcmd.AppendFormat(", ConstrSubPersonCode = {0}", data.ConstrSubPersonCode);
+                strcmd.AppendFormat(", ConstrInstrDepCode = {0}", data.ConstrInstrDepCode);
                 strcmd.AppendFormat(", ConstructionInstructor = {0}", data.ConstructionInstructor);
 
                 strcmd.AppendFormat(", TransferConstruction = {0}", data.TransferConstruction);
@@ -600,9 +624,13 @@
                 wrk.OrdersDecisionPrice = CommonMotions.cnvDouble(objwrk[(int)TableColumn.OrdersDecisionPrice]);
                 wrk.OrdersDecisionPriceInTax = CommonMotions.cnvDouble(objwrk[(int)TableColumn.OrdersDecisionPriceInTax]);
 
+                wrk.SalesDepCode = int.Parse(objwrk[(int)TableColumn.SalesDepCode].ToString());
                 wrk.SalesPersonCode = int.Parse(objwrk[(int)TableColumn.SalesPersonCode].ToString());
+                wrk.ConstrDepCode = int.Parse(objwrk[(int)TableColumn.ConstrDepCode].ToString());
                 wrk.ConstructionPersonCode = int.Parse(objwrk[(int)TableColumn.ConstructionPersonCode].ToString());
+                wrk.ConstrSubDepCode = int.Parse(objwrk[(int)TableColumn.ConstrSubDepCode].ToString());
                 wrk.ConstrSubPersonCode = int.Parse(objwrk[(int)TableColumn.ConstrSubPersonCode].ToString());
+                wrk.ConstrInstrDepCode = int.Parse(objwrk[(int)TableColumn.ConstrInstrDepCode].ToString());
                 wrk.ConstructionInstructor = int.Parse(objwrk[(int)TableColumn.ConstructionInstructor].ToString());
 
                 wrk.TransferConstruction = int.Parse(objwrk[(int)TableColumn.TransferConstruction].ToString());
@@ -731,15 +759,27 @@
                     case (int)TableColumn.OrdersDecisionPriceInTax:
                         strcmd.AppendFormat(" OrdersDecisionPriceInTax = {0}", ((int)value).ToString());
                         break;
+                    case (int)TableColumn.SalesDepCode:
+                        strcmd.AppendFormat(" SalesDepCode = {0}", ((int)value).ToString());
+                        break;
                     case (int)TableColumn.SalesPersonCode:
                         strcmd.AppendFormat(" SalesPersonCode = {0}", ((int)value).ToString());
                         break;
+                    case (int)TableColumn.ConstrDepCode:
+                        strcmd.AppendFormat(" ConstrDepCode = {0}", ((int)value).ToString());
+                        break;
                     case (int)TableColumn.ConstructionPersonCode:
                         strcmd.AppendFormat(" ConstructionPersonCode = {0}", ((int)value).ToString());
                         break;
+                    case (int)TableColumn.ConstrSubDepCode:
+                        strcmd.AppendFormat(" ConstrSubDepCode = {0}", ((int)value).ToString());
+                        break;
                     case (int)TableColumn.ConstrSubPersonCode:
                         strcmd.AppendFormat(" ConstrSubPersonCode = {0}", ((int)value).ToString());
                         break;
+                    case (int)TableColumn.ConstrInstrDepCode:
+                        strcmd.AppendFormat(" ConstrInstrDepCode = {0}", ((int)value).ToString());
+                        break;
                     case (int)TableColumn.ConstructionInstructor:
                         strcmd.AppendFormat(" ConstructionInstructor = {0}", ((int)value).ToString());
                         break;
Index: branches/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOConstructionBaseInfoDetail.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOConstructionBaseInfoDetail.cs	(revision 329)
+++ branches/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOConstructionBaseInfoDetail.cs	(revision 330)
@@ -153,9 +153,9 @@
         }
         #endregion
 
-        #region è¿½åŠ å‡¦ç�†
+        #region å·¥äº‹åŸºæœ¬æƒ…å ±æ˜Žç´°è¿½åŠ ï¼ˆ1ä»¶ï¼‰
         /// <summary>
-        /// å·¥äº‹åŸºæœ¬æƒ…å ±æ˜Žç´°è¿½åŠ 
+        /// å·¥äº‹åŸºæœ¬æƒ…å ±æ˜Žç´°è¿½åŠ ï¼ˆ1ä»¶ï¼‰
         /// </summary>
         /// <param name="data">å·¥äº‹åŸºæœ¬æƒ…å ±ãƒ‡ãƒ¼ã‚¿</param>
         /// <returns>trueï¼šæˆ�åŠŸ falseï¼šå¤±æ•—</returns>
@@ -193,8 +193,11 @@
                 return false;
             }
         }
+        #endregion
+
+        #region å·¥äº‹åŸºæœ¬æƒ…å ±æ˜Žç´°è¿½åŠ ï¼ˆè¤‡æ•°ï¼‰
         /// <summary>
-        /// å·¥äº‹åŸºæœ¬æƒ…å ±æ˜Žç´°è¿½åŠ 
+        /// å·¥äº‹åŸºæœ¬æƒ…å ±æ˜Žç´°è¿½åŠ ï¼ˆè¤‡æ•°ï¼‰
         /// </summary>
         /// <param name="data">å·¥äº‹åŸºæœ¬æƒ…å ±ãƒ‡ãƒ¼ã‚¿</param>
         /// <returns>trueï¼šæˆ�åŠŸ falseï¼šå¤±æ•—</returns>
Index: branches/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOCostomerRegist.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOCostomerRegist.cs	(revision 329)
+++ branches/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOCostomerRegist.cs	(revision 330)
@@ -33,7 +33,7 @@
         /// </summary>
         public enum TableColumn
         {
-            PersonCode = 0,
+            CreatePersonCode = 0,
             CreateDate,
             SeqNo,
             DataMode,
@@ -46,7 +46,7 @@
             OrderersName1,
             OrderersName2,
             DepartmentName,
-            ChargePersonName,
+            PersonName,
             ZipCode,
             Address1,
             Address2,
@@ -58,6 +58,8 @@
             OrderCotegory,
             OrderDate,
             OrderNo,
+            CreateDepartmentCode,
+            CreateDepartmentName,
             EntryDate,
             UpdateDate,
         }
@@ -86,32 +88,34 @@
         {
             StringBuilder strcmd = new StringBuilder();
             strcmd.Append("SELECT");
-            strcmd.Append("  PersonCode");
-            strcmd.Append(" ,DATE_FORMAT(CreateDate, '%Y/%m/%d')");
-            strcmd.Append(" ,SeqNo");
+            strcmd.Append("  CreatePersonCode");
+            strcmd.Append(", DATE_FORMAT(CreateDate, '%Y/%m/%d')");
+            strcmd.Append(", SeqNo");
 
-            strcmd.Append(" ,DataMode");
-            strcmd.Append(" ,SourceCotegory");
-            strcmd.Append(" ,SourceCode");
-            strcmd.Append(" ,PetitionPeriod");
-            strcmd.Append(" ,OrderFlg");
-            strcmd.Append(" ,CorporateStatusName");
-            strcmd.Append(" ,CorporateStatusPoint");
-            strcmd.Append(" ,OrderersName1");
-            strcmd.Append(" ,OrderersName2");
-            strcmd.Append(" ,DepartmentName");
-            strcmd.Append(" ,ChargePersonName");
-            strcmd.Append(" ,ZipCode");
-            strcmd.Append(" ,Address1");
-            strcmd.Append(" ,Address2");
-            strcmd.Append(" ,Address3");
-            strcmd.Append(" ,PhoneNumber");
-            strcmd.Append(" ,FaxNumber");
-            strcmd.Append(" ,MailAddress");
-            strcmd.Append(" ,Note");
-            strcmd.Append(" ,OrderCotegory");
-            strcmd.Append(" ,DATE_FORMAT(OrderDate, '%Y/%m/%d')");
-            strcmd.Append(" ,OrderNo");
+            strcmd.Append(", DataMode");
+            strcmd.Append(", SourceCotegory");
+            strcmd.Append(", SourceCode");
+            strcmd.Append(", PetitionPeriod");
+            strcmd.Append(", OrderFlg");
+            strcmd.Append(", CorporateStatusName");
+            strcmd.Append(", CorporateStatusPoint");
+            strcmd.Append(", OrderersName1");
+            strcmd.Append(", OrderersName2");
+            strcmd.Append(", DepartmentName");
+            strcmd.Append(", PersonName");
+            strcmd.Append(", ZipCode");
+            strcmd.Append(", Address1");
+            strcmd.Append(", Address2");
+            strcmd.Append(", Address3");
+            strcmd.Append(", PhoneNumber");
+            strcmd.Append(", FaxNumber");
+            strcmd.Append(", MailAddress");
+            strcmd.Append(", Note");
+            strcmd.Append(", OrderCotegory");
+            strcmd.Append(", DATE_FORMAT(OrderDate, '%Y/%m/%d')");
+            strcmd.Append(", OrderNo");
+            strcmd.Append(", CreateDepartmentCode");
+            strcmd.Append(", CreateDepartmentName");
 
             strcmd.Append(", DATE_FORMAT(EntryDate, '%Y/%m/%d %H:%i:%s')");
             strcmd.Append(", DATE_FORMAT(UpdateDate, '%Y/%m/%d %H:%i:%s')");
@@ -226,7 +230,7 @@
 
                 strcmd.Append(") VALUES (");
 
-                strcmd.AppendFormat("  {0}", work.PersonCode);
+                strcmd.AppendFormat("  {0}", work.CreatePersonCode);
                 strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d')", work.CreateDate.ToShortDateString());
                 strcmd.AppendFormat(", {0}", work.SeqNo);
                 strcmd.AppendFormat(", {0}", work.DataMode);
@@ -239,7 +243,7 @@
                 strcmd.AppendFormat(", '{0}'", work.OrderersName1);
                 strcmd.AppendFormat(", '{0}'", work.OrderersName2);
                 strcmd.AppendFormat(", '{0}'", work.DepartmentName);
-                strcmd.AppendFormat(", '{0}'", work.ChargePersonName);
+                strcmd.AppendFormat(", '{0}'", work.PersonName);
                 strcmd.AppendFormat(", '{0}'", work.ZipCode);
                 strcmd.AppendFormat(", '{0}'", work.Address1);
                 strcmd.AppendFormat(", '{0}'", work.Address2);
@@ -251,6 +255,8 @@
                 strcmd.AppendFormat(", {0}", work.OrderCotegory);
                 strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d')", work.OrderDate.ToShortDateString());
                 strcmd.AppendFormat(", {0}", work.OrderNo);
+                strcmd.AppendFormat(", {0}", work.CreateDepartmentCode);
+                strcmd.AppendFormat(", '{0}'", work.CreateDepartmentName);
 
                 strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.EntryDate);
                 strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.UpdateDate);
@@ -296,7 +302,7 @@
                     if (bDataFirst) strcmd.Append(" (");
                     else strcmd.Append(", (");
 
-                    strcmd.AppendFormat("  {0}", work.PersonCode);
+                    strcmd.AppendFormat("  {0}", work.CreatePersonCode);
                     strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d')", work.CreateDate.ToShortDateString());
                     strcmd.AppendFormat(", {0}", work.SeqNo);
                     strcmd.AppendFormat(", {0}", work.DataMode);
@@ -309,7 +315,7 @@
                     strcmd.AppendFormat(", '{0}'", work.OrderersName1);
                     strcmd.AppendFormat(", '{0}'", work.OrderersName2);
                     strcmd.AppendFormat(", '{0}'", work.DepartmentName);
-                    strcmd.AppendFormat(", '{0}'", work.ChargePersonName);
+                    strcmd.AppendFormat(", '{0}'", work.PersonName);
                     strcmd.AppendFormat(", '{0}'", work.ZipCode);
                     strcmd.AppendFormat(", '{0}'", work.Address1);
                     strcmd.AppendFormat(", '{0}'", work.Address2);
@@ -321,6 +327,8 @@
                     strcmd.AppendFormat(", {0}", work.OrderCotegory);
                     strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d')", work.OrderDate.ToShortDateString());
                     strcmd.AppendFormat(", {0}", work.OrderNo);
+                    strcmd.AppendFormat(", {0}", work.CreateDepartmentCode);
+                    strcmd.AppendFormat(", '{0}'", work.CreateDepartmentName);
 
                     strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.EntryDate);
                     strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.UpdateDate);
@@ -358,7 +366,7 @@
 
                 strcmd.Append(" SET");
 
-                strcmd.AppendFormat(" PersonCode = {0}", data.PersonCode);
+                strcmd.AppendFormat(" CreatePersonCode = {0}", data.CreatePersonCode);
                 strcmd.AppendFormat(", CreateDate = STR_TO_DATE('{0}','%Y/%m/%d')", data.CreateDate.ToShortDateString());
                 strcmd.AppendFormat(", SeqNo = {0}", data.SeqNo);
                 strcmd.AppendFormat(", DataMode = {0}", data.DataMode);
@@ -371,7 +379,7 @@
                 strcmd.AppendFormat(", OrderersName1 = '{0}'", data.OrderersName1);
                 strcmd.AppendFormat(", OrderersName2 = '{0}'", data.OrderersName2);
                 strcmd.AppendFormat(", DepartmentName = '{0}'", data.DepartmentName);
-                strcmd.AppendFormat(", ChargePersonName = '{0}'", data.ChargePersonName);
+                strcmd.AppendFormat(", PersonName = '{0}'", data.PersonName);
                 strcmd.AppendFormat(", ZipCode = '{0}'", data.ZipCode);
                 strcmd.AppendFormat(", Address1 = '{0}'", data.Address1);
                 strcmd.AppendFormat(", Address2 = '{0}'", data.Address2);
@@ -383,6 +391,8 @@
                 strcmd.AppendFormat(", OrderCotegory = {0}", data.OrderCotegory);
                 strcmd.AppendFormat(", OrderDate = STR_TO_DATE('{0}','%Y/%m/%d')", data.OrderDate.ToShortDateString());
                 strcmd.AppendFormat(", OrderNo = {0}", data.OrderNo);
+                strcmd.AppendFormat(", CreateDepartmentCode = '{0}'", data.CreateDepartmentCode);
+                strcmd.AppendFormat(", CreateDepartmentName = '{0}'", data.CreateDepartmentName);
 
                 strcmd.Append(", UpdateDate = NOW()");
                 strcmd.Append(AddSQLString);
@@ -441,8 +451,8 @@
                 strcmd.Append(" SET");
                 switch (FeildNo)
                 {
-                    case (int)TableColumn.PersonCode:
-                        strcmd.AppendFormat(" PersonCode = {0}", ((int)value).ToString());
+                    case (int)TableColumn.CreatePersonCode:
+                        strcmd.AppendFormat(" CreatePersonCode = {0}", ((int)value).ToString());
                         break;
                     case (int)TableColumn.CreateDate:
                         strcmd.AppendFormat(" CreateDate = STR_TO_DATE('{0}','%Y/%m/%d')", ((DateTime)value).ToShortDateString());
@@ -480,8 +490,8 @@
                     case (int)TableColumn.DepartmentName:
                         strcmd.AppendFormat(" DepartmentName = '{0}'", value.ToString());
                         break;
-                    case (int)TableColumn.ChargePersonName:
-                        strcmd.AppendFormat(" ChargePersonName = '{0}'", value.ToString());
+                    case (int)TableColumn.PersonName:
+                        strcmd.AppendFormat(" PersonName = '{0}'", value.ToString());
                         break;
                     case (int)TableColumn.ZipCode:
                         strcmd.AppendFormat(" ZipCode = '{0}'", value.ToString());
@@ -516,6 +526,12 @@
                     case (int)TableColumn.OrderNo:
                         strcmd.AppendFormat(" OrderNo = {0}", ((int)value).ToString());
                         break;
+                    case (int)TableColumn.CreateDepartmentCode:
+                        strcmd.AppendFormat(" CreateDepartmentCode = {0}", ((int)value).ToString());
+                        break;
+                    case (int)TableColumn.CreateDepartmentName:
+                        strcmd.AppendFormat(" CreateDepartmentName = '{0}'", value.ToString());
+                        break;
                 }
 
                 strcmd.Append(", UpdateDate = NOW()");
@@ -544,7 +560,7 @@
             try
             {
                 // ãƒ‡ãƒ¼ã‚¿å�–å¾—
-                wrk.PersonCode = int.Parse(objwrk[(int)TableColumn.PersonCode].ToString());
+                wrk.CreatePersonCode = int.Parse(objwrk[(int)TableColumn.CreatePersonCode].ToString());
                 wrk.CreateDate = DateTime.Parse(objwrk[(int)TableColumn.CreateDate].ToString());
                 wrk.SeqNo = int.Parse(objwrk[(int)TableColumn.SeqNo].ToString());
 
@@ -559,7 +575,7 @@
                 wrk.OrderersName1 = objwrk[(int)TableColumn.OrderersName1].ToString();
                 wrk.OrderersName2 = objwrk[(int)TableColumn.OrderersName2].ToString();
                 wrk.DepartmentName = objwrk[(int)TableColumn.DepartmentName].ToString();
-                wrk.ChargePersonName = objwrk[(int)TableColumn.ChargePersonName].ToString();
+                wrk.PersonName = objwrk[(int)TableColumn.PersonName].ToString();
                 wrk.ZipCode = objwrk[(int)TableColumn.ZipCode].ToString();
                 wrk.Address1 = objwrk[(int)TableColumn.Address1].ToString();
                 wrk.Address2 = objwrk[(int)TableColumn.Address2].ToString();
@@ -571,6 +587,8 @@
                 wrk.OrderCotegory = int.Parse(objwrk[(int)TableColumn.OrderCotegory].ToString());
                 wrk.OrderDate = DateTime.Parse(objwrk[(int)TableColumn.OrderDate].ToString());
                 wrk.OrderNo = int.Parse(objwrk[(int)TableColumn.OrderNo].ToString());
+                wrk.CreateDepartmentCode = int.Parse(objwrk[(int)TableColumn.CreateDepartmentCode].ToString());
+                wrk.CreateDepartmentName = objwrk[(int)TableColumn.CreateDepartmentName].ToString();
 
                 wrk.EntryDate = DateTime.Parse(objwrk[(int)TableColumn.EntryDate].ToString());
                 wrk.UpdateDate = DateTime.Parse(objwrk[(int)TableColumn.UpdateDate].ToString());
Index: branches/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOMChgChargeDep.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOMChgChargeDep.cs	(nonexistent)
+++ branches/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOMChgChargeDep.cs	(revision 330)
@@ -0,0 +1,460 @@
+ï»¿using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Data;
+using System.Collections;
+
+using log4net;
+using MySql.Data.MySqlClient;           // Data Provider for MySql
+
+using ProcessManagement.DB.MySql;
+using ProcessManagement.DB.Core;
+using ProcessManagement.DataModel;
+
+using ProcessManagement.Common;
+
+namespace ProcessManagement.DB.IOAccess
+{
+    /// <summary>
+    /// æ‹…å½“è€…éƒ¨ç½²å±¥æ­´ãƒ‡ãƒ¼ã‚¿ï¼¤ï¼¢ã‚¢ã‚¯ã‚»ã‚¹
+    /// </summary>
+    public class IOMChgChargeDep : MySqlProcess
+    {
+        #region å®šç¾©éƒ¨
+        /// <summary>
+        /// log4netãƒ­ã‚°ã‚’ä½¿ç”¨ã�™ã‚‹
+        /// </summary>
+        private static readonly ILog logger = LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
+        #endregion
+
+        #region å®šæ•°
+        /// <summary>
+        /// æ‹…å½“è€…éƒ¨ç½²å±¥æ­´ãƒ‡ãƒ¼ã‚¿ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ä¸¦ã�³
+        /// </summary>
+        public enum ColumnCnt
+        {
+            PersonCode = 0,
+            StartDate,
+            CompDate,
+            DepartmentCode,
+            DepartmentName,
+            EntryDate,
+            UpdateDate,
+        }
+        #endregion
+
+        #region ã‚³ãƒ³ã‚¹ãƒˆãƒ©ã‚¯ã‚¿
+        /// <summary>
+        /// ã‚³ãƒ³ã‚¹ãƒˆãƒ©ã‚¯ã‚¿
+        /// </summary>
+        /// <param name="ConnectionString"></param>
+        public IOMChgChargeDep()
+            : base(DBCommon.Instance.DBConnectString)
+        {
+        }
+
+        #endregion
+
+        #region æ‹…å½“è€…éƒ¨ç½²å±¥æ­´ãƒ‡ãƒ¼ã‚¿æ¤œç´¢æ–‡å­—åˆ—ä½œæˆ�
+        /// <summary>
+        /// æ‹…å½“è€…éƒ¨ç½²å±¥æ­´ãƒ‡ãƒ¼ã‚¿æ¤œç´¢æ–‡å­—åˆ—ä½œæˆ�
+        /// </summary>
+        /// <param name="AddSQLString">æ¤œç´¢æ�¡ä»¶SQLæ–‡å­—åˆ—</param>
+        /// <param name="data">æ‹…å½“è€…éƒ¨ç½²å±¥æ­´ãƒ‡ãƒ¼ã‚¿ãƒ‡ãƒ¼ã‚¿</param>
+        /// <returns>trueï¼šæˆ�åŠŸ falseï¼šå¤±æ•—</returns>
+        private string CreateSelectSQL()
+        {
+            StringBuilder strcmd = new StringBuilder();
+            strcmd.Append("SELECT");
+            strcmd.Append("  PersonCode");
+            strcmd.Append(", DATE_FORMAT(StartDate, '%Y/%m/%d')");
+
+            strcmd.Append(", DATE_FORMAT(CompDate, '%Y/%m/%d')");
+            strcmd.Append(", DepartmentCode");
+            strcmd.Append(", DepartmentName");
+
+            strcmd.Append(", DATE_FORMAT(EntryDate, '%Y/%m/%d %H:%i:%s')");
+            strcmd.Append(", DATE_FORMAT(UpdateDate, '%Y/%m/%d %H:%i:%s')");
+
+            strcmd.Append(" FROM ChgChargeDep");
+
+            return strcmd.ToString();
+        }
+        #endregion
+
+        #region æ‹…å½“è€…éƒ¨ç½²å±¥æ­´ãƒ‡ãƒ¼ã‚¿è¤‡æ•°æ¤œç´¢
+        /// <summary>
+        /// æ‹…å½“è€…éƒ¨ç½²å±¥æ­´ãƒ‡ãƒ¼ã‚¿è¤‡æ•°æ¤œç´¢
+        /// </summary>
+        /// <param name="AddSQLString"></param>
+        /// <param name="data"></param>
+        /// <param name="bConnect"></param>
+        /// <returns></returns>
+        public bool SelectAction(string AddSQLString, ref List<ChgChargeDep> data, bool bConnect = true)
+        {
+            // ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ•ã‚§ãƒ¼ã‚¹
+            StringBuilder strcmd = new StringBuilder();;
+            ArrayList arData = new ArrayList();
+
+            try
+            {
+                // SQLä½œæˆ�ï¼ˆDateTimeåž‹ã�Œå¤‰æ�›ã�§ã��ã�ªã�„ã�®ã�§Charã�«å¤‰æ�›ã�—ã�¦ã�Šã��ï¼‰
+                strcmd.Append(CreateSelectSQL());
+                strcmd.Append(AddSQLString);
+
+                // SQLå®Ÿè¡Œ
+                if (!ExecuteReader(strcmd.ToString(), ref arData, bConnect)) return false;
+
+                // ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆ
+                foreach (object[] objwrk in arData)
+                {
+                    ChgChargeDep work = new ChgChargeDep();
+                    Reader2Struct(objwrk, ref work);
+                    data.Add(work);
+                }
+
+                return true;
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("ã‚·ã‚¹ãƒ†ãƒ ã‚¨ãƒ©ãƒ¼ï¼š{0}ï¼š{1}ï¼š{2}", CommonMotions.GetMethodName(2), ex.Message, strcmd.ToString());
+                return false;
+            }
+        }
+        #endregion
+
+        #region æ‹…å½“è€…éƒ¨ç½²å±¥æ­´ãƒ‡ãƒ¼ã‚¿ï¼‘ä»¶æ¤œç´¢
+        /// <summary>
+        /// æ‹…å½“è€…éƒ¨ç½²å±¥æ­´ãƒ‡ãƒ¼ã‚¿ï¼‘ä»¶æ¤œç´¢
+        /// </summary>
+        /// <param name="AddSQLString"></param>
+        /// <param name="data"></param>
+        /// <param name="bConnect"></param>
+        /// <returns></returns>
+        public bool SelectAction(string AddSQLString, ref ChgChargeDep data, bool bConnect = true)
+        {
+            // ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ•ã‚§ãƒ¼ã‚¹
+            StringBuilder strcmd = new StringBuilder();;
+            ArrayList arData = new ArrayList();
+
+            try
+            {
+                // SQLä½œæˆ�ï¼ˆDateTimeåž‹ã�Œå¤‰æ�›ã�§ã��ã�ªã�„ã�®ã�§Charã�«å¤‰æ�›ã�—ã�¦ã�Šã��ï¼‰
+                strcmd.Append(CreateSelectSQL());
+                strcmd.Append(AddSQLString);
+
+                // SQLå®Ÿè¡Œ
+                if (!ExecuteReader(strcmd.ToString(), ref arData, bConnect)) return false;
+                if (arData.Count == 0) return false;
+
+                // ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆ
+                object[] objwrk = (object[])arData[0];
+                Reader2Struct(objwrk, ref data);
+
+                return true;
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("ã‚·ã‚¹ãƒ†ãƒ ã‚¨ãƒ©ãƒ¼ï¼š{0}ï¼š{1}ï¼š{2}", CommonMotions.GetMethodName(2), ex.Message, strcmd.ToString());
+                return false;
+            }
+        }
+        #endregion
+
+        #region æ‹…å½“è€…ãƒžã‚¹ã‚¿è¿½åŠ ï¼ˆ1ä»¶ï¼‰
+        /// <summary>
+        /// æ‹…å½“è€…ãƒžã‚¹ã‚¿è¿½åŠ ï¼ˆ1ä»¶ï¼‰
+        /// </summary>
+        /// <param name="data">æ‹…å½“è€…ãƒžã‚¹ã‚¿ãƒ‡ãƒ¼ã‚¿</param>
+        /// <returns>trueï¼šæˆ�åŠŸ falseï¼šå¤±æ•—</returns>
+        public bool InsertAction(ChgChargeDep work, bool bConnect = true)
+        {
+            StringBuilder strcmd = new StringBuilder();
+            try
+            {
+
+                strcmd.Append("INSERT INTO ChgChargeDep");
+                strcmd.Append(" (");
+
+                bool bFirst = true;
+                foreach (var gender in Enum.GetValues(typeof(ColumnCnt)))
+                {
+                    if (!bFirst) strcmd.Append(" ,");
+                    strcmd.Append(gender.ToString());
+                    bFirst = false;
+                }
+
+                strcmd.Append(") VALUES (");
+
+                strcmd.AppendFormat("  {0}", work.PersonCode);
+                strcmd.AppendFormat(", STR_TO_DATE('{0}', '%Y/%m/%d')", work.StartDate.ToShortDateString());
+
+                strcmd.AppendFormat(", STR_TO_DATE('{0}', '%Y/%m/%d')", work.CompDate.ToShortDateString());
+                strcmd.AppendFormat(", {0}", work.DepartmentCode);
+                strcmd.AppendFormat(",'{0}'", work.DepartmentName);
+
+                strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.EntryDate);
+                strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.UpdateDate);
+                strcmd.Append(")");
+
+                if (!ExecuteNonQuery(strcmd.ToString(), bConnect)) return false;
+
+                return true;
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("ã‚·ã‚¹ãƒ†ãƒ ã‚¨ãƒ©ãƒ¼ï¼š{0}ï¼š{1}ï¼š{2}", CommonMotions.GetMethodName(2), ex.Message, strcmd.ToString());
+                return false;
+            }
+        }
+        #endregion
+
+        #region æ‹…å½“è€…éƒ¨ç½²å±¥æ­´ãƒ‡ãƒ¼ã‚¿è¿½åŠ ï¼ˆè¤‡æ•°ï¼‰
+        /// <summary>
+        /// æ‹…å½“è€…éƒ¨ç½²å±¥æ­´ãƒ‡ãƒ¼ã‚¿è¿½åŠ ï¼ˆè¤‡æ•°ï¼‰
+        /// </summary>
+        /// <param name="data">æ‹…å½“è€…éƒ¨ç½²å±¥æ­´ãƒ‡ãƒ¼ã‚¿ãƒ‡ãƒ¼ã‚¿</param>
+        /// <returns>trueï¼šæˆ�åŠŸ falseï¼šå¤±æ•—</returns>
+        public bool InsertAction(List<ChgChargeDep> data, bool bConnect = true)
+        {
+            StringBuilder strcmd = new StringBuilder();;
+            try
+            {
+                bool bColFirst = true;
+                strcmd.Append("INSERT INTO ChgChargeDep");
+                strcmd.Append(" (");
+                foreach (var gender in Enum.GetValues(typeof(ColumnCnt)))
+                {
+                    if (!bColFirst) strcmd.Append(", ");
+                    strcmd.Append(gender.ToString());
+                    bColFirst = false;
+                }
+                strcmd.Append(") VALUES");
+
+                bool bDataFirst = true;
+                foreach (ChgChargeDep work in data)
+                {
+                    if (bDataFirst) strcmd.Append(" (");
+                    else strcmd.Append(", (");
+
+                    strcmd.AppendFormat("  {0}", work.PersonCode);
+                    strcmd.AppendFormat(", STR_TO_DATE('{0}', '%Y/%m/%d')", work.StartDate.ToShortDateString());
+
+                    strcmd.AppendFormat(", STR_TO_DATE('{0}', '%Y/%m/%d')", work.CompDate.ToShortDateString());
+                    strcmd.AppendFormat(", {0}", work.DepartmentCode);
+                    strcmd.AppendFormat(",'{0}'", work.DepartmentName);
+
+                    strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.EntryDate);
+                    strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.UpdateDate);
+                    strcmd.Append(")");
+
+                    bDataFirst = false;
+                }
+
+                if (!ExecuteNonQuery(strcmd.ToString(), bConnect)) return false;
+
+                return true;
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("ã‚·ã‚¹ãƒ†ãƒ ã‚¨ãƒ©ãƒ¼ï¼š{0}ï¼š{1}ï¼š{2}", CommonMotions.GetMethodName(2), ex.Message, strcmd.ToString());
+                return false;
+            }
+        }
+        #endregion
+
+        #region æ‹…å½“è€…éƒ¨ç½²å±¥æ­´ãƒ‡ãƒ¼ã‚¿æ›´æ–°
+        /// <summary>
+        /// æ‹…å½“è€…éƒ¨ç½²å±¥æ­´ãƒ‡ãƒ¼ã‚¿æ›´æ–°
+        /// </summary>
+        /// <param name="AddSQLString">æ›´æ–°æ�¡ä»¶SQLæ–‡å­—åˆ—</param>
+        /// <param name="data">æ‹…å½“è€…éƒ¨ç½²å±¥æ­´ãƒ‡ãƒ¼ã‚¿ãƒ‡ãƒ¼ã‚¿</param>
+        /// <returns>trueï¼šæˆ�åŠŸ falseï¼šå¤±æ•—</returns>
+        public bool UpdateAction(string AddSQLString, ChgChargeDep data, bool bConnect = true)
+        {
+            StringBuilder strcmd = new StringBuilder();;
+            try
+            {
+
+                strcmd.Append("UPDATE ChgChargeDep");
+
+                strcmd.Append(" SET");
+
+                strcmd.AppendFormat("  PersonCode = {0}", data.PersonCode);
+
+                strcmd.AppendFormat(", StartDate = STR_TO_DATE('{0}' ,'%Y/%m/%d')", data.StartDate.ToShortDateString());
+                strcmd.AppendFormat(", CompDate = STR_TO_DATE('{0}' ,'%Y/%m/%d')", data.CompDate.ToShortDateString());
+
+                strcmd.AppendFormat(", DepartmentCode = {0}", data.DepartmentCode);
+                strcmd.AppendFormat(", DepartmentName = '{0}'", data.DepartmentName);
+
+                strcmd.Append(", UpdateDate = NOW()");
+                strcmd.Append(AddSQLString);
+
+                if (!ExecuteNonQuery(strcmd.ToString(), bConnect)) return false;
+
+                return true;
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("ã‚·ã‚¹ãƒ†ãƒ ã‚¨ãƒ©ãƒ¼ï¼š{0}ï¼š{1}ï¼š{2}", CommonMotions.GetMethodName(2), ex.Message, strcmd.ToString());
+                return false;
+            }
+        }
+        #endregion
+
+        #region æ‹…å½“è€…éƒ¨ç½²å±¥æ­´ãƒ‡ãƒ¼ã‚¿å‰Šé™¤
+        /// <summary>
+        /// æ‹…å½“è€…éƒ¨ç½²å±¥æ­´ãƒ‡ãƒ¼ã‚¿å‰Šé™¤
+        /// </summary>
+        /// <param name="AddSQLString">å‰Šé™¤æ�¡ä»¶SQLæ–‡å­—åˆ—</param>
+        /// <param name="data">æ‹…å½“è€…éƒ¨ç½²å±¥æ­´ãƒ‡ãƒ¼ã‚¿ãƒ‡ãƒ¼ã‚¿</param>
+        /// <returns>trueï¼šæˆ�åŠŸ falseï¼šå¤±æ•—</returns>
+        public bool DeleteAction(string AddSQLString, bool bConnect = true)
+        {
+            // ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ•ã‚§ãƒ¼ã‚¹
+            StringBuilder strcmd = new StringBuilder();;
+            try
+            {
+                strcmd.AppendFormat("{0}{1}", "DELETE FROM ChgChargeDep", AddSQLString);
+
+                if (!ExecuteNonQuery(strcmd.ToString(), bConnect)) return false;
+
+                return true;
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("ã‚·ã‚¹ãƒ†ãƒ ã‚¨ãƒ©ãƒ¼ï¼š{0}ï¼š{1}ï¼š{2}", CommonMotions.GetMethodName(2), ex.Message, strcmd.ToString());
+                return false;
+            }
+        }
+        #endregion
+
+        #region 1é …ç›®æ›´æ–°å‡¦ç�†
+        /// <summary>
+        /// 1é …ç›®ã�®æ›´æ–°ã‚’è¡Œã�†
+        /// </summary>
+        /// <param name="PersonCode"></param>
+        /// <param name="FeildNo"></param>
+        /// <param name="value"></param>
+        /// <param name="bConnect"></param>
+        /// <returns></returns>
+        public bool UpdateFeild(int PersonCode, DateTime StartDate, int FeildNo, object value, bool bConnect = true)
+        {
+            StringBuilder strcmd = new StringBuilder();;
+            try
+            {
+                strcmd.Append("UPDATE ChgChargeDep");
+
+                strcmd.Append(" SET");
+                switch (FeildNo)
+                {
+                    case (int)ColumnCnt.PersonCode:
+                        strcmd.AppendFormat(" PersonCode = {0}", ((int)value).ToString());
+                        break;
+                    case (int)ColumnCnt.StartDate:
+                        strcmd.AppendFormat(" StartDate = STR_TO_DATE('{0}','%Y/%m/%d')", ((DateTime)value).ToShortDateString());
+                        break;
+                    case (int)ColumnCnt.CompDate:
+                        strcmd.AppendFormat(" CompDate = STR_TO_DATE('{0}','%Y/%m/%d')", ((DateTime)value).ToShortDateString());
+                        break;
+                    case (int)ColumnCnt.DepartmentCode:
+                        strcmd.AppendFormat(" DepartmentCode = {0}", ((int)value).ToString());
+                        break;
+                    case (int)ColumnCnt.DepartmentName:
+                        strcmd.AppendFormat(" DepartmentName = '{0}'", value.ToString());
+                        break;
+                }
+
+                strcmd.Append(", UpdateDate = NOW()");
+                strcmd.Append(CreatePrimarykeyString(PersonCode, StartDate));
+
+                if (!ExecuteNonQuery(strcmd.ToString(), bConnect)) return false;
+
+                return true;
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("ã‚·ã‚¹ãƒ†ãƒ ã‚¨ãƒ©ãƒ¼ï¼š{0}ï¼š{1}ï¼š{2}", CommonMotions.GetMethodName(2), ex.Message, strcmd.ToString());
+                return false;
+            }
+        }
+        #endregion
+
+        #region MySQLDataReaderã‚ˆã‚Šæ§‹é€ ä½“ã�¸ã‚»ãƒƒãƒˆã�™ã‚‹
+        /// <summary>
+        /// MySQLDataReaderã‚ˆã‚Šæ§‹é€ ä½“ã�¸ã‚»ãƒƒãƒˆã�™ã‚‹
+        /// </summary>
+        /// <param name="reader">MySQLDataReader</param>
+        /// <param name="wrk">æ§‹é€ ä½“</param>
+        public void Reader2Struct(object[] objwrk, ref ChgChargeDep wrk)
+        {
+            try
+            {
+                // ãƒ‡ãƒ¼ã‚¿å�–å¾—
+                wrk.PersonCode = int.Parse(objwrk[(int)ColumnCnt.PersonCode].ToString());
+                wrk.StartDate = DateTime.Parse(objwrk[(int)ColumnCnt.StartDate].ToString());
+
+                wrk.CompDate = DateTime.Parse(objwrk[(int)ColumnCnt.CompDate].ToString());
+                wrk.DepartmentCode = int.Parse(objwrk[(int)ColumnCnt.DepartmentCode].ToString());
+                wrk.DepartmentName = objwrk[(int)ColumnCnt.DepartmentName].ToString();
+
+                wrk.EntryDate = DateTime.Parse(objwrk[(int)ColumnCnt.EntryDate].ToString());
+                wrk.UpdateDate = DateTime.Parse(objwrk[(int)ColumnCnt.UpdateDate].ToString());
+            }
+            catch (MySqlException myex)
+            {
+                logger.ErrorFormat("ï¼­ï½™ï¼³ï¼±ï¼¬ã‚¨ãƒ©ãƒ¼ï¼š{0}ï¼š{1}", CommonMotions.GetMethodName(2), myex.Message);
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("ã‚·ã‚¹ãƒ†ãƒ ã‚¨ãƒ©ãƒ¼ï¼š{0}ï¼š{1}", CommonMotions.GetMethodName(2), ex.Message);
+            }
+        }
+        #endregion
+
+        #region æ§‹é€ ä½“ã‚¯ãƒªã‚¢
+        /// <summary>
+        /// æ§‹é€ ä½“ã‚¯ãƒªã‚¢
+        /// </summary>
+        /// <param name="wrk"></param>
+        public void ClearStruct(ref ChgChargeDep wrk)
+        {
+            wrk.PersonCode = 0;                     // æ‹…å½“è€…ã‚³ãƒ¼ãƒ‰
+            wrk.StartDate = DateTime.MinValue;      // ãƒžã‚¹ã‚¿ä½¿ç”¨é–‹å§‹å¹´æœˆæ—¥ä»˜
+
+            wrk.CompDate = DateTime.MinValue;       // ãƒžã‚¹ã‚¿ä½¿ç”¨çµ‚äº†å¹´æœˆæ—¥ä»˜
+            wrk.DepartmentCode = 0;                 // éƒ¨ç½²ã‚³ãƒ¼ãƒ‰
+            wrk.DepartmentName = string.Empty;      // éƒ¨ç½²å��
+
+            wrk.EntryDate = DateTime.MinValue;      // ç™»éŒ²æ—¥ä»˜
+            wrk.UpdateDate = DateTime.MinValue;     // æ›´æ–°æ—¥ä»˜
+        }
+        #endregion
+
+        #region ä¸»ã‚­ãƒ¼æ¤œç´¢ã�®æ–‡å­—åˆ—ã‚’è¿”ã�™
+        /// <summary>
+        /// ä¸»ã‚­ãƒ¼æ¤œç´¢ã�®æ–‡å­—åˆ—ã‚’è¿”ã�™
+        /// </summary>
+        /// <param name="ItemCode">å¤§å·¥ç¨®ã‚­ãƒ¼</param>
+        /// <returns>Whereæ–‡å­—åˆ—</returns>
+        public string CreatePrimarykeyString(int PersonCode, DateTime StartDate)
+        {
+            StringBuilder strWork = new StringBuilder();
+            try
+            {
+                strWork.AppendFormat(" Where PersonCode = {0}", PersonCode);
+                if (StartDate != DateTime.MinValue)
+                    strWork.AppendFormat(" And StartDate = STR_TO_DATE('{0}','%Y/%m/%d')", StartDate.ToShortDateString());
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("ã‚·ã‚¹ãƒ†ãƒ ã‚¨ãƒ©ãƒ¼ï¼š{0}ï¼š{1}ï¼š{2}", CommonMotions.GetMethodName(2), ex.Message, strWork.ToString());
+            }
+
+            return strWork.ToString();
+        }
+        #endregion
+    }
+}
Index: branches/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOMPersonInCharge.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOMPersonInCharge.cs	(revision 329)
+++ branches/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOMPersonInCharge.cs	(revision 330)
@@ -190,12 +190,74 @@
         }
         #endregion
 
-        #region æ‹…å½“è€…ãƒžã‚¹ã‚¿è¿½åŠ 
+        #region æ‹…å½“è€…ãƒžã‚¹ã‚¿è¿½åŠ ï¼ˆ1ä»¶ï¼‰
         /// <summary>
-        /// æ‹…å½“è€…ãƒžã‚¹ã‚¿è¿½åŠ 
+        /// æ‹…å½“è€…ãƒžã‚¹ã‚¿è¿½åŠ ï¼ˆ1ä»¶ï¼‰
         /// </summary>
         /// <param name="data">æ‹…å½“è€…ãƒžã‚¹ã‚¿ãƒ‡ãƒ¼ã‚¿</param>
         /// <returns>trueï¼šæˆ�åŠŸ falseï¼šå¤±æ•—</returns>
+        public bool InsertAction(PersonInChargeMaster work, bool bConnect = true)
+        {
+            StringBuilder strcmd = new StringBuilder();
+            try
+            {
+
+                strcmd.Append("INSERT INTO PersonInChargeMaster");
+                strcmd.Append(" (");
+
+                bool bFirst = true;
+                foreach (var gender in Enum.GetValues(typeof(ColumnCnt)))
+                {
+                    if (!bFirst) strcmd.Append(" ,");
+                    strcmd.Append(gender.ToString());
+                    bFirst = false;
+                }
+
+                strcmd.Append(") VALUES (");
+
+                strcmd.AppendFormat("  {0}", work.PersonCode);
+                strcmd.AppendFormat(", {0}", work.DisplayOrder);
+                strcmd.AppendFormat(", '{0}'", work.PersonName);
+                strcmd.AppendFormat(", STR_TO_DATE('{0}' ,'%Y/%m/%d')", work.StartDate.ToShortDateString());
+                strcmd.AppendFormat(", STR_TO_DATE('{0}' ,'%Y/%m/%d')", work.EndDate.ToShortDateString());
+                strcmd.AppendFormat(", '{0}'", work.PassWord);
+                strcmd.AppendFormat(", {0}", work.SecurityManagement);
+                strcmd.AppendFormat(", {0}", work.SecCode);
+                strcmd.AppendFormat(", '{0}'", work.MsgBackColor);
+                strcmd.AppendFormat(", '{0}'", work.DisplayString);
+                strcmd.AppendFormat(", {0}", work.DepartmentCode);
+                strcmd.AppendFormat(", {0}", work.MonthlySalary);
+                strcmd.AppendFormat(", {0}", work.YearSalary);
+                strcmd.AppendFormat(", '{0}'", work.Qualification);
+                strcmd.AppendFormat(", '{0}'", work.SealPrintName);
+                strcmd.AppendFormat(", {0}", work.EmployeeClassFlg);
+                strcmd.AppendFormat(", {0}", work.LedgerFlg);
+                strcmd.AppendFormat(", {0}", work.CommutingDistance);
+                strcmd.AppendFormat(", {0}", work.CommuteCosts);
+                strcmd.AppendFormat(", {0}", work.DeleteFlg);
+
+                strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.EntryDate);
+                strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.UpdateDate);
+                strcmd.Append(")");
+
+                if (!ExecuteNonQuery(strcmd.ToString(), bConnect)) return false;
+
+                return true;
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("ã‚·ã‚¹ãƒ†ãƒ ã‚¨ãƒ©ãƒ¼ï¼š{0}ï¼š{1}ï¼š{2}", CommonMotions.GetMethodName(2), ex.Message, strcmd.ToString());
+                return false;
+            }
+        }
+        #endregion
+
+        #region æ‹…å½“è€…ãƒžã‚¹ã‚¿è¿½åŠ ï¼ˆè¤‡æ•°ï¼‰
+        /// <summary>
+        /// æ‹…å½“è€…ãƒžã‚¹ã‚¿è¿½åŠ ï¼ˆè¤‡æ•°ï¼‰
+        /// </summary>
+        /// <param name="data">æ‹…å½“è€…ãƒžã‚¹ã‚¿ãƒ‡ãƒ¼ã‚¿</param>
+        /// <returns>trueï¼šæˆ�åŠŸ falseï¼šå¤±æ•—</returns>
         public bool InsertAction(List<PersonInChargeMaster> data, bool bConnect = true)
         {
             StringBuilder strcmd = new StringBuilder();;
@@ -491,7 +553,7 @@
             wrk.DisplayOrder = 0;	                // è¡¨ç¤ºé †
             wrk.PersonName = string.Empty;          // æ‹…å½“è€…å��
             wrk.StartDate = DateTime.MinValue;      // ãƒžã‚¹ã‚¿ä½¿ç”¨é–‹å§‹å¹´æœˆæ—¥ä»˜
-            wrk.EndDate = DateTime.MinValue;        // ãƒžã‚¹ã‚¿ä½¿ç”¨é–‹å§‹å¹´æœˆæ—¥ä»˜
+            wrk.EndDate = DateTime.MinValue;        // ãƒžã‚¹ã‚¿ä½¿ç”¨çµ‚äº†å¹´æœˆæ—¥ä»˜
             wrk.PassWord = string.Empty;	        // ãƒ‘ã‚¹ãƒ¯ãƒ¼ãƒ‰
             wrk.SecurityManagement = 0;             // æ©Ÿå¯†åŒºåˆ†
             wrk.SecCode = 0;                        // ä¿�è­·åŒºåˆ†ç•ªå�·
Index: branches/src/ProcessManagement/ProcessManagement/DataModel/ChgChargeDep.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/DataModel/ChgChargeDep.cs	(nonexistent)
+++ branches/src/ProcessManagement/ProcessManagement/DataModel/ChgChargeDep.cs	(revision 330)
@@ -0,0 +1,145 @@
+ï»¿using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace ProcessManagement.DataModel
+{
+    /// <summary>
+    /// æ‹…å½“è€…éƒ¨ç½²å±¥æ­´ãƒ‡ãƒ¼ã‚¿
+    /// </summary>
+    public class ChgChargeDep
+    {
+        #region å®šæ•°
+        #region æ‹…å½“è€…ãƒžã‚¹ã‚¿ï¼šç¤¾å“¡åŒºåˆ†
+        /// <summary>
+        /// ç¤¾å“¡åŒºåˆ†
+        /// </summary>
+        public enum EmployeeClassFlgDef
+        {
+            /// <summary>
+            /// ä¸�å®š
+            /// </summary>
+            None = 0,
+            /// <summary>
+            /// æ­£ç¤¾å“¡
+            /// </summary>
+            Regular,
+            /// <summary>
+            /// å¤–æ³¨è€…
+            /// </summary>
+            OutSource,
+        }
+        #endregion
+
+        #region æ‹…å½“è€…ãƒžã‚¹ã‚¿ï¼šå·¥äº‹è©³ç´°å�°å¸³è¨ˆç®—å¯¾è±¡ãƒ•ãƒ©ã‚°
+        /// <summary>
+        /// æ‹…å½“è€…ãƒžã‚¹ã‚¿ï¼šå·¥äº‹è©³ç´°å�°å¸³è¨ˆç®—å¯¾è±¡ãƒ•ãƒ©ã‚°
+        /// </summary>
+        public enum LedgerDivNoDef
+        {
+            /// <summary>
+            /// å¯¾è±¡å¤–
+            /// </summary>
+            CalcOuter = 0,
+            /// <summary>
+            /// å¯¾è±¡
+            /// </summary>
+            CalcTarget,
+        }
+        #endregion
+
+        #region æ‹…å½“è€…å¯¾è±¡éƒ¨ç½²ãƒžã‚¹ã‚¿ï¼šæ‰€å±žãƒ•ãƒ©ã‚°
+        /// <summary>
+        /// æ‹…å½“è€…å¯¾è±¡éƒ¨ç½²ãƒžã‚¹ã‚¿ï¼šæ‰€å±žãƒ•ãƒ©ã‚°
+        /// </summary>
+        public enum AffiFlgDef
+        {
+            /// <summary>
+            /// ä»–éƒ¨ç½²
+            /// </summary>
+            Ohter = 0,
+            /// <summary>
+            /// æ‰€å±žéƒ¨ç½²
+            /// </summary>
+            Affiliation,
+        }
+        #endregion
+        #endregion
+
+        #region ãƒ¡ãƒ³ãƒ�å¤‰æ•°
+        private int         m_PersonCode = 0;                   // æ‹…å½“è€…ã‚³ãƒ¼ãƒ‰
+        private DateTime    m_StartDate = DateTime.MinValue;    // é–‹å§‹å¹´æœˆæ—¥
+        private DateTime    m_CompDate = DateTime.MinValue;     // çµ‚äº†å¹´æœˆæ—¥
+
+        private int         m_DepartmentCode = 0;               // éƒ¨ç½²ã‚³ãƒ¼ãƒ‰
+        private string      m_DepartmentName = string.Empty;    // éƒ¨ç½²å��
+
+        private DateTime    m_EntryDate = DateTime.Now;         // ç™»éŒ²æ—¥ä»˜
+        private DateTime    m_UpdateDate = DateTime.Now;        // æ›´æ–°æ—¥ä»˜
+        #endregion
+
+        #region ã‚³ãƒ³ã‚¹ãƒˆãƒ©ã‚¯ã‚¿
+        #endregion
+
+        #region ãƒ—ãƒ­ãƒ‘ãƒ†ã‚£
+        /// <summary>
+        /// æ‹…å½“è€…ã‚³ãƒ¼ãƒ‰
+        /// </summary>
+        public int PersonCode
+        {
+            set { m_PersonCode = value; }
+            get { return m_PersonCode; }
+        }
+        /// <summary>
+        /// ãƒžã‚¹ã‚¿ä½¿ç”¨é–‹å§‹å¹´æœˆ
+        /// </summary>
+        public DateTime StartDate
+        {
+            set { m_StartDate = value; }
+            get { return m_StartDate; }
+        }
+        /// <summary>
+        /// ãƒžã‚¹ã‚¿ä½¿ç”¨çµ‚äº†å¹´æœˆ
+        /// </summary>
+        public DateTime CompDate
+        {
+            set { m_CompDate = value; }
+            get { return m_CompDate; }
+        }
+        /// <summary>
+        /// éƒ¨ç½²ã‚³ãƒ¼ãƒ‰
+        /// </summary>
+        public int DepartmentCode
+        {
+            get { return m_DepartmentCode; }
+            set { m_DepartmentCode = value; }
+        }
+        /// <summary>
+        /// éƒ¨ç½²å��
+        /// </summary>
+        public string DepartmentName
+        {
+            get { return m_DepartmentName; }
+            set { m_DepartmentName = value; }
+        }
+        /// <summary>
+        /// ç™»éŒ²æ—¥ä»˜
+        /// </summary>
+        public DateTime EntryDate
+        {
+            set { m_EntryDate = value; }
+            get { return m_EntryDate; }
+        }
+        /// <summary>
+        /// <summary>
+        /// æ›´æ–°æ—¥ä»˜
+        /// </summary>
+        public DateTime UpdateDate
+        {
+            set { m_UpdateDate = value; }
+            get { return m_UpdateDate; }
+        }
+        #endregion
+    }
+}
Index: branches/src/ProcessManagement/ProcessManagement/DataModel/ConstructionBaseInfo.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/DataModel/ConstructionBaseInfo.cs	(revision 329)
+++ branches/src/ProcessManagement/ProcessManagement/DataModel/ConstructionBaseInfo.cs	(revision 330)
@@ -272,10 +272,14 @@
         private DateTime    m_ConstructionCompletionDate = DateTime.MinValue;   // æ–½å·¥å®Œäº†æ—¥
         private DateTime    m_NonOrderDate = DateTime.MinValue;                 // é�žå�—æ³¨æ—¥
         private double      m_OrdersDecisionPrice = 0;	                        // ç¨ŽæŠœå�—æ³¨æ±ºå®šé‡‘é¡�
-        private double      m_OrdersDecisionPriceInTax = 0;	                    // ç¨Žè¾¼å�—æ³¨æ±ºå®šé‡‘é¡�
+        private double      m_OrdersDecisionPriceInTax = 0;                     // ç¨Žè¾¼å�—æ³¨æ±ºå®šé‡‘é¡�
+        private int         m_SalesDepCode = 0;                                 // å–¶æ¥­æ‹…å½“è€…éƒ¨ç½²ã‚³ãƒ¼ãƒ‰
         private int         m_SalesPersonCode = 0;	                            // å–¶æ¥­æ‹…å½“è€…ã‚³ãƒ¼ãƒ‰
+        private int         m_ConstrDepCode = 0;                                // å·¥äº‹æ‹…å½“è€…éƒ¨ç½²ã‚³ãƒ¼ãƒ‰
         private int         m_ConstructionPersonCode = 0;	                    // å·¥äº‹æ‹…å½“è€…ã‚³ãƒ¼ãƒ‰
+        private int         m_ConstrSubDepCode = 0;                             // å·¥äº‹å‰¯æ‹…å½“è€…éƒ¨ç½²ã‚³ãƒ¼ãƒ‰
         private int         m_ConstrSubPersonCode = 0;	                        // å·¥äº‹å‰¯æ‹…å½“è€…ã‚³ãƒ¼ãƒ‰
+        private int         m_ConstrInstrDepCode = 0;                           // å·¥äº‹æŒ‡å°Žå“¡éƒ¨ç½²ã‚³ãƒ¼ãƒ‰
         private int         m_ConstructionInstructor = 0;                       // å·¥äº‹æŒ‡å°Žå“¡ã‚³ãƒ¼ãƒ‰
         private int         m_TransferConstruction = 0;                         // ç§»ç®¡å…ˆã‚³ãƒ¼ãƒ‰
         private DateTime    m_TransferConstructionDate = DateTime.MinValue;     // å·¥äº‹ç§»ç®¡æ—¥
@@ -463,6 +467,14 @@
             set { m_OrdersDecisionPriceInTax = value; }
         }
         /// <summary>
+        /// å–¶æ¥­æ‹…å½“è€…éƒ¨ç½²ã‚³ãƒ¼ãƒ‰
+        /// </summary>
+        public int SalesDepCode
+        {
+            get { return m_SalesDepCode; }
+            set { m_SalesDepCode = value; }
+        }
+        /// <summary>
         /// å–¶æ¥­æ‹…å½“è€…ã‚³ãƒ¼ãƒ‰
         /// </summary>
         public int SalesPersonCode
@@ -471,6 +483,14 @@
             set { m_SalesPersonCode = value; }
         }
         /// <summary>
+        /// å·¥äº‹æ‹…å½“è€…éƒ¨ç½²ã‚³ãƒ¼ãƒ‰
+        /// </summary>
+        public int ConstrDepCode
+        {
+            get { return m_ConstrDepCode; }
+            set { m_ConstrDepCode = value; }
+        }
+        /// <summary>
         /// å·¥äº‹æ‹…å½“è€…ã‚³ãƒ¼ãƒ‰
         /// </summary>
         public int ConstructionPersonCode
@@ -479,6 +499,14 @@
             set { m_ConstructionPersonCode = value; }
         }
         /// <summary>
+        /// å·¥äº‹å‰¯æ‹…å½“è€…éƒ¨ç½²ã‚³ãƒ¼ãƒ‰
+        /// </summary>
+        public int ConstrSubDepCode
+        {
+            get { return m_ConstrSubDepCode; }
+            set { m_ConstrSubDepCode = value; }
+        }
+        /// <summary>
         /// å·¥äº‹å‰¯æ‹…å½“è€…ã‚³ãƒ¼ãƒ‰
         /// </summary>
         public int ConstrSubPersonCode
@@ -487,6 +515,14 @@
             set { m_ConstrSubPersonCode = value; }
         }
         /// <summary>
+        /// å·¥äº‹æŒ‡å°Žå“¡éƒ¨ç½²ã‚³ãƒ¼ãƒ‰
+        /// </summary>
+        public int ConstrInstrDepCode
+        {
+            get { return m_ConstrInstrDepCode; }
+            set { m_ConstrInstrDepCode = value; }
+        }
+        /// <summary>
         /// å·¥äº‹æŒ‡å°Žå“¡
         /// </summary>
         public int ConstructionInstructor
Index: branches/src/ProcessManagement/ProcessManagement/DataModel/ConstructionBaseInfoDetail.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/DataModel/ConstructionBaseInfoDetail.cs	(revision 329)
+++ branches/src/ProcessManagement/ProcessManagement/DataModel/ConstructionBaseInfoDetail.cs	(revision 330)
@@ -112,6 +112,22 @@
             /// 24:æ¤œæŸ»æ˜¯æ­£å®Œäº†ã‚³ãƒ¡ãƒ³ãƒˆ
             /// </summary>
             RevCompleteComment,
+            /// <summary>
+            /// 101:å–¶æ¥­æ‹…å½“éƒ¨ç½²å��
+            /// </summary>
+            SalesDepartmentName = 101,
+            /// <summary>
+            /// 102:å·¥äº‹æ‹…å½“éƒ¨ç½²å��
+            /// </summary>
+            ConstrDepartmentName,
+            /// <summary>
+            /// 103:å·¥äº‹å‰¯æ‹…å½“éƒ¨ç½²å��
+            /// </summary>
+            ConstrSubDepartmentName,
+            /// <summary>
+            /// 104:æŒ‡å°Žå“¡éƒ¨ç½²å��
+            /// </summary>
+            InstrDepartmentName,
         }
         #endregion
 
Index: branches/src/ProcessManagement/ProcessManagement/DataModel/CostomerRegist.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/DataModel/CostomerRegist.cs	(revision 329)
+++ branches/src/ProcessManagement/ProcessManagement/DataModel/CostomerRegist.cs	(revision 330)
@@ -11,7 +11,7 @@
     public class CostomerRegist
     {
         #region ãƒ¡ãƒ³ãƒ�å¤‰æ•°
-        private int         m_PersonCode = 0;                       // ç”³è«‹è€…ç•ªå�·
+        private int         m_CreatePersonCode = 0;                 // ç”³è«‹è€…ç•ªå�·
         private DateTime    m_CreateDate = DateTime.Now;            // ä½œæˆ�æ—¥
         private int         m_SeqNo = 0;                            // ç”³è«‹é€£ç•ª
 
@@ -24,10 +24,10 @@
         private string      m_CorporateStatusName = string.Empty;	// æ³•äººæ ¼å��ç§°
         private int         m_CorporateStatusPoint = 0;	            // æ³•äººæ ¼å��ç§°ä½�ç½®
         private string      m_OrderersName1 = string.Empty;	        // ç™ºæ³¨è€…å��ï¼‘
-        private string      m_OrderersName2 = string.Empty;	        // ç™ºæ³¨è€…å��ï¼’
+        private string      m_OrderersName2 = string.Empty;         // ç™ºæ³¨è€…å��ï¼’
 
-        private string      m_DepartmentName = string.Empty;	    // éƒ¨ç½²
-        private string      m_ChargePersonName = string.Empty;	    // æ‹…å½“è€…å��
+        private string      m_DepartmentName = string.Empty;        // éƒ¨ç½²
+        private string      m_PersonName = string.Empty;	        // æ‹…å½“è€…å��
 
         private string      m_ZipCode = string.Empty;	            // éƒµä¾¿ç•ªå�·
         private string      m_Address1 = string.Empty;	            // ä½�æ‰€1
@@ -42,6 +42,9 @@
         private DateTime    m_OrderDate = DateTime.MinValue;        // ç”³è«‹æ—¥
         private int         m_OrderNo = 0;                          // ç”³è«‹å�—ä»˜ç•ªå�·
 
+        private int         m_CreateDepartmentCode = 0;             // ç”³è«‹éƒ¨ç½²ã‚³ãƒ¼ãƒ‰
+        private string      m_CreateDepartmentName = string.Empty;  // ç”³è«‹éƒ¨ç½²å��
+
         private DateTime    m_EntryDate = DateTime.Now;             // ç™»éŒ²æ—¥ä»˜
         private DateTime    m_UpdateDate = DateTime.Now;            // æ›´æ–°æ—¥ä»˜
         #endregion
@@ -53,10 +56,10 @@
         /// <summary>
         /// ç”³è«‹è€…ç•ªå�·
         /// </summary>
-        public int PersonCode
+        public int CreatePersonCode
         {
-            get { return m_PersonCode; }
-            set { m_PersonCode = value; }
+            get { return m_CreatePersonCode; }
+            set { m_CreatePersonCode = value; }
         }
         /// <summary>
         /// ä½œæˆ�æ—¥
@@ -158,10 +161,10 @@
         /// <summary>
         /// æ‹…å½“è€…å��
         /// </summary>
-        public string ChargePersonName
+        public string PersonName
         {
-            get { return m_ChargePersonName; }
-            set { m_ChargePersonName = value; }
+            get { return m_PersonName; }
+            set { m_PersonName = value; }
         }
         /// <summary>
         /// éƒµä¾¿ç•ªå�·
@@ -254,6 +257,24 @@
         }
 
         /// <summary>
+        /// ç”³è«‹éƒ¨ç½²ã‚³ãƒ¼ãƒ‰
+        /// </summary>
+        public int CreateDepartmentCode
+        {
+            get { return m_CreateDepartmentCode; }
+            set { m_CreateDepartmentCode = value; }
+        }
+
+        /// <summary>
+        /// ç”³è«‹éƒ¨ç½²å��
+        /// </summary>
+        public string CreateDepartmentName
+        {
+            get { return m_CreateDepartmentName; }
+            set { m_CreateDepartmentName = value; }
+        }
+
+        /// <summary>
         /// ç™»éŒ²æ—¥ä»˜
         /// </summary>
         public DateTime EntryDate
Index: branches/src/ProcessManagement/ProcessManagement/DataModel/MessageBoardData.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/DataModel/MessageBoardData.cs	(revision 329)
+++ branches/src/ProcessManagement/ProcessManagement/DataModel/MessageBoardData.cs	(revision 330)
@@ -55,7 +55,7 @@
         private int         m_BranchNumber = 0;                     // ãƒ¬ã‚³ãƒ¼ãƒ‰æž�ç•ª
         private int         m_FromCode = 0;                         // æ›¸è¾¼ã�¿è€…å��
         private string      m_FromName = string.Empty;              // æ›¸è¾¼ã�¿è€…å��
-        private string      m_MessageTitle = string.Empty;         // ä¼�è¨€ã‚¿ã‚¤ãƒˆãƒ«
+        private string      m_MessageTitle = string.Empty;          // ä¼�è¨€ã‚¿ã‚¤ãƒˆãƒ«
         private string      m_MessageContent = string.Empty;        // ä¼�è¨€å†…å®¹
         private int         m_LinkType = 0;                         // ãƒªãƒ³ã‚¯å‹•ä½œã‚¿ã‚¤ãƒ—
         private string      m_LinkMessage = string.Empty;           // ãƒªãƒ³ã‚¯æ–‡å­—åˆ—
Index: branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ApprovalList/FrmApprovalList.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ApprovalList/FrmApprovalList.cs	(revision 329)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ApprovalList/FrmApprovalList.cs	(revision 330)
@@ -284,6 +284,13 @@
         {
             if (m_bInitFlg) return;
 
+
+            // •”��ƒRƒ“ƒ{ƒ{ƒbƒNƒX•Ï�X
+            SetcmbDepartment();
+            // ’S“–ŽÒƒRƒ“ƒ{ƒ{ƒbƒNƒX•Ï�X
+            SetcmbPersons();
+
+
             // ƒf�[ƒ^•\Ž¦
             DataDisplay();
         }
@@ -295,7 +302,7 @@
         /// </summary>
         /// <param name="sender"></param>
         /// <param name="e"></param>
-        private void cmbDepartment_TextChanged(object sender, EventArgs e)
+        private void cmbDepartment_SelectedIndexChanged(object sender, EventArgs e)
         {
             if (m_bInitFlg) return;
 
@@ -313,12 +320,12 @@
         /// </summary>
         /// <param name="sender"></param>
         /// <param name="e"></param>
-        private void cmbConstructionPerson_TextChanged(object sender, EventArgs e)
+        private void cmbConstructionPerson_SelectedIndexChanged(object sender, EventArgs e)
         {
             if (m_bInitFlg) return;
 
-            // ’S“–ŽÒ‘I‘ðŽž•”��‘I‘ð‚ð�Ý’è‚·‚é
-            SetPerosonToDepartment();
+            // ’S“–ŽÒƒRƒ“ƒ{ƒ{ƒbƒNƒXƒZƒbƒgŽž•”��‚ðƒZƒbƒg‚·‚é
+            if (!SetPerosonToDepartment()) return;
 
             // ƒf�[ƒ^•\Ž¦
             DataDisplay();
Index: branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ApprovalList/FrmApprovalList.designer.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ApprovalList/FrmApprovalList.designer.cs	(revision 329)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ApprovalList/FrmApprovalList.designer.cs	(revision 330)
@@ -212,7 +212,7 @@
             this.cmbConstructionPerson.Name = "cmbConstructionPerson";
             this.cmbConstructionPerson.Size = new System.Drawing.Size(200, 23);
             this.cmbConstructionPerson.TabIndex = 3;
-            this.cmbConstructionPerson.TextChanged += new System.EventHandler(this.cmbConstructionPerson_TextChanged);
+            this.cmbConstructionPerson.SelectedIndexChanged += new System.EventHandler(this.cmbConstructionPerson_SelectedIndexChanged);
             // 
             // cmbDepartment
             // 
@@ -224,7 +224,7 @@
             this.cmbDepartment.Name = "cmbDepartment";
             this.cmbDepartment.Size = new System.Drawing.Size(200, 23);
             this.cmbDepartment.TabIndex = 3;
-            this.cmbDepartment.TextChanged += new System.EventHandler(this.cmbDepartment_TextChanged);
+            this.cmbDepartment.SelectedIndexChanged += new System.EventHandler(this.cmbDepartment_SelectedIndexChanged);
             // 
             // label3
             // 
Index: branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ApprovalList/FrmApprovalListAuxiliary.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ApprovalList/FrmApprovalListAuxiliary.cs	(revision 329)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ApprovalList/FrmApprovalListAuxiliary.cs	(revision 330)
@@ -290,47 +290,17 @@
             m_bInitFlg = true;
             try
             {
+                cmbDepartment.SelectedIndexChanged -= new EventHandler(this.cmbDepartment_SelectedIndexChanged);
 
                 cmbDepartment.DataSource = null;
                 cmbDepartment.Items.Clear();
                 cmbDepartment.Text = "";
 
+                int nTargetCount = CommonMotions.cnvInt(numUDConstPro.Value);
+                // •”��ƒ}ƒXƒ^‚ðŒŸ�õ‚·‚é
                 StringBuilder strSQL = new StringBuilder();
-                // •”��ƒ}ƒXƒ^‚ðŒŸ�õ‚·‚é
-                strSQL.Append("SELECT A.DEPARTMENTCODE, A.DEPARTMENTSTRING, A.DISPLAYORDER, COUNT(*)");
-                strSQL.Append(" FROM DEPARTMENTMASTER A, PERSONINCHARGEMASTER B, CONSTRUCTIONBASEINFO C");
-                strSQL.Append(" WHERE A.DELETEFLG = 0");
+                CommonMotions.CreateDepCombBoxSQL(ref strSQL, nTargetCount);
 
-                // �VƒZƒLƒ…ƒŠƒeƒBƒf�[ƒ^‘Î‰ž�Ï‚Ý‚©‚ðŠm”F‚·‚é
-                if (CommonMotions.LoginUserData.SecCode == 0)
-                {
-                    // ƒVƒXƒeƒ€Œ ŒÀ‚É‚æ‚Á‚Äƒf�[ƒ^ƒAƒNƒZƒX‚É�§ŒÀ‚ª‚ ‚é
-                    if (CommonMotions.LoginUserData.SecurityManagement == CommonDefine.SystemManageDiv[(int)CommonDefine.SysManaDivNo.SuperiorAuthority].Key
-                        || CommonMotions.LoginUserData.SecurityManagement == CommonDefine.SystemManageDiv[(int)CommonDefine.SysManaDivNo.UserAuthority].Key)
-                    {
-                        // �Š‘®’·
-                        // ˆê”ÊŽg—pŽÒ�iŽ©•ª‚Ì‚ÝƒAƒNƒZƒX‰Â”\�j
-                        strSQL.AppendFormat(" AND A.DEPARTMENTCODE = {0}", CommonMotions.LoginUserData.DepartmentCode);
-                    }
-                }
-                else
-                {
-                    if (CommonMotions.LoginUserData.PersonCode == CommonDefine.AdminCode)
-                    {
-
-                    }
-                    else
-                    {
-                        // ŽQ�Æ•”��ƒ}ƒXƒ^‚æ‚èŽæ“¾‚·‚é
-                        strSQL.Append(" AND A.DEPARTMENTCODE IN (SELECT A1.DEPARTMENTCODE FROM PERSONDEPARTMENTMASTER A1");
-                        strSQL.AppendFormat(" WHERE A1.PERSONCODE = {0})", CommonMotions.LoginUserData.PersonCode);
-                    }
-                }
-                strSQL.Append(" AND A.DEPARTMENTCODE = B.DEPARTMENTCODE");
-                strSQL.Append(" AND B.PERSONCODE = C.CONSTRUCTIONPERSONCODE");
-                strSQL.Append(" GROUP BY A.DEPARTMENTCODE, A.DEPARTMENTSTRING, A.DISPLAYORDER");
-                strSQL.Append(" ORDER BY A.DISPLAYORDER ASC");
-
                 // •”��ƒ}ƒXƒ^“Ç�ž
                 ArrayList arList = new ArrayList();
                 if (!depDB.ExecuteReader(strSQL.ToString(), ref arList)) return false;
@@ -349,20 +319,6 @@
                 // ƒRƒ“ƒ{ƒ{ƒbƒNƒX�‰Šú•\Ž¦
                 ComboBoxAction.InitDataSetCombBox(cmbDepartment, ConstructionDataList);
 
-                // �VƒZƒLƒ…ƒŠƒeƒBƒf�[ƒ^‘Î‰ž�Ï‚Ý‚©‚ðŠm”F‚·‚é
-                if (CommonMotions.LoginUserData.SecCode == 0)
-                {
-                    // �Š‘®’·
-                    // ˆê”ÊŽg—pŽÒ�iŽ©•ª‚Ì‚ÝƒAƒNƒZƒX‰Â”\�j
-                    if (CommonMotions.LoginUserData.SecurityManagement == CommonDefine.SystemManageDiv[(int)CommonDefine.SysManaDivNo.SuperiorAuthority].Key ||
-                        CommonMotions.LoginUserData.SecurityManagement == CommonDefine.SystemManageDiv[(int)CommonDefine.SysManaDivNo.UserAuthority].Key)
-                    {
-                        // ‘�–±•”�Š‘®ŽÒˆÈŠO
-                        if (CommonMotions.LoginUserData.DepartmentCode != CommonDefine.s_GeneralAffairsDevision)
-                            cmbDepartment.SelectedValue = CommonMotions.LoginUserData.DepartmentCode;
-                    }
-                }
-
                 return true;
             }
             catch (Exception ex)
@@ -374,6 +330,7 @@
             {
                 depDB.close(); depDB = null;
                 m_bInitFlg = bSave;
+                cmbDepartment.SelectedIndexChanged += new EventHandler(this.cmbDepartment_SelectedIndexChanged);
             }
         }
         #endregion
@@ -434,52 +391,33 @@
         private bool SetcmbPersons()
         {
             IOMPersonInCharge picDB = new IOMPersonInCharge();
-            List<PersonInChargeMaster> workList = new List<PersonInChargeMaster>();
             bool bSave = m_bInitFlg;
             m_bInitFlg = true;
             try
             {
+                cmbConstructionPerson.SelectedIndexChanged -= new EventHandler(this.cmbConstructionPerson_SelectedIndexChanged);
+
                 cmbConstructionPerson.DataSource = null;
                 cmbConstructionPerson.Items.Clear();
                 cmbConstructionPerson.Text = "";
 
+                int nTargetCount = CommonMotions.cnvInt(numUDConstPro.Value);
                 int DepartmentCode = GetDepartmentCode();
                 StringBuilder strSQL = new StringBuilder();
-                // ŒŸ�õ�ðŒ�
-                strSQL.AppendFormat(" WHERE LEDGERFLG = {0}", (int)PersonInChargeMaster.LedgerDivNoDef.CalcTarget);
-                strSQL.Append(" AND (DEPARTMENTCODE");
-                string strSubSQL = string.Empty;
-                if (DepartmentCode == 0)
-                {
-                    // ŽQ�Æ•”��ƒ}ƒXƒ^‚æ‚èŽæ“¾‚·‚é
-                    strSubSQL += string.Format(" IN (SELECT AA.DEPARTMENTCODE FROM PERSONDEPARTMENTMASTER AA WHERE AA.PERSONCODE = {0})"
-                                            , CommonMotions.LoginUserData.PersonCode);
-                }
-                else
-                {
-                    strSubSQL += string.Format(" = {0}", DepartmentCode);
-                }
-                strSQL.Append(strSubSQL + ")");
+                CommonMotions.CreateManCombBoxSQL(ref strSQL, nTargetCount, DepartmentCode);
 
-                // “–ŠúŠúŽñ“ú�EŠú––“ú‚ðŽæ“¾
-                DateTime dtDefaultStart = DateTime.MinValue;
-                DateTime dtDefaultEnd = DateTime.MinValue;
-                CreateDefaultStartAndEndDate(ref dtDefaultStart, ref dtDefaultEnd);
-
-                strSQL.AppendFormat(" AND (DATE(STARTDATE) <= STR_TO_DATE('{0}','%Y/%m/%d')", dtDefaultEnd.ToShortDateString());
-                strSQL.AppendFormat(" AND (STR_TO_DATE('{0}','%Y/%m/%d') <= DATE(ENDDATE)", dtDefaultStart.ToShortDateString());
-                strSQL.AppendFormat(" OR STR_TO_DATE('{0}','%Y/%m/%d') = DATE(ENDDATE)))", DateTime.MinValue.ToShortDateString());
-
-                strSQL.Append(" Order By DeleteFlg ASC, EmployeeClassFlg ASC, DisplayOrder ASC");
                 // ’S“–ŽÒƒ}ƒXƒ^“Ç�ž
-                if (!picDB.SelectAction(strSQL.ToString(), ref workList)) return false;
+                ArrayList workList = new ArrayList();
+                if (!picDB.ExecuteReader(strSQL.ToString(), ref workList)) return false;
 
                 List<KeyValuePair<int, string>> ConstructionDataList = new List<KeyValuePair<int, string>>();
                 ConstructionDataList.Add(new KeyValuePair<int, string>(0, ""));
 
-                foreach (PersonInChargeMaster work in workList)
+                PersonInChargeMaster workRec = new PersonInChargeMaster();
+                foreach (object[] work in workList)
                 {
-                    KeyValuePair<int, string> keyval = new KeyValuePair<int, string>(work.PersonCode, work.PersonName);
+                    picDB.Reader2Struct(work, ref workRec);
+                    KeyValuePair<int, string> keyval = new KeyValuePair<int, string>(workRec.PersonCode, workRec.PersonName);
 
                     ConstructionDataList.Add(keyval);
                 }
@@ -487,17 +425,6 @@
                 // ƒRƒ“ƒ{ƒ{ƒbƒNƒX�‰Šú•\Ž¦
                 ComboBoxAction.InitDataSetCombBox(cmbConstructionPerson, ConstructionDataList);
 
-                // �VƒZƒLƒ…ƒŠƒeƒBƒf�[ƒ^‘Î‰ž�Ï‚Ý‚©‚ðŠm”F‚·‚é
-                if (CommonMotions.LoginUserData.SecCode == 0)
-                {
-                    // ˆê”Êƒ†�[ƒU�[‚Å‘�–±•”�Š‘®ŽÒ‚Å‚Í‚È‚¢�ê�‡�Aƒ�ƒOƒCƒ“ŽÒ‚ÌƒR�[ƒh‚ðƒZƒbƒg‚·‚é
-                    if (CommonMotions.LoginUserData.SecurityManagement == CommonDefine.SystemManageDiv[(int)CommonDefine.SysManaDivNo.UserAuthority].Key &&
-                        CommonMotions.LoginUserData.DepartmentCode != CommonDefine.s_GeneralAffairsDevision)
-                    {
-                        cmbConstructionPerson.SelectedValue = CommonMotions.LoginUserData.PersonCode;
-                    }
-                }
-
                 return true;
             }
             catch (Exception ex)
@@ -509,45 +436,11 @@
             {
                 picDB.close(); picDB = null;
                 m_bInitFlg = bSave;
+                cmbConstructionPerson.SelectedIndexChanged += new EventHandler(this.cmbConstructionPerson_SelectedIndexChanged);
             }
         }
         #endregion
 
-        #region ƒfƒtƒHƒ‹ƒg‚ÌŠúŽñ“ú�EŠú––“ú‚ð‹�‚ß‚é
-        /// <summary>
-        /// ƒfƒtƒHƒ‹ƒg‚ÌŠúŽñ“ú�EŠú––“ú‚ð‹�‚ß‚é
-        /// </summary>
-        /// <param name="dtStart"></param>
-        /// <param name="dtEnd"></param>
-        private void CreateDefaultStartAndEndDate(ref DateTime dtStart, ref DateTime dtEnd)
-        {
-            try
-            {
-                // “–ŠúŠúŽñ”NŒŽ“ú‚ðŽæ“¾
-                int iYear = 0;
-                int month = 0;
-                int day = 0;
-                bool bPeriod = false;
-                if (CommonMotions.SystemMasterData.ConstructionNoBase == (int)SystemMaster.ConstrNoBaseDef.BusinessPeriod)
-                {   // ‰c‹ÆŠú
-                    iYear = CommonMotions.PeriodCountToYear(CommonMotions.cnvInt(numUDConstPro.Value));
-                    bPeriod = true;
-                }
-                else
-                {   // �HŽ–”N“x
-                    iYear = CommonMotions.SystemMasterData.ConstrYear;
-                }
-                CommonMotions.GetNowBeginMonthDay(bPeriod, ref month, ref day);
-                dtStart = new DateTime(iYear, month, day);
-                dtEnd = dtStart.AddYears(1).AddDays(-1);     // �I—¹‚Í�{1”N�|1“ú
-            }
-            catch (Exception ex)
-            {
-                logger.ErrorFormat("ƒVƒXƒeƒ€ƒGƒ‰�[�F{0}�F{1}", CommonMotions.GetMethodName(), ex.Message);
-            }
-        }
-        #endregion
-
         #region ƒf�[ƒ^•\Ž¦�ˆ—�
         /// <summary>
         /// ˆê——ƒf�[ƒ^•\Ž¦�ˆ—�
@@ -744,10 +637,16 @@
             strSQL.Append(" '–¢’è',");
             strSQL.Append(" '–¢’è',");
             strSQL.Append(" B.CONSTRUCTIONSTATUSFLG,");
-            strSQL.Append(" DEP.DEPARTMENTCODE,");
-            strSQL.Append(" DEP.DISPLAYORDER,");
+            strSQL.Append(" B.SalesDepCode,");
+            strSQL.Append(" ifnull(DEP.DISPLAYORDER, 99999),");
             strSQL.Append(" PERSON.DISPLAYORDER");
-            strSQL.Append(" FROM ESTIMATEDATA A, CONSTRUCTIONBASEINFO B, CONSTRUCTIONBASEINFODETAIL C, DEPARTMENTMASTER DEP, PERSONINCHARGEMASTER PERSON");
+            strSQL.Append(" FROM ESTIMATEDATA A");
+            strSQL.Append(", CONSTRUCTIONBASEINFO B");
+            strSQL.Append(" Left Join DEPARTMENTMASTER DEP On DEP.DepartmentCode = B.SalesDepCode");
+            strSQL.Append(" Left Join CONSTRUCTIONBASEINFODETAIL DepName On DepName.CONSTRUCTIONCODE = B.CONSTRUCTIONCODE");
+            strSQL.AppendFormat(" And DepName.DetailNo = {0}", (int)ConstructionBaseInfoDetail.DataNoDef.SalesDepartmentName);
+            strSQL.Append(", CONSTRUCTIONBASEINFODETAIL C");
+            strSQL.Append(", PERSONINCHARGEMASTER PERSON");
             strSQL.Append(" WHERE A.LINECOUNT = 1");
             strSQL.AppendFormat(" AND NOT EXISTS(SELECT * FROM PROCESSAPPROVAL APP WHERE APP.CONSTRUCTIONCODE = A.CONSTRUCTIONCODE AND APP.ApprovalCode = {0})", m_ApprovalCode);
             strSQL.Append(" AND A.CONSTRUCTIONCODE = B.CONSTRUCTIONCODE");
@@ -755,9 +654,13 @@
             strSQL.AppendFormat(" AND B.CONSTRUCTIONSTATUSFLG <= {0}", ProgressComplete);
             strSQL.AppendFormat(" AND (A.CONSTRUCTIONCODE = C.CONSTRUCTIONCODE AND C.DetailNo = {0})", (int)ConstructionBaseInfoDetail.DataNoDef.ConstructionName);
             strSQL.Append(" AND B.SALESPERSONCODE = PERSON.PERSONCODE");
-            strSQL.Append(" AND PERSON.DEPARTMENTCODE = DEP.DEPARTMENTCODE");
-            if (DepartmentCode != 0) strSQL.AppendFormat(" AND DEP.DEPARTMENTCODE = {0}", DepartmentCode);
-            if (PersonCode != 0) strSQL.AppendFormat(" AND PERSON.PERSONCODE = {0}", PersonCode);
+            if (DepartmentCode != 0)
+            {
+                strSQL.AppendFormat(" AND (B.SalesDepCode = {0}", DepartmentCode);
+                strSQL.AppendFormat(" AND DepName.DetailString = '{0}')", cmbDepartment.Text);
+            }
+            if (PersonCode != 0) strSQL.AppendFormat(" AND B.SALESPERSONCODE = {0}", PersonCode);
+
             strSQL.Append(wrkSec.ToString());
 
             strSQL.Append(" UNION SELECT");
@@ -767,24 +670,30 @@
             strSQL.Append(" C.DETAILSTRING,");
             strSQL.Append(" A.APPROVALSTATUS,");
             strSQL.Append(" PERSON.PERSONNAME,");
-            //strSQL.Append(" TO_CHAR(A.ENTRYDATE,'YYYY/MM/DD'),");
-            //strSQL.Append(" TO_CHAR(A.APPROVALLIMITDATES,'YYYY/MM/DD'),");
             strSQL.Append(" DATE_FORMAT(A.ENTRYDATE,'%Y/%m/%d'),");
             strSQL.Append(" DATE_FORMAT(A.APPROVALLIMITDATES,'%Y/%m/%d'),");
             strSQL.Append(" B.CONSTRUCTIONSTATUSFLG,");
-            strSQL.Append(" DEP.DEPARTMENTCODE,");
-            strSQL.Append(" DEP.DISPLAYORDER,");
+            strSQL.Append(" B.SalesDepCode,");
+            strSQL.Append(" ifnull(DEP.DISPLAYORDER, 99999),");
             strSQL.Append(" PERSON.DISPLAYORDER");
-            strSQL.Append(" FROM PROCESSAPPROVAL A, CONSTRUCTIONBASEINFO B, CONSTRUCTIONBASEINFODETAIL C, DEPARTMENTMASTER DEP, PERSONINCHARGEMASTER PERSON");
-
+            strSQL.Append(" FROM PROCESSAPPROVAL A");
+            strSQL.Append(", CONSTRUCTIONBASEINFO B");
+            strSQL.Append(" Left Join DEPARTMENTMASTER DEP On DEP.DepartmentCode = B.SalesDepCode");
+            strSQL.Append(" Left Join CONSTRUCTIONBASEINFODETAIL DepName On DepName.CONSTRUCTIONCODE = B.CONSTRUCTIONCODE");
+            strSQL.AppendFormat(" And DepName.DetailNo = {0}", (int)ConstructionBaseInfoDetail.DataNoDef.SalesDepartmentName);
+            strSQL.Append(", CONSTRUCTIONBASEINFODETAIL C");
+            strSQL.Append(", PERSONINCHARGEMASTER PERSON");
             strSQL.AppendFormat(" WHERE A.APPROVALCODE = {0} AND A.SEQNO = 1", m_ApprovalCode);
             strSQL.Append(" AND A.CONSTRUCTIONCODE = B.CONSTRUCTIONCODE");
             strSQL.AppendFormat(" AND B.CONSTRUCTIONPERIOD = {0}", numUDConstPro.Value);
             strSQL.AppendFormat(" AND (B.CONSTRUCTIONCODE = C.CONSTRUCTIONCODE AND C.DetailNo = {0})", (int)ConstructionBaseInfoDetail.DataNoDef.ConstructionName);
             strSQL.Append(" AND B.SALESPERSONCODE = PERSON.PERSONCODE");
-            strSQL.Append(" AND PERSON.DEPARTMENTCODE = DEP.DEPARTMENTCODE");
-            if (DepartmentCode != 0) strSQL.AppendFormat(" AND DEP.DEPARTMENTCODE = {0}", DepartmentCode);
-            if (PersonCode != 0) strSQL.AppendFormat(" AND PERSON.PERSONCODE = {0}", PersonCode);
+            if (DepartmentCode != 0)
+            {
+                strSQL.AppendFormat(" AND (B.SalesDepCode = {0}", DepartmentCode);
+                strSQL.AppendFormat(" AND DepName.DetailString = '{0}')", cmbDepartment.Text);
+            }
+            if (PersonCode != 0) strSQL.AppendFormat(" AND B.SALESPERSONCODE = {0}", PersonCode);
             strSQL.Append(wrkSec.ToString());
             strSQL.AppendFormat(" ORDER BY {0} ASC, {1} ASC, {2} ASC, {3} ASC, {4} ASC",
                                                 ((int)GetDataColumns.ApprovalCode + 1),
@@ -824,10 +733,16 @@
             strSQL.Append(" '–¢’è',");
             strSQL.Append(" '–¢’è',");
             strSQL.Append(" B.CONSTRUCTIONSTATUSFLG,");
-            strSQL.Append(" DEP.DEPARTMENTCODE,");
-            strSQL.Append(" DEP.DISPLAYORDER,");
+            strSQL.Append(" B.SalesDepCode,");
+            strSQL.Append(" ifnull(DEP.DISPLAYORDER, 99999),");
             strSQL.Append(" PERSON.DISPLAYORDER");
-            strSQL.Append(" FROM ESTIMATEBUDGET A, CONSTRUCTIONBASEINFO B, CONSTRUCTIONBASEINFODETAIL C, DEPARTMENTMASTER DEP, PERSONINCHARGEMASTER PERSON");
+            strSQL.Append(" FROM ESTIMATEDATA A");
+            strSQL.Append(", CONSTRUCTIONBASEINFO B");
+            strSQL.Append(" Left Join DEPARTMENTMASTER DEP On DEP.DepartmentCode = B.SalesDepCode");
+            strSQL.Append(" Left Join CONSTRUCTIONBASEINFODETAIL DepName On DepName.CONSTRUCTIONCODE = B.CONSTRUCTIONCODE");
+            strSQL.AppendFormat(" And DepName.DetailNo = {0}", (int)ConstructionBaseInfoDetail.DataNoDef.SalesDepartmentName);
+            strSQL.Append(", CONSTRUCTIONBASEINFODETAIL C");
+            strSQL.Append(", PERSONINCHARGEMASTER PERSON");
             strSQL.AppendFormat(" WHERE NOT EXISTS(SELECT * FROM PROCESSAPPROVAL APP WHERE APP.CONSTRUCTIONCODE = A.CONSTRUCTIONCODE AND APP.ApprovalCode = {0})", m_ApprovalCode);
             strSQL.Append(" AND A.CONSTRUCTIONCODE = B.CONSTRUCTIONCODE");
             strSQL.AppendFormat(" AND B.CONSTRUCTIONPERIOD = {0}", numUDConstPro.Value);
@@ -834,9 +749,12 @@
             strSQL.AppendFormat(" AND B.CONSTRUCTIONSTATUSFLG <= {0}", ProgressComplete);
             strSQL.AppendFormat(" AND (A.CONSTRUCTIONCODE = C.CONSTRUCTIONCODE AND C.DetailNo = {0})", (int)ConstructionBaseInfoDetail.DataNoDef.ConstructionName);
             strSQL.Append(" AND B.SALESPERSONCODE = PERSON.PERSONCODE");
-            strSQL.Append(" AND PERSON.DEPARTMENTCODE = DEP.DEPARTMENTCODE");
-            if (DepartmentCode != 0) strSQL.AppendFormat(" AND DEP.DEPARTMENTCODE = {0}", DepartmentCode);
-            if (PersonCode != 0) strSQL.AppendFormat(" AND PERSON.PERSONCODE = {0}", PersonCode);
+            if (DepartmentCode != 0)
+            {
+                strSQL.AppendFormat(" AND (B.SalesDepCode = {0}", DepartmentCode);
+                strSQL.AppendFormat(" AND DepName.DetailString = '{0}')", cmbDepartment.Text);
+            }
+            if (PersonCode != 0) strSQL.AppendFormat(" AND B.SALESPERSONCODE = {0}", PersonCode);
             strSQL.Append(wrkSec.ToString());
 
             strSQL.Append(" UNION SELECT");
@@ -846,24 +764,30 @@
             strSQL.Append(" C.DETAILSTRING,");
             strSQL.Append(" A.APPROVALSTATUS,");
             strSQL.Append(" PERSON.PERSONNAME,");
-            //strSQL.Append(" TO_CHAR(A.ENTRYDATE,'YYYY/MM/DD'),");
-            //strSQL.Append(" TO_CHAR(A.APPROVALLIMITDATES,'YYYY/MM/DD'),");
             strSQL.Append(" DATE_FORMAT(A.ENTRYDATE,'%Y/%m/%d'),");
             strSQL.Append(" DATE_FORMAT(A.APPROVALLIMITDATES,'%Y/%m/%d'),");
             strSQL.Append(" B.CONSTRUCTIONSTATUSFLG,");
-            strSQL.Append(" DEP.DEPARTMENTCODE,");
-            strSQL.Append(" DEP.DISPLAYORDER,");
+            strSQL.Append(" B.SalesDepCode,");
+            strSQL.Append(" ifnull(DEP.DISPLAYORDER, 99999),");
             strSQL.Append(" PERSON.DISPLAYORDER");
-            strSQL.Append(" FROM PROCESSAPPROVAL A, CONSTRUCTIONBASEINFO B, CONSTRUCTIONBASEINFODETAIL C, DEPARTMENTMASTER DEP, PERSONINCHARGEMASTER PERSON");
-
+            strSQL.Append(" FROM PROCESSAPPROVAL A");
+            strSQL.Append(", CONSTRUCTIONBASEINFO B");
+            strSQL.Append(" Left Join DEPARTMENTMASTER DEP On DEP.DepartmentCode = B.SalesDepCode");
+            strSQL.Append(" Left Join CONSTRUCTIONBASEINFODETAIL DepName On DepName.CONSTRUCTIONCODE = B.CONSTRUCTIONCODE");
+            strSQL.AppendFormat(" And DepName.DetailNo = {0}", (int)ConstructionBaseInfoDetail.DataNoDef.SalesDepartmentName);
+            strSQL.Append(", CONSTRUCTIONBASEINFODETAIL C");
+            strSQL.Append(", PERSONINCHARGEMASTER PERSON");
             strSQL.AppendFormat(" WHERE A.APPROVALCODE = {0} AND A.SEQNO = 1", m_ApprovalCode);
             strSQL.Append(" AND A.CONSTRUCTIONCODE = B.CONSTRUCTIONCODE");
             strSQL.AppendFormat(" AND B.CONSTRUCTIONPERIOD = {0}", numUDConstPro.Value);
             strSQL.AppendFormat(" AND (B.CONSTRUCTIONCODE = C.CONSTRUCTIONCODE AND C.DetailNo = {0})", (int)ConstructionBaseInfoDetail.DataNoDef.ConstructionName);
             strSQL.Append(" AND B.SALESPERSONCODE = PERSON.PERSONCODE");
-            strSQL.Append(" AND PERSON.DEPARTMENTCODE = DEP.DEPARTMENTCODE");
-            if (DepartmentCode != 0) strSQL.AppendFormat(" AND DEP.DEPARTMENTCODE = {0}", DepartmentCode);
-            if (PersonCode != 0) strSQL.AppendFormat(" AND PERSON.PERSONCODE = {0}", PersonCode);
+            if (DepartmentCode != 0)
+            {
+                strSQL.AppendFormat(" AND (B.SalesDepCode = {0}", DepartmentCode);
+                strSQL.AppendFormat(" AND DepName.DetailString = '{0}')", cmbDepartment.Text);
+            }
+            if (PersonCode != 0) strSQL.AppendFormat(" AND B.SALESPERSONCODE = {0}", PersonCode);
             strSQL.Append(wrkSec.ToString());
             strSQL.AppendFormat(" ORDER BY {0} ASC, {1} ASC, {2} ASC, {3} ASC, {4} ASC",
                                                 ((int)GetDataColumns.ApprovalCode + 1),
@@ -903,10 +827,16 @@
             strSQL.Append(" '–¢’è',");
             strSQL.Append(" '–¢’è',");
             strSQL.Append(" B.CONSTRUCTIONSTATUSFLG,");
-            strSQL.Append(" DEP.DEPARTMENTCODE,");
-            strSQL.Append(" DEP.DISPLAYORDER,");
+            strSQL.Append(" B.ConstrDepCode,");
+            strSQL.Append(" ifnull(DEP.DISPLAYORDER, 99999),");
             strSQL.Append(" PERSON.DISPLAYORDER");
-            strSQL.Append(" FROM CONSTRUCTIONBUDGET A, CONSTRUCTIONBASEINFO B, CONSTRUCTIONBASEINFODETAIL C, DEPARTMENTMASTER DEP, PERSONINCHARGEMASTER PERSON");
+            strSQL.Append(" FROM CONSTRUCTIONBUDGET A");
+            strSQL.Append(", CONSTRUCTIONBASEINFO B");
+            strSQL.Append(" LEFT JOIN DEPARTMENTMASTER DEP On DEP.DEPARTMENTCODE = B.ConstrDepCode");
+            strSQL.Append(" Left Join CONSTRUCTIONBASEINFODETAIL DepName On DepName.CONSTRUCTIONCODE = B.CONSTRUCTIONCODE");
+            strSQL.AppendFormat(" And DepName.DetailNo = {0}", (int)ConstructionBaseInfoDetail.DataNoDef.ConstrDepartmentName);
+            strSQL.Append(", CONSTRUCTIONBASEINFODETAIL C");
+            strSQL.Append(", PERSONINCHARGEMASTER PERSON");
             strSQL.AppendFormat(" WHERE NOT EXISTS(SELECT * FROM PROCESSAPPROVAL APP WHERE APP.CONSTRUCTIONCODE = A.CONSTRUCTIONCODE AND APP.ApprovalCode = {0})", m_ApprovalCode);
             strSQL.Append(" AND A.CONSTRUCTIONCODE = B.CONSTRUCTIONCODE");
             strSQL.AppendFormat(" AND B.CONSTRUCTIONPERIOD = {0}", numUDConstPro.Value);
@@ -913,9 +843,12 @@
             strSQL.AppendFormat(" AND B.CONSTRUCTIONSTATUSFLG <= {0}", ProgressComplete);
             strSQL.AppendFormat(" AND (A.CONSTRUCTIONCODE = C.CONSTRUCTIONCODE AND C.DetailNo = {0})", (int)ConstructionBaseInfoDetail.DataNoDef.ConstructionName);
             strSQL.Append(" AND B.CONSTRUCTIONPERSONCODE = PERSON.PERSONCODE");
-            strSQL.Append(" AND PERSON.DEPARTMENTCODE = DEP.DEPARTMENTCODE");
-            if (DepartmentCode != 0) strSQL.AppendFormat(" AND DEP.DEPARTMENTCODE = {0}", DepartmentCode);
-            if (PersonCode != 0) strSQL.AppendFormat(" AND PERSON.PERSONCODE = {0}", PersonCode);
+            if (DepartmentCode != 0)
+            {
+                strSQL.AppendFormat(" AND (B.ConstrDepCode = {0}", DepartmentCode);
+                strSQL.AppendFormat(" AND DepName.DetailString = '{0}')", cmbDepartment.Text);
+            }
+            if (PersonCode != 0) strSQL.AppendFormat(" AND B.ConstructionPersonCode = {0}", PersonCode);
             strSQL.Append(wrkSec.ToString());
 
             strSQL.Append(" UNION SELECT");
@@ -925,24 +858,30 @@
             strSQL.Append(" C.DETAILSTRING,");
             strSQL.Append(" A.APPROVALSTATUS,");
             strSQL.Append(" PERSON.PERSONNAME,");
-            //strSQL.Append(" TO_CHAR(A.ENTRYDATE,'YYYY/MM/DD'),");
-            //strSQL.Append(" TO_CHAR(A.APPROVALLIMITDATES,'YYYY/MM/DD'),");
             strSQL.Append(" DATE_FORMAT(A.ENTRYDATE,'%Y/%m/%d'),");
             strSQL.Append(" DATE_FORMAT(A.APPROVALLIMITDATES,'%Y/%m/%d'),");
             strSQL.Append(" B.CONSTRUCTIONSTATUSFLG,");
-            strSQL.Append(" DEP.DEPARTMENTCODE,");
-            strSQL.Append(" DEP.DISPLAYORDER,");
+            strSQL.Append(" B.ConstrDepCode,");
+            strSQL.Append(" ifnull(DEP.DISPLAYORDER, 99999),");
             strSQL.Append(" PERSON.DISPLAYORDER");
-            strSQL.Append(" FROM PROCESSAPPROVAL A, CONSTRUCTIONBASEINFO B, CONSTRUCTIONBASEINFODETAIL C, DEPARTMENTMASTER DEP, PERSONINCHARGEMASTER PERSON");
-
+            strSQL.Append(" FROM PROCESSAPPROVAL A");
+            strSQL.Append(", CONSTRUCTIONBASEINFO B");
+            strSQL.Append(" LEFT JOIN DEPARTMENTMASTER DEP On DEP.DEPARTMENTCODE = B.ConstrDepCode");
+            strSQL.Append(" Left Join CONSTRUCTIONBASEINFODETAIL DepName On DepName.CONSTRUCTIONCODE = B.CONSTRUCTIONCODE");
+            strSQL.AppendFormat(" And DepName.DetailNo = {0}", (int)ConstructionBaseInfoDetail.DataNoDef.ConstrDepartmentName);
+            strSQL.Append(", CONSTRUCTIONBASEINFODETAIL C");
+            strSQL.Append(", PERSONINCHARGEMASTER PERSON");
             strSQL.AppendFormat(" WHERE A.APPROVALCODE = {0} AND A.SEQNO = 1", m_ApprovalCode);
             strSQL.Append(" AND A.CONSTRUCTIONCODE = B.CONSTRUCTIONCODE");
             strSQL.AppendFormat(" AND B.CONSTRUCTIONPERIOD = {0}", numUDConstPro.Value);
             strSQL.AppendFormat(" AND (B.CONSTRUCTIONCODE = C.CONSTRUCTIONCODE AND C.DetailNo = {0})", (int)ConstructionBaseInfoDetail.DataNoDef.ConstructionName);
             strSQL.Append(" AND B.CONSTRUCTIONPERSONCODE = PERSON.PERSONCODE");
-            strSQL.Append(" AND PERSON.DEPARTMENTCODE = DEP.DEPARTMENTCODE");
-            if (DepartmentCode != 0) strSQL.AppendFormat(" AND DEP.DEPARTMENTCODE = {0}", DepartmentCode);
-            if (PersonCode != 0) strSQL.AppendFormat(" AND PERSON.PERSONCODE = {0}", PersonCode);
+            if (DepartmentCode != 0)
+            {
+                strSQL.AppendFormat(" AND (B.ConstrDepCode = {0}", DepartmentCode);
+                strSQL.AppendFormat(" AND DepName.DetailString = '{0}')", cmbDepartment.Text);
+            }
+            if (PersonCode != 0) strSQL.AppendFormat(" AND B.ConstructionPersonCode = {0}", PersonCode);
             strSQL.Append(wrkSec.ToString());
             strSQL.AppendFormat(" ORDER BY {0} ASC, {1} ASC, {2} ASC, {3} ASC, {4} ASC",
                                                 ((int)GetDataColumns.ApprovalCode + 1),
@@ -982,10 +921,17 @@
             strSQL.Append(" '–¢’è',");
             strSQL.Append(" '–¢’è',");
             strSQL.Append(" B.CONSTRUCTIONSTATUSFLG,");
-            strSQL.Append(" DEP.DEPARTMENTCODE,");
-            strSQL.Append(" DEP.DISPLAYORDER,");
+            strSQL.Append(" B.ConstrDepCode,");
+            strSQL.Append(" ifnull(DEP.DISPLAYORDER, 99999),");
             strSQL.Append(" PERSON.DISPLAYORDER");
-            strSQL.Append(" FROM PURCHASEORDER A, CONSTRUCTIONBASEINFO B, CONSTRUCTIONBASEINFODETAIL C, DEPARTMENTMASTER DEP, PERSONINCHARGEMASTER PERSON");
+            strSQL.AppendFormat(" FROM PURCHASEORDER A");
+            strSQL.AppendFormat(", CONSTRUCTIONBASEINFO B");
+            strSQL.AppendFormat(" LEFT JOIN DEPARTMENTMASTER DEP On DEP.DepartmentCode = B.ConstrDepCode");
+            strSQL.Append(" Left Join CONSTRUCTIONBASEINFODETAIL DepName On DepName.CONSTRUCTIONCODE = B.CONSTRUCTIONCODE");
+            strSQL.AppendFormat(" And DepName.DetailNo = {0}", (int)ConstructionBaseInfoDetail.DataNoDef.ConstrDepartmentName);
+            strSQL.AppendFormat(", CONSTRUCTIONBASEINFODETAIL C");
+            strSQL.AppendFormat(", PERSONINCHARGEMASTER PERSON");
+
             strSQL.AppendFormat(" WHERE NOT EXISTS(SELECT * FROM PROCESSAPPROVAL APP WHERE APP.CONSTRUCTIONCODE = A.CONSTRUCTIONCODE AND APP.ApprovalCode = {0})", m_ApprovalCode);
             strSQL.Append(" AND A.CONSTRUCTIONCODE = B.CONSTRUCTIONCODE");
             strSQL.AppendFormat(" AND B.CONSTRUCTIONPERIOD = {0}", numUDConstPro.Value);
@@ -992,9 +938,12 @@
             strSQL.AppendFormat(" AND B.CONSTRUCTIONSTATUSFLG <= {0}", ProgressComplete);
             strSQL.AppendFormat(" AND (A.CONSTRUCTIONCODE = C.CONSTRUCTIONCODE AND C.DetailNo = {0})", (int)ConstructionBaseInfoDetail.DataNoDef.ConstructionName);
             strSQL.Append(" AND B.CONSTRUCTIONPERSONCODE = PERSON.PERSONCODE");
-            strSQL.Append(" AND PERSON.DEPARTMENTCODE = DEP.DEPARTMENTCODE");
-            if (DepartmentCode != 0) strSQL.AppendFormat(" AND DEP.DEPARTMENTCODE = {0}", DepartmentCode);
-            if (PersonCode != 0) strSQL.AppendFormat(" AND PERSON.PERSONCODE = {0}", PersonCode);
+            if (DepartmentCode != 0)
+            {
+                strSQL.AppendFormat(" AND (B.ConstrDepCode = {0}", DepartmentCode);
+                strSQL.AppendFormat(" AND DepName.DetailString = '{0}')", cmbDepartment.Text);
+            }
+            if (PersonCode != 0) strSQL.AppendFormat(" AND B.ConstructionPersonCode = {0}", PersonCode);
             strSQL.Append(wrkSec.ToString());
 
             strSQL.Append(" UNION SELECT");
@@ -1004,15 +953,19 @@
             strSQL.Append(" C.DETAILSTRING,");
             strSQL.Append(" A.APPROVALSTATUS,");
             strSQL.Append(" PERSON.PERSONNAME,");
-            //strSQL.Append(" TO_CHAR(A.ENTRYDATE,'YYYY/MM/DD'),");
-            //strSQL.Append(" TO_CHAR(A.APPROVALLIMITDATES,'YYYY/MM/DD'),");
             strSQL.Append(" DATE_FORMAT(A.ENTRYDATE,'%Y/%m/%d'),");
             strSQL.Append(" DATE_FORMAT(A.APPROVALLIMITDATES,'%Y/%m/%d'),");
             strSQL.Append(" B.CONSTRUCTIONSTATUSFLG,");
-            strSQL.Append(" DEP.DEPARTMENTCODE,");
-            strSQL.Append(" DEP.DISPLAYORDER,");
+            strSQL.Append(" B.ConstrDepCode,");
+            strSQL.Append(" ifnull(DEP.DISPLAYORDER, 99999),");
             strSQL.Append(" PERSON.DISPLAYORDER");
-            strSQL.Append(" FROM PROCESSAPPROVAL A, CONSTRUCTIONBASEINFO B, CONSTRUCTIONBASEINFODETAIL C, DEPARTMENTMASTER DEP, PERSONINCHARGEMASTER PERSON");
+            strSQL.Append(" FROM PROCESSAPPROVAL A");
+            strSQL.Append(" , CONSTRUCTIONBASEINFO B");
+            strSQL.Append(" LEFT JOIN DEPARTMENTMASTER DEP On DEP.DepartmentCode = B.ConstrDepCode");
+            strSQL.Append(" Left Join CONSTRUCTIONBASEINFODETAIL DepName On DepName.CONSTRUCTIONCODE = B.CONSTRUCTIONCODE");
+            strSQL.AppendFormat(" And DepName.DetailNo = {0}", (int)ConstructionBaseInfoDetail.DataNoDef.ConstrDepartmentName);
+            strSQL.Append(" , CONSTRUCTIONBASEINFODETAIL C");
+            strSQL.Append(" , PERSONINCHARGEMASTER PERSON");
 
             strSQL.AppendFormat(" WHERE A.APPROVALCODE = {0} AND A.SEQNO = 1", m_ApprovalCode);
             strSQL.Append(" AND A.CONSTRUCTIONCODE = B.CONSTRUCTIONCODE");
@@ -1019,9 +972,12 @@
             strSQL.AppendFormat(" AND B.CONSTRUCTIONPERIOD = {0}", numUDConstPro.Value);
             strSQL.AppendFormat(" AND (B.CONSTRUCTIONCODE = C.CONSTRUCTIONCODE AND C.DetailNo = {0})", (int)ConstructionBaseInfoDetail.DataNoDef.ConstructionName);
             strSQL.Append(" AND B.CONSTRUCTIONPERSONCODE = PERSON.PERSONCODE");
-            strSQL.Append(" AND PERSON.DEPARTMENTCODE = DEP.DEPARTMENTCODE");
-            if (DepartmentCode != 0) strSQL.AppendFormat(" AND DEP.DEPARTMENTCODE = {0}", DepartmentCode);
-            if (PersonCode != 0) strSQL.AppendFormat(" AND PERSON.PERSONCODE = {0}", PersonCode);
+            if (DepartmentCode != 0)
+            {
+                strSQL.AppendFormat(" AND (B.ConstrDepCode = {0}", DepartmentCode);
+                strSQL.AppendFormat(" AND DepName.DetailString = '{0}')", cmbDepartment.Text);
+            }
+            if (PersonCode != 0) strSQL.AppendFormat(" AND B.ConstructionPersonCode = {0}", PersonCode);
             strSQL.Append(wrkSec.ToString());
             strSQL.AppendFormat(" ORDER BY {0} ASC, {1} ASC, {2} ASC, {3} ASC",
                                                 ((int)GetDataColumns.ApprovalCode + 1),
@@ -1061,13 +1017,15 @@
             strSQL.Append(" '–¢’è',");
             strSQL.Append(" '–¢’è',");
             strSQL.Append(" B.CONSTRUCTIONSTATUSFLG,");
-            strSQL.Append(" DEP.DEPARTMENTCODE,");
-            strSQL.Append(" DEP.DISPLAYORDER,");
+            strSQL.Append(" B.ConstrDepCode,");
+            strSQL.Append(" ifnull(DEP.DISPLAYORDER, 99999),");
             strSQL.Append(" PERSON.DISPLAYORDER");
             strSQL.Append(" FROM PURCHASEORDER A");
             strSQL.Append(", CONSTRUCTIONBASEINFO B");
+            strSQL.Append(" LEFT JOIN DEPARTMENTMASTER DEP  On DEP.DepartmentCode = B.ConstrDepCode");
+            strSQL.Append(" Left Join CONSTRUCTIONBASEINFODETAIL DepName On DepName.CONSTRUCTIONCODE = B.CONSTRUCTIONCODE");
+            strSQL.AppendFormat(" And DepName.DetailNo = {0}", (int)ConstructionBaseInfoDetail.DataNoDef.ConstrDepartmentName);
             strSQL.Append(", CONSTRUCTIONBASEINFODETAIL C");
-            strSQL.Append(", DEPARTMENTMASTER DEP");
             strSQL.Append(", PERSONINCHARGEMASTER PERSON");
             strSQL.Append(", requestdata AS Req");
             strSQL.AppendFormat(" WHERE NOT EXISTS(SELECT * FROM PROCESSAPPROVAL APP WHERE APP.CONSTRUCTIONCODE = A.CONSTRUCTIONCODE AND APP.ApprovalCode = {0})", m_ApprovalCode);
@@ -1077,10 +1035,13 @@
             strSQL.AppendFormat(" AND B.BillingSplitFlg = {0}", m_AllPurposeKinds);
             strSQL.AppendFormat(" AND (A.CONSTRUCTIONCODE = C.CONSTRUCTIONCODE AND C.DetailNo = {0})", (int)ConstructionBaseInfoDetail.DataNoDef.ConstructionName);
             strSQL.Append(" AND B.CONSTRUCTIONPERSONCODE = PERSON.PERSONCODE");
-            strSQL.Append(" AND PERSON.DEPARTMENTCODE = DEP.DEPARTMENTCODE");
             strSQL.Append(" AND Req.MAINCONSTRUCTIONCODE = A.ConstructionCode");
-            if (DepartmentCode != 0) strSQL.AppendFormat(" AND DEP.DEPARTMENTCODE = {0}", DepartmentCode);
-            if (PersonCode != 0) strSQL.AppendFormat(" AND PERSON.PERSONCODE = {0}", PersonCode);
+            if (DepartmentCode != 0)
+            {
+                strSQL.AppendFormat(" AND (B.ConstrDepCode = {0}", DepartmentCode);
+                strSQL.AppendFormat(" AND DepName.DetailString = '{0}')", cmbDepartment.Text);
+            }
+            if (PersonCode != 0) strSQL.AppendFormat(" AND B.ConstructionPersonCode = {0}", PersonCode);
             strSQL.Append(wrkSec.ToString());
 
             strSQL.Append(" UNION SELECT");
@@ -1090,15 +1051,19 @@
             strSQL.Append(" C.DETAILSTRING,");
             strSQL.Append(" A.APPROVALSTATUS,");
             strSQL.Append(" PERSON.PERSONNAME,");
-            //strSQL.Append(" TO_CHAR(A.ENTRYDATE,'YYYY/MM/DD'),");
-            //strSQL.Append(" TO_CHAR(A.APPROVALLIMITDATES,'YYYY/MM/DD'),");
             strSQL.Append(" DATE_FORMAT(A.ENTRYDATE,'%Y/%m/%d'),");
             strSQL.Append(" DATE_FORMAT(A.APPROVALLIMITDATES,'%Y/%m/%d'),");
             strSQL.Append(" B.CONSTRUCTIONSTATUSFLG,");
-            strSQL.Append(" DEP.DEPARTMENTCODE,");
-            strSQL.Append(" DEP.DISPLAYORDER,");
+            strSQL.Append(" B.ConstrDepCode,");
+            strSQL.Append(" ifnull(DEP.DISPLAYORDER, 99999),");
             strSQL.Append(" PERSON.DISPLAYORDER");
-            strSQL.Append(" FROM PROCESSAPPROVAL A, CONSTRUCTIONBASEINFO B, CONSTRUCTIONBASEINFODETAIL C, DEPARTMENTMASTER DEP, PERSONINCHARGEMASTER PERSON");
+            strSQL.Append(" FROM PROCESSAPPROVAL A");
+            strSQL.Append(", CONSTRUCTIONBASEINFO B");
+            strSQL.Append(" LEFT JOIN DEPARTMENTMASTER DEP  On DEP.DepartmentCode = B.ConstrDepCode");
+            strSQL.Append(" Left Join CONSTRUCTIONBASEINFODETAIL DepName On DepName.CONSTRUCTIONCODE = B.CONSTRUCTIONCODE");
+            strSQL.AppendFormat(" And DepName.DetailNo = {0}", (int)ConstructionBaseInfoDetail.DataNoDef.ConstrDepartmentName);
+            strSQL.Append(", CONSTRUCTIONBASEINFODETAIL C");
+            strSQL.Append(", PERSONINCHARGEMASTER PERSON");
 
             strSQL.AppendFormat(" WHERE A.APPROVALCODE = {0} AND A.SEQNO = 1", m_ApprovalCode);
             strSQL.Append(" AND A.CONSTRUCTIONCODE = B.CONSTRUCTIONCODE");
@@ -1107,8 +1072,12 @@
             strSQL.AppendFormat(" AND (B.CONSTRUCTIONCODE = C.CONSTRUCTIONCODE AND C.DetailNo = {0})", (int)ConstructionBaseInfoDetail.DataNoDef.ConstructionName);
             strSQL.Append(" AND B.CONSTRUCTIONPERSONCODE = PERSON.PERSONCODE");
             strSQL.Append(" AND PERSON.DEPARTMENTCODE = DEP.DEPARTMENTCODE");
-            if (DepartmentCode != 0) strSQL.AppendFormat(" AND DEP.DEPARTMENTCODE = {0}", DepartmentCode);
-            if (PersonCode != 0) strSQL.AppendFormat(" AND PERSON.PERSONCODE = {0}", PersonCode);
+            if (DepartmentCode != 0)
+            {
+                strSQL.AppendFormat(" AND (B.ConstrDepCode = {0}", DepartmentCode);
+                strSQL.AppendFormat(" AND DepName.DetailString = '{0}')", cmbDepartment.Text);
+            }
+            if (PersonCode != 0) strSQL.AppendFormat(" AND B.ConstructionPersonCode = {0}", PersonCode);
             strSQL.Append(wrkSec.ToString());
             strSQL.AppendFormat(" ORDER BY {0} ASC, {1} ASC, {2} ASC, {3} ASC",
                                                 ((int)GetDataColumns.ApprovalCode + 1),
@@ -1232,51 +1201,6 @@
         }
         #endregion
 
-        #region ’S“–ŽÒƒRƒ“ƒ{ƒ{ƒbƒNƒXƒZƒbƒgŽž•”��‚ðƒZƒbƒg‚·‚é
-        /// <summary>
-        /// ’S“–ŽÒƒRƒ“ƒ{ƒ{ƒbƒNƒXƒZƒbƒgŽž•”��‚ðƒZƒbƒg‚·‚é
-        /// </summary>
-        /// <returns></returns>
-        private bool SetPerosonToDepartment()
-        {
-            IOMPersonInCharge PersonDB = new IOMPersonInCharge();
-            try
-            {
-                // ƒRƒ“ƒ{ƒ{ƒbƒNƒX‚æ‚è‘I‘ð’S“–ŽÒ‚ðŽæ“¾‚·‚é
-                int PersonCode = GetConstructionPersonCode();
-                if (PersonCode < 1) return false;
-
-                int DepartmentCode = GetDepartmentCode();
-
-                string strSQL = PersonDB.CreatePrimarykeyString(PersonCode);
-                PersonInChargeMaster PersonRec = new PersonInChargeMaster();
-                PersonDB.SelectAction(strSQL, ref PersonRec);
-
-                // •”��ƒRƒ“ƒ{ƒ{ƒbƒNƒX‚Ö•”��ƒR�[ƒhƒZƒbƒg
-                if (PersonRec.DepartmentCode > 0 && DepartmentCode != PersonRec.DepartmentCode)
-                {
-                    bool bSave = m_bInitFlg;
-                    m_bInitFlg = true;
-                    cmbDepartment.SelectedValue = PersonRec.DepartmentCode;
-                    SetcmbPersons();    // ’S“–ŽÒƒRƒ“ƒ{ƒ{ƒbƒNƒX•Ï�X
-                    cmbConstructionPerson.SelectedValue = PersonCode;
-                    m_bInitFlg = bSave;
-                }
-
-                return true;
-            }
-            catch (Exception ex)
-            {
-                logger.ErrorFormat("ƒVƒXƒeƒ€ƒGƒ‰�[�F{0}�F{1}", CommonMotions.GetMethodName(), ex.Message);
-                return false;
-            }
-            finally
-            {
-                PersonDB.close(); PersonDB = null;
-            }
-        }
-        #endregion
-
         #region ‘Î�Û”N“x�‰ŠúƒZƒbƒg
         /// <summary>
         /// ‘Î�Û”N“x�‰ŠúƒZƒbƒg
@@ -1349,5 +1273,63 @@
         }
         #endregion
 
+        #region ’S“–ŽÒƒRƒ“ƒ{ƒ{ƒbƒNƒXƒZƒbƒgŽž•”��‚ðƒZƒbƒg‚·‚é
+        /// <summary>
+        /// ’S“–ŽÒƒRƒ“ƒ{ƒ{ƒbƒNƒXƒZƒbƒgŽž•”��‚ðƒZƒbƒg‚·‚é
+        /// </summary>
+        /// <returns></returns>
+        private bool SetPerosonToDepartment()
+        {
+            IOMPersonInCharge PersonDB = new IOMPersonInCharge();
+            try
+            {
+                cmbDepartment.SelectedIndexChanged -= new EventHandler(cmbDepartment_SelectedIndexChanged);
+                cmbConstructionPerson.SelectedIndexChanged -= new EventHandler(cmbConstructionPerson_SelectedIndexChanged);
+
+                // ƒRƒ“ƒ{ƒ{ƒbƒNƒX‚æ‚è‘I‘ð’S“–ŽÒ‚ðŽæ“¾‚·‚é
+                int PersonCode = GetConstructionPersonCode();
+                if (PersonCode < 1) return true;
+
+                int nTargetCount = CommonMotions.cnvInt(numUDConstPro.Value);
+                int DepartmentCode = GetDepartmentCode();
+
+                StringBuilder strSQL = new StringBuilder();
+                CommonMotions.CreateMan2DepSQL(ref strSQL, nTargetCount, PersonCode);
+
+                ArrayList arList = new ArrayList();
+                if (!PersonDB.ExecuteReader(strSQL.ToString(), ref arList)) return false;
+                if (arList.Count < 1) return false;
+
+                object[] objRec = (object[])arList[0];
+                PersonInChargeMaster PersonRec = new PersonInChargeMaster();
+                PersonRec.PersonCode = CommonMotions.cnvInt(objRec[0]);         // ’S“–ŽÒƒR�[ƒh
+                PersonRec.PersonName = CommonMotions.cnvString(objRec[1]);      // ’S“–ŽÒ–¼
+                PersonRec.DepartmentCode = CommonMotions.cnvInt(objRec[2]);     // •”��ƒR�[ƒh
+
+                // “¯‚¶•”��‚Ì�ê�‡‚Í�ˆ—�‚µ‚È‚¢
+                if (DepartmentCode == PersonRec.DepartmentCode) return true;
+
+                // •”��ƒRƒ“ƒ{ƒ{ƒbƒNƒX‚Ö•”��ƒR�[ƒhƒZƒbƒg
+                cmbDepartment.SelectedValue = PersonRec.DepartmentCode;
+                SetcmbPersons();    // ’S“–ŽÒƒRƒ“ƒ{ƒ{ƒbƒNƒX•Ï�X
+                cmbConstructionPerson.SelectedValue = PersonCode;
+
+                return true;
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("ƒVƒXƒeƒ€ƒGƒ‰�[�F{0}�F{1}", CommonMotions.GetMethodName(), ex.Message);
+                return false;
+            }
+            finally
+            {
+                PersonDB.close(); PersonDB = null;
+
+                cmbDepartment.SelectedIndexChanged += new EventHandler(cmbDepartment_SelectedIndexChanged);
+                cmbConstructionPerson.SelectedIndexChanged += new EventHandler(cmbConstructionPerson_SelectedIndexChanged);
+            }
+        }
+        #endregion
+
     }
 }
\ No newline at end of file
Index: branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ApprovalPerson/FrmAppManAux.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ApprovalPerson/FrmAppManAux.cs	(revision 329)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ApprovalPerson/FrmAppManAux.cs	(revision 330)
@@ -211,7 +211,7 @@
                 strSQL += string.Format(", OrderersName1 = '{0}'", RegistRec.OrderersName1);
                 strSQL += string.Format(", OrderersName2 = '{0}'", RegistRec.OrderersName2);
                 strSQL += string.Format(", DepartmentName = '{0}'", RegistRec.DepartmentName);
-                strSQL += string.Format(", ChargePersonName = '{0}'", RegistRec.ChargePersonName);
+                strSQL += string.Format(", ChargePersonName = '{0}'", RegistRec.PersonName);
                 strSQL += string.Format(", ZipCode = '{0}'", RegistRec.ZipCode);
                 strSQL += string.Format(", Address1 = '{0}'", RegistRec.Address1);
                 strSQL += string.Format(", Address2 = '{0}'", RegistRec.Address2);
Index: branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstractionList/FrmConstructionList.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstractionList/FrmConstructionList.cs	(revision 329)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstractionList/FrmConstructionList.cs	(revision 330)
@@ -217,6 +217,9 @@
         /// <param name="e"></param>
         private void FrmConstructionList_Load(object sender, EventArgs e)
         {
+            // ƒCƒxƒ“ƒgƒZƒbƒg
+            SetControlEvent((int)EventDef.ConstPro | (int)EventDef.Department | (int)EventDef.Person);
+
             SetInitnumUDConstPro();
             // ƒRƒ“ƒ{ƒ{ƒbƒNƒXƒZƒbƒg
             SetcmbDepartment();
@@ -231,8 +234,6 @@
             // ƒ�ƒOƒCƒ“ŽÒ‚ÌƒZƒbƒg
             InitDepPersonCode();
 
-            // ƒCƒxƒ“ƒgƒZƒbƒg
-            SetControlEvent((int)EventDef.ConstPro | (int)EventDef.Department | (int)EventDef.Person);
 
             // �‰Šú•\Ž¦
             InitDataLoad();
@@ -314,6 +315,11 @@
         {
             if (m_initDataLoad) return;
 
+            // •”��ƒRƒ“ƒ{ƒ{ƒbƒNƒX•Ï�X
+            SetcmbDepartment();
+            // ’S“–ŽÒƒRƒ“ƒ{ƒ{ƒbƒNƒX•Ï�X
+            SetcmbPersons();
+
             // ƒf�[ƒ^•\Ž¦
             DataDisplay();
         }
@@ -320,14 +326,17 @@
         #endregion
 
         #region •”��ƒRƒ“ƒ{ƒ{ƒbƒNƒX•Ï�X
+        /// <summary>
+        /// •”��ƒRƒ“ƒ{ƒ{ƒbƒNƒX•Ï�X
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
         private void cmbDepartment_SelectedIndexChanged(object sender, EventArgs e)
         {
             if (m_initDataLoad) return;
 
-            SubControlEvent((int)EventDef.Person);
             // ’S“–ŽÒƒRƒ“ƒ{ƒ{ƒbƒNƒX•Ï�X
             SetcmbPersons();
-            SetControlEvent((int)EventDef.Person);
 
             // ƒf�[ƒ^•\Ž¦
             DataDisplay();
@@ -336,14 +345,17 @@
         #endregion
 
         #region ’S“–ŽÒƒRƒ“ƒ{ƒ{ƒbƒNƒX•Ï�X
+        /// <summary>
+        /// ’S“–ŽÒƒRƒ“ƒ{ƒ{ƒbƒNƒX•Ï�X
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
         private void cmbConstructionPerson_SelectedIndexChanged(object sender, EventArgs e)
         {
             if (m_initDataLoad) return;
 
-            SubControlEvent((int)EventDef.Department);
-            // ’S“–ŽÒ‘I‘ðŽž•”��‘I‘ð‚ð�Ý’è‚·‚é
-            SetPerosonToDepartment();
-            SetControlEvent((int)EventDef.Department);
+            // ’S“–ŽÒƒRƒ“ƒ{ƒ{ƒbƒNƒXƒZƒbƒgŽž•”��‚ðƒZƒbƒg‚·‚é
+            if (!SetPerosonToDepartment()) return;
 
             // ƒf�[ƒ^•\Ž¦
             DataDisplay();
Index: branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstractionList/FrmConstructionList.designer.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstractionList/FrmConstructionList.designer.cs	(revision 329)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstractionList/FrmConstructionList.designer.cs	(revision 330)
@@ -28,19 +28,19 @@
         /// </summary>
         private void InitializeComponent()
         {
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle27 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle28 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle39 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle29 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle30 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle31 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle32 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle33 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle34 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle35 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle36 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle37 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle38 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle13 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle8 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle9 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle10 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle11 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle12 = new System.Windows.Forms.DataGridViewCellStyle();
             this.btnDataEntry = new System.Windows.Forms.Button();
             this.btnEnd = new System.Windows.Forms.Button();
             this.label1 = new System.Windows.Forms.Label();
@@ -376,21 +376,21 @@
             this.dgvMaster.AllowUserToDeleteRows = false;
             this.dgvMaster.AllowUserToResizeColumns = false;
             this.dgvMaster.AllowUserToResizeRows = false;
-            dataGridViewCellStyle27.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(255)))), ((int)(((byte)(192)))));
-            this.dgvMaster.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle27;
+            dataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(255)))), ((int)(((byte)(192)))));
+            this.dgvMaster.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1;
             this.dgvMaster.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
             | System.Windows.Forms.AnchorStyles.Left) 
             | System.Windows.Forms.AnchorStyles.Right)));
             this.dgvMaster.BackgroundColor = System.Drawing.Color.White;
             this.dgvMaster.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
-            dataGridViewCellStyle28.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
-            dataGridViewCellStyle28.BackColor = System.Drawing.SystemColors.Control;
-            dataGridViewCellStyle28.Font = new System.Drawing.Font("ï¼­ï¼³ æ˜Žæœ�", 11.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
-            dataGridViewCellStyle28.ForeColor = System.Drawing.SystemColors.WindowText;
-            dataGridViewCellStyle28.SelectionBackColor = System.Drawing.SystemColors.Highlight;
-            dataGridViewCellStyle28.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
-            dataGridViewCellStyle28.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
-            this.dgvMaster.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle28;
+            dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
+            dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Control;
+            dataGridViewCellStyle2.Font = new System.Drawing.Font("ï¼­ï¼³ æ˜Žæœ�", 11.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
+            dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.WindowText;
+            dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight;
+            dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
+            dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
+            this.dgvMaster.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2;
             this.dgvMaster.ColumnHeadersHeight = 24;
             this.dgvMaster.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing;
             this.dgvMaster.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
@@ -405,14 +405,14 @@
             this.Column3,
             this.Column2,
             this.Column11});
-            dataGridViewCellStyle39.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
-            dataGridViewCellStyle39.BackColor = System.Drawing.SystemColors.Window;
-            dataGridViewCellStyle39.Font = new System.Drawing.Font("ï¼­ï¼³ æ˜Žæœ�", 11.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
-            dataGridViewCellStyle39.ForeColor = System.Drawing.SystemColors.ControlText;
-            dataGridViewCellStyle39.SelectionBackColor = System.Drawing.Color.LightSeaGreen;
-            dataGridViewCellStyle39.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
-            dataGridViewCellStyle39.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
-            this.dgvMaster.DefaultCellStyle = dataGridViewCellStyle39;
+            dataGridViewCellStyle13.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
+            dataGridViewCellStyle13.BackColor = System.Drawing.SystemColors.Window;
+            dataGridViewCellStyle13.Font = new System.Drawing.Font("ï¼­ï¼³ æ˜Žæœ�", 11.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
+            dataGridViewCellStyle13.ForeColor = System.Drawing.SystemColors.ControlText;
+            dataGridViewCellStyle13.SelectionBackColor = System.Drawing.Color.LightSeaGreen;
+            dataGridViewCellStyle13.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
+            dataGridViewCellStyle13.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
+            this.dgvMaster.DefaultCellStyle = dataGridViewCellStyle13;
             this.dgvMaster.EditMode = System.Windows.Forms.DataGridViewEditMode.EditOnEnter;
             this.dgvMaster.EnableHeadersVisualStyles = false;
             this.dgvMaster.Location = new System.Drawing.Point(10, 103);
@@ -430,8 +430,8 @@
             // 
             // Column1
             // 
-            dataGridViewCellStyle29.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
-            this.Column1.DefaultCellStyle = dataGridViewCellStyle29;
+            dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
+            this.Column1.DefaultCellStyle = dataGridViewCellStyle3;
             this.Column1.Frozen = true;
             this.Column1.HeaderText = "â„–";
             this.Column1.Name = "Column1";
@@ -442,8 +442,8 @@
             // 
             // Column9
             // 
-            dataGridViewCellStyle30.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
-            this.Column9.DefaultCellStyle = dataGridViewCellStyle30;
+            dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
+            this.Column9.DefaultCellStyle = dataGridViewCellStyle4;
             this.Column9.Frozen = true;
             this.Column9.HeaderText = "å–¶æ¥­éƒ¨ç½²";
             this.Column9.Name = "Column9";
@@ -453,8 +453,8 @@
             // 
             // Column5
             // 
-            dataGridViewCellStyle31.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
-            this.Column5.DefaultCellStyle = dataGridViewCellStyle31;
+            dataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
+            this.Column5.DefaultCellStyle = dataGridViewCellStyle5;
             this.Column5.Frozen = true;
             this.Column5.HeaderText = "å–¶æ¥­æ‹…å½“è€…";
             this.Column5.Name = "Column5";
@@ -465,8 +465,8 @@
             // 
             // Column10
             // 
-            dataGridViewCellStyle32.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
-            this.Column10.DefaultCellStyle = dataGridViewCellStyle32;
+            dataGridViewCellStyle6.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
+            this.Column10.DefaultCellStyle = dataGridViewCellStyle6;
             this.Column10.Frozen = true;
             this.Column10.HeaderText = "å·¥äº‹éƒ¨ç½²";
             this.Column10.Name = "Column10";
@@ -476,8 +476,8 @@
             // 
             // Column6
             // 
-            dataGridViewCellStyle33.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
-            this.Column6.DefaultCellStyle = dataGridViewCellStyle33;
+            dataGridViewCellStyle7.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
+            this.Column6.DefaultCellStyle = dataGridViewCellStyle7;
             this.Column6.Frozen = true;
             this.Column6.HeaderText = "å·¥äº‹æ‹…å½“è€…";
             this.Column6.Name = "Column6";
@@ -488,8 +488,8 @@
             // 
             // Column4
             // 
-            dataGridViewCellStyle34.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
-            this.Column4.DefaultCellStyle = dataGridViewCellStyle34;
+            dataGridViewCellStyle8.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
+            this.Column4.DefaultCellStyle = dataGridViewCellStyle8;
             this.Column4.Frozen = true;
             this.Column4.HeaderText = "å·¥ã€€äº‹ã€€å��ã€€ç§°";
             this.Column4.Name = "Column4";
@@ -500,8 +500,8 @@
             // 
             // Column7
             // 
-            dataGridViewCellStyle35.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
-            this.Column7.DefaultCellStyle = dataGridViewCellStyle35;
+            dataGridViewCellStyle9.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
+            this.Column7.DefaultCellStyle = dataGridViewCellStyle9;
             this.Column7.Frozen = true;
             this.Column7.HeaderText = "æ–½å·¥çŠ¶æ…‹";
             this.Column7.Name = "Column7";
@@ -512,8 +512,8 @@
             // 
             // Column8
             // 
-            dataGridViewCellStyle36.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
-            this.Column8.DefaultCellStyle = dataGridViewCellStyle36;
+            dataGridViewCellStyle10.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
+            this.Column8.DefaultCellStyle = dataGridViewCellStyle10;
             this.Column8.Frozen = true;
             this.Column8.HeaderText = "å�°åˆ·";
             this.Column8.Name = "Column8";
@@ -524,8 +524,8 @@
             // 
             // Column3
             // 
-            dataGridViewCellStyle37.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
-            this.Column3.DefaultCellStyle = dataGridViewCellStyle37;
+            dataGridViewCellStyle11.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
+            this.Column3.DefaultCellStyle = dataGridViewCellStyle11;
             this.Column3.Frozen = true;
             this.Column3.HeaderText = "å–¶æ¥­æœŸ";
             this.Column3.Name = "Column3";
@@ -537,8 +537,8 @@
             // 
             // Column2
             // 
-            dataGridViewCellStyle38.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
-            this.Column2.DefaultCellStyle = dataGridViewCellStyle38;
+            dataGridViewCellStyle12.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
+            this.Column2.DefaultCellStyle = dataGridViewCellStyle12;
             this.Column2.Frozen = true;
             this.Column2.HeaderText = "å·¥äº‹ã‚³ãƒ¼ãƒ‰";
             this.Column2.Name = "Column2";
Index: branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstractionList/FrmConstructionListAuxiliary.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstractionList/FrmConstructionListAuxiliary.cs	(revision 329)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstractionList/FrmConstructionListAuxiliary.cs	(revision 330)
@@ -9,6 +9,7 @@
 using System.Collections;
 using System.Diagnostics;
 using System.Threading;
+using System.Reflection;
 
 using log4net;
 using log4net.Appender;
@@ -48,20 +49,42 @@
                                                             " ON A.CONSTRUCTIONCODE = B.CONSTRUCTIONCODE",
                                                             string.Format(" AND B.DETAILNO = {0}", (int)ConstructionBaseInfoDetail.DataNoDef.ConstructionName)};
 
-        private static string[] s_SQLPart3 = new string[] { " LEFT JOIN (SELECT CA.CONSTRUCTIONCODE, CA.SALESPERSONCODE PERSONCODE, CB.PERSONNAME PERSONNAME,",
-                                                            " CB.DEPARTMENTCODE DEPARTMENTCODE, CC.DEPARTMENTSTRING DEPARTMENTNAME,",
-                                                            " CB.DISPLAYORDER MANDISPORDER, CC.DISPLAYORDER DEPDISPORDER",
-                                                            " FROM CONSTRUCTIONBASEINFO CA",
-                                                            " LEFT JOIN PERSONINCHARGEMASTER CB ON CA.SALESPERSONCODE = CB.PERSONCODE",
-                                                            " LEFT JOIN DEPARTMENTMASTER CC ON CB.DEPARTMENTCODE = CC.DEPARTMENTCODE",
+        private static string[] s_SQLPart3 = new string[] { " LEFT JOIN (SELECT",
+                                                            " CA.CONSTRUCTIONCODE",
+                                                            ", CA.SALESPERSONCODE As PERSONCODE",
+                                                            ", CB.PERSONNAME As PERSONNAME",
+                                                            ", ifnull(CA.SalesDepCode, 0) As DEPARTMENTCODE",
+                                                            ", ifnull(CD.DetailString, '') As DEPARTMENTNAME",
+                                                            ", ifnull(CB.DISPLAYORDER, 99999) As MANDISPORDER",
+                                                            ", ifnull(CC.DISPLAYORDER, 99999) As DEPDISPORDER",
+                                                            " FROM",
+                                                            " CONSTRUCTIONBASEINFO CA",
+                                                            " LEFT JOIN PERSONINCHARGEMASTER CB",
+                                                            "      ON CA.SALESPERSONCODE = CB.PERSONCODE",
+                                                            " LEFT JOIN DEPARTMENTMASTER CC",
+                                                            "      ON CA.SalesDepCode = CC.DEPARTMENTCODE",
+                                                            " LEFT JOIN constructionbaseinfodetail As CD",
+                                                            "      ON CD.ConstructionCode = CA.ConstructionCode",
+                                                            string.Format(" And CD.DetailNo = {0}",(int)ConstructionBaseInfoDetail.DataNoDef.SalesDepartmentName),
                                                             " WHERE CA.CONSTRUCTIONPERIOD = {0}) C ON A.CONSTRUCTIONCODE = C.CONSTRUCTIONCODE" };
 
-        private static string[] s_SQLPart3_1 = new string[] { " LEFT JOIN (SELECT DA.CONSTRUCTIONCODE, DA.CONSTRUCTIONPERSONCODE PERSONCODE, DB.PERSONNAME PERSONNAME,",
-                                                            " DB.DEPARTMENTCODE DEPARTMENTCODE, DC.DEPARTMENTSTRING DEPARTMENTNAME,",
-                                                            " DB.DISPLAYORDER MANDISPORDER, DC.DISPLAYORDER DEPDISPORDER",
-                                                            " FROM CONSTRUCTIONBASEINFO DA",
-                                                            " LEFT JOIN PERSONINCHARGEMASTER DB ON DA.CONSTRUCTIONPERSONCODE = DB.PERSONCODE",
-                                                            " LEFT JOIN DEPARTMENTMASTER DC ON DB.DEPARTMENTCODE = DC.DEPARTMENTCODE",
+        private static string[] s_SQLPart3_1 = new string[] { " LEFT JOIN (SELECT",
+                                                            " DA.CONSTRUCTIONCODE",
+                                                            ", DA.CONSTRUCTIONPERSONCODE PERSONCODE",
+                                                            ", DB.PERSONNAME PERSONNAME",
+                                                            ", ifnull(DA.ConstrDepCode, 0) As DEPARTMENTCODE",
+                                                            ", ifnull(DD.DetailString, '') As DEPARTMENTNAME",
+                                                            ", ifnull(DB.DISPLAYORDER, 99999) As MANDISPORDER",
+                                                            ", ifnull(DC.DISPLAYORDER, 99999) As DEPDISPORDER",
+                                                            " FROM",
+                                                            " CONSTRUCTIONBASEINFO DA",
+                                                            " LEFT JOIN PERSONINCHARGEMASTER DB",
+                                                            "      ON DA.CONSTRUCTIONPERSONCODE = DB.PERSONCODE",
+                                                            " LEFT JOIN DEPARTMENTMASTER DC",
+                                                            "      ON DA.ConstrDepCode = DC.DEPARTMENTCODE",
+                                                            " LEFT JOIN constructionbaseinfodetail As DD",
+                                                            "      ON DD.ConstructionCode = DA.ConstructionCode",
+                                                            string.Format(" And DD.DetailNo = {0}",(int)ConstructionBaseInfoDetail.DataNoDef.ConstrDepartmentName),
                                                             " WHERE DA.CONSTRUCTIONPERIOD = {0}) D ON A.CONSTRUCTIONCODE = D.CONSTRUCTIONCODE" };
 
         private static string[] s_SQLPart3_2 = new string[] { " LEFT JOIN processapproval AS App ON",
@@ -316,11 +339,35 @@
             {
                 StringBuilder strRet = new StringBuilder();
 
+                // •”��‚Ì‘I‘ð
                 int DepartmentCode = GetDepartmentCode();
                 if (DepartmentCode == 0) return strRet.ToString();
-                    
-                strRet.AppendFormat(" AND (C.DEPARTMENTCODE = {0} OR D.DEPARTMENTCODE = {0})", DepartmentCode);
+                string DepartmentName = cmbDepartment.Text;
 
+                // ‰c‹Æ’S“–ŽÒ‚ª‘I‘ð‚³‚ê‚Ä‚¢‚é�ê�‡
+                int PersonCode = GetConstructionPersonCode();
+                bool bSelPerson = false;
+                if (PersonCode != 0) bSelPerson = true;
+
+                if (bSelPerson)
+                {
+                    if(radioButton1.Checked)
+                    {
+                        // ‰c‹Æ‚ð‘I‘ð
+                        strRet.AppendFormat(" AND (C.DEPARTMENTCODE = {0} And C.DEPARTMENTNAME = '{1}')", DepartmentCode, DepartmentName);
+                    }
+                    else
+                    {
+                        // �HŽ–‚ð‘I‘ð
+                        strRet.AppendFormat(" AND (D.DEPARTMENTCODE = {0} And D.DEPARTMENTNAME = '{1}')", DepartmentCode, DepartmentName);
+                    }
+                }
+                else
+                {
+                    strRet.AppendFormat(" AND ((C.DEPARTMENTCODE = {0} And C.DEPARTMENTNAME = '{1}')", DepartmentCode, DepartmentName);
+                    strRet.AppendFormat(" OR (D.DEPARTMENTCODE = {0} And D.DEPARTMENTNAME = '{1}'))", DepartmentCode, DepartmentName);
+                }
+
                 return strRet.ToString();
             }
             catch (Exception ex)
@@ -1479,17 +1526,17 @@
             {
                 if ((EventCon | (int)EventDef.ConstPro) != 0)
                 {
-                    numUDConstPro.ValueChanged += new System.EventHandler(numUDConstPro_ValueChanged);
+                    numUDConstPro.ValueChanged += new EventHandler(numUDConstPro_ValueChanged);
                 }
                 if ((EventCon | (int)EventDef.Department) != 0)
                 {
-                    cmbDepartment.SelectedIndexChanged += new System.EventHandler(cmbDepartment_SelectedIndexChanged);
+                    cmbDepartment.SelectedIndexChanged += new EventHandler(cmbDepartment_SelectedIndexChanged);
                 }
                 if ((EventCon | (int)EventDef.Person) != 0)
                 {
-                    this.radioButton1.CheckedChanged += new System.EventHandler(this.radioButton_CheckedChanged);
-                    this.radioButton2.CheckedChanged += new System.EventHandler(this.radioButton_CheckedChanged);
-                    cmbConstructionPerson.SelectedIndexChanged += new System.EventHandler(cmbConstructionPerson_SelectedIndexChanged);
+                    this.radioButton1.CheckedChanged += new EventHandler(this.radioButton_CheckedChanged);
+                    this.radioButton2.CheckedChanged += new EventHandler(this.radioButton_CheckedChanged);
+                    cmbConstructionPerson.SelectedIndexChanged += new EventHandler(cmbConstructionPerson_SelectedIndexChanged);
                 }
             }
             catch (Exception ex)
@@ -1511,17 +1558,17 @@
 
                 if ((EventCon | (int)EventDef.ConstPro) != 0)
                 {
-                    numUDConstPro.ValueChanged -= new System.EventHandler(numUDConstPro_ValueChanged);
+                    numUDConstPro.ValueChanged -= new EventHandler(numUDConstPro_ValueChanged);
                 }
                 if ((EventCon | (int)EventDef.Department) != 0)
                 {
-                    cmbDepartment.SelectedIndexChanged -= new System.EventHandler(cmbDepartment_SelectedIndexChanged);
+                    cmbDepartment.SelectedIndexChanged -= new EventHandler(cmbDepartment_SelectedIndexChanged);
                 }
                 if ((EventCon | (int)EventDef.Person) != 0)
                 {
-                    this.radioButton1.CheckedChanged -= new System.EventHandler(this.radioButton_CheckedChanged);
-                    this.radioButton2.CheckedChanged -= new System.EventHandler(this.radioButton_CheckedChanged);
-                    cmbConstructionPerson.SelectedIndexChanged -= new System.EventHandler(cmbConstructionPerson_SelectedIndexChanged);
+                    this.radioButton1.CheckedChanged -= new EventHandler(this.radioButton_CheckedChanged);
+                    this.radioButton2.CheckedChanged -= new EventHandler(this.radioButton_CheckedChanged);
+                    cmbConstructionPerson.SelectedIndexChanged -= new EventHandler(cmbConstructionPerson_SelectedIndexChanged);
                 }
             }
             catch (Exception ex)
@@ -2045,29 +2092,17 @@
             m_initDataLoad = true;
             try
             {
+                cmbDepartment.SelectedIndexChanged -= new EventHandler(cmbDepartment_SelectedIndexChanged);
 
                 cmbDepartment.DataSource = null;
                 cmbDepartment.Items.Clear();
                 cmbDepartment.Text = "";
 
+                int nTargetCount = CommonMotions.cnvInt(numUDConstPro.Value);
+                // •”��ƒ}ƒXƒ^‚ðŒŸ�õ‚·‚é
                 StringBuilder strSQL = new StringBuilder();
-                // •”��ƒ}ƒXƒ^‚ðŒŸ�õ‚·‚é
-                strSQL.Append("SELECT A.DEPARTMENTCODE, A.DEPARTMENTSTRING, A.DISPLAYORDER, COUNT(*)");
-                strSQL.Append(" FROM DEPARTMENTMASTER A, PERSONINCHARGEMASTER B, CONSTRUCTIONBASEINFO C");
-                strSQL.Append(" WHERE A.DELETEFLG = 0");
+                CommonMotions.CreateDepCombBoxSQL(ref strSQL, nTargetCount);
 
-                if (CommonMotions.LoginUserData.PersonCode != CommonDefine.AdminCode)
-                {
-                    // ŽQ�Æ•”��ƒ}ƒXƒ^‚æ‚èŽæ“¾‚·‚é
-                    strSQL.Append(" AND A.DEPARTMENTCODE IN (SELECT A1.DEPARTMENTCODE FROM PERSONDEPARTMENTMASTER A1");
-                    strSQL.AppendFormat(" WHERE A1.PERSONCODE = {0})", CommonMotions.LoginUserData.PersonCode);
-                }
-
-                strSQL.Append(" AND A.DEPARTMENTCODE = B.DEPARTMENTCODE");
-                strSQL.Append(" AND B.PERSONCODE = C.CONSTRUCTIONPERSONCODE");
-                strSQL.Append(" GROUP BY A.DEPARTMENTCODE, A.DEPARTMENTSTRING, A.DISPLAYORDER");
-                strSQL.Append(" ORDER BY A.DISPLAYORDER ASC");
-
                 // •”��ƒ}ƒXƒ^“Ç�ž
                 ArrayList arList = new ArrayList();
                 if (!depDB.ExecuteReader(strSQL.ToString(), ref arList)) return;
@@ -2086,7 +2121,6 @@
                 // ƒRƒ“ƒ{ƒ{ƒbƒNƒX�‰Šú•\Ž¦
                 ComboBoxAction.InitDataSetCombBox(cmbDepartment, ConstructionDataList);
 
-                return;
             }
             catch (Exception ex)
             {
@@ -2096,6 +2130,7 @@
             {
                 depDB.close(); depDB = null;
                 m_initDataLoad = bSave;
+                cmbDepartment.SelectedIndexChanged += new EventHandler(cmbDepartment_SelectedIndexChanged);
             }
         }
         #endregion
@@ -2107,53 +2142,33 @@
         private void SetcmbPersons()
         {
             IOMPersonInCharge picDB = new IOMPersonInCharge();
-            List<PersonInChargeMaster> workList = new List<PersonInChargeMaster>();
             bool bSave = m_initDataLoad;
             m_initDataLoad = true;
             try
             {
+                cmbConstructionPerson.SelectedIndexChanged -= new EventHandler(cmbConstructionPerson_SelectedIndexChanged);
+
                 cmbConstructionPerson.DataSource = null;
                 cmbConstructionPerson.Items.Clear();
                 cmbConstructionPerson.Text = "";
 
+                int nTargetCount = CommonMotions.cnvInt(numUDConstPro.Value);
                 int DepartmentCode = GetDepartmentCode();
                 StringBuilder strSQL = new StringBuilder();
-                // ŒŸ�õ�ðŒ�
-                strSQL.AppendFormat(" WHERE LEDGERFLG = {0}", (int)PersonInChargeMaster.LedgerDivNoDef.CalcTarget);
-                strSQL.Append(" AND (DEPARTMENTCODE");
-                StringBuilder strSubSQL = new StringBuilder();
-                if (DepartmentCode == 0)
-                {
-                    // ŽQ�Æ•”��ƒ}ƒXƒ^‚æ‚èŽæ“¾‚·‚é
-                    strSubSQL.AppendFormat(" IN (SELECT AA.DEPARTMENTCODE FROM PERSONDEPARTMENTMASTER AA WHERE AA.PERSONCODE = {0})"
-                                            , CommonMotions.LoginUserData.PersonCode);
-                }
-                else
-                {
-                    strSubSQL.AppendFormat(" = {0}", DepartmentCode);
-                }
-                strSQL.Append(strSubSQL.ToString());
-                strSQL.Append( ")");
+                CommonMotions.CreateManCombBoxSQL(ref strSQL, nTargetCount, DepartmentCode);
 
-                // “–ŠúŠúŽñ“ú�EŠú––“ú‚ðŽæ“¾
-                DateTime dtDefaultStart = DateTime.MinValue;
-                DateTime dtDefaultEnd = DateTime.MinValue;
-                CreateDefaultStartAndEndDate(ref dtDefaultStart, ref dtDefaultEnd);
-
-                strSQL.AppendFormat(" AND (DATE(STARTDATE) <= STR_TO_DATE('{0}','%Y/%m/%d')", dtDefaultEnd.ToShortDateString());
-                strSQL.AppendFormat(" AND (STR_TO_DATE('{0}','%Y/%m/%d') <= DATE(ENDDATE)", dtDefaultStart.ToShortDateString());
-                strSQL.AppendFormat(" OR STR_TO_DATE('{0}','%Y/%m/%d') = DATE(ENDDATE)))", DateTime.MinValue.ToShortDateString());
-
-                strSQL.Append(" Order By DeleteFlg ASC, EmployeeClassFlg ASC, DisplayOrder ASC");
                 // ’S“–ŽÒƒ}ƒXƒ^“Ç�ž
-                if (!picDB.SelectAction(strSQL.ToString(), ref workList)) return;
+                ArrayList workList = new ArrayList();
+                if (!picDB.ExecuteReader(strSQL.ToString(), ref workList)) return;
 
                 List<KeyValuePair<int, string>> ConstructionDataList = new List<KeyValuePair<int, string>>();
                 ConstructionDataList.Add(new KeyValuePair<int, string>(0, ""));
 
-                foreach (PersonInChargeMaster work in workList)
+                PersonInChargeMaster workRec = new PersonInChargeMaster();
+                foreach (object[] work in workList)
                 {
-                    KeyValuePair<int, string> keyval = new KeyValuePair<int, string>(work.PersonCode, work.PersonName);
+                    picDB.Reader2Struct(work, ref workRec);
+                    KeyValuePair<int, string> keyval = new KeyValuePair<int, string>(workRec.PersonCode, workRec.PersonName);
 
                     ConstructionDataList.Add(keyval);
                 }
@@ -2171,45 +2186,11 @@
             {
                 picDB.close(); picDB = null;
                 m_initDataLoad = bSave;
+                cmbConstructionPerson.SelectedIndexChanged += new EventHandler(cmbConstructionPerson_SelectedIndexChanged);
             }
         }
         #endregion
 
-        #region ƒfƒtƒHƒ‹ƒg‚ÌŠúŽñ“ú�EŠú––“ú‚ð‹�‚ß‚é
-        /// <summary>
-        /// ƒfƒtƒHƒ‹ƒg‚ÌŠúŽñ“ú�EŠú––“ú‚ð‹�‚ß‚é
-        /// </summary>
-        /// <param name="dtStart"></param>
-        /// <param name="dtEnd"></param>
-        private void CreateDefaultStartAndEndDate(ref DateTime dtStart, ref DateTime dtEnd)
-        {
-            try
-            {
-                // “–ŠúŠúŽñ”NŒŽ“ú‚ðŽæ“¾
-                int iYear = 0;
-                int month = 0;
-                int day = 0;
-                bool bPeriod = false;
-                if (CommonMotions.SystemMasterData.ConstructionNoBase == (int)SystemMaster.ConstrNoBaseDef.BusinessPeriod)
-                {   // ‰c‹ÆŠú
-                    iYear = CommonMotions.PeriodCountToYear(CommonMotions.cnvInt(numUDConstPro.Value));
-                    bPeriod = true;
-                }
-                else
-                {   // �HŽ–”N“x
-                    iYear = CommonMotions.SystemMasterData.ConstrYear;
-                }
-                CommonMotions.GetNowBeginMonthDay(bPeriod, ref month, ref day);
-                dtStart = new DateTime(iYear, month, day);
-                dtEnd = dtStart.AddYears(1).AddDays(-1);     // �I—¹‚Í�{1”N�|1“ú
-            }
-            catch (Exception ex)
-            {
-                logger.ErrorFormat("ƒVƒXƒeƒ€ƒGƒ‰�[�F{0}�F{1}", CommonMotions.GetMethodName(), ex.Message);
-            }
-        }
-        #endregion
-
         #region ’S“–ŽÒƒRƒ“ƒ{ƒ{ƒbƒNƒXƒZƒbƒgŽž•”��‚ðƒZƒbƒg‚·‚é
         /// <summary>
         /// ’S“–ŽÒƒRƒ“ƒ{ƒ{ƒbƒNƒXƒZƒbƒgŽž•”��‚ðƒZƒbƒg‚·‚é
@@ -2220,26 +2201,36 @@
             IOMPersonInCharge PersonDB = new IOMPersonInCharge();
             try
             {
+                cmbDepartment.SelectedIndexChanged -= new EventHandler(cmbDepartment_SelectedIndexChanged);
+                cmbConstructionPerson.SelectedIndexChanged -= new EventHandler(cmbConstructionPerson_SelectedIndexChanged);
+
                 // ƒRƒ“ƒ{ƒ{ƒbƒNƒX‚æ‚è‘I‘ð’S“–ŽÒ‚ðŽæ“¾‚·‚é
                 int PersonCode = GetConstructionPersonCode();
-                if (PersonCode < 1) return false;
+                if (PersonCode < 1) return true;
 
+                int nTargetCount = CommonMotions.cnvInt(numUDConstPro.Value);
                 int DepartmentCode = GetDepartmentCode();
 
-                string strSQL = PersonDB.CreatePrimarykeyString(PersonCode);
+                StringBuilder strSQL = new StringBuilder();
+                CommonMotions.CreateMan2DepSQL(ref strSQL, nTargetCount, PersonCode);
+
+                ArrayList arList = new ArrayList();
+                if (!PersonDB.ExecuteReader(strSQL.ToString(), ref arList)) return false;
+                if (arList.Count < 1) return false;
+
+                object[] objRec = (object[])arList[0];
                 PersonInChargeMaster PersonRec = new PersonInChargeMaster();
-                PersonDB.SelectAction(strSQL, ref PersonRec);
+                PersonRec.PersonCode = CommonMotions.cnvInt(objRec[0]);         // ’S“–ŽÒƒR�[ƒh
+                PersonRec.PersonName = CommonMotions.cnvString(objRec[1]);      // ’S“–ŽÒ–¼
+                PersonRec.DepartmentCode = CommonMotions.cnvInt(objRec[2]);     // •”��ƒR�[ƒh
+                                                                                
+                // “¯‚¶•”��‚Ì�ê�‡‚Í�ˆ—�‚µ‚È‚¢
+                if (DepartmentCode == PersonRec.DepartmentCode) return true;
 
                 // •”��ƒRƒ“ƒ{ƒ{ƒbƒNƒX‚Ö•”��ƒR�[ƒhƒZƒbƒg
-                if (PersonRec.DepartmentCode > 0 && DepartmentCode != PersonRec.DepartmentCode)
-                {
-                    bool bSave = m_initDataLoad;
-                    m_initDataLoad = true;
-                    cmbDepartment.SelectedValue = PersonRec.DepartmentCode;
-                    SetcmbPersons();    // ’S“–ŽÒƒRƒ“ƒ{ƒ{ƒbƒNƒX•Ï�X
-                    cmbConstructionPerson.SelectedValue = PersonCode;
-                    m_initDataLoad = bSave;
-                }
+                cmbDepartment.SelectedValue = PersonRec.DepartmentCode;
+                SetcmbPersons();    // ’S“–ŽÒƒRƒ“ƒ{ƒ{ƒbƒNƒX•Ï�X
+                cmbConstructionPerson.SelectedValue = PersonCode;
 
                 return true;
             }
@@ -2251,6 +2242,9 @@
             finally
             {
                 PersonDB.close(); PersonDB = null;
+
+                cmbDepartment.SelectedIndexChanged += new EventHandler(cmbDepartment_SelectedIndexChanged);
+                cmbConstructionPerson.SelectedIndexChanged += new EventHandler(cmbConstructionPerson_SelectedIndexChanged);
             }
         }
         #endregion
Index: branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionBaseInfo/FrmConstructionBaseInfo.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionBaseInfo/FrmConstructionBaseInfo.cs	(revision 329)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionBaseInfo/FrmConstructionBaseInfo.cs	(revision 330)
@@ -1396,9 +1396,6 @@
                 SetcmbConstructionTypeCombBox();            // �HŽ–Ží•Ê
                 SetcmbTransferConstructionCombBox();        // �HŽ–ˆøŒp
 
-                // ƒeƒLƒXƒgƒ{ƒbƒNƒX–¢’èƒZƒbƒg
-                SetTextBoxBackString();
-
                 // �‰Šú•\Ž¦
                 InitDataLoad();
 
@@ -1415,6 +1412,9 @@
                 // �¿‹�‰ð�œƒ{ƒ^ƒ“•\Ž¦
                 DispbtnRestore();
 
+                // �‰Šú•\Ž¦‚Ì‚»‚Ì‘¼�ˆ—�
+                InitOtherProcess();
+
                 // �Å�‚ŠÇ—�ŽÒˆÈŠO‚Í�¿‹�Šm”F‚É‚Å‚«‚È‚¢
                 int nRankCode = (int)CommonDefine.SecurityRankPos.SpecialAuthority;
                 if (CommonMotions.LoginUserData.PersonCode == CommonDefine.AdminCode
@@ -1574,11 +1574,14 @@
         /// </summary>
         /// <param name="sender"></param>
         /// <param name="e"></param>
-        private void cmbDisplayConstructionPerson_SelectedIndexChanged(object sender, EventArgs e)
+        private void CmbConstructionPerson_SelectedIndexChanged(object sender, EventArgs e)
         {
             // �‰Šú•\Ž¦Žž‚Í�ˆ—�‚µ‚È‚¢
             if (bInitFlg) return;
 
+            // ’S“–ŽÒƒRƒ“ƒ{ƒ{ƒbƒNƒX•Ï�X�ˆ—�
+            cmbPerson_SelectedIndexChanged(sender, e);
+
             // ’S“–ŽÒ‚ª–¢�Ý’è‚Í�ˆ—�‚µ‚È‚¢
             if (cmbDisplayConstructionPerson.Text.Length == 0 ||
                 cmbDisplayConstructionPerson.Text.Trim().Equals(CommonDefine.s_UndecidedString)) return;
@@ -1591,6 +1594,7 @@
 
             // ŒfŽ¦”Â‚Öƒ�ƒbƒZ�[ƒW‚ð�Ú‚¹‚é
             m_Transfer2MesageFlg = true;
+
         }
         #endregion
 
@@ -1950,21 +1954,6 @@
         }
         #endregion
 
-        #region �HŽ–ƒf�[ƒ^‚ÌƒRƒs�[
-        /// <summary>
-        /// �HŽ–ƒf�[ƒ^‚ÌƒRƒs�[
-        /// </summary>
-        /// <param name="sender"></param>
-        /// <param name="e"></param>
-        private void btnDataSelect_Click(object sender, EventArgs e)
-        {
-            // ƒRƒs�[�ˆ—�
-            ExecuteCopyProcess();
-            // ‰æ–Ê�Ø‚è‘Ö‚¦
-            this.Close();
-        }
-        #endregion
-
         #region •”��ƒRƒ“ƒ{ƒ{ƒbƒNƒX•Ï�X
         /// <summary>
         /// •”��ƒRƒ“ƒ{ƒ{ƒbƒNƒX•Ï�XŽž
@@ -1977,23 +1966,28 @@
             if (bInitFlg) return;
 
             ComboBox combObj = (ComboBox)sender;
-        
+            int SelDepCode = CommonMotions.cnvInt(combObj.SelectedValue);
+
             // ’S“–ŽÒ‚ÌƒZƒbƒg
             if (combObj.Name.Equals("comboBoxEX1"))
             {   // ‰c‹Æ’S“–
-                SetcombBoxPerson((int)combObj.SelectedValue, cmbDisplayPerson);
+                combObj = cmbDisplayPerson;
+                SetcombBoxPerson(SelDepCode, combObj);
             }
             else if (combObj.Name.Equals("comboBoxEX2"))
             {   // �HŽ–’S“–
-                SetcombBoxPerson((int)combObj.SelectedValue, cmbDisplayConstructionPerson);
+                combObj = cmbDisplayConstructionPerson;
+                SetcombBoxPerson(SelDepCode, combObj);
             }
             else if (combObj.Name.Equals("comboBoxEX3"))
             {   // �HŽ–•›’S“–
-                SetcombBoxPerson((int)combObj.SelectedValue, cmbDisplayConstrSubPerson);
+                combObj = cmbDisplayConstrSubPerson;
+                SetcombBoxPerson(SelDepCode, combObj);
             }
             else if (combObj.Name.Equals("comboBoxEX4"))
             {   // �HŽ–Žw“±ˆõ
-                SetcombBoxPerson((int)combObj.SelectedValue, cmbConstructionInstructor);
+                combObj = cmbConstructionInstructor;
+                SetcombBoxPerson(SelDepCode, combObj);
             }
         }
         #endregion
@@ -2077,5 +2071,21 @@
             PeriodAvoidanceProc();
         }
         #endregion
+
+        #region ’S“–ŽÒƒRƒ“ƒ{ƒ{ƒbƒNƒX•Ï�X�ˆ—�
+        /// <summary>
+        /// ’S“–ŽÒƒRƒ“ƒ{ƒ{ƒbƒNƒX•Ï�X�ˆ—�
+        /// </summary>
+        private void cmbPerson_SelectedIndexChanged(object sender, EventArgs e)
+        {
+            // ‘Î‚Ì•”��ƒRƒ“ƒ{‚ðŽæ“¾
+            ComboBox wrkCombo = GetPerson2DepartComb((ComboBox)sender);
+            // •”��‚ª�Ý’è‚³‚ê‚Ä‚¢‚ê‚Î�ˆ—�‚µ‚È‚¢
+            if (CommonMotions.cnvInt(wrkCombo.SelectedValue) > 0) return;
+
+            // ’S“–ŽÒƒRƒ“ƒ{ƒ{ƒbƒNƒX•Ï�X�ˆ—�
+            PersonCombBoxChange(sender);
+        }
+        #endregion
     }
 }
\ No newline at end of file
Index: branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionBaseInfo/FrmConstructionBaseInfo.designer.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionBaseInfo/FrmConstructionBaseInfo.designer.cs	(revision 329)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionBaseInfo/FrmConstructionBaseInfo.designer.cs	(revision 330)
@@ -73,6 +73,7 @@
             this.label63 = new System.Windows.Forms.Label();
             this.label3 = new System.Windows.Forms.Label();
             this.panel1 = new System.Windows.Forms.Panel();
+            this.label107 = new System.Windows.Forms.Label();
             this.label114 = new System.Windows.Forms.Label();
             this.label115 = new System.Windows.Forms.Label();
             this.txtInput07 = new System.Windows.Forms.TextBox();
@@ -123,6 +124,7 @@
             this.cmbDisplayOrderers = new ProcessManagement.Forms.CustomControls.ComboBoxEX();
             this.txtInput05 = new System.Windows.Forms.TextBox();
             this.panel4 = new System.Windows.Forms.Panel();
+            this.label106 = new System.Windows.Forms.Label();
             this.label101 = new System.Windows.Forms.Label();
             this.label100 = new System.Windows.Forms.Label();
             this.label99 = new System.Windows.Forms.Label();
@@ -181,6 +183,7 @@
             this.rdBConsumptionTaxOff = new System.Windows.Forms.RadioButton();
             this.rdBConsumptionTaxOn = new System.Windows.Forms.RadioButton();
             this.panel7 = new System.Windows.Forms.Panel();
+            this.label105 = new System.Windows.Forms.Label();
             this.lblFluctuationText = new System.Windows.Forms.Label();
             this.pnlFluctuation = new System.Windows.Forms.Panel();
             this.btnFluctuation = new System.Windows.Forms.Button();
@@ -261,6 +264,8 @@
             this.label45 = new System.Windows.Forms.Label();
             this.label59 = new System.Windows.Forms.Label();
             this.panel9 = new System.Windows.Forms.Panel();
+            this.label104 = new System.Windows.Forms.Label();
+            this.label94 = new System.Windows.Forms.Label();
             this.dgvBillingDate = new System.Windows.Forms.DataGridView();
             this.BillingGridColumn1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.BillingGridColumn2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
@@ -280,6 +285,7 @@
             this.label60 = new System.Windows.Forms.Label();
             this.txtInput36 = new ProcessManagement.Forms.CustomControls.TextBoxEX();
             this.label127 = new System.Windows.Forms.Label();
+            this.textBox4 = new System.Windows.Forms.TextBox();
             this.textBox2 = new System.Windows.Forms.TextBox();
             this.label128 = new System.Windows.Forms.Label();
             this.label91 = new System.Windows.Forms.Label();
@@ -321,12 +327,6 @@
             this.rdbStatus1 = new System.Windows.Forms.RadioButton();
             this.rdbStatus0 = new System.Windows.Forms.RadioButton();
             this.label49 = new System.Windows.Forms.Label();
-            this.label94 = new System.Windows.Forms.Label();
-            this.textBox4 = new System.Windows.Forms.TextBox();
-            this.label104 = new System.Windows.Forms.Label();
-            this.label105 = new System.Windows.Forms.Label();
-            this.label106 = new System.Windows.Forms.Label();
-            this.label107 = new System.Windows.Forms.Label();
             this.BasePanel.SuspendLayout();
             this.tableLayoutPanel2.SuspendLayout();
             this.panel10.SuspendLayout();
@@ -744,6 +744,18 @@
             this.panel1.Size = new System.Drawing.Size(650, 994);
             this.panel1.TabIndex = 1;
             // 
+            // label107
+            // 
+            this.label107.AutoSize = true;
+            this.label107.BackColor = System.Drawing.Color.Black;
+            this.label107.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
+            this.label107.ForeColor = System.Drawing.Color.Red;
+            this.label107.Location = new System.Drawing.Point(288, 759);
+            this.label107.Name = "label107";
+            this.label107.Size = new System.Drawing.Size(347, 21);
+            this.label107.TabIndex = 177;
+            this.label107.Text = "â€»å�„ã‚³ãƒ¡ãƒ³ãƒˆã�¯å¿…ã�šè¨˜å…¥ã�™ã‚‹ã�“ã�¨ã€‚";
+            // 
             // label114
             // 
             this.label114.BackColor = System.Drawing.Color.CornflowerBlue;
@@ -826,6 +838,7 @@
             this.cmbDisplayPerson.Name = "cmbDisplayPerson";
             this.cmbDisplayPerson.Size = new System.Drawing.Size(255, 27);
             this.cmbDisplayPerson.TabIndex = 23;
+            this.cmbDisplayPerson.SelectedIndexChanged += new System.EventHandler(this.cmbPerson_SelectedIndexChanged);
             this.cmbDisplayPerson.TextChanged += new System.EventHandler(this.valueChange);
             // 
             // label4
@@ -1425,6 +1438,18 @@
             this.panel4.Size = new System.Drawing.Size(651, 994);
             this.panel4.TabIndex = 2;
             // 
+            // label106
+            // 
+            this.label106.AutoSize = true;
+            this.label106.BackColor = System.Drawing.Color.Black;
+            this.label106.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
+            this.label106.ForeColor = System.Drawing.Color.Red;
+            this.label106.Location = new System.Drawing.Point(289, 738);
+            this.label106.Name = "label106";
+            this.label106.Size = new System.Drawing.Size(347, 21);
+            this.label106.TabIndex = 191;
+            this.label106.Text = "â€»å�„ã‚³ãƒ¡ãƒ³ãƒˆã�¯å¿…ã�šè¨˜å…¥ã�™ã‚‹ã�“ã�¨ã€‚";
+            // 
             // label101
             // 
             this.label101.BackColor = System.Drawing.Color.White;
@@ -1631,6 +1656,7 @@
             this.txtInput27.TabIndex = 26;
             this.txtInput27.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
             this.txtInput27.TextChanged += new System.EventHandler(this.valueChange);
+            this.txtInput27.Validated += new System.EventHandler(this.txtInputDate_TextChanged);
             // 
             // txtInput02
             // 
@@ -2176,6 +2202,19 @@
             this.panel7.Size = new System.Drawing.Size(650, 994);
             this.panel7.TabIndex = 179;
             // 
+            // label105
+            // 
+            this.label105.AutoSize = true;
+            this.label105.BackColor = System.Drawing.Color.Black;
+            this.label105.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
+            this.label105.Font = new System.Drawing.Font("ï¼­ï¼³ æ˜Žæœ�", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
+            this.label105.ForeColor = System.Drawing.Color.Red;
+            this.label105.Location = new System.Drawing.Point(288, 503);
+            this.label105.Name = "label105";
+            this.label105.Size = new System.Drawing.Size(347, 21);
+            this.label105.TabIndex = 186;
+            this.label105.Text = "â€»å�„ã‚³ãƒ¡ãƒ³ãƒˆã�¯å¿…ã�šè¨˜å…¥ã�™ã‚‹ã�“ã�¨ã€‚";
+            // 
             // lblFluctuationText
             // 
             this.lblFluctuationText.BackColor = System.Drawing.Color.Black;
@@ -2274,6 +2313,7 @@
             this.cmbDisplayConstrSubPerson.Name = "cmbDisplayConstrSubPerson";
             this.cmbDisplayConstrSubPerson.Size = new System.Drawing.Size(255, 27);
             this.cmbDisplayConstrSubPerson.TabIndex = 43;
+            this.cmbDisplayConstrSubPerson.SelectedIndexChanged += new System.EventHandler(this.cmbPerson_SelectedIndexChanged);
             // 
             // label46
             // 
@@ -2618,6 +2658,7 @@
             this.cmbConstructionInstructor.Name = "cmbConstructionInstructor";
             this.cmbConstructionInstructor.Size = new System.Drawing.Size(255, 27);
             this.cmbConstructionInstructor.TabIndex = 45;
+            this.cmbConstructionInstructor.SelectedIndexChanged += new System.EventHandler(this.cmbPerson_SelectedIndexChanged);
             this.cmbConstructionInstructor.TextChanged += new System.EventHandler(this.valueChange);
             // 
             // comboBoxEX2
@@ -2643,7 +2684,7 @@
             this.cmbDisplayConstructionPerson.Name = "cmbDisplayConstructionPerson";
             this.cmbDisplayConstructionPerson.Size = new System.Drawing.Size(255, 27);
             this.cmbDisplayConstructionPerson.TabIndex = 41;
-            this.cmbDisplayConstructionPerson.SelectedIndexChanged += new System.EventHandler(this.cmbDisplayConstructionPerson_SelectedIndexChanged);
+            this.cmbDisplayConstructionPerson.SelectedIndexChanged += new System.EventHandler(this.CmbConstructionPerson_SelectedIndexChanged);
             this.cmbDisplayConstructionPerson.TextChanged += new System.EventHandler(this.valueChange);
             // 
             // label113
@@ -2784,7 +2825,7 @@
             this.lblLinkTotal4.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
             this.lblLinkTotal4.Font = new System.Drawing.Font("Century", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
             this.lblLinkTotal4.ForeColor = System.Drawing.Color.Black;
-            this.lblLinkTotal4.Location = new System.Drawing.Point(501, 533);
+            this.lblLinkTotal4.Location = new System.Drawing.Point(481, 533);
             this.lblLinkTotal4.Name = "lblLinkTotal4";
             this.lblLinkTotal4.Size = new System.Drawing.Size(120, 22);
             this.lblLinkTotal4.TabIndex = 189;
@@ -2796,7 +2837,7 @@
             this.lblLinkTotal3.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
             this.lblLinkTotal3.Font = new System.Drawing.Font("Century", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
             this.lblLinkTotal3.ForeColor = System.Drawing.Color.Black;
-            this.lblLinkTotal3.Location = new System.Drawing.Point(381, 533);
+            this.lblLinkTotal3.Location = new System.Drawing.Point(361, 533);
             this.lblLinkTotal3.Name = "lblLinkTotal3";
             this.lblLinkTotal3.Size = new System.Drawing.Size(120, 22);
             this.lblLinkTotal3.TabIndex = 188;
@@ -2808,7 +2849,7 @@
             this.lblLinkTotal2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
             this.lblLinkTotal2.Font = new System.Drawing.Font("Century", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
             this.lblLinkTotal2.ForeColor = System.Drawing.Color.Black;
-            this.lblLinkTotal2.Location = new System.Drawing.Point(261, 533);
+            this.lblLinkTotal2.Location = new System.Drawing.Point(241, 533);
             this.lblLinkTotal2.Name = "lblLinkTotal2";
             this.lblLinkTotal2.Size = new System.Drawing.Size(120, 22);
             this.lblLinkTotal2.TabIndex = 187;
@@ -2820,7 +2861,7 @@
             this.lblLinkTotal1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
             this.lblLinkTotal1.Font = new System.Drawing.Font("Century", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
             this.lblLinkTotal1.ForeColor = System.Drawing.Color.Black;
-            this.lblLinkTotal1.Location = new System.Drawing.Point(141, 533);
+            this.lblLinkTotal1.Location = new System.Drawing.Point(121, 533);
             this.lblLinkTotal1.Name = "lblLinkTotal1";
             this.lblLinkTotal1.Size = new System.Drawing.Size(120, 22);
             this.lblLinkTotal1.TabIndex = 186;
@@ -2834,7 +2875,7 @@
             this.label116.ForeColor = System.Drawing.Color.Black;
             this.label116.Location = new System.Drawing.Point(1, 533);
             this.label116.Name = "label116";
-            this.label116.Size = new System.Drawing.Size(140, 22);
+            this.label116.Size = new System.Drawing.Size(120, 22);
             this.label116.TabIndex = 185;
             this.label116.Text = "å�ˆè¨ˆé‡‘é¡�";
             this.label116.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
@@ -3248,6 +3289,31 @@
             this.panel9.Size = new System.Drawing.Size(650, 994);
             this.panel9.TabIndex = 184;
             // 
+            // label104
+            // 
+            this.label104.AutoSize = true;
+            this.label104.BackColor = System.Drawing.Color.Black;
+            this.label104.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
+            this.label104.ForeColor = System.Drawing.Color.Red;
+            this.label104.Location = new System.Drawing.Point(288, 337);
+            this.label104.Name = "label104";
+            this.label104.Size = new System.Drawing.Size(347, 21);
+            this.label104.TabIndex = 169;
+            this.label104.Text = "â€»å�„ã‚³ãƒ¡ãƒ³ãƒˆã�¯å¿…ã�šè¨˜å…¥ã�™ã‚‹ã�“ã�¨ã€‚";
+            // 
+            // label94
+            // 
+            this.label94.BackColor = System.Drawing.Color.Moccasin;
+            this.label94.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
+            this.label94.Font = new System.Drawing.Font("ï¼­ï¼³ æ˜Žæœ�", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
+            this.label94.ForeColor = System.Drawing.Color.Black;
+            this.label94.Location = new System.Drawing.Point(1, 422);
+            this.label94.Name = "label94";
+            this.label94.Size = new System.Drawing.Size(120, 40);
+            this.label94.TabIndex = 168;
+            this.label94.Text = "æ˜¯æ­£å®Œäº†\r\nã‚³ãƒ¡ãƒ³ãƒˆ";
+            this.label94.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
+            // 
             // dgvBillingDate
             // 
             this.dgvBillingDate.AllowUserToAddRows = false;
@@ -3494,6 +3560,20 @@
             this.label127.Text = "è«‹æ±‚ç”³è«‹æ—¥";
             this.label127.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
             // 
+            // textBox4
+            // 
+            this.textBox4.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
+            | System.Windows.Forms.AnchorStyles.Right)));
+            this.textBox4.Font = new System.Drawing.Font("ï¼­ï¼³ æ˜Žæœ�", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
+            this.textBox4.ImeMode = System.Windows.Forms.ImeMode.On;
+            this.textBox4.Location = new System.Drawing.Point(127, 422);
+            this.textBox4.MaxLength = 120;
+            this.textBox4.Multiline = true;
+            this.textBox4.Name = "textBox4";
+            this.textBox4.Size = new System.Drawing.Size(507, 54);
+            this.textBox4.TabIndex = 64;
+            this.textBox4.TextChanged += new System.EventHandler(this.valueChange);
+            // 
             // textBox2
             // 
             this.textBox2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
@@ -4097,82 +4177,6 @@
             this.label49.Text = "â€»å·¥äº‹å��ç§°ã�¯ä¸‹è¨˜ã�®å·¥äº‹å��ç§°ã�®é …ç›®ã�¨é€£å‹•ã�—ã�¦è¨˜å…¥ã�•ã‚Œã�¾ã�™";
             this.label49.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
             // 
-            // label94
-            // 
-            this.label94.BackColor = System.Drawing.Color.Moccasin;
-            this.label94.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
-            this.label94.Font = new System.Drawing.Font("ï¼­ï¼³ æ˜Žæœ�", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
-            this.label94.ForeColor = System.Drawing.Color.Black;
-            this.label94.Location = new System.Drawing.Point(1, 422);
-            this.label94.Name = "label94";
-            this.label94.Size = new System.Drawing.Size(120, 40);
-            this.label94.TabIndex = 168;
-            this.label94.Text = "æ˜¯æ­£å®Œäº†\r\nã‚³ãƒ¡ãƒ³ãƒˆ";
-            this.label94.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
-            // 
-            // textBox4
-            // 
-            this.textBox4.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
-            | System.Windows.Forms.AnchorStyles.Right)));
-            this.textBox4.Font = new System.Drawing.Font("ï¼­ï¼³ æ˜Žæœ�", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
-            this.textBox4.ImeMode = System.Windows.Forms.ImeMode.On;
-            this.textBox4.Location = new System.Drawing.Point(127, 422);
-            this.textBox4.MaxLength = 120;
-            this.textBox4.Multiline = true;
-            this.textBox4.Name = "textBox4";
-            this.textBox4.Size = new System.Drawing.Size(507, 54);
-            this.textBox4.TabIndex = 64;
-            this.textBox4.TextChanged += new System.EventHandler(this.valueChange);
-            // 
-            // label104
-            // 
-            this.label104.AutoSize = true;
-            this.label104.BackColor = System.Drawing.Color.Black;
-            this.label104.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
-            this.label104.ForeColor = System.Drawing.Color.Red;
-            this.label104.Location = new System.Drawing.Point(288, 337);
-            this.label104.Name = "label104";
-            this.label104.Size = new System.Drawing.Size(347, 21);
-            this.label104.TabIndex = 169;
-            this.label104.Text = "â€»å�„ã‚³ãƒ¡ãƒ³ãƒˆã�¯å¿…ã�šè¨˜å…¥ã�™ã‚‹ã�“ã�¨ã€‚";
-            // 
-            // label105
-            // 
-            this.label105.AutoSize = true;
-            this.label105.BackColor = System.Drawing.Color.Black;
-            this.label105.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
-            this.label105.Font = new System.Drawing.Font("ï¼­ï¼³ æ˜Žæœ�", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
-            this.label105.ForeColor = System.Drawing.Color.Red;
-            this.label105.Location = new System.Drawing.Point(288, 503);
-            this.label105.Name = "label105";
-            this.label105.Size = new System.Drawing.Size(347, 21);
-            this.label105.TabIndex = 186;
-            this.label105.Text = "â€»å�„ã‚³ãƒ¡ãƒ³ãƒˆã�¯å¿…ã�šè¨˜å…¥ã�™ã‚‹ã�“ã�¨ã€‚";
-            // 
-            // label106
-            // 
-            this.label106.AutoSize = true;
-            this.label106.BackColor = System.Drawing.Color.Black;
-            this.label106.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
-            this.label106.ForeColor = System.Drawing.Color.Red;
-            this.label106.Location = new System.Drawing.Point(289, 738);
-            this.label106.Name = "label106";
-            this.label106.Size = new System.Drawing.Size(347, 21);
-            this.label106.TabIndex = 191;
-            this.label106.Text = "â€»å�„ã‚³ãƒ¡ãƒ³ãƒˆã�¯å¿…ã�šè¨˜å…¥ã�™ã‚‹ã�“ã�¨ã€‚";
-            // 
-            // label107
-            // 
-            this.label107.AutoSize = true;
-            this.label107.BackColor = System.Drawing.Color.Black;
-            this.label107.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
-            this.label107.ForeColor = System.Drawing.Color.Red;
-            this.label107.Location = new System.Drawing.Point(288, 759);
-            this.label107.Name = "label107";
-            this.label107.Size = new System.Drawing.Size(347, 21);
-            this.label107.TabIndex = 177;
-            this.label107.Text = "â€»å�„ã‚³ãƒ¡ãƒ³ãƒˆã�¯å¿…ã�šè¨˜å…¥ã�™ã‚‹ã�“ã�¨ã€‚";
-            // 
             // FrmConstructionBaseInfo
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
Index: branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionBaseInfo/FrmConstructionBaseInfoAuxiliary.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionBaseInfo/FrmConstructionBaseInfoAuxiliary.cs	(revision 329)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionBaseInfo/FrmConstructionBaseInfoAuxiliary.cs	(revision 330)
@@ -1163,39 +1163,31 @@
                 // �\�¿�E�³”F�E”­‹‹“ú•t‚ÌƒZƒbƒg
                 SetLabelDates();
 
-                // �æ‚É‰c‹Æ’S“–•”��‚ÌƒZƒbƒg‚ð‚·‚é
+                // ‰c‹Æ’S“–•”��‚ÌƒZƒbƒg‚ð‚·‚é
                 if (worklist[0].SalesPersonCode != 0)
                 {
-                    SetDepartmentCombData(worklist[0].SalesPersonCode, comboBoxEX1);
-                    SetcombBoxPerson(CommonMotions.cnvInt(comboBoxEX1.SelectedValue), cmbDisplayPerson);
+                    SetDepartmentCombData(worklist[0].SalesDepCode, comboBoxEX1);
+                    SetcombBoxPerson(CommonMotions.cnvInt(comboBoxEX1.SelectedValue), cmbDisplayPerson, worklist[0].SalesPersonCode);
                 }
-                // �æ‚É�HŽ–’S“–•”��‚ÌƒZƒbƒg‚ð‚·‚é
+                // �HŽ–’S“–•”��‚ÌƒZƒbƒg‚ð‚·‚é
                 if (worklist[0].ConstructionPersonCode != 0)
                 {
-                    SetDepartmentCombData(worklist[0].ConstructionPersonCode, comboBoxEX2);
-                    SetcombBoxPerson(CommonMotions.cnvInt(comboBoxEX2.SelectedValue), cmbDisplayConstructionPerson);
+                    SetDepartmentCombData(worklist[0].ConstrDepCode, comboBoxEX2);
+                    SetcombBoxPerson(CommonMotions.cnvInt(comboBoxEX2.SelectedValue), cmbDisplayConstructionPerson, worklist[0].ConstructionPersonCode);
                 }
-                // �æ‚É�HŽ–•›’S“–•”��‚ÌƒZƒbƒg‚ð‚·‚é
+                // �HŽ–•›’S“–•”��‚ÌƒZƒbƒg‚ð‚·‚é
                 if (worklist[0].ConstrSubPersonCode != 0)
                 {
-                    SetDepartmentCombData(worklist[0].ConstrSubPersonCode, comboBoxEX3);
-                    SetcombBoxPerson(CommonMotions.cnvInt(comboBoxEX3.SelectedValue), cmbDisplayConstrSubPerson);
+                    SetDepartmentCombData(worklist[0].ConstrSubDepCode, comboBoxEX3);
+                    SetcombBoxPerson(CommonMotions.cnvInt(comboBoxEX3.SelectedValue), cmbDisplayConstrSubPerson, worklist[0].ConstrSubPersonCode);
                 }
-                // �æ‚ÉŽw“±ˆõ•”��‚ÌƒZƒbƒg‚ð‚·‚é
+                // Žw“±ˆõ•”��‚ÌƒZƒbƒg‚ð‚·‚é
                 if (worklist[0].ConstructionInstructor != 0)
                 {
-                    SetDepartmentCombData(worklist[0].ConstructionInstructor, comboBoxEX4);
-                    SetcombBoxPerson(CommonMotions.cnvInt(comboBoxEX4.SelectedValue), cmbConstructionInstructor);
+                    SetDepartmentCombData(worklist[0].ConstrInstrDepCode, comboBoxEX4);
+                    SetcombBoxPerson(CommonMotions.cnvInt(comboBoxEX4.SelectedValue), cmbConstructionInstructor, worklist[0].ConstructionInstructor);
                 }
 
-                ((ComboBox)m_DspCtrl[(int)DspCnt.SalesPersonCode]).SelectedValue = worklist[0].SalesPersonCode;                                             // ‰c‹Æ’S“–ŽÒƒR�[ƒh
-
-                ((ComboBox)m_DspCtrl[(int)DspCnt.ConstructionPersonCode]).SelectedValue = worklist[0].ConstructionPersonCode;                               // �HŽ–’S“–ŽÒƒR�[ƒh
-
-                ((ComboBox)m_DspCtrl[(int)DspCnt.ConstrSubPersonCode]).SelectedValue = worklist[0].ConstrSubPersonCode;                                     // �HŽ–•›’S“–ŽÒƒR�[ƒh
-
-                ((ComboBox)m_DspCtrl[(int)DspCnt.ConstructionInstructor]).SelectedValue = worklist[0].ConstructionInstructor;                               // �HŽ–Žw“±ˆõƒR�[ƒh
-
                 ((ComboBox)m_DspCtrl[(int)DspCnt.OrderersDivision]).SelectedValue = worklist[0].OrderersDivision;                                           // ”­’�ŽÒ‹æ•ª
                 // ”­’�ŽÒƒRƒ“ƒ{�X�V
                 SetcmbOrderers();
@@ -2051,6 +2043,7 @@
             {
                 StringBuilder strSQL = new StringBuilder();
                 strSQL.AppendFormat(" Where ConstructionCode = {0}", m_ConstructionCode);
+                strSQL.AppendFormat(" And DetailNo < {0}", (int)ConstructionBaseInfoDetail.DataNoDef.SalesDepartmentName);
                 strSQL.Append(" Order By DetailNo");
                 // �HŽ–Šî–{�î•ñŽæ“¾
                 List<ConstructionBaseInfoDetail> worklist = new List<ConstructionBaseInfoDetail>();
@@ -2141,6 +2134,9 @@
                 // •\Ž¦ƒNƒŠƒA
                 ClearDisplay();
 
+                // ƒeƒLƒXƒgƒ{ƒbƒNƒX–¢’èƒZƒbƒg
+                SetTextBoxBackString();
+
                 // ƒf�[ƒ^•\Ž¦
                 if (!DataDisplay()) return;
                 if (!DataDisplayDetail()) return;
@@ -2155,26 +2151,35 @@
         }
         #endregion
 
-        #region ƒRƒ“ƒ{ƒ{ƒbƒNƒX‚É’S“–ŽÒƒR�[ƒh‚æ‚è•”��‚ðƒZƒbƒg‚·‚é
+        #region ƒRƒ“ƒ{ƒ{ƒbƒNƒX‚É•”��ƒR�[ƒh‚æ‚è•”��‚ðƒZƒbƒg‚·‚é
         /// <summary>
-        /// ƒRƒ“ƒ{ƒ{ƒbƒNƒX‚É’S“–ŽÒƒR�[ƒh‚æ‚è•”��‚ðƒZƒbƒg‚·‚é
+        /// ƒRƒ“ƒ{ƒ{ƒbƒNƒX‚É•”��ƒR�[ƒh‚æ‚è•”��‚ðƒZƒbƒg‚·‚é
         /// </summary>
-        /// <param name="PersonCode"></param>
+        /// <param name="DepartMentCode"></param>
         /// <param name="comb"></param>
-        private void SetDepartmentCombData(int PersonCode, ComboBox comb)
+        private void SetDepartmentCombData(int DepartMentCode, ComboBox comb)
         {
-            IOMPersonInCharge picDB = new IOMPersonInCharge();
+            comb.SelectedIndexChanged -= new System.EventHandler(this.comboBoxEX1_SelectedIndexChanged);
+            IOMDepartment DepDB = new IOMDepartment();
             try
             {
-                // ’S“–ŽÒƒ}ƒXƒ^“Ç�ž
-                string strSQL = picDB.CreatePrimarykeyString(PersonCode);
-                PersonInChargeMaster picRec = new PersonInChargeMaster();
-                if (!picDB.SelectAction(strSQL, ref picRec)) return;
+                // ƒf�[ƒ^‚ª‚ ‚é‚©‚Ì”»’è
+                List<KeyValuePair<int, string>> wrkList = (List<KeyValuePair<int, string>>)comb.DataSource;
+                KeyValuePair<int, string> wrkRec = wrkList.Find(x => x.Key == DepartMentCode);
+                // –³‚¢�ê�‡‚Í’Ç‰Á‚·‚é
+                if (wrkRec.Key == 0 && wrkRec.Value == null)
+                {
+                    // •”��ƒ}ƒXƒ^“Ç�ž
+                    string strSQL = DepDB.CreatePrimarykeyString(DepartMentCode);
+                    DepartmentMaster depRec = new DepartmentMaster();
+                    if (!DepDB.SelectAction(strSQL, ref depRec)) return;
+                    wrkList.Add(new KeyValuePair<int, string>(depRec.DepartmentCode, depRec.DepartmentString));
 
-                bool bSave = bInitFlg;
-                bInitFlg = true;
-                comb.SelectedValue = picRec.DepartmentCode;
-                bInitFlg = bSave;
+                    // ƒRƒ“ƒ{ƒ{ƒbƒNƒX�‰Šú•\Ž¦
+                    ComboBoxAction.InitDataSetCombBox(comb, wrkList);
+                }
+                // ƒR�[ƒhƒZƒbƒg
+                comb.SelectedValue = DepartMentCode;
             }
             catch (Exception ex)
             {
@@ -2182,7 +2187,8 @@
             }
             finally
             {
-                picDB.close(); picDB = null;
+                DepDB.close(); DepDB = null;
+                comb.SelectedIndexChanged += new System.EventHandler(this.comboBoxEX1_SelectedIndexChanged);
             }
         }
         #endregion
@@ -2191,7 +2197,7 @@
         /// <summary>
         /// ’S“–ŽÒƒRƒ“ƒ{ƒ{ƒbƒNƒX‚Ö•¶Žš‚ðƒZƒbƒg‚·‚é
         /// </summary>
-        private bool SetcombBoxPerson(int DepartmentCode, ComboBox comb)
+        private bool SetcombBoxPerson(int DepartmentCode, ComboBox comb, int PersonCode = 0)
         {
             IOMPersonInCharge picDB = new IOMPersonInCharge();
             try
@@ -2198,15 +2204,22 @@
             {
                 List<PersonInChargeMaster> workList = new List<PersonInChargeMaster>();
                 // ’S“–ŽÒƒ}ƒXƒ^‚ðŒŸ�õ‚·‚é
-                string strSQL = string.Format(" Where DepartmentCode = {0}", DepartmentCode);
-                strSQL += " AND DeleteFlg = 0 Order By EmployeeClassFlg ASC, DisplayOrder ASC";
+                StringBuilder strSQL = new StringBuilder();
+                strSQL.AppendFormat(" Where DepartmentCode = {0}", DepartmentCode);
+                strSQL.AppendFormat(" AND DeleteFlg = 0 Order By EmployeeClassFlg ASC, DisplayOrder ASC");
 
                 // ’S“–ŽÒƒ}ƒXƒ^“Ç�ž
-                if (!picDB.SelectAction(strSQL, ref workList)) return false;
+                if (!picDB.SelectAction(strSQL.ToString(), ref workList)) return false;
 
                 List<KeyValuePair<int, string>> DataList = new List<KeyValuePair<int, string>>();
                 DataList.Add(new KeyValuePair<int, string>(0, CommonDefine.s_UndecidedString));
 
+                // ’S“–ŽÒƒR�[ƒhŽw’èŽž‚Íƒf�[ƒ^‘¶�Ýƒ`ƒFƒbƒN
+                if (PersonCode > 0)
+                {
+                    CheckArrayInPersonCode(picDB, PersonCode, workList, ref DataList);
+                }
+
                 // ƒf�[ƒ^•\Ž¦
                 foreach (PersonInChargeMaster wrk in workList)
                 {
@@ -2217,8 +2230,16 @@
 
                 // ƒRƒ“ƒ{ƒ{ƒbƒNƒX�‰Šú•\Ž¦
                 ComboBoxAction.InitDataSetCombBox(comb, DataList);
-                comb.SelectedIndex = -1;
 
+                if (PersonCode < 1)
+                {
+                    comb.SelectedIndex = -1;
+                }
+                else
+                {
+                    comb.SelectedValue = PersonCode;
+                }
+
                 return true;
             }
             catch (Exception ex)
@@ -2233,6 +2254,38 @@
         }
         #endregion
 
+        #region ’S“–ŽÒƒ}ƒXƒ^”z—ñ‚É’S“–ŽÒƒR�[ƒh‚ª‚ ‚é‚©‚ðƒ`ƒFƒbƒN‚µ‚Ä–³‚¯‚ê‚ÎDataList‚Ö’Ç‰Á‚·‚é
+        /// <summary>
+        /// ’S“–ŽÒƒ}ƒXƒ^”z—ñ‚É’S“–ŽÒƒR�[ƒh‚ª‚ ‚é‚©‚ðƒ`ƒFƒbƒN‚µ‚Ä–³‚¯‚ê‚ÎDataList‚Ö’Ç‰Á‚·‚é
+        /// </summary>
+        /// <returns></returns>
+        private void CheckArrayInPersonCode(IOMPersonInCharge picDB
+                                            , int PersonCode
+                                            , List<PersonInChargeMaster> GetList
+                                            , ref List<KeyValuePair<int, string>> DataList)
+        {
+            try
+            {
+                // ‘Î�ÛƒR�[ƒh‚ðŽ�‚Âƒf�[ƒ^‚ª‚ ‚é‚©
+                PersonInChargeMaster wrkRec = GetList.Find(x => x.PersonCode == PersonCode);
+                // ‚ ‚ê‚Î�ˆ—�‚µ‚È‚¢
+                if (wrkRec != null) return;
+
+                StringBuilder strSQL = new StringBuilder();
+                strSQL.AppendFormat(" Where PersonCode = {0}", PersonCode);
+
+                wrkRec = new PersonInChargeMaster();
+                if (!picDB.SelectAction(strSQL.ToString(), ref wrkRec)) return;
+
+                DataList.Add(new KeyValuePair<int, string>(wrkRec.PersonCode, wrkRec.PersonName));
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("ƒVƒXƒeƒ€ƒGƒ‰�[�F{0}�F{1}", CommonMotions.GetMethodName(), ex.Message);
+            }
+        }
+        #endregion
+
         #region ’S“–ŽÒƒRƒ“ƒ{ƒ{ƒbƒNƒX�‰ŠúƒZƒbƒg
         /// <summary>
         /// ’S“–ŽÒƒRƒ“ƒ{ƒ{ƒbƒNƒX‚Ö•¶Žš‚ðƒZƒbƒg‚·‚é
@@ -2357,10 +2410,15 @@
             try
             {
                 // •”��ƒ}ƒXƒ^‚ðŒŸ�õ‚·‚é
-                string strSQL = " Where DeleteFlg = 0 ORDER BY DisplayOrder ASC";
-                List<DepartmentMaster> dmList = new List<DepartmentMaster>();
+                //string strSQL = " Where DeleteFlg = 0 ORDER BY DisplayOrder ASC";
+                int nPeriod = CommonMotions.cnvInt(cmbConstructionPeriod.Text);
+                if (nPeriod < 1) nPeriod = CommonMotions.SystemMasterData.BusinessPeriod;
+                StringBuilder strSQL = new StringBuilder();
+                CommonMotions.CreateDepCombBoxSQL(ref strSQL, nPeriod);
+
+                ArrayList dmList = new ArrayList();
                 // •”��ƒ}ƒXƒ^“Ç�ž
-                if (!dmDB.SelectAction(strSQL, ref dmList)) return false;
+                if (!dmDB.ExecuteReader(strSQL.ToString(), ref dmList)) return false;
 
                 List<KeyValuePair<int, string>> DataList1 = new List<KeyValuePair<int, string>>();
                 List<KeyValuePair<int, string>> DataList2 = new List<KeyValuePair<int, string>>();
@@ -2371,9 +2429,10 @@
                 DataList3.Add(new KeyValuePair<int, string>(0, CommonDefine.s_UndecidedString));
                 DataList4.Add(new KeyValuePair<int, string>(0, CommonDefine.s_UndecidedString));
                 // ƒf�[ƒ^•\Ž¦
-                foreach (DepartmentMaster wrk in dmList)
+                foreach (object[] wrk in dmList)
                 {
-                    KeyValuePair<int, string> keyval = new KeyValuePair<int, string>(wrk.DepartmentCode, wrk.DepartmentString);
+                    KeyValuePair<int, string> keyval = new KeyValuePair<int, string>(CommonMotions.cnvInt(wrk[0])
+                                                                                    , CommonMotions.cnvString(wrk[1]));
 
                     DataList1.Add(keyval);
                     DataList2.Add(keyval);
@@ -2675,6 +2734,124 @@
         }
         #endregion
 
+        #region ’S“–ŽÒƒRƒ“ƒ{ƒ{ƒbƒNƒX‚Æ‘Î‚Ì•”��ƒRƒ“ƒ{ƒ{ƒbƒNƒX‚ðŽæ“¾‚·‚é
+        /// <summary>
+        /// ’S“–ŽÒƒRƒ“ƒ{ƒ{ƒbƒNƒX‚Æ‘Î‚Ì•”��ƒRƒ“ƒ{ƒ{ƒbƒNƒX‚ðŽæ“¾‚·‚é
+        /// </summary>
+        /// <returns></returns>
+        private ComboBox GetPerson2DepartComb(ComboBox comboPerson)
+        {
+            try
+            {
+                ComboBox combDepWrk = null;
+
+                if (comboPerson.Name.Equals(cmbDisplayPerson.Name))
+                {
+                    // 56: ‰c‹Æ’S“–•”��
+                    combDepWrk = comboBoxEX1;
+                }
+                else if (comboPerson.Name.Equals(cmbDisplayConstructionPerson.Name))
+                {
+                    // 63: �HŽ–’S“–•”��
+                    combDepWrk = comboBoxEX2;
+                }
+                else if (comboPerson.Name.Equals(cmbConstructionInstructor.Name))
+                {
+                    // 80: Žw“±ˆõ•”��
+                    combDepWrk = comboBoxEX4;
+                }
+                else if (comboPerson.Name.Equals(cmbDisplayConstrSubPerson.Name))
+                {
+                    // 79: �HŽ–•›’S“–•”��
+                    combDepWrk = comboBoxEX3;
+                }
+
+                return combDepWrk;
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("ƒVƒXƒeƒ€ƒGƒ‰�[�F{0}�F{1}", CommonMotions.GetMethodName(), ex.Message);
+                return null;
+            }
+        }
+        #endregion
+
+        #region •”��ƒRƒ“ƒ{ƒ{ƒbƒNƒX‚Æ‘Î‚Ì’S“–ŽÒƒRƒ“ƒ{ƒ{ƒbƒNƒX‚ðŽæ“¾‚·‚é
+        /// <summary>
+        /// •”��ƒRƒ“ƒ{ƒ{ƒbƒNƒX‚Æ‘Î‚Ì’S“–ŽÒƒRƒ“ƒ{ƒ{ƒbƒNƒX‚ðŽæ“¾‚·‚é
+        /// </summary>
+        /// <returns></returns>
+        private ComboBox GetDepartComb2Person(ComboBox comboDepart)
+        {
+            try
+            {
+                ComboBox combManWrk = null;
+
+                if (comboDepart.Name.Equals(comboBoxEX1.Name))
+                {
+                    //  3: ‰c‹Æ’S“–ŽÒƒR�[ƒh
+                    combManWrk = cmbDisplayPerson;
+                }
+                else if (comboDepart.Name.Equals(comboBoxEX2.Name))
+                {
+                    //  4: �HŽ–’S“–ŽÒƒR�[ƒh
+                    combManWrk = cmbDisplayConstructionPerson;
+                }
+                else if (comboDepart.Name.Equals(comboBoxEX4.Name))
+                {
+                    // 46: �HŽ–Žw“±ˆõ
+                    combManWrk = cmbConstructionInstructor;
+                }
+                else if (comboDepart.Name.Equals(comboBoxEX3.Name))
+                {
+                    // 81: �HŽ–•›’S“–ŽÒƒR�[ƒh
+                    combManWrk = cmbDisplayConstrSubPerson;
+                }
+
+                return combManWrk;
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("ƒVƒXƒeƒ€ƒGƒ‰�[�F{0}�F{1}", CommonMotions.GetMethodName(), ex.Message);
+                return null;
+            }
+        }
+        #endregion
+
+        #region ’S“–ŽÒƒRƒ“ƒ{ƒ{ƒbƒNƒX•Ï�X�ˆ—�
+        /// <summary>
+        /// ’S“–ŽÒƒRƒ“ƒ{ƒ{ƒbƒNƒX•Ï�X�ˆ—�
+        /// </summary>
+        /// <param name="sender"></param>
+        private void PersonCombBoxChange(object sender)
+        {
+            IOMPersonInCharge PersonDB = new IOMPersonInCharge();
+            try
+            {
+                ComboBox combManWrk = (ComboBox)sender;
+                ComboBox combDepWrk = GetPerson2DepartComb(combManWrk);
+
+                // ’S“–ŽÒŽæ“¾
+                int PersonCode = CommonMotions.cnvInt(combManWrk.SelectedValue);
+                StringBuilder strSQL = new StringBuilder();
+                strSQL.Append(PersonDB.CreatePrimarykeyString(PersonCode));
+                PersonInChargeMaster PersonRec = new PersonInChargeMaster();
+                if (!PersonDB.SelectAction(strSQL.ToString(), ref PersonRec)) PersonRec.DepartmentCode = 0;
+
+                // •”��ƒZƒbƒg
+                combDepWrk.SelectedValue = PersonRec.DepartmentCode;
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("ƒVƒXƒeƒ€ƒGƒ‰�[�F{0}�F{1}", CommonMotions.GetMethodName(), ex.Message);
+            }
+            finally
+            {
+                PersonDB.close(); PersonDB = null;
+            }
+        }
+        #endregion
+
         #region �HŽ–Šî–{�î•ñ“o˜^
         /// <summary>
         /// �HŽ–Šî–{�î•ñ“o˜^
@@ -2772,22 +2949,58 @@
                 if (m_DspCtrl[(int)DspCnt.OrdersDecisionPriceInTax].Text.Length != 0)
                     work.OrdersDecisionPriceInTax = (int)CommonMotions.cnvUndecidedStringToDouble(m_DspCtrl[(int)DspCnt.OrdersDecisionPriceInTax].Text);
 
+                // •”��–¼‚Ì�X�V”»’è‚ð‚±‚±‚Å�s‚¤
+                DetailNoList.Clear();
+
+                // ‰c‹Æ’S“–ŽÒ•”��ƒR�[ƒh
+                if (m_DspCtrl[(int)DspCnt.SalesDepartment].Text.Length != 0)
+                {
+                    work.SalesDepCode = CommonMotions.cnvInt(((ComboBox)m_DspCtrl[(int)DspCnt.SalesDepartment]).SelectedValue);
+                    if (workList[0].SalesDepCode != work.SalesDepCode) DetailNoList.Add((int)ConstructionBaseInfoDetail.DataNoDef.SalesDepartmentName);
+                }
                 // ‰c‹Æ’S“–ŽÒƒR�[ƒh
                 if (m_DspCtrl[(int)DspCnt.SalesPersonCode].Text.Length != 0)
-                    work.SalesPersonCode = CommonMotions.cnvInt(((ComboBox)m_DspCtrl[(int)DspCnt.SalesPersonCode]).SelectedValue.ToString());
+                    work.SalesPersonCode = CommonMotions.cnvInt(((ComboBox)m_DspCtrl[(int)DspCnt.SalesPersonCode]).SelectedValue);
+
+                // �HŽ–’S“–ŽÒ•”��ƒR�[ƒh
+                if (m_DspCtrl[(int)DspCnt.ConstructionDepartment].Text.Length != 0
+                    && m_DspCtrl[(int)DspCnt.ConstructionDepartment].Text != CommonDefine.s_UndecidedString)
+                {
+                    work.ConstrDepCode = CommonMotions.cnvInt(((ComboBox)m_DspCtrl[(int)DspCnt.ConstructionDepartment]).SelectedValue);
+                    if (workList[0].ConstrDepCode != work.ConstrDepCode) DetailNoList.Add((int)ConstructionBaseInfoDetail.DataNoDef.ConstrDepartmentName);
+                }
                 // �HŽ–’S“–ŽÒƒR�[ƒh
-                if (m_DspCtrl[(int)DspCnt.ConstructionPersonCode].Text.Length != 0 && m_DspCtrl[(int)DspCnt.ConstructionPersonCode].Text.ToString() != CommonDefine.s_UndecidedString)
-                    work.ConstructionPersonCode = CommonMotions.cnvInt(((ComboBox)m_DspCtrl[(int)DspCnt.ConstructionPersonCode]).SelectedValue.ToString());
+                if (m_DspCtrl[(int)DspCnt.ConstructionPersonCode].Text.Length != 0
+                    && m_DspCtrl[(int)DspCnt.ConstructionPersonCode].Text != CommonDefine.s_UndecidedString)
+                    work.ConstructionPersonCode = CommonMotions.cnvInt(((ComboBox)m_DspCtrl[(int)DspCnt.ConstructionPersonCode]).SelectedValue);
+
+                // �HŽ–•›’S“–ŽÒ•”��ƒR�[ƒh
+                if (m_DspCtrl[(int)DspCnt.ConstrSubDepartment].Text.Length != 0
+                    && m_DspCtrl[(int)DspCnt.ConstrSubDepartment].Text != CommonDefine.s_UndecidedString)
+                {
+                    work.ConstrSubDepCode = CommonMotions.cnvInt(((ComboBox)m_DspCtrl[(int)DspCnt.ConstrSubDepartment]).SelectedValue);
+                    if (workList[0].ConstrSubDepCode != work.ConstrSubDepCode) DetailNoList.Add((int)ConstructionBaseInfoDetail.DataNoDef.ConstrSubDepartmentName);
+                }
                 // �HŽ–•›’S“–ŽÒƒR�[ƒh
-                if (m_DspCtrl[(int)DspCnt.ConstrSubPersonCode].Text.Length != 0 && m_DspCtrl[(int)DspCnt.ConstrSubPersonCode].Text.ToString() != CommonDefine.s_UndecidedString)
-                    work.ConstrSubPersonCode = CommonMotions.cnvInt(((ComboBox)m_DspCtrl[(int)DspCnt.ConstrSubPersonCode]).SelectedValue.ToString());
+                if (m_DspCtrl[(int)DspCnt.ConstrSubPersonCode].Text.Length != 0
+                    && m_DspCtrl[(int)DspCnt.ConstrSubPersonCode].Text != CommonDefine.s_UndecidedString)
+                    work.ConstrSubPersonCode = CommonMotions.cnvInt(((ComboBox)m_DspCtrl[(int)DspCnt.ConstrSubPersonCode]).SelectedValue);
+
+                // �HŽ–Žw“±ˆõ•”��ƒR�[ƒh
+                if (m_DspCtrl[(int)DspCnt.InstructorDepartment].Text.Length != 0
+                    && m_DspCtrl[(int)DspCnt.InstructorDepartment].Text != CommonDefine.s_UndecidedString)
+                {
+                    work.ConstrInstrDepCode = CommonMotions.cnvInt(((ComboBox)m_DspCtrl[(int)DspCnt.InstructorDepartment]).SelectedValue);
+                    if (workList[0].ConstrInstrDepCode != work.ConstrInstrDepCode) DetailNoList.Add((int)ConstructionBaseInfoDetail.DataNoDef.InstrDepartmentName);
+                }
                 // �HŽ–Žw“±ˆõƒR�[ƒh
-                if (m_DspCtrl[(int)DspCnt.ConstructionInstructor].Text.Length != 0 && m_DspCtrl[(int)DspCnt.ConstructionInstructor].Text.ToString() != CommonDefine.s_UndecidedString)
-                    work.ConstructionInstructor = CommonMotions.cnvInt(((ComboBox)m_DspCtrl[(int)DspCnt.ConstructionInstructor]).SelectedValue.ToString());
+                if (m_DspCtrl[(int)DspCnt.ConstructionInstructor].Text.Length != 0
+                    && m_DspCtrl[(int)DspCnt.ConstructionInstructor].Text != CommonDefine.s_UndecidedString)
+                    work.ConstructionInstructor = CommonMotions.cnvInt(((ComboBox)m_DspCtrl[(int)DspCnt.ConstructionInstructor]).SelectedValue);
 
                 // �HŽ–ˆÚŠÇ�æƒR�[ƒh
                 if (m_DspCtrl[(int)DspCnt.TransferConstruction].Text.Length != 0)
-                    work.TransferConstruction = CommonMotions.cnvInt(((ComboBox)m_DspCtrl[(int)DspCnt.TransferConstruction]).SelectedValue.ToString());
+                    work.TransferConstruction = CommonMotions.cnvInt(((ComboBox)m_DspCtrl[(int)DspCnt.TransferConstruction]).SelectedValue);
                 // �HŽ–ˆÚŠÇ“ú
                 if (m_DspCtrl[(int)DspCnt.TransferConstructionDate].Text.Length != 0)
                     work.TransferConstructionDate = CommonMotions.cnvUndecidedStringToDate(m_DspCtrl[(int)DspCnt.TransferConstructionDate].Text);
@@ -2794,10 +3007,10 @@
 
                 // ”­’�ŽÒ‹æ•ª
                 if (m_DspCtrl[(int)DspCnt.OrderersDivision].Text.Length != 0)
-                    work.OrderersDivision = CommonMotions.cnvInt(((ComboBox)m_DspCtrl[(int)DspCnt.OrderersDivision]).SelectedValue.ToString());
+                    work.OrderersDivision = CommonMotions.cnvInt(((ComboBox)m_DspCtrl[(int)DspCnt.OrderersDivision]).SelectedValue);
                 // ”­’�ŽÒƒR�[ƒh
                 if (m_DspCtrl[(int)DspCnt.OrderersCode].Text.Length != 0)
-                    work.OrderersCode = CommonMotions.cnvInt(((ComboBox)m_DspCtrl[(int)DspCnt.OrderersCode]).SelectedValue.ToString());
+                    work.OrderersCode = CommonMotions.cnvInt(((ComboBox)m_DspCtrl[(int)DspCnt.OrderersCode]).SelectedValue);
 
                 // Œ©�ÏŠúŒÀ
                 if (m_DspCtrl[(int)DspCnt.EstimatesExpirationDate].Text.Length != 0)
@@ -2821,28 +3034,10 @@
                 if (m_DspCtrl[(int)DspCnt.EndDate].Text.Length != 0)
                     work.EndDate = CommonMotions.cnvUndecidedStringToDate(m_DspCtrl[(int)DspCnt.EndDate].Text);
 
-                //// ’�•¶�‘—X‘—“ú
-                //if (m_DspCtrl[(int)DspCnt.PurchaseOrderMailingDate].Text.Length != 0)
-                //    work.PurchaseOrderMailingDate = CommonMotions.cnvUndecidedStringToDate(m_DspCtrl[(int)DspCnt.PurchaseOrderMailingDate].Text);
-                //// ’�•¶�‘•Ô‘—“ú
-                //if (m_DspCtrl[(int)DspCnt.PurchaseOrderReturnDate].Text.Length != 0)
-                //    work.PurchaseOrderReturnDate = CommonMotions.cnvUndecidedStringToDate(m_DspCtrl[(int)DspCnt.PurchaseOrderReturnDate].Text);
-                //// ’�•¶�‘•Ô‘—Šm”F“ú
-                //if (m_DspCtrl[(int)DspCnt.PurchaseOrderReturnCheckDate].Text.Length != 0)
-                //    work.PurchaseOrderReturnCheckDate = CommonMotions.cnvUndecidedStringToDate(m_DspCtrl[(int)DspCnt.PurchaseOrderReturnCheckDate].Text);
-
                 // �Á”ï�Åƒtƒ‰ƒO
                 if (rdBConsumptionTaxOn.Checked) work.ConsumptionTaxFlg = (int)ConstructionBaseInfo.ConsumptionTaxFlgDef.Include;
                 else if (rdBConsumptionTaxOff.Checked) work.ConsumptionTaxFlg = (int)ConstructionBaseInfo.ConsumptionTaxFlgDef.NotInclue;
-                //if (rdBConsumptionTaxOn.Checked) work.ConsumptionTaxFlg = 1;
-                //else if (rdBConsumptionTaxOff.Checked) work.ConsumptionTaxFlg = 0;
 
-                // ‰c‹ÆŒo”ï”­�¶ƒtƒ‰ƒO
-                //if (rdbSalesCostOn.Checked) work.SalesCostFlg = (int)CommonDefine.BaseInfoSalesCostFlg.On;
-                //else if (rdbSalesCostOff.Checked) work.SalesCostFlg = (int)CommonDefine.BaseInfoSalesCostFlg.NotOn;
-                ////if (rdbSalesCostOn.Checked) work.SalesCostFlg = 1;
-                ////else if (rdbSalesCostOff.Checked) work.SalesCostFlg = 0;
-
                 // �HŽ–�ó‘Ôƒtƒ‰ƒO
                 work.ConstructionStatusFlg = iStatus;
 
@@ -2865,10 +3060,6 @@
                 if (rdbBillingSplit.Checked) work.BillingSplitFlg = (int)ConstructionBaseInfo.BillingSplitFlgDef.SplitBilling;         // •ªŠ„�¿‹�
                 else if (rdbBillingAll.Checked) work.BillingSplitFlg = (int)ConstructionBaseInfo.BillingSplitFlgDef.AllOnBilling;      // ˆêŠ‡�¿‹�
 
-                //// �¿‹��‘—X‘—“ú
-                //if (m_DspCtrl[(int)DspCnt.BillingSendDate].Text.Length != 0)
-                //    work.BillingSendDate = CommonMotions.cnvUndecidedStringToDate(m_DspCtrl[(int)DspCnt.BillingSendDate].Text);
-
                 // �HŽ–�Ú�×‘ä’ “ü—ÍŠ®—¹“ú
                 if (m_DspCtrl[(int)DspCnt.LedgerComplateDate].Text.Length != 0)
                     work.LedgerComplateDate = CommonMotions.cnvUndecidedStringToDate(m_DspCtrl[(int)DspCnt.LedgerComplateDate].Text);
@@ -2892,10 +3083,8 @@
                 if (workList.Count == 0)
                 {
                     // ƒf�[ƒ^‚ª‚È‚¢�ê�‡
-                    workList.Clear();
-                    workList.Add(work);
                     // ƒf�[ƒ^“o˜^
-                    if (!cbiDB.InsertAction(workList, false))
+                    if (!cbiDB.InsertAction(work, false))
                     {
                         MessageBox.Show("�HŽ–Šî–{�î•ñ�F’Ç‰Á“o˜^‚ÉŽ¸”s‚µ‚Ü‚µ‚½�B", "“o˜^ƒGƒ‰�[", MessageBoxButtons.OK, MessageBoxIcon.Error);
                         return false;
@@ -3080,43 +3269,35 @@
         }
         #endregion
 
-        #region �HŽ–Šî–{�î•ñ–¾�×�í�œ
+        #region �HŽ–Šî–{�î•ñ–¾�×“o˜^‘OŽæ“¾
         /// <summary>
-        /// �HŽ–Šî–{�î•ñ–¾�×�í�œ
+        /// �HŽ–Šî–{�î•ñ–¾�×“o˜^‘OŽæ“¾
         /// </summary>
-        private bool ConstructionBaseInfoDetailDataDelete(IOConstructionBaseInfoDetail cbidDB)
+        private void GetBaseInfoDetailData(IOConstructionBaseInfoDetail cbidDB
+                                            , int nConstrCode
+                                            , List<ConstructionBaseInfoDetail> oldDetail)
         {
             try
             {
-                List<ConstructionBaseInfoDetail> workList = new List<ConstructionBaseInfoDetail>();
-
-
-                string strWhere = cbidDB.CreatePrimarykeyString(CommonMotions.cnvIntFromStringCode(m_DspCtrl[(int)DspCnt.ConstructionCode].Text, "-"));
-                if (!cbidDB.SelectAction(strWhere, ref workList, false))
-                {
-                    MessageBox.Show("�HŽ–Šî–{�î•ñ–¾�×�F�í�œŠm”F‚ÉŽ¸”s‚µ‚Ü‚µ‚½�B", "�í�œƒGƒ‰�[", MessageBoxButtons.OK, MessageBoxIcon.Error);
-                    return false;
-                }
-                // ƒf�[ƒ^–³‚Í�ˆ—�‚µ‚È‚¢
-                if (workList.Count == 0) return true;
-
-                // ƒf�[ƒ^‚ª‚ ‚é�ê�‡
-                if (!cbidDB.DeleteAction(strWhere, false))
-                {
-                    MessageBox.Show("�HŽ–Šî–{�î•ñ–¾�×�F�í�œ‚ÉŽ¸”s‚µ‚Ü‚µ‚½�B", "�í�œƒGƒ‰�[", MessageBoxButtons.OK, MessageBoxIcon.Error);
-                    return false;
-                }
-
-                return true;
+                StringBuilder strWhere = new StringBuilder();
+                strWhere.Append(cbidDB.CreatePrimarykeyString(nConstrCode));
+                strWhere.Append(" ORDER BY DetailNo");
+                cbidDB.SelectAction(strWhere.ToString(), ref oldDetail, false);
             }
             catch (System.Exception ex)
             {
                 logger.ErrorFormat("ƒVƒXƒeƒ€ƒGƒ‰�[�F{0}�F{1}", CommonMotions.GetMethodName(), ex.Message);
-                return false;
             }
         }
         #endregion
 
+        #region �X�V•”��–¾�×”Ô�†
+        /// <summary>
+        /// �X�V•”��–¾�×”Ô�†
+        /// </summary>
+        private List<int> DetailNoList = new List<int>();
+        #endregion
+
         #region �HŽ–Šî–{�î•ñ–¾�×“o˜^
         /// <summary>
         /// �HŽ–Šî–{�î•ñ–¾�×“o˜^
@@ -3125,9 +3306,18 @@
         {
             try
             {
-                // �Å�‰‚É�í�œ
-                ConstructionBaseInfoDetailDataDelete(cbidDB);
+                // �HŽ–ƒR�[ƒh
+                int nConstrCode = CommonMotions.cnvIntFromStringCode(m_DspCtrl[(int)DspCnt.ConstructionCode].Text, "-");
 
+                // �æ‚ÉŽæ“¾‚·‚é
+                List<ConstructionBaseInfoDetail> oldDetail = new List<ConstructionBaseInfoDetail>();
+                GetBaseInfoDetailData(cbidDB, nConstrCode, oldDetail);
+                
+                // “o˜^ƒf�[ƒ^
+                ConstructionBaseInfoDetail work = new ConstructionBaseInfoDetail();
+                // �HŽ–ƒR�[ƒhƒZƒbƒg
+                work.ConstructionCode = nConstrCode;
+
                 // •\Ž¦”Ô�†‚Æ–¾�×”Ô�†‚Ì�·•ª‚ð‚Æ‚é
                 int iDifference = (int)DspCnt.OrderersName - (int)ConstructionBaseInfoDetail.DataNoDef.OrderersName;
                 int nStart = (int)ConstructionBaseInfoDetail.DataNoDef.OrderersName;
@@ -3139,29 +3329,103 @@
                     if (CommonMotions.chkObjectIsNull(wrkTextBox.Text)) continue;
                     if (wrkTextBox.Text.Length == 0) continue;
 
-                    List<ConstructionBaseInfoDetail> workList = new List<ConstructionBaseInfoDetail>();
-                    ConstructionBaseInfoDetail work = new ConstructionBaseInfoDetail();
-
-                    // �HŽ–ƒR�[ƒh
-                    work.ConstructionCode = CommonMotions.cnvIntFromStringCode(m_DspCtrl[(int)DspCnt.ConstructionCode].Text, "-");
                     // –¾�×”Ô�†
                     work.DetailNo = i;
 
                     // –¾�×“à—e
-                    work.DetailString = ((TextBox)m_DspCtrl[i + iDifference]).Text;
+                    int nCrtlCnt = i + iDifference;
+                    work.DetailString = ((TextBox)m_DspCtrl[nCrtlCnt]).Text;
 
-                    string strWhere = cbidDB.CreatePrimarykeyString(work.ConstructionCode, work.DetailNo);
+                    // ƒf�[ƒ^‚Ì—L–³‚ð”»’è
+                    ConstructionBaseInfoDetail CurRec = oldDetail.Find(x => x.DetailNo == work.DetailNo);
 
-                    // ƒf�[ƒ^‚ª‚È‚¢�ê�‡
-                    workList.Clear();
-                    workList.Add(work);
-                    // ƒf�[ƒ^“o˜^
-                    if (!cbidDB.InsertAction(workList, false))
+                    if (CurRec == null)
                     {
-                        MessageBox.Show("�HŽ–Šî–{�î•ñ–¾�×�F“o˜^“o˜^‚ÉŽ¸”s‚µ‚Ü‚µ‚½�B", "“o˜^ƒGƒ‰�[", MessageBoxButtons.OK, MessageBoxIcon.Error);
+                        // ƒf�[ƒ^‚ª‚È‚¢�ê�‡�Fƒf�[ƒ^�V‹K“o˜^
+                        if (!cbidDB.InsertAction(work, false))
+                        {
+                            MessageBox.Show("�HŽ–Šî–{�î•ñ–¾�×�F�V‹K“o˜^‚ÉŽ¸”s‚µ‚Ü‚µ‚½�B", "“o˜^ƒGƒ‰�[", MessageBoxButtons.OK, MessageBoxIcon.Error);
+                            return false;
+                        }
+                        continue;
+                    }
+
+                    // ƒf�[ƒ^‚ª‚ ‚é�ê�‡�F“à—e‚ªˆá‚¦‚Î�X�V“o˜^
+                    if (CurRec.DetailString == work.DetailString) continue;
+
+                    if (!cbidDB.UpdateFeild(work.ConstructionCode
+                                            , (int)IOConstructionBaseInfoDetail.TableColumn.DETAILSTRING
+                                            , work.DetailString
+                                            , false
+                                            , work.DetailNo))
+                    {
+                        MessageBox.Show("�HŽ–Šî–{�î•ñ–¾�×�F�X�V“o˜^‚ÉŽ¸”s‚µ‚Ü‚µ‚½�B", "“o˜^ƒGƒ‰�[", MessageBoxButtons.OK, MessageBoxIcon.Error);
                         return false;
                     }
                 }
+
+                // “o˜^ƒf�[ƒ^
+                ConstructionBaseInfoDetail DepRec = new ConstructionBaseInfoDetail();
+                // �HŽ–ƒR�[ƒhƒZƒbƒg
+                DepRec.ConstructionCode = nConstrCode;
+
+                // •”��–¼‚ð“o˜^‚·‚é
+                nStart = (int)ConstructionBaseInfoDetail.DataNoDef.SalesDepartmentName;
+                nComplate = (int)ConstructionBaseInfoDetail.DataNoDef.InstrDepartmentName;
+                for (int i = nStart; i <= nComplate; i++)
+                {
+                    // –¾�×”Ô�†
+                    DepRec.DetailNo = i;
+                    switch (i)
+                    {
+                        case (int)ConstructionBaseInfoDetail.DataNoDef.SalesDepartmentName:
+                            // 101:‰c‹Æ’S“–•”��–¼
+                            DepRec.DetailString = comboBoxEX1.Text.Replace(CommonDefine.s_UndecidedString, "");
+                            break;
+                        case (int)ConstructionBaseInfoDetail.DataNoDef.ConstrDepartmentName:
+                            // 102:�HŽ–’S“–•”��–¼
+                            DepRec.DetailString = comboBoxEX2.Text.Replace(CommonDefine.s_UndecidedString, "");
+                            break;
+                        case (int)ConstructionBaseInfoDetail.DataNoDef.ConstrSubDepartmentName:
+                            // 103:�HŽ–•›’S“–•”��–¼
+                            DepRec.DetailString = comboBoxEX3.Text.Replace(CommonDefine.s_UndecidedString, "");
+                            break;
+                        case (int)ConstructionBaseInfoDetail.DataNoDef.InstrDepartmentName:
+                            // 104:Žw“±ˆõ•”��–¼
+                            DepRec.DetailString = comboBoxEX4.Text.Replace(CommonDefine.s_UndecidedString, "");
+                            break;
+                    }
+                    // �Ý’è–³‚Í“o˜^‚µ‚È‚¢
+                    if (DepRec.DetailString.Length < 1) continue;
+
+                    // ƒf�[ƒ^‚Ì—L–³‚ð”»’è
+                    ConstructionBaseInfoDetail CurRec = oldDetail.Find(x => x.DetailNo == DepRec.DetailNo);
+
+                    if (CurRec == null)
+                    {
+                        // ƒf�[ƒ^‚ª‚È‚¢�ê�‡�Fƒf�[ƒ^�V‹K“o˜^
+                        if (!cbidDB.InsertAction(DepRec, false))
+                        {
+                            MessageBox.Show("�HŽ–Šî–{�î•ñ–¾�×�F•”���V‹K“o˜^‚ÉŽ¸”s‚µ‚Ü‚µ‚½�B", "“o˜^ƒGƒ‰�[", MessageBoxButtons.OK, MessageBoxIcon.Error);
+                            return false;
+                        }
+                        continue;
+                    }
+
+                    // ƒf�[ƒ^‚ª‚ ‚é�ê�‡�F•Ï�X”Ô�†‚ª‚ ‚ê‚Î�X�V“o˜^
+                    if (!DetailNoList.Exists(x => x == i)) continue;
+
+                    if (!cbidDB.UpdateFeild(DepRec.ConstructionCode
+                                            , (int)IOConstructionBaseInfoDetail.TableColumn.DETAILSTRING
+                                            , DepRec.DetailString
+                                            , false
+                                            , DepRec.DetailNo))
+                    {
+                        MessageBox.Show("�HŽ–Šî–{�î•ñ–¾�×�F•”���X�V“o˜^‚ÉŽ¸”s‚µ‚Ü‚µ‚½�B", "“o˜^ƒGƒ‰�[", MessageBoxButtons.OK, MessageBoxIcon.Error);
+                        return false;
+                    }
+                }
+
                 return true;
             }
             catch (System.Exception ex)
@@ -3519,46 +3783,23 @@
 
                 bool MacthFlg = false;
 
-                // �VƒZƒLƒ…ƒŠƒeƒBƒf�[ƒ^‘Î‰ž�Ï‚Ý‚©‚ðŠm”F‚·‚é
-                if (CommonMotions.LoginUserData.SecCode == 0)
+                // ƒVƒXƒeƒ€Œ ŒÀ‚É‚æ‚Á‚Äƒf�[ƒ^ƒAƒNƒZƒX‚É�§ŒÀ‚ª‚ ‚é
+                if (CommonMotions.LoginUserData.PersonCode == CommonDefine.AdminCode)
                 {
-                    // ƒVƒXƒeƒ€Œ ŒÀ‚É‚æ‚Á‚Äƒf�[ƒ^ƒAƒNƒZƒX‚É�§ŒÀ‚ª‚ ‚é
-                    if (CommonMotions.LoginUserData.SecurityManagement == CommonDefine.AdminSecurityManagement)
-                    {
-                        // ƒVƒXƒeƒ€ŠÇ—�ŽÒ�i‚·‚×‚Ä‘Î�Û�j
-                        MacthFlg = true;
-                    }
-                    else if (CommonMotions.LoginUserData.SecurityManagement == CommonDefine.SystemManageDiv[(int)CommonDefine.SysManaDivNo.PresidentAuthority].Key)
-                    {
-                        // �Å�‚‹@–§ŠÇ—�ŽÒ�i‚·‚×‚Ä‘Î�Û�j
-                        MacthFlg = true;
-                    }
-                    else if (CommonMotions.LoginUserData.SecurityManagement == CommonDefine.SystemManageDiv[(int)CommonDefine.SysManaDivNo.SupervisorAuthority].Key)
-                    {
-                        // “�Š‡‹@–§ŠÇ—�ŽÒ�i‹@”\�§ŒÀ�j
-                        MacthFlg = true;
-                    }
+                    // ƒVƒXƒeƒ€ŠÇ—�ŽÒ�i‚·‚×‚Ä‘Î�Û�j
+                    MacthFlg = true;
                 }
-                else
+                else if (CommonMotions.LoginUserSecurity.SecRank == CommonDefine.SecurityRankList[(int)CommonDefine.SecurityRankPos.SpecialAuthority].Key)
                 {
-                    // ƒVƒXƒeƒ€Œ ŒÀ‚É‚æ‚Á‚Äƒf�[ƒ^ƒAƒNƒZƒX‚É�§ŒÀ‚ª‚ ‚é
-                    if (CommonMotions.LoginUserData.PersonCode == CommonDefine.AdminCode)
-                    {
-                        // ƒVƒXƒeƒ€ŠÇ—�ŽÒ�i‚·‚×‚Ä‘Î�Û�j
-                        MacthFlg = true;
-                    }
-                    else if (CommonMotions.LoginUserSecurity.SecRank == CommonDefine.SecurityRankList[(int)CommonDefine.SecurityRankPos.SpecialAuthority].Key)
-                    {
-                        // Œo‰cŽÒƒAƒNƒZƒX
-                        MacthFlg = true;
-                    }
-                    else if (CommonMotions.LoginUserSecurity.SecRank == CommonDefine.SecurityRankList[(int)CommonDefine.SecurityRankPos.FreeAuthority].Key)
-                    {
-                        // “�Š‡�Ó”CŽÒ�i‹@”\�§ŒÀ�j
-                        MacthFlg = true;
-                    }
+                    // Œo‰cŽÒƒAƒNƒZƒX
+                    MacthFlg = true;
                 }
-                
+                else if (CommonMotions.LoginUserSecurity.SecRank == CommonDefine.SecurityRankList[(int)CommonDefine.SecurityRankPos.FreeAuthority].Key)
+                {
+                    // “�Š‡�Ó”CŽÒ�i‹@”\�§ŒÀ�j
+                    MacthFlg = true;
+                }
+
                 if (!MacthFlg)
                 {
                     MessageBox.Show("Žc”O‚Å‚µ‚½�I�I\n‰ï’·�A‚à‚µ‚­‚ÍŽÐ’·‚µ‚©�Á‚¹‚Ü‚¹‚ñ ‚Î�`‚© (^.^)V", "�í�œŠm”F", MessageBoxButtons.OK, MessageBoxIcon.Hand);
@@ -4321,7 +4562,7 @@
             try
             {
                 // �i’»�ó‘ÔŽæ“¾
-                int iStatusCount = GetStatusForCheckBox();
+                int nStatusCount = GetStatusForCheckBox();
 
                 // ƒtƒB�[ƒ‹ƒhƒ�ƒbƒN
                 for (int i = 0; i < m_DspCtrl.Length; i++)
@@ -4335,10 +4576,12 @@
                         continue;
 
                     // �€–Ú‚ÌEnable�§Œä
-                    m_DspCtrl[i].Enabled = FieldLockMap[i, iStatusCount];
+                    m_DspCtrl[i].Enabled = FieldLockMap[i, nStatusCount];
 
+                    // ----- TextBox‚Ì�ˆ—�
                     if (!m_DspCtrl[i].GetType().Equals(typeof(TextBox)) && !m_DspCtrl[i].GetType().Equals(typeof(TextBoxEX))) continue;
-                    // ----- TextBox‚Ì�ˆ—�
+
+                    // “ü—Í‰Â”\‚Ì�ê�‡
                     if (m_DspCtrl[i].Enabled)
                     {
                         // Enable‚ªtrue‚Ì�ê�‡�A�h–¢’è�h‚Ì•¶Žš‚ª“ü‚Á‚Ä‚¢‚½‚çƒNƒŠƒA‚·‚é
@@ -4346,22 +4589,7 @@
                         {
                             m_DspCtrl[i].Text = string.Empty;
                         }
-                        continue;
                     }
-
-                    // Enable‚ªfalse‚Ì�ê�‡
-                    foreach (string TargetName in UndecidedArray)
-                    {
-                        // ‘Î�Û‚Ì�€–Ú‚ª‹ó”’‚È‚ç‚Î�A�h–¢’è�h‚ðƒZƒbƒg‚·‚é
-                        if (m_DspCtrl[i].Name.Equals(TargetName))
-                        {
-                            if (m_DspCtrl[i].Text.Length == 0)
-                            {
-                                m_DspCtrl[i].Text = CommonDefine.s_UndecidedString;
-                            }
-                            break;
-                        }
-                    }
                 }
 
                 // •\Ž¦�Å�I”Ô�†‚ðŽæ“¾‚·‚é
@@ -4368,17 +4596,17 @@
                 int dispCnt = Enum.GetNames(typeof(DspCnt)).Length;
                 foreach (Control pnlCtl in panel6.Controls)
                 {
-                    pnlCtl.Enabled = FieldLockMap[dispCnt, iStatusCount];       // �y�Å�I�z+ 1:�Á”ï�Åƒtƒ‰ƒO
+                    pnlCtl.Enabled = FieldLockMap[dispCnt, nStatusCount];       // �y�Å�I�z+ 1:�Á”ï�Åƒtƒ‰ƒO
                 }
 
                 foreach (Control pnlCtl in panel2.Controls)
                 {
-                    pnlCtl.Enabled = FieldLockMap[dispCnt + 4, iStatusCount];   // �y�Å�I�z+ 5:Œ©�ÏŽí•Ê
+                    pnlCtl.Enabled = FieldLockMap[dispCnt + 4, nStatusCount];   // �y�Å�I�z+ 5:Œ©�ÏŽí•Ê
                 }
 
                 foreach (Control pnlCtl in panel3.Controls)
                 {
-                    pnlCtl.Enabled = FieldLockMap[dispCnt + 5, iStatusCount];   // �y�Å�I�z+ 6:�¿‹�‹æ•ª
+                    pnlCtl.Enabled = FieldLockMap[dispCnt + 5, nStatusCount];   // �y�Å�I�z+ 6:�¿‹�‹æ•ª
                 }
             }
             catch (Exception ex)
@@ -4581,48 +4809,6 @@
         }
         #endregion
 
-        #region �HŽ–‚ÌƒRƒs�[
-        /// <summary>
-        /// �HŽ–ˆê——‚æ‚è‹N“®‚·‚éƒvƒ�ƒZƒX‘I‘ð�ˆ—�
-        /// </summary>
-        /// <param name="para_ConstructionCode"></param>
-        private void ExecuteCopyProcess()
-        {
-            FrmNewOrContinueCopy frm = new FrmNewOrContinueCopy();
-            try
-            {
-                // �HŽ–”Ô�†‚ðŽæ“¾‚·‚é
-                frm.ConstructionCode = m_ConstructionCode;
-                // ƒtƒH�[ƒ€•\Ž¦
-                //frm.ShowInTaskbar = false;
-                frm.ShowDialog();
-
-                // –ß‚è’lŽæ“¾
-                int ConstructionCode = frm.ConstructionCode;
-                bool bNowConstruction = frm.NewConstruction;
-
-                int NowPoint = ClsExcute.GetNowProcessPoint();
-                // Œ»�Ý�Ý’è’lƒNƒŠƒA
-                ClsExcute.ClearExecParameter(NowPoint);
-                // �HŽ–”Ô�†•Ï�X
-                ClsExcute.ProcControlPara[NowPoint].IntExecParameter.Add(ConstructionCode);
-                // ƒRƒs�[�ì�¬ƒf�[ƒ^ƒtƒ‰ƒOƒZƒbƒg
-                ClsExcute.ProcControlPara[NowPoint].BoolExecParameter.Add(true);
-
-                // �I—¹�ˆ—�ƒtƒ‰ƒOOff
-                m_CloseingProcessOn = false;
-            }
-            catch (Exception ex)
-            {
-                logger.ErrorFormat("ƒVƒXƒeƒ€ƒGƒ‰�[�F{0}�F{1}", CommonMotions.GetMethodName(), ex.Message);
-            }
-            finally
-            {
-                frm.Dispose(); frm = null;
-            }
-        }
-        #endregion
-
         #region ŽQ�Æƒ‚�[ƒh
         /// <summary>
         /// ŽQ�Æƒ‚�[ƒh‚É‚µ‚ÄŠeƒRƒ“ƒgƒ��[ƒ‹‚Öƒ�ƒbƒN‚ð‚©‚¯‚é
@@ -4895,12 +5081,10 @@
                 bool bPeriod = true;
                 if (CommonMotions.SystemMasterData.ConstructionNoBase == (int)SystemMaster.ConstrNoBaseDef.BusinessPeriod)
                 {   // ‰c‹ÆŠú
-                    iYear = CommonMotions.PeriodCountToYear(Period);
                     bPeriod = true;
                 }
-                CommonMotions.GetNowBeginMonthDay(bPeriod, ref month, ref day);
-                dtStart = new DateTime(iYear, month, day);
-                dtEnd = dtStart.AddYears(1).AddDays(-1);     // �I—¹‚Í�{1”N�|1“ú
+                dtStart = CommonMotions.GetOpeningEndDate(Period, true, bPeriod);
+                dtEnd = CommonMotions.GetOpeningEndDate(Period, false, bPeriod);
 
                 // Ž{�HŠúŠÔŽæ“¾
                 DateTime dtCStart = CommonMotions.cnvDate(m_DspCtrl[(int)DspCnt.ConstructionPeriodStart].Text);     // 48: Œ_–ñ�HŠúŠJŽn
@@ -4972,7 +5156,7 @@
         {
             try
             {
-                // �Å�‚�Ó”CŽÒ‚Í‰ð�œ‚Å‚«‚é
+                // �Å�‚�Ó”CŽÒˆÈŠO‚Í�ˆ—�‚µ‚È‚¢
                 int SRank = (int)CommonDefine.SecurityRankPos.SpecialAuthority;
                 if (CommonMotions.LoginUserSecurity.SecRank != CommonDefine.SecurityRankList[SRank].Key) return;
 
@@ -4985,9 +5169,25 @@
                 // �¿‹�‰ð�œƒ{ƒ^ƒ“•\Ž¦
                 btnRestore.Enabled = true;
                 btnRestore.Visible = true;
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("ƒVƒXƒeƒ€ƒGƒ‰�[�F{0}�F{1}", CommonMotions.GetMethodName(), ex.Message);
+            }
+        }
+        #endregion
 
+        #region �‰Šú•\Ž¦‚Ì‚»‚Ì‘¼�ˆ—�
+        /// <summary>
+        /// �‰Šú•\Ž¦‚Ì‚»‚Ì‘¼�ˆ—�
+        /// </summary>
+        private void InitOtherProcess()
+        {
+            try
+            {
                 // ŒŸ�¸�¥�³Š®—¹“ú‚ª“ü—Í‚³‚ê‚Ä‚¢‚È‚¯‚ê‚Î“ü—Í‚Ì‚½‚ßƒ�ƒbƒN‰ð�œ
-                if (m_DspCtrl[(int)DspCnt.RevCompleteDate].Text.Length > 1)
+                if (m_DspCtrl[(int)DspCnt.RevCompleteDate].Text.Length > 0
+                || m_DspCtrl[(int)DspCnt.RevCompleteDate].Text.Equals(CommonDefine.s_UndecidedString))
                 {
                     // ŒŸ�¸�¥�³Š®—¹“ú
                     m_DspCtrl[(int)DspCnt.RevCompleteDate].Enabled = false;
@@ -5000,7 +5200,8 @@
                     btnDataEntry.Visible = true;
                 }
                 // �¿‹�Šm”F“ú‚ª“ü—Í‚³‚ê‚Ä‚¢‚È‚¯‚ê‚Î“ü—Í‚Ì‚½‚ßƒ�ƒbƒN‰ð�œ
-                if (m_DspCtrl[(int)DspCnt.BillingComplateDate].Text.Length > 1)
+                if (m_DspCtrl[(int)DspCnt.BillingComplateDate].Text.Length > 0
+                || m_DspCtrl[(int)DspCnt.BillingComplateDate].Text.Equals(CommonDefine.s_UndecidedString))
                 {
                     // �¿‹�Šm”F“ú
                     m_DspCtrl[(int)DspCnt.BillingComplateDate].Enabled = false;
Index: branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionBudget/FrmConstructionBudgetAuxiliary.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionBudget/FrmConstructionBudgetAuxiliary.cs	(revision 329)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionBudget/FrmConstructionBudgetAuxiliary.cs	(revision 330)
@@ -4612,38 +4612,43 @@
             try
             {
                 DataGridView dgv = dgvAllDisplay;
+                DataGridViewRow CurRow = dgv.Rows[e.RowIndex];
 
                 // æ˜Žç´°ä»¥å¤–ã�¯å‡¦ç�†ã�—ã�ªã�„
-                if (CommonMotions.chkObjectIsNull(dgv.Rows[e.RowIndex].Cells[(int)GridColumn.TotalFlg].Value)) return;
-                if (CommonMotions.cnvInt(dgv.Rows[e.RowIndex].Cells[(int)GridColumn.TotalFlg].Value) != 0) return;
+                if (CommonMotions.chkObjectIsNull(CurRow.Cells[(int)GridColumn.TotalFlg].Value)) return;
+                if (CommonMotions.cnvInt(CurRow.Cells[(int)GridColumn.TotalFlg].Value) != 0) return;
 
-                if (CommonMotions.chkObjectIsNull(dgv.Rows[e.RowIndex].Cells[(int)GridColumn.TitleFlg].Value)) return;
-                if (CommonMotions.cnvInt(dgv.Rows[e.RowIndex].Cells[(int)GridColumn.TitleFlg].Value) != 0) return;
+                if (CommonMotions.chkObjectIsNull(CurRow.Cells[(int)GridColumn.TitleFlg].Value)) return;
+                if (CommonMotions.cnvInt(CurRow.Cells[(int)GridColumn.TitleFlg].Value) != 0) return;
 
-                if (CommonMotions.chkObjectIsNull(dgv.Rows[e.RowIndex].Cells[(int)GridColumn.BlankFlg].Value)) return;
-                if (CommonMotions.cnvInt(dgv.Rows[e.RowIndex].Cells[(int)GridColumn.BlankFlg].Value) != 0) return;
+                if (CommonMotions.chkObjectIsNull(CurRow.Cells[(int)GridColumn.BlankFlg].Value)) return;
+                if (CommonMotions.cnvInt(CurRow.Cells[(int)GridColumn.BlankFlg].Value) != 0) return;
 
                 // ç©ºç™½è¡Œã�¯å‡¦ç�†ã�—ã�ªã�„
                 if (BlankLine(e.RowIndex)) return;
 
+                DataGridViewCell CurCell = dgv.Rows[e.RowIndex].Cells[e.ColumnIndex];
                 // ç™ºæ³¨å¸Œæœ›é‡‘é¡�ãƒ»å®Ÿè¡Œé‡‘é¡�ã�®ã�¿å‡¦ç�†ã‚’è¡Œã�†
                 switch (e.ColumnIndex)
                 {
                     case (int)GridColumn.HopePrice:
+                    case (int)GridColumn.ExecPrice:
                         // é‡‘é¡�ã�®ç·¨é›†
-                        dgv.Rows[e.RowIndex].Cells[e.ColumnIndex].Value = CommonMotions.cnvInt(dgv.Rows[e.RowIndex].Cells[e.ColumnIndex].Value).ToString("#,0");
-                        dgv.Rows[e.RowIndex].Cells[(int)GridColumn.ExecPrice].Value = dgv.Rows[e.RowIndex].Cells[e.ColumnIndex].Value;
+                        CurCell.Value = CommonMotions.cnvInt(CurCell.Value).ToString("#,0");
+
+                        // å¸Œæœ›é‡‘é¡�ã�Œå®Ÿè¡Œé‡‘é¡�ã‚ˆã‚Šå°�ã�•ã�„å ´å�ˆã�¯é‡‘é¡�ã‚»ãƒƒãƒˆ
+                        int nHopePrice = CommonMotions.cnvInt(CurRow.Cells[(int)GridColumn.HopePrice].Value);
+                        int nExecPrice = CommonMotions.cnvInt(CurRow.Cells[(int)GridColumn.ExecPrice].Value);
+                        if (nHopePrice < nExecPrice)
+                            CurRow.Cells[(int)GridColumn.ExecPrice].Value = CurCell.Value;
                         break;
-                    case (int)GridColumn.ExecPrice:
-                        dgv.Rows[e.RowIndex].Cells[e.ColumnIndex].Value = CommonMotions.cnvInt(dgv.Rows[e.RowIndex].Cells[e.ColumnIndex].Value).ToString("#,0");
-                        break;
                     default:
                         return;
                 }
                 // å®Ÿè¡Œé‡‘é¡�å�–å¾—
-                int ExceValue = CommonMotions.cnvInt(dgv.Rows[e.RowIndex].Cells[(int)GridColumn.ExecPrice].Value);
+                int ExceValue = CommonMotions.cnvInt(CurRow.Cells[(int)GridColumn.ExecPrice].Value);
                 // æ¯”çŽ‡è¨ˆç®—
-                dgv.Rows[e.RowIndex].Cells[(int)GridColumn.Percent].Value = CalculattionPercent(ExceValue).ToString("0.00");
+                CurRow.Cells[(int)GridColumn.Percent].Value = CalculattionPercent(ExceValue).ToString("0.00");
 
                 // ç²—åˆ©ç›Šè¡Œè¨ˆç®—
                 CreateGrossProfit(false);
Index: branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionJoin/FrmConstructionJoin.Designer.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionJoin/FrmConstructionJoin.Designer.cs	(revision 329)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionJoin/FrmConstructionJoin.Designer.cs	(revision 330)
@@ -28,12 +28,12 @@
         /// </summary>
         private void InitializeComponent()
         {
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle8 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle9 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle10 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle11 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle12 = new System.Windows.Forms.DataGridViewCellStyle();
             this.btnCancel = new System.Windows.Forms.Button();
             this.btnEntry = new System.Windows.Forms.Button();
             this.label1 = new System.Windows.Forms.Label();
@@ -69,7 +69,7 @@
             // btnCancel
             // 
             this.btnCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
-            this.btnCancel.BackColor = System.Drawing.Color.Red;
+            this.btnCancel.BackColor = System.Drawing.Color.Blue;
             this.btnCancel.Font = new System.Drawing.Font("ï¼­ï¼³ æ˜Žæœ�", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
             this.btnCancel.ForeColor = System.Drawing.Color.White;
             this.btnCancel.Location = new System.Drawing.Point(957, 656);
@@ -76,7 +76,7 @@
             this.btnCancel.Name = "btnCancel";
             this.btnCancel.Size = new System.Drawing.Size(120, 30);
             this.btnCancel.TabIndex = 3;
-            this.btnCancel.Text = "ã‚­ãƒ£ãƒ³ã‚»ãƒ«";
+            this.btnCancel.Text = "çµ‚ã€€äº†";
             this.btnCancel.UseVisualStyleBackColor = false;
             this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click);
             // 
@@ -151,14 +151,14 @@
             | System.Windows.Forms.AnchorStyles.Right)));
             this.dgvMaster.BackgroundColor = System.Drawing.Color.White;
             this.dgvMaster.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);
-            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.dgvMaster.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle1;
+            dataGridViewCellStyle7.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
+            dataGridViewCellStyle7.BackColor = System.Drawing.SystemColors.Control;
+            dataGridViewCellStyle7.Font = new System.Drawing.Font("ï¼­ï¼³ æ˜Žæœ�", 12F, System.Drawing.FontStyle.Bold);
+            dataGridViewCellStyle7.ForeColor = System.Drawing.SystemColors.WindowText;
+            dataGridViewCellStyle7.SelectionBackColor = System.Drawing.SystemColors.Highlight;
+            dataGridViewCellStyle7.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
+            dataGridViewCellStyle7.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
+            this.dgvMaster.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle7;
             this.dgvMaster.ColumnHeadersHeight = 24;
             this.dgvMaster.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing;
             this.dgvMaster.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
@@ -185,9 +185,9 @@
             // 
             // Column1
             // 
-            dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
-            dataGridViewCellStyle2.Font = new System.Drawing.Font("Century", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
-            this.Column1.DefaultCellStyle = dataGridViewCellStyle2;
+            dataGridViewCellStyle8.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
+            dataGridViewCellStyle8.Font = new System.Drawing.Font("Century", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+            this.Column1.DefaultCellStyle = dataGridViewCellStyle8;
             this.Column1.Frozen = true;
             this.Column1.HeaderText = "â„–";
             this.Column1.Name = "Column1";
@@ -198,9 +198,9 @@
             // 
             // Column5
             // 
-            dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
-            dataGridViewCellStyle3.Font = new System.Drawing.Font("Century", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
-            this.Column5.DefaultCellStyle = dataGridViewCellStyle3;
+            dataGridViewCellStyle9.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
+            dataGridViewCellStyle9.Font = new System.Drawing.Font("Century", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+            this.Column5.DefaultCellStyle = dataGridViewCellStyle9;
             this.Column5.Frozen = true;
             this.Column5.HeaderText = "å·¥äº‹ç•ªå�·";
             this.Column5.Name = "Column5";
@@ -210,9 +210,9 @@
             // 
             // Column3
             // 
-            dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
-            dataGridViewCellStyle4.Font = new System.Drawing.Font("ï¼­ï¼³ æ˜Žæœ�", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
-            this.Column3.DefaultCellStyle = dataGridViewCellStyle4;
+            dataGridViewCellStyle10.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
+            dataGridViewCellStyle10.Font = new System.Drawing.Font("ï¼­ï¼³ æ˜Žæœ�", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
+            this.Column3.DefaultCellStyle = dataGridViewCellStyle10;
             this.Column3.Frozen = true;
             this.Column3.HeaderText = "å·¥ã€€äº‹ã€€å��ã€€ç§°";
             this.Column3.Name = "Column3";
@@ -223,8 +223,8 @@
             // 
             // Column9
             // 
-            dataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
-            this.Column9.DefaultCellStyle = dataGridViewCellStyle5;
+            dataGridViewCellStyle11.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
+            this.Column9.DefaultCellStyle = dataGridViewCellStyle11;
             this.Column9.Frozen = true;
             this.Column9.HeaderText = "é€²æ�—çŠ¶æ…‹";
             this.Column9.Name = "Column9";
@@ -234,9 +234,9 @@
             // 
             // Column7
             // 
-            dataGridViewCellStyle6.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
-            dataGridViewCellStyle6.Font = new System.Drawing.Font("ï¼­ï¼³ æ˜Žæœ�", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
-            this.Column7.DefaultCellStyle = dataGridViewCellStyle6;
+            dataGridViewCellStyle12.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
+            dataGridViewCellStyle12.Font = new System.Drawing.Font("ï¼­ï¼³ æ˜Žæœ�", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
+            this.Column7.DefaultCellStyle = dataGridViewCellStyle12;
             this.Column7.Frozen = true;
             this.Column7.HeaderText = "ç™ºã€€æ³¨ã€€è€…";
             this.Column7.Name = "Column7";
@@ -335,7 +335,7 @@
             this.cmbConstructionPerson.Name = "cmbConstructionPerson";
             this.cmbConstructionPerson.Size = new System.Drawing.Size(200, 24);
             this.cmbConstructionPerson.TabIndex = 46;
-            this.cmbConstructionPerson.TextChanged += new System.EventHandler(this.cmbConstructionPerson_TextChanged);
+            this.cmbConstructionPerson.SelectedIndexChanged += new System.EventHandler(this.cmbConstructionPerson_SelectedIndexChanged);
             // 
             // cmbDepartment
             // 
@@ -347,7 +347,7 @@
             this.cmbDepartment.Name = "cmbDepartment";
             this.cmbDepartment.Size = new System.Drawing.Size(200, 24);
             this.cmbDepartment.TabIndex = 45;
-            this.cmbDepartment.TextChanged += new System.EventHandler(this.cmbDepartment_TextChanged);
+            this.cmbDepartment.SelectedIndexChanged += new System.EventHandler(this.cmbDepartment_SelectedIndexChanged);
             // 
             // label12
             // 
Index: branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionJoin/FrmConstructionJoin.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionJoin/FrmConstructionJoin.cs	(revision 329)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionJoin/FrmConstructionJoin.cs	(revision 330)
@@ -314,6 +314,11 @@
         {
             if (m_bInitFlag) return;
 
+            // éƒ¨ç½²ã‚³ãƒ³ãƒœãƒœãƒƒã‚¯ã‚¹å¤‰æ›´
+            SetcmbDepartment();
+            // æ‹…å½“è€…ã‚³ãƒ³ãƒœãƒœãƒƒã‚¯ã‚¹å¤‰æ›´
+            SetcmbPersons();
+
             // ãƒ‡ãƒ¼ã‚¿è¡¨ç¤º
             InitDataLoad();
         }
@@ -325,7 +330,7 @@
         /// </summary>
         /// <param name="sender"></param>
         /// <param name="e"></param>
-        private void cmbDepartment_TextChanged(object sender, EventArgs e)
+        private void cmbDepartment_SelectedIndexChanged(object sender, EventArgs e)
         {
             if (m_bInitFlag) return;
 
@@ -343,12 +348,12 @@
         /// </summary>
         /// <param name="sender"></param>
         /// <param name="e"></param>
-        private void cmbConstructionPerson_TextChanged(object sender, EventArgs e)
+        private void cmbConstructionPerson_SelectedIndexChanged(object sender, EventArgs e)
         {
             if (m_bInitFlag) return;
 
-            // æ‹…å½“è€…é�¸æŠžæ™‚éƒ¨ç½²é�¸æŠžã‚’è¨­å®šã�™ã‚‹
-            SetPerosonToDepartment();
+            // æ‹…å½“è€…ã‚³ãƒ³ãƒœãƒœãƒƒã‚¯ã‚¹ã‚»ãƒƒãƒˆæ™‚éƒ¨ç½²ã‚’ã‚»ãƒƒãƒˆã�™ã‚‹
+            if (!SetPerosonToDepartment()) return;
 
             // ãƒ‡ãƒ¼ã‚¿è¡¨ç¤º
             InitDataLoad();
Index: branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionJoin/FrmConstructionJoinAuxiliary.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionJoin/FrmConstructionJoinAuxiliary.cs	(revision 329)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionJoin/FrmConstructionJoinAuxiliary.cs	(revision 330)
@@ -258,50 +258,20 @@
             m_bInitFlag = true;
             try
             {
+                cmbDepartment.SelectedIndexChanged -= new EventHandler(cmbDepartment_SelectedIndexChanged);
 
                 cmbDepartment.DataSource = null;
                 cmbDepartment.Items.Clear();
                 cmbDepartment.Text = "";
 
-                string strSQL = string.Empty;
+                int nTargetCount = CommonMotions.cnvInt(numUDConstPro.Value);
                 // éƒ¨ç½²ãƒžã‚¹ã‚¿ã‚’æ¤œç´¢ã�™ã‚‹
-                strSQL = "SELECT A.DEPARTMENTCODE, A.DEPARTMENTSTRING, A.DISPLAYORDER, COUNT(*)";
-                strSQL += " FROM DEPARTMENTMASTER A, PERSONINCHARGEMASTER B, CONSTRUCTIONBASEINFO C";
-                strSQL += " WHERE A.DELETEFLG = 0";
+                StringBuilder strSQL = new StringBuilder();
+                CommonMotions.CreateDepCombBoxSQL(ref strSQL, nTargetCount);
 
-                // æ–°ã‚»ã‚­ãƒ¥ãƒªãƒ†ã‚£ãƒ‡ãƒ¼ã‚¿å¯¾å¿œæ¸ˆã�¿ã�‹ã‚’ç¢ºèª�ã�™ã‚‹
-                if (CommonMotions.LoginUserData.SecCode == 0)
-                {
-                    // ã‚·ã‚¹ãƒ†ãƒ æ¨©é™�ã�«ã‚ˆã�£ã�¦ãƒ‡ãƒ¼ã‚¿ã‚¢ã‚¯ã‚»ã‚¹ã�«åˆ¶é™�ã�Œã�‚ã‚‹
-                    if (CommonMotions.LoginUserData.SecurityManagement == CommonDefine.SystemManageDiv[(int)CommonDefine.SysManaDivNo.SuperiorAuthority].Key
-                        || CommonMotions.LoginUserData.SecurityManagement == CommonDefine.SystemManageDiv[(int)CommonDefine.SysManaDivNo.UserAuthority].Key)
-                    {
-                        // æ‰€å±žé•·
-                        // ä¸€èˆ¬ä½¿ç”¨è€…ï¼ˆè‡ªåˆ†ã�®ã�¿ã‚¢ã‚¯ã‚»ã‚¹å�¯èƒ½ï¼‰
-                        strSQL += string.Format(" AND A.DEPARTMENTCODE = {0}", CommonMotions.LoginUserData.DepartmentCode);
-                    }
-                }
-                else
-                {
-                    if (CommonMotions.LoginUserData.PersonCode == CommonDefine.AdminCode)
-                    {
-
-                    }
-                    else
-                    {
-                        // å�‚ç…§éƒ¨ç½²ãƒžã‚¹ã‚¿ã‚ˆã‚Šå�–å¾—ã�™ã‚‹
-                        strSQL += " AND A.DEPARTMENTCODE IN (SELECT A1.DEPARTMENTCODE FROM PERSONDEPARTMENTMASTER A1";
-                        strSQL += string.Format(" WHERE A1.PERSONCODE = {0})", CommonMotions.LoginUserData.PersonCode);
-                    }
-                }
-                strSQL += " AND A.DEPARTMENTCODE = B.DEPARTMENTCODE";
-                strSQL += " AND B.PERSONCODE = C.CONSTRUCTIONPERSONCODE";
-                strSQL += " GROUP BY A.DEPARTMENTCODE, A.DEPARTMENTSTRING, A.DISPLAYORDER";
-                strSQL += " ORDER BY A.DISPLAYORDER ASC";
-
                 // éƒ¨ç½²ãƒžã‚¹ã‚¿èª­è¾¼
                 ArrayList arList = new ArrayList();
-                if (!depDB.ExecuteReader(strSQL, ref arList)) return;
+                if (!depDB.ExecuteReader(strSQL.ToString(), ref arList)) return;
 
                 List<KeyValuePair<int, string>> ConstructionDataList = new List<KeyValuePair<int, string>>();
                 ConstructionDataList.Add(new KeyValuePair<int, string>(0, ""));
@@ -317,14 +287,6 @@
                 // ã‚³ãƒ³ãƒœãƒœãƒƒã‚¯ã‚¹åˆ�æœŸè¡¨ç¤º
                 ComboBoxAction.InitDataSetCombBox(cmbDepartment, ConstructionDataList);
 
-                // æ–°ã‚»ã‚­ãƒ¥ãƒªãƒ†ã‚£ãƒ‡ãƒ¼ã‚¿å¯¾å¿œæ¸ˆã�¿ã�‹ã‚’ç¢ºèª�ã�™ã‚‹
-                if (CommonMotions.LoginUserData.SecCode == 0)
-                {
-                    // ç·�å‹™éƒ¨æ‰€å±žè€…ä»¥å¤–
-                    if (CommonMotions.LoginUserData.DepartmentCode != CommonDefine.s_GeneralAffairsDevision)
-                        cmbDepartment.SelectedValue = CommonMotions.LoginUserData.DepartmentCode;
-                }
-
                 return;
             }
             catch (Exception ex)
@@ -335,6 +297,7 @@
             {
                 depDB.close(); depDB = null;
                 m_bInitFlag = bSave;
+                cmbDepartment.SelectedIndexChanged += new EventHandler(cmbDepartment_SelectedIndexChanged);
             }
         }
         #endregion
@@ -346,52 +309,33 @@
         private void SetcmbPersons()
         {
             IOMPersonInCharge picDB = new IOMPersonInCharge();
-            List<PersonInChargeMaster> workList = new List<PersonInChargeMaster>();
             bool bSave = m_bInitFlag;
             m_bInitFlag = true;
             try
             {
+                cmbConstructionPerson.SelectedIndexChanged -= new EventHandler(cmbConstructionPerson_SelectedIndexChanged);
+
                 cmbConstructionPerson.DataSource = null;
                 cmbConstructionPerson.Items.Clear();
                 cmbConstructionPerson.Text = "";
 
+                int nTargetCount = CommonMotions.cnvInt(numUDConstPro.Value);
                 int DepartmentCode = GetDepartmentCode();
-                string strSQL = string.Empty;
-                // æ¤œç´¢æ�¡ä»¶
-                strSQL = string.Format(" WHERE LEDGERFLG = {0}", (int)PersonInChargeMaster.LedgerDivNoDef.CalcTarget);
-                strSQL += " AND (DEPARTMENTCODE";
-                string strSubSQL = string.Empty;
-                if (DepartmentCode == 0)
-                {
-                    // å�‚ç…§éƒ¨ç½²ãƒžã‚¹ã‚¿ã‚ˆã‚Šå�–å¾—ã�™ã‚‹
-                    strSubSQL += string.Format(" IN (SELECT AA.DEPARTMENTCODE FROM PERSONDEPARTMENTMASTER AA WHERE AA.PERSONCODE = {0})"
-                                            , CommonMotions.LoginUserData.PersonCode);
-                }
-                else
-                {
-                    strSubSQL += string.Format(" = {0}", DepartmentCode);
-                }
-                strSQL += strSubSQL + ")";
+                StringBuilder strSQL = new StringBuilder();
+                CommonMotions.CreateManCombBoxSQL(ref strSQL, nTargetCount, DepartmentCode);
 
-                // å½“æœŸæœŸé¦–æ—¥ãƒ»æœŸæœ«æ—¥ã‚’å�–å¾—
-                DateTime dtDefaultStart = DateTime.MinValue;
-                DateTime dtDefaultEnd = DateTime.MinValue;
-                CreateDefaultStartAndEndDate(ref dtDefaultStart, ref dtDefaultEnd);
-
-                strSQL += string.Format(" AND (STARTDATE <= STR_TO_DATE('{0}','%Y/%m/%d')", dtDefaultEnd.ToShortDateString());
-                strSQL += string.Format(" AND (STR_TO_DATE('{0}','%Y/%m/%d') <= ENDDATE", dtDefaultStart.ToShortDateString());
-                strSQL += string.Format(" OR STR_TO_DATE('{0}','%Y/%m/%d') = ENDDATE))", DateTime.MinValue.ToShortDateString());
-
-                strSQL += " Order By DeleteFlg ASC, EmployeeClassFlg ASC, DisplayOrder ASC";
                 // æ‹…å½“è€…ãƒžã‚¹ã‚¿èª­è¾¼
-                if (!picDB.SelectAction(strSQL, ref workList)) return;
+                ArrayList workList = new ArrayList();
+                if (!picDB.ExecuteReader(strSQL.ToString(), ref workList)) return;
 
                 List<KeyValuePair<int, string>> ConstructionDataList = new List<KeyValuePair<int, string>>();
                 ConstructionDataList.Add(new KeyValuePair<int, string>(0, ""));
 
-                foreach (PersonInChargeMaster work in workList)
+                PersonInChargeMaster workRec = new PersonInChargeMaster();
+                foreach (object[] work in workList)
                 {
-                    KeyValuePair<int, string> keyval = new KeyValuePair<int, string>(work.PersonCode, work.PersonName);
+                    picDB.Reader2Struct(work, ref workRec);
+                    KeyValuePair<int, string> keyval = new KeyValuePair<int, string>(workRec.PersonCode, workRec.PersonName);
 
                     ConstructionDataList.Add(keyval);
                 }
@@ -399,16 +343,6 @@
                 // ã‚³ãƒ³ãƒœãƒœãƒƒã‚¯ã‚¹åˆ�æœŸè¡¨ç¤º
                 ComboBoxAction.InitDataSetCombBox(cmbConstructionPerson, ConstructionDataList);
 
-                // æ–°ã‚»ã‚­ãƒ¥ãƒªãƒ†ã‚£ãƒ‡ãƒ¼ã‚¿å¯¾å¿œæ¸ˆã�¿ã�‹ã‚’ç¢ºèª�ã�™ã‚‹
-                if (CommonMotions.LoginUserData.SecCode == 0)
-                {
-                    // ä¸€èˆ¬ãƒ¦ãƒ¼ã‚¶ãƒ¼ã�§ç·�å‹™éƒ¨æ‰€å±žè€…ã�§ã�¯ã�ªã�„å ´å�ˆã€�ãƒ­ã‚°ã‚¤ãƒ³è€…ã�®ã‚³ãƒ¼ãƒ‰ã‚’ã‚»ãƒƒãƒˆã�™ã‚‹
-                    if (CommonMotions.LoginUserData.DepartmentCode != CommonDefine.s_GeneralAffairsDevision)
-                    {
-                        cmbConstructionPerson.SelectedValue = CommonMotions.LoginUserData.PersonCode;
-                    }
-                }
-
                 return;
             }
             catch (Exception ex)
@@ -419,42 +353,9 @@
             {
                 picDB.close(); picDB = null;
                 m_bInitFlag = bSave;
-            }
-        }
-        #endregion
 
-        #region ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã�®æœŸé¦–æ—¥ãƒ»æœŸæœ«æ—¥ã‚’æ±‚ã‚�ã‚‹
-        /// <summary>
-        /// ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã�®æœŸé¦–æ—¥ãƒ»æœŸæœ«æ—¥ã‚’æ±‚ã‚�ã‚‹
-        /// </summary>
-        /// <param name="dtStart"></param>
-        /// <param name="dtEnd"></param>
-        private void CreateDefaultStartAndEndDate(ref DateTime dtStart, ref DateTime dtEnd)
-        {
-            try
-            {
-                // å½“æœŸæœŸé¦–å¹´æœˆæ—¥ã‚’å�–å¾—
-                int iYear = 0;
-                int month = 0;
-                int day = 0;
-                bool bPeriod = false;
-                if (CommonMotions.SystemMasterData.ConstructionNoBase == (int)SystemMaster.ConstrNoBaseDef.BusinessPeriod)
-                {   // å–¶æ¥­æœŸ
-                    iYear = CommonMotions.PeriodCountToYear(CommonMotions.cnvInt(numUDConstPro.Value));
-                    bPeriod = true;
-                }
-                else
-                {   // å·¥äº‹å¹´åº¦
-                    iYear = CommonMotions.SystemMasterData.ConstrYear;
-                }
-                CommonMotions.GetNowBeginMonthDay(bPeriod, ref month, ref day);
-                dtStart = new DateTime(iYear, month, day);
-                dtEnd = dtStart.AddYears(1).AddDays(-1);     // çµ‚äº†ã�¯ï¼‹1å¹´ï¼�1æ—¥
+                cmbConstructionPerson.SelectedIndexChanged += new EventHandler(cmbConstructionPerson_SelectedIndexChanged);
             }
-            catch (Exception ex)
-            {
-                logger.ErrorFormat("ã‚·ã‚¹ãƒ†ãƒ ã‚¨ãƒ©ãƒ¼ï¼š{0}ï¼š{1}", CommonMotions.GetMethodName(), ex.Message);
-            }
         }
         #endregion
 
@@ -468,26 +369,36 @@
             IOMPersonInCharge PersonDB = new IOMPersonInCharge();
             try
             {
+                cmbDepartment.SelectedIndexChanged -= new EventHandler(cmbDepartment_SelectedIndexChanged);
+                cmbConstructionPerson.SelectedIndexChanged -= new EventHandler(cmbConstructionPerson_SelectedIndexChanged);
+
                 // ã‚³ãƒ³ãƒœãƒœãƒƒã‚¯ã‚¹ã‚ˆã‚Šé�¸æŠžæ‹…å½“è€…ã‚’å�–å¾—ã�™ã‚‹
                 int PersonCode = GetConstructionPersonCode();
-                if (PersonCode < 1) return false;
+                if (PersonCode < 1) return true;
 
+                int nTargetCount = CommonMotions.cnvInt(numUDConstPro.Value);
                 int DepartmentCode = GetDepartmentCode();
 
-                string strSQL = PersonDB.CreatePrimarykeyString(PersonCode);
+                StringBuilder strSQL = new StringBuilder();
+                CommonMotions.CreateMan2DepSQL(ref strSQL, nTargetCount, PersonCode);
+
+                ArrayList arList = new ArrayList();
+                if (!PersonDB.ExecuteReader(strSQL.ToString(), ref arList)) return false;
+                if (arList.Count < 1) return false;
+
+                object[] objRec = (object[])arList[0];
                 PersonInChargeMaster PersonRec = new PersonInChargeMaster();
-                PersonDB.SelectAction(strSQL, ref PersonRec);
+                PersonRec.PersonCode = CommonMotions.cnvInt(objRec[0]);         // æ‹…å½“è€…ã‚³ãƒ¼ãƒ‰
+                PersonRec.PersonName = CommonMotions.cnvString(objRec[1]);      // æ‹…å½“è€…å��
+                PersonRec.DepartmentCode = CommonMotions.cnvInt(objRec[2]);     // éƒ¨ç½²ã‚³ãƒ¼ãƒ‰
 
+                // å�Œã�˜éƒ¨ç½²ã�®å ´å�ˆã�¯å‡¦ç�†ã�—ã�ªã�„
+                if (DepartmentCode == PersonRec.DepartmentCode) return true;
+
                 // éƒ¨ç½²ã‚³ãƒ³ãƒœãƒœãƒƒã‚¯ã‚¹ã�¸éƒ¨ç½²ã‚³ãƒ¼ãƒ‰ã‚»ãƒƒãƒˆ
-                if (PersonRec.DepartmentCode > 0 && DepartmentCode != PersonRec.DepartmentCode)
-                {
-                    bool bSave = m_bInitFlag;
-                    m_bInitFlag = true;
-                    cmbDepartment.SelectedValue = PersonRec.DepartmentCode;
-                    SetcmbPersons();    // æ‹…å½“è€…ã‚³ãƒ³ãƒœãƒœãƒƒã‚¯ã‚¹å¤‰æ›´
-                    cmbConstructionPerson.SelectedValue = PersonCode;
-                    m_bInitFlag = bSave;
-                }
+                cmbDepartment.SelectedValue = PersonRec.DepartmentCode;
+                SetcmbPersons();    // æ‹…å½“è€…ã‚³ãƒ³ãƒœãƒœãƒƒã‚¯ã‚¹å¤‰æ›´
+                cmbConstructionPerson.SelectedValue = PersonCode;
 
                 return true;
             }
@@ -499,6 +410,9 @@
             finally
             {
                 PersonDB.close(); PersonDB = null;
+
+                cmbDepartment.SelectedIndexChanged += new EventHandler(cmbDepartment_SelectedIndexChanged);
+                cmbConstructionPerson.SelectedIndexChanged += new EventHandler(cmbConstructionPerson_SelectedIndexChanged);
             }
         }
         #endregion
@@ -567,42 +481,46 @@
                     btnSerchWork.Enabled = true;
                 }
 
-                string strSQL = string.Empty;
+                StringBuilder strSQL = new StringBuilder();
                 int StatusCode = CommonDefine.ProjectsStatus.First(x => x.Value.Equals("é�ž å�— æ³¨")).Key;
 
                 // ----- å·¥äº‹çµ�å�ˆã�®å ´å�ˆ
                 // å¯¾è±¡å…¨ã�¦ã�®æ¡ˆä»¶ã‚’æ¤œç´¢ã�™ã‚‹
-                strSQL = "SELECT DISTINCT A.CONSTRUCTIONCODE";
-                strSQL += ", B.DETAILSTRING";
-                strSQL += ", A.ORDERERSDIVISION";
-                strSQL += ", A.ORDERERSCODE";
-                strSQL += ", D.ORDERERSNAME1";
-                strSQL += ", D.ORDERERSNAME2";
-                strSQL += ", A.CONSTRUCTIONSTATUSFLG";
-                strSQL += " FROM CONSTRUCTIONBASEINFO A, CONSTRUCTIONBASEINFODETAIL B, PERSONINCHARGEMASTER C, ORDERERSMASTER D";
-                strSQL += string.Format(" WHERE A.CONSTRUCTIONSTATUSFLG <> {0}", StatusCode);
-                strSQL += string.Format(" AND (A.CONSTRUCTIONPERIOD = {0})", numUDConstPro.Value);
-                strSQL += string.Format(" AND (A.CONSTRUCTIONCODE = B.CONSTRUCTIONCODE AND B.DETAILNO = {0})", (int)ConstructionBaseInfoDetail.DataNoDef.ConstructionName);
-                strSQL += string.Format(" AND A.TYINGFLG != {0}", (int)ConstructionBaseInfo.TyingFlgDef.Tying);
-                strSQL += string.Format(" AND A.JOINFLG = {0}", (int)ConstructionBaseInfo.JoinFlgDef.Standard);
-                if (cmbConstructionPerson.Text.Length != 0)
+                strSQL.Append("SELECT DISTINCT A.CONSTRUCTIONCODE");
+                strSQL.Append(", B.DETAILSTRING");
+                strSQL.Append(", A.ORDERERSDIVISION");
+                strSQL.Append(", A.ORDERERSCODE");
+                strSQL.Append(", D.ORDERERSNAME1");
+                strSQL.Append(", D.ORDERERSNAME2");
+                strSQL.Append(", A.CONSTRUCTIONSTATUSFLG");
+                strSQL.Append(" FROM CONSTRUCTIONBASEINFO A");
+                strSQL.Append(", CONSTRUCTIONBASEINFODETAIL B");
+                strSQL.Append(", PERSONINCHARGEMASTER C");
+                strSQL.Append(", ORDERERSMASTER D");
+                strSQL.AppendFormat(" WHERE A.CONSTRUCTIONSTATUSFLG <> {0}", StatusCode);
+                strSQL.AppendFormat(" AND (A.CONSTRUCTIONPERIOD = {0})", numUDConstPro.Value);
+                strSQL.AppendFormat(" AND (A.CONSTRUCTIONCODE = B.CONSTRUCTIONCODE AND B.DETAILNO = {0})", (int)ConstructionBaseInfoDetail.DataNoDef.ConstructionName);
+                strSQL.AppendFormat(" AND A.TYINGFLG != {0}", (int)ConstructionBaseInfo.TyingFlgDef.Tying);
+                strSQL.AppendFormat(" AND A.JOINFLG = {0}", (int)ConstructionBaseInfo.JoinFlgDef.Standard);
+                if (cmbConstructionPerson.Text.Length > 0)
                 {
-                    strSQL += string.Format(" AND (A.CONSTRUCTIONPERSONCODE = {0})", GetConstructionPersonCode());
+                    strSQL.AppendFormat(" AND (A.CONSTRUCTIONPERSONCODE = {0})", GetConstructionPersonCode());
                 }
                 else
                 {
-                    if (depCode != 0) strSQL += string.Format(" AND (C.DEPARTMENTCODE = {0})", depCode);
+                    if (depCode > 0) strSQL.AppendFormat(" AND (C.DEPARTMENTCODE = {0})", depCode);
                 }
 
-                strSQL += " AND (C.PERSONCODE = A.SALESPERSONCODE";
-                strSQL += " Or C.PERSONCODE = A.CONSTRUCTIONPERSONCODE";
-                strSQL += " Or C.PERSONCODE = A.CONSTRSUBPERSONCODE";
-                strSQL += " Or C.PERSONCODE = A.CONSTRUCTIONINSTRUCTOR)";
-                strSQL += " AND D.ORDERCOTEGORY = A.ORDERERSDIVISION AND D.ORDERERSCODE = A.ORDERERSCODE";
-                strSQL += " ORDER BY B.DETAILSTRING ASC, A.CONSTRUCTIONCODE DESC";
+                strSQL.Append(" AND (C.PERSONCODE = A.SALESPERSONCODE");
+                strSQL.Append(" Or C.PERSONCODE = A.CONSTRUCTIONPERSONCODE");
+                strSQL.Append(" Or C.PERSONCODE = A.CONSTRSUBPERSONCODE");
+                strSQL.Append(" Or C.PERSONCODE = A.CONSTRUCTIONINSTRUCTOR)");
+                strSQL.Append(" AND D.ORDERCOTEGORY = A.ORDERERSDIVISION");
+                strSQL.Append(" AND D.ORDERERSCODE = A.ORDERERSCODE");
+                strSQL.Append(" ORDER BY B.DETAILSTRING ASC, A.CONSTRUCTIONCODE DESC");
 
                 ArrayList BaseList = new ArrayList();
-                if (!BaseDB.ExecuteReader(strSQL, ref BaseList)) return;
+                if (!BaseDB.ExecuteReader(strSQL.ToString(), ref BaseList)) return;
                 if (BaseList.Count == 0) return;
 
                 // è¦�ç´ è¡¨ç¤º
Index: branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionLedger/FrmSelectPerson.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionLedger/FrmSelectPerson.cs	(revision 329)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionLedger/FrmSelectPerson.cs	(nonexistent)
@@ -1,431 +0,0 @@
-ï»¿using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Data;
-using System.Drawing;
-using System.Linq;
-using System.Text;
-using System.Windows.Forms;
-
-using ProcessManagement.Common;
-using ProcessManagement.DB.IOAccess;
-using ProcessManagement.DataModel;
-using ProcessManagement.Forms.CustomControls;
-using ProcessManagement.Forms.ControlsAction;
-
-namespace ProcessManagement.Forms.DataEntry
-{
-    public partial class FrmSelectPerson : Form
-    {
-        #region ãƒ­ã‚°ä½¿ç”¨å®šç¾©
-        //log4netãƒ­ã‚°ã‚’ä½¿ç”¨ã�™ã‚‹
-        private static readonly log4net.ILog logger = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
-        #endregion
-
-        #region å¤‰æ•°
-        /// <summary>
-        /// åˆ�æœŸåŒ–ãƒ•ãƒ©ã‚°
-        /// </summary>
-        private bool bInitFlg = true;
-
-        /// <summary>
-        /// éƒ¨ç½²ã‚³ãƒ¼ãƒ‰
-        /// </summary>
-        private int m_Departmanet = 0;
-
-        /// <summary>
-        /// æ‹…å½“è€…ã‚³ãƒ¼ãƒ‰
-        /// </summary>
-        private int m_Person = 0;
-
-        /// <summary>
-        /// é�¸æŠžåŒºåˆ†
-        /// </summary>
-        private int m_SalaryFlg = 0;
-        /// <summary>
-        /// é�¸æŠžæ—¥æ•°
-        /// </summary>
-        private int m_SalaryDays = 0;
-        
-        /// <summary>
-        /// é�¸æŠžæ‹…å½“è€…åŒºåˆ†
-        /// </summary>
-        private int m_SelectFlg = 0;
-
-        /// <summary>
-        /// çµ‚äº†çŠ¶æ…‹ãƒ•ãƒ©ã‚°
-        /// </summary>
-        private DialogResult m_EndButton = DialogResult.None;
-        #endregion
-
-        #region ãƒ—ãƒ­ãƒ‘ãƒ†ã‚£
-
-        /// <summary>
-        /// éƒ¨ç½²ã‚³ãƒ¼ãƒ‰
-        /// </summary>
-        public int Departmanet
-        {
-            get { return m_Departmanet; }
-            set { m_Departmanet = value; }
-        }
-
-        /// <summary>
-        /// æ‹…å½“è€…ã‚³ãƒ¼ãƒ‰
-        /// </summary>
-        public int Person
-        {
-            get { return m_Person; }
-            set { m_Person = value; }
-        }
-
-        /// <summary>
-        /// é�¸æŠžæ‹…å½“è€…åŒºåˆ†
-        /// </summary>
-        public int SelectFlg
-        {
-            get { return m_SelectFlg; }
-            set { m_SelectFlg = value; }
-        }
-
-        /// <summary>
-        /// é�¸æŠžåŒºåˆ†
-        /// </summary>
-        public int SalaryFlg
-        {
-            get { return m_SalaryFlg; }
-            set { m_SalaryFlg = value; }
-        }
-        /// <summary>
-        /// é�¸æŠžæ—¥æ•°
-        /// </summary>
-        public int SalaryDays
-        {
-            get { return m_SalaryDays; }
-            set { m_SalaryDays = value; }
-        }
-
-        /// <summary>
-        /// çµ‚äº†ãƒœã‚¿ãƒ³çŠ¶æ…‹
-        /// </summary>
-        public DialogResult EndButton
-        {
-            get { return m_EndButton; }
-        }
-        #endregion
-
-        #region ã‚³ãƒ³ã‚¹ãƒˆãƒ©ã‚¯ã‚¿
-        /// <summary>
-        /// ãƒ•ã‚©ãƒ¼ãƒ åˆ�æœŸåŒ–
-        /// </summary>
-        public FrmSelectPerson()
-        {
-            InitializeComponent();
-        }
-        #endregion
-
-        #region ãƒ•ã‚©ãƒ¼ãƒ ãƒ­ãƒ¼ãƒ‰
-        /// <summary>
-        /// ãƒ•ã‚©ãƒ¼ãƒ ãƒ­ãƒ¼ãƒ‰
-        /// </summary>
-        /// <param name="sender"></param>
-        /// <param name="e"></param>
-        private void FrmCostStructureDiag_Load(object sender, EventArgs e)
-        {
-            // ãƒ•ã‚©ãƒ¼ãƒ ã‚µã‚¤ã‚ºå›ºå®š
-            this.MaximizedBounds = new Rectangle(this.Left, this.Top, this.Width, this.Height);
-
-            // éƒ¨ç½²ã‚³ãƒ³ãƒœãƒœãƒƒã‚¯ã‚¹ã‚»ãƒƒãƒˆ
-            SetInitcmbDepartment();
-            // æ‹…å½“è€…ã‚³ãƒ³ãƒœãƒœãƒƒã‚¯ã‚¹ã‚»ãƒƒãƒˆ
-            SetInitcmbPersonInCharge();
-
-            if (m_Person != 0) cmbPerson.SelectedValue = m_Person;
-            // ãƒ‘ãƒ©ãƒ¡ãƒ¼ã‚¿ãƒ‘ãƒ�ãƒ«è¡¨ç¤º
-            switch (m_SelectFlg)
-            {
-                case (int)CommonDefine.PersonSelectFlg.Assistant:
-                    this.Text = "å‰¯æ‹…å½“è€…é�¸æŠž";
-                    pnlCostParam.BackColor = Color.Beige;
-                    break;
-                case (int)CommonDefine.PersonSelectFlg.Instructor:
-                    this.Text = "æŒ‡å°Žå“¡é�¸æŠž";
-                    pnlCostParam.BackColor = Color.MistyRose;
-                    break;
-            }
-
-            bInitFlg = false;
-        }
-        #endregion
-
-        #region Ã—ãƒœã‚¿ãƒ³
-        /// <summary>
-        /// Ã—ãƒœã‚¿ãƒ³æŠ¼ä¸‹å‡¦ç�†
-        /// </summary>
-        /// <param name="sender"></param>
-        /// <param name="e"></param>
-        private void FrmStatusAndDate_FormClosed(object sender, FormClosedEventArgs e)
-        {
-            if (m_EndButton == DialogResult.None) m_EndButton = DialogResult.Cancel;
-        }
-        #endregion
-
-        #region ã‚­ãƒ£ãƒ³ã‚»ãƒ«ãƒœã‚¿ãƒ³
-        /// <summary>
-        /// ã‚­ãƒ£ãƒ³ã‚»ãƒ«ãƒœã‚¿ãƒ³
-        /// </summary>
-        /// <param name="sender"></param>
-        /// <param name="e"></param>
-        private void btnCancel_Click(object sender, EventArgs e)
-        {
-            m_EndButton = DialogResult.Cancel;
-            this.Close();
-        }
-        #endregion
-
-        #region å®Ÿè¡Œãƒœã‚¿ãƒ³
-        /// <summary>
-        /// å®Ÿè¡Œãƒœã‚¿ãƒ³
-        /// </summary>
-        /// <param name="sender"></param>
-        /// <param name="e"></param>
-        private void btnExecute_Click(object sender, EventArgs e)
-        {
-            if (cmbPerson.Text.Length == 0) return;
-            
-            if (MessageBox.Show("å¯¾è±¡æ‹…å½“è€…ã‚’å¤‰æ›´ã�—ã�¾ã�™ã€�ã‚ˆã‚�ã�—ã�„ã�§ã�™ã�‹ï¼Ÿ", "å…¥åŠ›å®Œäº†ç¢ºèª�"
-                    , MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No) return;
-            
-            m_Departmanet = CommonMotions.cnvInt(cmbDepartment.SelectedValue);
-            m_Person = CommonMotions.cnvInt(cmbPerson.SelectedValue);
-            if (radioButton4.Checked) m_SalaryFlg = (int)CommonDefine.SalaryDevision.All;       // å…¨æ—¥
-            if (radioButton5.Checked) m_SalaryFlg = (int)CommonDefine.SalaryDevision.Noting;    // æŒ¯åˆ†ç„¡
-            if (radioButton6.Checked) m_SalaryFlg = (int)CommonDefine.SalaryDevision.DaysInput; // æ—¥æ•°å…¥åŠ›
-            m_SalaryDays = CommonMotions.cnvInt(textBox2.Text);
-
-            m_EndButton = DialogResult.OK;
-            this.Close();
-        }
-        #endregion
-
-        #region éƒ¨ç½²ã‚³ãƒ³ãƒœãƒœãƒƒã‚¯ã‚¹å¤‰æ›´
-        /// <summary>
-        /// éƒ¨ç½²ã‚³ãƒ³ãƒœãƒœãƒƒã‚¯ã‚¹å¤‰æ›´
-        /// </summary>
-        /// <param name="sender"></param>
-        /// <param name="e"></param>
-        private void cmbDepartment_SelectedIndexChanged(object sender, EventArgs e)
-        {
-            if (bInitFlg) return;
-            // æ‹…å½“è€…ã‚³ãƒ³ãƒœãƒœãƒƒã‚¯ã‚¹ã�¸è©²å½“ãƒ‡ãƒ¼ã‚¿ã�®ã�¿ã‚»ãƒƒãƒˆ
-            SetcmbPersons();
-        }
-        #endregion
-
-        #region æ‹…å½“è€…ã‚³ãƒ³ãƒœãƒœãƒƒã‚¯ã‚¹å¤‰æ›´
-        /// <summary>
-        /// æ‹…å½“è€…ã‚³ãƒ³ãƒœãƒœãƒƒã‚¯ã‚¹å¤‰æ›´
-        /// </summary>
-        /// <param name="sender"></param>
-        /// <param name="e"></param>
-        private void cmbPerson_SelectedIndexChanged(object sender, EventArgs e)
-        {
-            if (bInitFlg) return;
-            SetPersonToDepartment();
-        }
-        #endregion
-
-        // ------ ãƒ­ãƒ¼ã‚«ãƒ«ãƒ¡ã‚½ãƒƒãƒ‰
-        #region éƒ¨ç½²ã‚³ãƒ³ãƒœãƒœãƒƒã‚¯ã‚¹åˆ�æœŸã‚»ãƒƒãƒˆ
-        /// <summary>
-        /// éƒ¨ç½²ã‚³ãƒ³ãƒœãƒœãƒƒã‚¯ã‚¹ã�¸æ–‡å­—ã‚’ã‚»ãƒƒãƒˆã�™ã‚‹
-        /// </summary>
-        private bool SetInitcmbDepartment()
-        {
-            IOMDepartment dmDB = new IOMDepartment();
-            try
-            {
-                // éƒ¨ç½²ãƒžã‚¹ã‚¿ã‚’æ¤œç´¢ã�™ã‚‹
-                string strSQL = " Where DeleteFlg = 0 ORDER BY DisplayOrder ASC";
-                List<DepartmentMaster> dmList = new List<DepartmentMaster>();
-                // éƒ¨ç½²ãƒžã‚¹ã‚¿èª­è¾¼
-                if (!dmDB.SelectAction(strSQL, ref dmList)) return false;
-
-                List<KeyValuePair<int, string>> DataList = new List<KeyValuePair<int, string>>();
-                DataList.Add(new KeyValuePair<int, string>(0, ""));
-                // ãƒ‡ãƒ¼ã‚¿è¡¨ç¤º
-                foreach (DepartmentMaster wrk in dmList)
-                {
-                    KeyValuePair<int, string> keyval = new KeyValuePair<int, string>(wrk.DepartmentCode, wrk.DepartmentString);
-
-                    DataList.Add(keyval);
-                }
-
-                // ã‚³ãƒ³ãƒœãƒœãƒƒã‚¯ã‚¹åˆ�æœŸè¡¨ç¤º
-                ComboBoxAction.InitDataSetCombBox(cmbDepartment, DataList);
-                cmbDepartment.SelectedIndex = -1;
-
-                return true;
-            }
-            catch (Exception ex)
-            {
-                logger.ErrorFormat("ã‚·ã‚¹ãƒ†ãƒ ã‚¨ãƒ©ãƒ¼ï¼š{0}ï¼š{1}", CommonMotions.GetMethodName(), ex.Message);
-                return false;
-            }
-            finally
-            {
-                dmDB.close(); dmDB = null;
-            }
-        }
-        #endregion
-
-        #region æ‹…å½“è€…ã‚³ãƒ³ãƒœãƒœãƒƒã‚¯ã‚¹åˆ�æœŸã‚»ãƒƒãƒˆ
-        /// <summary>
-        /// æ‹…å½“è€…ã‚³ãƒ³ãƒœãƒœãƒƒã‚¯ã‚¹ã�¸æ–‡å­—ã‚’ã‚»ãƒƒãƒˆã�™ã‚‹
-        /// </summary>
-        private bool SetInitcmbPersonInCharge()
-        {
-            IOMPersonInCharge picDB = new IOMPersonInCharge();
-            List<PersonInChargeMaster> workList = new List<PersonInChargeMaster>();
-            try
-            {
-                // æ‹…å½“è€…ãƒžã‚¹ã‚¿ã‚’æ¤œç´¢ã�™ã‚‹
-                string strSQL = " Where DeleteFlg = 0 Order By EmployeeClassFlg ASC, DisplayOrder ASC";
-
-                // æ‹…å½“è€…ãƒžã‚¹ã‚¿èª­è¾¼
-                if (!picDB.SelectAction(strSQL, ref workList)) return false;
-
-                List<KeyValuePair<int, string>> DataList = new List<KeyValuePair<int, string>>();
-                DataList.Add(new KeyValuePair<int, string>(0, ""));
-                // ãƒ‡ãƒ¼ã‚¿è¡¨ç¤º
-                foreach (PersonInChargeMaster wrk in workList)
-                {
-                    KeyValuePair<int, string> keyval = new KeyValuePair<int, string>(wrk.PersonCode, wrk.PersonName);
-
-                    DataList.Add(keyval);
-                }
-
-                // ã‚³ãƒ³ãƒœãƒœãƒƒã‚¯ã‚¹åˆ�æœŸè¡¨ç¤º
-                ComboBoxAction.InitDataSetCombBox(cmbPerson, DataList);
-
-                cmbPerson.SelectedIndex = -1;
-
-                return true;
-            }
-            catch (Exception ex)
-            {
-                logger.ErrorFormat("ã‚·ã‚¹ãƒ†ãƒ ã‚¨ãƒ©ãƒ¼ï¼š{0}ï¼š{1}", CommonMotions.GetMethodName(), ex.Message);
-                return false;
-            }
-            finally
-            {
-                picDB.close(); picDB = null;
-            }
-        }
-        #endregion
-
-        #region æ‹…å½“è€…ã‚³ãƒ³ãƒœãƒœãƒƒã‚¯ã‚¹ã‚’ã‚»ãƒƒãƒˆã�™ã‚‹
-        /// <summary>
-        /// æ‹…å½“è€…ã‚³ãƒ³ãƒœãƒœãƒƒã‚¯ã‚¹ã�¸æ–‡å­—ã‚’ã‚»ãƒƒãƒˆã�™ã‚‹
-        /// </summary>
-        private bool SetcmbPersons()
-        {
-            IOMPersonInCharge picDB = new IOMPersonInCharge();
-            bool bSave = bInitFlg;
-            bInitFlg = true;
-            try
-            {
-                List<PersonInChargeMaster> workList = new List<PersonInChargeMaster>();
-
-                cmbPerson.DataSource = null;
-                cmbPerson.Items.Clear();
-                cmbPerson.Text = "";
-
-                string strSQL = string.Empty;
-                int DepartmentCode = CommonMotions.cnvInt(cmbDepartment.SelectedValue);
-                if (DepartmentCode <= 0)
-                    strSQL = " WHERE DeleteFlg = 0 Order By EmployeeClassFlg ASC, DisplayOrder ASC";
-                else
-                    strSQL = string.Format(" WHERE DEPARTMENTCODE = {0} AND DeleteFlg = 0 Order By EmployeeClassFlg ASC, DisplayOrder ASC", DepartmentCode);
-
-                // æ‹…å½“è€…ãƒžã‚¹ã‚¿èª­è¾¼
-                if (!picDB.SelectAction(strSQL, ref workList)) return false;
-
-                List<KeyValuePair<int, string>> ConstructionDataList = new List<KeyValuePair<int, string>>();
-                ConstructionDataList.Add(new KeyValuePair<int, string>(0, ""));
-
-                foreach (PersonInChargeMaster work in workList)
-                {
-                    KeyValuePair<int, string> keyval = new KeyValuePair<int, string>(work.PersonCode, work.PersonName);
-
-                    ConstructionDataList.Add(keyval);
-                }
-
-                // ã‚³ãƒ³ãƒœãƒœãƒƒã‚¯ã‚¹åˆ�æœŸè¡¨ç¤º
-                ComboBoxAction.InitDataSetCombBox(cmbPerson, ConstructionDataList);
-
-                return true;
-            }
-            catch (Exception ex)
-            {
-                logger.ErrorFormat("ã‚·ã‚¹ãƒ†ãƒ ã‚¨ãƒ©ãƒ¼ï¼š{0}ï¼š{1}", CommonMotions.GetMethodName(), ex.Message);
-                return false;
-            }
-            finally
-            {
-                picDB.close(); picDB = null;
-                bInitFlg = bSave;
-            }
-        }
-        #endregion
-
-        #region æ‹…å½“è€…ã�‹ã‚‰éƒ¨ç½²ã�®ã‚³ãƒ¼ãƒ‰ã‚’å�–ã‚Šå‡ºã�—ã�¦éƒ¨ç½²ã‚³ãƒ³ãƒœã�¸ã‚»ãƒƒãƒˆã�™ã‚‹
-        /// <summary>
-        /// æ‹…å½“è€…ã�‹ã‚‰éƒ¨ç½²ã�®ã‚³ãƒ¼ãƒ‰ã‚’å�–ã‚Šå‡ºã�—ã�¦éƒ¨ç½²ã‚³ãƒ³ãƒœã�¸ã‚»ãƒƒãƒˆã�™ã‚‹
-        /// </summary>
-        private void SetPersonToDepartment()
-        {
-            IOMPersonInCharge picDB = new IOMPersonInCharge();
-            try
-            {
-                int PersonCode= CommonMotions.cnvInt(cmbPerson.SelectedValue);
-                string strSQL = picDB.CreatePrimarykeyString(PersonCode);
-                PersonInChargeMaster PersonRec = new PersonInChargeMaster();
-                if (!picDB.SelectAction(strSQL, ref PersonRec)) return;
-
-                bool bSave = bInitFlg;
-                bInitFlg = true;
-                cmbDepartment.SelectedValue = PersonRec.DepartmentCode;
-                bInitFlg = bSave;
-            }
-            catch (Exception ex)
-            {
-                logger.ErrorFormat("ã‚·ã‚¹ãƒ†ãƒ ã‚¨ãƒ©ãƒ¼ï¼š{0}ï¼š{1}", CommonMotions.GetMethodName(), ex.Message);
-            }
-            finally
-            {
-                picDB.close(); picDB = null;
-            }
-        }
-        #endregion
-
-        #region ãƒ©ã‚¸ã‚ªãƒœã‚¿ãƒ³å¤‰æ›´
-        /// <summary>
-        /// ãƒ©ã‚¸ã‚ªãƒœã‚¿ãƒ³å¤‰æ›´
-        /// </summary>
-        /// <param name="sender"></param>
-        /// <param name="e"></param>
-        private void radioButton_CheckedChanged(object sender, EventArgs e)
-        {
-            if (radioButton6.Checked)
-            {
-                textBox2.Enabled = true;
-            }
-            else
-            {
-                textBox2.Text = "";
-                textBox2.Enabled = false;
-            }
-        }
-        #endregion
-    }
-}
Index: branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionLedger/FrmSelectPerson.Designer.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionLedger/FrmSelectPerson.Designer.cs	(revision 329)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionLedger/FrmSelectPerson.Designer.cs	(nonexistent)
@@ -1,247 +0,0 @@
-ï»¿namespace ProcessManagement.Forms.DataEntry
-{
-    partial class FrmSelectPerson
-    {
-        /// <summary>
-        /// Required designer variable.
-        /// </summary>
-        private System.ComponentModel.IContainer components = null;
-
-        /// <summary>
-        /// Clean up any resources being used.
-        /// </summary>
-        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
-        protected override void Dispose(bool disposing)
-        {
-            if (disposing && (components != null))
-            {
-                components.Dispose();
-            }
-            base.Dispose(disposing);
-        }
-
-        #region Windows Form Designer generated code
-
-        /// <summary>
-        /// Required method for Designer support - do not modify
-        /// the contents of this method with the code editor.
-        /// </summary>
-        private void InitializeComponent()
-        {
-            this.btnExecute = new System.Windows.Forms.Button();
-            this.btnCancel = new System.Windows.Forms.Button();
-            this.panel1 = new System.Windows.Forms.Panel();
-            this.label113 = new System.Windows.Forms.Label();
-            this.label76 = new System.Windows.Forms.Label();
-            this.pnlCostParam = new System.Windows.Forms.Panel();
-            this.label22 = new System.Windows.Forms.Label();
-            this.textBox2 = new System.Windows.Forms.TextBox();
-            this.radioButton6 = new System.Windows.Forms.RadioButton();
-            this.radioButton5 = new System.Windows.Forms.RadioButton();
-            this.radioButton4 = new System.Windows.Forms.RadioButton();
-            this.cmbDepartment = new ProcessManagement.Forms.CustomControls.ComboBoxEX();
-            this.cmbPerson = new ProcessManagement.Forms.CustomControls.ComboBoxEX();
-            this.panel1.SuspendLayout();
-            this.pnlCostParam.SuspendLayout();
-            this.SuspendLayout();
-            // 
-            // btnExecute
-            // 
-            this.btnExecute.BackColor = System.Drawing.Color.Green;
-            this.btnExecute.ForeColor = System.Drawing.Color.White;
-            this.btnExecute.Location = new System.Drawing.Point(233, 10);
-            this.btnExecute.Name = "btnExecute";
-            this.btnExecute.Size = new System.Drawing.Size(140, 40);
-            this.btnExecute.TabIndex = 0;
-            this.btnExecute.Text = "å®Ÿã€€ã€€è¡Œ";
-            this.btnExecute.UseVisualStyleBackColor = false;
-            this.btnExecute.Click += new System.EventHandler(this.btnExecute_Click);
-            // 
-            // btnCancel
-            // 
-            this.btnCancel.BackColor = System.Drawing.Color.Red;
-            this.btnCancel.ForeColor = System.Drawing.Color.White;
-            this.btnCancel.Location = new System.Drawing.Point(379, 10);
-            this.btnCancel.Name = "btnCancel";
-            this.btnCancel.Size = new System.Drawing.Size(140, 40);
-            this.btnCancel.TabIndex = 3;
-            this.btnCancel.Text = "ã‚­ãƒ£ãƒ³ã‚»ãƒ«";
-            this.btnCancel.UseVisualStyleBackColor = false;
-            this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click);
-            // 
-            // panel1
-            // 
-            this.panel1.BackColor = System.Drawing.Color.WhiteSmoke;
-            this.panel1.Controls.Add(this.btnCancel);
-            this.panel1.Controls.Add(this.btnExecute);
-            this.panel1.Location = new System.Drawing.Point(-8, 140);
-            this.panel1.Name = "panel1";
-            this.panel1.Size = new System.Drawing.Size(540, 60);
-            this.panel1.TabIndex = 3;
-            // 
-            // label113
-            // 
-            this.label113.BackColor = System.Drawing.Color.LightGreen;
-            this.label113.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
-            this.label113.Location = new System.Drawing.Point(262, 25);
-            this.label113.Name = "label113";
-            this.label113.Size = new System.Drawing.Size(250, 30);
-            this.label113.TabIndex = 67;
-            this.label113.Text = "æ‹…ã€€å½“ã€€è€…";
-            this.label113.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
-            // 
-            // label76
-            // 
-            this.label76.BackColor = System.Drawing.Color.LightGreen;
-            this.label76.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
-            this.label76.Location = new System.Drawing.Point(12, 25);
-            this.label76.Name = "label76";
-            this.label76.Size = new System.Drawing.Size(250, 30);
-            this.label76.TabIndex = 68;
-            this.label76.Text = "éƒ¨ã€€ã€€ç½²";
-            this.label76.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
-            // 
-            // pnlCostParam
-            // 
-            this.pnlCostParam.BackColor = System.Drawing.Color.Beige;
-            this.pnlCostParam.Controls.Add(this.label22);
-            this.pnlCostParam.Controls.Add(this.textBox2);
-            this.pnlCostParam.Controls.Add(this.radioButton6);
-            this.pnlCostParam.Controls.Add(this.radioButton5);
-            this.pnlCostParam.Controls.Add(this.radioButton4);
-            this.pnlCostParam.Location = new System.Drawing.Point(12, 92);
-            this.pnlCostParam.Name = "pnlCostParam";
-            this.pnlCostParam.Size = new System.Drawing.Size(499, 40);
-            this.pnlCostParam.TabIndex = 71;
-            // 
-            // label22
-            // 
-            this.label22.AutoSize = true;
-            this.label22.Font = new System.Drawing.Font("ï¼­ï¼³ æ˜Žæœ�", 15.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
-            this.label22.Location = new System.Drawing.Point(437, 12);
-            this.label22.Name = "label22";
-            this.label22.Size = new System.Drawing.Size(33, 21);
-            this.label22.TabIndex = 14;
-            this.label22.Text = "æ—¥";
-            // 
-            // textBox2
-            // 
-            this.textBox2.BackColor = System.Drawing.Color.White;
-            this.textBox2.Enabled = false;
-            this.textBox2.Font = new System.Drawing.Font("ï¼­ï¼³ æ˜Žæœ�", 15.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
-            this.textBox2.Location = new System.Drawing.Point(381, 8);
-            this.textBox2.MaxLength = 6;
-            this.textBox2.Name = "textBox2";
-            this.textBox2.Size = new System.Drawing.Size(56, 28);
-            this.textBox2.TabIndex = 10;
-            this.textBox2.TabStop = false;
-            this.textBox2.TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
-            // 
-            // radioButton6
-            // 
-            this.radioButton6.AutoSize = true;
-            this.radioButton6.Font = new System.Drawing.Font("ï¼­ï¼³ æ˜Žæœ�", 15.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
-            this.radioButton6.Location = new System.Drawing.Point(261, 10);
-            this.radioButton6.Name = "radioButton6";
-            this.radioButton6.Size = new System.Drawing.Size(120, 25);
-            this.radioButton6.TabIndex = 13;
-            this.radioButton6.Text = "æ—¥æ•°æŒ‡å®š";
-            this.radioButton6.UseVisualStyleBackColor = true;
-            this.radioButton6.CheckedChanged += new System.EventHandler(this.radioButton_CheckedChanged);
-            // 
-            // radioButton5
-            // 
-            this.radioButton5.AutoSize = true;
-            this.radioButton5.Font = new System.Drawing.Font("ï¼­ï¼³ æ˜Žæœ�", 15.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
-            this.radioButton5.Location = new System.Drawing.Point(156, 10);
-            this.radioButton5.Name = "radioButton5";
-            this.radioButton5.Size = new System.Drawing.Size(97, 25);
-            this.radioButton5.TabIndex = 12;
-            this.radioButton5.Text = "æœªæŒ¯åˆ†";
-            this.radioButton5.UseVisualStyleBackColor = true;
-            this.radioButton5.CheckedChanged += new System.EventHandler(this.radioButton_CheckedChanged);
-            // 
-            // radioButton4
-            // 
-            this.radioButton4.AutoSize = true;
-            this.radioButton4.Checked = true;
-            this.radioButton4.Font = new System.Drawing.Font("ï¼­ï¼³ æ˜Žæœ�", 15.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
-            this.radioButton4.Location = new System.Drawing.Point(28, 10);
-            this.radioButton4.Name = "radioButton4";
-            this.radioButton4.Size = new System.Drawing.Size(120, 25);
-            this.radioButton4.TabIndex = 11;
-            this.radioButton4.TabStop = true;
-            this.radioButton4.Text = "å…¨æ—¥æŒ¯åˆ†";
-            this.radioButton4.UseVisualStyleBackColor = true;
-            this.radioButton4.CheckedChanged += new System.EventHandler(this.radioButton_CheckedChanged);
-            // 
-            // cmbDepartment
-            // 
-            this.cmbDepartment.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
-            this.cmbDepartment.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
-            this.cmbDepartment.FormattingEnabled = true;
-            this.cmbDepartment.Location = new System.Drawing.Point(12, 55);
-            this.cmbDepartment.Name = "cmbDepartment";
-            this.cmbDepartment.Size = new System.Drawing.Size(250, 29);
-            this.cmbDepartment.TabIndex = 69;
-            this.cmbDepartment.SelectedIndexChanged += new System.EventHandler(this.cmbDepartment_SelectedIndexChanged);
-            // 
-            // cmbPerson
-            // 
-            this.cmbPerson.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
-            this.cmbPerson.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
-            this.cmbPerson.FormattingEnabled = true;
-            this.cmbPerson.Location = new System.Drawing.Point(262, 55);
-            this.cmbPerson.Name = "cmbPerson";
-            this.cmbPerson.Size = new System.Drawing.Size(250, 29);
-            this.cmbPerson.TabIndex = 70;
-            this.cmbPerson.SelectedIndexChanged += new System.EventHandler(this.cmbPerson_SelectedIndexChanged);
-            // 
-            // FrmSelectPerson
-            // 
-            this.AcceptButton = this.btnExecute;
-            this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
-            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
-            this.BackColor = System.Drawing.Color.YellowGreen;
-            this.ClientSize = new System.Drawing.Size(524, 195);
-            this.Controls.Add(this.pnlCostParam);
-            this.Controls.Add(this.cmbDepartment);
-            this.Controls.Add(this.cmbPerson);
-            this.Controls.Add(this.label113);
-            this.Controls.Add(this.label76);
-            this.Controls.Add(this.panel1);
-            this.Font = new System.Drawing.Font("ï¼­ï¼³ æ˜Žæœ�", 15.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
-            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
-            this.KeyPreview = true;
-            this.MaximizeBox = false;
-            this.MinimizeBox = false;
-            this.Name = "FrmSelectPerson";
-            this.ShowIcon = false;
-            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
-            this.Text = "æ‹…å½“è€…é�¸æŠž";
-            this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.FrmStatusAndDate_FormClosed);
-            this.Load += new System.EventHandler(this.FrmCostStructureDiag_Load);
-            this.panel1.ResumeLayout(false);
-            this.pnlCostParam.ResumeLayout(false);
-            this.pnlCostParam.PerformLayout();
-            this.ResumeLayout(false);
-
-        }
-
-        #endregion
-
-        private System.Windows.Forms.Button btnExecute;
-        private System.Windows.Forms.Button btnCancel;
-        private System.Windows.Forms.Panel panel1;
-        private ProcessManagement.Forms.CustomControls.ComboBoxEX cmbDepartment;
-        private ProcessManagement.Forms.CustomControls.ComboBoxEX cmbPerson;
-        private System.Windows.Forms.Label label113;
-        private System.Windows.Forms.Label label76;
-        private System.Windows.Forms.Panel pnlCostParam;
-        private System.Windows.Forms.Label label22;
-        private System.Windows.Forms.TextBox textBox2;
-        private System.Windows.Forms.RadioButton radioButton6;
-        private System.Windows.Forms.RadioButton radioButton5;
-        private System.Windows.Forms.RadioButton radioButton4;
-    }
-}
\ No newline at end of file
Index: branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionLedger/FrmSelectPerson.resx
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionLedger/FrmSelectPerson.resx	(revision 329)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionLedger/FrmSelectPerson.resx	(nonexistent)
@@ -1,120 +0,0 @@
-ï»¿<?xml version="1.0" encoding="utf-8"?>
-<root>
-  <!-- 
-    Microsoft ResX Schema 
-    
-    Version 2.0
-    
-    The primary goals of this format is to allow a simple XML format 
-    that is mostly human readable. The generation and parsing of the 
-    various data types are done through the TypeConverter classes 
-    associated with the data types.
-    
-    Example:
-    
-    ... ado.net/XML headers & schema ...
-    <resheader name="resmimetype">text/microsoft-resx</resheader>
-    <resheader name="version">2.0</resheader>
-    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
-    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
-    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
-    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
-    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
-        <value>[base64 mime encoded serialized .NET Framework object]</value>
-    </data>
-    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
-        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
-        <comment>This is a comment</comment>
-    </data>
-                
-    There are any number of "resheader" rows that contain simple 
-    name/value pairs.
-    
-    Each data row contains a name, and value. The row also contains a 
-    type or mimetype. Type corresponds to a .NET class that support 
-    text/value conversion through the TypeConverter architecture. 
-    Classes that don't support this are serialized and stored with the 
-    mimetype set.
-    
-    The mimetype is used for serialized objects, and tells the 
-    ResXResourceReader how to depersist the object. This is currently not 
-    extensible. For a given mimetype the value must be set accordingly:
-    
-    Note - application/x-microsoft.net.object.binary.base64 is the format 
-    that the ResXResourceWriter will generate, however the reader can 
-    read any of the formats listed below.
-    
-    mimetype: application/x-microsoft.net.object.binary.base64
-    value   : The object must be serialized with 
-            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
-            : and then encoded with base64 encoding.
-    
-    mimetype: application/x-microsoft.net.object.soap.base64
-    value   : The object must be serialized with 
-            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
-            : and then encoded with base64 encoding.
-
-    mimetype: application/x-microsoft.net.object.bytearray.base64
-    value   : The object must be serialized into a byte array 
-            : using a System.ComponentModel.TypeConverter
-            : and then encoded with base64 encoding.
-    -->
-  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
-    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
-    <xsd:element name="root" msdata:IsDataSet="true">
-      <xsd:complexType>
-        <xsd:choice maxOccurs="unbounded">
-          <xsd:element name="metadata">
-            <xsd:complexType>
-              <xsd:sequence>
-                <xsd:element name="value" type="xsd:string" minOccurs="0" />
-              </xsd:sequence>
-              <xsd:attribute name="name" use="required" type="xsd:string" />
-              <xsd:attribute name="type" type="xsd:string" />
-              <xsd:attribute name="mimetype" type="xsd:string" />
-              <xsd:attribute ref="xml:space" />
-            </xsd:complexType>
-          </xsd:element>
-          <xsd:element name="assembly">
-            <xsd:complexType>
-              <xsd:attribute name="alias" type="xsd:string" />
-              <xsd:attribute name="name" type="xsd:string" />
-            </xsd:complexType>
-          </xsd:element>
-          <xsd:element name="data">
-            <xsd:complexType>
-              <xsd:sequence>
-                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
-                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
-              </xsd:sequence>
-              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
-              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
-              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
-              <xsd:attribute ref="xml:space" />
-            </xsd:complexType>
-          </xsd:element>
-          <xsd:element name="resheader">
-            <xsd:complexType>
-              <xsd:sequence>
-                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
-              </xsd:sequence>
-              <xsd:attribute name="name" type="xsd:string" use="required" />
-            </xsd:complexType>
-          </xsd:element>
-        </xsd:choice>
-      </xsd:complexType>
-    </xsd:element>
-  </xsd:schema>
-  <resheader name="resmimetype">
-    <value>text/microsoft-resx</value>
-  </resheader>
-  <resheader name="version">
-    <value>2.0</value>
-  </resheader>
-  <resheader name="reader">
-    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
-  </resheader>
-  <resheader name="writer">
-    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
-  </resheader>
-</root>
\ No newline at end of file
Index: branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionLedger/FrmConstructionLedgerAuxiliary.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionLedger/FrmConstructionLedgerAuxiliary.cs	(revision 329)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionLedger/FrmConstructionLedgerAuxiliary.cs	(revision 330)
@@ -8765,45 +8765,6 @@
         //}
         #endregion
 
-        #region ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã�®æœŸé¦–æ—¥ãƒ»æœŸæœ«æ—¥ã‚’æ±‚ã‚�ã‚‹
-        /// <summary>
-        /// ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã�®æœŸé¦–æ—¥ãƒ»æœŸæœ«æ—¥ã‚’æ±‚ã‚�ã‚‹
-        /// </summary>
-        /// <param name="dtStart"></param>
-        /// <param name="dtEnd"></param>
-        private void CreateDefaultStartAndEndDate(ref DateTime dtStart, ref DateTime dtEnd, int C16)
-        {
-            try
-            {
-                // å½“æœŸæœŸé¦–å¹´æœˆæ—¥ã‚’å�–å¾—
-                int iYear = 0;
-                int month = 0;
-                int day = 0;
-                bool bPeriod = false;
-                if (CommonMotions.SystemMasterData.ConstructionNoBase == (int)SystemMaster.ConstrNoBaseDef.BusinessPeriod)
-                {   // å–¶æ¥­æœŸ
-                    iYear = CommonMotions.PeriodCountToYear(C16);
-                    bPeriod = true;
-                }
-                else
-                {   // å·¥äº‹å¹´åº¦
-                    iYear = CommonMotions.SystemMasterData.ConstrYear;
-                }
-                CommonMotions.GetNowBeginMonthDay(bPeriod, ref month, ref day);
-                dtStart = new DateTime(iYear, month, day);
-                dtEnd = dtStart.AddYears(1).AddDays(-1);     // çµ‚äº†ã�¯ï¼‹1å¹´ï¼�1æ—¥
-
-                // ä»ŠæœŸã�®å ´å�ˆã�¯ä»Šæ—¥ã�®æ—¥ä»˜ã�¾ã�§ã‚’è¨ˆç®—ã�™ã‚‹
-                if (C16 == CommonMotions.SystemMasterData.BusinessPeriod) dtEnd = DateTime.Today;
-
-            }
-            catch (Exception ex)
-            {
-                logger.ErrorFormat("ã‚·ã‚¹ãƒ†ãƒ ã‚¨ãƒ©ãƒ¼ï¼š{0}ï¼š{1}", CommonMotions.GetMethodName(), ex.Message);
-            }
-        }
-        #endregion
-
         #region ä¸€æ‹¬å†�è¨ˆç®—å‡¦ç�†
         /// <summary>
         /// ä¸€æ‹¬å†�è¨ˆç®—å‡¦ç�†
Index: branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionLedgerList/CreateLedgerSQL.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionLedgerList/CreateLedgerSQL.cs	(revision 329)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionLedgerList/CreateLedgerSQL.cs	(revision 330)
@@ -204,6 +204,7 @@
         /// <param name="dtEnd"></param>
         public static void CreateDefaultStartAndEndDate(int BusinessPeriod, ref DateTime dtStart, ref DateTime dtEnd)
         {
+            IOMBizPeriodHistory BizHisDB = new IOMBizPeriodHistory();
             try
             {
                 // å½“æœŸæœŸé¦–å¹´æœˆæ—¥ã‚’å�–å¾—
@@ -222,12 +223,26 @@
                 }
                 CommonMotions.GetNowBeginMonthDay(bPeriod, ref month, ref day);
                 dtStart = new DateTime(iYear, month, day);
-                dtEnd = dtStart.AddYears(1).AddDays(-1);     // çµ‚äº†ã�¯ï¼‹1å¹´ï¼�1æ—¥
+
+                StringBuilder strSQL = new StringBuilder();
+                strSQL.AppendFormat(" Where DATE(BeginDate) = DATE('{0}')", dtStart.ToShortDateString());
+                strSQL.AppendFormat(" And PeriodFlag = {0}", CommonMotions.SystemMasterData.ConstructionNoBase);
+                strSQL.Append(" Order By PeriodFlag Asc, PeriodYear Asc");
+
+                List<BizPeriodHistory> BizList = new List<BizPeriodHistory>();
+                if (!BizHisDB.SelectAction(strSQL.ToString(), ref BizList)) return;
+
+                // çµ‚äº†å¹´æœˆæ—¥
+                dtEnd = BizList[0].CompleteDate;
             }
             catch (Exception ex)
             {
                 logger.ErrorFormat("ã‚·ã‚¹ãƒ†ãƒ ã‚¨ãƒ©ãƒ¼ï¼š{0}ï¼š{1}", CommonMotions.GetMethodName(), ex.Message);
             }
+            finally
+            {
+                BizHisDB.close(); BizHisDB = null;
+            }
         }
         #endregion
 
@@ -420,272 +435,5 @@
             }
         }
         #endregion
-
-        #region æœŸé–“ãƒ‡ãƒ¼ã‚¿å�–å¾—é † â€»æ—§ãƒ�ãƒ¼ã‚¸ãƒ§ãƒ³
-        /// <summary>
-        /// æœŸé–“ãƒ‡ãƒ¼ã‚¿å�–å¾—é † â€»æ—§ãƒ�ãƒ¼ã‚¸ãƒ§ãƒ³
-        /// </summary>
-        private enum GetPersonTermOLD
-        {
-            DepartmentCode = 0,
-            /// <summary>
-            /// æ‹…å½“è€…ã‚³ãƒ¼ãƒ‰
-            /// </summary>
-            PersonCode,
-            /// <summary>
-            /// æ‹…å½“è€…å��
-            /// </summary>
-            Personname,
-            /// <summary>
-            /// è¡¨ç¤ºé †
-            /// </summary>
-            Displayorder,
-            /// <summary>
-            /// æœˆé¡�çµ¦ä¸Ž
-            /// </summary>
-            MonthlySalary,
-            /// <summary>
-            /// é›‡ç”¨é–‹å§‹æ—¥ä»˜
-            /// </summary>
-            HireStartDays,
-            /// <summary>
-            /// é›‡ç”¨çµ‚äº†æ—¥ä»˜
-            /// </summary>
-            HireCompDays,
-            /// <summary>
-            /// æ‹…å½“è€…å¥‘ç´„å·¥æœŸé–‹å§‹
-            /// </summary>
-            MainStart1,
-            /// <summary>
-            /// æ‹…å½“è€…å¥‘ç´„å·¥æœŸå»¶é•·é–‹å§‹
-            /// </summary>
-            MainStart2,
-            /// <summary>
-            /// å‰¯æ‹…å½“è€…å¥‘ç´„å·¥æœŸé–‹å§‹
-            /// </summary>
-            AssistStart1,
-            /// <summary>
-            /// å‰¯æ‹…å½“è€…å¥‘ç´„å·¥æœŸå»¶é•·é–‹å§‹
-            /// </summary>
-            AssistStart2,
-            /// <summary>
-            /// æŒ‡å°Žå“¡å¥‘ç´„å·¥æœŸé–‹å§‹
-            /// </summary>
-            InstStart1,
-            /// <summary>
-            /// æŒ‡å°Žå“¡å¥‘ç´„å·¥æœŸå»¶é•·é–‹å§‹
-            /// </summary>
-            InstStart2,
-            /// <summary>
-            /// æ‹…å½“è€…å¥‘ç´„å·¥æœŸçµ‚äº†
-            /// </summary>
-            MainEnd1,
-            /// <summary>
-            /// æ‹…å½“è€…å¥‘ç´„å·¥æœŸå»¶é•·çµ‚äº†
-            /// </summary>
-            MainEnd2,
-            /// <summary>
-            /// å‰¯æ‹…å½“è€…å¥‘ç´„å·¥æœŸçµ‚äº†
-            /// </summary>
-            AssistEnd1,
-            /// <summary>
-            /// å‰¯æ‹…å½“è€…å¥‘ç´„å·¥æœŸå»¶é•·çµ‚äº†
-            /// </summary>
-            AssistEnd2,
-            /// <summary>
-            /// æŒ‡å°Žå“¡å¥‘ç´„å·¥æœŸçµ‚äº†
-            /// </summary>
-            InstEnd1,
-            /// <summary>
-            /// æŒ‡å°Žå“¡å¥‘ç´„å·¥æœŸå»¶é•·çµ‚äº†
-            /// </summary>
-            InstEnd2,
-            /// <summary>
-            /// æ‹…å½“è€…é‡‘é¡�é›†è¨ˆ
-            /// </summary>
-            MainSumAmount,
-            /// <summary>
-            /// å‰¯æ‹…å½“è€…é‡‘é¡�é›†è¨ˆ
-            /// </summary>
-            AssistSumAmount,
-            /// <summary>
-            /// æŒ‡å°Žå“¡é‡‘é¡�é›†è¨ˆ
-            /// </summary>
-            InstSumAmount,
-            /// <summary>
-            /// æ‹…å½“è€…ãƒ‡ãƒ¼ã‚¿ä»¶æ•°
-            /// </summary>
-            MainDataCount,
-            /// <summary>
-            /// å‰¯æ‹…å½“è€…ãƒ‡ãƒ¼ã‚¿ä»¶æ•°
-            /// </summary>
-            AssistDataCmount,
-            /// <summary>
-            /// æŒ‡å°Žå“¡ãƒ‡ãƒ¼ã‚¿ä»¶æ•°
-            /// </summary>
-            InstDataCmount,
-        }
-        #endregion
-
-        #region éƒ¨ç½²å†…ã�®æ‹…å½“è€…ã‚³ãƒ¼ãƒ‰ã‚’ä¸€è¦§ã�§è¿”ã�™ã€€â€»æ—§ãƒ�ãƒ¼ã‚¸ãƒ§ãƒ³
-        /// <summary>
-        /// éƒ¨ç½²å†…ã�®æ‹…å½“è€…ã‚³ãƒ¼ãƒ‰ã‚’ä¸€è¦§ã�§è¿”ã�™
-        /// </summary>
-        /// <param name="DepartmentCode">éƒ¨ç½²ã‚³ãƒ¼ãƒ‰</param>
-        /// <param name="PersonCodeList">æ‹…å½“è€…ã‚³ãƒ¼ãƒ‰ä¸€è¦§</param>
-        /// <returns>ãƒ‡ãƒ¼ã‚¿ä»¶æ•°</returns>
-        public static int GetPersonInDepartment_OLD(int BusinessPeriod, int DepartmentCode, int PersonCode, ref ArrayList TargetList)
-        {
-            IOMPersonInCharge PersonDB = new IOMPersonInCharge();
-            try
-            {
-                int NotOrder = CommonDefine.ProjectsStatus.First(x => x.Value.Equals("é�ž å�— æ³¨")).Key;
-
-                StringBuilder strSQL = new StringBuilder();
-                strSQL.Append("SELECT P.PERSONCODE, P.PERSONNAME, P.DISPLAYORDER, P.MonthlySalary,");
-                strSQL.Append(" P.STARTDATE, P.ENDDATE,");
-                strSQL.Append(" MIN(C.CONSTRUCTIONPERIODSTART) M1, MIN(C.CONSTRUCTIONPERIODSTART2) M2,");
-                strSQL.Append(" MIN(D.CONSTRUCTIONPERIODSTART) S1, MIN(D.CONSTRUCTIONPERIODSTART2) S2,");
-                strSQL.Append(" MIN(E.CONSTRUCTIONPERIODSTART) I1, MIN(E.CONSTRUCTIONPERIODSTART2) I2,");
-                strSQL.Append(" MAX(C.CONSTRUCTIONPERIODEND) M3, MAX(C.CONSTRUCTIONPERIODEND2) M4,");
-                strSQL.Append(" MAX(D.CONSTRUCTIONPERIODEND) S3, MAX(D.CONSTRUCTIONPERIODEND2) S4,");
-                strSQL.Append(" MAX(E.CONSTRUCTIONPERIODEND) I3, MAX(E.CONSTRUCTIONPERIODEND2) I4,");
-                strSQL.Append(" SUM(C.EXECUTIONAMOUNT) M5, SUM(D.EXECUTIONAMOUNT) S5, SUM(E.EXECUTIONAMOUNT) I5,");
-                strSQL.Append(" COUNT(C.EXECUTIONAMOUNT) M6, COUNT(D.EXECUTIONAMOUNT) S6, COUNT(E.EXECUTIONAMOUNT) I6");
-                strSQL.Append(" FROM PERSONINCHARGEMASTER P");
-
-                // å·¥äº‹æ‹…å½“è€…ã�®ãƒ‡ãƒ¼ã‚¿å�–å¾—
-                strSQL.Append(" LEFT JOIN (SELECT C1.CONSTRUCTIONPERSONCODE, C1.CONSTRUCTIONSTATUSFLG, C1.CONSTRUCTIONPERIOD");
-                strSQL.Append(", C1.CONSTRUCTIONPERIODSTART, C1.CONSTRUCTIONPERIODSTART2, C1.CONSTRUCTIONPERIODEND, C1.CONSTRUCTIONPERIODEND2, C2.EXECUTIONAMOUNT");
-                strSQL.Append(" FROM CONSTRUCTIONBASEINFO C1, CONSTRUCTIONLEDGERDETAIL C2, CONSTRUCTIONLEDGER C3");
-                strSQL.Append(" WHERE C2.CONSTRUCTIONCODE = C1.CONSTRUCTIONCODE");
-                strSQL.AppendFormat(" AND C2.GROUPCOUNT = {0}", (int)FrmConstructionLedger.DataGroup.Payroll);
-                strSQL.Append(" AND C3.CONSTRUCTIONCODE = C2.CONSTRUCTIONCODE) C");
-                strSQL.Append(" ON C.CONSTRUCTIONPERSONCODE = P.PERSONCODE");
-                strSQL.AppendFormat(" AND C.CONSTRUCTIONSTATUSFLG <> {0}", NotOrder);
-                strSQL.AppendFormat(" AND C.CONSTRUCTIONPERIOD = {0}", BusinessPeriod);
-
-                // å·¥äº‹å‰¯æ‹…å½“è€…ã�®ãƒ‡ãƒ¼ã‚¿å�–å¾—
-                strSQL.Append(" LEFT JOIN (SELECT D1.CONSTRSUBPERSONCODE CONSTRUCTIONPERSONCODE, D1.CONSTRUCTIONSTATUSFLG, D1.CONSTRUCTIONPERIOD");
-                strSQL.Append(", D1.CONSTRUCTIONPERIODSTART, D1.CONSTRUCTIONPERIODSTART2, D1.CONSTRUCTIONPERIODEND, D1.CONSTRUCTIONPERIODEND2, D2.EXECUTIONAMOUNT");
-                strSQL.Append(" FROM CONSTRUCTIONBASEINFO D1, CONSTRUCTIONLEDGERDETAIL D2, CONSTRUCTIONLEDGER D3");
-                strSQL.Append(" WHERE D2.CONSTRUCTIONCODE = D1.CONSTRUCTIONCODE");
-                strSQL.AppendFormat(" AND D2.GROUPCOUNT = {0}", (int)FrmConstructionLedger.DataGroup.Assistant);
-                strSQL.Append(" AND D3.CONSTRUCTIONCODE = D2.CONSTRUCTIONCODE) D");
-                strSQL.Append(" ON D.CONSTRUCTIONPERSONCODE = P.PERSONCODE");
-                strSQL.AppendFormat(" AND D.CONSTRUCTIONSTATUSFLG <> {0}", NotOrder);
-                strSQL.AppendFormat(" AND D.CONSTRUCTIONPERIOD = {0}", BusinessPeriod);
-
-                // å·¥äº‹æŒ‡å°Žå“¡ã�®ãƒ‡ãƒ¼ã‚¿å�–å¾—
-                strSQL.Append(" LEFT JOIN (SELECT E1.CONSTRUCTIONINSTRUCTOR CONSTRUCTIONPERSONCODE, E1.CONSTRUCTIONSTATUSFLG, E1.CONSTRUCTIONPERIOD");
-                strSQL.Append(", E1.CONSTRUCTIONPERIODSTART, E1.CONSTRUCTIONPERIODSTART2, E1.CONSTRUCTIONPERIODEND, E1.CONSTRUCTIONPERIODEND2, E2.EXECUTIONAMOUNT");
-                strSQL.Append(" FROM CONSTRUCTIONBASEINFO E1, CONSTRUCTIONLEDGERDETAIL E2, CONSTRUCTIONLEDGER E3");
-                strSQL.Append(" WHERE E2.CONSTRUCTIONCODE = E1.CONSTRUCTIONCODE");
-                strSQL.AppendFormat(" AND E2.GROUPCOUNT = {0}", (int)FrmConstructionLedger.DataGroup.Instructor);
-                strSQL.Append(" AND E3.CONSTRUCTIONCODE = E2.CONSTRUCTIONCODE) E");
-                strSQL.Append(" ON E.CONSTRUCTIONPERSONCODE = P.PERSONCODE");
-                strSQL.AppendFormat(" AND E.CONSTRUCTIONSTATUSFLG <> {0}", NotOrder);
-                strSQL.AppendFormat(" AND E.CONSTRUCTIONPERIOD = {0}", BusinessPeriod);
-
-                strSQL.AppendFormat(" WHERE P.LEDGERFLG = {0}", (int)PersonInChargeMaster.LedgerDivNoDef.CalcTarget);
-
-                // å½“æœŸæœŸé¦–æ—¥ãƒ»æœŸæœ«æ—¥ã‚’å�–å¾—
-                DateTime dtDefaultStart = DateTime.MinValue;
-                DateTime dtDefaultEnd = DateTime.MinValue;
-                CreateDefaultStartAndEndDate(BusinessPeriod, ref dtDefaultStart, ref dtDefaultEnd);
-                strSQL.AppendFormat(" AND (DATE(P.STARTDATE) <= STR_TO_DATE('{0}','%Y/%m/%d')", dtDefaultEnd.ToShortDateString());
-                strSQL.AppendFormat(" AND (STR_TO_DATE('{0}','%Y/%m/%d') <= DATE(P.ENDDATE)", dtDefaultStart.ToShortDateString());
-                strSQL.AppendFormat(" OR STR_TO_DATE('{0}','%Y/%m/%d') = DATE(P.ENDDATE)))", DateTime.MinValue.ToShortDateString());
-                if (CommonMotions.LoginUserData.PersonCode != CommonDefine.AdminCode)
-                {
-                    strSQL.Append(" AND P.DEPARTMENTCODE IN (select PDep.DepartmentCode from PersonDepartmentMaster AS PDep");
-                    strSQL.AppendFormat(" WHERE PDep.PersonCode = {0})", CommonMotions.LoginUserData.PersonCode);
-                }
-
-                // å·¥äº‹å�°å¸³ãƒ‡ãƒ¼ã‚¿ã�®éƒ¨ç½²ã� ã�‘ã�Œå¯¾è±¡
-                if (DepartmentCode == 0)
-                {
-                    strSQL.Append(" AND P.DEPARTMENTCODE IN");
-                    strSQL.Append(" (SELECT TMP.DEPARTMENTCODE FROM (SELECT A.DEPARTMENTCODE, A.DEPARTMENTSTRING, A.DISPLAYORDER, COUNT(*) CNT");
-                    strSQL.Append(" FROM DEPARTMENTMASTER A, PERSONINCHARGEMASTER B, CONSTRUCTIONBASEINFO C , CONSTRUCTIONLEDGERDETAIL D");
-                    strSQL.Append(" WHERE A.DELETEFLG = 0");
-                    strSQL.Append(" AND A.DEPARTMENTCODE = B.DEPARTMENTCODE");
-                    strSQL.Append(" AND B.PERSONCODE = C.CONSTRUCTIONPERSONCODE");
-                    strSQL.Append(" AND D.CONSTRUCTIONCODE = C.CONSTRUCTIONCODE");
-
-                    strSQL.Append(" GROUP BY A.DEPARTMENTCODE, A.DEPARTMENTSTRING, A.DISPLAYORDER) TMP)");
-                }
-                else
-                {
-                    // éƒ¨ç½²ã‚³ãƒ¼ãƒ‰é�¸æŠžæ™‚ã�¯éƒ¨ç½²ã‚’æ¤œç´¢æ�¡ä»¶ã�¸å…¥ã‚Œã‚‹
-                    strSQL.AppendFormat(" AND P.DEPARTMENTCODE = {0}", DepartmentCode);
-                }
-                if (PersonCode != 0) strSQL.AppendFormat(" AND P.PERSONCODE = {0}", PersonCode);
-
-                strSQL.Append(" GROUP BY P.PERSONCODE, P.PERSONNAME, P.DISPLAYORDER, P.MonthlySalary, P.STARTDATE, P.ENDDATE");
-                strSQL.Append(" ORDER BY P.DISPLAYORDER");
-
-                ArrayList arList = new ArrayList();
-                if (!PersonDB.ExecuteReader(strSQL.ToString(), ref arList)) return 0;
-
-                DateTime stDate = DateTime.MaxValue;
-                DateTime edDate = DateTime.MinValue;
-                DateTime maxDate = DateTime.MinValue;
-                foreach (object[] objRec in arList)
-                {
-                    stDate = DateTime.MaxValue;
-                    edDate = DateTime.MinValue;
-                    maxDate = DateTime.MinValue;
-
-                    // æ‹…å½“è€…ã‚³ãƒ¼ãƒ‰ã‚’å�–å¾—ã�™ã‚‹
-                    int Person = CommonMotions.cnvInt(objRec[(int)GetPersonTermOLD.PersonCode]);
-
-                    DateTime wrkDate = DateTime.MinValue;
-                    // æœ€å°�ã�®é–‹å§‹æ—¥ã‚’å�–å¾—ã�™ã‚‹
-                    //stDate = dtDefaultStart;
-                    wrkDate = CommonMotions.cnvDate(objRec[(int)GetPersonTermOLD.MainStart1]).Date;
-                    if (wrkDate != DateTime.MinValue && wrkDate < stDate) stDate = wrkDate;
-                    wrkDate = CommonMotions.cnvDate(objRec[(int)GetPersonTermOLD.MainStart2]).Date;
-                    if (wrkDate != DateTime.MinValue && wrkDate < stDate) stDate = wrkDate;
-
-                    // æœ€å¤§ã�®çµ‚äº†æ—¥ã‚’å�–å¾—ã�™ã‚‹
-                    //maxDate = dtDefaultEnd;
-                    wrkDate = CommonMotions.cnvDate(objRec[(int)GetPersonTermOLD.MainEnd1]).Date;
-                    if (wrkDate != DateTime.MinValue && wrkDate > maxDate) maxDate = wrkDate;
-                    wrkDate = CommonMotions.cnvDate(objRec[(int)GetPersonTermOLD.MainEnd2]).Date;
-                    if (wrkDate != DateTime.MinValue && wrkDate > maxDate) maxDate = wrkDate;
-
-                    // è¨ˆç®—ã�®çµ‚äº†æ—¥ã‚’å�–å¾—ã�™ã‚‹
-                    //edDate = dtDefaultEnd;
-                    // æœˆé¡�çµ¦ä¸Žã‚’å�–å¾—ã�™ã‚‹
-                    int Salary = CommonMotions.cnvInt(objRec[(int)GetPersonTermOLD.MonthlySalary]);
-
-                    // é›‡ç”¨é–‹å§‹ãƒ»çµ‚äº†æ—¥ã‚’å�–å¾—ã�™ã‚‹
-                    DateTime dtHireStDay = CommonMotions.cnvDate(objRec[(int)GetPersonTermOLD.HireStartDays]);
-                    DateTime dtHireEdDay = CommonMotions.cnvDate(objRec[(int)GetPersonTermOLD.HireCompDays]);
-
-                    TargetList.Add(new object[]{Person,         // æ‹…å½“è€…ã‚³ãƒ¼ãƒ‰
-                                                stDate,         // é–‹å§‹æ—¥
-                                                edDate,         // çµ‚äº†æ—¥
-                                                maxDate,        // æœ€å¤§çµ‚äº†æ—¥
-                                                Salary,         // çµ¦ä¸Žé‡‘é¡�
-                                                DateTime.Now,
-                                                DateTime.Now,
-                                                dtHireStDay,    // é›‡ç”¨é–‹å§‹æ—¥
-                                                dtHireEdDay});  // é›‡ç”¨çµ‚äº†æ—¥
-                }
-                return arList.Count;
-            }
-            catch (Exception ex)
-            {
-                logger.ErrorFormat("ã‚·ã‚¹ãƒ†ãƒ ã‚¨ãƒ©ãƒ¼ï¼š{0}ï¼š{1}", CommonMotions.GetMethodName(), ex.Message);
-                return 0;
-            }
-            finally
-            {
-                PersonDB.close(); PersonDB = null;
-            }
-        }
-        #endregion
     }
 }
Index: branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionLedgerList/FrmConstructionLedgerList.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionLedgerList/FrmConstructionLedgerList.cs	(revision 329)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionLedgerList/FrmConstructionLedgerList.cs	(revision 330)
@@ -507,6 +507,9 @@
         /// <param name="e"></param>
         private void FrmLedgerStatus_Load(object sender, EventArgs e)
         {
+            // ƒRƒ“ƒ{ƒ{ƒbƒNƒX“™ƒCƒxƒ“ƒgƒZƒbƒg
+            SetControlEvent((int)EventDef.ConstPro | (int)EventDef.Person | (int)EventDef.Person);
+
             SetInitnumUDConstPro();
             // ƒRƒ“ƒ{ƒ{ƒbƒNƒXƒZƒbƒg
             SetcmbDepartment();
@@ -521,9 +524,6 @@
             // ƒ�ƒOƒCƒ“ŽÒ‚ÌƒZƒbƒg
             InitDepPersonCode();
 
-            // ƒRƒ“ƒ{ƒ{ƒbƒNƒX“™ƒCƒxƒ“ƒgƒZƒbƒg
-            SetControlEvent((int)EventDef.ConstPro | (int)EventDef.Person | (int)EventDef.Person);
-
             // �‰Šú•\Ž¦
             InitDataLoad();
 
@@ -615,6 +615,11 @@
         {
             if (m_initDataLoad) return;
 
+            // •”��ƒRƒ“ƒ{ƒ{ƒbƒNƒX•Ï�X
+            SetcmbDepartment();
+            // ’S“–ŽÒƒRƒ“ƒ{ƒ{ƒbƒNƒX•Ï�X
+            SetcmbPersons();
+
             // ƒf�[ƒ^•\Ž¦
             DataDisplay();
         }
@@ -630,10 +635,8 @@
         {
             if (m_initDataLoad) return;
 
-            SubControlEvent((int)EventDef.Person);
             // ’S“–ŽÒƒRƒ“ƒ{ƒ{ƒbƒNƒX•Ï�X
             SetcmbPersons();
-            SetControlEvent((int)EventDef.Person);
 
             // ƒf�[ƒ^•\Ž¦
             DataDisplay();
@@ -650,9 +653,8 @@
         {
             if (m_initDataLoad) return;
 
-            SubControlEvent((int)EventDef.Department);
-            // ’S“–ŽÒ‘I‘ðŽž•”��‘I‘ð‚ð�Ý’è‚·‚é
-            SetPerosonToDepartment();
+            // ’S“–ŽÒƒRƒ“ƒ{ƒ{ƒbƒNƒXƒZƒbƒgŽž•”��‚ðƒZƒbƒg‚·‚é
+            if (!SetPerosonToDepartment()) return;
 
             // •”��•Êˆê——‚©‚ç‚Ì‹N“®‚Í’S“–ŽÒ•Ï�XŽžƒpƒ‰ƒ��[ƒ^•Ï�X
             if (!m_FirstStartFlg)
@@ -659,7 +661,6 @@
             {
                 m_FirstStartPersonCode = CommonMotions.cnvInt(cmbConstructionPerson.SelectedValue);
             }
-            SetControlEvent((int)EventDef.Department);
 
             // ƒf�[ƒ^•\Ž¦
             DataDisplay();
Index: branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionLedgerList/FrmConstructionLedgerListAuxiliary.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionLedgerList/FrmConstructionLedgerListAuxiliary.cs	(revision 329)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionLedgerList/FrmConstructionLedgerListAuxiliary.cs	(revision 330)
@@ -1158,9 +1158,14 @@
                 strSQL.Append(", E.DISPLAYORDER");
                 strSQL.Append(", C.DISPLAYORDER");
                 strSQL.Append(", C.DEPARTMENTCODE");
-                strSQL.Append(", E.DepartmentString");
+                strSQL.Append(", ifnull(F.DetailString, '')");
                 strSQL.Append(", D.CONSTRUCTIONSTATUSFLG");
-                strSQL.Append(" FROM CONSTRUCTIONLEDGER A, CONSTRUCTIONBASEINFODETAIL B, PERSONINCHARGEMASTER C, CONSTRUCTIONBASEINFO D,");
+                strSQL.Append(" FROM CONSTRUCTIONLEDGER A");
+                strSQL.Append(" LEFT JOIN CONSTRUCTIONBASEINFODETAIL F On F.ConstructionCode = A.ConstructionCode");
+                strSQL.AppendFormat(" And F.DetailNo = {0}", (int)ConstructionBaseInfoDetail.DataNoDef.ConstrDepartmentName);
+                strSQL.Append(", CONSTRUCTIONBASEINFODETAIL B");
+                strSQL.Append(", PERSONINCHARGEMASTER C");
+                strSQL.Append(", CONSTRUCTIONBASEINFO D,");
                 strSQL.Append(" DEPARTMENTMASTER E");
                 strSQL.Append(" WHERE A.CONSTRUCTIONCODE = D.CONSTRUCTIONCODE");
                 strSQL.AppendFormat(" AND D.TyingFlg != {0}", (int)ConstructionBaseInfo.TyingFlgDef.Tying);
@@ -1172,9 +1177,13 @@
                 strSQL.AppendFormat(" AND D.CONSTRUCTIONSTATUSFLG != {0}", NotOrder);
                 strSQL.Append(" AND A.CREATORCODE = C.PERSONCODE");
                 if (strSecurity.Length > 0) strSQL.Append(strSecurity.ToString());
-                if (DepartmentCode != 0) strSQL.AppendFormat(" AND C.DEPARTMENTCODE = {0}", DepartmentCode);
-                if (PersonCode != 0)
+                if (DepartmentCode > 0)
                 {
+                    strSQL.AppendFormat(" AND (D.ConstrDepCode = {0}", DepartmentCode);
+                    strSQL.AppendFormat(" AND E.DepartmentString = '{0}')", cmbDepartment.Text);
+                }
+                if (PersonCode > 0)
+                {
                     strSQL.AppendFormat(" AND D.CONSTRUCTIONPERSONCODE = {0}", PersonCode);
                 }
 
@@ -1516,32 +1525,17 @@
             m_initDataLoad = true;
             try
             {
+                cmbDepartment.SelectedIndexChanged -= new EventHandler(cmbDepartment_SelectedIndexChanged);
 
                 cmbDepartment.DataSource = null;
                 cmbDepartment.Items.Clear();
                 cmbDepartment.Text = "";
 
+                int nTargetCount = CommonMotions.cnvInt(numUDConstPro.Value);
+                // •”��ƒ}ƒXƒ^‚ðŒŸ�õ‚·‚é
                 StringBuilder strSQL = new StringBuilder();
-                // •”��ƒ}ƒXƒ^‚ðŒŸ�õ‚·‚é
-                strSQL.Append("SELECT A.DEPARTMENTCODE, A.DEPARTMENTSTRING, A.DISPLAYORDER, COUNT(*)");
-                strSQL.Append(" FROM DEPARTMENTMASTER A, PERSONINCHARGEMASTER B, CONSTRUCTIONBASEINFO C");
-                strSQL.Append(" WHERE A.DELETEFLG = 0");
+                CommonMotions.CreateDepCombBoxSQL(ref strSQL, nTargetCount);
 
-                if (CommonMotions.LoginUserData.PersonCode == CommonDefine.AdminCode)
-                {
-
-                }
-                else
-                {
-                    // ŽQ�Æ•”��ƒ}ƒXƒ^‚æ‚èŽæ“¾‚·‚é
-                    strSQL.Append(" AND A.DEPARTMENTCODE IN (SELECT AA.DEPARTMENTCODE FROM PERSONDEPARTMENTMASTER AA");
-                    strSQL.AppendFormat(" WHERE AA.PERSONCODE = {0})", CommonMotions.LoginUserData.PersonCode);
-                }
-                strSQL.Append(" AND A.DEPARTMENTCODE = B.DEPARTMENTCODE");
-                strSQL.Append(" AND B.PERSONCODE = C.CONSTRUCTIONPERSONCODE");
-                strSQL.Append(" GROUP BY A.DEPARTMENTCODE, A.DEPARTMENTSTRING, A.DISPLAYORDER");
-                strSQL.Append(" ORDER BY A.DISPLAYORDER ASC");
-
                 // •”��ƒ}ƒXƒ^“Ç�ž
                 ArrayList arList = new ArrayList();
                 if (!depDB.ExecuteReader(strSQL.ToString(), ref arList)) return;
@@ -1570,6 +1564,7 @@
             {
                 depDB.close(); depDB = null;
                 m_initDataLoad = bSave;
+                cmbDepartment.SelectedIndexChanged += new EventHandler(cmbDepartment_SelectedIndexChanged);
             }
         }
         #endregion
@@ -1581,53 +1576,33 @@
         private void SetcmbPersons()
         {
             IOMPersonInCharge picDB = new IOMPersonInCharge();
-            List<PersonInChargeMaster> workList = new List<PersonInChargeMaster>();
             bool bSave = m_initDataLoad;
             m_initDataLoad = true;
             try
             {
+                cmbConstructionPerson.SelectedIndexChanged -= new EventHandler(cmbConstructionPerson_SelectedIndexChanged);
+
                 cmbConstructionPerson.DataSource = null;
                 cmbConstructionPerson.Items.Clear();
                 cmbConstructionPerson.Text = "";
 
+                int nTargetCount = CommonMotions.cnvInt(numUDConstPro.Value);
                 int DepartmentCode = GetDepartmentCode();
                 StringBuilder strSQL = new StringBuilder();
-                // ŒŸ�õ�ðŒ�
-                strSQL.AppendFormat(" WHERE LEDGERFLG = {0}", (int)PersonInChargeMaster.LedgerDivNoDef.CalcTarget);
-                strSQL.Append(" AND (DEPARTMENTCODE");
-                StringBuilder strSubSQL = new StringBuilder();
-                if (DepartmentCode == 0)
-                {
-                    // ŽQ�Æ•”��ƒ}ƒXƒ^‚æ‚èŽæ“¾‚·‚é
-                    strSubSQL.AppendFormat(" IN (SELECT AA.DEPARTMENTCODE FROM PERSONDEPARTMENTMASTER AA WHERE AA.PERSONCODE = {0})"
-                                            , CommonMotions.LoginUserData.PersonCode);
-                }
-                else
-                {
-                    strSubSQL.AppendFormat(" = {0}", DepartmentCode);
-                }
-                strSQL.Append(strSubSQL.ToString());
-                strSQL.Append(")");
+                CommonMotions.CreateManCombBoxSQL(ref strSQL, nTargetCount, DepartmentCode);
 
-                // “–ŠúŠúŽñ“ú�EŠú––“ú‚ðŽæ“¾
-                DateTime dtDefaultStart = DateTime.MinValue;
-                DateTime dtDefaultEnd = DateTime.MinValue;
-                CreateLedgerSQL.CreateDefaultStartAndEndDate((int)numUDConstPro.Value, ref dtDefaultStart, ref dtDefaultEnd);
-
-                strSQL.AppendFormat(" AND (DATE(STARTDATE) <= STR_TO_DATE('{0}','%Y/%m/%d')", dtDefaultEnd.ToShortDateString());
-                strSQL.AppendFormat(" AND (STR_TO_DATE('{0}','%Y/%m/%d') <= DATE(ENDDATE)", dtDefaultStart.ToShortDateString());
-                strSQL.AppendFormat(" OR STR_TO_DATE('{0}','%Y/%m/%d') = DATE(ENDDATE)))", DateTime.MinValue.ToShortDateString());
-                
-                strSQL.Append(" Order By DeleteFlg ASC, EmployeeClassFlg ASC, DisplayOrder ASC");
                 // ’S“–ŽÒƒ}ƒXƒ^“Ç�ž
-                if (!picDB.SelectAction(strSQL.ToString(), ref workList)) return;
+                ArrayList workList = new ArrayList();
+                if (!picDB.ExecuteReader(strSQL.ToString(), ref workList)) return;
 
                 List<KeyValuePair<int, string>> ConstructionDataList = new List<KeyValuePair<int, string>>();
                 ConstructionDataList.Add(new KeyValuePair<int, string>(0, ""));
 
-                foreach (PersonInChargeMaster work in workList)
+                PersonInChargeMaster workRec = new PersonInChargeMaster();
+                foreach (object[] work in workList)
                 {
-                    KeyValuePair<int, string> keyval = new KeyValuePair<int, string>(work.PersonCode, work.PersonName);
+                    picDB.Reader2Struct(work, ref workRec);
+                    KeyValuePair<int, string> keyval = new KeyValuePair<int, string>(workRec.PersonCode, workRec.PersonName);
 
                     ConstructionDataList.Add(keyval);
                 }
@@ -1645,6 +1620,7 @@
             {
                 picDB.close(); picDB = null;
                 m_initDataLoad = bSave;
+                cmbConstructionPerson.SelectedIndexChanged += new EventHandler(cmbConstructionPerson_SelectedIndexChanged);
             }
         }
         #endregion
@@ -1659,26 +1635,36 @@
             IOMPersonInCharge PersonDB = new IOMPersonInCharge();
             try
             {
+                cmbDepartment.SelectedIndexChanged -= new EventHandler(cmbDepartment_SelectedIndexChanged);
+                cmbConstructionPerson.SelectedIndexChanged -= new EventHandler(cmbConstructionPerson_SelectedIndexChanged);
+
                 // ƒRƒ“ƒ{ƒ{ƒbƒNƒX‚æ‚è‘I‘ð’S“–ŽÒ‚ðŽæ“¾‚·‚é
                 int PersonCode = GetConstructionPersonCode();
-                if (PersonCode < 1) return false;
+                if (PersonCode < 1) return true;
 
+                int nTargetCount = CommonMotions.cnvInt(numUDConstPro.Value);
                 int DepartmentCode = GetDepartmentCode();
 
-                string strSQL = PersonDB.CreatePrimarykeyString(PersonCode);
+                StringBuilder strSQL = new StringBuilder();
+                CommonMotions.CreateMan2DepSQL(ref strSQL, nTargetCount, PersonCode);
+
+                ArrayList arList = new ArrayList();
+                if (!PersonDB.ExecuteReader(strSQL.ToString(), ref arList)) return false;
+                if (arList.Count < 1) return false;
+
+                object[] objRec = (object[])arList[0];
                 PersonInChargeMaster PersonRec = new PersonInChargeMaster();
-                PersonDB.SelectAction(strSQL, ref PersonRec);
+                PersonRec.PersonCode = CommonMotions.cnvInt(objRec[0]);         // ’S“–ŽÒƒR�[ƒh
+                PersonRec.PersonName = CommonMotions.cnvString(objRec[1]);      // ’S“–ŽÒ–¼
+                PersonRec.DepartmentCode = CommonMotions.cnvInt(objRec[2]);     // •”��ƒR�[ƒh
 
+                // “¯‚¶•”��‚Ì�ê�‡‚Í�ˆ—�‚µ‚È‚¢
+                if (DepartmentCode == PersonRec.DepartmentCode) return true;
+
                 // •”��ƒRƒ“ƒ{ƒ{ƒbƒNƒX‚Ö•”��ƒR�[ƒhƒZƒbƒg
-                if (PersonRec.DepartmentCode > 0 && DepartmentCode != PersonRec.DepartmentCode)
-                {
-                    bool bSave = m_initDataLoad;
-                    m_initDataLoad = true;
-                    cmbDepartment.SelectedValue = PersonRec.DepartmentCode;
-                    SetcmbPersons();    // ’S“–ŽÒƒRƒ“ƒ{ƒ{ƒbƒNƒX•Ï�X
-                    cmbConstructionPerson.SelectedValue = PersonCode;
-                    m_initDataLoad = bSave;
-                }
+                cmbDepartment.SelectedValue = PersonRec.DepartmentCode;
+                SetcmbPersons();    // ’S“–ŽÒƒRƒ“ƒ{ƒ{ƒbƒNƒX•Ï�X
+                cmbConstructionPerson.SelectedValue = PersonCode;
 
                 return true;
             }
@@ -1690,6 +1676,9 @@
             finally
             {
                 PersonDB.close(); PersonDB = null;
+
+                cmbDepartment.SelectedIndexChanged += new EventHandler(cmbDepartment_SelectedIndexChanged);
+                cmbConstructionPerson.SelectedIndexChanged += new EventHandler(cmbConstructionPerson_SelectedIndexChanged);
             }
         }
         #endregion
@@ -1850,6 +1839,11 @@
         }
         #endregion
 
+        #region ƒ_ƒ~�[ƒf�[ƒ^“o˜^�i–¢Žg—p‚¾‚ª•K—v�j
+        /// <summary>
+        /// ƒ_ƒ~�[ƒf�[ƒ^“o˜^
+        /// </summary>
+        /// <returns></returns>
         private bool DataEntryProcess()
         {
             try
@@ -1862,5 +1856,6 @@
                 return false;
             }
         }
+        #endregion
     }
 }
\ No newline at end of file
Index: branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionSplit/FrmConstructionSplit.Designer.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionSplit/FrmConstructionSplit.Designer.cs	(revision 329)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionSplit/FrmConstructionSplit.Designer.cs	(revision 330)
@@ -78,7 +78,7 @@
             // 
             // btnCancel
             // 
-            this.btnCancel.BackColor = System.Drawing.Color.Red;
+            this.btnCancel.BackColor = System.Drawing.Color.Blue;
             this.btnCancel.Font = new System.Drawing.Font("ï¼­ï¼³ æ˜Žæœ�", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
             this.btnCancel.ForeColor = System.Drawing.Color.White;
             this.btnCancel.Location = new System.Drawing.Point(957, 647);
@@ -85,7 +85,7 @@
             this.btnCancel.Name = "btnCancel";
             this.btnCancel.Size = new System.Drawing.Size(120, 30);
             this.btnCancel.TabIndex = 3;
-            this.btnCancel.Text = "ã‚­ãƒ£ãƒ³ã‚»ãƒ«";
+            this.btnCancel.Text = "çµ‚ã€€äº†";
             this.btnCancel.UseVisualStyleBackColor = false;
             this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click);
             // 
@@ -260,7 +260,7 @@
             this.cmbConstructionPerson.Name = "cmbConstructionPerson";
             this.cmbConstructionPerson.Size = new System.Drawing.Size(200, 24);
             this.cmbConstructionPerson.TabIndex = 46;
-            this.cmbConstructionPerson.TextChanged += new System.EventHandler(this.cmbConstructionPerson_TextChanged);
+            this.cmbConstructionPerson.SelectedIndexChanged += new System.EventHandler(this.cmbConstructionPerson_SelectedIndexChanged);
             // 
             // cmbDepartment
             // 
@@ -272,7 +272,7 @@
             this.cmbDepartment.Name = "cmbDepartment";
             this.cmbDepartment.Size = new System.Drawing.Size(200, 24);
             this.cmbDepartment.TabIndex = 45;
-            this.cmbDepartment.TextChanged += new System.EventHandler(this.cmbDepartment_TextChanged);
+            this.cmbDepartment.SelectedIndexChanged += new System.EventHandler(this.cmbDepartment_SelectedIndexChanged);
             // 
             // label12
             // 
Index: branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionSplit/FrmConstructionSplit.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionSplit/FrmConstructionSplit.cs	(revision 329)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionSplit/FrmConstructionSplit.cs	(revision 330)
@@ -202,6 +202,12 @@
         private void numUDConstPro_ValueChanged(object sender, EventArgs e)
         {
             if (m_bInitFlag) return;
+
+            // éƒ¨ç½²ã‚³ãƒ³ãƒœãƒœãƒƒã‚¯ã‚¹å¤‰æ›´
+            SetcmbDepartment();
+            // æ‹…å½“è€…ã‚³ãƒ³ãƒœãƒœãƒƒã‚¯ã‚¹å¤‰æ›´
+            SetcmbPersons();
+
             // ãƒ‡ãƒ¼ã‚¿è¡¨ç¤º
             InitDataLoad();
         }
@@ -213,7 +219,7 @@
         /// </summary>
         /// <param name="sender"></param>
         /// <param name="e"></param>
-        private void cmbDepartment_TextChanged(object sender, EventArgs e)
+        private void cmbDepartment_SelectedIndexChanged(object sender, EventArgs e)
         {
             if (m_bInitFlag) return;
 
@@ -231,12 +237,12 @@
         /// </summary>
         /// <param name="sender"></param>
         /// <param name="e"></param>
-        private void cmbConstructionPerson_TextChanged(object sender, EventArgs e)
+        private void cmbConstructionPerson_SelectedIndexChanged(object sender, EventArgs e)
         {
             if (m_bInitFlag) return;
 
-            // æ‹…å½“è€…é�¸æŠžæ™‚éƒ¨ç½²é�¸æŠžã‚’è¨­å®šã�™ã‚‹
-            SetPerosonToDepartment();
+            // æ‹…å½“è€…ã‚³ãƒ³ãƒœãƒœãƒƒã‚¯ã‚¹ã‚»ãƒƒãƒˆæ™‚éƒ¨ç½²ã‚’ã‚»ãƒƒãƒˆã�™ã‚‹
+            if (!SetPerosonToDepartment()) return;
 
             // ãƒ‡ãƒ¼ã‚¿è¡¨ç¤º
             InitDataLoad();
Index: branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionSplit/FrmConstructionSplitAuxiliary.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionSplit/FrmConstructionSplitAuxiliary.cs	(revision 329)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionSplit/FrmConstructionSplitAuxiliary.cs	(revision 330)
@@ -70,73 +70,6 @@
         {
             try
             {
-                // æ–°ã‚»ã‚­ãƒ¥ãƒªãƒ†ã‚£ãƒ‡ãƒ¼ã‚¿å¯¾å¿œæ¸ˆã�¿ã�‹ã‚’ç¢ºèª�ã�™ã‚‹
-                if (CommonMotions.LoginUserData.SecCode == 0)
-                {
-                    InitCombBox_OLD();
-                }
-                else
-                {
-                    InitCombBox_NEW();
-                }
-            }
-            catch (Exception ex)
-            {
-                logger.ErrorFormat("ã‚·ã‚¹ãƒ†ãƒ ã‚¨ãƒ©ãƒ¼ï¼š{0}ï¼š{1}", CommonMotions.GetMethodName(), ex.Message);
-            }
-        }
-        #endregion
-
-        #region ã‚³ãƒ³ãƒœãƒœãƒƒã‚¯ã‚¹åˆ�æœŸè¡¨ç¤ºï¼ˆæ—§ï¼‰
-        /// <summary>
-        /// ã‚³ãƒ³ãƒœãƒœãƒƒã‚¯ã‚¹åˆ�æœŸè¡¨ç¤ºï¼ˆæ—§ï¼‰
-        /// </summary>
-        private void InitCombBox_OLD()
-        {
-            try
-            {
-                // ã‚·ã‚¹ãƒ†ãƒ æ¨©é™�ã�«ã‚ˆã�£ã�¦ãƒ‡ãƒ¼ã‚¿ã‚¢ã‚¯ã‚»ã‚¹ã�«åˆ¶é™�ã�Œã�‚ã‚‹
-                if (CommonMotions.LoginUserData.SecurityManagement == CommonDefine.AdminSecurityManagement
-                || CommonMotions.LoginUserData.SecurityManagement == CommonDefine.SystemManageDiv[(int)CommonDefine.SysManaDivNo.PresidentAuthority].Key
-                || CommonMotions.LoginUserData.SecurityManagement == CommonDefine.SystemManageDiv[(int)CommonDefine.SysManaDivNo.SupervisorAuthority].Key
-                || CommonMotions.LoginUserData.DepartmentCode == CommonDefine.s_GeneralAffairsDevision)
-                {
-                    // ã‚·ã‚¹ãƒ†ãƒ ç®¡ç�†è€…
-                    // æœ€é«˜æ©Ÿå¯†ç®¡ç�†è€…
-                    // çµ±æ‹¬æ©Ÿå¯†ç®¡ç�†è€…
-                    // ç·�å‹™éƒ¨æ‰€å±žè€…ã�¯å…¨ã�¦è¦‹ã�ˆã‚‹
-
-                    // éƒ¨ç½²ãƒ»æ‹…å½“è€…ã‚³ãƒ³ãƒœè¡¨ç¤º
-                    DispAllCombBoxControl(true);
-                }
-                else if (CommonMotions.LoginUserData.SecurityManagement == CommonDefine.SystemManageDiv[(int)CommonDefine.SysManaDivNo.SuperiorAuthority].Key)
-                {
-                    // æ‰€å±žé•·
-                    // éƒ¨ç½²ã‚³ãƒ³ãƒœé�žè¡¨ç¤º
-                    NonDispDepCombBox();
-                }
-                else if (CommonMotions.LoginUserData.SecurityManagement == CommonDefine.SystemManageDiv[(int)CommonDefine.SysManaDivNo.UserAuthority].Key)
-                {
-                    // ä¸€èˆ¬ä½¿ç”¨è€…ï¼ˆè‡ªåˆ†ã�®ã�¿ã‚¢ã‚¯ã‚»ã‚¹å�¯èƒ½ï¼‰
-                    // éƒ¨ç½²ãƒ»æ‹…å½“è€…ã‚³ãƒ³ãƒœé�žè¡¨ç¤º
-                    DispAllCombBoxControl(false);
-                }
-            }
-            catch (Exception ex)
-            {
-                logger.ErrorFormat("ã‚·ã‚¹ãƒ†ãƒ ã‚¨ãƒ©ãƒ¼ï¼š{0}ï¼š{1}", CommonMotions.GetMethodName(), ex.Message);
-            }
-        }
-        #endregion
-
-        #region ã‚³ãƒ³ãƒœãƒœãƒƒã‚¯ã‚¹åˆ�æœŸè¡¨ç¤ºï¼ˆæ–°ï¼‰
-        /// <summary>
-        /// ã‚³ãƒ³ãƒœãƒœãƒƒã‚¯ã‚¹åˆ�æœŸè¡¨ç¤ºï¼ˆæ–°ï¼‰
-        /// </summary>
-        private void InitCombBox_NEW()
-        {
-            try
-            {
                 int AllPath = (int)CommonDefine.SecurityRangePos.AllPath;           // å…¨éƒ¨ç½²
                 int Multiple = (int)CommonDefine.SecurityRangePos.Multiple;         // è¤‡æ•°éƒ¨ç½²
                 int Only = (int)CommonDefine.SecurityRangePos.Only;                 // è‡ªéƒ¨ç½²ã�®ã�¿
@@ -256,50 +189,20 @@
             m_bInitFlag = true;
             try
             {
+                cmbDepartment.SelectedIndexChanged -= new EventHandler(cmbDepartment_SelectedIndexChanged);
 
                 cmbDepartment.DataSource = null;
                 cmbDepartment.Items.Clear();
                 cmbDepartment.Text = "";
 
-                string strSQL = string.Empty;
+                int nTargetCount = CommonMotions.cnvInt(numUDConstPro.Value);
                 // éƒ¨ç½²ãƒžã‚¹ã‚¿ã‚’æ¤œç´¢ã�™ã‚‹
-                strSQL = "SELECT A.DEPARTMENTCODE, A.DEPARTMENTSTRING, A.DISPLAYORDER, COUNT(*)";
-                strSQL += " FROM DEPARTMENTMASTER A, PERSONINCHARGEMASTER B, CONSTRUCTIONBASEINFO C";
-                strSQL += " WHERE A.DELETEFLG = 0";
+                StringBuilder strSQL = new StringBuilder();
+                CommonMotions.CreateDepCombBoxSQL(ref strSQL, nTargetCount);
 
-                // æ–°ã‚»ã‚­ãƒ¥ãƒªãƒ†ã‚£ãƒ‡ãƒ¼ã‚¿å¯¾å¿œæ¸ˆã�¿ã�‹ã‚’ç¢ºèª�ã�™ã‚‹
-                if (CommonMotions.LoginUserData.SecCode == 0)
-                {
-                    // ã‚·ã‚¹ãƒ†ãƒ æ¨©é™�ã�«ã‚ˆã�£ã�¦ãƒ‡ãƒ¼ã‚¿ã‚¢ã‚¯ã‚»ã‚¹ã�«åˆ¶é™�ã�Œã�‚ã‚‹
-                    if (CommonMotions.LoginUserData.SecurityManagement == CommonDefine.SystemManageDiv[(int)CommonDefine.SysManaDivNo.SuperiorAuthority].Key
-                        || CommonMotions.LoginUserData.SecurityManagement == CommonDefine.SystemManageDiv[(int)CommonDefine.SysManaDivNo.UserAuthority].Key)
-                    {
-                        // æ‰€å±žé•·
-                        // ä¸€èˆ¬ä½¿ç”¨è€…ï¼ˆè‡ªåˆ†ã�®ã�¿ã‚¢ã‚¯ã‚»ã‚¹å�¯èƒ½ï¼‰
-                        strSQL += string.Format(" AND A.DEPARTMENTCODE = {0}", CommonMotions.LoginUserData.DepartmentCode);
-                    }
-                }
-                else
-                {
-                    if (CommonMotions.LoginUserData.PersonCode == CommonDefine.AdminCode)
-                    {
-
-                    }
-                    else
-                    {
-                        // å�‚ç…§éƒ¨ç½²ãƒžã‚¹ã‚¿ã‚ˆã‚Šå�–å¾—ã�™ã‚‹
-                        strSQL += " AND A.DEPARTMENTCODE IN (SELECT A1.DEPARTMENTCODE FROM PERSONDEPARTMENTMASTER A1";
-                        strSQL += string.Format(" WHERE A1.PERSONCODE = {0})", CommonMotions.LoginUserData.PersonCode);
-                    }
-                }
-                strSQL += " AND A.DEPARTMENTCODE = B.DEPARTMENTCODE";
-                strSQL += " AND B.PERSONCODE = C.CONSTRUCTIONPERSONCODE";
-                strSQL += " GROUP BY A.DEPARTMENTCODE, A.DEPARTMENTSTRING, A.DISPLAYORDER";
-                strSQL += " ORDER BY A.DISPLAYORDER ASC";
-
                 // éƒ¨ç½²ãƒžã‚¹ã‚¿èª­è¾¼
                 ArrayList arList = new ArrayList();
-                if (!depDB.ExecuteReader(strSQL, ref arList)) return;
+                if (!depDB.ExecuteReader(strSQL.ToString(), ref arList)) return;
 
                 List<KeyValuePair<int, string>> ConstructionDataList = new List<KeyValuePair<int, string>>();
                 ConstructionDataList.Add(new KeyValuePair<int, string>(0, ""));
@@ -315,14 +218,6 @@
                 // ã‚³ãƒ³ãƒœãƒœãƒƒã‚¯ã‚¹åˆ�æœŸè¡¨ç¤º
                 ComboBoxAction.InitDataSetCombBox(cmbDepartment, ConstructionDataList);
 
-                // æ–°ã‚»ã‚­ãƒ¥ãƒªãƒ†ã‚£ãƒ‡ãƒ¼ã‚¿å¯¾å¿œæ¸ˆã�¿ã�‹ã‚’ç¢ºèª�ã�™ã‚‹
-                if (CommonMotions.LoginUserData.SecCode == 0)
-                {
-                    // ç·�å‹™éƒ¨æ‰€å±žè€…ä»¥å¤–
-                    if (CommonMotions.LoginUserData.DepartmentCode != CommonDefine.s_GeneralAffairsDevision)
-                        cmbDepartment.SelectedValue = CommonMotions.LoginUserData.DepartmentCode;
-                }
-
                 return;
             }
             catch (Exception ex)
@@ -333,6 +228,7 @@
             {
                 depDB.close(); depDB = null;
                 m_bInitFlag = bSave;
+                cmbDepartment.SelectedIndexChanged += new EventHandler(cmbDepartment_SelectedIndexChanged);
             }
         }
         #endregion
@@ -344,31 +240,33 @@
         private void SetcmbPersons()
         {
             IOMPersonInCharge picDB = new IOMPersonInCharge();
-            List<PersonInChargeMaster> workList = new List<PersonInChargeMaster>();
             bool bSave = m_bInitFlag;
             m_bInitFlag = true;
             try
             {
+                cmbConstructionPerson.SelectedIndexChanged -= new EventHandler(cmbConstructionPerson_SelectedIndexChanged);
+
                 cmbConstructionPerson.DataSource = null;
                 cmbConstructionPerson.Items.Clear();
                 cmbConstructionPerson.Text = "";
 
-                string strSQL = string.Empty;
+                int nTargetCount = CommonMotions.cnvInt(numUDConstPro.Value);
                 int DepartmentCode = GetDepartmentCode();
-                if (DepartmentCode == 0)
-                    strSQL = " WHERE DELETEFLG = 0 ORDER BY EMPLOYEECLASSFLG ASC, DISPLAYORDER ASC";
-                else
-                    strSQL = string.Format(" WHERE DEPARTMENTCODE = {0} AND DELETEFLG = 0 ORDER BY EMPLOYEECLASSFLG ASC, DISPLAYORDER ASC", DepartmentCode);
+                StringBuilder strSQL = new StringBuilder();
+                CommonMotions.CreateManCombBoxSQL(ref strSQL, nTargetCount, DepartmentCode);
 
                 // æ‹…å½“è€…ãƒžã‚¹ã‚¿èª­è¾¼
-                if (!picDB.SelectAction(strSQL, ref workList)) return;
+                ArrayList workList = new ArrayList();
+                if (!picDB.ExecuteReader(strSQL.ToString(), ref workList)) return;
 
                 List<KeyValuePair<int, string>> ConstructionDataList = new List<KeyValuePair<int, string>>();
                 ConstructionDataList.Add(new KeyValuePair<int, string>(0, ""));
 
-                foreach (PersonInChargeMaster work in workList)
+                PersonInChargeMaster workRec = new PersonInChargeMaster();
+                foreach (object[] work in workList)
                 {
-                    KeyValuePair<int, string> keyval = new KeyValuePair<int, string>(work.PersonCode, work.PersonName);
+                    picDB.Reader2Struct(work, ref workRec);
+                    KeyValuePair<int, string> keyval = new KeyValuePair<int, string>(workRec.PersonCode, workRec.PersonName);
 
                     ConstructionDataList.Add(keyval);
                 }
@@ -376,16 +274,6 @@
                 // ã‚³ãƒ³ãƒœãƒœãƒƒã‚¯ã‚¹åˆ�æœŸè¡¨ç¤º
                 ComboBoxAction.InitDataSetCombBox(cmbConstructionPerson, ConstructionDataList);
 
-                // æ–°ã‚»ã‚­ãƒ¥ãƒªãƒ†ã‚£ãƒ‡ãƒ¼ã‚¿å¯¾å¿œæ¸ˆã�¿ã�‹ã‚’ç¢ºèª�ã�™ã‚‹
-                if (CommonMotions.LoginUserData.SecCode == 0)
-                {
-                    // ä¸€èˆ¬ãƒ¦ãƒ¼ã‚¶ãƒ¼ã�§ç·�å‹™éƒ¨æ‰€å±žè€…ã�§ã�¯ã�ªã�„å ´å�ˆã€�ãƒ­ã‚°ã‚¤ãƒ³è€…ã�®ã‚³ãƒ¼ãƒ‰ã‚’ã‚»ãƒƒãƒˆã�™ã‚‹
-                    if (CommonMotions.LoginUserData.DepartmentCode != CommonDefine.s_GeneralAffairsDevision)
-                    {
-                        cmbConstructionPerson.SelectedValue = CommonMotions.LoginUserData.PersonCode;
-                    }
-                }
-
                 return;
             }
             catch (Exception ex)
@@ -396,6 +284,7 @@
             {
                 picDB.close(); picDB = null;
                 m_bInitFlag = bSave;
+                cmbConstructionPerson.SelectedIndexChanged += new EventHandler(cmbConstructionPerson_SelectedIndexChanged);
             }
         }
         #endregion
@@ -410,26 +299,36 @@
             IOMPersonInCharge PersonDB = new IOMPersonInCharge();
             try
             {
+                cmbDepartment.SelectedIndexChanged -= new EventHandler(cmbDepartment_SelectedIndexChanged);
+                cmbConstructionPerson.SelectedIndexChanged -= new EventHandler(cmbConstructionPerson_SelectedIndexChanged);
+
                 // ã‚³ãƒ³ãƒœãƒœãƒƒã‚¯ã‚¹ã‚ˆã‚Šé�¸æŠžæ‹…å½“è€…ã‚’å�–å¾—ã�™ã‚‹
                 int PersonCode = GetConstructionPersonCode();
-                if (PersonCode < 1) return false;
+                if (PersonCode < 1) return true;
 
+                int nTargetCount = CommonMotions.cnvInt(numUDConstPro.Value);
                 int DepartmentCode = GetDepartmentCode();
 
-                string strSQL = PersonDB.CreatePrimarykeyString(PersonCode);
+                StringBuilder strSQL = new StringBuilder();
+                CommonMotions.CreateMan2DepSQL(ref strSQL, nTargetCount, PersonCode);
+
+                ArrayList arList = new ArrayList();
+                if (!PersonDB.ExecuteReader(strSQL.ToString(), ref arList)) return false;
+                if (arList.Count < 1) return false;
+
+                object[] objRec = (object[])arList[0];
                 PersonInChargeMaster PersonRec = new PersonInChargeMaster();
-                PersonDB.SelectAction(strSQL, ref PersonRec);
+                PersonRec.PersonCode = CommonMotions.cnvInt(objRec[0]);         // æ‹…å½“è€…ã‚³ãƒ¼ãƒ‰
+                PersonRec.PersonName = CommonMotions.cnvString(objRec[1]);      // æ‹…å½“è€…å��
+                PersonRec.DepartmentCode = CommonMotions.cnvInt(objRec[2]);     // éƒ¨ç½²ã‚³ãƒ¼ãƒ‰
 
+                // å�Œã�˜éƒ¨ç½²ã�®å ´å�ˆã�¯å‡¦ç�†ã�—ã�ªã�„
+                if (DepartmentCode == PersonRec.DepartmentCode) return true;
+
                 // éƒ¨ç½²ã‚³ãƒ³ãƒœãƒœãƒƒã‚¯ã‚¹ã�¸éƒ¨ç½²ã‚³ãƒ¼ãƒ‰ã‚»ãƒƒãƒˆ
-                if (PersonRec.DepartmentCode > 0 && DepartmentCode != PersonRec.DepartmentCode)
-                {
-                    bool bSave = m_bInitFlag;
-                    m_bInitFlag = true;
-                    cmbDepartment.SelectedValue = PersonRec.DepartmentCode;
-                    SetcmbPersons();    // æ‹…å½“è€…ã‚³ãƒ³ãƒœãƒœãƒƒã‚¯ã‚¹å¤‰æ›´
-                    cmbConstructionPerson.SelectedValue = PersonCode;
-                    m_bInitFlag = bSave;
-                }
+                cmbDepartment.SelectedValue = PersonRec.DepartmentCode;
+                SetcmbPersons();    // æ‹…å½“è€…ã‚³ãƒ³ãƒœãƒœãƒƒã‚¯ã‚¹å¤‰æ›´
+                cmbConstructionPerson.SelectedValue = PersonCode;
 
                 return true;
             }
@@ -441,6 +340,9 @@
             finally
             {
                 PersonDB.close(); PersonDB = null;
+
+                cmbDepartment.SelectedIndexChanged += new EventHandler(cmbDepartment_SelectedIndexChanged);
+                cmbConstructionPerson.SelectedIndexChanged += new EventHandler(cmbConstructionPerson_SelectedIndexChanged);
             }
         }
         #endregion
@@ -499,6 +401,9 @@
                 int depCode = GetDepartmentCode();
                 int personCode = GetConstructionPersonCode();
 
+                if (depCode < 1) return;
+                if (personCode < 1) return;
+
                 string strSQL = string.Empty;
                 int StatusCode = CommonDefine.ProjectsStatus.First(x => x.Value.Equals("é�ž å�— æ³¨")).Key;
 
@@ -512,15 +417,14 @@
                 strSQL += ", D.ORDERERSNAME2";
                 strSQL += ", A.CONSTRUCTIONSTATUSFLG";
                 strSQL += " FROM CONSTRUCTIONBASEINFO A, CONSTRUCTIONBASEINFODETAIL B, PERSONINCHARGEMASTER C, ORDERERSMASTER D";
-                strSQL += string.Format(" WHERE NOT EXISTS (SELECT * FROM PROCESSAPPROVAL APP WHERE APP.APPROVALCODE > {0} AND APP.APPROVALSTATUS = {1})",
-                                        (int)ClsExcute.ApprovalListNo.EstimateApproval,
-                                        //(int)ClsExcute.ApprovalListNo.PurchaseOrderEntryApproval,
-                                        (int)CommonDefine.ApprovalStatus.Approval);
+                strSQL += " WHERE NOT EXISTS (SELECT * FROM PROCESSAPPROVAL APP WHERE APP.ConstructionCode = A.ConstructionCode";
+                strSQL += string.Format(" AND APP.APPROVALCODE > {0}", (int)ClsExcute.ApprovalListNo.EstimateApproval);
+                strSQL += string.Format(" AND APP.APPROVALSTATUS = {0})", (int)CommonDefine.ApprovalStatus.Approval);
                 strSQL += string.Format(" AND A.CONSTRUCTIONSTATUSFLG <> {0}", StatusCode);
                 strSQL += string.Format(" AND (A.CONSTRUCTIONPERIOD = {0})", numUDConstPro.Value);
                 strSQL += string.Format(" AND (A.CONSTRUCTIONCODE = B.CONSTRUCTIONCODE AND B.DETAILNO = {0})", (int)ConstructionBaseInfoDetail.DataNoDef.ConstructionName);
                 strSQL += string.Format(" AND A.TYINGFLG != {0}", (int)ConstructionBaseInfo.TyingFlgDef.Tying);
-                strSQL += string.Format(" AND A.JOINFLG = {0}", (int)ConstructionBaseInfo.JoinFlgDef.Standard);
+                strSQL += string.Format(" AND A.JOINFLG = {0}", (int)ConstructionBaseInfo.JoinFlgDef.JoinParent);
                 if (cmbConstructionPerson.Text.Length != 0)
                 {
                     strSQL += string.Format(" AND (A.CONSTRUCTIONPERSONCODE = {0})", GetConstructionPersonCode());
Index: branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/CopyTargetList/FrmCopyTargetList.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/CopyTargetList/FrmCopyTargetList.cs	(revision 329)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/CopyTargetList/FrmCopyTargetList.cs	(revision 330)
@@ -195,6 +195,8 @@
         /// <param name="e"></param>
         private void FrmConstructionBaseInfoList_Load(object sender, EventArgs e)
         {
+            SetInitnumUDConstPro();
+ 
             // ƒRƒ“ƒ{ƒ{ƒbƒNƒXƒZƒbƒg
             SetcmbDepartment();
             SetcmbPersons();
@@ -267,7 +269,12 @@
         private void numUDConstPro_ValueChanged(object sender, EventArgs e)
         {
             if (m_initDataLoad) return;
-            
+
+            // •”��ƒRƒ“ƒ{ƒ{ƒbƒNƒX•Ï�X
+            SetcmbDepartment();
+            // ’S“–ŽÒƒRƒ“ƒ{ƒ{ƒbƒNƒX•Ï�X
+            SetcmbPersons();
+
             // ƒf�[ƒ^•\Ž¦
             DataDisplay();
         }
@@ -279,7 +286,7 @@
         /// </summary>
         /// <param name="sender"></param>
         /// <param name="e"></param>
-        private void cmbDepartment_TextChanged(object sender, EventArgs e)
+        private void cmbDepartment_SelectedIndexChanged(object sender, EventArgs e)
         {
             if (m_initDataLoad) return;
 
@@ -297,12 +304,12 @@
         /// </summary>
         /// <param name="sender"></param>
         /// <param name="e"></param>
-        private void cmbConstructionPerson_TextChanged(object sender, EventArgs e)
+        private void cmbConstructionPerson_SelectedIndexChanged(object sender, EventArgs e)
         {
             if (m_initDataLoad) return;
 
-            // ’S“–ŽÒ‘I‘ðŽž•”��‘I‘ð‚ð�Ý’è‚·‚é
-            SetPerosonToDepartment();
+            // ’S“–ŽÒƒRƒ“ƒ{ƒ{ƒbƒNƒXƒZƒbƒgŽž•”��‚ðƒZƒbƒg‚·‚é
+            if (!SetPerosonToDepartment()) return;
 
             // ƒf�[ƒ^•\Ž¦
             DataDisplay();
Index: branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/CopyTargetList/FrmCopyTargetList.designer.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/CopyTargetList/FrmCopyTargetList.designer.cs	(revision 329)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/CopyTargetList/FrmCopyTargetList.designer.cs	(revision 330)
@@ -227,7 +227,7 @@
             this.cmbConstructionPerson.Name = "cmbConstructionPerson";
             this.cmbConstructionPerson.Size = new System.Drawing.Size(200, 23);
             this.cmbConstructionPerson.TabIndex = 47;
-            this.cmbConstructionPerson.TextChanged += new System.EventHandler(this.cmbConstructionPerson_TextChanged);
+            this.cmbConstructionPerson.SelectedIndexChanged += new System.EventHandler(this.cmbConstructionPerson_SelectedIndexChanged);
             // 
             // cmbDepartment
             // 
@@ -239,7 +239,7 @@
             this.cmbDepartment.Name = "cmbDepartment";
             this.cmbDepartment.Size = new System.Drawing.Size(200, 23);
             this.cmbDepartment.TabIndex = 46;
-            this.cmbDepartment.TextChanged += new System.EventHandler(this.cmbDepartment_TextChanged);
+            this.cmbDepartment.SelectedIndexChanged += new System.EventHandler(this.cmbDepartment_SelectedIndexChanged);
             // 
             // label2
             // 
Index: branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/CopyTargetList/FrmCopyTargetListAuxiliary.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/CopyTargetList/FrmCopyTargetListAuxiliary.cs	(revision 329)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/CopyTargetList/FrmCopyTargetListAuxiliary.cs	(revision 330)
@@ -40,6 +40,31 @@
         #region ƒvƒ�ƒpƒeƒB
         #endregion
 
+        #region ‘Î�Û”N“x�‰ŠúƒZƒbƒg
+        /// <summary>
+        /// ‘Î�Û”N“x�‰ŠúƒZƒbƒg
+        /// </summary>
+        private void SetInitnumUDConstPro()
+        {
+            try
+            {
+                // ŒŸ�õ”N“xƒZƒbƒg
+                // ƒf�[ƒ^‚É‚ ‚éŽ–‹ÆŠú‚ÆŒ»�Ý‚ÌŽ–‹ÆƒZƒbƒg
+                int minval = 0;
+                int maxval = 0;
+                CommonMotions.GetPeriodYear(ref minval, ref maxval);
+                numUDConstPro.Minimum = minval;
+                numUDConstPro.Maximum = maxval;
+                numUDConstPro.Value = CommonMotions.SystemMasterData.BusinessPeriod;
+
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("ƒVƒXƒeƒ€ƒGƒ‰�[�F{0}�F{1}", CommonMotions.GetMethodName(), ex.Message);
+            }
+        }
+        #endregion
+
         #region ƒRƒs�[Œã�V‹Kƒf�[ƒ^•\Ž¦�ˆ—�
         /// <summary>
         /// ƒRƒs�[Œã�V‹Kƒf�[ƒ^•\Ž¦�ˆ—�
@@ -399,15 +424,6 @@
         {
             try
             {
-                // ŒŸ�õ”N“xƒZƒbƒg
-                // ƒf�[ƒ^‚É‚ ‚éŽ–‹ÆŠú‚ÆŒ»�Ý‚ÌŽ–‹ÆƒZƒbƒg
-                int minval = 0;
-                int maxval = 0;
-                CommonMotions.GetPeriodYear(ref minval, ref maxval);
-                numUDConstPro.Minimum = minval;
-                numUDConstPro.Maximum = maxval;
-                numUDConstPro.Value = CommonMotions.SystemMasterData.BusinessPeriod;
-
                 // ----- ‘Þ”ðŒŸ�õƒf�[ƒ^‚ª‚ ‚Á‚½�ê�‡‚ÍƒZƒbƒg‚·‚é
                 int NowPoint = ClsExcute.GetNowProcessPoint();
                 if (ClsExcute.ProcControlPara[NowPoint].StringSaveParameter.Count > 0)
@@ -514,73 +530,6 @@
         {
             try
             {
-                // �VƒZƒLƒ…ƒŠƒeƒBƒf�[ƒ^‘Î‰ž�Ï‚Ý‚©‚ðŠm”F‚·‚é
-                if (CommonMotions.LoginUserData.SecCode == 0)
-                {
-                    InitCombBox_OLD();
-                }
-                else
-                {
-                    InitCombBox_NEW();
-                }
-            }
-            catch (Exception ex)
-            {
-                logger.ErrorFormat("ƒVƒXƒeƒ€ƒGƒ‰�[�F{0}�F{1}", CommonMotions.GetMethodName(), ex.Message);
-            }
-        }
-        #endregion
-
-        #region ƒRƒ“ƒ{ƒ{ƒbƒNƒX�‰Šú•\Ž¦�i‹Œ�j
-        /// <summary>
-        /// ƒRƒ“ƒ{ƒ{ƒbƒNƒX�‰Šú•\Ž¦�i‹Œ�j
-        /// </summary>
-        private void InitCombBox_OLD()
-        {
-            try
-            {
-                // ƒVƒXƒeƒ€Œ ŒÀ‚É‚æ‚Á‚Äƒf�[ƒ^ƒAƒNƒZƒX‚É�§ŒÀ‚ª‚ ‚é
-                if (CommonMotions.LoginUserData.SecurityManagement == CommonDefine.AdminSecurityManagement
-                || CommonMotions.LoginUserData.SecurityManagement == CommonDefine.SystemManageDiv[(int)CommonDefine.SysManaDivNo.PresidentAuthority].Key
-                || CommonMotions.LoginUserData.SecurityManagement == CommonDefine.SystemManageDiv[(int)CommonDefine.SysManaDivNo.SupervisorAuthority].Key
-                || CommonMotions.LoginUserData.DepartmentCode == CommonDefine.s_GeneralAffairsDevision)
-                {
-                    // ƒVƒXƒeƒ€ŠÇ—�ŽÒ
-                    // �Å�‚‹@–§ŠÇ—�ŽÒ
-                    // “�Š‡‹@–§ŠÇ—�ŽÒ
-                    // ‘�–±•”�Š‘®ŽÒ‚Í‘S‚ÄŒ©‚¦‚é
-
-                    // •”���E’S“–ŽÒƒRƒ“ƒ{•\Ž¦
-                    DispAllCombBoxControl(true);
-                }
-                else if (CommonMotions.LoginUserData.SecurityManagement == CommonDefine.SystemManageDiv[(int)CommonDefine.SysManaDivNo.SuperiorAuthority].Key)
-                {
-                    // �Š‘®’·
-                    // •”��ƒRƒ“ƒ{”ñ•\Ž¦
-                    NonDispDepCombBox();
-                }
-                else if (CommonMotions.LoginUserData.SecurityManagement == CommonDefine.SystemManageDiv[(int)CommonDefine.SysManaDivNo.UserAuthority].Key)
-                {
-                    // ˆê”ÊŽg—pŽÒ�iŽ©•ª‚Ì‚ÝƒAƒNƒZƒX‰Â”\�j
-                    // •”���E’S“–ŽÒƒRƒ“ƒ{”ñ•\Ž¦
-                    DispAllCombBoxControl(false);
-                }
-            }
-            catch (Exception ex)
-            {
-                logger.ErrorFormat("ƒVƒXƒeƒ€ƒGƒ‰�[�F{0}�F{1}", CommonMotions.GetMethodName(), ex.Message);
-            }
-        }
-        #endregion
-
-        #region ƒRƒ“ƒ{ƒ{ƒbƒNƒX�‰Šú•\Ž¦�i�V�j
-        /// <summary>
-        /// ƒRƒ“ƒ{ƒ{ƒbƒNƒX�‰Šú•\Ž¦�i�V�j
-        /// </summary>
-        private void InitCombBox_NEW()
-        {
-            try
-            {
                 int AllPath = (int)CommonDefine.SecurityRangePos.AllPath;           // ‘S•”��
                 int Multiple = (int)CommonDefine.SecurityRangePos.Multiple;         // •¡�”•”��
                 int Only = (int)CommonDefine.SecurityRangePos.Only;                 // Ž©•”��‚Ì‚Ý
@@ -706,50 +655,20 @@
             m_initDataLoad = true;
             try
             {
+                cmbDepartment.SelectedIndexChanged -= new EventHandler(cmbDepartment_SelectedIndexChanged);
 
                 cmbDepartment.DataSource = null;
                 cmbDepartment.Items.Clear();
                 cmbDepartment.Text = "";
 
-                string strSQL = string.Empty;
+                int nTargetCount = CommonMotions.cnvInt(numUDConstPro.Value);
                 // •”��ƒ}ƒXƒ^‚ðŒŸ�õ‚·‚é
-                strSQL = "SELECT A.DEPARTMENTCODE, A.DEPARTMENTSTRING, A.DISPLAYORDER, COUNT(*)";
-                strSQL += " FROM DEPARTMENTMASTER A, PERSONINCHARGEMASTER B, CONSTRUCTIONBASEINFO C";
-                strSQL += " WHERE A.DELETEFLG = 0";
+                StringBuilder strSQL = new StringBuilder();
+                CommonMotions.CreateDepCombBoxSQL(ref strSQL, nTargetCount);
 
-                // �VƒZƒLƒ…ƒŠƒeƒBƒf�[ƒ^‘Î‰ž�Ï‚Ý‚©‚ðŠm”F‚·‚é
-                if (CommonMotions.LoginUserData.SecCode == 0)
-                {
-                    // ƒVƒXƒeƒ€Œ ŒÀ‚É‚æ‚Á‚Äƒf�[ƒ^ƒAƒNƒZƒX‚É�§ŒÀ‚ª‚ ‚é
-                    if (CommonMotions.LoginUserData.SecurityManagement == CommonDefine.SystemManageDiv[(int)CommonDefine.SysManaDivNo.SuperiorAuthority].Key
-                        || CommonMotions.LoginUserData.SecurityManagement == CommonDefine.SystemManageDiv[(int)CommonDefine.SysManaDivNo.UserAuthority].Key)
-                    {
-                        // �Š‘®’·
-                        // ˆê”ÊŽg—pŽÒ�iŽ©•ª‚Ì‚ÝƒAƒNƒZƒX‰Â”\�j
-                        strSQL += string.Format(" AND A.DEPARTMENTCODE = {0}", CommonMotions.LoginUserData.DepartmentCode);
-                    }
-                }
-                else
-                {
-                    if (CommonMotions.LoginUserData.PersonCode == CommonDefine.AdminCode)
-                    {
-
-                    }
-                    else
-                    {
-                        // ŽQ�Æ•”��ƒ}ƒXƒ^‚æ‚èŽæ“¾‚·‚é
-                        strSQL += " AND A.DEPARTMENTCODE IN (SELECT A1.DEPARTMENTCODE FROM PERSONDEPARTMENTMASTER A1";
-                        strSQL += string.Format(" WHERE A1.PERSONCODE = {0})", CommonMotions.LoginUserData.PersonCode);
-                    }
-                }
-                strSQL += " AND A.DEPARTMENTCODE = B.DEPARTMENTCODE";
-                strSQL += " AND B.PERSONCODE = C.CONSTRUCTIONPERSONCODE";
-                strSQL += " GROUP BY A.DEPARTMENTCODE, A.DEPARTMENTSTRING, A.DISPLAYORDER";
-                strSQL += " ORDER BY A.DISPLAYORDER ASC";
-
                 // •”��ƒ}ƒXƒ^“Ç�ž
                 ArrayList arList = new ArrayList();
-                if (!depDB.ExecuteReader(strSQL, ref arList)) return false;
+                if (!depDB.ExecuteReader(strSQL.ToString(), ref arList)) return false;
 
                 List<KeyValuePair<int, string>> ConstructionDataList = new List<KeyValuePair<int, string>>();
                 ConstructionDataList.Add(new KeyValuePair<int, string>(0, ""));
@@ -765,20 +684,6 @@
                 // ƒRƒ“ƒ{ƒ{ƒbƒNƒX�‰Šú•\Ž¦
                 ComboBoxAction.InitDataSetCombBox(cmbDepartment, ConstructionDataList);
 
-                // �VƒZƒLƒ…ƒŠƒeƒBƒf�[ƒ^‘Î‰ž�Ï‚Ý‚©‚ðŠm”F‚·‚é
-                if (CommonMotions.LoginUserData.SecCode == 0)
-                {
-                    // �Š‘®’·
-                    // ˆê”ÊŽg—pŽÒ�iŽ©•ª‚Ì‚ÝƒAƒNƒZƒX‰Â”\�j
-                    if (CommonMotions.LoginUserData.SecurityManagement == CommonDefine.SystemManageDiv[(int)CommonDefine.SysManaDivNo.SuperiorAuthority].Key ||
-                        CommonMotions.LoginUserData.SecurityManagement == CommonDefine.SystemManageDiv[(int)CommonDefine.SysManaDivNo.UserAuthority].Key)
-                    {
-                        // ‘�–±•”�Š‘®ŽÒˆÈŠO
-                        if (CommonMotions.LoginUserData.DepartmentCode != CommonDefine.s_GeneralAffairsDevision)
-                            cmbDepartment.SelectedValue = CommonMotions.LoginUserData.DepartmentCode;
-                    }
-                }
-
                 return true;
             }
             catch (Exception ex)
@@ -790,6 +695,7 @@
             {
                 depDB.close(); depDB = null;
                 m_initDataLoad = bSave;
+                cmbDepartment.SelectedIndexChanged += new EventHandler(cmbDepartment_SelectedIndexChanged);
             }
         }
         #endregion
@@ -801,31 +707,33 @@
         private bool SetcmbPersons()
         {
             IOMPersonInCharge picDB = new IOMPersonInCharge();
-            List<PersonInChargeMaster> workList = new List<PersonInChargeMaster>();
             bool bSave = m_initDataLoad;
             m_initDataLoad = true;
             try
             {
+                cmbConstructionPerson.SelectedIndexChanged -= new EventHandler(cmbConstructionPerson_SelectedIndexChanged);
+
                 cmbConstructionPerson.DataSource = null;
                 cmbConstructionPerson.Items.Clear();
                 cmbConstructionPerson.Text = "";
 
-                string strSQL = string.Empty;
+                int nTargetCount = CommonMotions.cnvInt(numUDConstPro.Value);
                 int DepartmentCode = GetDepartmentCode();
-                if (DepartmentCode == 0)
-                    strSQL = " WHERE DeleteFlg = 0 Order By EmployeeClassFlg ASC, DisplayOrder ASC";
-                else
-                    strSQL = string.Format(" WHERE DEPARTMENTCODE = {0} AND DeleteFlg = 0 Order By EmployeeClassFlg ASC, DisplayOrder ASC", DepartmentCode);
+                StringBuilder strSQL = new StringBuilder();
+                CommonMotions.CreateManCombBoxSQL(ref strSQL, nTargetCount, DepartmentCode);
 
                 // ’S“–ŽÒƒ}ƒXƒ^“Ç�ž
-                if (!picDB.SelectAction(strSQL, ref workList)) return false;
+                ArrayList workList = new ArrayList();
+                if (!picDB.ExecuteReader(strSQL.ToString(), ref workList)) return false;
 
                 List<KeyValuePair<int, string>> ConstructionDataList = new List<KeyValuePair<int, string>>();
                 ConstructionDataList.Add(new KeyValuePair<int, string>(0, ""));
 
-                foreach (PersonInChargeMaster work in workList)
+                PersonInChargeMaster workRec = new PersonInChargeMaster();
+                foreach (object[] work in workList)
                 {
-                    KeyValuePair<int, string> keyval = new KeyValuePair<int, string>(work.PersonCode, work.PersonName);
+                    picDB.Reader2Struct(work, ref workRec);
+                    KeyValuePair<int, string> keyval = new KeyValuePair<int, string>(workRec.PersonCode, workRec.PersonName);
 
                     ConstructionDataList.Add(keyval);
                 }
@@ -833,17 +741,6 @@
                 // ƒRƒ“ƒ{ƒ{ƒbƒNƒX�‰Šú•\Ž¦
                 ComboBoxAction.InitDataSetCombBox(cmbConstructionPerson, ConstructionDataList);
 
-                // �VƒZƒLƒ…ƒŠƒeƒBƒf�[ƒ^‘Î‰ž�Ï‚Ý‚©‚ðŠm”F‚·‚é
-                if (CommonMotions.LoginUserData.SecCode == 0)
-                {
-                    // ˆê”Êƒ†�[ƒU�[‚Å‘�–±•”�Š‘®ŽÒ‚Å‚Í‚È‚¢�ê�‡�Aƒ�ƒOƒCƒ“ŽÒ‚ÌƒR�[ƒh‚ðƒZƒbƒg‚·‚é
-                    if (CommonMotions.LoginUserData.SecurityManagement == CommonDefine.SystemManageDiv[(int)CommonDefine.SysManaDivNo.UserAuthority].Key &&
-                        CommonMotions.LoginUserData.DepartmentCode != CommonDefine.s_GeneralAffairsDevision)
-                    {
-                        cmbConstructionPerson.SelectedValue = CommonMotions.LoginUserData.PersonCode;
-                    }
-                }
-
                 return true;
             }
             catch (Exception ex)
@@ -855,6 +752,7 @@
             {
                 picDB.close(); picDB = null;
                 m_initDataLoad = bSave;
+                cmbConstructionPerson.SelectedIndexChanged += new EventHandler(cmbConstructionPerson_SelectedIndexChanged);
             }
         }
         #endregion
@@ -869,26 +767,36 @@
             IOMPersonInCharge PersonDB = new IOMPersonInCharge();
             try
             {
+                cmbDepartment.SelectedIndexChanged -= new EventHandler(cmbDepartment_SelectedIndexChanged);
+                cmbConstructionPerson.SelectedIndexChanged -= new EventHandler(cmbConstructionPerson_SelectedIndexChanged);
+
                 // ƒRƒ“ƒ{ƒ{ƒbƒNƒX‚æ‚è‘I‘ð’S“–ŽÒ‚ðŽæ“¾‚·‚é
                 int PersonCode = GetConstructionPersonCode();
-                if (PersonCode < 1) return false;
+                if (PersonCode < 1) return true;
 
+                int nTargetCount = CommonMotions.cnvInt(numUDConstPro.Value);
                 int DepartmentCode = GetDepartmentCode();
 
-                string strSQL = PersonDB.CreatePrimarykeyString(PersonCode);
+                StringBuilder strSQL = new StringBuilder();
+                CommonMotions.CreateMan2DepSQL(ref strSQL, nTargetCount, PersonCode);
+
+                ArrayList arList = new ArrayList();
+                if (!PersonDB.ExecuteReader(strSQL.ToString(), ref arList)) return false;
+                if (arList.Count < 1) return false;
+
+                object[] objRec = (object[])arList[0];
                 PersonInChargeMaster PersonRec = new PersonInChargeMaster();
-                PersonDB.SelectAction(strSQL, ref PersonRec);
+                PersonRec.PersonCode = CommonMotions.cnvInt(objRec[0]);         // ’S“–ŽÒƒR�[ƒh
+                PersonRec.PersonName = CommonMotions.cnvString(objRec[1]);      // ’S“–ŽÒ–¼
+                PersonRec.DepartmentCode = CommonMotions.cnvInt(objRec[2]);     // •”��ƒR�[ƒh
 
+                // “¯‚¶•”��‚Ì�ê�‡‚Í�ˆ—�‚µ‚È‚¢
+                if (DepartmentCode == PersonRec.DepartmentCode) return true;
+
                 // •”��ƒRƒ“ƒ{ƒ{ƒbƒNƒX‚Ö•”��ƒR�[ƒhƒZƒbƒg
-                if (PersonRec.DepartmentCode > 0 && DepartmentCode != PersonRec.DepartmentCode)
-                {
-                    bool bSave = m_initDataLoad;
-                    m_initDataLoad = true;
-                    cmbDepartment.SelectedValue = PersonRec.DepartmentCode;
-                    SetcmbPersons();    // ’S“–ŽÒƒRƒ“ƒ{ƒ{ƒbƒNƒX•Ï�X
-                    cmbConstructionPerson.SelectedValue = PersonCode;
-                    m_initDataLoad = bSave;
-                }
+                cmbDepartment.SelectedValue = PersonRec.DepartmentCode;
+                SetcmbPersons();    // ’S“–ŽÒƒRƒ“ƒ{ƒ{ƒbƒNƒX•Ï�X
+                cmbConstructionPerson.SelectedValue = PersonCode;
 
                 return true;
             }
@@ -900,6 +808,9 @@
             finally
             {
                 PersonDB.close(); PersonDB = null;
+
+                cmbDepartment.SelectedIndexChanged += new EventHandler(cmbDepartment_SelectedIndexChanged);
+                cmbConstructionPerson.SelectedIndexChanged += new EventHandler(cmbConstructionPerson_SelectedIndexChanged);
             }
         }
         #endregion
Index: branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/CopyTargetList/FrmNewOrContinueCopy.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/CopyTargetList/FrmNewOrContinueCopy.cs	(revision 329)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/CopyTargetList/FrmNewOrContinueCopy.cs	(revision 330)
@@ -1,5 +1,6 @@
 ï»¿using System;
 using System.Collections.Generic;
+using System.Collections;
 using System.ComponentModel;
 using System.Data;
 using System.Drawing;
@@ -694,18 +695,18 @@
         private bool SetcmbPersons()
         {
             IOMPersonInCharge picDB = new IOMPersonInCharge();
-            List<PersonInChargeMaster> workList = new List<PersonInChargeMaster>();
             try
             {
                 cmbSalesPerson.DataSource = null;
                 cmbSalesPerson.Items.Clear();
                 cmbSalesPerson.Text = "";
+                int nTargetCount = CommonMotions.cnvInt(cmbConstructionPeriod.Text);
+                StringBuilder strSQL = new StringBuilder();
+                CommonMotions.CreateManCombBoxSQL(ref strSQL, nTargetCount);
 
-                // æ‹…å½“è€…ãƒžã‚¹ã‚¿ã‚’æ¤œç´¢ã�™ã‚‹
-                string strSQL = " Where DeleteFlg = 0 Order By EmployeeClassFlg ASC, DisplayOrder ASC";
-
                 // æ‹…å½“è€…ãƒžã‚¹ã‚¿èª­è¾¼
-                if (!picDB.SelectAction(strSQL, ref workList)) return false;
+                ArrayList workList = new ArrayList();
+                if (!picDB.ExecuteReader(strSQL.ToString(), ref workList)) return false;
 
                 List<KeyValuePair<int, string>> SalesDataList = new List<KeyValuePair<int, string>>();
                 List<KeyValuePair<int, string>> ConstructionDataList = new List<KeyValuePair<int, string>>();
@@ -712,9 +713,11 @@
                 SalesDataList.Add(new KeyValuePair<int, string>(0, ""));
                 ConstructionDataList.Add(new KeyValuePair<int, string>(0, ""));
 
-                foreach (PersonInChargeMaster work in workList)
+                    PersonInChargeMaster workRec = new PersonInChargeMaster();
+                foreach (object[] work in workList)
                 {
-                    KeyValuePair<int, string> keyval = new KeyValuePair<int, string>(work.PersonCode, work.PersonName);
+                    picDB.Reader2Struct(work, ref workRec);
+                    KeyValuePair<int, string> keyval = new KeyValuePair<int, string>(workRec.PersonCode, workRec.PersonName);
 
                     SalesDataList.Add(keyval);
                     ConstructionDataList.Add(keyval);
Index: branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/CostomerRegist/FrmCostomerRegist.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/CostomerRegist/FrmCostomerRegist.cs	(revision 329)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/CostomerRegist/FrmCostomerRegist.cs	(revision 330)
@@ -76,9 +76,10 @@
         private enum DispCtrl
         {
             EditMode = 0,
-            PersonCode,
-            PersonName,
-            DepartmentName,
+            CreatePersonCode,
+            CreatePersonName,
+            CreateDepartmentCode,
+            CreateDepartmentName,
             CreateDate,
             OrdersDivision,
             CorporateStatusName,
@@ -96,8 +97,8 @@
             PointNone,
             PointFront,
             PointRear,
-            ChargePersonName,
-            ChargeDepartmentName,
+            PersonName,
+            DepartmentName,
             OrderNo,
             OrderDate,
         }
Index: branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/CostomerRegist/FrmCostomerRegist.designer.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/CostomerRegist/FrmCostomerRegist.designer.cs	(revision 329)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/CostomerRegist/FrmCostomerRegist.designer.cs	(revision 330)
@@ -100,6 +100,7 @@
             this.label25 = new System.Windows.Forms.Label();
             this.label26 = new System.Windows.Forms.Label();
             this.btnOtherProc = new System.Windows.Forms.Button();
+            this.lblDepCode = new System.Windows.Forms.Label();
             this.panel5.SuspendLayout();
             this.panel1.SuspendLayout();
             this.panel3.SuspendLayout();
@@ -446,6 +447,7 @@
             this.panel1.Controls.Add(this.pnlApprovalButton);
             this.panel1.Controls.Add(this.label12);
             this.panel1.Controls.Add(this.lblLabel03);
+            this.panel1.Controls.Add(this.lblDepCode);
             this.panel1.Controls.Add(this.lblLabel02);
             this.panel1.Controls.Add(this.lblLabel01);
             this.panel1.Controls.Add(this.label14);
@@ -1027,6 +1029,18 @@
             this.btnOtherProc.UseVisualStyleBackColor = false;
             this.btnOtherProc.Click += new System.EventHandler(this.btnOtherProc_Click);
             // 
+            // lblDepCode
+            // 
+            this.lblDepCode.BackColor = System.Drawing.Color.White;
+            this.lblDepCode.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
+            this.lblDepCode.ForeColor = System.Drawing.Color.Black;
+            this.lblDepCode.Location = new System.Drawing.Point(702, 68);
+            this.lblDepCode.Name = "lblDepCode";
+            this.lblDepCode.Size = new System.Drawing.Size(160, 25);
+            this.lblDepCode.TabIndex = 38;
+            this.lblDepCode.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
+            this.lblDepCode.Visible = false;
+            // 
             // FrmCostomerRegist
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
@@ -1144,5 +1158,6 @@
         private System.Windows.Forms.RadioButton radioButton3;
         private System.Windows.Forms.RadioButton radioButton4;
         private System.Windows.Forms.Label label14;
+        private System.Windows.Forms.Label lblDepCode;
     }
 }
\ No newline at end of file
Index: branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/CostomerRegist/FrmCostomerRegistAuxiliary.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/CostomerRegist/FrmCostomerRegistAuxiliary.cs	(revision 329)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/CostomerRegist/FrmCostomerRegistAuxiliary.cs	(revision 330)
@@ -30,9 +30,10 @@
             m_dispControl = new Control[DspCtrlCnt];
 
             m_dispControl[(int)DispCtrl.EditMode] = lblEditMode;
-            m_dispControl[(int)DispCtrl.PersonCode] = label21;
-            m_dispControl[(int)DispCtrl.PersonName] = lblLabel01;
-            m_dispControl[(int)DispCtrl.DepartmentName] = lblLabel02;
+            m_dispControl[(int)DispCtrl.CreatePersonCode] = label21;
+            m_dispControl[(int)DispCtrl.CreatePersonName] = lblLabel01;
+            m_dispControl[(int)DispCtrl.CreateDepartmentName] = lblDepCode;
+            m_dispControl[(int)DispCtrl.CreateDepartmentName] = lblLabel02;
             m_dispControl[(int)DispCtrl.CreateDate] = lblLabel03;
 
             m_dispControl[(int)DispCtrl.OrdersDivision] = cmbDivision;
@@ -51,8 +52,8 @@
             m_dispControl[(int)DispCtrl.PointNone] = rdbPoint1;
             m_dispControl[(int)DispCtrl.PointFront] = rdbPoint2;
             m_dispControl[(int)DispCtrl.PointRear] = rdbPoint3;
-            m_dispControl[(int)DispCtrl.ChargeDepartmentName] = textBox1;
-            m_dispControl[(int)DispCtrl.ChargePersonName] = textBox2;
+            m_dispControl[(int)DispCtrl.DepartmentName] = textBox1;
+            m_dispControl[(int)DispCtrl.PersonName] = textBox2;
             m_dispControl[(int)DispCtrl.OrderNo] = label26;
             m_dispControl[(int)DispCtrl.OrderDate] = label27;
         }
@@ -139,12 +140,12 @@
                 bRet &= CommonMotions.DispFieldLengthCheck(m_dispControl[(int)DispCtrl.OrdersName2], s_CostomerNameLength, false);
 
                 // éƒ¨ç½²å��
-                if (m_dispControl[(int)DispCtrl.ChargeDepartmentName].Text.Length != 0) iLength++;
-                bRet &= CommonMotions.DispFieldLengthCheck(m_dispControl[(int)DispCtrl.ChargeDepartmentName], s_CostomerNameLength, false);
+                if (m_dispControl[(int)DispCtrl.DepartmentName].Text.Length != 0) iLength++;
+                bRet &= CommonMotions.DispFieldLengthCheck(m_dispControl[(int)DispCtrl.DepartmentName], s_CostomerNameLength, false);
 
                 // æ‹…å½“è€…å��
-                if (m_dispControl[(int)DispCtrl.ChargePersonName].Text.Length != 0) iLength++;
-                bRet &= CommonMotions.DispFieldLengthCheck(m_dispControl[(int)DispCtrl.ChargePersonName], s_CostomerNameLength, false);
+                if (m_dispControl[(int)DispCtrl.PersonName].Text.Length != 0) iLength++;
+                bRet &= CommonMotions.DispFieldLengthCheck(m_dispControl[(int)DispCtrl.PersonName], s_CostomerNameLength, false);
 
                 // ä½�æ‰€ï¼‘
                 if (m_dispControl[(int)DispCtrl.Address1].Text.Length != 0) iLength++;
@@ -309,18 +310,18 @@
                 if (m_NewData)
                 {   // æ–°è¦�ä½œæˆ�æ™‚
                     // ã‚­ãƒ¼é …ç›®ã‚»ãƒƒãƒˆ
-                    RegRec.PersonCode = CommonMotions.cnvInt(m_dispControl[(int)DispCtrl.PersonCode].Text);
+                    RegRec.CreatePersonCode = CommonMotions.cnvInt(m_dispControl[(int)DispCtrl.CreatePersonCode].Text);
                     RegRec.CreateDate = CommonMotions.cnvDate(m_dispControl[(int)DispCtrl.CreateDate].Text);
                     RegRec.PetitionPeriod = CommonMotions.SystemMasterData.BusinessPeriod;
 
                     // ç”³è«‹é€£ç•ªå�–å¾—
-                    strSQL = crDB.CreatePrimarykeyString(RegRec.PersonCode, RegRec.CreateDate);
+                    strSQL = crDB.CreatePrimarykeyString(RegRec.CreatePersonCode, RegRec.CreateDate);
                     int SeqNo = crDB.SelectMaxSeqNo(strSQL, false) + 1;
-                    strSQL = crDB.CreatePrimarykeyString(RegRec.PersonCode, RegRec.CreateDate, SeqNo);
+                    strSQL = crDB.CreatePrimarykeyString(RegRec.CreatePersonCode, RegRec.CreateDate, SeqNo);
                     crDB.DeleteAction(strSQL, false);
 
                     RegRec.SeqNo = SeqNo;
-                    m_PersonCode = RegRec.PersonCode;
+                    m_PersonCode = RegRec.CreatePersonCode;
                     m_CreateDate = RegRec.CreateDate;
                     m_SeqNo = SeqNo;
                 }
@@ -394,9 +395,9 @@
                 RegRec.OrderersName2 = m_dispControl[(int)DispCtrl.OrdersName2].Text;
 
                 // éƒ¨ç½²å��
-                RegRec.DepartmentName = m_dispControl[(int)DispCtrl.ChargeDepartmentName].Text;
+                RegRec.DepartmentName = m_dispControl[(int)DispCtrl.DepartmentName].Text;
                 // æ‹…å½“è€…å��
-                RegRec.ChargePersonName = m_dispControl[(int)DispCtrl.ChargePersonName].Text;
+                RegRec.PersonName = m_dispControl[(int)DispCtrl.PersonName].Text;
                 // éƒµä¾¿ç•ªå�·
                 RegRec.ZipCode = m_dispControl[(int)DispCtrl.ZipCode].Text;
                 // ä½�æ‰€ï¼‘
@@ -419,6 +420,12 @@
                 // ç™ºæ³¨è€…ã‚³ãƒ¼ãƒ‰
                 RegRec.SourceCode = m_SourceCode;
 
+                // ç”³è«‹éƒ¨ç½²ã‚³ãƒ¼ãƒ‰
+                RegRec.CreateDepartmentCode = CommonMotions.cnvInt(m_dispControl[(int)DispCtrl.CreateDepartmentCode].Text);
+                // ç”³è«‹éƒ¨ç½²å��
+                RegRec.CreateDepartmentName = m_dispControl[(int)DispCtrl.CreateDepartmentName].Text;
+
+
                 if (NewData)
                 {
                     // ãƒ‡ãƒ¼ã‚¿ç™»éŒ²
@@ -501,25 +508,34 @@
             IOMDepartment dmDB = new IOMDepartment();
             try
             {
-                string strSQL = "SELECT B.DEPARTMENTSTRING, A.PERSONNAME FROM PERSONINCHARGEMASTER A, DEPARTMENTMASTER B";
-                strSQL += string.Format(" WHERE A.PERSONCODE = {0}", m_PersonCode);
-                strSQL += " AND B.DEPARTMENTCODE = A.DEPARTMENTCODE";
+                StringBuilder strSQL = new StringBuilder();
+                strSQL.Append("SELECT");
+                strSQL.Append(" B.DEPARTMENTSTRING");
+                strSQL.Append(", A.PERSONNAME");
+                strSQL.Append(", A.DEPARTMENTCODE");
+                strSQL.Append(" FROM PERSONINCHARGEMASTER A");
+                strSQL.Append(", DEPARTMENTMASTER B");
+                strSQL.AppendFormat(" WHERE A.PERSONCODE = {0}", m_PersonCode);
+                strSQL.Append(" AND B.DEPARTMENTCODE = A.DEPARTMENTCODE");
                 ArrayList dmRec = new ArrayList();
-                dmDB.ExecuteReader(strSQL, ref dmRec);
+                dmDB.ExecuteReader(strSQL.ToString(), ref dmRec);
 
+                int nDepCode = 0;
                 string strDepName = string.Empty;
                 string strPerName = string.Empty;
                 if (dmRec.Count != 0)
                 {
                     object[] objRec = (object[])dmRec[0];
+                    nDepCode = CommonMotions.cnvInt(objRec[2]);
                     strDepName = CommonMotions.cnvString(objRec[0]);
                     strPerName = CommonMotions.cnvString(objRec[1]);
                     m_dispControl[(int)DispCtrl.EditMode].Text = CommonDefine.EditModeStringNew + s_FixTitle;
                 }
 
-                m_dispControl[(int)DispCtrl.PersonCode].Text = m_PersonCode.ToString();
-                m_dispControl[(int)DispCtrl.PersonName].Text = strPerName;
-                m_dispControl[(int)DispCtrl.DepartmentName].Text = strDepName;
+                m_dispControl[(int)DispCtrl.CreatePersonCode].Text = m_PersonCode.ToString();
+                m_dispControl[(int)DispCtrl.CreatePersonName].Text = strPerName;
+                m_dispControl[(int)DispCtrl.CreateDepartmentCode].Text = nDepCode.ToString();
+                m_dispControl[(int)DispCtrl.CreateDepartmentName].Text = strDepName;
                 m_dispControl[(int)DispCtrl.CreateDate].Text = DateTime.Now.ToShortDateString();
 
             }
@@ -546,31 +562,35 @@
             try
             {
                 // ç™ºæ³¨è€…ãƒžã‚¹ã‚¿å�–å¾—
-                ArrayList crList = new ArrayList();
-                string strSQL = "SELECT A.*, B.PERSONNAME, C.DEPARTMENTSTRING, C.DEPARTMENTCODE FROM COSTOMERREGIST A";
-                strSQL += " LEFT JOIN PERSONINCHARGEMASTER B ON B.PERSONCODE = A.PERSONCODE";
-                strSQL += " LEFT JOIN DEPARTMENTMASTER C ON C.DEPARTMENTCODE = B.DEPARTMENTCODE";
-                strSQL += string.Format(" WHERE A.PersonCode = {0}", m_PersonCode);
-                strSQL += string.Format(" AND DATE(A.CreateDate) = STR_TO_DATE('{0}', '%Y/%m/%d')", m_CreateDate.ToShortDateString());
-                strSQL += string.Format(" AND A.SeqNo = {0}", m_SeqNo);
+                StringBuilder strSQL = new StringBuilder();
+                strSQL.Append("Select A.*, B.PersonName From costomerregist As A");
+                strSQL.Append(" Inner Join personinchargemaster As B");
+                strSQL.Append("    On B.PersonCode = A.CreatePersonCode");
+                strSQL.AppendFormat(" WHERE CreatePersonCode = {0}", m_PersonCode);
+                strSQL.AppendFormat(" AND DATE(CreateDate) = STR_TO_DATE('{0}', '%Y/%m/%d')", m_CreateDate.ToShortDateString());
+                strSQL.AppendFormat(" AND SeqNo = {0}", m_SeqNo);
 
-                if (!crDB.ExecuteReader(strSQL, ref crList)) return false;
-                if (crList.Count == 0) return true;
+                ArrayList arList = new ArrayList();
+                if (!crDB.ExecuteReader(strSQL.ToString(), ref arList)) return false;
+                if (arList.Count < 1) return false;
 
-                object[] crRec = (object[])crList[0];
+                object[] objRec = (object[])arList[0];
+                CostomerRegist crRec = new CostomerRegist();
+                crDB.Reader2Struct(objRec, ref crRec);
+
                 // ãƒ‡ãƒ¼ã‚¿è¡¨ç¤º
-                cmbDivision.SelectedValue = CommonMotions.cnvInt(crRec[(int)IOCostomerRegist.TableColumn.OrderCotegory]);
-                m_dispControl[(int)DispCtrl.CorporateStatusName].Text = CommonMotions.cnvString(crRec[(int)IOCostomerRegist.TableColumn.CorporateStatusName]);
+                cmbDivision.SelectedValue = crRec.SourceCotegory;
+                m_dispControl[(int)DispCtrl.CorporateStatusName].Text = crRec.CorporateStatusName;
 
-                int StatusPoint = CommonMotions.cnvInt(crRec[(int)IOCostomerRegist.TableColumn.CorporateStatusPoint]);
+                int StatusPoint = crRec.CorporateStatusPoint;
                 if (StatusPoint == 0) rdbPoint1.Checked = true;
                 else if (StatusPoint == 1) rdbPoint2.Checked = true;
                 else if (StatusPoint == 2) rdbPoint3.Checked = true;
 
-                m_SourceCotegory = CommonMotions.cnvInt(crRec[(int)IOCostomerRegist.TableColumn.SourceCotegory]);
-                m_SourceCode = CommonMotions.cnvInt(crRec[(int)IOCostomerRegist.TableColumn.SourceCode]);
+                m_SourceCotegory = crRec.SourceCotegory;
+                m_SourceCode = crRec.SourceCode;
                 string strEdit = string.Empty;
-                int datamode = CommonMotions.cnvInt(crRec[(int)IOCostomerRegist.TableColumn.DataMode]);
+                int datamode = crRec.DataMode;
                 if (datamode == (int)DataMode.NewData)
                 {
                     strEdit = CommonDefine.EditModeStringNew;
@@ -584,36 +604,38 @@
 
                 m_dispControl[(int)DispCtrl.EditMode].Text = string.Format("{0}{1}", strEdit, s_FixTitle);
 
-                int DivCnt = CommonMotions.cnvInt(crRec[(int)IOCostomerRegist.TableColumn.OrderFlg]);
+                int DivCnt = crRec.OrderFlg;
                 if (DivCnt == 0) radioButton1.Checked = true;
                 else radioButton2.Checked = true;
 
-                m_dispControl[(int)DispCtrl.OrderNo].Text = CommonMotions.cnvInt(crRec[(int)IOCostomerRegist.TableColumn.OrderNo]).ToString();
-                m_dispControl[(int)DispCtrl.OrderDate].Text = CommonMotions.cnvDate(crRec[(int)IOCostomerRegist.TableColumn.OrderDate]).ToShortDateString();
+                m_dispControl[(int)DispCtrl.OrderNo].Text = crRec.OrderNo.ToString();
+                m_dispControl[(int)DispCtrl.OrderDate].Text = crRec.OrderDate.ToShortDateString();
 
-                m_dispControl[(int)DispCtrl.OrdersName1].Text = CommonMotions.cnvString(crRec[(int)IOCostomerRegist.TableColumn.OrderersName1]);
-                m_dispControl[(int)DispCtrl.OrdersName2].Text = CommonMotions.cnvString(crRec[(int)IOCostomerRegist.TableColumn.OrderersName2]);
-                m_dispControl[(int)DispCtrl.ChargeDepartmentName].Text = CommonMotions.cnvString(crRec[(int)IOCostomerRegist.TableColumn.DepartmentName]);
-                m_dispControl[(int)DispCtrl.ChargePersonName].Text = CommonMotions.cnvString(crRec[(int)IOCostomerRegist.TableColumn.ChargePersonName]);
-                m_dispControl[(int)DispCtrl.ZipCode].Text = CommonMotions.cnvString(crRec[(int)IOCostomerRegist.TableColumn.ZipCode]);
-                m_dispControl[(int)DispCtrl.Address1].Text = CommonMotions.cnvString(crRec[(int)IOCostomerRegist.TableColumn.Address1]);
-                m_dispControl[(int)DispCtrl.Address2].Text = CommonMotions.cnvString(crRec[(int)IOCostomerRegist.TableColumn.Address2]);
-                m_dispControl[(int)DispCtrl.Address3].Text = CommonMotions.cnvString(crRec[(int)IOCostomerRegist.TableColumn.Address3]);
-                m_dispControl[(int)DispCtrl.PhoneNumber].Text = CommonMotions.cnvString(crRec[(int)IOCostomerRegist.TableColumn.PhoneNumber]);
-                m_dispControl[(int)DispCtrl.FaxNumber].Text = CommonMotions.cnvString(crRec[(int)IOCostomerRegist.TableColumn.FaxNumber]);
-                m_dispControl[(int)DispCtrl.MailAddress].Text = CommonMotions.cnvString(crRec[(int)IOCostomerRegist.TableColumn.MailAddress]);
-                m_dispControl[(int)DispCtrl.Note].Text = CommonMotions.cnvString(crRec[(int)IOCostomerRegist.TableColumn.Note]);
+                m_dispControl[(int)DispCtrl.OrdersName1].Text = crRec.OrderersName1;
+                m_dispControl[(int)DispCtrl.OrdersName2].Text = crRec.OrderersName2;
+                m_dispControl[(int)DispCtrl.DepartmentName].Text = crRec.DepartmentName;
+                m_dispControl[(int)DispCtrl.PersonName].Text = crRec.PersonName;
+                m_dispControl[(int)DispCtrl.ZipCode].Text = crRec.ZipCode;
+                m_dispControl[(int)DispCtrl.Address1].Text = crRec.Address1;
+                m_dispControl[(int)DispCtrl.Address2].Text = crRec.Address2;
+                m_dispControl[(int)DispCtrl.Address3].Text = crRec.Address3;
+                m_dispControl[(int)DispCtrl.PhoneNumber].Text = crRec.PhoneNumber;
+                m_dispControl[(int)DispCtrl.FaxNumber].Text = crRec.FaxNumber;
+                m_dispControl[(int)DispCtrl.MailAddress].Text = crRec.MailAddress;
+                m_dispControl[(int)DispCtrl.Note].Text = crRec.Note;
 
-                m_dispControl[(int)DispCtrl.CreateDate].Text = CommonMotions.cnvDate(crRec[(int)IOCostomerRegist.TableColumn.CreateDate]).ToShortDateString();
-                m_dispControl[(int)DispCtrl.PersonCode].Text = CommonMotions.cnvInt(crRec[(int)IOCostomerRegist.TableColumn.PersonCode]).ToString();
+                m_dispControl[(int)DispCtrl.CreateDate].Text = crRec.CreateDate.ToShortDateString();
+                m_dispControl[(int)DispCtrl.CreatePersonCode].Text = crRec.CreatePersonCode.ToString();
 
+                m_dispControl[(int)DispCtrl.CreateDepartmentCode].Text = crRec.CreateDepartmentCode.ToString();
+                m_dispControl[(int)DispCtrl.CreateDepartmentName].Text = crRec.CreateDepartmentName;
+
                 int DspCtrlCnt = Enum.GetNames(typeof(IOCostomerRegist.TableColumn)).Length;
-                m_dispControl[(int)DispCtrl.PersonName].Text = CommonMotions.cnvString(crRec[DspCtrlCnt]);
-                m_dispControl[(int)DispCtrl.DepartmentName].Text = CommonMotions.cnvString(crRec[(DspCtrlCnt + 1)]);
+                m_dispControl[(int)DispCtrl.CreatePersonName].Text = CommonMotions.cnvString(objRec[DspCtrlCnt]);
 
                 // ç”³è«‹ãƒ‡ãƒ¼ã‚¿ã‚­ãƒ¼å�–å¾—
-                m_CreateDate = CommonMotions.cnvDate(crRec[(int)IOCostomerRegist.TableColumn.CreateDate]);
-                m_SeqNo = CommonMotions.cnvInt(crRec[(int)IOCostomerRegist.TableColumn.SeqNo]);
+                m_CreateDate = crRec.CreateDate;
+                m_SeqNo = crRec.SeqNo;
                 
                 return true;
             }
@@ -1230,8 +1252,8 @@
 
                 m_dispControl[(int)DispCtrl.OrdersName1].Text = OrderRec.OrderersName1;
                 m_dispControl[(int)DispCtrl.OrdersName2].Text = OrderRec.OrderersName2;
-                m_dispControl[(int)DispCtrl.ChargeDepartmentName].Text = OrderRec.DepartmentName;
-                m_dispControl[(int)DispCtrl.ChargePersonName].Text = OrderRec.ChargePersonName;
+                m_dispControl[(int)DispCtrl.DepartmentName].Text = OrderRec.DepartmentName;
+                m_dispControl[(int)DispCtrl.PersonName].Text = OrderRec.ChargePersonName;
                 m_dispControl[(int)DispCtrl.ZipCode].Text = OrderRec.ZipCode;
                 m_dispControl[(int)DispCtrl.Address1].Text = OrderRec.Address1;
                 m_dispControl[(int)DispCtrl.Address2].Text = OrderRec.Address2;
Index: branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/CostomerRegist/FrmCostomerRegistList.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/CostomerRegist/FrmCostomerRegistList.cs	(revision 329)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/CostomerRegist/FrmCostomerRegistList.cs	(revision 330)
@@ -273,6 +273,12 @@
         private void numUDConstPro_ValueChanged(object sender, EventArgs e)
         {
             if (m_OpeRestrict) return;
+
+            // •”��ƒRƒ“ƒ{ƒ{ƒbƒNƒX•Ï�X
+            SetcmbDepartment();
+            // ’S“–ŽÒƒRƒ“ƒ{ƒ{ƒbƒNƒX•Ï�X
+            SetcmbPersons();
+
             // ƒf�[ƒ^•\Ž¦
             DataDisplay();
         }
@@ -284,7 +290,7 @@
         /// </summary>
         /// <param name="sender"></param>
         /// <param name="e"></param>
-        private void cmbDepartment_TextChanged(object sender, EventArgs e)
+        private void cmbDepartment_SelectedIndexChanged(object sender, EventArgs e)
         {
             if (m_OpeRestrict) return;
 
@@ -302,7 +308,7 @@
         /// </summary>
         /// <param name="sender"></param>
         /// <param name="e"></param>
-        private void cmbConstructionPerson_TextChanged(object sender, EventArgs e)
+        private void cmbConstructionPerson_SelectedIndexChanged(object sender, EventArgs e)
         {
             if (m_OpeRestrict) return;
 
Index: branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/CostomerRegist/FrmCostomerRegistList.designer.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/CostomerRegist/FrmCostomerRegistList.designer.cs	(revision 329)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/CostomerRegist/FrmCostomerRegistList.designer.cs	(revision 330)
@@ -196,7 +196,7 @@
             this.cmbConstructionPerson.Name = "cmbConstructionPerson";
             this.cmbConstructionPerson.Size = new System.Drawing.Size(200, 23);
             this.cmbConstructionPerson.TabIndex = 2;
-            this.cmbConstructionPerson.TextChanged += new System.EventHandler(this.cmbConstructionPerson_TextChanged);
+            this.cmbConstructionPerson.SelectedIndexChanged += new System.EventHandler(this.cmbConstructionPerson_SelectedIndexChanged);
             // 
             // cmbDepartment
             // 
@@ -208,7 +208,7 @@
             this.cmbDepartment.Name = "cmbDepartment";
             this.cmbDepartment.Size = new System.Drawing.Size(200, 23);
             this.cmbDepartment.TabIndex = 1;
-            this.cmbDepartment.TextChanged += new System.EventHandler(this.cmbDepartment_TextChanged);
+            this.cmbDepartment.SelectedIndexChanged += new System.EventHandler(this.cmbDepartment_SelectedIndexChanged);
             // 
             // label2
             // 
Index: branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/CostomerRegist/FrmCostomerRegistListAuxiliary.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/CostomerRegist/FrmCostomerRegistListAuxiliary.cs	(revision 329)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/CostomerRegist/FrmCostomerRegistListAuxiliary.cs	(revision 330)
@@ -188,7 +188,7 @@
                 int PersonCode = GetConstructionPersonCode();
                 if (PersonCode == 0) return strRet;
 
-                strRet = string.Format(" AND A.PERSONCODE = {0}", PersonCode);
+                strRet = string.Format(" AND A.CreatePersonCode = {0}", PersonCode);
 
                 return strRet;
             }
@@ -214,8 +214,7 @@
                 int DepartmentCode = GetDepartmentCode();
                 if (DepartmentCode == 0) return strRet;
 
-                strRet += " AND A.PERSONCODE IN (SELECT PX.PERSONCODE FROM PERSONINCHARGEMASTER PX ";
-                strRet += string.Format("WHERE PX.DEPARTMENTCODE = {0})", DepartmentCode);
+                strRet += string.Format(" AND A.CreateDepartmentCode = {0}", DepartmentCode);
 
                 return strRet;
             }
@@ -236,7 +235,7 @@
             try
             {
                 strSQL = "SELECT";
-                strSQL += " B.PERSONNAME";
+                strSQL += " A.PersonName";
                 strSQL += " ,A.CORPORATESTATUSNAME";
                 strSQL += " ,A.CORPORATESTATUSPOINT";
                 strSQL += " ,A.ORDERERSNAME1";
@@ -243,14 +242,12 @@
                 strSQL += " ,A.ORDERERSNAME2";
                 strSQL += " ,C.NAMESTRING";
                 strSQL += " ,DATE_FORMAT(A.CREATEDATE,'%Y/%m/%d')";
-                strSQL += " ,A.PERSONCODE";
+                strSQL += " ,A.CreatePersonCode";
                 strSQL += " ,A.SEQNO";
-                strSQL += " ,D.DEPARTMENTSTRING";
+                strSQL += " ,A.DepartmentName";
                 strSQL += " ,A.DATAMODE";
                 strSQL += " FROM COSTOMERREGIST A";
-                strSQL += " LEFT JOIN PERSONINCHARGEMASTER B ON B.PERSONCODE = A.PERSONCODE";
                 strSQL += " LEFT JOIN DIVISIONMASTER C ON C.DIVISIONCODE = 1 AND C.NAMECODE = A.ORDERCOTEGORY";
-                strSQL += " LEFT JOIN DEPARTMENTMASTER D ON D.DEPARTMENTCODE = B.DEPARTMENTCODE";
                 strSQL += string.Format(" WHERE A.PETITIONPERIOD = {0}", numUDConstPro.Value);
                 strSQL += GetDepartmentString();
                 strSQL += GetPersonString();
@@ -519,73 +516,6 @@
         {
             try
             {
-                // �VƒZƒLƒ…ƒŠƒeƒBƒf�[ƒ^‘Î‰ž�Ï‚Ý‚©‚ðŠm”F‚·‚é
-                if (CommonMotions.LoginUserData.SecCode == 0)
-                {
-                    InitCombBox_OLD();
-                }
-                else
-                {
-                    InitCombBox_NEW();
-                }
-            }
-            catch (Exception ex)
-            {
-                logger.ErrorFormat("ƒVƒXƒeƒ€ƒGƒ‰�[�F{0}�F{1}", CommonMotions.GetMethodName(), ex.Message);
-            }
-        }
-        #endregion
-
-        #region ƒRƒ“ƒ{ƒ{ƒbƒNƒX�‰Šú•\Ž¦�i‹Œ�j
-        /// <summary>
-        /// ƒRƒ“ƒ{ƒ{ƒbƒNƒX�‰Šú•\Ž¦�i‹Œ�j
-        /// </summary>
-        private void InitCombBox_OLD()
-        {
-            try
-            {
-                // ƒVƒXƒeƒ€Œ ŒÀ‚É‚æ‚Á‚Äƒf�[ƒ^ƒAƒNƒZƒX‚É�§ŒÀ‚ª‚ ‚é
-                if (CommonMotions.LoginUserData.SecurityManagement == CommonDefine.AdminSecurityManagement
-                || CommonMotions.LoginUserData.SecurityManagement == CommonDefine.SystemManageDiv[(int)CommonDefine.SysManaDivNo.PresidentAuthority].Key
-                || CommonMotions.LoginUserData.SecurityManagement == CommonDefine.SystemManageDiv[(int)CommonDefine.SysManaDivNo.SupervisorAuthority].Key
-                || CommonMotions.LoginUserData.DepartmentCode == CommonDefine.s_GeneralAffairsDevision)
-                {
-                    // ƒVƒXƒeƒ€ŠÇ—�ŽÒ
-                    // �Å�‚‹@–§ŠÇ—�ŽÒ
-                    // “�Š‡‹@–§ŠÇ—�ŽÒ
-                    // ‘�–±•”�Š‘®ŽÒ‚Í‘S‚ÄŒ©‚¦‚é
-
-                    // •”���E’S“–ŽÒƒRƒ“ƒ{•\Ž¦
-                    DispAllCombBoxControl(true);
-                }
-                else if (CommonMotions.LoginUserData.SecurityManagement == CommonDefine.SystemManageDiv[(int)CommonDefine.SysManaDivNo.SuperiorAuthority].Key)
-                {
-                    // �Š‘®’·
-                    // •”��ƒRƒ“ƒ{”ñ•\Ž¦
-                    NonDispDepCombBox();
-                }
-                else if (CommonMotions.LoginUserData.SecurityManagement == CommonDefine.SystemManageDiv[(int)CommonDefine.SysManaDivNo.UserAuthority].Key)
-                {
-                    // ˆê”ÊŽg—pŽÒ�iŽ©•ª‚Ì‚ÝƒAƒNƒZƒX‰Â”\�j
-                    // •”���E’S“–ŽÒƒRƒ“ƒ{”ñ•\Ž¦
-                    DispAllCombBoxControl(false);
-                }
-            }
-            catch (Exception ex)
-            {
-                logger.ErrorFormat("ƒVƒXƒeƒ€ƒGƒ‰�[�F{0}�F{1}", CommonMotions.GetMethodName(), ex.Message);
-            }
-        }
-        #endregion
-
-        #region ƒRƒ“ƒ{ƒ{ƒbƒNƒX�‰Šú•\Ž¦�i�V�j
-        /// <summary>
-        /// ƒRƒ“ƒ{ƒ{ƒbƒNƒX�‰Šú•\Ž¦�i�V�j
-        /// </summary>
-        private void InitCombBox_NEW()
-        {
-            try
-            {
                 int AllPath = (int)CommonDefine.SecurityRangePos.AllPath;           // ‘S•”��
                 int Multiple = (int)CommonDefine.SecurityRangePos.Multiple;         // •¡�”•”��
                 int Only = (int)CommonDefine.SecurityRangePos.Only;                 // Ž©•”��‚Ì‚Ý
@@ -688,32 +618,20 @@
             m_OpeRestrict = true;
             try
             {
+                cmbDepartment.SelectedIndexChanged -= new EventHandler(cmbDepartment_SelectedIndexChanged);
 
                 cmbDepartment.DataSource = null;
                 cmbDepartment.Items.Clear();
                 cmbDepartment.Text = "";
 
-                string strSQL = string.Empty;
+                int nTargetCount = CommonMotions.cnvInt(numUDConstPro.Value);
                 // •”��ƒ}ƒXƒ^‚ðŒŸ�õ‚·‚é
-                strSQL = "SELECT A.DEPARTMENTCODE, A.DEPARTMENTSTRING, A.DISPLAYORDER, COUNT(*)";
-                strSQL += " FROM DEPARTMENTMASTER A, PERSONINCHARGEMASTER B, CONSTRUCTIONBASEINFO C";
-                strSQL += " WHERE A.DELETEFLG = 0";
+                StringBuilder strSQL = new StringBuilder();
+                CommonMotions.CreateDepCombBoxSQL(ref strSQL, nTargetCount);
 
-                if (CommonMotions.LoginUserData.PersonCode != CommonDefine.AdminCode)
-                {
-                    // ŽQ�Æ•”��ƒ}ƒXƒ^‚æ‚èŽæ“¾‚·‚é
-                    strSQL += " AND A.DEPARTMENTCODE IN (SELECT A1.DEPARTMENTCODE FROM PERSONDEPARTMENTMASTER A1";
-                    strSQL += string.Format(" WHERE A1.PERSONCODE = {0})", CommonMotions.LoginUserData.PersonCode);
-                }
-
-                strSQL += " AND A.DEPARTMENTCODE = B.DEPARTMENTCODE";
-                strSQL += " AND B.PERSONCODE = C.CONSTRUCTIONPERSONCODE";
-                strSQL += " GROUP BY A.DEPARTMENTCODE, A.DEPARTMENTSTRING, A.DISPLAYORDER";
-                strSQL += " ORDER BY A.DISPLAYORDER ASC";
-
                 // •”��ƒ}ƒXƒ^“Ç�ž
                 ArrayList arList = new ArrayList();
-                if (!depDB.ExecuteReader(strSQL, ref arList)) return;
+                if (!depDB.ExecuteReader(strSQL.ToString(), ref arList)) return;
 
                 List<KeyValuePair<int, string>> ConstructionDataList = new List<KeyValuePair<int, string>>();
                 ConstructionDataList.Add(new KeyValuePair<int, string>(0, ""));
@@ -739,6 +657,7 @@
             {
                 depDB.close(); depDB = null;
                 m_OpeRestrict = bSave;
+                cmbDepartment.SelectedIndexChanged += new EventHandler(cmbDepartment_SelectedIndexChanged);
             }
         }
         #endregion
@@ -750,40 +669,33 @@
         private void SetcmbPersons()
         {
             IOMPersonInCharge picDB = new IOMPersonInCharge();
-            List<PersonInChargeMaster> workList = new List<PersonInChargeMaster>();
             bool bSave = m_OpeRestrict;
             m_OpeRestrict = true;
             try
             {
+                cmbConstructionPerson.SelectedIndexChanged -= new EventHandler(cmbConstructionPerson_SelectedIndexChanged);
+
                 cmbConstructionPerson.DataSource = null;
                 cmbConstructionPerson.Items.Clear();
                 cmbConstructionPerson.Text = "";
 
-                string strSQL = string.Empty;
+                int nTargetCount = CommonMotions.cnvInt(numUDConstPro.Value);
                 int DepartmentCode = GetDepartmentCode();
-                if (DepartmentCode == 0)
-                {
-                    strSQL = " WHERE DeleteFlg = 0";
-                    strSQL += string.Format(" AND EmployeeClassFlg = {0}", (int)PersonInChargeMaster.EmployeeClassFlgDef.Regular);
-                    // ŽQ�Æ•”��ƒ}ƒXƒ^‚æ‚èŽæ“¾‚·‚é
-                    strSQL += " AND DEPARTMENTCODE IN (SELECT AA.DEPARTMENTCODE FROM PERSONDEPARTMENTMASTER AA";
-                    strSQL += string.Format(" WHERE AA.PERSONCODE = {0})", CommonMotions.LoginUserData.PersonCode);
-                    strSQL += " Order By EmployeeClassFlg ASC, DisplayOrder ASC";
-                }
-                else
-                {
-                    strSQL = string.Format(" WHERE DEPARTMENTCODE = {0} AND DeleteFlg = 0 Order By EmployeeClassFlg ASC, DisplayOrder ASC", DepartmentCode);
-                }
+                StringBuilder strSQL = new StringBuilder();
+                CommonMotions.CreateManCombBoxSQL(ref strSQL, nTargetCount, DepartmentCode);
 
                 // ’S“–ŽÒƒ}ƒXƒ^“Ç�ž
-                if (!picDB.SelectAction(strSQL, ref workList)) return;
+                ArrayList workList = new ArrayList();
+                if (!picDB.ExecuteReader(strSQL.ToString(), ref workList)) return;
 
                 List<KeyValuePair<int, string>> ConstructionDataList = new List<KeyValuePair<int, string>>();
                 ConstructionDataList.Add(new KeyValuePair<int, string>(0, ""));
 
-                foreach (PersonInChargeMaster work in workList)
+                PersonInChargeMaster workRec = new PersonInChargeMaster();
+                foreach (object[] work in workList)
                 {
-                    KeyValuePair<int, string> keyval = new KeyValuePair<int, string>(work.PersonCode, work.PersonName);
+                    picDB.Reader2Struct(work, ref workRec);
+                    KeyValuePair<int, string> keyval = new KeyValuePair<int, string>(workRec.PersonCode, workRec.PersonName);
 
                     ConstructionDataList.Add(keyval);
                 }
@@ -801,6 +713,7 @@
             {
                 picDB.close(); picDB = null;
                 m_OpeRestrict = bSave;
+                cmbConstructionPerson.SelectedIndexChanged += new EventHandler(cmbConstructionPerson_SelectedIndexChanged);
             }
         }
         #endregion
@@ -815,26 +728,36 @@
             IOMPersonInCharge PersonDB = new IOMPersonInCharge();
             try
             {
+                cmbDepartment.SelectedIndexChanged -= new EventHandler(cmbDepartment_SelectedIndexChanged);
+                cmbConstructionPerson.SelectedIndexChanged -= new EventHandler(cmbConstructionPerson_SelectedIndexChanged);
+
                 // ƒRƒ“ƒ{ƒ{ƒbƒNƒX‚æ‚è‘I‘ð’S“–ŽÒ‚ðŽæ“¾‚·‚é
                 int PersonCode = GetConstructionPersonCode();
-                if (PersonCode < 1) return false;
+                if (PersonCode < 1) return true;
 
+                int nTargetCount = CommonMotions.cnvInt(numUDConstPro.Value);
                 int DepartmentCode = GetDepartmentCode();
 
-                string strSQL = PersonDB.CreatePrimarykeyString(PersonCode);
+                StringBuilder strSQL = new StringBuilder();
+                CommonMotions.CreateMan2DepSQL(ref strSQL, nTargetCount, PersonCode);
+
+                ArrayList arList = new ArrayList();
+                if (!PersonDB.ExecuteReader(strSQL.ToString(), ref arList)) return false;
+                if (arList.Count < 1) return false;
+
+                object[] objRec = (object[])arList[0];
                 PersonInChargeMaster PersonRec = new PersonInChargeMaster();
-                PersonDB.SelectAction(strSQL, ref PersonRec);
+                PersonRec.PersonCode = CommonMotions.cnvInt(objRec[0]);         // ’S“–ŽÒƒR�[ƒh
+                PersonRec.PersonName = CommonMotions.cnvString(objRec[1]);      // ’S“–ŽÒ–¼
+                PersonRec.DepartmentCode = CommonMotions.cnvInt(objRec[2]);     // •”��ƒR�[ƒh
 
+                // “¯‚¶•”��‚Ì�ê�‡‚Í�ˆ—�‚µ‚È‚¢
+                if (DepartmentCode == PersonRec.DepartmentCode) return true;
+
                 // •”��ƒRƒ“ƒ{ƒ{ƒbƒNƒX‚Ö•”��ƒR�[ƒhƒZƒbƒg
-                if (PersonRec.DepartmentCode > 0 && DepartmentCode != PersonRec.DepartmentCode)
-                {
-                    bool bSave = m_OpeRestrict;
-                    m_OpeRestrict = true;
-                    cmbDepartment.SelectedValue = PersonRec.DepartmentCode;
-                    SetcmbPersons();    // ’S“–ŽÒƒRƒ“ƒ{ƒ{ƒbƒNƒX•Ï�X
-                    cmbConstructionPerson.SelectedValue = PersonCode;
-                    m_OpeRestrict = bSave;
-                }
+                cmbDepartment.SelectedValue = PersonRec.DepartmentCode;
+                SetcmbPersons();    // ’S“–ŽÒƒRƒ“ƒ{ƒ{ƒbƒNƒX•Ï�X
+                cmbConstructionPerson.SelectedValue = PersonCode;
 
                 return true;
             }
@@ -846,6 +769,9 @@
             finally
             {
                 PersonDB.close(); PersonDB = null;
+
+                cmbDepartment.SelectedIndexChanged += new EventHandler(cmbDepartment_SelectedIndexChanged);
+                cmbConstructionPerson.SelectedIndexChanged += new EventHandler(cmbConstructionPerson_SelectedIndexChanged);
             }
         }
         #endregion
Index: branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/CostomerRegist/PrintFormat.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/CostomerRegist/PrintFormat.cs	(revision 329)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/CostomerRegist/PrintFormat.cs	(revision 330)
@@ -288,7 +288,7 @@
                 // æ‰¿èª�ãƒ‡ãƒ¼ã‚¿ã�‹ã‚‰æ‹…å½“è€…å��ã‚’èª­è¾¼ã‚€
                 string strSQLSeal = "SELECT B.PERSONCODE, B.DISPLAYSTRING, B.SEALPRINTNAME";
                 strSQLSeal += " FROM PERSONAPPROVAL A, PERSONINCHARGEMASTER B, SECURITYMASTER C";
-                strSQLSeal += string.Format(" Where A.PERSONCODE = {0}", crRec.PersonCode);
+                strSQLSeal += string.Format(" Where A.PERSONCODE = {0}", crRec.CreatePersonCode);
                 strSQLSeal += string.Format(" And A.ApprovalCode = {0}", (int)ClsExcute.ApprovalListNo.DRConstructionApproval);
                 strSQLSeal += string.Format(" AND A.ORDERNO = {0}", CommonDefine.s_Default_OrderNo);
                 strSQLSeal += " AND A.SEQNO != 1";
@@ -317,9 +317,9 @@
                 // æ‹…å½“è€…ã‚’ã‚»ãƒƒãƒˆã�™ã‚‹
                 int SetCnt = (PorsonTable.Length - 1);
                 PersonInChargeMaster SalesRec = new PersonInChargeMaster();
-                string strSales = picDB.CreatePrimarykeyString(crRec.PersonCode);
+                string strSales = picDB.CreatePrimarykeyString(crRec.CreatePersonCode);
                 picDB.SelectAction(strSales, ref SalesRec);
-                PorsonTable[SetCnt] = crRec.PersonCode;
+                PorsonTable[SetCnt] = crRec.CreatePersonCode;
                 PrintNameTable[SetCnt] = SalesRec.DisplayString;
                 PersonNameTable[SetCnt] = SalesRec.SealPrintName;
 
@@ -408,7 +408,7 @@
                 m_UsedExcel.ExcelCellSet("E10", crRec.DepartmentName);
 
                 // æ‹…å½“è€…
-                m_UsedExcel.ExcelCellSet("E11", crRec.ChargePersonName);
+                m_UsedExcel.ExcelCellSet("E11", crRec.PersonName);
 
                 // éƒµä¾¿ç•ªå�·
                 m_UsedExcel.ExcelCellSet("E13", crRec.ZipCode);
Index: branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/DRList/FrmDRList.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/DRList/FrmDRList.cs	(revision 329)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/DRList/FrmDRList.cs	(revision 330)
@@ -282,6 +282,11 @@
         {
             if (m_initDataLoad) return;
 
+            // •”��ƒRƒ“ƒ{ƒ{ƒbƒNƒX•Ï�X
+            SetcmbDepartment();
+            // ’S“–ŽÒƒRƒ“ƒ{ƒ{ƒbƒNƒX•Ï�X
+            SetcmbPersons();
+
             // ƒf�[ƒ^•\Ž¦
             DataDisplay();
         }
@@ -305,9 +310,9 @@
         }
         #endregion
 
-        #region ’S“–ŽÒƒRƒ“ƒ{ƒ{ƒbƒNƒX‚Ì�X�V
+        #region ’S“–ŽÒ‚Ì•Ï�X
         /// <summary>
-        /// ’S“–ŽÒƒRƒ“ƒ{ƒ{ƒbƒNƒX‚Ì�X�V
+        /// ’S“–ŽÒ‚Ì•Ï�X
         /// </summary>
         /// <param name="sender"></param>
         /// <param name="e"></param>
@@ -316,7 +321,7 @@
             if (m_initDataLoad) return;
 
             // ’S“–ŽÒ‘I‘ðŽž•”��‘I‘ð‚ð�Ý’è‚·‚é
-            SetPerosonToDepartment();
+            if (!SetPerosonToDepartment()) return;
 
             // ƒf�[ƒ^•\Ž¦
             DataDisplay();
Index: branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/DRList/FrmDRListAuxiliary.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/DRList/FrmDRListAuxiliary.cs	(revision 329)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/DRList/FrmDRListAuxiliary.cs	(revision 330)
@@ -263,13 +263,22 @@
 
                 // ’S“–ŽÒ‘I‘ð‚ª‚ ‚é�ê�‡
                 if (PersonCode > 0)
-                    strSub1.AppendFormat(" AND (A.ConstructionPersonCode = {0} OR A.ConstructionInstructor = {0} OR A.ConstrSubPersonCode = {0})", PersonCode);
+                {
+                    strSub1.AppendFormat(" AND (A.ConstructionPersonCode = {0}", PersonCode);
+                    strSub1.AppendFormat(" OR A.ConstructionInstructor = {0}", PersonCode);
+                    strSub1.AppendFormat(" OR A.ConstrSubPersonCode = {0})", PersonCode);
+                }
 
-                strSub1.AppendFormat(" AND (A.CONSTRUCTIONCODE = B.CONSTRUCTIONCODE AND B.DETAILNO = {0})", (int)ConstructionBaseInfoDetail.DataNoDef.ConstructionName);
+                strSub1.Append(" AND (A.CONSTRUCTIONCODE = B.CONSTRUCTIONCODE");
+                strSub1.AppendFormat(" AND B.DETAILNO = {0})", (int)ConstructionBaseInfoDetail.DataNoDef.ConstructionName);
                 strSub1.Append(" AND A.CONSTRUCTIONPERSONCODE = C.PERSONCODE");
                 // •”��‘I‘ð‚ª‚ ‚éŽž
                 if (DepartmentCode > 0)
-                    strSub1.AppendFormat(" AND C.DEPARTMENTCODE = {0}", DepartmentCode);
+                {
+                    strSub1.AppendFormat(" AND (A.ConstrDepCode = {0}", DepartmentCode);
+                    strSub1.AppendFormat(" Or A.ConstrSubDepCode = {0}", DepartmentCode);
+                    strSub1.AppendFormat(" Or A.ConstrInstrDepCode = {0})", DepartmentCode);
+                }
 
                 strSub1.AppendFormat(" AND A.CONSTRUCTIONPERIOD = {0}", numUDConstPro.Value);
                 strSub1.Append(" AND C.DEPARTMENTCODE = D.DEPARTMENTCODE");
@@ -296,14 +305,23 @@
                 strSub2.AppendFormat(" WHERE A.CONSTRUCTIONPERIOD = {0}", numUDConstPro.Value);
                 // ’S“–ŽÒ‘I‘ð‚ª‚ ‚é�ê�‡
                 if (PersonCode > 0)
-                    strSub2.AppendFormat(" AND (A.ConstructionPersonCode = {0} OR A.ConstructionInstructor = {0} OR A.ConstrSubPersonCode = {0})", PersonCode);
+                {
+                    strSub2.AppendFormat(" AND (A.ConstructionPersonCode = {0}", PersonCode);
+                    strSub2.AppendFormat(" OR A.ConstructionInstructor = {0}", PersonCode);
+                    strSub2.AppendFormat(" OR A.ConstrSubPersonCode = {0})", PersonCode);
+                }
 
-                strSub2.AppendFormat(" AND (A.CONSTRUCTIONCODE = B.CONSTRUCTIONCODE AND B.DETAILNO = {0})", (int)ConstructionBaseInfoDetail.DataNoDef.ConstructionName);
+                strSub2.Append(" AND (A.CONSTRUCTIONCODE = B.CONSTRUCTIONCODE");
+                strSub2.AppendFormat(" AND B.DETAILNO = {0})", (int)ConstructionBaseInfoDetail.DataNoDef.ConstructionName);
                 strSub2.Append(" AND A.CONSTRUCTIONCODE = C.CONSTRUCTIONCODE");
                 strSub2.Append(" AND C.PERSONCODE = D.PERSONCODE");
                 // •”��‘I‘ð‚ª‚ ‚éŽž
                 if (DepartmentCode > 0)
-                    strSub2.AppendFormat(" AND D.DEPARTMENTCODE = {0}", DepartmentCode);
+                {
+                    strSub2.AppendFormat(" AND (A.ConstrDepCode = {0}", DepartmentCode);
+                    strSub2.AppendFormat(" Or A.ConstrSubDepCode = {0}", DepartmentCode);
+                    strSub2.AppendFormat(" Or A.ConstrInstrDepCode = {0})", DepartmentCode);
+                }
                 strSub2.Append(" AND D.DEPARTMENTCODE = E.DEPARTMENTCODE");
                 // strSub2.Append(" AND F.CONSTRUCTIONCODE = A.CONSTRUCTIONCODE");
 
@@ -840,50 +858,20 @@
             m_initDataLoad = true;
             try
             {
+                cmbDepartment.SelectedIndexChanged -= new EventHandler(cmbDepartment_SelectedIndexChanged);
 
                 cmbDepartment.DataSource = null;
                 cmbDepartment.Items.Clear();
                 cmbDepartment.Text = "";
 
-                string strSQL = string.Empty;
+                int nTargetCount = CommonMotions.cnvInt(numUDConstPro.Value);
                 // •”��ƒ}ƒXƒ^‚ðŒŸ�õ‚·‚é
-                strSQL = "SELECT A.DEPARTMENTCODE, A.DEPARTMENTSTRING, A.DISPLAYORDER, COUNT(*)";
-                strSQL += " FROM DEPARTMENTMASTER A, PERSONINCHARGEMASTER B, CONSTRUCTIONBASEINFO C";
-                strSQL += " WHERE A.DELETEFLG = 0";
+                StringBuilder strSQL = new StringBuilder();
+                CommonMotions.CreateDepCombBoxSQL(ref strSQL, nTargetCount);
 
-                // �VƒZƒLƒ…ƒŠƒeƒBƒf�[ƒ^‘Î‰ž�Ï‚Ý‚©‚ðŠm”F‚·‚é
-                if (CommonMotions.LoginUserData.SecCode == 0)
-                {
-                    // ƒVƒXƒeƒ€Œ ŒÀ‚É‚æ‚Á‚Äƒf�[ƒ^ƒAƒNƒZƒX‚É�§ŒÀ‚ª‚ ‚é
-                    if (CommonMotions.LoginUserData.SecurityManagement == CommonDefine.SystemManageDiv[(int)CommonDefine.SysManaDivNo.SuperiorAuthority].Key
-                        || CommonMotions.LoginUserData.SecurityManagement == CommonDefine.SystemManageDiv[(int)CommonDefine.SysManaDivNo.UserAuthority].Key)
-                    {
-                        // �Š‘®’·
-                        // ˆê”ÊŽg—pŽÒ�iŽ©•ª‚Ì‚ÝƒAƒNƒZƒX‰Â”\�j
-                        strSQL += string.Format(" AND A.DEPARTMENTCODE = {0}", CommonMotions.LoginUserData.DepartmentCode);
-                    }
-                }
-                else
-                {
-                    if (CommonMotions.LoginUserData.PersonCode == CommonDefine.AdminCode)
-                    {
-
-                    }
-                    else
-                    {
-                        // ŽQ�Æ•”��ƒ}ƒXƒ^‚æ‚èŽæ“¾‚·‚é
-                        strSQL += " AND A.DEPARTMENTCODE IN (SELECT A1.DEPARTMENTCODE FROM PERSONDEPARTMENTMASTER A1";
-                        strSQL += string.Format(" WHERE A1.PERSONCODE = {0})", CommonMotions.LoginUserData.PersonCode);
-                    }
-                }
-                strSQL += " AND A.DEPARTMENTCODE = B.DEPARTMENTCODE";
-                strSQL += " AND B.PERSONCODE = C.CONSTRUCTIONPERSONCODE";
-                strSQL += " GROUP BY A.DEPARTMENTCODE, A.DEPARTMENTSTRING, A.DISPLAYORDER";
-                strSQL += " ORDER BY A.DISPLAYORDER ASC";
-
                 // •”��ƒ}ƒXƒ^“Ç�ž
                 ArrayList arList = new ArrayList();
-                if (!depDB.ExecuteReader(strSQL, ref arList)) return false;
+                if (!depDB.ExecuteReader(strSQL.ToString(), ref arList)) return false;
 
                 List<KeyValuePair<int, string>> ConstructionDataList = new List<KeyValuePair<int, string>>();
                 ConstructionDataList.Add(new KeyValuePair<int, string>(0, ""));
@@ -899,20 +887,6 @@
                 // ƒRƒ“ƒ{ƒ{ƒbƒNƒX�‰Šú•\Ž¦
                 ComboBoxAction.InitDataSetCombBox(cmbDepartment, ConstructionDataList);
 
-                // �VƒZƒLƒ…ƒŠƒeƒBƒf�[ƒ^‘Î‰ž�Ï‚Ý‚©‚ðŠm”F‚·‚é
-                if (CommonMotions.LoginUserData.SecCode == 0)
-                {
-                    // �Š‘®’·
-                    // ˆê”ÊŽg—pŽÒ�iŽ©•ª‚Ì‚ÝƒAƒNƒZƒX‰Â”\�j
-                    if (CommonMotions.LoginUserData.SecurityManagement == CommonDefine.SystemManageDiv[(int)CommonDefine.SysManaDivNo.SuperiorAuthority].Key ||
-                        CommonMotions.LoginUserData.SecurityManagement == CommonDefine.SystemManageDiv[(int)CommonDefine.SysManaDivNo.UserAuthority].Key)
-                    {
-                        // ‘�–±•”�Š‘®ŽÒˆÈŠO
-                        if (CommonMotions.LoginUserData.DepartmentCode != CommonDefine.s_GeneralAffairsDevision)
-                            cmbDepartment.SelectedValue = CommonMotions.LoginUserData.DepartmentCode;
-                    }
-                }
-
                 return true;
             }
             catch (Exception ex)
@@ -924,6 +898,7 @@
             {
                 depDB.close(); depDB = null;
                 m_initDataLoad = bSave;
+                cmbDepartment.SelectedIndexChanged += new EventHandler(cmbDepartment_SelectedIndexChanged);
             }
         }
         #endregion
@@ -932,55 +907,36 @@
         /// <summary>
         /// ’S“–ŽÒƒRƒ“ƒ{ƒ{ƒbƒNƒX‚Ö•¶Žš‚ðƒZƒbƒg‚·‚é
         /// </summary>
-        private bool SetcmbPersons()
+        private void SetcmbPersons()
         {
             IOMPersonInCharge picDB = new IOMPersonInCharge();
-            List<PersonInChargeMaster> workList = new List<PersonInChargeMaster>();
             bool bSave = m_initDataLoad;
             m_initDataLoad = true;
             try
             {
+                cmbConstructionPerson.SelectedIndexChanged -= new EventHandler(cmbPerson_SelectedIndexChanged);
+
                 cmbConstructionPerson.DataSource = null;
                 cmbConstructionPerson.Items.Clear();
                 cmbConstructionPerson.Text = "";
 
+                int nTargetCount = CommonMotions.cnvInt(numUDConstPro.Value);
                 int DepartmentCode = GetDepartmentCode();
-                string strSQL = string.Empty;
-                // ŒŸ�õ�ðŒ�
-                strSQL = string.Format(" WHERE LEDGERFLG = {0}", (int)PersonInChargeMaster.LedgerDivNoDef.CalcTarget);
-                strSQL += " AND (DEPARTMENTCODE";
-                string strSubSQL = string.Empty;
-                if (DepartmentCode == 0)
-                {
-                    // ŽQ�Æ•”��ƒ}ƒXƒ^‚æ‚èŽæ“¾‚·‚é
-                    strSubSQL += string.Format(" IN (SELECT AA.DEPARTMENTCODE FROM PERSONDEPARTMENTMASTER AA WHERE AA.PERSONCODE = {0})"
-                                            , CommonMotions.LoginUserData.PersonCode);
-                }
-                else
-                {
-                    strSubSQL += string.Format(" = {0}", DepartmentCode);
-                }
-                strSQL += strSubSQL + ")";
+                StringBuilder strSQL = new StringBuilder();
+                CommonMotions.CreateManCombBoxSQL(ref strSQL, nTargetCount, DepartmentCode);
 
-                // “–ŠúŠúŽñ“ú�EŠú––“ú‚ðŽæ“¾
-                DateTime dtDefaultStart = DateTime.MinValue;
-                DateTime dtDefaultEnd = DateTime.MinValue;
-                CreateDefaultStartAndEndDate(ref dtDefaultStart, ref dtDefaultEnd);
-
-                strSQL += string.Format(" AND (DATE(STARTDATE) <= STR_TO_DATE('{0}','%Y/%m/%d')", dtDefaultEnd.ToShortDateString());
-                strSQL += string.Format(" AND (STR_TO_DATE('{0}','%Y/%m/%d') <= DATE(ENDDATE)", dtDefaultStart.ToShortDateString());
-                strSQL += string.Format(" OR STR_TO_DATE('{0}','%Y/%m/%d') = DATE(ENDDATE)))", DateTime.MinValue.ToShortDateString());
-
-                strSQL += " Order By DeleteFlg ASC, EmployeeClassFlg ASC, DisplayOrder ASC";
                 // ’S“–ŽÒƒ}ƒXƒ^“Ç�ž
-                if (!picDB.SelectAction(strSQL, ref workList)) return false;
+                ArrayList workList = new ArrayList();
+                if (!picDB.ExecuteReader(strSQL.ToString(), ref workList)) return;
 
                 List<KeyValuePair<int, string>> ConstructionDataList = new List<KeyValuePair<int, string>>();
                 ConstructionDataList.Add(new KeyValuePair<int, string>(0, ""));
 
-                foreach (PersonInChargeMaster work in workList)
+                PersonInChargeMaster workRec = new PersonInChargeMaster();
+                foreach (object[] work in workList)
                 {
-                    KeyValuePair<int, string> keyval = new KeyValuePair<int, string>(work.PersonCode, work.PersonName);
+                    picDB.Reader2Struct(work, ref workRec);
+                    KeyValuePair<int, string> keyval = new KeyValuePair<int, string>(workRec.PersonCode, workRec.PersonName);
 
                     ConstructionDataList.Add(keyval);
                 }
@@ -987,65 +943,18 @@
 
                 // ƒRƒ“ƒ{ƒ{ƒbƒNƒX�‰Šú•\Ž¦
                 ComboBoxAction.InitDataSetCombBox(cmbConstructionPerson, ConstructionDataList);
-
-                // �VƒZƒLƒ…ƒŠƒeƒBƒf�[ƒ^‘Î‰ž�Ï‚Ý‚©‚ðŠm”F‚·‚é
-                if (CommonMotions.LoginUserData.SecCode == 0)
-                {
-                    // ˆê”Êƒ†�[ƒU�[‚Å‘�–±•”�Š‘®ŽÒ‚Å‚Í‚È‚¢�ê�‡�Aƒ�ƒOƒCƒ“ŽÒ‚ÌƒR�[ƒh‚ðƒZƒbƒg‚·‚é
-                    if (CommonMotions.LoginUserData.SecurityManagement == CommonDefine.SystemManageDiv[(int)CommonDefine.SysManaDivNo.UserAuthority].Key &&
-                        CommonMotions.LoginUserData.DepartmentCode != CommonDefine.s_GeneralAffairsDevision)
-                    {
-                        cmbConstructionPerson.SelectedValue = CommonMotions.LoginUserData.PersonCode;
-                    }
-                }
-
-                return true;
             }
             catch (Exception ex)
             {
                 logger.ErrorFormat("ƒVƒXƒeƒ€ƒGƒ‰�[�F{0}�F{1}", CommonMotions.GetMethodName(), ex.Message);
-                return false;
             }
             finally
             {
                 picDB.close(); picDB = null;
                 m_initDataLoad = bSave;
-            }
-        }
-        #endregion
 
-        #region ƒfƒtƒHƒ‹ƒg‚ÌŠúŽñ“ú�EŠú––“ú‚ð‹�‚ß‚é
-        /// <summary>
-        /// ƒfƒtƒHƒ‹ƒg‚ÌŠúŽñ“ú�EŠú––“ú‚ð‹�‚ß‚é
-        /// </summary>
-        /// <param name="dtStart"></param>
-        /// <param name="dtEnd"></param>
-        private void CreateDefaultStartAndEndDate(ref DateTime dtStart, ref DateTime dtEnd)
-        {
-            try
-            {
-                // “–ŠúŠúŽñ”NŒŽ“ú‚ðŽæ“¾
-                int iYear = 0;
-                int month = 0;
-                int day = 0;
-                bool bPeriod = false;
-                if (CommonMotions.SystemMasterData.ConstructionNoBase == (int)SystemMaster.ConstrNoBaseDef.BusinessPeriod)
-                {   // ‰c‹ÆŠú
-                    iYear = CommonMotions.PeriodCountToYear(CommonMotions.cnvInt(numUDConstPro.Value));
-                    bPeriod = true;
-                }
-                else
-                {   // �HŽ–”N“x
-                    iYear = CommonMotions.SystemMasterData.ConstrYear;
-                }
-                CommonMotions.GetNowBeginMonthDay(bPeriod, ref month, ref day);
-                dtStart = new DateTime(iYear, month, day);
-                dtEnd = dtStart.AddYears(1).AddDays(-1);     // �I—¹‚Í�{1”N�|1“ú
+                cmbConstructionPerson.SelectedIndexChanged += new EventHandler(cmbPerson_SelectedIndexChanged);
             }
-            catch (Exception ex)
-            {
-                logger.ErrorFormat("ƒVƒXƒeƒ€ƒGƒ‰�[�F{0}�F{1}", CommonMotions.GetMethodName(), ex.Message);
-            }
         }
         #endregion
 
@@ -1059,26 +968,36 @@
             IOMPersonInCharge PersonDB = new IOMPersonInCharge();
             try
             {
+                cmbDepartment.SelectedIndexChanged -= new EventHandler(cmbDepartment_SelectedIndexChanged);
+                cmbConstructionPerson.SelectedIndexChanged -= new EventHandler(cmbPerson_SelectedIndexChanged);
+
                 // ƒRƒ“ƒ{ƒ{ƒbƒNƒX‚æ‚è‘I‘ð’S“–ŽÒ‚ðŽæ“¾‚·‚é
                 int PersonCode = GetConstructionPersonCode();
-                if (PersonCode < 1) return false;
+                if (PersonCode < 1) return true;
 
+                int nTargetCount = CommonMotions.cnvInt(numUDConstPro.Value);
                 int DepartmentCode = GetDepartmentCode();
 
-                string strSQL = PersonDB.CreatePrimarykeyString(PersonCode);
+                StringBuilder strSQL = new StringBuilder();
+                CommonMotions.CreateMan2DepSQL(ref strSQL, nTargetCount, PersonCode);
+
+                ArrayList arList = new ArrayList();
+                if (!PersonDB.ExecuteReader(strSQL.ToString(), ref arList)) return false;
+                if (arList.Count < 1) return false;
+
+                object[] objRec = (object[])arList[0];
                 PersonInChargeMaster PersonRec = new PersonInChargeMaster();
-                PersonDB.SelectAction(strSQL, ref PersonRec);
+                PersonRec.PersonCode = CommonMotions.cnvInt(objRec[0]);         // ’S“–ŽÒƒR�[ƒh
+                PersonRec.PersonName = CommonMotions.cnvString(objRec[1]);      // ’S“–ŽÒ–¼
+                PersonRec.DepartmentCode = CommonMotions.cnvInt(objRec[2]);     // •”��ƒR�[ƒh
 
+                // “¯‚¶•”��‚Ì�ê�‡‚Í�ˆ—�‚µ‚È‚¢
+                if (DepartmentCode == PersonRec.DepartmentCode) return true;
+
                 // •”��ƒRƒ“ƒ{ƒ{ƒbƒNƒX‚Ö•”��ƒR�[ƒhƒZƒbƒg
-                if (PersonRec.DepartmentCode > 0 && DepartmentCode != PersonRec.DepartmentCode)
-                {
-                    bool bSave = m_initDataLoad;
-                    m_initDataLoad = true;
-                    cmbDepartment.SelectedValue = PersonRec.DepartmentCode;
-                    SetcmbPersons();    // ’S“–ŽÒƒRƒ“ƒ{ƒ{ƒbƒNƒX•Ï�X
-                    cmbConstructionPerson.SelectedValue = PersonCode;
-                    m_initDataLoad = bSave;
-                }
+                cmbDepartment.SelectedValue = PersonRec.DepartmentCode;
+                SetcmbPersons();    // ’S“–ŽÒƒRƒ“ƒ{ƒ{ƒbƒNƒX•Ï�X
+                cmbConstructionPerson.SelectedValue = PersonCode;
 
                 return true;
             }
@@ -1090,6 +1009,9 @@
             finally
             {
                 PersonDB.close(); PersonDB = null;
+
+                cmbDepartment.SelectedIndexChanged += new EventHandler(cmbDepartment_SelectedIndexChanged);
+                cmbConstructionPerson.SelectedIndexChanged += new EventHandler(cmbPerson_SelectedIndexChanged);
             }
         }
         #endregion
Index: branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/DRWork/FrmDRWork.Designer.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/DRWork/FrmDRWork.Designer.cs	(revision 329)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/DRWork/FrmDRWork.Designer.cs	(revision 330)
@@ -2546,7 +2546,7 @@
             this.cmbDepartment.Name = "cmbDepartment";
             this.cmbDepartment.Size = new System.Drawing.Size(260, 27);
             this.cmbDepartment.TabIndex = 1;
-            this.cmbDepartment.TextChanged += new System.EventHandler(this.cmbDepartment_TextChanged);
+            this.cmbDepartment.SelectedIndexChanged += new System.EventHandler(this.cmbDepartment_SelectedIndexChanged);
             this.cmbDepartment.Enter += new System.EventHandler(this.cmbDepartment_Enter);
             // 
             // cmbConstructionPerson
@@ -2560,7 +2560,7 @@
             this.cmbConstructionPerson.Name = "cmbConstructionPerson";
             this.cmbConstructionPerson.Size = new System.Drawing.Size(200, 27);
             this.cmbConstructionPerson.TabIndex = 2;
-            this.cmbConstructionPerson.TextChanged += new System.EventHandler(this.cmbConstructionPerson_TextChanged);
+            this.cmbConstructionPerson.SelectedIndexChanged += new System.EventHandler(this.cmbConstructionPerson_SelectedIndexChanged);
             this.cmbConstructionPerson.Enter += new System.EventHandler(this.cmbConstructionPerson_Enter);
             // 
             // comboBox1
Index: branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/DRWork/FrmDRWork.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/DRWork/FrmDRWork.cs	(revision 329)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/DRWork/FrmDRWork.cs	(revision 330)
@@ -504,7 +504,7 @@
         /// </summary>
         /// <param name="sender"></param>
         /// <param name="e"></param>
-        private void cmbDepartment_TextChanged(object sender, EventArgs e)
+        private void cmbDepartment_SelectedIndexChanged(object sender, EventArgs e)
         {
             if (m_bInitFlg) return;
 
@@ -552,7 +552,7 @@
         /// </summary>
         /// <param name="sender"></param>
         /// <param name="e"></param>
-        private void cmbConstructionPerson_TextChanged(object sender, EventArgs e)
+        private void cmbConstructionPerson_SelectedIndexChanged(object sender, EventArgs e)
         {
             if (m_bInitFlg) return;
 
Index: branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/DRWork/FrmDRWorkAuxiliary.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/DRWork/FrmDRWorkAuxiliary.cs	(revision 329)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/DRWork/FrmDRWorkAuxiliary.cs	(revision 330)
@@ -740,6 +740,7 @@
             IOCostDataOfPerson CostDB = new IOCostDataOfPerson();
             try
             {
+                comboBox1.SelectedIndexChanged -= new EventHandler(this.comboBox1_SelectedIndexChanged);
                 comboBox1.DataSource = null;
 
                 // å­˜åœ¨æœˆã‚’å‡ºå‹¤ãƒ‡ãƒ¼ã‚¿ã‚ˆã‚Šå�–å¾—ã�™ã‚‹
@@ -781,6 +782,7 @@
             finally
             {
                 CostDB.close(); CostDB = null;
+                comboBox1.SelectedIndexChanged += new EventHandler(this.comboBox1_SelectedIndexChanged);
             }
         }
         #endregion
@@ -966,11 +968,34 @@
         }
         #endregion
 
+        #region æŒ‡å®šå¹´æœˆã‚ˆã‚Šå¯¾è±¡æœŸãƒ»å¯¾è±¡å¹´åº¦ã‚’è¿”ã�™
+        /// <summary>
+        /// æŒ‡å®šå¹´æœˆã‚ˆã‚Šå¯¾è±¡æœŸãƒ»å¯¾è±¡å¹´åº¦ã‚’è¿”ã�™
+        /// </summary>
+        /// <returns></returns>
+        private int GetTargetCount()
+        {
+            try
+            {
+                string strSelectVal = CommonMotions.cnvString(comboBox1.SelectedValue);
+                int nTargetDateVal = CommonMotions.cnvInt(strSelectVal.Replace("/", ""));
+                int nTargetCount = CommonMotions.ConvDate2YearOrPeriod(new DateTime(nTargetDateVal / 100, nTargetDateVal % 100, 1));
+
+                return nTargetCount;
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("ã‚·ã‚¹ãƒ†ãƒ ã‚¨ãƒ©ãƒ¼ï¼š{0}ï¼š{1}", CommonMotions.GetMethodName(), ex.Message);
+                return 0;
+            }
+        }
+        #endregion
+
         #region éƒ¨ç½²ã‚³ãƒ³ãƒœãƒœãƒƒã‚¯ã‚¹ã‚’ã‚»ãƒƒãƒˆã�™ã‚‹
         /// <summary>
         /// éƒ¨ç½²ã‚³ãƒ³ãƒœãƒœãƒƒã‚¯ã‚¹ã�¸æ–‡å­—ã‚’ã‚»ãƒƒãƒˆã�™ã‚‹
         /// </summary>
-        private bool SetcmbDepartment()
+        private void SetcmbDepartment()
         {
             IOMDepartment depDB = new IOMDepartment();
             bool bSave = m_bInitFlg;
@@ -977,32 +1002,22 @@
             m_bInitFlg = true;
             try
             {
+                cmbDepartment.SelectedIndexChanged -= new EventHandler(cmbDepartment_SelectedIndexChanged);
+
                 cmbDepartment.DataSource = null;
                 cmbDepartment.Items.Clear();
                 cmbDepartment.Text = "";
 
-                string strSQL = string.Empty;
+                // å¯¾è±¡æœŸã‚’å�–å¾—ã�™ã‚‹
+                int nTargetCount = GetTargetCount();
+
                 // éƒ¨ç½²ãƒžã‚¹ã‚¿ã‚’æ¤œç´¢ã�™ã‚‹
-                strSQL = "SELECT A.DEPARTMENTCODE, A.DEPARTMENTSTRING, A.DISPLAYORDER, COUNT(*)";
-                //strSQL += " FROM DEPARTMENTMASTER A, PERSONINCHARGEMASTER B, CONSTRUCTIONBASEINFO C";
-                strSQL += " FROM DEPARTMENTMASTER A, PERSONINCHARGEMASTER B";
-                strSQL += " WHERE A.DELETEFLG = 0";
+                StringBuilder strSQL = new StringBuilder();
+                CommonMotions.CreateDepCombBoxSQL(ref strSQL, nTargetCount);
 
-                if (CommonMotions.LoginUserData.PersonCode != CommonDefine.AdminCode)
-                {
-                    // å�‚ç…§éƒ¨ç½²ãƒžã‚¹ã‚¿ã‚ˆã‚Šå�–å¾—ã�™ã‚‹
-                    strSQL += " AND A.DEPARTMENTCODE IN (SELECT A1.DEPARTMENTCODE FROM PERSONDEPARTMENTMASTER A1";
-                    strSQL += string.Format(" WHERE A1.PERSONCODE = {0})", CommonMotions.LoginUserData.PersonCode);
-                }
-
-                strSQL += " AND A.DEPARTMENTCODE = B.DEPARTMENTCODE";
-                //strSQL += " AND B.PERSONCODE = C.CONSTRUCTIONPERSONCODE";
-                strSQL += " GROUP BY A.DEPARTMENTCODE, A.DEPARTMENTSTRING, A.DISPLAYORDER";
-                strSQL += " ORDER BY A.DISPLAYORDER ASC";
-
                 // éƒ¨ç½²ãƒžã‚¹ã‚¿èª­è¾¼
                 ArrayList arList = new ArrayList();
-                if (!depDB.ExecuteReader(strSQL, ref arList)) return false;
+                if (!depDB.ExecuteReader(strSQL.ToString(), ref arList)) return;
 
                 List<KeyValuePair<int, string>> ConstructionDataList = new List<KeyValuePair<int, string>>();
                 ConstructionDataList.Add(new KeyValuePair<int, string>(0, ""));
@@ -1018,17 +1033,16 @@
                 // ã‚³ãƒ³ãƒœãƒœãƒƒã‚¯ã‚¹åˆ�æœŸè¡¨ç¤º
                 ComboBoxAction.InitDataSetCombBox(cmbDepartment, ConstructionDataList);
 
-                return true;
             }
             catch (Exception ex)
             {
                 logger.ErrorFormat("ã‚·ã‚¹ãƒ†ãƒ ã‚¨ãƒ©ãƒ¼ï¼š{0}ï¼š{1}", CommonMotions.GetMethodName(), ex.Message);
-                return false;
             }
             finally
             {
                 depDB.close(); depDB = null;
                 m_bInitFlg = bSave;
+                cmbDepartment.SelectedIndexChanged += new EventHandler(cmbDepartment_SelectedIndexChanged);
             }
         }
         #endregion
@@ -1048,23 +1062,24 @@
                 cmbConstructionPerson.Items.Clear();
                 cmbConstructionPerson.Text = "";
 
-                List<PersonInChargeMaster> workList = new List<PersonInChargeMaster>();
-                string strSQL = string.Empty;
+                // å¯¾è±¡æœŸã‚’å�–å¾—ã�™ã‚‹
+                int nTargetCount = GetTargetCount();
                 int DepartmentCode = GetDepartmentCode();
-                if (DepartmentCode == 0)
-                    strSQL = " WHERE DeleteFlg = 0 Order By EmployeeClassFlg ASC, DisplayOrder ASC";
-                else
-                    strSQL = string.Format(" WHERE DEPARTMENTCODE = {0} AND DeleteFlg = 0 Order By EmployeeClassFlg ASC, DisplayOrder ASC", DepartmentCode);
+                StringBuilder strSQL = new StringBuilder();
+                CommonMotions.CreateManCombBoxSQL(ref strSQL, nTargetCount, DepartmentCode);
 
                 // æ‹…å½“è€…ãƒžã‚¹ã‚¿èª­è¾¼
-                if (!picDB.SelectAction(strSQL, ref workList)) return;
+                ArrayList workList = new ArrayList();
+                if (!picDB.ExecuteReader(strSQL.ToString(), ref workList)) return;
 
                 List<KeyValuePair<int, string>> ConstructionDataList = new List<KeyValuePair<int, string>>();
                 ConstructionDataList.Add(new KeyValuePair<int, string>(0, ""));
 
-                foreach (PersonInChargeMaster work in workList)
+                PersonInChargeMaster workRec = new PersonInChargeMaster();
+                foreach (object[] work in workList)
                 {
-                    KeyValuePair<int, string> keyval = new KeyValuePair<int, string>(work.PersonCode, work.PersonName);
+                    picDB.Reader2Struct(work, ref workRec);
+                    KeyValuePair<int, string> keyval = new KeyValuePair<int, string>(workRec.PersonCode, workRec.PersonName);
 
                     ConstructionDataList.Add(keyval);
                 }
Index: branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/DepExpenssList/FrmDepExpenssList.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/DepExpenssList/FrmDepExpenssList.cs	(revision 329)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/DepExpenssList/FrmDepExpenssList.cs	(revision 330)
@@ -296,9 +296,6 @@
             // ƒOƒŠƒbƒh�‰Šú�Ý’è
             SetDisplayObject();
 
-            // ƒRƒ“ƒ{ƒ{ƒbƒNƒX“™ƒCƒxƒ“ƒgƒZƒbƒg
-            SetControlEvent();
-
             // �‰Šú•\Ž¦
             InitDataLoad();
 
@@ -306,24 +303,6 @@
         }
         #endregion
 
-        #region ƒRƒ“ƒ{ƒ{ƒbƒNƒX“™ƒCƒxƒ“ƒgƒZƒbƒg
-        /// <summary>
-        /// ƒRƒ“ƒ{ƒ{ƒbƒNƒX“™ƒCƒxƒ“ƒgƒZƒbƒg
-        /// </summary>
-        private void SetControlEvent()
-        {
-            try
-            {
-                numUDConstPro.ValueChanged += new System.EventHandler(numUDConstPro_ValueChanged);
-                cmbDepartment.SelectedIndexChanged += new System.EventHandler(cmbDepartment_SelectedIndexChanged);
-            }
-            catch (Exception ex)
-            {
-                logger.ErrorFormat("ƒVƒXƒeƒ€ƒGƒ‰�[�F{0}�F{1}", CommonMotions.GetMethodName(), ex.Message);
-            }
-        }
-        #endregion
-
         #region ƒZƒ‹ƒ_ƒuƒ‹ƒNƒŠƒbƒN
         /// <summary>
         /// ƒZƒ‹ƒ_ƒuƒ‹ƒNƒŠƒbƒN
@@ -514,6 +493,10 @@
         private void numUDConstPro_ValueChanged(object sender, EventArgs e)
         {
             if (m_initDataLoad) return;
+
+            // •”��ƒRƒ“ƒ{ƒ{ƒbƒNƒX•Ï�X
+            SetcmbDepartment();
+
             // ƒf�[ƒ^•\Ž¦
             DataDisplay();
         }
@@ -528,6 +511,7 @@
         private void cmbDepartment_SelectedIndexChanged(object sender, EventArgs e)
         {
             if (m_initDataLoad) return;
+
             // ƒf�[ƒ^•\Ž¦
             DataDisplay();
         }
Index: branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/DepExpenssList/FrmDepExpenssList.designer.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/DepExpenssList/FrmDepExpenssList.designer.cs	(revision 329)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/DepExpenssList/FrmDepExpenssList.designer.cs	(revision 330)
@@ -780,6 +780,7 @@
             this.cmbDepartment.Name = "cmbDepartment";
             this.cmbDepartment.Size = new System.Drawing.Size(200, 23);
             this.cmbDepartment.TabIndex = 41;
+            this.cmbDepartment.SelectedIndexChanged += new System.EventHandler(this.cmbDepartment_SelectedIndexChanged);
             // 
             // label5
             // 
@@ -818,6 +819,7 @@
             this.numUDConstPro.Size = new System.Drawing.Size(80, 23);
             this.numUDConstPro.TabIndex = 0;
             this.numUDConstPro.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
+            this.numUDConstPro.ValueChanged += new System.EventHandler(this.numUDConstPro_ValueChanged);
             // 
             // label4
             // 
Index: branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/DepExpenssList/FrmDepExpenssListAuxiliary.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/DepExpenssList/FrmDepExpenssListAuxiliary.cs	(revision 329)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/DepExpenssList/FrmDepExpenssListAuxiliary.cs	(revision 330)
@@ -471,22 +471,16 @@
             IOMDepartment depDB = new IOMDepartment();
             try
             {
-                m_initDataLoad = true;
+                cmbDepartment.SelectedIndexChanged -= new EventHandler(cmbDepartment_SelectedIndexChanged);
 
                 cmbDepartment.DataSource = null;
                 cmbDepartment.Items.Clear();
                 cmbDepartment.Text = "";
 
+                int nTargetCount = CommonMotions.cnvInt(numUDConstPro.Value);
+                // •”��ƒ}ƒXƒ^‚ðŒŸ�õ‚·‚é
                 StringBuilder strSQL = new StringBuilder();
-                // •”��ƒ}ƒXƒ^‚ðŒŸ�õ‚·‚é
-                strSQL.Append("SELECT A.DEPARTMENTCODE, A.DEPARTMENTSTRING, A.DISPLAYORDER, COUNT(*)");
-                strSQL.Append(" FROM DEPARTMENTMASTER A, PERSONINCHARGEMASTER B, CONSTRUCTIONBASEINFO C , CONSTRUCTIONLEDGERDETAIL D");
-                strSQL.Append(" WHERE A.DELETEFLG = 0");
-                strSQL.Append(" AND A.DEPARTMENTCODE = B.DEPARTMENTCODE");
-                strSQL.Append(" AND B.PERSONCODE = C.CONSTRUCTIONPERSONCODE");
-                strSQL.Append(" AND D.CONSTRUCTIONCODE = C.CONSTRUCTIONCODE");
-                strSQL.Append(" GROUP BY A.DEPARTMENTCODE, A.DEPARTMENTSTRING, A.DISPLAYORDER");
-                strSQL.Append(" ORDER BY A.DISPLAYORDER ASC");
+                CommonMotions.CreateDepCombBoxSQL(ref strSQL, nTargetCount);
 
                 // •”��ƒ}ƒXƒ^“Ç�ž
                 ArrayList arList = new ArrayList();
@@ -516,7 +510,8 @@
             finally
             {
                 depDB.close(); depDB = null;
-                m_initDataLoad = false;
+
+                cmbDepartment.SelectedIndexChanged += new EventHandler(cmbDepartment_SelectedIndexChanged);
             }
         }
         #endregion
@@ -530,9 +525,6 @@
         {
             try
             {
-                // •\Ž¦‚³‚ê‚Ä‚¢‚È‚¢�ê�‡‚Í‘I‘ð–³
-                //if (!cmbDepartment.Visible) return 0;
-
                 return CommonMotions.cnvInt(cmbDepartment.SelectedValue);
             }
             catch (Exception ex)
@@ -1022,9 +1014,9 @@
                 // ‘¶�Ý�Ú�×‘ä’ ƒf�[ƒ^ŒŸ�õ
                 strSQL.Append("SELECT");
 
-                strSQL.Append(" C.DEPARTMENTCODE");
-                strSQL.Append(", D.DEPARTMENTSTRING");
-                strSQL.Append(", D.DISPLAYORDER");
+                strSQL.Append(" B.ConstrDepCode");
+                strSQL.Append(", E.DetailString");
+                strSQL.Append(", D.DISPLAYORDER AS DISPLAYORDER");
                 strSQL.Append(", SUM(A.ORDERSDECISIONPRICE)");
                 strSQL.Append(", SUM(A.COMPANYEXPENSES)");
                 strSQL.Append(", SUM(A.DEPARTMENTEXPENSES)");
@@ -1035,17 +1027,19 @@
 
                 strSQL.Append(" FROM PERSONINCHARGEMASTER C");
                 strSQL.Append(" LEFT JOIN CONSTRUCTIONBASEINFO B");
-                strSQL.Append(" ON B.CONSTRUCTIONPERSONCODE = C.PERSONCODE");
+                strSQL.Append("      ON B.CONSTRUCTIONPERSONCODE = C.PERSONCODE");
                 strSQL.AppendFormat(" AND B.CONSTRUCTIONPERIOD = {0}", numUDConstPro.Value);
                 strSQL.AppendFormat(" AND B.CONSTRUCTIONSTATUSFLG != {0}", NotOrder);
                 strSQL.AppendFormat(" AND B.TyingFlg != {0}", (int)ConstructionBaseInfo.TyingFlgDef.Tying);
-                strSQL.AppendFormat(" AND B.JoinFlg != {0}", (int)ConstructionBaseInfo.JoinFlgDef.JoinChildren);
+                strSQL.Append(" LEFT JOIN constructionbaseinfodetail AS E");
+                strSQL.Append("       On E.ConstructionCode = B.ConstructionCode");
+                strSQL.AppendFormat(" And E.DetailNo = {0}",(int)ConstructionBaseInfoDetail.DataNoDef.ConstrDepartmentName);
                 strSQL.Append(" LEFT JOIN CONSTRUCTIONLEDGER A ON A.CONSTRUCTIONCODE = B.CONSTRUCTIONCODE");
                 strSQL.Append(", DEPARTMENTMASTER D");
-                strSQL.Append(" Where C.DEPARTMENTCODE = D.DEPARTMENTCODE");
+                strSQL.Append(" WHERE D.DEPARTMENTCODE = B.ConstrDepCode");
 
-                strSQL.Append(" GROUP BY  C.DEPARTMENTCODE, D.DEPARTMENTSTRING, D.DISPLAYORDER");
-                strSQL.Append(" ORDER BY 3 ASC");
+                strSQL.Append(" GROUP BY  C.DEPARTMENTCODE, E.DetailString, D.DISPLAYORDER");
+                strSQL.Append(" ORDER BY DISPLAYORDER ASC");
             }
             catch (Exception ex)
             {
@@ -1089,7 +1083,7 @@
 
                 strSQL.Append(" C.PERSONCODE");
                 strSQL.Append(" ,C.PERSONNAME");
-                strSQL.Append(" ,C.DISPLAYORDER");
+                strSQL.Append(" ,C.DISPLAYORDER AS DISPLAYORDER");
                 strSQL.Append(" ,SUM(A.ORDERSDECISIONPRICE)");
                 strSQL.Append(" ,SUM(A.COMPANYEXPENSES)");
                 strSQL.Append(" ,SUM(A.DEPARTMENTEXPENSES)");
@@ -1097,16 +1091,21 @@
                 strSQL.Append(" ,SUM(A.TOTALPAYMENT)");
                 strSQL.Append(" ,SUM(A.GROSSPROFIT)");
                 strSQL.Append(" ,SUM(A.NETPROFIT)");
-                strSQL.Append(" ,C.EMPLOYEECLASSFLG");
+                strSQL.Append(" ,C.EMPLOYEECLASSFLG AS EMPLOYEECLASSFLG");
 
                 strSQL.Append(" FROM PERSONINCHARGEMASTER C");
-                strSQL.Append(" LEFT JOIN CONSTRUCTIONBASEINFO B ON B.CONSTRUCTIONPERSONCODE = C.PERSONCODE");
+                strSQL.Append(" LEFT JOIN CONSTRUCTIONBASEINFO B");
+                strSQL.Append("      ON B.CONSTRUCTIONPERSONCODE = C.PERSONCODE");
                 strSQL.AppendFormat(" AND B.CONSTRUCTIONPERIOD = {0}", numUDConstPro.Value);
                 strSQL.AppendFormat(" AND B.CONSTRUCTIONSTATUSFLG != {0}", NotOrder);
                 strSQL.AppendFormat(" AND B.TyingFlg != {0}", (int)ConstructionBaseInfo.TyingFlgDef.Tying);
                 strSQL.AppendFormat(" AND B.JoinFlg != {0}", (int)ConstructionBaseInfo.JoinFlgDef.JoinChildren);
-                strSQL.Append(" LEFT JOIN CONSTRUCTIONLEDGER A ON A.CONSTRUCTIONCODE = B.CONSTRUCTIONCODE");
-                strSQL.AppendFormat(" WHERE C.DEPARTMENTCODE = {0}", DepCode);
+                strSQL.Append(" LEFT JOIN constructionbaseinfodetail AS E");
+                strSQL.Append("       On E.ConstructionCode = B.ConstructionCode");
+                strSQL.AppendFormat(" And E.DetailNo = {0}", (int)ConstructionBaseInfoDetail.DataNoDef.ConstrDepartmentName);
+                strSQL.Append(" LEFT JOIN CONSTRUCTIONLEDGER A");
+                strSQL.Append("      ON A.CONSTRUCTIONCODE = B.CONSTRUCTIONCODE");
+                strSQL.AppendFormat(" WHERE C.DepartmentCode = {0}", DepCode);
                 
                 if (bDelFlg)
                     strSQL.Append(" AND C.DELETEFLG = 0");
@@ -1114,7 +1113,7 @@
                     strSQL.Append(" AND C.DELETEFLG != 0");
 
                 strSQL.Append(" GROUP BY C.DISPLAYORDER, C.PERSONCODE, C.PERSONNAME, C.EMPLOYEECLASSFLG");
-                strSQL.Append(" ORDER BY 11, 3 ASC");
+                strSQL.Append(" ORDER BY EMPLOYEECLASSFLG ASC, DISPLAYORDER ASC");
 
             }
             catch (Exception ex)
Index: branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/EstimateInput/FrmEstimateInputAuxiliary.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/EstimateInput/FrmEstimateInputAuxiliary.cs	(revision 329)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/EstimateInput/FrmEstimateInputAuxiliary.cs	(revision 330)
@@ -1801,7 +1801,7 @@
                     btnApproval.Text = CommonDefine.ApprovalButtonString[1];
                     btnApproval.ForeColor = Color.Black;
                     // æ‰¿èª�æ¸ˆã�¿ã�®å ´å�ˆã�¯å…¥åŠ›ã�§ã��ã�ªã�„
-                    EstimaiteInputReadOnly();
+                    EstimaiteInputReadOnly(false);
                     // æ‰¿èª�æ¸ˆã�¿ãƒ•ãƒ©ã‚°ON
                     m_ApprovalFlag = true;
                 }
@@ -1822,7 +1822,7 @@
         /// <summary>
         /// äºˆç®—å…¥åŠ›ã‚’å¤‰æ›´ç¦�æ­¢ã�«ã�™ã‚‹
         /// </summary>
-        private void EstimaiteInputReadOnly()
+        private void EstimaiteInputReadOnly(bool bRef = true)
         {
             try
             {
@@ -1842,7 +1842,7 @@
                 btnDispUp.Visible = false;                          // è¡Œã‚¢ãƒƒãƒ—ãƒœã‚¿ãƒ³
                 btnDispDown.Visible = false;                        // è¡Œãƒ€ã‚¦ãƒ³ãƒœã‚¿ãƒ³
                 btnMasterIn.Visible = false;                        // å°�é …ç›®ãƒžã‚¹ã‚¿è¿½åŠ ãƒœã‚¿ãƒ³
-                btnRequestPrint.Visible = false;                    // è¦‹ç©�ä¾�é ¼å�°åˆ·ãƒœã‚¿ãƒ³
+                if(bRef) btnRequestPrint.Visible = false;           // è¦‹ç©�ä¾�é ¼å�°åˆ·ãƒœã‚¿ãƒ³
 
                 TabCollections.DrawButton = false;                  // ã‚¿ãƒ–é–‰ã�˜ã‚‹ãƒœã‚¿ãƒ³é�žè¡¨ç¤º
             }
Index: branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Material/ConstrMATLList/FrmConstrMATLList.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Material/ConstrMATLList/FrmConstrMATLList.cs	(revision 329)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Material/ConstrMATLList/FrmConstrMATLList.cs	(revision 330)
@@ -273,13 +273,10 @@
         {
             if (m_initDataLoad) return;
 
-            // ƒRƒ“ƒ{ƒ{ƒbƒNƒXƒZƒbƒg
-            int DepCode = CommonMotions.cnvInt(cmbDepartment.SelectedValue);
-            int PerCode = CommonMotions.cnvInt(cmbConstructionPerson.SelectedValue);
+            // •”��ƒRƒ“ƒ{ƒ{ƒbƒNƒX•Ï�X
             SetcmbDepartment();
+            // ’S“–ŽÒƒRƒ“ƒ{ƒ{ƒbƒNƒX•Ï�X
             SetcmbPersons();
-            cmbDepartment.SelectedValue = DepCode;
-            cmbConstructionPerson.SelectedValue = PerCode;
 
             // ƒf�[ƒ^•\Ž¦
             DataDisplay();
@@ -292,7 +289,7 @@
         /// </summary>
         /// <param name="sender"></param>
         /// <param name="e"></param>
-        private void cmbDepartment_TextChanged(object sender, EventArgs e)
+        private void cmbDepartment_SelectedIndexChanged(object sender, EventArgs e)
         {
             if (m_initDataLoad) return;
 
@@ -310,12 +307,12 @@
         /// </summary>
         /// <param name="sender"></param>
         /// <param name="e"></param>
-        private void cmbConstructionPerson_TextChanged(object sender, EventArgs e)
+        private void cmbConstructionPerson_SelectedIndexChanged(object sender, EventArgs e)
         {
             if (m_initDataLoad) return;
 
             // ’S“–ŽÒ‘I‘ðŽž•”��‘I‘ð‚ð�Ý’è‚·‚é
-            SetPerosonToDepartment();
+            if (!SetPerosonToDepartment()) return;
 
             // ƒf�[ƒ^•\Ž¦
             DataDisplay();
Index: branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Material/ConstrMATLList/FrmConstrMATLList.designer.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Material/ConstrMATLList/FrmConstrMATLList.designer.cs	(revision 329)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Material/ConstrMATLList/FrmConstrMATLList.designer.cs	(revision 330)
@@ -225,7 +225,7 @@
             this.cmbConstructionPerson.Name = "cmbConstructionPerson";
             this.cmbConstructionPerson.Size = new System.Drawing.Size(200, 23);
             this.cmbConstructionPerson.TabIndex = 2;
-            this.cmbConstructionPerson.TextChanged += new System.EventHandler(this.cmbConstructionPerson_TextChanged);
+            this.cmbConstructionPerson.SelectedIndexChanged += new System.EventHandler(this.cmbConstructionPerson_SelectedIndexChanged);
             // 
             // cmbDepartment
             // 
@@ -237,7 +237,7 @@
             this.cmbDepartment.Name = "cmbDepartment";
             this.cmbDepartment.Size = new System.Drawing.Size(200, 23);
             this.cmbDepartment.TabIndex = 1;
-            this.cmbDepartment.TextChanged += new System.EventHandler(this.cmbDepartment_TextChanged);
+            this.cmbDepartment.SelectedIndexChanged += new System.EventHandler(this.cmbDepartment_SelectedIndexChanged);
             // 
             // label2
             // 
Index: branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Material/ConstrMATLList/FrmConstrMATLListAuxiliary.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Material/ConstrMATLList/FrmConstrMATLListAuxiliary.cs	(revision 329)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Material/ConstrMATLList/FrmConstrMATLListAuxiliary.cs	(revision 330)
@@ -300,22 +300,59 @@
 
                     strSQL.Append(" FROM CONSTRUCTIONBASEINFO A");
 
-                    strSQL.Append(" LEFT JOIN (SELECT CA.CONSTRUCTIONCODE, CA.SALESPERSONCODE PERSONCODE, CB.PERSONNAME PERSONNAME,");
-                    strSQL.Append(" CB.DEPARTMENTCODE DEPARTMENTCODE, CC.DEPARTMENTSTRING DEPARTMENTNAME,");
-                    strSQL.Append(" CB.DISPLAYORDER MANDISPORDER, CC.DISPLAYORDER DEPDISPORDER");
-                    strSQL.Append(" FROM CONSTRUCTIONBASEINFO CA");
-                    strSQL.Append(" LEFT JOIN PERSONINCHARGEMASTER CB ON CA.SALESPERSONCODE = CB.PERSONCODE");
-                    strSQL.Append(" LEFT JOIN DEPARTMENTMASTER CC ON CB.DEPARTMENTCODE = CC.DEPARTMENTCODE");
-                    strSQL.AppendFormat(" WHERE CA.CONSTRUCTIONPERIOD = {0}) C ON A.CONSTRUCTIONCODE = C.CONSTRUCTIONCODE", numUDConstPro.Value);
+                    strSQL.Append(" LEFT JOIN(");
+                    strSQL.Append(" SELECT");
+                    strSQL.Append(" CA.CONSTRUCTIONCODE");
+                    strSQL.Append("     , CA.SALESPERSONCODE As PERSONCODE");
+                    strSQL.Append("     , CB.PERSONNAME As PERSONNAME");
+                    strSQL.Append("     , ifnull(CA.SalesDepCode, 0) As DEPARTMENTCODE");
+                    strSQL.Append(" , ifnull(CD.DetailString, '') As DEPARTMENTNAME");
+                    strSQL.Append(" , ifnull(CB.DISPLAYORDER, 99999) As MANDISPORDER");
+                    strSQL.Append(" , ifnull(CC.DISPLAYORDER, 99999) As DEPDISPORDER");
+                    strSQL.Append(" FROM");
+                    strSQL.Append(" CONSTRUCTIONBASEINFO CA");
+                    strSQL.Append(" LEFT JOIN PERSONINCHARGEMASTER CB");
+                    strSQL.Append(" ON CA.SALESPERSONCODE = CB.PERSONCODE");
+                    strSQL.Append(" LEFT JOIN DEPARTMENTMASTER CC");
+                    strSQL.Append(" ON CA.SalesDepCode = CC.DEPARTMENTCODE");
+                    strSQL.Append(" LEFT JOIN constructionbaseinfodetail As CD");
+                    strSQL.Append(" ON CD.ConstructionCode = CA.ConstructionCode");
+                    strSQL.AppendFormat(" And CD.DetailNo = {0}",(int)ConstructionBaseInfoDetail.DataNoDef.SalesDepartmentName);
+                    strSQL.Append(" WHERE");
+                    strSQL.AppendFormat(" CA.CONSTRUCTIONPERIOD = {0}", numUDConstPro.Value);
+                    strSQL.Append(" ) C");
+                    strSQL.Append(" ON A.CONSTRUCTIONCODE = C.CONSTRUCTIONCODE");
+                    strSQL.Append(" LEFT JOIN(");
+                    strSQL.Append(" SELECT");
+                    strSQL.Append(" DA.CONSTRUCTIONCODE");
+                    strSQL.Append(" , DA.CONSTRUCTIONPERSONCODE PERSONCODE");
+                    strSQL.Append(" , DB.PERSONNAME PERSONNAME");
+                    strSQL.Append(" , ifnull(DA.ConstrDepCode, 0) As DEPARTMENTCODE");
+                    strSQL.Append(" , ifnull(DD.DetailString, '') As DEPARTMENTNAME");
+                    strSQL.Append(" , ifnull(DB.DISPLAYORDER, 99999) As MANDISPORDER");
+                    strSQL.Append(" , ifnull(DC.DISPLAYORDER, 99999) As DEPDISPORDER");
+                    strSQL.Append(" FROM");
+                    strSQL.Append(" CONSTRUCTIONBASEINFO DA");
+                    strSQL.Append(" LEFT JOIN PERSONINCHARGEMASTER DB");
+                    strSQL.Append(" ON DB.PERSONCODE IN(");
+                    strSQL.Append(" DA.CONSTRUCTIONPERSONCODE");
+                    strSQL.Append(" , DA.ConstrSubPersonCode");
+                    strSQL.Append(" , DA.ConstructionInstructor");
+                    strSQL.Append(" )");
+                    strSQL.Append(" LEFT JOIN DEPARTMENTMASTER DC");
+                    strSQL.Append(" ON DC.DEPARTMENTCODE IN(");
+                    strSQL.Append(" DA.ConstrDepCode");
+                    strSQL.Append(" , DA.ConstrSubDepCode");
+                    strSQL.Append(" , DA.ConstrInstrDepCode");
+                    strSQL.Append(" )");
+                    strSQL.Append(" LEFT JOIN constructionbaseinfodetail As DD");
+                    strSQL.Append(" ON DD.ConstructionCode = DA.ConstructionCode");
+                    strSQL.AppendFormat(" And DD.DetailNo = {0}",(int)ConstructionBaseInfoDetail.DataNoDef.ConstrDepartmentName);
+                    strSQL.Append(" WHERE");
+                    strSQL.AppendFormat(" DA.CONSTRUCTIONPERIOD = {0}", numUDConstPro.Value);
+                    strSQL.Append(" ) D");
+                    strSQL.Append(" ON A.CONSTRUCTIONCODE = D.CONSTRUCTIONCODE");
 
-                    strSQL.Append(" LEFT JOIN (SELECT DA.CONSTRUCTIONCODE, DA.CONSTRUCTIONPERSONCODE PERSONCODE, DB.PERSONNAME PERSONNAME,");
-                    strSQL.Append(" DB.DEPARTMENTCODE DEPARTMENTCODE, DC.DEPARTMENTSTRING DEPARTMENTNAME,");
-                    strSQL.Append(" DB.DISPLAYORDER MANDISPORDER, DC.DISPLAYORDER DEPDISPORDER");
-                    strSQL.Append(" FROM CONSTRUCTIONBASEINFO DA");
-                    strSQL.Append(" LEFT JOIN PERSONINCHARGEMASTER DB ON DA.CONSTRUCTIONPERSONCODE = DB.PERSONCODE");
-                    strSQL.Append(" LEFT JOIN DEPARTMENTMASTER DC ON DB.DEPARTMENTCODE = DC.DEPARTMENTCODE");
-
-                    strSQL.AppendFormat(" WHERE DA.CONSTRUCTIONPERIOD = {0}) D ON A.CONSTRUCTIONCODE = D.CONSTRUCTIONCODE", numUDConstPro.Value);
                     switch (i)
                     {
                         case 0:
@@ -397,21 +434,59 @@
                 strSQL.Append(" ON A.CONSTRUCTIONCODE = B.CONSTRUCTIONCODE");
                 strSQL.AppendFormat(" AND B.DETAILNO = {0}", (int)ConstructionBaseInfoDetail.DataNoDef.ConstructionName);
 
-                strSQL.Append(" LEFT JOIN (SELECT CA.CONSTRUCTIONCODE, CA.SALESPERSONCODE PERSONCODE, CB.PERSONNAME PERSONNAME,");
-                strSQL.Append(" CB.DEPARTMENTCODE DEPARTMENTCODE, CC.DEPARTMENTSTRING DEPARTMENTNAME,");
-                strSQL.Append(" CB.DISPLAYORDER MANDISPORDER, CC.DISPLAYORDER DEPDISPORDER");
-                strSQL.Append(" FROM CONSTRUCTIONBASEINFO CA");
-                strSQL.Append(" LEFT JOIN PERSONINCHARGEMASTER CB ON CA.SALESPERSONCODE = CB.PERSONCODE");
-                strSQL.Append(" LEFT JOIN DEPARTMENTMASTER CC ON CB.DEPARTMENTCODE = CC.DEPARTMENTCODE");
-                strSQL.AppendFormat(" WHERE CA.CONSTRUCTIONPERIOD = {0}) C ON A.CONSTRUCTIONCODE = C.CONSTRUCTIONCODE", numUDConstPro.Value);
+                strSQL.Append(" LEFT JOIN(");
+                strSQL.Append(" SELECT");
+                strSQL.Append(" CA.CONSTRUCTIONCODE");
+                strSQL.Append("     , CA.SALESPERSONCODE As PERSONCODE");
+                strSQL.Append("     , CB.PERSONNAME As PERSONNAME");
+                strSQL.Append("     , ifnull(CA.SalesDepCode, 0) As DEPARTMENTCODE");
+                strSQL.Append(" , ifnull(CD.DetailString, '') As DEPARTMENTNAME");
+                strSQL.Append(" , ifnull(CB.DISPLAYORDER, 99999) As MANDISPORDER");
+                strSQL.Append(" , ifnull(CC.DISPLAYORDER, 99999) As DEPDISPORDER");
+                strSQL.Append(" FROM");
+                strSQL.Append(" CONSTRUCTIONBASEINFO CA");
+                strSQL.Append(" LEFT JOIN PERSONINCHARGEMASTER CB");
+                strSQL.Append(" ON CA.SALESPERSONCODE = CB.PERSONCODE");
+                strSQL.Append(" LEFT JOIN DEPARTMENTMASTER CC");
+                strSQL.Append(" ON CA.SalesDepCode = CC.DEPARTMENTCODE");
+                strSQL.Append(" LEFT JOIN constructionbaseinfodetail As CD");
+                strSQL.Append(" ON CD.ConstructionCode = CA.ConstructionCode");
+                strSQL.AppendFormat(" And CD.DetailNo = {0}", (int)ConstructionBaseInfoDetail.DataNoDef.SalesDepartmentName);
+                strSQL.Append(" WHERE");
+                strSQL.AppendFormat(" CA.CONSTRUCTIONPERIOD = {0}", numUDConstPro.Value);
+                strSQL.Append(" ) C");
+                strSQL.Append(" ON A.CONSTRUCTIONCODE = C.CONSTRUCTIONCODE");
+                strSQL.Append(" LEFT JOIN(");
+                strSQL.Append(" SELECT");
+                strSQL.Append(" DA.CONSTRUCTIONCODE");
+                strSQL.Append(" , DA.CONSTRUCTIONPERSONCODE PERSONCODE");
+                strSQL.Append(" , DB.PERSONNAME PERSONNAME");
+                strSQL.Append(" , ifnull(DA.ConstrDepCode, 0) As DEPARTMENTCODE");
+                strSQL.Append(" , ifnull(DD.DetailString, '') As DEPARTMENTNAME");
+                strSQL.Append(" , ifnull(DB.DISPLAYORDER, 99999) As MANDISPORDER");
+                strSQL.Append(" , ifnull(DC.DISPLAYORDER, 99999) As DEPDISPORDER");
+                strSQL.Append(" FROM");
+                strSQL.Append(" CONSTRUCTIONBASEINFO DA");
+                strSQL.Append(" LEFT JOIN PERSONINCHARGEMASTER DB");
+                strSQL.Append(" ON DB.PERSONCODE IN(");
+                strSQL.Append(" DA.CONSTRUCTIONPERSONCODE");
+                strSQL.Append(" , DA.ConstrSubPersonCode");
+                strSQL.Append(" , DA.ConstructionInstructor");
+                strSQL.Append(" )");
+                strSQL.Append(" LEFT JOIN DEPARTMENTMASTER DC");
+                strSQL.Append(" ON DC.DEPARTMENTCODE IN(");
+                strSQL.Append(" DA.ConstrDepCode");
+                strSQL.Append(" , DA.ConstrSubDepCode");
+                strSQL.Append(" , DA.ConstrInstrDepCode");
+                strSQL.Append(" )");
+                strSQL.Append(" LEFT JOIN constructionbaseinfodetail As DD");
+                strSQL.Append(" ON DD.ConstructionCode = DA.ConstructionCode");
+                strSQL.AppendFormat(" And DD.DetailNo = {0}", (int)ConstructionBaseInfoDetail.DataNoDef.ConstrDepartmentName);
+                strSQL.Append(" WHERE");
+                strSQL.AppendFormat(" DA.CONSTRUCTIONPERIOD = {0}", numUDConstPro.Value);
+                strSQL.Append(" ) D");
+                strSQL.Append(" ON A.CONSTRUCTIONCODE = D.CONSTRUCTIONCODE");
 
-                strSQL.Append(" LEFT JOIN (SELECT DA.CONSTRUCTIONCODE, DA.CONSTRUCTIONPERSONCODE PERSONCODE, DB.PERSONNAME PERSONNAME,");
-                strSQL.Append(" DB.DEPARTMENTCODE DEPARTMENTCODE, DC.DEPARTMENTSTRING DEPARTMENTNAME,");
-                strSQL.Append(" DB.DISPLAYORDER MANDISPORDER, DC.DISPLAYORDER DEPDISPORDER");
-                strSQL.Append(" FROM CONSTRUCTIONBASEINFO DA");
-                strSQL.Append(" LEFT JOIN PERSONINCHARGEMASTER DB ON DA.CONSTRUCTIONPERSONCODE = DB.PERSONCODE");
-                strSQL.Append(" LEFT JOIN DEPARTMENTMASTER DC ON DB.DEPARTMENTCODE = DC.DEPARTMENTCODE");
-                strSQL.AppendFormat(" WHERE DA.CONSTRUCTIONPERIOD = {0}) D ON A.CONSTRUCTIONCODE = D.CONSTRUCTIONCODE", numUDConstPro.Value);
                 strSQL.Append(", (SELECT EX.CONSTRUCTIONCODE, MIN(EX.COMPLETEFLG) AS COMPLETEFLG  FROM CONSTRUCTIONMATERIALINFO AS EX Group by EX.CONSTRUCTIONCODE) AS E");
                 strSQL.AppendFormat(" WHERE A.CONSTRUCTIONPERIOD = {0}", numUDConstPro.Value);
                 strSQL.AppendFormat(" AND A.TYINGFLG != {0}", (int)ConstructionBaseInfo.TyingFlgDef.Tying);
@@ -970,29 +1045,17 @@
             m_initDataLoad = true;
             try
             {
+                cmbDepartment.SelectedIndexChanged -= new EventHandler(cmbDepartment_SelectedIndexChanged);
 
                 cmbDepartment.DataSource = null;
                 cmbDepartment.Items.Clear();
                 cmbDepartment.Text = "";
 
+                int nTargetCount = CommonMotions.cnvInt(numUDConstPro.Value);
+                // •”��ƒ}ƒXƒ^‚ðŒŸ�õ‚·‚é
                 StringBuilder strSQL = new StringBuilder();
-                // •”��ƒ}ƒXƒ^‚ðŒŸ�õ‚·‚é
-                strSQL.Append("SELECT A.DEPARTMENTCODE, A.DEPARTMENTSTRING, A.DISPLAYORDER, COUNT(*)");
-                strSQL.Append(" FROM DEPARTMENTMASTER A, PERSONINCHARGEMASTER B, CONSTRUCTIONBASEINFO C");
-                strSQL.Append(" WHERE A.DELETEFLG = 0");
+                CommonMotions.CreateDepCombBoxSQL(ref strSQL, nTargetCount);
 
-                if (CommonMotions.LoginUserData.PersonCode != CommonDefine.AdminCode)
-                {
-                    // ŽQ�Æ•”��ƒ}ƒXƒ^‚æ‚èŽæ“¾‚·‚é
-                    strSQL.Append(" AND A.DEPARTMENTCODE IN (SELECT A1.DEPARTMENTCODE FROM PERSONDEPARTMENTMASTER A1");
-                    strSQL.AppendFormat(" WHERE A1.PERSONCODE = {0})", CommonMotions.LoginUserData.PersonCode);
-                }
-
-                strSQL.Append(" AND A.DEPARTMENTCODE = B.DEPARTMENTCODE");
-                strSQL.Append(" AND B.PERSONCODE = C.CONSTRUCTIONPERSONCODE");
-                strSQL.Append(" GROUP BY A.DEPARTMENTCODE, A.DEPARTMENTSTRING, A.DISPLAYORDER");
-                strSQL.Append(" ORDER BY A.DISPLAYORDER ASC");
-
                 // •”��ƒ}ƒXƒ^“Ç�ž
                 ArrayList arList = new ArrayList();
                 if (!depDB.ExecuteReader(strSQL.ToString(), ref arList)) return;
@@ -1021,6 +1084,8 @@
             {
                 depDB.close(); depDB = null;
                 m_initDataLoad = bSave;
+
+                cmbDepartment.SelectedIndexChanged += new EventHandler(cmbDepartment_SelectedIndexChanged);
             }
         }
         #endregion
@@ -1032,53 +1097,33 @@
         private void SetcmbPersons()
         {
             IOMPersonInCharge picDB = new IOMPersonInCharge();
-            List<PersonInChargeMaster> workList = new List<PersonInChargeMaster>();
             bool bSave = m_initDataLoad;
             m_initDataLoad = true;
             try
             {
+                cmbConstructionPerson.SelectedIndexChanged -= new EventHandler(cmbConstructionPerson_SelectedIndexChanged);
+
                 cmbConstructionPerson.DataSource = null;
                 cmbConstructionPerson.Items.Clear();
                 cmbConstructionPerson.Text = "";
 
+                int nTargetCount = CommonMotions.cnvInt(numUDConstPro.Value);
                 int DepartmentCode = GetDepartmentCode();
                 StringBuilder strSQL = new StringBuilder();
-                // ŒŸ�õ�ðŒ�
-                strSQL.AppendFormat(" WHERE LEDGERFLG = {0}", (int)PersonInChargeMaster.LedgerDivNoDef.CalcTarget);
-                strSQL.Append(" AND (DEPARTMENTCODE");
-                StringBuilder strSubSQL = new StringBuilder();
-                if (DepartmentCode == 0)
-                {
-                    // ŽQ�Æ•”��ƒ}ƒXƒ^‚æ‚èŽæ“¾‚·‚é
-                    strSubSQL.AppendFormat(" IN (SELECT AA.DEPARTMENTCODE FROM PERSONDEPARTMENTMASTER AA WHERE AA.PERSONCODE = {0})"
-                                            , CommonMotions.LoginUserData.PersonCode);
-                }
-                else
-                {
-                    strSubSQL.AppendFormat(" = {0}", DepartmentCode);
-                }
-                strSQL.Append(strSubSQL);
-                strSQL.Append(")");
+                CommonMotions.CreateManCombBoxSQL(ref strSQL, nTargetCount, DepartmentCode);
 
-                // “–ŠúŠúŽñ“ú�EŠú––“ú‚ðŽæ“¾
-                DateTime dtDefaultStart = DateTime.MinValue;
-                DateTime dtDefaultEnd = DateTime.MinValue;
-                CreateDefaultStartAndEndDate(ref dtDefaultStart, ref dtDefaultEnd);
-
-                strSQL.AppendFormat(" AND (DATE(STARTDATE) <= STR_TO_DATE('{0}','%Y/%m/%d')", dtDefaultEnd.ToShortDateString());
-                strSQL.AppendFormat(" AND (STR_TO_DATE('{0}','%Y/%m/%d') <= DATE(ENDDATE)", dtDefaultStart.ToShortDateString());
-                strSQL.AppendFormat(" OR STR_TO_DATE('{0}','%Y/%m/%d') = DATE(ENDDATE)))", DateTime.MinValue.ToShortDateString());
-
-                strSQL.Append(" Order By DeleteFlg ASC, EmployeeClassFlg ASC, DisplayOrder ASC");
                 // ’S“–ŽÒƒ}ƒXƒ^“Ç�ž
-                if (!picDB.SelectAction(strSQL.ToString(), ref workList)) return;
+                ArrayList workList = new ArrayList();
+                if (!picDB.ExecuteReader(strSQL.ToString(), ref workList)) return;
 
                 List<KeyValuePair<int, string>> ConstructionDataList = new List<KeyValuePair<int, string>>();
                 ConstructionDataList.Add(new KeyValuePair<int, string>(0, ""));
 
-                foreach (PersonInChargeMaster work in workList)
+                PersonInChargeMaster workRec = new PersonInChargeMaster();
+                foreach (object[] work in workList)
                 {
-                    KeyValuePair<int, string> keyval = new KeyValuePair<int, string>(work.PersonCode, work.PersonName);
+                    picDB.Reader2Struct(work, ref workRec);
+                    KeyValuePair<int, string> keyval = new KeyValuePair<int, string>(workRec.PersonCode, workRec.PersonName);
 
                     ConstructionDataList.Add(keyval);
                 }
@@ -1096,42 +1141,9 @@
             {
                 picDB.close(); picDB = null;
                 m_initDataLoad = bSave;
-            }
-        }
-        #endregion
 
-        #region ƒfƒtƒHƒ‹ƒg‚ÌŠúŽñ“ú�EŠú––“ú‚ð‹�‚ß‚é
-        /// <summary>
-        /// ƒfƒtƒHƒ‹ƒg‚ÌŠúŽñ“ú�EŠú––“ú‚ð‹�‚ß‚é
-        /// </summary>
-        /// <param name="dtStart"></param>
-        /// <param name="dtEnd"></param>
-        private void CreateDefaultStartAndEndDate(ref DateTime dtStart, ref DateTime dtEnd)
-        {
-            try
-            {
-                // “–ŠúŠúŽñ”NŒŽ“ú‚ðŽæ“¾
-                int iYear = 0;
-                int month = 0;
-                int day = 0;
-                bool bPeriod = false;
-                if (CommonMotions.SystemMasterData.ConstructionNoBase == (int)SystemMaster.ConstrNoBaseDef.BusinessPeriod)
-                {   // ‰c‹ÆŠú
-                    iYear = CommonMotions.PeriodCountToYear(CommonMotions.cnvInt(numUDConstPro.Value));
-                    bPeriod = true;
-                }
-                else
-                {   // �HŽ–”N“x
-                    iYear = CommonMotions.SystemMasterData.ConstrYear;
-                }
-                CommonMotions.GetNowBeginMonthDay(bPeriod, ref month, ref day);
-                dtStart = new DateTime(iYear, month, day);
-                dtEnd = dtStart.AddYears(1).AddDays(-1);     // �I—¹‚Í�{1”N�|1“ú
+                cmbConstructionPerson.SelectedIndexChanged += new EventHandler(cmbConstructionPerson_SelectedIndexChanged);
             }
-            catch (Exception ex)
-            {
-                logger.ErrorFormat("ƒVƒXƒeƒ€ƒGƒ‰�[�F{0}�F{1}", CommonMotions.GetMethodName(), ex.Message);
-            }
         }
         #endregion
 
@@ -1145,26 +1157,36 @@
             IOMPersonInCharge PersonDB = new IOMPersonInCharge();
             try
             {
+                cmbDepartment.SelectedIndexChanged -= new EventHandler(cmbDepartment_SelectedIndexChanged);
+                cmbConstructionPerson.SelectedIndexChanged -= new EventHandler(cmbConstructionPerson_SelectedIndexChanged);
+
                 // ƒRƒ“ƒ{ƒ{ƒbƒNƒX‚æ‚è‘I‘ð’S“–ŽÒ‚ðŽæ“¾‚·‚é
                 int PersonCode = GetConstructionPersonCode();
-                if (PersonCode < 1) return false;
+                if (PersonCode < 1) return true;
 
+                int nTargetCount = CommonMotions.cnvInt(numUDConstPro.Value);
                 int DepartmentCode = GetDepartmentCode();
 
-                string strSQL = PersonDB.CreatePrimarykeyString(PersonCode);
+                StringBuilder strSQL = new StringBuilder();
+                CommonMotions.CreateMan2DepSQL(ref strSQL, nTargetCount, PersonCode);
+
+                ArrayList arList = new ArrayList();
+                if (!PersonDB.ExecuteReader(strSQL.ToString(), ref arList)) return false;
+                if (arList.Count < 1) return false;
+
+                object[] objRec = (object[])arList[0];
                 PersonInChargeMaster PersonRec = new PersonInChargeMaster();
-                PersonDB.SelectAction(strSQL, ref PersonRec);
+                PersonRec.PersonCode = CommonMotions.cnvInt(objRec[0]);         // ’S“–ŽÒƒR�[ƒh
+                PersonRec.PersonName = CommonMotions.cnvString(objRec[1]);      // ’S“–ŽÒ–¼
+                PersonRec.DepartmentCode = CommonMotions.cnvInt(objRec[2]);     // •”��ƒR�[ƒh
 
+                // “¯‚¶•”��‚Ì�ê�‡‚Í�ˆ—�‚µ‚È‚¢
+                if (DepartmentCode == PersonRec.DepartmentCode) return true;
+
                 // •”��ƒRƒ“ƒ{ƒ{ƒbƒNƒX‚Ö•”��ƒR�[ƒhƒZƒbƒg
-                if (PersonRec.DepartmentCode > 0 && DepartmentCode != PersonRec.DepartmentCode)
-                {
-                    bool bSave = m_initDataLoad;
-                    m_initDataLoad = true;
-                    cmbDepartment.SelectedValue = PersonRec.DepartmentCode;
-                    SetcmbPersons();    // ’S“–ŽÒƒRƒ“ƒ{ƒ{ƒbƒNƒX•Ï�X
-                    cmbConstructionPerson.SelectedValue = PersonCode;
-                    m_initDataLoad = bSave;
-                }
+                cmbDepartment.SelectedValue = PersonRec.DepartmentCode;
+                SetcmbPersons();    // ’S“–ŽÒƒRƒ“ƒ{ƒ{ƒbƒNƒX•Ï�X
+                cmbConstructionPerson.SelectedValue = PersonCode;
 
                 return true;
             }
@@ -1176,6 +1198,9 @@
             finally
             {
                 PersonDB.close(); PersonDB = null;
+
+                cmbDepartment.SelectedIndexChanged += new EventHandler(cmbDepartment_SelectedIndexChanged);
+                cmbConstructionPerson.SelectedIndexChanged += new EventHandler(cmbConstructionPerson_SelectedIndexChanged);
             }
         }
         #endregion
Index: branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/PriceOfBudget/FrmPriceOfBudget.Designer.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/PriceOfBudget/FrmPriceOfBudget.Designer.cs	(revision 329)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/PriceOfBudget/FrmPriceOfBudget.Designer.cs	(revision 330)
@@ -113,7 +113,7 @@
             this.cmbDepartment.Name = "cmbDepartment";
             this.cmbDepartment.Size = new System.Drawing.Size(200, 24);
             this.cmbDepartment.TabIndex = 1;
-            this.cmbDepartment.TextChanged += new System.EventHandler(this.cmbDepartment_TextChanged);
+            this.cmbDepartment.SelectedIndexChanged += new System.EventHandler(this.cmbDepartment_SelectedIndexChanged);
             // 
             // label4
             // 
@@ -164,7 +164,7 @@
             this.cmbConstructionPerson.Name = "cmbConstructionPerson";
             this.cmbConstructionPerson.Size = new System.Drawing.Size(200, 24);
             this.cmbConstructionPerson.TabIndex = 2;
-            this.cmbConstructionPerson.TextChanged += new System.EventHandler(this.cmbConstructionPerson_TextChanged);
+            this.cmbConstructionPerson.SelectedIndexChanged += new System.EventHandler(this.cmbConstructionPerson_SelectedIndexChanged);
             // 
             // label2
             // 
Index: branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/PriceOfBudget/FrmPriceOfBudget.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/PriceOfBudget/FrmPriceOfBudget.cs	(revision 329)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/PriceOfBudget/FrmPriceOfBudget.cs	(revision 330)
@@ -239,6 +239,11 @@
         {
             if (m_initDataLoad) return;
 
+            // éƒ¨ç½²ã‚³ãƒ³ãƒœãƒœãƒƒã‚¯ã‚¹å¤‰æ›´
+            SetcmbDepartment();
+            // æ‹…å½“è€…ã‚³ãƒ³ãƒœãƒœãƒƒã‚¯ã‚¹å¤‰æ›´
+            SetcmbPersons();
+
             // ãƒ‡ãƒ¼ã‚¿è¡¨ç¤º
             DispData();
         }
@@ -250,7 +255,7 @@
         /// </summary>
         /// <param name="sender"></param>
         /// <param name="e"></param>
-        private void cmbDepartment_TextChanged(object sender, EventArgs e)
+        private void cmbDepartment_SelectedIndexChanged(object sender, EventArgs e)
         {
             if (m_initDataLoad) return;
 
@@ -268,12 +273,12 @@
         /// </summary>
         /// <param name="sender"></param>
         /// <param name="e"></param>
-        private void cmbConstructionPerson_TextChanged(object sender, EventArgs e)
+        private void cmbConstructionPerson_SelectedIndexChanged(object sender, EventArgs e)
         {
             if (m_initDataLoad) return;
 
             // æ‹…å½“è€…é�¸æŠžæ™‚éƒ¨ç½²é�¸æŠžã‚’è¨­å®šã�™ã‚‹
-            SetPerosonToDepartment();
+            if (!SetPerosonToDepartment()) return;
 
             // ãƒ‡ãƒ¼ã‚¿è¡¨ç¤º
             DispData();
Index: branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/PriceOfBudget/FrmPriceOfBudgetAuxiliary.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/PriceOfBudget/FrmPriceOfBudgetAuxiliary.cs	(revision 329)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/PriceOfBudget/FrmPriceOfBudgetAuxiliary.cs	(revision 330)
@@ -195,6 +195,10 @@
 
                 strSQL.Append(" FROM CONSTRUCTIONBASEINFO A");
 
+                strSQL.Append(" INNER JOIN CONSTRUCTIONBASEINFODETAIL A1");
+                strSQL.Append(" ON A1.ConstructionCode = A.ConstructionCode");
+                strSQL.AppendFormat(" And A1.DetailNo = {0}", (int)ConstructionBaseInfoDetail.DataNoDef.ConstrDepartmentName);
+
                 strSQL.Append(" LEFT JOIN constructionbudgetdetail AS Budget");
                 strSQL.Append(" ON Budget.ConstructionCode = A.ConstructionCode");
                 strSQL.AppendFormat(" And Budget.GroupCount = {0}", (int)FrmConstructionBudget.DataGroup.Expenses);
@@ -217,11 +221,15 @@
 
                 strSQL.AppendFormat(" And ({0} <= A.ConstructionStatusFlg And A.ConstructionStatusFlg <= {1})", iCode1, iCode2);
                 strSQL.Append(" AND B1.PERSONCODE = A.CONSTRUCTIONPERSONCODE");
-                strSQL.Append(" AND C1.DEPARTMENTCODE = B1.DEPARTMENTCODE");
+                strSQL.Append(" AND C1.DEPARTMENTCODE = A.ConstrDepCode");
                 strSQL.Append(" AND E1.CONSTRUCTIONCODE = A.CONSTRUCTIONCODE");
                 strSQL.AppendFormat(" AND E1.DETAILNO = {0}", (int)ConstructionBaseInfoDetail.DataNoDef.ConstructionName);
-                if (DepartmantCode > 0) strSQL.AppendFormat(" AND C1.DEPARTMENTCODE = {0}", DepartmantCode);
-                if (PersonCode > 0) strSQL.AppendFormat(" AND B1.PERSONCODE = {0}", PersonCode);
+                if (DepartmantCode > 0)
+                {
+                    strSQL.AppendFormat(" AND A.ConstrDepCode = {0}", DepartmantCode);
+                    strSQL.AppendFormat(" And A1.DetailString = '{0}'", cmbDepartment.Text);
+                }
+                if (PersonCode > 0) strSQL.AppendFormat(" AND A.CONSTRUCTIONPERSONCODE = {0}", PersonCode);
                 strSQL.Append(")");
                 strSQL.Append(" ORDER BY 1, 12, 2, 18");
 
@@ -610,50 +618,20 @@
             m_initDataLoad = true;
             try
             {
+                this.cmbDepartment.SelectedIndexChanged -= new System.EventHandler(this.cmbDepartment_SelectedIndexChanged);
 
                 cmbDepartment.DataSource = null;
                 cmbDepartment.Items.Clear();
                 cmbDepartment.Text = "";
 
-                string strSQL = string.Empty;
+                int nTargetCount = CommonMotions.cnvInt(numUDConstPro.Value);
                 // •”��ƒ}ƒXƒ^‚ðŒŸ�õ‚·‚é
-                strSQL = "SELECT A.DEPARTMENTCODE, A.DEPARTMENTSTRING, A.DISPLAYORDER, COUNT(*)";
-                strSQL += " FROM DEPARTMENTMASTER A, PERSONINCHARGEMASTER B, CONSTRUCTIONBASEINFO C";
-                strSQL += " WHERE A.DELETEFLG = 0";
+                StringBuilder strSQL = new StringBuilder();
+                CommonMotions.CreateDepCombBoxSQL(ref strSQL, nTargetCount);
 
-                // �VƒZƒLƒ…ƒŠƒeƒBƒf�[ƒ^‘Î‰ž�Ï‚Ý‚©‚ðŠm”F‚·‚é
-                if (CommonMotions.LoginUserData.SecCode == 0)
-                {
-                    // ƒVƒXƒeƒ€Œ ŒÀ‚É‚æ‚Á‚Äƒf�[ƒ^ƒAƒNƒZƒX‚É�§ŒÀ‚ª‚ ‚é
-                    if (CommonMotions.LoginUserData.SecurityManagement == CommonDefine.SystemManageDiv[(int)CommonDefine.SysManaDivNo.SuperiorAuthority].Key
-                        || CommonMotions.LoginUserData.SecurityManagement == CommonDefine.SystemManageDiv[(int)CommonDefine.SysManaDivNo.UserAuthority].Key)
-                    {
-                        // �Š‘®’·
-                        // ˆê”ÊŽg—pŽÒ�iŽ©•ª‚Ì‚ÝƒAƒNƒZƒX‰Â”\�j
-                        strSQL += string.Format(" AND A.DEPARTMENTCODE = {0}", CommonMotions.LoginUserData.DepartmentCode);
-                    }
-                }
-                else
-                {
-                    if (CommonMotions.LoginUserData.PersonCode == CommonDefine.AdminCode)
-                    {
-
-                    }
-                    else
-                    {
-                        // ŽQ�Æ•”��ƒ}ƒXƒ^‚æ‚èŽæ“¾‚·‚é
-                        strSQL += " AND A.DEPARTMENTCODE IN (SELECT A1.DEPARTMENTCODE FROM PERSONDEPARTMENTMASTER A1";
-                        strSQL += string.Format(" WHERE A1.PERSONCODE = {0})", CommonMotions.LoginUserData.PersonCode);
-                    }
-                }
-                strSQL += " AND A.DEPARTMENTCODE = B.DEPARTMENTCODE";
-                strSQL += " AND B.PERSONCODE = C.CONSTRUCTIONPERSONCODE";
-                strSQL += " GROUP BY A.DEPARTMENTCODE, A.DEPARTMENTSTRING, A.DISPLAYORDER";
-                strSQL += " ORDER BY A.DISPLAYORDER ASC";
-
                 // •”��ƒ}ƒXƒ^“Ç�ž
                 ArrayList arList = new ArrayList();
-                if (!depDB.ExecuteReader(strSQL, ref arList)) return false;
+                if (!depDB.ExecuteReader(strSQL.ToString(), ref arList)) return false;
 
 
                 List<KeyValuePair<int, string>> ConstructionDataList = new List<KeyValuePair<int, string>>();
@@ -681,6 +659,7 @@
             {
                 depDB.close(); depDB = null;
                 m_initDataLoad = bSave;
+                this.cmbDepartment.SelectedIndexChanged += new System.EventHandler(this.cmbDepartment_SelectedIndexChanged);
             }
         }
         #endregion
@@ -689,55 +668,36 @@
         /// <summary>
         /// ’S“–ŽÒƒRƒ“ƒ{ƒ{ƒbƒNƒX‚Ö•¶Žš‚ðƒZƒbƒg‚·‚é
         /// </summary>
-        private bool SetcmbPersons()
+        private void SetcmbPersons()
         {
             IOMPersonInCharge picDB = new IOMPersonInCharge();
-            List<PersonInChargeMaster> workList = new List<PersonInChargeMaster>();
             bool bSave = m_initDataLoad;
             m_initDataLoad = true;
             try
             {
+                this.cmbConstructionPerson.SelectedIndexChanged -= new System.EventHandler(this.cmbConstructionPerson_SelectedIndexChanged);
+
                 cmbConstructionPerson.DataSource = null;
                 cmbConstructionPerson.Items.Clear();
                 cmbConstructionPerson.Text = "";
 
+                int nTargetCount = CommonMotions.cnvInt(numUDConstPro.Value);
                 int DepartmentCode = GetDepartmentCode();
-                string strSQL = string.Empty;
-                // ŒŸ�õ�ðŒ�
-                strSQL = string.Format(" WHERE LEDGERFLG = {0}", (int)PersonInChargeMaster.LedgerDivNoDef.CalcTarget);
-                strSQL += " AND (DEPARTMENTCODE";
-                string strSubSQL = string.Empty;
-                if (DepartmentCode == 0)
-                {
-                    // ŽQ�Æ•”��ƒ}ƒXƒ^‚æ‚èŽæ“¾‚·‚é
-                    strSubSQL += string.Format(" IN (SELECT AA.DEPARTMENTCODE FROM PERSONDEPARTMENTMASTER AA WHERE AA.PERSONCODE = {0})"
-                                            , CommonMotions.LoginUserData.PersonCode);
-                }
-                else
-                {
-                    strSubSQL += string.Format(" = {0}", DepartmentCode);
-                }
-                strSQL += strSubSQL + ")";
+                StringBuilder strSQL = new StringBuilder();
+                CommonMotions.CreateManCombBoxSQL(ref strSQL, nTargetCount, DepartmentCode);
 
-                // “–ŠúŠúŽñ“ú�EŠú––“ú‚ðŽæ“¾
-                DateTime dtDefaultStart = DateTime.MinValue;
-                DateTime dtDefaultEnd = DateTime.MinValue;
-                CreateDefaultStartAndEndDate(ref dtDefaultStart, ref dtDefaultEnd);
-
-                strSQL += string.Format(" AND (DATE(STARTDATE) <= STR_TO_DATE('{0}','%Y/%m/%d')", dtDefaultEnd.ToShortDateString());
-                strSQL += string.Format(" AND (STR_TO_DATE('{0}','%Y/%m/%d') <= DATE(ENDDATE)", dtDefaultStart.ToShortDateString());
-                strSQL += string.Format(" OR STR_TO_DATE('{0}','%Y/%m/%d') = DATE(ENDDATE)))", DateTime.MinValue.ToShortDateString());
-
-                strSQL += " Order By DeleteFlg ASC, EmployeeClassFlg ASC, DisplayOrder ASC";
                 // ’S“–ŽÒƒ}ƒXƒ^“Ç�ž
-                if (!picDB.SelectAction(strSQL, ref workList)) return false;
+                ArrayList workList = new ArrayList();
+                if (!picDB.ExecuteReader(strSQL.ToString(), ref workList)) return;
 
                 List<KeyValuePair<int, string>> ConstructionDataList = new List<KeyValuePair<int, string>>();
                 ConstructionDataList.Add(new KeyValuePair<int, string>(0, ""));
 
-                foreach (PersonInChargeMaster work in workList)
+                PersonInChargeMaster workRec = new PersonInChargeMaster();
+                foreach (object[] work in workList)
                 {
-                    KeyValuePair<int, string> keyval = new KeyValuePair<int, string>(work.PersonCode, work.PersonName);
+                    picDB.Reader2Struct(work, ref workRec);
+                    KeyValuePair<int, string> keyval = new KeyValuePair<int, string>(workRec.PersonCode, workRec.PersonName);
 
                     ConstructionDataList.Add(keyval);
                 }
@@ -745,56 +705,20 @@
                 // ƒRƒ“ƒ{ƒ{ƒbƒNƒX�‰Šú•\Ž¦
                 ComboBoxAction.InitDataSetCombBox(cmbConstructionPerson, ConstructionDataList);
 
-                return true;
             }
             catch (Exception ex)
             {
                 logger.ErrorFormat("ƒVƒXƒeƒ€ƒGƒ‰�[�F{0}�F{1}", CommonMotions.GetMethodName(), ex.Message);
-                return false;
             }
             finally
             {
                 picDB.close(); picDB = null;
                 m_initDataLoad = bSave;
+                this.cmbConstructionPerson.SelectedIndexChanged += new System.EventHandler(this.cmbConstructionPerson_SelectedIndexChanged);
             }
         }
         #endregion
 
-        #region ƒfƒtƒHƒ‹ƒg‚ÌŠúŽñ“ú�EŠú––“ú‚ð‹�‚ß‚é
-        /// <summary>
-        /// ƒfƒtƒHƒ‹ƒg‚ÌŠúŽñ“ú�EŠú––“ú‚ð‹�‚ß‚é
-        /// </summary>
-        /// <param name="dtStart"></param>
-        /// <param name="dtEnd"></param>
-        private void CreateDefaultStartAndEndDate(ref DateTime dtStart, ref DateTime dtEnd)
-        {
-            try
-            {
-                // “–ŠúŠúŽñ”NŒŽ“ú‚ðŽæ“¾
-                int iYear = 0;
-                int month = 0;
-                int day = 0;
-                bool bPeriod = false;
-                if (CommonMotions.SystemMasterData.ConstructionNoBase == (int)SystemMaster.ConstrNoBaseDef.BusinessPeriod)
-                {   // ‰c‹ÆŠú
-                    iYear = CommonMotions.PeriodCountToYear(CommonMotions.cnvInt(numUDConstPro.Value));
-                    bPeriod = true;
-                }
-                else
-                {   // �HŽ–”N“x
-                    iYear = CommonMotions.SystemMasterData.ConstrYear;
-                }
-                CommonMotions.GetNowBeginMonthDay(bPeriod, ref month, ref day);
-                dtStart = new DateTime(iYear, month, day);
-                dtEnd = dtStart.AddYears(1).AddDays(-1);     // �I—¹‚Í�{1”N�|1“ú
-            }
-            catch (Exception ex)
-            {
-                logger.ErrorFormat("ƒVƒXƒeƒ€ƒGƒ‰�[�F{0}�F{1}", CommonMotions.GetMethodName(), ex.Message);
-            }
-        }
-        #endregion
-
         #region •”��ƒRƒ“ƒ{‚æ‚è’S“–ŽÒƒR�[ƒh‚ðŽæ“¾‚·‚é
         /// <summary>
         /// •”��ƒRƒ“ƒ{‚æ‚è’S“–ŽÒƒR�[ƒh‚ðŽæ“¾‚·‚é
@@ -849,26 +773,36 @@
             IOMPersonInCharge PersonDB = new IOMPersonInCharge();
             try
             {
+                cmbDepartment.SelectedIndexChanged -= new EventHandler(cmbDepartment_SelectedIndexChanged);
+                cmbConstructionPerson.SelectedIndexChanged -= new EventHandler(cmbConstructionPerson_SelectedIndexChanged);
+
                 // ƒRƒ“ƒ{ƒ{ƒbƒNƒX‚æ‚è‘I‘ð’S“–ŽÒ‚ðŽæ“¾‚·‚é
                 int PersonCode = GetConstructionPersonCode();
-                if (PersonCode < 1) return false;
+                if (PersonCode < 1) return true;
 
+                int nTargetCount = CommonMotions.cnvInt(numUDConstPro.Value);
                 int DepartmentCode = GetDepartmentCode();
 
-                string strSQL = PersonDB.CreatePrimarykeyString(PersonCode);
+                StringBuilder strSQL = new StringBuilder();
+                CommonMotions.CreateMan2DepSQL(ref strSQL, nTargetCount, PersonCode);
+
+                ArrayList arList = new ArrayList();
+                if (!PersonDB.ExecuteReader(strSQL.ToString(), ref arList)) return false;
+                if (arList.Count < 1) return false;
+
+                object[] objRec = (object[])arList[0];
                 PersonInChargeMaster PersonRec = new PersonInChargeMaster();
-                PersonDB.SelectAction(strSQL, ref PersonRec);
+                PersonRec.PersonCode = CommonMotions.cnvInt(objRec[0]);         // ’S“–ŽÒƒR�[ƒh
+                PersonRec.PersonName = CommonMotions.cnvString(objRec[1]);      // ’S“–ŽÒ–¼
+                PersonRec.DepartmentCode = CommonMotions.cnvInt(objRec[2]);     // •”��ƒR�[ƒh
 
+                // “¯‚¶•”��‚Ì�ê�‡‚Í�ˆ—�‚µ‚È‚¢
+                if (DepartmentCode == PersonRec.DepartmentCode) return true;
+
                 // •”��ƒRƒ“ƒ{ƒ{ƒbƒNƒX‚Ö•”��ƒR�[ƒhƒZƒbƒg
-                if (PersonRec.DepartmentCode > 0 && DepartmentCode != PersonRec.DepartmentCode)
-                {
-                    bool bSave = m_initDataLoad;
-                    m_initDataLoad = true;
-                    cmbDepartment.SelectedValue = PersonRec.DepartmentCode;
-                    SetcmbPersons();    // ’S“–ŽÒƒRƒ“ƒ{ƒ{ƒbƒNƒX•Ï�X
-                    cmbConstructionPerson.SelectedValue = PersonCode;
-                    m_initDataLoad = bSave;
-                }
+                cmbDepartment.SelectedValue = PersonRec.DepartmentCode;
+                SetcmbPersons();    // ’S“–ŽÒƒRƒ“ƒ{ƒ{ƒbƒNƒX•Ï�X
+                cmbConstructionPerson.SelectedValue = PersonCode;
 
                 return true;
             }
@@ -880,6 +814,9 @@
             finally
             {
                 PersonDB.close(); PersonDB = null;
+
+                cmbDepartment.SelectedIndexChanged += new EventHandler(cmbDepartment_SelectedIndexChanged);
+                cmbConstructionPerson.SelectedIndexChanged += new EventHandler(cmbConstructionPerson_SelectedIndexChanged);
             }
         }
         #endregion
Index: branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Proceedings/FrmProceedings.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Proceedings/FrmProceedings.cs	(revision 329)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Proceedings/FrmProceedings.cs	(revision 330)
@@ -480,7 +480,7 @@
                 SetcmbDepartment();
 
                 // ’S“–ŽÒ‚ÌƒZƒbƒg
-                SetcombBoxPerson();
+                SetcmbPersons();
 
                 // �‰ŠúŽž‚ÉƒRƒ“ƒ{ƒ{ƒbƒNƒX‚ðƒZƒbƒg‚·‚é
                 InitCombValueSet();
@@ -731,7 +731,7 @@
         /// </summary>
         /// <param name="sender"></param>
         /// <param name="e"></param>
-        private void cmbDepartment_TextChanged(object sender, EventArgs e)
+        private void cmbDepartment_SelectedIndexChanged(object sender, EventArgs e)
         {
             if (m_bInitFlg) return;
 
@@ -749,12 +749,12 @@
         /// </summary>
         /// <param name="sender"></param>
         /// <param name="e"></param>
-        private void cmbConstructionPerson_TextChanged(object sender, EventArgs e)
+        private void cmbConstructionPerson_SelectedIndexChanged(object sender, EventArgs e)
         {
             if (m_bInitFlg) return;
 
             // ’S“–ŽÒ‘I‘ðŽž•”��‘I‘ð‚ð�Ý’è‚·‚é
-            SetPerosonToDepartment();
+            if (!SetPerosonToDepartment()) return;
 
             // •Ï�Xƒtƒ‰ƒOON
             m_bChengeAns = true;
Index: branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Proceedings/FrmProceedings.designer.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Proceedings/FrmProceedings.designer.cs	(revision 329)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Proceedings/FrmProceedings.designer.cs	(revision 330)
@@ -515,7 +515,7 @@
             this.cmbConstructionPerson.Name = "cmbConstructionPerson";
             this.cmbConstructionPerson.Size = new System.Drawing.Size(200, 24);
             this.cmbConstructionPerson.TabIndex = 130;
-            this.cmbConstructionPerson.TextChanged += new System.EventHandler(this.cmbConstructionPerson_TextChanged);
+            this.cmbConstructionPerson.SelectedIndexChanged += new System.EventHandler(this.cmbConstructionPerson_SelectedIndexChanged);
             this.cmbConstructionPerson.Enter += new System.EventHandler(this.Control_Enter);
             // 
             // cmbDepartment
@@ -528,7 +528,7 @@
             this.cmbDepartment.Name = "cmbDepartment";
             this.cmbDepartment.Size = new System.Drawing.Size(200, 24);
             this.cmbDepartment.TabIndex = 129;
-            this.cmbDepartment.TextChanged += new System.EventHandler(this.cmbDepartment_TextChanged);
+            this.cmbDepartment.SelectedIndexChanged += new System.EventHandler(this.cmbDepartment_SelectedIndexChanged);
             this.cmbDepartment.Enter += new System.EventHandler(this.Control_Enter);
             // 
             // label7
@@ -974,7 +974,7 @@
             this.btnPrint.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
             this.btnPrint.BackColor = System.Drawing.Color.DarkOliveGreen;
             this.btnPrint.ForeColor = System.Drawing.Color.White;
-            this.btnPrint.Location = new System.Drawing.Point(7, 5);
+            this.btnPrint.Location = new System.Drawing.Point(1137, 5);
             this.btnPrint.Name = "btnPrint";
             this.btnPrint.Size = new System.Drawing.Size(200, 30);
             this.btnPrint.TabIndex = 108;
@@ -988,7 +988,7 @@
             this.btnCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
             this.btnCancel.BackColor = System.Drawing.Color.Red;
             this.btnCancel.ForeColor = System.Drawing.Color.White;
-            this.btnCancel.Location = new System.Drawing.Point(7, 5);
+            this.btnCancel.Location = new System.Drawing.Point(1137, 5);
             this.btnCancel.Name = "btnCancel";
             this.btnCancel.Size = new System.Drawing.Size(200, 30);
             this.btnCancel.TabIndex = 109;
Index: branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Proceedings/FrmProceedingsAuxiliary.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Proceedings/FrmProceedingsAuxiliary.cs	(revision 329)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Proceedings/FrmProceedingsAuxiliary.cs	(revision 330)
@@ -310,7 +310,7 @@
                 numUD4.Value = CompTime % 100;
 
                 cmbDepartment.SelectedValue = CommonMotions.cnvInt(objRec[3]);
-                SetcombBoxPerson();
+                SetcmbPersons();
                 cmbConstructionPerson.SelectedValue = CommonMotions.cnvInt(objRec[4]);
 
                 if (CommonMotions.cnvInt(objRec[5]) == 1)
@@ -920,7 +920,6 @@
             try
             {
                 cmbDepartment.SelectedValue = CommonMotions.LoginUserData.DepartmentCode;
-                SetcombBoxPerson();
                 cmbConstructionPerson.SelectedValue = CommonMotions.LoginUserData.PersonCode;
 
                 numUD1.Minimum = 0;
@@ -940,71 +939,15 @@
         }
         #endregion
 
-        #region æ‹…å½“è€…ã‚³ãƒ³ãƒœãƒœãƒƒã‚¯ã‚¹ã‚’ã‚»ãƒƒãƒˆã�™ã‚‹
+        #region éƒ¨ç½²ã‚³ãƒ³ãƒœã‚ˆã‚Šéƒ¨ç½²ã‚³ãƒ¼ãƒ‰ã‚’å�–å¾—ã�™ã‚‹
         /// <summary>
-        /// æ‹…å½“è€…ã‚³ãƒ³ãƒœãƒœãƒƒã‚¯ã‚¹ã�¸æ–‡å­—ã‚’ã‚»ãƒƒãƒˆã�™ã‚‹
+        /// éƒ¨ç½²ã‚³ãƒ³ãƒœã‚ˆã‚Šéƒ¨ç½²ã‚³ãƒ¼ãƒ‰ã‚’å�–å¾—ã�™ã‚‹
         /// </summary>
-        private void SetcmbPersons()
-        {
-            IOMPersonInCharge picDB = new IOMPersonInCharge();
-            List<PersonInChargeMaster> workList = new List<PersonInChargeMaster>();
-            bool bSave = m_bInitFlg;
-            m_bInitFlg = true;
-            try
-            {
-                cmbConstructionPerson.DataSource = null;
-                cmbConstructionPerson.Items.Clear();
-                cmbConstructionPerson.Text = "";
-
-                string strSQL = string.Empty;
-                int DepartmentCode = GetDepartmentCode();
-                if (DepartmentCode == 0)
-                    strSQL = " WHERE DeleteFlg = 0 Order By EmployeeClassFlg ASC, DisplayOrder ASC";
-                else
-                    strSQL = string.Format(" WHERE DEPARTMENTCODE = {0} AND DeleteFlg = 0 Order By EmployeeClassFlg ASC, DisplayOrder ASC", DepartmentCode);
-
-                // æ‹…å½“è€…ãƒžã‚¹ã‚¿èª­è¾¼
-                if (!picDB.SelectAction(strSQL, ref workList)) return;
-
-                List<KeyValuePair<int, string>> ConstructionDataList = new List<KeyValuePair<int, string>>();
-                ConstructionDataList.Add(new KeyValuePair<int, string>(0, ""));
-
-                foreach (PersonInChargeMaster work in workList)
-                {
-                    KeyValuePair<int, string> keyval = new KeyValuePair<int, string>(work.PersonCode, work.PersonName);
-
-                    ConstructionDataList.Add(keyval);
-                }
-
-                // ã‚³ãƒ³ãƒœãƒœãƒƒã‚¯ã‚¹åˆ�æœŸè¡¨ç¤º
-                ComboBoxAction.InitDataSetCombBox(cmbConstructionPerson, ConstructionDataList);
-
-                return;
-            }
-            catch (Exception ex)
-            {
-                logger.ErrorFormat("ã‚·ã‚¹ãƒ†ãƒ ã‚¨ãƒ©ãƒ¼ï¼š{0}ï¼š{1}", CommonMotions.GetMethodName(), ex.Message);
-            }
-            finally
-            {
-                picDB.close(); picDB = null;
-                m_bInitFlg = bSave;
-            }
-        }
-        #endregion
-
-        #region éƒ¨ç½²ã‚³ãƒ³ãƒœã‚ˆã‚Šæ‹…å½“è€…ã‚³ãƒ¼ãƒ‰ã‚’å�–å¾—ã�™ã‚‹
-        /// <summary>
-        /// éƒ¨ç½²ã‚³ãƒ³ãƒœã‚ˆã‚Šæ‹…å½“è€…ã‚³ãƒ¼ãƒ‰ã‚’å�–å¾—ã�™ã‚‹
-        /// </summary>
         /// <returns></returns>
         private int GetDepartmentCode()
         {
             try
             {
-                // è¡¨ç¤ºã�•ã‚Œã�¦ã�„ã�ªã�„å ´å�ˆã�¯é�¸æŠžç„¡
-                //if (!cmbDepartment.Visible) return 0;
-
                 return CommonMotions.cnvInt(cmbDepartment.SelectedValue);
             }
             catch (Exception ex)
@@ -1015,31 +958,6 @@
         }
         #endregion
 
-        #region æ‹…å½“è€…ã‚³ãƒ³ãƒœã‚ˆã‚Šæ‹…å½“è€…ã‚³ãƒ¼ãƒ‰ã‚’å�–å¾—ã�™ã‚‹
-        /// <summary>
-        /// æ‹…å½“è€…ã‚³ãƒ³ãƒœã‚ˆã‚Šæ‹…å½“è€…ã‚³ãƒ¼ãƒ‰ã‚’å�–å¾—ã�™ã‚‹
-        /// </summary>
-        /// <returns></returns>
-        private int GetConstructionPersonCode()
-        {
-            try
-            {
-                // è¡¨ç¤ºã�•ã‚Œã�¦ã�„ã�ªã�„å ´å�ˆã�¯ãƒ­ã‚°ã‚¤ãƒ³ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚’è¿”ã�™
-                if (!cmbConstructionPerson.Visible)
-                {
-                    return CommonMotions.LoginUserData.PersonCode;
-                }
-
-                return CommonMotions.cnvInt(cmbConstructionPerson.SelectedValue);
-            }
-            catch (Exception ex)
-            {
-                logger.ErrorFormat("ã‚·ã‚¹ãƒ†ãƒ ã‚¨ãƒ©ãƒ¼ï¼š{0}", ex.Message);
-                return 0;
-            }
-        }
-        #endregion
-
         #region éƒ¨ç½²ã‚³ãƒ³ãƒœãƒœãƒƒã‚¯ã‚¹ã‚’ã‚»ãƒƒãƒˆã�™ã‚‹
         /// <summary>
         /// éƒ¨ç½²ã‚³ãƒ³ãƒœãƒœãƒƒã‚¯ã‚¹ã�¸æ–‡å­—ã‚’ã‚»ãƒƒãƒˆã�™ã‚‹
@@ -1051,30 +969,20 @@
             m_bInitFlg = true;
             try
             {
+                cmbDepartment.SelectedIndexChanged -= new EventHandler(this.cmbDepartment_SelectedIndexChanged);
+
                 cmbDepartment.DataSource = null;
                 cmbDepartment.Items.Clear();
                 cmbDepartment.Text = "";
 
-                string strSQL = string.Empty;
+                int nTargetCount = CommonMotions.ConvDate2YearOrPeriod(dtMeetingDate.Value);
                 // éƒ¨ç½²ãƒžã‚¹ã‚¿ã‚’æ¤œç´¢ã�™ã‚‹
-                strSQL = "SELECT A.DEPARTMENTCODE, A.DEPARTMENTSTRING, A.DISPLAYORDER, COUNT(*)";
-                strSQL += " FROM DEPARTMENTMASTER A, PERSONINCHARGEMASTER B";
-                strSQL += " WHERE A.DELETEFLG = 0";
+                StringBuilder strSQL = new StringBuilder();
+                CommonMotions.CreateDepCombBoxSQL(ref strSQL, nTargetCount);
 
-                //if (CommonMotions.LoginUserData.PersonCode != CommonDefine.AdminCode)
-                //{
-                //    // å�‚ç…§éƒ¨ç½²ãƒžã‚¹ã‚¿ã‚ˆã‚Šå�–å¾—ã�™ã‚‹
-                //    strSQL += " AND A.DEPARTMENTCODE IN (SELECT A1.DEPARTMENTCODE FROM PERSONDEPARTMENTMASTER A1";
-                //    strSQL += string.Format(" WHERE A1.PERSONCODE = {0})", CommonMotions.LoginUserData.PersonCode);
-                //}
-
-                strSQL += " AND A.DEPARTMENTCODE = B.DEPARTMENTCODE";
-                strSQL += " GROUP BY A.DEPARTMENTCODE, A.DEPARTMENTSTRING, A.DISPLAYORDER";
-                strSQL += " ORDER BY A.DISPLAYORDER ASC";
-
                 // éƒ¨ç½²ãƒžã‚¹ã‚¿èª­è¾¼
                 ArrayList arList = new ArrayList();
-                if (!depDB.ExecuteReader(strSQL, ref arList)) return false;
+                if (!depDB.ExecuteReader(strSQL.ToString(), ref arList)) return false;
 
                 List<KeyValuePair<int, string>> ConstructionDataList = new List<KeyValuePair<int, string>>();
                 ConstructionDataList.Add(new KeyValuePair<int, string>(0, ""));
@@ -1101,15 +1009,41 @@
             {
                 depDB.close(); depDB = null;
                 m_bInitFlg = bSave;
+                cmbDepartment.SelectedIndexChanged += new EventHandler(this.cmbDepartment_SelectedIndexChanged);
             }
         }
         #endregion
 
-        #region æ‹…å½“è€…ã‚³ãƒ³ãƒœãƒœãƒƒã‚¯ã‚¹ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆ
+        #region æ‹…å½“è€…ã‚³ãƒ³ãƒœã‚ˆã‚Šæ‹…å½“è€…ã‚³ãƒ¼ãƒ‰ã‚’å�–å¾—ã�™ã‚‹
         /// <summary>
+        /// æ‹…å½“è€…ã‚³ãƒ³ãƒœã‚ˆã‚Šæ‹…å½“è€…ã‚³ãƒ¼ãƒ‰ã‚’å�–å¾—ã�™ã‚‹
+        /// </summary>
+        /// <returns></returns>
+        private int GetConstructionPersonCode()
+        {
+            try
+            {
+                // è¡¨ç¤ºã�•ã‚Œã�¦ã�„ã�ªã�„å ´å�ˆã�¯ãƒ­ã‚°ã‚¤ãƒ³ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚’è¿”ã�™
+                if (!cmbConstructionPerson.Visible)
+                {
+                    return CommonMotions.LoginUserData.PersonCode;
+                }
+
+                return CommonMotions.cnvInt(cmbConstructionPerson.SelectedValue);
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("ã‚·ã‚¹ãƒ†ãƒ ã‚¨ãƒ©ãƒ¼ï¼š{0}", ex.Message);
+                return 0;
+            }
+        }
+        #endregion
+
+        #region æ‹…å½“è€…ã‚³ãƒ³ãƒœãƒœãƒƒã‚¯ã‚¹ã‚’ã‚»ãƒƒãƒˆã�™ã‚‹
+        /// <summary>
         /// æ‹…å½“è€…ã‚³ãƒ³ãƒœãƒœãƒƒã‚¯ã‚¹ã�¸æ–‡å­—ã‚’ã‚»ãƒƒãƒˆã�™ã‚‹
         /// </summary>
-        private void SetcombBoxPerson()
+        private void SetcmbPersons()
         {
             IOMPersonInCharge picDB = new IOMPersonInCharge();
             bool bSave = m_bInitFlg;
@@ -1116,27 +1050,30 @@
             m_bInitFlg = true;
             try
             {
+                cmbConstructionPerson.SelectedIndexChanged -= new EventHandler(this.cmbConstructionPerson_SelectedIndexChanged);
+
                 cmbConstructionPerson.DataSource = null;
                 cmbConstructionPerson.Items.Clear();
                 cmbConstructionPerson.Text = "";
 
-                List<PersonInChargeMaster> workList = new List<PersonInChargeMaster>();
-                string strSQL = string.Empty;
+
+                int nTargetCount = CommonMotions.ConvDate2YearOrPeriod(dtMeetingDate.Value);
                 int DepartmentCode = GetDepartmentCode();
-                if (DepartmentCode == 0)
-                    strSQL = " WHERE DeleteFlg = 0 Order By EmployeeClassFlg ASC, DisplayOrder ASC";
-                else
-                    strSQL = string.Format(" WHERE DEPARTMENTCODE = {0} AND DeleteFlg = 0 Order By EmployeeClassFlg ASC, DisplayOrder ASC", DepartmentCode);
+                StringBuilder strSQL = new StringBuilder();
+                CommonMotions.CreateManCombBoxSQL(ref strSQL, nTargetCount, DepartmentCode);
 
                 // æ‹…å½“è€…ãƒžã‚¹ã‚¿èª­è¾¼
-                if (!picDB.SelectAction(strSQL, ref workList)) return;
+                ArrayList workList = new ArrayList();
+                if (!picDB.ExecuteReader(strSQL.ToString(), ref workList)) return;
 
                 List<KeyValuePair<int, string>> ConstructionDataList = new List<KeyValuePair<int, string>>();
                 ConstructionDataList.Add(new KeyValuePair<int, string>(0, ""));
 
-                foreach (PersonInChargeMaster work in workList)
+                PersonInChargeMaster workRec = new PersonInChargeMaster();
+                foreach (object[] work in workList)
                 {
-                    KeyValuePair<int, string> keyval = new KeyValuePair<int, string>(work.PersonCode, work.PersonName);
+                    picDB.Reader2Struct(work, ref workRec);
+                    KeyValuePair<int, string> keyval = new KeyValuePair<int, string>(workRec.PersonCode, workRec.PersonName);
 
                     ConstructionDataList.Add(keyval);
                 }
@@ -1154,6 +1091,7 @@
             {
                 picDB.close(); picDB = null;
                 m_bInitFlg = bSave;
+                cmbConstructionPerson.SelectedIndexChanged += new EventHandler(this.cmbConstructionPerson_SelectedIndexChanged);
             }
         }
         #endregion
@@ -1168,26 +1106,36 @@
             IOMPersonInCharge PersonDB = new IOMPersonInCharge();
             try
             {
+                cmbDepartment.SelectedIndexChanged -= new EventHandler(cmbDepartment_SelectedIndexChanged);
+                cmbConstructionPerson.SelectedIndexChanged -= new EventHandler(cmbConstructionPerson_SelectedIndexChanged);
+
                 // ã‚³ãƒ³ãƒœãƒœãƒƒã‚¯ã‚¹ã‚ˆã‚Šé�¸æŠžæ‹…å½“è€…ã‚’å�–å¾—ã�™ã‚‹
                 int PersonCode = GetConstructionPersonCode();
-                if (PersonCode < 1) return false;
+                if (PersonCode < 1) return true;
 
-                int DepartmentCode = CommonMotions.cnvInt(cmbDepartment.SelectedValue);
+                int nTargetCount = CommonMotions.ConvDate2YearOrPeriod(dtMeetingDate.Value);
+                int DepartmentCode = GetDepartmentCode();
 
-                string strSQL = PersonDB.CreatePrimarykeyString(PersonCode);
+                StringBuilder strSQL = new StringBuilder();
+                CommonMotions.CreateMan2DepSQL(ref strSQL, nTargetCount, PersonCode);
+
+                ArrayList arList = new ArrayList();
+                if (!PersonDB.ExecuteReader(strSQL.ToString(), ref arList)) return false;
+                if (arList.Count < 1) return false;
+
+                object[] objRec = (object[])arList[0];
                 PersonInChargeMaster PersonRec = new PersonInChargeMaster();
-                PersonDB.SelectAction(strSQL, ref PersonRec);
+                PersonRec.PersonCode = CommonMotions.cnvInt(objRec[0]);         // æ‹…å½“è€…ã‚³ãƒ¼ãƒ‰
+                PersonRec.PersonName = CommonMotions.cnvString(objRec[1]);      // æ‹…å½“è€…å��
+                PersonRec.DepartmentCode = CommonMotions.cnvInt(objRec[2]);     // éƒ¨ç½²ã‚³ãƒ¼ãƒ‰
 
+                // å�Œã�˜éƒ¨ç½²ã�®å ´å�ˆã�¯å‡¦ç�†ã�—ã�ªã�„
+                if (DepartmentCode == PersonRec.DepartmentCode) return true;
+
                 // éƒ¨ç½²ã‚³ãƒ³ãƒœãƒœãƒƒã‚¯ã‚¹ã�¸éƒ¨ç½²ã‚³ãƒ¼ãƒ‰ã‚»ãƒƒãƒˆ
-                if (PersonRec.DepartmentCode > 0 && DepartmentCode != PersonRec.DepartmentCode)
-                {
-                    bool bSave = m_bInitFlg;
-                    m_bInitFlg = true;
-                    cmbDepartment.SelectedValue = PersonRec.DepartmentCode;
-                    SetcombBoxPerson();    // æ‹…å½“è€…ã‚³ãƒ³ãƒœãƒœãƒƒã‚¯ã‚¹å¤‰æ›´
-                    cmbConstructionPerson.SelectedValue = PersonCode;
-                    m_bInitFlg = bSave;
-                }
+                cmbDepartment.SelectedValue = PersonRec.DepartmentCode;
+                SetcmbPersons();    // æ‹…å½“è€…ã‚³ãƒ³ãƒœãƒœãƒƒã‚¯ã‚¹å¤‰æ›´
+                cmbConstructionPerson.SelectedValue = PersonCode;
 
                 return true;
             }
@@ -1199,6 +1147,9 @@
             finally
             {
                 PersonDB.close(); PersonDB = null;
+
+                cmbDepartment.SelectedIndexChanged += new EventHandler(cmbDepartment_SelectedIndexChanged);
+                cmbConstructionPerson.SelectedIndexChanged += new EventHandler(cmbConstructionPerson_SelectedIndexChanged);
             }
         }
         #endregion
Index: branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/PurchaseOrderStatus/FrmPurchaseOrderStatus.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/PurchaseOrderStatus/FrmPurchaseOrderStatus.cs	(revision 329)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/PurchaseOrderStatus/FrmPurchaseOrderStatus.cs	(revision 330)
@@ -286,6 +286,11 @@
         {
             if (m_initDataLoad) return;
 
+            // •”��ƒRƒ“ƒ{ƒ{ƒbƒNƒX•Ï�X
+            SetcmbDepartment();
+            // ’S“–ŽÒƒRƒ“ƒ{ƒ{ƒbƒNƒX•Ï�X
+            SetcmbPersons();
+            
             // ƒf�[ƒ^•\Ž¦
             DataDisplay();
         }
@@ -297,7 +302,7 @@
         /// </summary>
         /// <param name="sender"></param>
         /// <param name="e"></param>
-        private void cmbDepartment_TextChanged(object sender, EventArgs e)
+        private void cmbDepartment_SelectedIndexChanged(object sender, EventArgs e)
         {
             if (m_initDataLoad) return;
 
@@ -315,12 +320,12 @@
         /// </summary>
         /// <param name="sender"></param>
         /// <param name="e"></param>
-        private void cmbConstructionPerson_TextChanged(object sender, EventArgs e)
+        private void cmbConstructionPerson_SelectedIndexChanged(object sender, EventArgs e)
         {
             if (m_initDataLoad) return;
 
             // ’S“–ŽÒ‘I‘ðŽž•”��‘I‘ð‚ð�Ý’è‚·‚é
-            SetPerosonToDepartment();
+            if (!SetPerosonToDepartment()) return;
 
             // ƒf�[ƒ^•\Ž¦
             DataDisplay();
Index: branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/PurchaseOrderStatus/FrmPurchaseOrderStatus.designer.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/PurchaseOrderStatus/FrmPurchaseOrderStatus.designer.cs	(revision 329)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/PurchaseOrderStatus/FrmPurchaseOrderStatus.designer.cs	(revision 330)
@@ -226,7 +226,7 @@
             this.cmbConstructionPerson.Name = "cmbConstructionPerson";
             this.cmbConstructionPerson.Size = new System.Drawing.Size(200, 23);
             this.cmbConstructionPerson.TabIndex = 2;
-            this.cmbConstructionPerson.TextChanged += new System.EventHandler(this.cmbConstructionPerson_TextChanged);
+            this.cmbConstructionPerson.SelectedIndexChanged += new System.EventHandler(this.cmbConstructionPerson_SelectedIndexChanged);
             // 
             // cmbDepartment
             // 
@@ -238,7 +238,7 @@
             this.cmbDepartment.Name = "cmbDepartment";
             this.cmbDepartment.Size = new System.Drawing.Size(200, 23);
             this.cmbDepartment.TabIndex = 1;
-            this.cmbDepartment.TextChanged += new System.EventHandler(this.cmbDepartment_TextChanged);
+            this.cmbDepartment.SelectedIndexChanged += new System.EventHandler(this.cmbDepartment_SelectedIndexChanged);
             // 
             // label2
             // 
Index: branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/PurchaseOrderStatus/FrmPurchaseOrderStatusAuxiliary.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/PurchaseOrderStatus/FrmPurchaseOrderStatusAuxiliary.cs	(revision 329)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/PurchaseOrderStatus/FrmPurchaseOrderStatusAuxiliary.cs	(revision 330)
@@ -231,14 +231,38 @@
         {
             try
             {
-                string strRet = string.Empty;
+                StringBuilder strRet = new StringBuilder();
 
+                // •”��‚Ì‘I‘ð
                 int DepartmentCode = GetDepartmentCode();
-                if (DepartmentCode == 0) return strRet;
-                    
-                strRet += string.Format(" AND D.DEPARTMENTCODE = {0}", DepartmentCode);
+                if (DepartmentCode == 0) return strRet.ToString();
+                string DepartmentName = cmbDepartment.Text;
 
-                return strRet;
+                // ‰c‹Æ’S“–ŽÒ‚ª‘I‘ð‚³‚ê‚Ä‚¢‚é�ê�‡
+                int PersonCode = GetConstructionPersonCode();
+                bool bSelPerson = false;
+                if (PersonCode != 0) bSelPerson = true;
+
+                if (bSelPerson)
+                {
+                    if (radioButton1.Checked)
+                    {
+                        // ‰c‹Æ‚ð‘I‘ð
+                        strRet.AppendFormat(" AND (C.DEPARTMENTCODE = {0} And C.DEPARTMENTNAME = '{1}')", DepartmentCode, DepartmentName);
+                    }
+                    else
+                    {
+                        // �HŽ–‚ð‘I‘ð
+                        strRet.AppendFormat(" AND (D.DEPARTMENTCODE = {0} And D.DEPARTMENTNAME = '{1}')", DepartmentCode, DepartmentName);
+                    }
+                }
+                else
+                {
+                    strRet.AppendFormat(" AND ((C.DEPARTMENTCODE = {0} And C.DEPARTMENTNAME = '{1}')", DepartmentCode, DepartmentName);
+                    strRet.AppendFormat(" OR (D.DEPARTMENTCODE = {0} And D.DEPARTMENTNAME = '{1}'))", DepartmentCode, DepartmentName);
+                }
+
+                return strRet.ToString();
             }
             catch (Exception ex)
             {
@@ -303,12 +327,44 @@
                 wrkFormat.Append(" A1.ORDERNO");
                 wrkFormat.Append(" FROM CONSTRUCTIONBASEINFO A");
 
-                wrkFormat.Append(" LEFT JOIN (SELECT DA.CONSTRUCTIONCODE, DA.CONSTRUCTIONPERSONCODE PERSONCODE, DB.PERSONNAME PERSONNAME,");
-                wrkFormat.Append(" DB.DEPARTMENTCODE DEPARTMENTCODE, DC.DEPARTMENTSTRING DEPARTMENTNAME,");
-                wrkFormat.Append(" DB.DISPLAYORDER MANDISPORDER, DC.DISPLAYORDER DEPDISPORDER");
-                wrkFormat.Append(" FROM CONSTRUCTIONBASEINFO DA, PERSONINCHARGEMASTER DB");
-                wrkFormat.Append(" LEFT JOIN DEPARTMENTMASTER DC ON DB.DEPARTMENTCODE = DC.DEPARTMENTCODE");
-                wrkFormat.Append(" WHERE DA.CONSTRUCTIONPERIOD = {0} AND DA.CONSTRUCTIONPERSONCODE = DB.PERSONCODE) D ON A.CONSTRUCTIONCODE = D.CONSTRUCTIONCODE");
+                wrkFormat.Append(" LEFT JOIN (SELECT");
+                wrkFormat.Append(" CA.CONSTRUCTIONCODE");
+                wrkFormat.Append(", CA.SALESPERSONCODE As PERSONCODE");
+                wrkFormat.Append(", CB.PERSONNAME As PERSONNAME");
+                wrkFormat.Append(", ifnull(CA.SalesDepCode, 0) As DEPARTMENTCODE");
+                wrkFormat.Append(", ifnull(CD.DetailString, '') As DEPARTMENTNAME");
+                wrkFormat.Append(", ifnull(CB.DISPLAYORDER, 99999) As MANDISPORDER");
+                wrkFormat.Append(", ifnull(CC.DISPLAYORDER, 99999) As DEPDISPORDER");
+                wrkFormat.Append(" FROM");
+                wrkFormat.Append(" CONSTRUCTIONBASEINFO CA");
+                wrkFormat.Append(" LEFT JOIN PERSONINCHARGEMASTER CB");
+                wrkFormat.Append("      ON CA.SALESPERSONCODE = CB.PERSONCODE");
+                wrkFormat.Append(" LEFT JOIN DEPARTMENTMASTER CC");
+                wrkFormat.Append("      ON CA.SalesDepCode = CC.DEPARTMENTCODE");
+                wrkFormat.Append(" LEFT JOIN constructionbaseinfodetail As CD");
+                wrkFormat.Append("      ON CD.ConstructionCode = CA.ConstructionCode");
+                wrkFormat.AppendFormat(" And CD.DetailNo = {0}", (int)ConstructionBaseInfoDetail.DataNoDef.SalesDepartmentName);
+                wrkFormat.Append(" WHERE CA.CONSTRUCTIONPERIOD = {0}) C ON A.CONSTRUCTIONCODE = C.CONSTRUCTIONCODE");
+
+                wrkFormat.Append(" LEFT JOIN (SELECT");
+                wrkFormat.Append(" DA.CONSTRUCTIONCODE");
+                wrkFormat.Append(", DA.CONSTRUCTIONPERSONCODE PERSONCODE");
+                wrkFormat.Append(", DB.PERSONNAME PERSONNAME");
+                wrkFormat.Append(", ifnull(DA.ConstrDepCode, 0) As DEPARTMENTCODE");
+                wrkFormat.Append(", ifnull(DD.DetailString, '') As DEPARTMENTNAME");
+                wrkFormat.Append(", ifnull(DB.DISPLAYORDER, 99999) As MANDISPORDER");
+                wrkFormat.Append(", ifnull(DC.DISPLAYORDER, 99999) As DEPDISPORDER");
+                wrkFormat.Append(" FROM");
+                wrkFormat.Append(" CONSTRUCTIONBASEINFO DA");
+                wrkFormat.Append(" LEFT JOIN PERSONINCHARGEMASTER DB");
+                wrkFormat.Append("      ON DA.CONSTRUCTIONPERSONCODE = DB.PERSONCODE");
+                wrkFormat.Append(" LEFT JOIN DEPARTMENTMASTER DC");
+                wrkFormat.Append("      ON DA.ConstrDepCode = DC.DEPARTMENTCODE");
+                wrkFormat.Append(" LEFT JOIN constructionbaseinfodetail As DD");
+                wrkFormat.Append("      ON DD.ConstructionCode = DA.ConstructionCode");
+                wrkFormat.AppendFormat(" And DD.DetailNo = {0}", (int)ConstructionBaseInfoDetail.DataNoDef.ConstrDepartmentName);
+                wrkFormat.Append(" WHERE DA.CONSTRUCTIONPERIOD = {0}) D ON A.CONSTRUCTIONCODE = D.CONSTRUCTIONCODE");
+
                 wrkFormat.Append(", CONSTRUCTIONBASEINFODETAIL B, PROCESSAPPROVAL A1");
                 wrkFormat.Append(" LEFT JOIN ProcessApprovalDetail AS A11");
                 wrkFormat.Append(" ON A11.ConstructionCode = A1.ConstructionCode");
@@ -962,50 +1018,20 @@
             m_initDataLoad = true;
             try
             {
+                cmbDepartment.SelectedIndexChanged -= new EventHandler(cmbDepartment_SelectedIndexChanged);
 
                 cmbDepartment.DataSource = null;
                 cmbDepartment.Items.Clear();
                 cmbDepartment.Text = "";
 
-                string strSQL = string.Empty;
+                int nTargetCount = CommonMotions.cnvInt(numUDConstPro.Value);
                 // •”��ƒ}ƒXƒ^‚ðŒŸ�õ‚·‚é
-                strSQL = "SELECT A.DEPARTMENTCODE, A.DEPARTMENTSTRING, A.DISPLAYORDER, COUNT(*)";
-                strSQL += " FROM DEPARTMENTMASTER A, PERSONINCHARGEMASTER B, CONSTRUCTIONBASEINFO C";
-                strSQL += " WHERE A.DELETEFLG = 0";
+                StringBuilder strSQL = new StringBuilder();
+                CommonMotions.CreateDepCombBoxSQL(ref strSQL, nTargetCount);
 
-                // �VƒZƒLƒ…ƒŠƒeƒBƒf�[ƒ^‘Î‰ž�Ï‚Ý‚©‚ðŠm”F‚·‚é
-                if (CommonMotions.LoginUserData.SecCode == 0)
-                {
-                    // ƒVƒXƒeƒ€Œ ŒÀ‚É‚æ‚Á‚Äƒf�[ƒ^ƒAƒNƒZƒX‚É�§ŒÀ‚ª‚ ‚é
-                    if (CommonMotions.LoginUserData.SecurityManagement == CommonDefine.SystemManageDiv[(int)CommonDefine.SysManaDivNo.SuperiorAuthority].Key
-                        || CommonMotions.LoginUserData.SecurityManagement == CommonDefine.SystemManageDiv[(int)CommonDefine.SysManaDivNo.UserAuthority].Key)
-                    {
-                        // �Š‘®’·
-                        // ˆê”ÊŽg—pŽÒ�iŽ©•ª‚Ì‚ÝƒAƒNƒZƒX‰Â”\�j
-                        strSQL += string.Format(" AND A.DEPARTMENTCODE = {0}", CommonMotions.LoginUserData.DepartmentCode);
-                    }
-                }
-                else
-                {
-                    if (CommonMotions.LoginUserData.PersonCode == CommonDefine.AdminCode)
-                    {
-
-                    }
-                    else
-                    {
-                        // ŽQ�Æ•”��ƒ}ƒXƒ^‚æ‚èŽæ“¾‚·‚é
-                        strSQL += " AND A.DEPARTMENTCODE IN (SELECT A1.DEPARTMENTCODE FROM PERSONDEPARTMENTMASTER A1";
-                        strSQL += string.Format(" WHERE A1.PERSONCODE = {0})", CommonMotions.LoginUserData.PersonCode);
-                    }
-                }
-                strSQL += " AND A.DEPARTMENTCODE = B.DEPARTMENTCODE";
-                strSQL += " AND B.PERSONCODE = C.CONSTRUCTIONPERSONCODE";
-                strSQL += " GROUP BY A.DEPARTMENTCODE, A.DEPARTMENTSTRING, A.DISPLAYORDER";
-                strSQL += " ORDER BY A.DISPLAYORDER ASC";
-
                 // •”��ƒ}ƒXƒ^“Ç�ž
                 ArrayList arList = new ArrayList();
-                if (!depDB.ExecuteReader(strSQL, ref arList)) return;
+                if (!depDB.ExecuteReader(strSQL.ToString(), ref arList)) return;
 
                 List<KeyValuePair<int, string>> ConstructionDataList = new List<KeyValuePair<int, string>>();
                 ConstructionDataList.Add(new KeyValuePair<int, string>(0, ""));
@@ -1021,14 +1047,6 @@
                 // ƒRƒ“ƒ{ƒ{ƒbƒNƒX�‰Šú•\Ž¦
                 ComboBoxAction.InitDataSetCombBox(cmbDepartment, ConstructionDataList);
 
-                // �VƒZƒLƒ…ƒŠƒeƒBƒf�[ƒ^‘Î‰ž�Ï‚Ý‚©‚ðŠm”F‚·‚é
-                if (CommonMotions.LoginUserData.SecCode == 0)
-                {
-                    // ‘�–±•”�Š‘®ŽÒˆÈŠO
-                    if (CommonMotions.LoginUserData.DepartmentCode != CommonDefine.s_GeneralAffairsDevision)
-                        cmbDepartment.SelectedValue = CommonMotions.LoginUserData.DepartmentCode;
-                }
-
                 return;
             }
             catch (Exception ex)
@@ -1039,6 +1057,7 @@
             {
                 depDB.close(); depDB = null;
                 m_initDataLoad = bSave;
+                cmbDepartment.SelectedIndexChanged += new EventHandler(cmbDepartment_SelectedIndexChanged);
             }
         }
         #endregion
@@ -1050,52 +1069,33 @@
         private void SetcmbPersons()
         {
             IOMPersonInCharge picDB = new IOMPersonInCharge();
-            List<PersonInChargeMaster> workList = new List<PersonInChargeMaster>();
             bool bSave = m_initDataLoad;
             m_initDataLoad = true;
             try
             {
+                cmbConstructionPerson.SelectedIndexChanged -= new EventHandler(cmbConstructionPerson_SelectedIndexChanged);
+
                 cmbConstructionPerson.DataSource = null;
                 cmbConstructionPerson.Items.Clear();
                 cmbConstructionPerson.Text = "";
 
+                int nTargetCount = CommonMotions.cnvInt(numUDConstPro.Value);
                 int DepartmentCode = GetDepartmentCode();
-                string strSQL = string.Empty;
-                // ŒŸ�õ�ðŒ�
-                strSQL = string.Format(" WHERE LEDGERFLG = {0}", (int)PersonInChargeMaster.LedgerDivNoDef.CalcTarget);
-                strSQL += " AND (DEPARTMENTCODE";
-                string strSubSQL = string.Empty;
-                if (DepartmentCode == 0)
-                {
-                    // ŽQ�Æ•”��ƒ}ƒXƒ^‚æ‚èŽæ“¾‚·‚é
-                    strSubSQL += string.Format(" IN (SELECT AA.DEPARTMENTCODE FROM PERSONDEPARTMENTMASTER AA WHERE AA.PERSONCODE = {0})"
-                                            , CommonMotions.LoginUserData.PersonCode);
-                }
-                else
-                {
-                    strSubSQL += string.Format(" = {0}", DepartmentCode);
-                }
-                strSQL += strSubSQL + ")";
+                StringBuilder strSQL = new StringBuilder();
+                CommonMotions.CreateManCombBoxSQL(ref strSQL, nTargetCount, DepartmentCode);
 
-                // “–ŠúŠúŽñ“ú�EŠú––“ú‚ðŽæ“¾
-                DateTime dtDefaultStart = DateTime.MinValue;
-                DateTime dtDefaultEnd = DateTime.MinValue;
-                CreateDefaultStartAndEndDate(ref dtDefaultStart, ref dtDefaultEnd);
-
-                strSQL += string.Format(" AND (DATE(STARTDATE) <= STR_TO_DATE('{0}','%Y/%m/%d')", dtDefaultEnd.ToShortDateString());
-                strSQL += string.Format(" AND (STR_TO_DATE('{0}','%Y/%m/%d') <= DATE(ENDDATE)", dtDefaultStart.ToShortDateString());
-                strSQL += string.Format(" OR STR_TO_DATE('{0}','%Y/%m/%d') = DATE(ENDDATE)))", DateTime.MinValue.ToShortDateString());
-
-                strSQL += " Order By DeleteFlg ASC, EmployeeClassFlg ASC, DisplayOrder ASC";
                 // ’S“–ŽÒƒ}ƒXƒ^“Ç�ž
-                if (!picDB.SelectAction(strSQL, ref workList)) return;
+                ArrayList workList = new ArrayList();
+                if (!picDB.ExecuteReader(strSQL.ToString(), ref workList)) return;
 
                 List<KeyValuePair<int, string>> ConstructionDataList = new List<KeyValuePair<int, string>>();
                 ConstructionDataList.Add(new KeyValuePair<int, string>(0, ""));
 
-                foreach (PersonInChargeMaster work in workList)
+                PersonInChargeMaster workRec = new PersonInChargeMaster();
+                foreach (object[] work in workList)
                 {
-                    KeyValuePair<int, string> keyval = new KeyValuePair<int, string>(work.PersonCode, work.PersonName);
+                    picDB.Reader2Struct(work, ref workRec);
+                    KeyValuePair<int, string> keyval = new KeyValuePair<int, string>(workRec.PersonCode, workRec.PersonName);
 
                     ConstructionDataList.Add(keyval);
                 }
@@ -1103,16 +1103,6 @@
                 // ƒRƒ“ƒ{ƒ{ƒbƒNƒX�‰Šú•\Ž¦
                 ComboBoxAction.InitDataSetCombBox(cmbConstructionPerson, ConstructionDataList);
 
-                // �VƒZƒLƒ…ƒŠƒeƒBƒf�[ƒ^‘Î‰ž�Ï‚Ý‚©‚ðŠm”F‚·‚é
-                if (CommonMotions.LoginUserData.SecCode == 0)
-                {
-                    // ˆê”Êƒ†�[ƒU�[‚Å‘�–±•”�Š‘®ŽÒ‚Å‚Í‚È‚¢�ê�‡�Aƒ�ƒOƒCƒ“ŽÒ‚ÌƒR�[ƒh‚ðƒZƒbƒg‚·‚é
-                    if (CommonMotions.LoginUserData.DepartmentCode != CommonDefine.s_GeneralAffairsDevision)
-                    {
-                        cmbConstructionPerson.SelectedValue = CommonMotions.LoginUserData.PersonCode;
-                    }
-                }
-
                 return;
             }
             catch (Exception ex)
@@ -1123,45 +1113,11 @@
             {
                 picDB.close(); picDB = null;
                 m_initDataLoad = bSave;
+                cmbConstructionPerson.SelectedIndexChanged += new EventHandler(cmbConstructionPerson_SelectedIndexChanged);
             }
         }
         #endregion
 
-        #region ƒfƒtƒHƒ‹ƒg‚ÌŠúŽñ“ú�EŠú––“ú‚ð‹�‚ß‚é
-        /// <summary>
-        /// ƒfƒtƒHƒ‹ƒg‚ÌŠúŽñ“ú�EŠú––“ú‚ð‹�‚ß‚é
-        /// </summary>
-        /// <param name="dtStart"></param>
-        /// <param name="dtEnd"></param>
-        private void CreateDefaultStartAndEndDate(ref DateTime dtStart, ref DateTime dtEnd)
-        {
-            try
-            {
-                // “–ŠúŠúŽñ”NŒŽ“ú‚ðŽæ“¾
-                int iYear = 0;
-                int month = 0;
-                int day = 0;
-                bool bPeriod = false;
-                if (CommonMotions.SystemMasterData.ConstructionNoBase == (int)SystemMaster.ConstrNoBaseDef.BusinessPeriod)
-                {   // ‰c‹ÆŠú
-                    iYear = CommonMotions.PeriodCountToYear(CommonMotions.cnvInt(numUDConstPro.Value));
-                    bPeriod = true;
-                }
-                else
-                {   // �HŽ–”N“x
-                    iYear = CommonMotions.SystemMasterData.ConstrYear;
-                }
-                CommonMotions.GetNowBeginMonthDay(bPeriod, ref month, ref day);
-                dtStart = new DateTime(iYear, month, day);
-                dtEnd = dtStart.AddYears(1).AddDays(-1);     // �I—¹‚Í�{1”N�|1“ú
-            }
-            catch (Exception ex)
-            {
-                logger.ErrorFormat("ƒVƒXƒeƒ€ƒGƒ‰�[�F{0}�F{1}", CommonMotions.GetMethodName(), ex.Message);
-            }
-        }
-        #endregion
-
         #region ’S“–ŽÒƒRƒ“ƒ{ƒ{ƒbƒNƒXƒZƒbƒgŽž•”��‚ðƒZƒbƒg‚·‚é
         /// <summary>
         /// ’S“–ŽÒƒRƒ“ƒ{ƒ{ƒbƒNƒXƒZƒbƒgŽž•”��‚ðƒZƒbƒg‚·‚é
@@ -1172,26 +1128,36 @@
             IOMPersonInCharge PersonDB = new IOMPersonInCharge();
             try
             {
+                cmbDepartment.SelectedIndexChanged -= new EventHandler(cmbDepartment_SelectedIndexChanged);
+                cmbConstructionPerson.SelectedIndexChanged -= new EventHandler(cmbConstructionPerson_SelectedIndexChanged);
+
                 // ƒRƒ“ƒ{ƒ{ƒbƒNƒX‚æ‚è‘I‘ð’S“–ŽÒ‚ðŽæ“¾‚·‚é
                 int PersonCode = GetConstructionPersonCode();
-                if (PersonCode < 1) return false;
+                if (PersonCode < 1) return true;
 
+                int nTargetCount = CommonMotions.cnvInt(numUDConstPro.Value);
                 int DepartmentCode = GetDepartmentCode();
 
-                string strSQL = PersonDB.CreatePrimarykeyString(PersonCode);
+                StringBuilder strSQL = new StringBuilder();
+                CommonMotions.CreateMan2DepSQL(ref strSQL, nTargetCount, PersonCode);
+
+                ArrayList arList = new ArrayList();
+                if (!PersonDB.ExecuteReader(strSQL.ToString(), ref arList)) return false;
+                if (arList.Count < 1) return false;
+
+                object[] objRec = (object[])arList[0];
                 PersonInChargeMaster PersonRec = new PersonInChargeMaster();
-                PersonDB.SelectAction(strSQL, ref PersonRec);
+                PersonRec.PersonCode = CommonMotions.cnvInt(objRec[0]);         // ’S“–ŽÒƒR�[ƒh
+                PersonRec.PersonName = CommonMotions.cnvString(objRec[1]);      // ’S“–ŽÒ–¼
+                PersonRec.DepartmentCode = CommonMotions.cnvInt(objRec[2]);     // •”��ƒR�[ƒh
 
+                // “¯‚¶•”��‚Ì�ê�‡‚Í�ˆ—�‚µ‚È‚¢
+                if (DepartmentCode == PersonRec.DepartmentCode) return true;
+
                 // •”��ƒRƒ“ƒ{ƒ{ƒbƒNƒX‚Ö•”��ƒR�[ƒhƒZƒbƒg
-                if (PersonRec.DepartmentCode > 0 && DepartmentCode != PersonRec.DepartmentCode)
-                {
-                    bool bSave = m_initDataLoad;
-                    m_initDataLoad = true;
-                    cmbDepartment.SelectedValue = PersonRec.DepartmentCode;
-                    SetcmbPersons();    // ’S“–ŽÒƒRƒ“ƒ{ƒ{ƒbƒNƒX•Ï�X
-                    cmbConstructionPerson.SelectedValue = PersonCode;
-                    m_initDataLoad = bSave;
-                }
+                cmbDepartment.SelectedValue = PersonRec.DepartmentCode;
+                SetcmbPersons();    // ’S“–ŽÒƒRƒ“ƒ{ƒ{ƒbƒNƒX•Ï�X
+                cmbConstructionPerson.SelectedValue = PersonCode;
 
                 return true;
             }
@@ -1203,6 +1169,9 @@
             finally
             {
                 PersonDB.close(); PersonDB = null;
+
+                cmbDepartment.SelectedIndexChanged += new EventHandler(cmbDepartment_SelectedIndexChanged);
+                cmbConstructionPerson.SelectedIndexChanged += new EventHandler(cmbConstructionPerson_SelectedIndexChanged);
             }
         }
         #endregion
Index: branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ReqbillingStatus/FrmReqBillingStatus.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ReqbillingStatus/FrmReqBillingStatus.cs	(revision 329)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ReqbillingStatus/FrmReqBillingStatus.cs	(revision 330)
@@ -312,6 +312,11 @@
         {
             if (m_initDataLoad) return;
 
+            // •”��ƒRƒ“ƒ{ƒ{ƒbƒNƒX•Ï�X
+            SetcmbDepartment();
+            // ’S“–ŽÒƒRƒ“ƒ{ƒ{ƒbƒNƒX•Ï�X
+            SetcmbPersons();
+
             // ƒf�[ƒ^•\Ž¦
             DataDisplay();
         }
@@ -323,7 +328,7 @@
         /// </summary>
         /// <param name="sender"></param>
         /// <param name="e"></param>
-        private void cmbDepartment_TextChanged(object sender, EventArgs e)
+        private void cmbDepartment_SelectedIndexChanged(object sender, EventArgs e)
         {
             if (m_initDataLoad) return;
 
@@ -341,12 +346,12 @@
         /// </summary>
         /// <param name="sender"></param>
         /// <param name="e"></param>
-        private void cmbConstructionPerson_TextChanged(object sender, EventArgs e)
+        private void cmbConstructionPerson_SelectedIndexChanged(object sender, EventArgs e)
         {
             if (m_initDataLoad) return;
 
             // ’S“–ŽÒ‘I‘ðŽž•”��‘I‘ð‚ð�Ý’è‚·‚é
-            SetPerosonToDepartment();
+            if (!SetPerosonToDepartment()) return;
 
             // ƒf�[ƒ^•\Ž¦
             DataDisplay();
Index: branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ReqbillingStatus/FrmReqBillingStatus.designer.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ReqbillingStatus/FrmReqBillingStatus.designer.cs	(revision 329)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ReqbillingStatus/FrmReqBillingStatus.designer.cs	(revision 330)
@@ -225,7 +225,7 @@
             this.cmbConstructionPerson.Name = "cmbConstructionPerson";
             this.cmbConstructionPerson.Size = new System.Drawing.Size(200, 23);
             this.cmbConstructionPerson.TabIndex = 2;
-            this.cmbConstructionPerson.TextChanged += new System.EventHandler(this.cmbConstructionPerson_TextChanged);
+            this.cmbConstructionPerson.SelectedIndexChanged += new System.EventHandler(this.cmbConstructionPerson_SelectedIndexChanged);
             // 
             // cmbDepartment
             // 
@@ -237,7 +237,7 @@
             this.cmbDepartment.Name = "cmbDepartment";
             this.cmbDepartment.Size = new System.Drawing.Size(200, 23);
             this.cmbDepartment.TabIndex = 1;
-            this.cmbDepartment.TextChanged += new System.EventHandler(this.cmbDepartment_TextChanged);
+            this.cmbDepartment.SelectedIndexChanged += new System.EventHandler(this.cmbDepartment_SelectedIndexChanged);
             // 
             // label2
             // 
Index: branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ReqbillingStatus/FrmReqBillingStatusAuxiliary.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ReqbillingStatus/FrmReqBillingStatusAuxiliary.cs	(revision 329)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ReqbillingStatus/FrmReqBillingStatusAuxiliary.cs	(revision 330)
@@ -213,7 +213,7 @@
 
         #region •”��‚ª‘I‘ð‚³‚ê‚Ä‚¢‚é�ê�‡
         /// <summary>
-        /// •”��‚ª‘I‘ð‚³‚ê‚Ä‚¢‚é�ê�‡
+        /// •”��‚ª‘I‘ð‚³‚ê‚Ä‚¢‚é�ê�‡.
         /// </summary>
         /// <returns></returns>
         private string GetDepartmentString()
@@ -220,14 +220,37 @@
         {
             try
             {
-                string strRet = string.Empty;
+                StringBuilder strRet = new StringBuilder();
 
                 int DepartmentCode = GetDepartmentCode();
-                if (DepartmentCode == 0) return strRet;
-                    
-                strRet += string.Format(" AND D.DEPARTMENTCODE = {0}", DepartmentCode);
+                if (DepartmentCode == 0) return strRet.ToString();
+                string DepartmentName = cmbDepartment.Text;
 
-                return strRet;
+                // ‰c‹Æ’S“–ŽÒ‚ª‘I‘ð‚³‚ê‚Ä‚¢‚é�ê�‡
+                int PersonCode = GetConstructionPersonCode();
+                bool bSelPerson = false;
+                if (PersonCode != 0) bSelPerson = true;
+
+                if (bSelPerson)
+                {
+                    if (radioButton1.Checked)
+                    {
+                        // ‰c‹Æ‚ð‘I‘ð
+                        strRet.AppendFormat(" AND (D.DEPARTMENTCODE = {0} And D.DEPARTMENTNAME = '{1}')", DepartmentCode, DepartmentName);
+                    }
+                    else
+                    {
+                        // �HŽ–‚ð‘I‘ð
+                        strRet.AppendFormat(" AND (E.DEPARTMENTCODE = {0} And E.DEPARTMENTNAME = '{1}')", DepartmentCode, DepartmentName);
+                    }
+                }
+                else
+                {
+                    strRet.AppendFormat(" AND ((D.DEPARTMENTCODE = {0} And D.DEPARTMENTNAME = '{1}')", DepartmentCode, DepartmentName);
+                    strRet.AppendFormat(" OR (E.DEPARTMENTCODE = {0} And E.DEPARTMENTNAME = '{1}'))", DepartmentCode, DepartmentName);
+                }
+
+                return strRet.ToString();
             }
             catch (Exception ex)
             {
@@ -297,38 +320,79 @@
                 strSQL.Append(", G.REQUESTAMOUNT");
                 strSQL.Append(", A.MAINCONSTRUCTIONCODE");
                 strSQL.Append(", E.DepartmentCode");
-                strSQL.Append(", E.DepartmentString");
-                strSQL.Append(", D.PersonCode");
-                strSQL.Append(", D.PersonName");
+                strSQL.Append(", E.DEPARTMENTNAME");
+                strSQL.Append(", E.PersonCode");
+                strSQL.Append(", E.PersonName");
                 strSQL.Append(", F.OrderNo");
                 strSQL.AppendFormat(", DATE_FORMAT(IFNULL(F.PetitionApprovalDate, '{0}'), '%Y/%m/%d') AS ApprovalDate", DateTime.MinValue);
                 strSQL.AppendFormat(", DATE_FORMAT(IFNULL(I.SendDate, '{0}'), '%Y/%m/%d') AS SendData", DateTime.MinValue);
                 strSQL.Append(" From");
                 strSQL.Append(" requestdata AS A");
-                strSQL.Append(" LEFT JOIN requesthead AS G ON G.REQUESTNO = A.REQUESTNO");
+                strSQL.Append(" LEFT JOIN requesthead AS G");
+                strSQL.Append("       ON G.REQUESTNO = A.REQUESTNO");
                 strSQL.Append(" LEFT JOIN processapproval AS F");
-                strSQL.Append(" ON F.ConstructionCode = A.MAINCONSTRUCTIONCODE");
+                strSQL.Append("       ON F.ConstructionCode = A.MAINCONSTRUCTIONCODE");
                 strSQL.AppendFormat(" AND F.ApprovalCode = {0}", ApprovalCode);
-                strSQL.Append(" AND F.OrderNo = G.ORDERNO");
-                strSQL.Append(" AND F.SeqNo = 1");
-                strSQL.Append(" LEFT JOIN invoicedata AS H ON H.INVOICENO = G.INVOICENO");
+                strSQL.Append("       AND F.OrderNo = G.ORDERNO");
+                strSQL.Append("       AND F.SeqNo = 1");
+                strSQL.Append(" LEFT JOIN invoicedata AS H");
+                strSQL.Append("       ON H.INVOICENO = G.INVOICENO");
                 strSQL.Append(" LEFT JOIN RequestOrderDate AS I");
-                strSQL.Append(" ON I.ConstructionCode = A.MAINCONSTRUCTIONCODE");
-                strSQL.Append(" AND I.INVOICENO = H.INVOICENO");
-                strSQL.Append(" , constructionbaseinfo AS B");
-                strSQL.Append(" LEFT JOIN personinchargemaster AS D ON D.PersonCode = B.ConstructionPersonCode");
-                strSQL.Append(" LEFT JOIN departmentmaster AS E ON E.DepartmentCode = D.DepartmentCode");
+                strSQL.Append("       ON I.ConstructionCode = A.MAINCONSTRUCTIONCODE");
+                strSQL.Append("       AND I.INVOICENO = H.INVOICENO");
+                strSQL.Append(", constructionbaseinfo AS B");
+                strSQL.Append(" INNER JOIN constructionbaseinfodetail AS J");
+                strSQL.Append("       ON (J.ConstructionCode = B.ConstructionCode");
+                strSQL.AppendFormat(" AND J.DetailNo = {0})", (int)ConstructionBaseInfoDetail.DataNoDef.ConstructionName);
                 strSQL.Append(" LEFT JOIN orderersmaster AS C");
-                strSQL.Append(" On ( C.OrderCotegory = B.OrderersDivision");
-                strSQL.Append(" AND C.OrderersCode = B.OrderersCode)");
-                strSQL.Append(", constructionbaseinfodetail AS J");
+                strSQL.Append("       On ( C.OrderCotegory = B.OrderersDivision");
+                strSQL.Append("       AND C.OrderersCode = B.OrderersCode)");
+
+                strSQL.Append(" LEFT JOIN (SELECT");
+                strSQL.Append(" CA.CONSTRUCTIONCODE");
+                strSQL.Append(", CA.SALESPERSONCODE As PERSONCODE");
+                strSQL.Append(", CB.PERSONNAME As PERSONNAME");
+                strSQL.Append(", ifnull(CA.SalesDepCode, 0) As DEPARTMENTCODE");
+                strSQL.Append(", ifnull(CD.DetailString, '') As DEPARTMENTNAME");
+                strSQL.Append(", ifnull(CB.DISPLAYORDER, 99999) As MANDISPORDER");
+                strSQL.Append(", ifnull(CC.DISPLAYORDER, 99999) As DEPDISPORDER");
+                strSQL.Append(" FROM");
+                strSQL.Append(" CONSTRUCTIONBASEINFO CA");
+                strSQL.Append(" LEFT JOIN PERSONINCHARGEMASTER CB");
+                strSQL.Append("      ON CA.SALESPERSONCODE = CB.PERSONCODE");
+                strSQL.Append(" LEFT JOIN DEPARTMENTMASTER CC");
+                strSQL.Append("      ON CA.SalesDepCode = CC.DEPARTMENTCODE");
+                strSQL.Append(" LEFT JOIN constructionbaseinfodetail As CD");
+                strSQL.Append("      ON CD.ConstructionCode = CA.ConstructionCode");
+                strSQL.AppendFormat(" And CD.DetailNo = {0}", (int)ConstructionBaseInfoDetail.DataNoDef.SalesDepartmentName);
+                strSQL.AppendFormat(" WHERE CA.CONSTRUCTIONPERIOD = {0}) D", numUDConstPro.Value);
+                strSQL.Append(" ON B.CONSTRUCTIONCODE = D.CONSTRUCTIONCODE");
+
+                strSQL.Append(" LEFT JOIN (SELECT");
+                strSQL.Append(" DA.CONSTRUCTIONCODE");
+                strSQL.Append(", DA.CONSTRUCTIONPERSONCODE PERSONCODE");
+                strSQL.Append(", DB.PERSONNAME PERSONNAME");
+                strSQL.Append(", ifnull(DA.ConstrDepCode, 0) As DEPARTMENTCODE");
+                strSQL.Append(", ifnull(DD.DetailString, '') As DEPARTMENTNAME");
+                strSQL.Append(", ifnull(DB.DISPLAYORDER, 99999) As MANDISPORDER");
+                strSQL.Append(", ifnull(DC.DISPLAYORDER, 99999) As DEPDISPORDER");
+                strSQL.Append(" FROM");
+                strSQL.Append(" CONSTRUCTIONBASEINFO DA");
+                strSQL.Append(" LEFT JOIN PERSONINCHARGEMASTER DB");
+                strSQL.Append("      ON DA.CONSTRUCTIONPERSONCODE = DB.PERSONCODE");
+                strSQL.Append(" LEFT JOIN DEPARTMENTMASTER DC");
+                strSQL.Append("      ON DA.ConstrDepCode = DC.DEPARTMENTCODE");
+                strSQL.Append(" LEFT JOIN constructionbaseinfodetail As DD");
+                strSQL.Append("      ON DD.ConstructionCode = DA.ConstructionCode");
+                strSQL.AppendFormat(" And DD.DetailNo = {0}", (int)ConstructionBaseInfoDetail.DataNoDef.ConstrDepartmentName);
+                strSQL.AppendFormat(" WHERE DA.CONSTRUCTIONPERIOD = {0}) E", numUDConstPro.Value);
+                strSQL.Append(" ON B.CONSTRUCTIONCODE = E.CONSTRUCTIONCODE");
+
                 strSQL.Append(" WHERE");
                 strSQL.Append(" (B.ConstructionCode = A.MAINCONSTRUCTIONCODE");
                 strSQL.AppendFormat(" AND B.ConstructionPeriod = {0}", numUDConstPro.Value);
                 if (m_BillingSplitFlg >= 0) strSQL.AppendFormat(" AND B.BillingSplitFlg = {0}", m_BillingSplitFlg);
                 strSQL.AppendFormat(" AND (B.ConstructionStatusFlg != {0}))", nNotStatus);
-                strSQL.Append(" AND (J.ConstructionCode = B.ConstructionCode");
-                strSQL.AppendFormat(" AND J.DetailNo = {0})",(int)ConstructionBaseInfoDetail.DataNoDef.ConstructionName);
 
                 // •”��‚ª‘I‘ð‚³‚ê‚Ä‚¢‚é�ê�‡
                 strSQL.Append(GetDepartmentString());
@@ -912,47 +976,17 @@
             m_initDataLoad = true;
             try
             {
+                cmbDepartment.SelectedIndexChanged -= new EventHandler(cmbDepartment_SelectedIndexChanged);
 
                 cmbDepartment.DataSource = null;
                 cmbDepartment.Items.Clear();
                 cmbDepartment.Text = "";
 
+                int nTargetCount = CommonMotions.cnvInt(numUDConstPro.Value);
+                // •”��ƒ}ƒXƒ^‚ðŒŸ�õ‚·‚é
                 StringBuilder strSQL = new StringBuilder();
-                // •”��ƒ}ƒXƒ^‚ðŒŸ�õ‚·‚é
-                strSQL.Append("SELECT A.DEPARTMENTCODE, A.DEPARTMENTSTRING, A.DISPLAYORDER, COUNT(*)");
-                strSQL.Append(" FROM DEPARTMENTMASTER A, PERSONINCHARGEMASTER B, CONSTRUCTIONBASEINFO C");
-                strSQL.Append(" WHERE A.DELETEFLG = 0");
+                CommonMotions.CreateDepCombBoxSQL(ref strSQL, nTargetCount);
 
-                // �VƒZƒLƒ…ƒŠƒeƒBƒf�[ƒ^‘Î‰ž�Ï‚Ý‚©‚ðŠm”F‚·‚é
-                if (CommonMotions.LoginUserData.SecCode == 0)
-                {
-                    // ƒVƒXƒeƒ€Œ ŒÀ‚É‚æ‚Á‚Äƒf�[ƒ^ƒAƒNƒZƒX‚É�§ŒÀ‚ª‚ ‚é
-                    if (CommonMotions.LoginUserData.SecurityManagement == CommonDefine.SystemManageDiv[(int)CommonDefine.SysManaDivNo.SuperiorAuthority].Key
-                        || CommonMotions.LoginUserData.SecurityManagement == CommonDefine.SystemManageDiv[(int)CommonDefine.SysManaDivNo.UserAuthority].Key)
-                    {
-                        // �Š‘®’·
-                        // ˆê”ÊŽg—pŽÒ�iŽ©•ª‚Ì‚ÝƒAƒNƒZƒX‰Â”\�j
-                        strSQL.AppendFormat(" AND A.DEPARTMENTCODE = {0}", CommonMotions.LoginUserData.DepartmentCode);
-                    }
-                }
-                else
-                {
-                    if (CommonMotions.LoginUserData.PersonCode == CommonDefine.AdminCode)
-                    {
-
-                    }
-                    else
-                    {
-                        // ŽQ�Æ•”��ƒ}ƒXƒ^‚æ‚èŽæ“¾‚·‚é
-                        strSQL.Append(" AND A.DEPARTMENTCODE IN (SELECT A1.DEPARTMENTCODE FROM PERSONDEPARTMENTMASTER A1");
-                        strSQL.AppendFormat(" WHERE A1.PERSONCODE = {0})", CommonMotions.LoginUserData.PersonCode);
-                    }
-                }
-                strSQL.Append(" AND A.DEPARTMENTCODE = B.DEPARTMENTCODE");
-                strSQL.Append(" AND B.PERSONCODE = C.CONSTRUCTIONPERSONCODE");
-                strSQL.Append(" GROUP BY A.DEPARTMENTCODE, A.DEPARTMENTSTRING, A.DISPLAYORDER");
-                strSQL.Append(" ORDER BY A.DISPLAYORDER ASC");
-
                 // •”��ƒ}ƒXƒ^“Ç�ž
                 ArrayList arList = new ArrayList();
                 if (!depDB.ExecuteReader(strSQL.ToString(), ref arList)) return;
@@ -971,14 +1005,6 @@
                 // ƒRƒ“ƒ{ƒ{ƒbƒNƒX�‰Šú•\Ž¦
                 ComboBoxAction.InitDataSetCombBox(cmbDepartment, ConstructionDataList);
 
-                // �VƒZƒLƒ…ƒŠƒeƒBƒf�[ƒ^‘Î‰ž�Ï‚Ý‚©‚ðŠm”F‚·‚é
-                if (CommonMotions.LoginUserData.SecCode == 0)
-                {
-                    // ‘�–±•”�Š‘®ŽÒˆÈŠO
-                    if (CommonMotions.LoginUserData.DepartmentCode != CommonDefine.s_GeneralAffairsDevision)
-                        cmbDepartment.SelectedValue = CommonMotions.LoginUserData.DepartmentCode;
-                }
-
                 return;
             }
             catch (Exception ex)
@@ -989,6 +1015,7 @@
             {
                 depDB.close(); depDB = null;
                 m_initDataLoad = bSave;
+                cmbDepartment.SelectedIndexChanged += new EventHandler(cmbDepartment_SelectedIndexChanged);
             }
         }
         #endregion
@@ -1000,53 +1027,33 @@
         private void SetcmbPersons()
         {
             IOMPersonInCharge picDB = new IOMPersonInCharge();
-            List<PersonInChargeMaster> workList = new List<PersonInChargeMaster>();
             bool bSave = m_initDataLoad;
             m_initDataLoad = true;
             try
             {
+                cmbConstructionPerson.SelectedIndexChanged -= new EventHandler(cmbConstructionPerson_SelectedIndexChanged);
+
                 cmbConstructionPerson.DataSource = null;
                 cmbConstructionPerson.Items.Clear();
                 cmbConstructionPerson.Text = "";
 
+                int nTargetCount = CommonMotions.cnvInt(numUDConstPro.Value);
                 int DepartmentCode = GetDepartmentCode();
                 StringBuilder strSQL = new StringBuilder();
-                // ŒŸ�õ�ðŒ�
-                strSQL.AppendFormat(" WHERE LEDGERFLG = {0}", (int)PersonInChargeMaster.LedgerDivNoDef.CalcTarget);
-                strSQL.Append(" AND (DEPARTMENTCODE");
-                StringBuilder strSubSQL = new StringBuilder();
-                if (DepartmentCode == 0)
-                {
-                    // ŽQ�Æ•”��ƒ}ƒXƒ^‚æ‚èŽæ“¾‚·‚é
-                    strSubSQL.AppendFormat(" IN (SELECT AA.DEPARTMENTCODE FROM PERSONDEPARTMENTMASTER AA WHERE AA.PERSONCODE = {0})"
-                                            , CommonMotions.LoginUserData.PersonCode);
-                }
-                else
-                {
-                    strSubSQL.AppendFormat(" = {0}", DepartmentCode);
-                }
-                strSQL.Append(strSubSQL.ToString());
-                strSQL.Append(")");
+                CommonMotions.CreateManCombBoxSQL(ref strSQL, nTargetCount, DepartmentCode);
 
-                // “–ŠúŠúŽñ“ú�EŠú––“ú‚ðŽæ“¾
-                DateTime dtDefaultStart = DateTime.MinValue;
-                DateTime dtDefaultEnd = DateTime.MinValue;
-                CreateDefaultStartAndEndDate(ref dtDefaultStart, ref dtDefaultEnd);
-
-                strSQL.AppendFormat(" AND (DATE(STARTDATE) <= STR_TO_DATE('{0}','%Y/%m/%d')", dtDefaultEnd.ToShortDateString());
-                strSQL.AppendFormat(" AND (STR_TO_DATE('{0}','%Y/%m/%d') <= DATE(ENDDATE)", dtDefaultStart.ToShortDateString());
-                strSQL.AppendFormat(" OR STR_TO_DATE('{0}','%Y/%m/%d') = DATE(ENDDATE)))", DateTime.MinValue.ToShortDateString());
-
-                strSQL.Append(" Order By DeleteFlg ASC, EmployeeClassFlg ASC, DisplayOrder ASC");
                 // ’S“–ŽÒƒ}ƒXƒ^“Ç�ž
-                if (!picDB.SelectAction(strSQL.ToString(), ref workList)) return;
+                ArrayList workList = new ArrayList();
+                if (!picDB.ExecuteReader(strSQL.ToString(), ref workList)) return;
 
                 List<KeyValuePair<int, string>> ConstructionDataList = new List<KeyValuePair<int, string>>();
                 ConstructionDataList.Add(new KeyValuePair<int, string>(0, ""));
 
-                foreach (PersonInChargeMaster work in workList)
+                PersonInChargeMaster workRec = new PersonInChargeMaster();
+                foreach (object[] work in workList)
                 {
-                    KeyValuePair<int, string> keyval = new KeyValuePair<int, string>(work.PersonCode, work.PersonName);
+                    picDB.Reader2Struct(work, ref workRec);
+                    KeyValuePair<int, string> keyval = new KeyValuePair<int, string>(workRec.PersonCode, workRec.PersonName);
 
                     ConstructionDataList.Add(keyval);
                 }
@@ -1054,16 +1061,6 @@
                 // ƒRƒ“ƒ{ƒ{ƒbƒNƒX�‰Šú•\Ž¦
                 ComboBoxAction.InitDataSetCombBox(cmbConstructionPerson, ConstructionDataList);
 
-                // �VƒZƒLƒ…ƒŠƒeƒBƒf�[ƒ^‘Î‰ž�Ï‚Ý‚©‚ðŠm”F‚·‚é
-                if (CommonMotions.LoginUserData.SecCode == 0)
-                {
-                    // ˆê”Êƒ†�[ƒU�[‚Å‘�–±•”�Š‘®ŽÒ‚Å‚Í‚È‚¢�ê�‡�Aƒ�ƒOƒCƒ“ŽÒ‚ÌƒR�[ƒh‚ðƒZƒbƒg‚·‚é
-                    if (CommonMotions.LoginUserData.DepartmentCode != CommonDefine.s_GeneralAffairsDevision)
-                    {
-                        cmbConstructionPerson.SelectedValue = CommonMotions.LoginUserData.PersonCode;
-                    }
-                }
-
                 return;
             }
             catch (Exception ex)
@@ -1074,45 +1071,13 @@
             {
                 picDB.close(); picDB = null;
                 m_initDataLoad = bSave;
-            }
-        }
-        #endregion
 
-        #region ƒfƒtƒHƒ‹ƒg‚ÌŠúŽñ“ú�EŠú––“ú‚ð‹�‚ß‚é
-        /// <summary>
-        /// ƒfƒtƒHƒ‹ƒg‚ÌŠúŽñ“ú�EŠú––“ú‚ð‹�‚ß‚é
-        /// </summary>
-        /// <param name="dtStart"></param>
-        /// <param name="dtEnd"></param>
-        private void CreateDefaultStartAndEndDate(ref DateTime dtStart, ref DateTime dtEnd)
-        {
-            try
-            {
-                // “–ŠúŠúŽñ”NŒŽ“ú‚ðŽæ“¾
-                int iYear = 0;
-                int month = 0;
-                int day = 0;
-                bool bPeriod = false;
-                if (CommonMotions.SystemMasterData.ConstructionNoBase == (int)SystemMaster.ConstrNoBaseDef.BusinessPeriod)
-                {   // ‰c‹ÆŠú
-                    iYear = CommonMotions.PeriodCountToYear(CommonMotions.cnvInt(numUDConstPro.Value));
-                    bPeriod = true;
-                }
-                else
-                {   // �HŽ–”N“x
-                    iYear = CommonMotions.SystemMasterData.ConstrYear;
-                }
-                CommonMotions.GetNowBeginMonthDay(bPeriod, ref month, ref day);
-                dtStart = new DateTime(iYear, month, day);
-                dtEnd = dtStart.AddYears(1).AddDays(-1);     // �I—¹‚Í�{1”N�|1“ú
+                cmbConstructionPerson.SelectedIndexChanged += new EventHandler(cmbConstructionPerson_SelectedIndexChanged);
             }
-            catch (Exception ex)
-            {
-                logger.ErrorFormat("ƒVƒXƒeƒ€ƒGƒ‰�[�F{0}�F{1}", CommonMotions.GetMethodName(), ex.Message);
-            }
         }
         #endregion
 
+
         #region ’S“–ŽÒƒRƒ“ƒ{ƒ{ƒbƒNƒXƒZƒbƒgŽž•”��‚ðƒZƒbƒg‚·‚é
         /// <summary>
         /// ’S“–ŽÒƒRƒ“ƒ{ƒ{ƒbƒNƒXƒZƒbƒgŽž•”��‚ðƒZƒbƒg‚·‚é
@@ -1123,26 +1088,36 @@
             IOMPersonInCharge PersonDB = new IOMPersonInCharge();
             try
             {
+                cmbDepartment.SelectedIndexChanged -= new EventHandler(cmbDepartment_SelectedIndexChanged);
+                cmbConstructionPerson.SelectedIndexChanged -= new EventHandler(cmbConstructionPerson_SelectedIndexChanged);
+
                 // ƒRƒ“ƒ{ƒ{ƒbƒNƒX‚æ‚è‘I‘ð’S“–ŽÒ‚ðŽæ“¾‚·‚é
                 int PersonCode = GetConstructionPersonCode();
-                if (PersonCode < 1) return false;
+                if (PersonCode < 1) return true;
 
+                int nTargetCount = CommonMotions.cnvInt(numUDConstPro.Value);
                 int DepartmentCode = GetDepartmentCode();
 
-                string strSQL = PersonDB.CreatePrimarykeyString(PersonCode);
+                StringBuilder strSQL = new StringBuilder();
+                CommonMotions.CreateMan2DepSQL(ref strSQL, nTargetCount, PersonCode);
+
+                ArrayList arList = new ArrayList();
+                if (!PersonDB.ExecuteReader(strSQL.ToString(), ref arList)) return false;
+                if (arList.Count < 1) return false;
+
+                object[] objRec = (object[])arList[0];
                 PersonInChargeMaster PersonRec = new PersonInChargeMaster();
-                PersonDB.SelectAction(strSQL, ref PersonRec);
+                PersonRec.PersonCode = CommonMotions.cnvInt(objRec[0]);         // ’S“–ŽÒƒR�[ƒh
+                PersonRec.PersonName = CommonMotions.cnvString(objRec[1]);      // ’S“–ŽÒ–¼
+                PersonRec.DepartmentCode = CommonMotions.cnvInt(objRec[2]);     // •”��ƒR�[ƒh
 
+                // “¯‚¶•”��‚Ì�ê�‡‚Í�ˆ—�‚µ‚È‚¢
+                if (DepartmentCode == PersonRec.DepartmentCode) return true;
+
                 // •”��ƒRƒ“ƒ{ƒ{ƒbƒNƒX‚Ö•”��ƒR�[ƒhƒZƒbƒg
-                if (PersonRec.DepartmentCode > 0 && DepartmentCode != PersonRec.DepartmentCode)
-                {
-                    bool bSave = m_initDataLoad;
-                    m_initDataLoad = true;
-                    cmbDepartment.SelectedValue = PersonRec.DepartmentCode;
-                    SetcmbPersons();    // ’S“–ŽÒƒRƒ“ƒ{ƒ{ƒbƒNƒX•Ï�X
-                    cmbConstructionPerson.SelectedValue = PersonCode;
-                    m_initDataLoad = bSave;
-                }
+                cmbDepartment.SelectedValue = PersonRec.DepartmentCode;
+                SetcmbPersons();    // ’S“–ŽÒƒRƒ“ƒ{ƒ{ƒbƒNƒX•Ï�X
+                cmbConstructionPerson.SelectedValue = PersonCode;
 
                 return true;
             }
@@ -1154,6 +1129,9 @@
             finally
             {
                 PersonDB.close(); PersonDB = null;
+
+                cmbDepartment.SelectedIndexChanged += new EventHandler(cmbDepartment_SelectedIndexChanged);
+                cmbConstructionPerson.SelectedIndexChanged += new EventHandler(cmbConstructionPerson_SelectedIndexChanged);
             }
         }
         #endregion
Index: branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/RequestEntry/FrmReqEntPrtOut.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/RequestEntry/FrmReqEntPrtOut.cs	(revision 329)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/RequestEntry/FrmReqEntPrtOut.cs	(revision 330)
@@ -133,7 +133,7 @@
         /// <summary>
         /// å�°åˆ·æ—¥ä»˜
         /// </summary>
-        public DateTime bDatePrintOut
+        public DateTime DatePrintOut
         {
             get { return m_bDatePrintOut; }
             set { m_bDatePrintOut = value; }
@@ -280,228 +280,6 @@
         }
         #endregion
 
-        #region è«‹æ±‚æ›¸ãƒ‡ãƒ¼ã‚¿ã�®å��æ˜ 
-        /// <summary>
-        /// è«‹æ±‚æ›¸ãƒ‡ãƒ¼ã‚¿ã�®å��æ˜ 
-        /// </summary>
-        private void EntryInvoiceData()
-        {
-            //long lTotalAmount = 0;
-            //long lTaxAmount = 0;
-
-            //foreach (RequestHead ReqHead in m_lstReqHead)
-            //{
-            //    lTotalAmount += ReqHead.RequestTotalAmount;
-            //    lTaxAmount += ReqHead.TaxAmount;
-            //}
-
-            //m_InvData.TotalAmount = lTotalAmount;
-            //m_InvData.TaxAmount = lTaxAmount;
-
-            //m_InvData.RequestDate = m_ExcuteDate;
-
-            //m_InvData.Comment1 = txtComment1.Text;
-            //m_InvData.Comment2 = txtComment2.Text;
-            //m_InvData.Comment3 = txtComment3.Text;
-            //m_InvData.Comment4 = txtComment4.Text;
-            //m_InvData.Comment5 = txtComment5.Text;
-
-            //m_InvData.CompleteFlg = 1;
-
-            //if (UpdateInvoiceData() == false)
-            //{
-            //    return;
-            //}
-        }
-        #endregion
-
-        #region è«‹æ±‚æ›¸ãƒ‡ãƒ¼ã‚¿æ›´æ–°
-        private bool UpdateInvoiceData()
-        {
-            IOInvoiceData ioInvData = new IOInvoiceData();
-
-            try
-            {
-                string sql = ioInvData.CreatePrimarykeyString(m_InvData.InvoiceNo);
-                if (ioInvData.UpdateAction(sql, m_InvData) == false)
-                {
-                    return false;
-                }
-
-                return true;
-            }
-            catch (Exception ex)
-            {
-                logger.ErrorFormat("ã‚·ã‚¹ãƒ†ãƒ ã‚¨ãƒ©ãƒ¼ï¼š{0}ï¼š{1}", CommonMotions.GetMethodName(), ex.Message);
-
-                return false;
-            }
-            finally
-            {
-                ioInvData.close();
-                ioInvData = null;
-            }
-
-        }
-
-        #endregion
-
-        #region å·¥äº‹ãƒ‡ãƒ¼ã‚¿æ›´æ–°
-        /// <summary>
-        /// å·¥äº‹åŸºæœ¬æƒ…å ±ã‚’æ›´æ–°ã�™ã‚‹
-        /// </summary>
-        /// <returns></returns>
-        private bool UpdateConstructionBaseInfo()
-        {
-
-            IOConstructionBaseInfo ioInfo = new IOConstructionBaseInfo();
-            IOConstructionProgressDate ioPrgDate = new IOConstructionProgressDate();
-
-            List<int> lstKeyInfo = new List<int>(m_dicConstructionBaseInfo.Keys);
-
-            Dictionary<int, int> dicCodeWork = new Dictionary<int, int>();
-
-            // ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³é–‹å§‹
-            ioInfo.beginTran();
-            ioPrgDate.beginTran();
-
-            string sql = "";
-
-            try
-            {
-                foreach (int nConstructionCode in lstKeyInfo)
-                {
-                    int nOldStatus = 0;
-                    ConstructionBaseInfo Info = null;
-
-                    // å·¥äº‹åŸºæœ¬æƒ…å ±ã�®å�–å¾—
-                    if (m_dicConstructionBaseInfo.TryGetValue(nConstructionCode, out Info) == false)
-                    {
-                        ioInfo.rollback();
-                        ioPrgDate.rollback();
-                        return false;
-                    }
-
-                    nOldStatus = Info.ConstructionStatusFlg;
-
-                    // å·¥äº‹çŠ¶æ…‹ã�Œã€Œè«‹æ±‚æº–å‚™ã€�ã�§ã�¯ã�ªã�„å ´å�ˆã�¯å¯¾è±¡å¤–
-                    if (nOldStatus != (int)CommonDefine.StatNumArray.Status9)
-                    {
-                        continue;
-                    }
-
-                    // å·¥äº‹åŸºæœ¬æƒ…å ±ã�§è«‹æ±‚ä¸€æ‹¬ã�§ã�ªã�„å ´å�ˆã�¯å¯¾è±¡å¤–
-                    if (Info.BillingSplitFlg != (int)ConstructionBaseInfo.BillingSplitFlgDef.AllOnBilling)
-                    {
-                        continue;
-                    }
-
-                    // å·¥äº‹çŠ¶æ…‹ãƒ•ãƒ©ã‚°ã‚’ã€Œè«‹æ±‚ç¢ºèª�ã€�ã�«å¤‰æ›´
-                    Info.ConstructionStatusFlg = (int)CommonDefine.StatNumArray.Status10;
-
-                    // å·¥äº‹åŸºæœ¬æƒ…å ±ã‚’æ›´æ–°
-                    sql = ioInfo.CreatePrimarykeyString(nConstructionCode);
-                    if (ioInfo.UpdateAction(sql, Info) == false)
-                    {
-                        ioInfo.rollback();
-                        ioPrgDate.rollback();
-                        return false;
-                    }
-
-                    // æ—¢ã�«ãƒ‡ãƒ¼ã‚¿ã�Œå­˜åœ¨ã�—ã�ªã�„ã�‹ä¸€åº¦æ¤œç´¢ã�—ã�¦ã�Šã��
-                    sql = ioPrgDate.CreatePrimarykeyString(nConstructionCode, Info.ConstructionStatusFlg);
-                    List<ConstructionProgressDate> lstPrgDate = new List<ConstructionProgressDate>();
-                    if (ioPrgDate.SelectAction(sql, ref lstPrgDate) == false)
-                    {
-                        ioInfo.rollback();
-                        ioPrgDate.rollback();
-                        return false;
-                    }
-
-                    // ãƒ‡ãƒ¼ã‚¿ã�Œã�‚ã‚‹å ´å�ˆã�¯ã€�å½“è©²ãƒ‡ãƒ¼ã‚¿ã‚’å‰Šé™¤ã�™ã‚‹
-                    if (lstPrgDate.Count > 0)
-                    {
-                        // è©²å½“ãƒ‡ãƒ¼ã‚¿ã‚’å‰Šé™¤
-                        sql = ioPrgDate.CreatePrimarykeyString(nConstructionCode, Info.ConstructionStatusFlg);
-                        if (ioPrgDate.DeleteAction(sql) == false)
-                        {
-                            ioInfo.rollback();
-                            ioPrgDate.rollback();
-                            return false;
-                        }
-                    }
-
-                    // æ¡ˆä»¶é€²æ�—æ—¥ä»˜ãƒ‡ãƒ¼ã‚¿ã�®æ§‹ç¯‰
-                    ConstructionProgressDate PrgDate = new ConstructionProgressDate();
-
-                    // æ¡ˆä»¶é€²æ�—æ—¥ä»˜ãƒ‡ãƒ¼ã‚¿ã�®è¨­å®š
-                    PrgDate.ConstructionCode = nConstructionCode;
-                    PrgDate.ConstructionStatusFlg = (int)CommonDefine.StatNumArray.Status10;
-                    PrgDate.PreviousStatusFlg = nOldStatus;
-                    PrgDate.ChangeDate = DateTime.Now;
-                    PrgDate.ChangePersonCode = CommonMotions.LoginUserData.PersonCode;
-
-                    // æ¡ˆä»¶é€²æ�—æ—¥ä»˜ãƒ‡ãƒ¼ã‚¿ã‚’æŒ¿å…¥
-                    if (ioPrgDate.InsertAction(PrgDate) == false)
-                    {
-                        ioInfo.rollback();
-                        ioPrgDate.rollback();
-                        return false;
-                    }
-
-                    // å¯¾è±¡å·¥äº‹ã�Œçµ�å�ˆï¼ˆå­�ï¼‰å·¥äº‹ã�®å ´å�ˆ
-                    if (Info.JoinFlg == (int)ConstructionBaseInfo.JoinFlgDef.JoinChildren)
-                    {
-                        // çµ�å�ˆï¼ˆè¦ªï¼‰å·¥äº‹ç•ªå�·ã�®å�–å¾—
-                        int nParentCode = GetJoinParentConstructionCode(nConstructionCode);
-
-                        int nChildCode = 0;
-
-                        // è¦ªå·¥äº‹ç•ªå�·ã�Œç™»éŒ²ã�•ã‚Œã�¦ã�„ã�ªã�„å ´å�ˆã�¯ç™»éŒ²ã�™ã‚‹
-                        if (dicCodeWork.TryGetValue(nParentCode, out nChildCode) == false)
-                        {
-                            // çµ�å�ˆï¼ˆè¦ªï¼‰ã�®å·¥äº‹çŠ¶æ…‹ã‚’æ›´æ–°ã�™ã‚‹ã�Ÿã‚�ã�«å·¥äº‹ç•ªå�·ã‚’é€€é�¿
-                            dicCodeWork.Add(nParentCode, nConstructionCode);
-                        }
-                    }
-
-                }
-
-                List<int> lstKeyLink = new List<int>(dicCodeWork.Keys);
-
-                foreach (int nParentCode in lstKeyLink)
-                {
-                    int nChildCode = 0;
-
-                    if (dicCodeWork.TryGetValue(nParentCode, out nChildCode) == true)
-                    {
-                        // çµ�å�ˆï¼ˆè¦ªï¼‰ã�®å·¥äº‹çŠ¶æ…‹ã‚’å¤‰æ›´
-                        ClsChangeBaseInfoData.SetParentConstrStatus(ioInfo, nChildCode);
-                    }
-                }
-
-                // DBã‚³ãƒŸãƒƒãƒˆ
-                ioInfo.commit();
-                ioPrgDate.commit();
-
-                return true;
-            }
-            catch (Exception ex)
-            {
-                logger.ErrorFormat("ã‚·ã‚¹ãƒ†ãƒ ã‚¨ãƒ©ãƒ¼ï¼š{0}ï¼š{1}", CommonMotions.GetMethodName(), ex.Message);
-                return false;
-            }
-            finally
-            {
-                ioInfo.close();
-                ioInfo = null;
-                ioPrgDate.close();
-                ioPrgDate = null;
-            }
-        }
-
-        #endregion
-
         #region DBã‚¢ã‚¯ã‚»ã‚¹å‡¦ç�†
         #region è«‹æ±‚ãƒ‡ãƒ¼ã‚¿å�–å¾—
         /// <summary>
Index: branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/RequestEntry/FrmRequestPrint.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/RequestEntry/FrmRequestPrint.cs	(revision 329)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/RequestEntry/FrmRequestPrint.cs	(revision 330)
@@ -142,7 +142,7 @@
         /// <summary>
         /// Excelå�°åˆ·ã‚¯ãƒ©ã‚¹ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆ
         /// </summary>
-        private UsedExcel m_UsedExcel = null;
+        //private UsedExcel m_UsedExcel = null;
 
         /// <summary>
         /// ä¿�å­˜æ™‚Excelãƒ‘ã‚¹
@@ -154,15 +154,15 @@
         /// </summary>
         private int m_nInvoiceNo = 0;
 
-        /// <summary>
-        /// è«‹æ±‚æ›¸ãƒ‡ãƒ¼ã‚¿
-        /// </summary>
-        private InvoiceData m_InvData = new InvoiceData();
+        ///// <summary>
+        ///// è«‹æ±‚æ›¸ãƒ‡ãƒ¼ã‚¿
+        ///// </summary>
+        //private InvoiceData m_InvData = new InvoiceData();
 
         /// <summary>
         /// è«‹æ±‚æ›¸ãƒ˜ãƒƒãƒ€
         /// </summary>
-        private List<RequestHead> m_lstReqHead = new List<RequestHead>();
+        //private List<RequestHead> m_lstReqHead = new List<RequestHead>();
 
         /// <summary>
         /// è«‹æ±‚ãƒ‡ãƒ¼ã‚¿
@@ -344,7 +344,8 @@
         /// </summary>
         /// <param name="sender"></param>
         /// <param name="e"></param>
-        private async void btnExecProc1_Click(object sender, EventArgs e)
+        //private async void btnExecProc1_Click(object sender, EventArgs e)
+        private void btnExecProc1_Click(object sender, EventArgs e)
         {
             // çŠ¶æ…‹ç¢ºèª�
             if (!StatusChange()) return;
@@ -361,11 +362,11 @@
             // å·¥äº‹åŸºæœ¬æƒ…å ±ã‚’æ›´æ–°ã�™ã‚‹
             UpdateConstructionBaseInfo();
 
-            await Task.Run(() =>
-            {
-                // å�°åˆ·å‡¦ç�†
-                PrintMain(true);
-            });
+            //await Task.Run(() =>
+            //{
+            //    // å�°åˆ·å‡¦ç�†
+            //    PrintMain(true);
+            //});
 
             m_EndButton = DialogResult.Yes;
             this.Close();
@@ -378,7 +379,8 @@
         /// </summary>
         /// <param name="sender"></param>
         /// <param name="e"></param>
-        private async void btnExecProc2_Click(object sender, EventArgs e)
+        //private async void btnExecProc2_Click(object sender, EventArgs e)
+        private void btnExecProc2_Click(object sender, EventArgs e)
         {
             // ä¿�å­˜å…ˆæŒ‡å®šãƒ€ã‚¤ã‚¢ãƒ­ã‚°ã�®è¡¨ç¤º
             FrmSaveFilePath frm = new FrmSaveFilePath();
@@ -406,11 +408,11 @@
             UpdateConstructionBaseInfo();
 
             // é�žå�ŒæœŸã�§å�°åˆ·å‡¦ç�†ã‚’å®Ÿè¡Œã�™ã‚‹
-            await Task.Run(() =>
-            {
-                // å�°åˆ·å‡¦ç�†
-                PrintMain(false);
-            });
+            //await Task.Run(() =>
+            //{
+            //    // å�°åˆ·å‡¦ç�†
+            //    PrintMain(false);
+            //});
 
             m_EndButton = DialogResult.No;
             this.Close();
@@ -517,17 +519,15 @@
             {
                 bool bRet = true;
 
+                InvoiceData InvData = new InvoiceData();
+                List<RequestHead> lstReqHead = new List<RequestHead>();
                 // è«‹æ±‚æ›¸ãƒ‡ãƒ¼ã‚¿ã�®å�–å¾—
-                if( GetInvoiceData() == false){
-                    return false;
-                }
+                if (!GetInvoiceData(ref InvData, ref lstReqHead)) return false;
 
                 // æœ¬å·¥äº‹ã�®å·¥äº‹æƒ…å ±ã�®å�–å¾—
-                if( GetMainConstructionBaseInfo() == false){
-                    return false;
-                }
+                if (!GetMainConstructionBaseInfo(lstReqHead)) return false;
 
-                if (m_InvData.RequestDate == DateTime.MinValue)
+                if (InvData.RequestDate == DateTime.MinValue)
                 {
                     // åˆ�æœŸæ™‚é–“ã‚»ãƒƒãƒˆ
                     dateTimePicker1.Value = m_ExcuteDate;
@@ -534,16 +534,16 @@
                 }
                 else
                 {
-                    dateTimePicker1.Value = m_InvData.RequestDate;
+                    dateTimePicker1.Value = InvData.RequestDate;
                 }
 
-                lblOrderersName.Text = m_InvData.RequestName;
+                lblOrderersName.Text = InvData.RequestName;
 
-                txtComment1.Text = m_InvData.Comment1;
-                txtComment2.Text = m_InvData.Comment2;
-                txtComment3.Text = m_InvData.Comment3;
-                txtComment4.Text = m_InvData.Comment4;
-                txtComment5.Text = m_InvData.Comment5;
+                txtComment1.Text = InvData.Comment1;
+                txtComment2.Text = InvData.Comment2;
+                txtComment3.Text = InvData.Comment3;
+                txtComment4.Text = InvData.Comment4;
+                txtComment5.Text = InvData.Comment5;
 
                 // ToolTipã�®è¨­å®š
                 SetToolTip();
@@ -559,6 +559,9 @@
         #endregion
 
         #region ToolTipã�®è¨­å®š
+        /// <summary>
+        /// ToolTipã�®è¨­å®š
+        /// </summary>
         private void SetToolTip()
         {
             // ToolTipã�Œè¡¨ç¤ºã�•ã‚Œã‚‹ã�¾ã�§ã�®æ™‚é–“
@@ -574,17 +577,22 @@
             ToolTip1.SetToolTip(dateTimePicker1, "è«‹æ±‚æ—¥ã�Œè¡¨ç¤ºã�•ã‚Œã�¦ã�„ã‚‹æ—¥ä»˜ã�¨é�•ã�†å ´å�ˆã�¯ã€�å¤‰æ›´ã�—ã�¦ã��ã� ã�•ã�„ã€‚");
             ToolTip1.SetToolTip(rdPrint, "è«‹æ±‚æ—¥ã‚’è«‹æ±‚æ›¸ã�¸ã€Œå�°åˆ·ã�™ã‚‹ã€�å ´å�ˆã�¯ã€�ã�“ã�¡ã‚‰ã‚’é�¸æŠžã�—ã�¦ã��ã� ã�•ã�„ã€‚");
             ToolTip1.SetToolTip(rdNoPrint, "è«‹æ±‚æ—¥ã‚’è«‹æ±‚æ›¸ã�¸ã€Œå�°åˆ·ã�›ã�šã�«ç©ºç™½ã€�ã�§å�°åˆ·ã�™ã‚‹å ´å�ˆã�¯ã€�ã�“ã�¡ã‚‰ã‚’é�¸æŠžã�—ã�¦ã��ã� ã�•ã�„ã€‚");
-
-            //ToolTip1.SetToolTip(rdChange, "å·¥äº‹é€²æ�—çŠ¶æ…‹ã‚’å¤‰æ›´ã�—ã�¦æ¬¡ã�®å‡¦ç�†ã�¸é€²ã‚€å ´å�ˆã�¯ã€�ã�“ã�¡ã‚‰ã‚’é�¸æŠžã�—ã�¦ã��ã� ã�•ã�„ã€‚");
-            //ToolTip1.SetToolTip(rdNoChange, "å·¥äº‹é€²æ�—é€²æ�—ã‚’ç�¾åœ¨ã�®çŠ¶æ…‹ã�‹ã‚‰å¤‰æ›´ã�—ã�ªã�„å ´å�ˆã�¯ã€�ã�“ã�¡ã‚‰ã‚’é�¸æŠžã�—ã�¦ã��ã� ã�•ã�„ã€‚");
         }
         #endregion
 
+        #region è«‹æ±‚é‡‘é¡�é€€é�¿ã‚¨ãƒªã‚¢
+        /// <summary>
+        /// è«‹æ±‚é‡‘é¡�é€€é�¿ã‚¨ãƒªã‚¢
+        /// </summary>
+        private long m_lTotalAmount = 0;    // å�ˆè¨ˆé‡‘é¡�
+        private long m_lTaxAmount = 0;      // å�ˆè¨ˆç¨Žé‡‘
+        #endregion
+
         #region è«‹æ±‚æ›¸ãƒ‡ãƒ¼ã‚¿ã�®å�–å¾—
         /// <summary>
         /// è«‹æ±‚æ›¸ãƒ‡ãƒ¼ã‚¿ã�®å�–å¾—
         /// </summary>
-        private bool GetInvoiceData()
+        private bool GetInvoiceData(ref InvoiceData InvData, ref List<RequestHead> lstReqHead)
         {
             IOInvoiceData ioInvData = new IOInvoiceData();
             IORequestHead ioReqHead = new IORequestHead();
@@ -596,30 +604,24 @@
 
                 // è«‹æ±‚æ›¸ãƒ‡ãƒ¼ã‚¿ã�®å�–å¾—
                 sql = ioInvData.CreatePrimarykeyString(m_nInvoiceNo);
-                if (ioInvData.SelectAction(sql, ref m_InvData) == false)
-                {
-                    return false;
-                }
+                if (!ioInvData.SelectAction(sql, ref InvData)) return false;
 
                 // è«‹æ±‚ãƒ˜ãƒƒãƒ€ã�®å�–å¾—
                 sql = string.Format(" WHERE InvoiceNo = {0} ORDER BY ReqConstructionCode", m_nInvoiceNo);
-                if (ioReqHead.SelectAction(sql, ref m_lstReqHead) == false)
-                {
-                    return false;
-                }
+                if (!ioReqHead.SelectAction(sql, ref lstReqHead)) return false;
 
-                foreach (RequestHead ReqHead in m_lstReqHead)
+                foreach (RequestHead ReqHead in lstReqHead)
                 {
                     // è«‹æ±‚ãƒ˜ãƒƒãƒ€ã�®å�–å¾—
                     sql = string.Format(" WHERE RequestNo = {0} ORDER BY MainConstructionCode", ReqHead.RequestNo);
                     List<RequestData> lstReqData = new List<RequestData>();
-                    if (ioReqData.SelectAction(sql, ref lstReqData) == false)
-                    {
-                        return false;
-                    }
+                    if (!ioReqData.SelectAction(sql, ref lstReqData)) return false;
 
                     m_dicReqData.Add(ReqHead.RequestNo, lstReqData);
 
+                    // è«‹æ±‚é‡‘é¡�é›†è¨ˆ
+                    m_lTotalAmount += ReqHead.RequestTotalAmount;
+                    m_lTaxAmount += ReqHead.TaxAmount;
                 }
 
                 return true;
@@ -632,12 +634,9 @@
             }
             finally
             {
-                ioInvData.close();
-                ioInvData = null;
-                ioReqHead.close();
-                ioReqHead = null;
-                ioReqData.close();
-                ioReqData = null;
+                ioInvData.close(); ioInvData = null;
+                ioReqHead.close(); ioReqHead = null;
+                ioReqData.close(); ioReqData = null;
             }
 
         }
@@ -644,11 +643,15 @@
         #endregion
 
         #region å·¥äº‹åŸºæœ¬æƒ…å ±ã�®è¿½åŠ 
+        /// <summary>
+        /// å·¥äº‹åŸºæœ¬æƒ…å ±ã�®è¿½åŠ 
+        /// </summary>
+        /// <param name="Info"></param>
         private void AddConstructionBaseInfoDic(ConstructionBaseInfo Info)
         {
             ConstructionBaseInfo wrk = null;
 
-            if (m_dicConstructionBaseInfo.TryGetValue(Info.ConstructionCode, out wrk) == false)
+            if (!m_dicConstructionBaseInfo.TryGetValue(Info.ConstructionCode, out wrk))
             {
                 m_dicConstructionBaseInfo.Add(Info.ConstructionCode, Info);
             }
@@ -659,46 +662,36 @@
         /// <summary>
         /// å·¥äº‹åŸºæœ¬æƒ…å ±ã�®å�–å¾—
         /// </summary>
-        private bool GetMainConstructionBaseInfo()
+        private bool GetMainConstructionBaseInfo(List<RequestHead> lstReqHead)
         {
             IOConstructionBaseInfo ioInfo = new IOConstructionBaseInfo();
 
-            foreach (RequestHead ReqHead in m_lstReqHead)
+            try
             {
-                string sql = ioInfo.CreatePrimarykeyString(ReqHead.ReqConstructionCode);
-                ConstructionBaseInfo info = new ConstructionBaseInfo();
-                if (ioInfo.SelectAction(sql, ref info) == false)
+                foreach (RequestHead ReqHead in lstReqHead)
                 {
-                    return false;
+                    string sql = ioInfo.CreatePrimarykeyString(ReqHead.ReqConstructionCode);
+                    ConstructionBaseInfo info = new ConstructionBaseInfo();
+                    if (!ioInfo.SelectAction(sql, ref info)) return false;
+
+                    AddConstructionBaseInfoDic(info);
                 }
 
-                AddConstructionBaseInfoDic(info);
-            }
-
-            List<int> lstKey = new List<int>(m_dicReqData.Keys);
-            try
-            {
+                List<int> lstKey = new List<int>(m_dicReqData.Keys);
                 foreach (int nRequestNo in lstKey)
                 {
                     List<RequestData> lstReqData = null;
 
-                    if (m_dicReqData.TryGetValue(nRequestNo, out lstReqData) == false)
-                    {
-                        return false;
-                    }
+                    if (!m_dicReqData.TryGetValue(nRequestNo, out lstReqData)) return false;
 
                     foreach (RequestData ReqData in lstReqData)
                     {
                         string sql = ioInfo.CreatePrimarykeyString(ReqData.MainConstructionCode);
                         ConstructionBaseInfo info = new ConstructionBaseInfo();
-                        if (ioInfo.SelectAction(sql, ref info) == false)
-                        {
-                            return false;
-                        }
+                        if (!ioInfo.SelectAction(sql, ref info)) return false;
 
                         AddConstructionBaseInfoDic(info);
                     }
-
                 }
 
                 return true;
@@ -706,13 +699,11 @@
             catch (Exception ex)
             {
                 logger.ErrorFormat("ã‚·ã‚¹ãƒ†ãƒ ã‚¨ãƒ©ãƒ¼ï¼š{0}ï¼š{1}", CommonMotions.GetMethodName(), ex.Message);
-
                 return false;
             }
             finally
             {
-                ioInfo.close();
-                ioInfo = null;
+                ioInfo.close(); ioInfo = null;
             }
 
         }
@@ -719,52 +710,36 @@
         #endregion
 
         #region è«‹æ±‚æ›¸ãƒ‡ãƒ¼ã‚¿ã�®å��æ˜ 
-        private void EntryInvoiceData()
+        /// <summary>
+        /// è«‹æ±‚æ›¸ãƒ‡ãƒ¼ã‚¿ã�®å��æ˜ 
+        /// </summary>
+        /// <returns></returns>
+        private bool EntryInvoiceData()
         {
-            long lTotalAmount = 0;
-            long lTaxAmount = 0;
+            IOInvoiceData ioInvData = new IOInvoiceData();
 
-            foreach (RequestHead ReqHead in m_lstReqHead)
+            try
             {
-                lTotalAmount += ReqHead.RequestTotalAmount;
-                lTaxAmount += ReqHead.TaxAmount;
-            }
+                InvoiceData invoiceData = new InvoiceData();
 
-            m_InvData.TotalAmount = lTotalAmount;
-            m_InvData.TaxAmount = lTaxAmount;
+                StringBuilder sql = new StringBuilder();
+                sql.Append(ioInvData.CreatePrimarykeyString(m_nInvoiceNo));
+                if (!ioInvData.SelectAction(sql.ToString(), ref invoiceData)) return false;
 
-            m_InvData.RequestDate = m_ExcuteDate;
+                invoiceData.TotalAmount = m_lTotalAmount;
+                invoiceData.TaxAmount = m_lTaxAmount;
+                invoiceData.RequestDate = m_ExcuteDate;
 
-            m_InvData.Comment1 = txtComment1.Text;
-            m_InvData.Comment2 = txtComment2.Text;
-            m_InvData.Comment3 = txtComment3.Text;
-            m_InvData.Comment4 = txtComment4.Text;
-            m_InvData.Comment5 = txtComment5.Text;
+                invoiceData.Comment1 = txtComment1.Text;
+                invoiceData.Comment2 = txtComment2.Text;
+                invoiceData.Comment3 = txtComment3.Text;
+                invoiceData.Comment4 = txtComment4.Text;
+                invoiceData.Comment5 = txtComment5.Text;
 
-            m_InvData.CompleteFlg = 1;
+                invoiceData.CompleteFlg = 1;
 
-            if (UpdateInvoiceData() == false)
-            {
-                return;
+                return ioInvData.UpdateAction(sql.ToString(), invoiceData);
             }
-        }
-        #endregion
-
-        #region è«‹æ±‚æ›¸ãƒ‡ãƒ¼ã‚¿æ›´æ–°
-        private bool UpdateInvoiceData()
-        {
-            IOInvoiceData ioInvData = new IOInvoiceData();
-
-            try
-            {
-                string sql = ioInvData.CreatePrimarykeyString( m_InvData.InvoiceNo );
-                if (ioInvData.UpdateAction(sql, m_InvData) == false)
-                {
-                    return false;
-                }
-
-                return true;
-            }
             catch (Exception ex)
             {
                 logger.ErrorFormat("ã‚·ã‚¹ãƒ†ãƒ ã‚¨ãƒ©ãƒ¼ï¼š{0}ï¼š{1}", CommonMotions.GetMethodName(), ex.Message);
@@ -773,10 +748,8 @@
             }
             finally
             {
-                ioInvData.close();
-                ioInvData = null;
+                ioInvData.close();                ioInvData = null;
             }
-
         }
         
         #endregion
@@ -810,7 +783,7 @@
                     ConstructionBaseInfo Info = null;
 
                     // å·¥äº‹åŸºæœ¬æƒ…å ±ã�®å�–å¾—
-                    if (m_dicConstructionBaseInfo.TryGetValue(nConstructionCode, out Info) == false)
+                    if (!m_dicConstructionBaseInfo.TryGetValue(nConstructionCode, out Info))
                     {
                         ioInfo.rollback();
                         ioPrgDate.rollback();
@@ -820,16 +793,10 @@
                     nOldStatus = Info.ConstructionStatusFlg;
 
                     // å·¥äº‹çŠ¶æ…‹ã�Œã€Œè«‹æ±‚æº–å‚™ã€�ã�§ã�¯ã�ªã�„å ´å�ˆã�¯å¯¾è±¡å¤–
-                    if (nOldStatus != (int)CommonDefine.StatNumArray.Status9)
-                    {
-                        continue;
-                    }
+                    if (nOldStatus != (int)CommonDefine.StatNumArray.Status9) continue;
 
                     // å·¥äº‹åŸºæœ¬æƒ…å ±ã�§è«‹æ±‚ä¸€æ‹¬ã�§ã�ªã�„å ´å�ˆã�¯å¯¾è±¡å¤–
-                    if (Info.BillingSplitFlg != (int)ConstructionBaseInfo.BillingSplitFlgDef.AllOnBilling)
-                    {
-                        continue;
-                    }
+                    if (Info.BillingSplitFlg != (int)ConstructionBaseInfo.BillingSplitFlgDef.AllOnBilling) continue;
 
                     // å·¥äº‹çŠ¶æ…‹ãƒ•ãƒ©ã‚°ã‚’ã€Œè«‹æ±‚ç¢ºèª�ã€�ã�«å¤‰æ›´
                     Info.ConstructionStatusFlg = (int)CommonDefine.StatNumArray.Status10;
@@ -836,7 +803,7 @@
 
                     // å·¥äº‹åŸºæœ¬æƒ…å ±ã‚’æ›´æ–°
                     sql = ioInfo.CreatePrimarykeyString(nConstructionCode);
-                    if (ioInfo.UpdateAction(sql, Info) == false)
+                    if (!ioInfo.UpdateAction(sql, Info, false))
                     {
                         ioInfo.rollback();
                         ioPrgDate.rollback();
@@ -846,7 +813,7 @@
                     // æ—¢ã�«ãƒ‡ãƒ¼ã‚¿ã�Œå­˜åœ¨ã�—ã�ªã�„ã�‹ä¸€åº¦æ¤œç´¢ã�—ã�¦ã�Šã��
                     sql = ioPrgDate.CreatePrimarykeyString(nConstructionCode, Info.ConstructionStatusFlg);
                     List<ConstructionProgressDate> lstPrgDate = new List<ConstructionProgressDate>();
-                    if (ioPrgDate.SelectAction(sql, ref lstPrgDate) == false)
+                    if (!ioPrgDate.SelectAction(sql, ref lstPrgDate, false))
                     {
                         ioInfo.rollback();
                         ioPrgDate.rollback();
@@ -858,7 +825,7 @@
                     {
                         // è©²å½“ãƒ‡ãƒ¼ã‚¿ã‚’å‰Šé™¤
                         sql = ioPrgDate.CreatePrimarykeyString(nConstructionCode, Info.ConstructionStatusFlg);
-                        if (ioPrgDate.DeleteAction(sql) == false)
+                        if (!ioPrgDate.DeleteAction(sql, false))
                         {
                             ioInfo.rollback();
                             ioPrgDate.rollback();
@@ -877,7 +844,7 @@
                     PrgDate.ChangePersonCode = CommonMotions.LoginUserData.PersonCode;
 
                     // æ¡ˆä»¶é€²æ�—æ—¥ä»˜ãƒ‡ãƒ¼ã‚¿ã‚’æŒ¿å…¥
-                    if (ioPrgDate.InsertAction(PrgDate) == false)
+                    if (!ioPrgDate.InsertAction(PrgDate, false))
                     {
                         ioInfo.rollback();
                         ioPrgDate.rollback();
@@ -893,7 +860,7 @@
                         int nChildCode = 0;
 
                         // è¦ªå·¥äº‹ç•ªå�·ã�Œç™»éŒ²ã�•ã‚Œã�¦ã�„ã�ªã�„å ´å�ˆã�¯ç™»éŒ²ã�™ã‚‹
-                        if (dicCodeWork.TryGetValue(nParentCode, out nChildCode) == false)
+                        if (!dicCodeWork.TryGetValue(nParentCode, out nChildCode))
                         {
                             // çµ�å�ˆï¼ˆè¦ªï¼‰ã�®å·¥äº‹çŠ¶æ…‹ã‚’æ›´æ–°ã�™ã‚‹ã�Ÿã‚�ã�«å·¥äº‹ç•ªå�·ã‚’é€€é�¿
                             dicCodeWork.Add(nParentCode, nConstructionCode);
@@ -908,7 +875,7 @@
                 {
                     int nChildCode = 0;
 
-                    if (dicCodeWork.TryGetValue(nParentCode, out nChildCode) == true)
+                    if (dicCodeWork.TryGetValue(nParentCode, out nChildCode))
                     {
                         // çµ�å�ˆï¼ˆè¦ªï¼‰ã�®å·¥äº‹çŠ¶æ…‹ã‚’å¤‰æ›´
                         ClsChangeBaseInfoData.SetParentConstrStatus(ioInfo, nChildCode);
@@ -938,167 +905,13 @@
         #endregion
 
         #region DBã‚¢ã‚¯ã‚»ã‚¹å‡¦ç�†
-        #region è«‹æ±‚ãƒ‡ãƒ¼ã‚¿å�–å¾—
-        /// <summary>
-        /// è«‹æ±‚ãƒ‡ãƒ¼ã‚¿å�–å¾—
-        /// </summary>
-        /// <param name="constCode">æœ¬å·¥äº‹ç•ªå�·</param>
-        /// <param name="data"></param>
-        /// <returns></returns>
-        private bool GetRequestData(int constCode, ref RequestData data)
-        {
-            //var cbDB = new IORequestData();
-            try
-            {
-                //// è«‹æ±‚ãƒ‡ãƒ¼ã‚¿å�–å¾—ã‚¯ãƒ©ã‚¹é ˜åŸŸ
-                //var wrk = new List<RequestData>();
 
-                //// è«‹æ±‚ãƒ‡ãƒ¼ã‚¿å�–å¾—SQL
-                //string strSQL = cbDB.CreateSubkeyString(constCode);
-
-                //// è«‹æ±‚ãƒ‡ãƒ¼ã‚¿å�–å¾—
-                //if (!cbDB.SelectAction(strSQL, ref wrk)) return false;
-
-                //if (wrk.Count != 1) return false;
-
-                //data = wrk[0];
-            }
-            catch (Exception ex)
-            {
-                logger.ErrorFormat("ã‚·ã‚¹ãƒ†ãƒ ã‚¨ãƒ©ãƒ¼ï¼š{0}ï¼š{1}", CommonMotions.GetMethodName(), ex.Message);
-                return false;
-            }
-            finally
-            {
-                //cbDB.close(); cbDB = null;
-            }
-
-            return true;
-        }
-        #endregion
-
-        #region è«‹æ±‚æ›¸å�ˆè¨ˆãƒ‡ãƒ¼ã‚¿å�–å¾—
+        #region çµ�å�ˆè¦ªå·¥äº‹ç•ªå�·ã�®å�–å¾—
         /// <summary>
-        /// è«‹æ±‚æ›¸å�ˆè¨ˆãƒ‡ãƒ¼ã‚¿å�–å¾—
+        /// çµ�å�ˆè¦ªå·¥äº‹ç•ªå�·ã�®å�–å¾—
         /// </summary>
-        /// <param name="requestNo"></param>
-        /// <param name="datas"></param>
+        /// <param name="nConstructionCode"></param>
         /// <returns></returns>
-        //private bool GetRequestTotalData(int requestNo, ref List<RequestTotalData> datas)
-        //{
-        //    var cbDB = new IORequestTotalData();
-        //    try
-        //    {
-        //        // è«‹æ±‚æ›¸å�ˆè¨ˆãƒ‡ãƒ¼ã‚¿å�–å¾—ã‚¯ãƒ©ã‚¹é ˜åŸŸ
-        //        var wrk = new List<RequestTotalData>();
-
-        //        // è«‹æ±‚æ›¸å�ˆè¨ˆãƒ‡ãƒ¼ã‚¿å�–å¾—SQL
-        //        string strSQL = cbDB.CreatePrimarykeyString(requestNo);
-
-        //        // ã‚½ãƒ¼ãƒˆæ�¡ä»¶è¿½åŠ 
-        //        strSQL += " ORDER BY REQUESTNO, ORDERNO";
-
-        //        // è«‹æ±‚æ›¸å�ˆè¨ˆãƒ‡ãƒ¼ã‚¿å�–å¾—
-        //        if (!cbDB.SelectAction(strSQL, ref wrk)) return false;
-
-        //        // è«‹æ±‚æ›¸å�ˆè¨ˆãƒ‡ãƒ¼ã‚¿å�–å¾—ã‚¯ãƒ©ã‚¹é ˜åŸŸ
-        //        datas = wrk;
-
-        //    }
-        //    catch (Exception ex)
-        //    {
-        //        logger.ErrorFormat("ã‚·ã‚¹ãƒ†ãƒ ã‚¨ãƒ©ãƒ¼ï¼š{0}ï¼š{1}", CommonMotions.GetMethodName(), ex.Message);
-        //        return false;
-        //    }
-        //    finally
-        //    {
-        //        cbDB.close(); cbDB = null;
-        //    }
-        //    return true;
-        //}
-
-        #endregion
-
-        #region è«‹æ±‚æ˜Žç´°ãƒ‡ãƒ¼ã‚¿å�–å¾—
-        /// <summary>
-        /// è«‹æ±‚æ˜Žç´°ãƒ‡ãƒ¼ã‚¿å�–å¾—
-        /// </summary>
-        /// <param name="requestNo"></param>
-        /// <param name="datas"></param>
-        /// <returns></returns>
-        private bool GetRequestDataDetail(int requestNo, ref Dictionary<int, Dictionary<int, RequestDataDetail>> datas)
-        {
-            var cbDB = new IORequestDataDetail();
-            try
-            {
-                //// è«‹æ±‚æ˜Žç´°ãƒ‡ãƒ¼ã‚¿å�–å¾—ã‚¯ãƒ©ã‚¹é ˜åŸŸ
-                //var wrk = new List<RequestDataDetail>();
-
-                //// è«‹æ±‚æ˜Žç´°ãƒ‡ãƒ¼ã‚¿å�–å¾—SQL
-                //string strSQL = cbDB.CreatePrimarykeyString(requestNo);
-
-                //// è«‹æ±‚æ˜Žç´°ãƒ‡ãƒ¼ã‚¿å�–å¾—
-                //if (!cbDB.SelectAction(strSQL, ref wrk)) return false;
-
-                //foreach (var record in wrk)
-                //{
-                //    if (!datas.ContainsKey(record.ConstructionCode))
-                //        datas[record.ConstructionCode] = new Dictionary<int, RequestDataDetail>();
-                //    datas[record.ConstructionCode][record.OrderNo] = record;
-                //}
-            }
-            catch (Exception ex)
-            {
-                logger.ErrorFormat("ã‚·ã‚¹ãƒ†ãƒ ã‚¨ãƒ©ãƒ¼ï¼š{0}ï¼š{1}", CommonMotions.GetMethodName(), ex.Message);
-                return false;
-            }
-            finally
-            {
-                cbDB.close(); cbDB = null;
-            }
-            return true;
-        }
-        #endregion
-
-        #region å·¥äº‹åŸºæœ¬æƒ…å ±å�–å¾—
-        /// <summary>
-        /// å·¥äº‹åŸºæœ¬æƒ…å ±å�–å¾—
-        /// </summary>
-        /// <param name="constructionCode"></param>
-        /// <param name="data"></param>
-        /// <returns></returns>
-        private bool GetConstructionBaseInfo(int constructionCode, ref ConstructionBaseInfo data)
-        {
-            var cbDB = new IOConstructionBaseInfo();
-            try
-            {
-                // å·¥äº‹åŸºæœ¬æƒ…å ±å�–å¾—ã‚¯ãƒ©ã‚¹é ˜åŸŸ
-                var wrk = new ConstructionBaseInfo();
-
-                // å·¥äº‹åŸºæœ¬æƒ…å ±å�–å¾—SQL
-                string strSQL = cbDB.CreatePrimarykeyString(constructionCode);
-
-                // å·¥äº‹åŸºæœ¬æƒ…å ±å�–å¾—
-                if (!cbDB.SelectAction(strSQL, ref wrk)) return false;
-
-                // å·¥äº‹åŸºæœ¬æƒ…å ±å�–å¾—ã‚¯ãƒ©ã‚¹é ˜åŸŸ
-                data = wrk;
-
-            }
-            catch (Exception ex)
-            {
-                logger.ErrorFormat("ã‚·ã‚¹ãƒ†ãƒ ã‚¨ãƒ©ãƒ¼ï¼š{0}ï¼š{1}", CommonMotions.GetMethodName(), ex.Message);
-                return false;
-            }
-            finally
-            {
-                cbDB.close(); cbDB = null;
-            }
-            return true;
-        }
-        #endregion
-
-        #region çµ�å�ˆè¦ªå·¥äº‹ç•ªå�·ã�®å�–å¾—
         private int GetJoinParentConstructionCode(int nConstructionCode)
         {
             int nParentCode = -1;
@@ -1134,945 +947,812 @@
 
         }
         #endregion
-
-        #region å·¥äº‹åŸºæœ¬æƒ…å ±æ˜Žç´°
-        /// <summary>
-        /// å·¥äº‹åŸºæœ¬æƒ…å ±æ˜Žç´°ã‚’å·¥äº‹åŸºæœ¬æƒ…å ±æ˜Žç´°ãƒ†ãƒ¼ãƒ–ãƒ«ã�‹ã‚‰å·¥äº‹ç•ªå�·ã‚’ã‚­ãƒ¼ã�«å�–å¾—ã�™ã‚‹é–¢æ•°
-        /// </summary>
-        /// <param name="datas"></param>
-        /// <returns></returns>
-        private bool GetConstructionBaseInfoDetail(List<int> lstConstCode, ref Dictionary<int,Dictionary<int,string>> datas)
-        {
-            var sbDB = new IOConstructionBaseInfoDetail();
-            try
-            {
-                // å·¥äº‹åŸºæœ¬æƒ…å ±æ˜Žç´°å�–å¾—ã‚¯ãƒ©ã‚¹é ˜åŸŸ
-                var wrk = new List<ConstructionBaseInfoDetail>();
-
-                // å·¥äº‹åŸºæœ¬æƒ…å ±æ˜Žç´°å�–å¾—SQL
-                string strSQL = " Where ConstructionCode in ( ";
-                foreach (int constCode in lstConstCode)
-                {
-                    strSQL += string.Format((lstConstCode.IndexOf(constCode) == 0) ? " {0}" : ", {0}", constCode);
-                }
-                strSQL += " )";
-
-                // å·¥äº‹åŸºæœ¬æƒ…å ±æ˜Žç´°å�–å¾—
-                if (!sbDB.SelectAction(strSQL, ref wrk)) return false;
-
-                datas.Clear();
-
-                foreach (var record in wrk)
-                {
-                    if (!datas.ContainsKey(record.ConstructionCode))
-                        datas[record.ConstructionCode] = new Dictionary<int, string>();
-                    datas[record.ConstructionCode][record.DetailNo] = record.DetailString;
-                }
-
-            }
-            catch (Exception ex)
-            {
-                logger.ErrorFormat("ã‚·ã‚¹ãƒ†ãƒ ã‚¨ãƒ©ãƒ¼ï¼š{0}ï¼š{1}", CommonMotions.GetMethodName(), ex.Message);
-                return false;
-            }
-            finally
-            {
-                sbDB.close();
-                sbDB = null;
-            }
-
-            return true;
-        }
         #endregion
 
-        #region å·¥äº‹å¢—æ¸›æƒ…å ±å�–å¾—
-        /// <summary>
-        /// å·¥äº‹å¢—æ¸›æƒ…å ±å�–å¾—
-        /// </summary>
-        /// <param name="constructionCode"></param>
-        /// <param name="datas"></param>
-        /// <returns></returns>
-        private bool GetConstructionLink(int constructionCode, ref List<int> datas)
-        {
-            var sbDB = new IOConstructionLink();
-            try
-            {
-                // å·¥äº‹å¢—æ¸›æƒ…å ±å�–å¾—ã‚¯ãƒ©ã‚¹é ˜åŸŸ
-                var wrk = new List<ConstructionLink>();
+//        #region å�°åˆ·ãƒ¡ã‚¤ãƒ³
+//        /// <summary>
+//        /// å�°åˆ·ãƒ¡ã‚¤ãƒ³
+//        /// </summary>
+//        /// <param name="bPrint">true:å�°åˆ·ã�®ã�¿,false:ä¿�å­˜ã�®ã�¿</param>
+//        public void PrintMain(bool bPrint)
+//        {
+//            try
+//            {
+//                // å�°åˆ·ã‚¯ãƒ©ã‚¹
+//                m_UsedExcel = new UsedExcel();
 
-                // å·¥äº‹å¢—æ¸›æƒ…å ±å�–å¾—SQL
-                string strSQL = sbDB.CreatePrimarykeyString(constructionCode);
+//                // ã‚¨ã‚¯ã‚»ãƒ«ãƒ–ãƒƒã‚¯ã‚ªãƒ¼ãƒ—ãƒ³
+//                if (!m_UsedExcel.ExcelBookOpen(System.Environment.CurrentDirectory + s_ExcelRequestSheetFileName))
+//                {
+//                    return;
+//                }
 
-                // ã‚½ãƒ¼ãƒˆæ�¡ä»¶è¿½åŠ 
-                strSQL += " ORDER BY FLUCTUATIONCODE";
+//                // è¡¨ç´™å�°åˆ·
+//                CommonDefine.RetunAnswer rtAns = PrintCover();
+//                if (rtAns != CommonDefine.RetunAnswer.Answer0)
+//                {
+//                    return;
+//                }
 
-                // å·¥äº‹å¢—æ¸›æƒ…å ±å�–å¾—
-                if (!sbDB.SelectAction(strSQL, ref wrk)) return false;
+//                // ä¸€è¦§å�°åˆ·
+//                rtAns = PrintList();
+//                if (rtAns != CommonDefine.RetunAnswer.Answer0)
+//                {
+//                    return;
+//                }
 
-                foreach (var record in wrk)
-                {
-                    datas.Add(record.FluctuationCode);
-                }
-            }
-            catch (Exception ex)
-            {
-                logger.ErrorFormat("ã‚·ã‚¹ãƒ†ãƒ ã‚¨ãƒ©ãƒ¼ï¼š{0}ï¼š{1}", CommonMotions.GetMethodName(), ex.Message);
-                return false;
-            }
-            finally
-            {
-                sbDB.close();
-                sbDB = null;
-            }
+//                int no = 1;
+//                foreach (RequestHead ReqHead in m_lstReqHead)
+//                {
+//                    List<RequestData> lstReqData = null;
+//                    if (m_dicReqData.TryGetValue(ReqHead.RequestNo, out lstReqData) == false)
+//                    {
+//                        return;
+//                    }
 
-            return true;
-        }
-        #endregion
+//                    foreach (RequestData ReqData in lstReqData)
+//                    {
+//                        ConstructionBaseInfo Info = null;
 
-        #region å·¥äº‹è©³ç´°å�°å¸³ãƒ‡ãƒ¼ã‚¿å�–å¾—
-        /// <summary>
-        /// å·¥äº‹è©³ç´°å�°å¸³ãƒ‡ãƒ¼ã‚¿å�–å¾—
-        /// </summary>
-        /// <param name="constructionCode"></param>
-        /// <param name="data"></param>
-        /// <returns></returns>
-        private bool GetConstructionLedger(int constructionCode, ref ConstructionLedger data)
-        {
-            var sbDB = new IOConstructionLedger();
-            try
-            {
-                // å·¥äº‹è©³ç´°å�°å¸³ãƒ‡ãƒ¼ã‚¿å�–å¾—ã‚¯ãƒ©ã‚¹é ˜åŸŸ
-                var wrk = new ConstructionLedger();
+//                        if (m_dicConstructionBaseInfo.TryGetValue(ReqData.MainConstructionCode, out Info) == false)
+//                        {
+//                            return;
+//                        }
 
-                // å·¥äº‹è©³ç´°å�°å¸³ãƒ‡ãƒ¼ã‚¿å�–å¾—SQL
-                string strSQL = sbDB.CreatePrimarykeyString(constructionCode);
+//                        long lRequestAmount = ReqData.RequestAmount0;
+//                        lRequestAmount += ReqData.RequestAmount1;
+//                        lRequestAmount += ReqData.RequestAmount2;
+//                        lRequestAmount += ReqData.RequestAmount3;
+//                        lRequestAmount += ReqData.RequestAmount4;
+//                        lRequestAmount += ReqData.RequestAmount5;
+//                        lRequestAmount += ReqData.RequestAmount6;
+//                        lRequestAmount += ReqData.UnpaidAmount;
 
-                // å·¥äº‹è©³ç´°å�°å¸³ãƒ‡ãƒ¼ã‚¿å�–å¾—
-                if (!sbDB.SelectAction(strSQL, ref wrk)) return false;
+//                        if (lRequestAmount == 0)
+//                        {
+//                            continue;
+//                        }
 
-                data = wrk;
+//                        rtAns = PrintDetail( no, ReqHead, ReqData, Info );
+//                        if (rtAns != CommonDefine.RetunAnswer.Answer0)
+//                        {
+//                            return;
+//                        }
+//                    }
 
-            }
-            catch (Exception ex)
-            {
-                logger.ErrorFormat("ã‚·ã‚¹ãƒ†ãƒ ã‚¨ãƒ©ãƒ¼ï¼š{0}ï¼š{1}", CommonMotions.GetMethodName(), ex.Message);
-                return false;
-            }
-            finally
-            {
-                sbDB.close();
-                sbDB = null;
-            }
+//                }
 
-            return true;
-        }
-        #endregion
-        #endregion
+//                if (bPrint)
+//                {
+//                    // å�°åˆ·å‡¦ç�†
+//                    m_UsedExcel.ExcelSheetPrint();
+//                }
+//                else
+//                {
+//                    // ä¿�å­˜å‡¦ç�†
+//                    SaveExcelFile();
+//                }
+//            }
+//            catch (System.Exception ex)
+//            {
+//                logger.ErrorFormat("ã‚·ã‚¹ãƒ†ãƒ ã‚¨ãƒ©ãƒ¼ï¼š{0}ï¼š{1}", CommonMotions.GetMethodName(), ex.Message);
+//            }
+//            finally
+//            {
+//                // Excelé–‹æ”¾
+//                if (m_UsedExcel != null)
+//                {
+//                    m_UsedExcel.ExcelBookClose();
+//                }
+//                m_UsedExcel = null;
 
-        #region å�°åˆ·ãƒ¡ã‚¤ãƒ³
-        /// <summary>
-        /// å�°åˆ·ãƒ¡ã‚¤ãƒ³
-        /// </summary>
-        /// <param name="bPrint">true:å�°åˆ·ã�®ã�¿,false:ä¿�å­˜ã�®ã�¿</param>
-        public void PrintMain(bool bPrint)
-        {
-            try
-            {
-                // å�°åˆ·ã‚¯ãƒ©ã‚¹
-                m_UsedExcel = new UsedExcel();
+//                // ã‚¬ãƒ¼ãƒ™ãƒ¼ã‚¸ã‚³ãƒ¬ã‚¯ãƒˆ
+//                GC.Collect();
+//            }
 
-                // ã‚¨ã‚¯ã‚»ãƒ«ãƒ–ãƒƒã‚¯ã‚ªãƒ¼ãƒ—ãƒ³
-                if (!m_UsedExcel.ExcelBookOpen(System.Environment.CurrentDirectory + s_ExcelRequestSheetFileName))
-                {
-                    return;
-                }
+//        }
+//        #endregion
 
-                // è¡¨ç´™å�°åˆ·
-                CommonDefine.RetunAnswer rtAns = PrintCover();
-                if (rtAns != CommonDefine.RetunAnswer.Answer0)
-                {
-                    return;
-                }
+//        #region Excelãƒ•ã‚¡ã‚¤ãƒ«ä¿�å­˜å‡¦ç�†
+//        /// <summary>
+//        /// Excelãƒ•ã‚¡ã‚¤ãƒ«ä¿�å­˜å‡¦ç�†
+//        /// </summary>
+//        private void SaveExcelFile()
+//        {
+//            try
+//            {
+//                string filePath = @m_SelectSaveExcel;
 
-                // ä¸€è¦§å�°åˆ·
-                rtAns = PrintList();
-                if (rtAns != CommonDefine.RetunAnswer.Answer0)
-                {
-                    return;
-                }
+//                // ãƒ•ã‚¡ã‚¤ãƒ«ãƒ‘ã‚¹ã�®å­˜åœ¨ã‚’ãƒ�ã‚§ãƒƒã‚¯
+//                if (CommonMotions.ChkDirPath(filePath, true))
+//                {
+//                    // ãƒ•ã‚¡ã‚¤ãƒ«å��ã‚’ä½œæˆ�
+//                    string wrkFile = m_InvData.RequestName + "æ§˜ è«‹æ±‚æ›¸";
 
-                int no = 1;
-                foreach (RequestHead ReqHead in m_lstReqHead)
-                {
-                    List<RequestData> lstReqData = null;
-                    if (m_dicReqData.TryGetValue(ReqHead.RequestNo, out lstReqData) == false)
-                    {
-                        return;
-                    }
+//                    // ãƒ•ã‚¡ã‚¤ãƒ«å��ã�«ä½¿ç”¨ã�§ã��ã�ªã�„æ–‡å­—ã‚’å�–ã‚Šé™¤ã��
+//                    foreach (var badCh in m_UsedExcel.ExcelBadCharcter)
+//                    {
+//                        wrkFile = wrkFile.Replace(badCh, "");
+//                    }
 
-                    foreach (RequestData ReqData in lstReqData)
-                    {
-                        ConstructionBaseInfo Info = null;
+//                    // ãƒ•ã‚¡ã‚¤ãƒ«å��ä½œæˆ�
+//                    filePath += @"\" + @wrkFile;
 
-                        if (m_dicConstructionBaseInfo.TryGetValue(ReqData.MainConstructionCode, out Info) == false)
-                        {
-                            return;
-                        }
+//                    // ãƒ•ã‚¡ã‚¤ãƒ«ä¿�å­˜
+//                    m_UsedExcel.SaveSwitch = true;
+//                    m_UsedExcel.ExcelSaveBook(filePath);
 
-                        long lRequestAmount = ReqData.RequestAmount0;
-                        lRequestAmount += ReqData.RequestAmount1;
-                        lRequestAmount += ReqData.RequestAmount2;
-                        lRequestAmount += ReqData.RequestAmount3;
-                        lRequestAmount += ReqData.RequestAmount4;
-                        lRequestAmount += ReqData.RequestAmount5;
-                        lRequestAmount += ReqData.RequestAmount6;
-                        lRequestAmount += ReqData.UnpaidAmount;
+//                }
+//            }
+//            catch (System.Exception ex)
+//            {
+//                logger.ErrorFormat("ã‚·ã‚¹ãƒ†ãƒ ã‚¨ãƒ©ãƒ¼ï¼š{0}ï¼š{1}", CommonMotions.GetMethodName(), ex.Message);
+//            }
 
-                        if (lRequestAmount == 0)
-                        {
-                            continue;
-                        }
+//        }
+//        #endregion
 
-                        rtAns = PrintDetail( no, ReqHead, ReqData, Info );
-                        if (rtAns != CommonDefine.RetunAnswer.Answer0)
-                        {
-                            return;
-                        }
-                    }
+//        #region ã‚¨ãƒªã‚¢ã‚¹ã‚’ä»˜ã�‘ã�Ÿæ‹…å½“è€…ãƒžã‚¹ã‚¿ã�®ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰æ–‡ã‚’ä½œæˆ�ã�™ã‚‹
+//        /// <summary>
+//        /// ã‚¨ãƒªã‚¢ã‚¹ã‚’ä»˜ã�‘ã�Ÿæ‹…å½“è€…ãƒžã‚¹ã‚¿ã�®ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰æ–‡ã‚’ä½œæˆ�ã�™ã‚‹
+//        /// </summary>
+//        /// <param name="Alias"></param>
+//        /// <param name="strSQL"></param>
+//        private string CreatePersonSQL(string Alias)
+//        {
+//            try
+//            {
+//                StringBuilder strcmd = new StringBuilder();
 
-                }
+//                bool bColFirst = true;
+//                string strWork = string.Empty;
+//                foreach (var gender in Enum.GetValues(typeof(IOMPersonInCharge.ColumnCnt)))
+//                {
+//                    strWork = gender.ToString();
+//                    if (!bColFirst) strcmd.Append(", ");
+//                    if (strWork.Equals("StartDate") || strWork.Equals("EndDate"))
+//                    {
+//                        strcmd.AppendFormat(" DATE_FORMAT({0}{1}, '%Y/%m/%d')", Alias, strWork);
+//                    }
+//                    else if (strWork.Equals("EntryDate") || strWork.Equals("UpdateDate"))
+//                    {
+//                        strcmd.AppendFormat(" DATE_FORMAT({0}{1}, '%Y/%m/%d %H:%i:%s')", Alias, strWork);
+//                    }
+//                    else
+//                    {
+//                        strcmd.AppendFormat(" {0}{1}", Alias, strWork);
+//                    }
+//                    bColFirst = false;
+//                }
 
-                if (bPrint)
-                {
-                    // å�°åˆ·å‡¦ç�†
-                    m_UsedExcel.ExcelSheetPrint();
-                }
-                else
-                {
-                    // ä¿�å­˜å‡¦ç�†
-                    SaveExcelFile();
-                }
-            }
-            catch (System.Exception ex)
-            {
-                logger.ErrorFormat("ã‚·ã‚¹ãƒ†ãƒ ã‚¨ãƒ©ãƒ¼ï¼š{0}ï¼š{1}", CommonMotions.GetMethodName(), ex.Message);
-            }
-            finally
-            {
-                // Excelé–‹æ”¾
-                if (m_UsedExcel != null)
-                {
-                    m_UsedExcel.ExcelBookClose();
-                }
-                m_UsedExcel = null;
+//                return strcmd.ToString();
+//            }
+//            catch (Exception ex)
+//            {
+//                logger.ErrorFormat("ã‚·ã‚¹ãƒ†ãƒ ã‚¨ãƒ©ãƒ¼ï¼š{0}ï¼š{1}", CommonMotions.GetMethodName(), ex.Message);
+//                return string.Empty;
+//            }
+//        }
+//        #endregion
 
-                // ã‚¬ãƒ¼ãƒ™ãƒ¼ã‚¸ã‚³ãƒ¬ã‚¯ãƒˆ
-                GC.Collect();
-            }
+//        #region è¡¨ç´™å�°é‘‘è¡¨ç¤º
+//        /// <summary>
+//        ///  è¡¨ç´™å�°é‘‘è¡¨ç¤º
+//        /// </summary>
+//        private void PrintCoverSeal(int PersonCode)
+//        {
+//            IOMPersonInCharge picDB = new IOMPersonInCharge();
+//            IOProcessApproval paDB = new IOProcessApproval();
+//            try
+//            {
+//                ArrayList arlist = new ArrayList();
 
-        }
-        #endregion
+//                // æ‰¿èª�ãƒ‡ãƒ¼ã‚¿èª­è¾¼
+//                StringBuilder strSQLSeal = new StringBuilder();
+//                strSQLSeal.Append("SELECT");
+//                strSQLSeal.Append(CreatePersonSQL("B."));
+//                strSQLSeal.Append(", C.SECRANK FROM PROCESSAPPROVAL A, PERSONINCHARGEMASTER B, SECURITYMASTER C");
+//                strSQLSeal.Append(paDB.CreatePrimarykeyString(m_lstReqHead[0].ReqConstructionCode, (int)ClsExcute.ApprovalListNo.OrderBillingApproval, m_lstReqHead[0].OrderNo));
+//                strSQLSeal.Append(" AND A.PERSONCODE = B.PERSONCODE");
+//                strSQLSeal.Append(" AND C.SECCODE = B.SECCODE");
+//                strSQLSeal.Append(" Order By C.SecRank ASC");
+//                if (!paDB.ExecuteReader(strSQLSeal.ToString(), ref arlist)) return;
 
-        #region Excelãƒ•ã‚¡ã‚¤ãƒ«ä¿�å­˜å‡¦ç�†
-        /// <summary>
-        /// Excelãƒ•ã‚¡ã‚¤ãƒ«ä¿�å­˜å‡¦ç�†
-        /// </summary>
-        private void SaveExcelFile()
-        {
-            try
-            {
-                string filePath = @m_SelectSaveExcel;
+//                // å�°åˆ·ãƒ†ãƒ¼ãƒ–ãƒ«ä½œæˆ�
+//                int[] PorsonCode = new int[4] { 0, 0, 0, 0 };
+//                List<string> NameTable = new List<string>();
+//                for (int i = 0; i < PorsonCode.Length; i++) NameTable.Add("");
+//                string[] OrderOfPrecedenceTable = new string[4];
 
-                // ãƒ•ã‚¡ã‚¤ãƒ«ãƒ‘ã‚¹ã�®å­˜åœ¨ã‚’ãƒ�ã‚§ãƒƒã‚¯
-                if (CommonMotions.ChkDirPath(filePath, true))
-                {
-                    // ãƒ•ã‚¡ã‚¤ãƒ«å��ã‚’ä½œæˆ�
-                    string wrkFile = m_InvData.RequestName + "æ§˜ è«‹æ±‚æ›¸";
+//                int PersonDataCnt = Enum.GetNames(typeof(IOMPersonInCharge.ColumnCnt)).Length;
+//                // æ‰¿èª�ãƒ‡ãƒ¼ã‚¿ã‚ˆã‚Šæ‹…å½“è€…ã��ã�®ä»–ã‚’å�–å¾—ã�™ã‚‹
+//                for (int i = 0; i < arlist.Count; i++)
+//                {
+//                    // ã‚¨ã‚¯ã‚»ãƒ«ã�®æž ã‚ˆã‚Šå¤šã�„å ´å�ˆã�¯å‡¦ç�†ã‚’æŠœã�‘ã‚‹
+//                    if (i > 3) break;
 
-                    // ãƒ•ã‚¡ã‚¤ãƒ«å��ã�«ä½¿ç”¨ã�§ã��ã�ªã�„æ–‡å­—ã‚’å�–ã‚Šé™¤ã��
-                    foreach (var badCh in m_UsedExcel.ExcelBadCharcter)
-                    {
-                        wrkFile = wrkFile.Replace(badCh, "");
-                    }
+//                    object[] readObj = (object[])arlist[i];
+//                    PersonInChargeMaster PersonRec = new PersonInChargeMaster();
+//                    picDB.Reader2Struct(readObj, ref PersonRec);
 
-                    // ãƒ•ã‚¡ã‚¤ãƒ«å��ä½œæˆ�
-                    filePath += @"\" + @wrkFile;
+//                    // ã‚»ã‚­ãƒ¥ãƒªãƒ†ã‚£ãƒ‡ãƒ¼ã‚¿ãƒ�ã‚§ãƒƒã‚¯
+//                    int SecRank = CommonMotions.cnvInt(readObj[PersonDataCnt]);
+//                    int SRank = (int)CommonDefine.SecurityRankPos.SpecialAuthority;     // ç‰¹åˆ¥æ¨©é™�
+//                    int FRank = (int)CommonDefine.SecurityRankPos.FreeAuthority;        // çµ±æ‹¬è€…æ¨©é™�
+//                    int LRank = (int)CommonDefine.SecurityRankPos.LimitedAuthority;     // æ‰€å±žé•·æ¨©é™�
 
-                    // ãƒ•ã‚¡ã‚¤ãƒ«ä¿�å­˜
-                    m_UsedExcel.SaveSwitch = true;
-                    m_UsedExcel.ExcelSaveBook(filePath);
+//                    // æ‹…å½“è€…ä»¥å¤–ã�¯å½¹è�·ã�Œã�‚ã‚‹
+//                    if (SecRank == CommonDefine.SecurityRankList[SRank].Key
+//                        || SecRank == CommonDefine.SecurityRankList[FRank].Key
+//                        || SecRank == CommonDefine.SecurityRankList[LRank].Key)
+//                    {
+//                        // ã‚³ãƒ¼ãƒ‰ã�¨å��å‰�ã�¨å½¹è�·ã‚’å�–å¾—ã�™ã‚‹
+//                        PorsonCode[i] = PersonRec.PersonCode;
+//                        NameTable[i] = PersonRec.SealPrintName;
+//                        // 7æ–‡å­—ä»¥ä¸Šã�¯æ–‡å­—ã�Œè¦‹ã�ˆã�ªã�„ã�®ã�§çœ�ç•¥
+//                        if (PersonRec.DisplayString.Length > 7)
+//                        {
+//                            OrderOfPrecedenceTable[i] = PersonRec.DisplayString.Substring(0, 7);
+//                        }
+//                        else if (PersonRec.DisplayString.Length < 1)
+//                        {
+//                            OrderOfPrecedenceTable[i] = "æ‹…ã€€å½“";
+//                        }
+//                        else
+//                        {
+//                            OrderOfPrecedenceTable[i] = PersonRec.DisplayString;
+//                        }
+//                    }
+//                    else
+//                    {   // æ‹…å½“è€…
+//                        // ã‚³ãƒ¼ãƒ‰ã�¨å��å‰�ã‚’å�–å¾—ã�™ã‚‹
+//                        PorsonCode[3] = PersonRec.PersonCode;
+//                        NameTable[3] = PersonRec.SealPrintName;
+//                        OrderOfPrecedenceTable[3] = "æ‹…ã€€å½“";
+//                    }
+//                }
+//                // ãƒ†ãƒ¼ãƒ–ãƒ«å†…ã�«å�Œã�˜ã‚³ãƒ¼ãƒ‰ã�Œç„¡ã�„ã�‹å¾Œã�‹ã‚‰èª¿ã�¹ã‚‹
+//                for (int i = 0; i < PorsonCode.Length - 1; i++)
+//                {
+//                    if (PorsonCode[i] == 0) continue;
+//                    for (int ii = 0; ii < PorsonCode.Length; ii++)
+//                    {
+//                        if (i == ii) continue;
+//                        if (PorsonCode[i] != PorsonCode[ii]) continue;
 
-                }
-            }
-            catch (System.Exception ex)
-            {
-                logger.ErrorFormat("ã‚·ã‚¹ãƒ†ãƒ ã‚¨ãƒ©ãƒ¼ï¼š{0}ï¼š{1}", CommonMotions.GetMethodName(), ex.Message);
-            }
+//                        PorsonCode[ii] = 0;
+//                        NameTable[ii] = string.Empty;
+//                        OrderOfPrecedenceTable[ii] = string.Empty;
+//                        break;
+//                    }
+//                }
 
-        }
-        #endregion
+//                // å�°é‘‘ã‚’æ��ç”»ã�™ã‚‹
+//                OfficeShapeDefine shapedef = new OfficeShapeDefine();
+//                shapedef.ShapeSheetName = s_shapeSheetName;     // å›³å½¢ã‚·ãƒ¼ãƒˆå��ç§°
+//                shapedef.ShapeName = s_shapeName;               // å›³å½¢å��ç§°
+//                shapedef.ShapeWidth = s_ShapeSize[0, 0];        // å›³å½¢æ��ç”»ã‚µã‚¤ã‚º Width
+//                shapedef.ShapeHeight = s_ShapeSize[0, 1];       // å›³å½¢æ��ç”»ã‚µã‚¤ã‚º Height
 
-        #region ã‚¨ãƒªã‚¢ã‚¹ã‚’ä»˜ã�‘ã�Ÿæ‹…å½“è€…ãƒžã‚¹ã‚¿ã�®ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰æ–‡ã‚’ä½œæˆ�ã�™ã‚‹
-        /// <summary>
-        /// ã‚¨ãƒªã‚¢ã‚¹ã‚’ä»˜ã�‘ã�Ÿæ‹…å½“è€…ãƒžã‚¹ã‚¿ã�®ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰æ–‡ã‚’ä½œæˆ�ã�™ã‚‹
-        /// </summary>
-        /// <param name="Alias"></param>
-        /// <param name="strSQL"></param>
-        private string CreatePersonSQL(string Alias)
-        {
-            try
-            {
-                StringBuilder strcmd = new StringBuilder();
+//                for (int i = 0; i < 4; i++)
+//                {
+//                    // 
+//                    if (PorsonCode[i] != 0)
+//                    {
+//                        shapedef.ShapeDrowPointX = s_CoverSealPoint[i, 0];          // å›³å½¢æ��ç”»ä½�ç½® X
+//                        shapedef.ShapeDrowPointY = s_CoverSealPoint[i, 1];          // å›³å½¢æ��ç”»ä½�ç½® Y
+//                        shapedef.DrowText = NameTable[i];                           // æ��ç”»æ–‡å­—åˆ—
+//                        int ifontSize = NameTable[i].Length - 1;
+//                        if (ifontSize > 4) ifontSize = 4;
+//                        shapedef.FontSize = s_EstimateSeal1FontSize[ifontSize];     // ãƒ•ã‚©ãƒ³ãƒˆã‚µã‚¤ã‚º
+//                        // å›³å½¢æ��ç”»
+//                        m_UsedExcel.ExcelCopyShape(shapedef);
+//                    }
+//                    // å½¹è�·ã‚’å�°å­—ã�™ã‚‹(Mï½ž)
+//                    int orgNumber = 11 + i;
+//                    string strAlpha = CommonMotions.cnvNumberToAlphaCharacter(orgNumber);
+//                    m_UsedExcel.ExcelCellSet(string.Format("{0}25", strAlpha), OrderOfPrecedenceTable[i]);
+//                }
+//            }
+//            catch (Exception ex)
+//            {
+//                logger.ErrorFormat("ã‚·ã‚¹ãƒ†ãƒ ã‚¨ãƒ©ãƒ¼ï¼š{0}ï¼š{1}", CommonMotions.GetMethodName(), ex.Message);
+//            }
+//            finally
+//            {
+//                paDB.close(); paDB = null;
+//                picDB.close(); picDB = null;
+//            }
+//        }
+//        #endregion
 
-                bool bColFirst = true;
-                string strWork = string.Empty;
-                foreach (var gender in Enum.GetValues(typeof(IOMPersonInCharge.ColumnCnt)))
-                {
-                    strWork = gender.ToString();
-                    if (!bColFirst) strcmd.Append(", ");
-                    if (strWork.Equals("StartDate") || strWork.Equals("EndDate"))
-                    {
-                        strcmd.AppendFormat(" DATE_FORMAT({0}{1}, '%Y/%m/%d')", Alias, strWork);
-                    }
-                    else if (strWork.Equals("EntryDate") || strWork.Equals("UpdateDate"))
-                    {
-                        strcmd.AppendFormat(" DATE_FORMAT({0}{1}, '%Y/%m/%d %H:%i:%s')", Alias, strWork);
-                    }
-                    else
-                    {
-                        strcmd.AppendFormat(" {0}{1}", Alias, strWork);
-                    }
-                    bColFirst = false;
-                }
+//        #region è«‹æ±‚æ›¸(è¡¨ç´™)ä½œæˆ�
+//        /// <summary>
+//        /// è«‹æ±‚æ›¸(è¡¨ç´™)ä½œæˆ�
+//        /// </summary>
+//        /// <returns></returns>
+//        private CommonDefine.RetunAnswer PrintCover()
+//        {
+//            try
+//            {
+//                //// è«‹æ±‚æ›¸è¡¨ç´™ã‚·ãƒ¼ãƒˆã�®å�–å¾—
+//                m_UsedExcel.ExcelSheetGet(s_DicSheetName[enumSheetName.Cover]);
 
-                return strcmd.ToString();
-            }
-            catch (Exception ex)
-            {
-                logger.ErrorFormat("ã‚·ã‚¹ãƒ†ãƒ ã‚¨ãƒ©ãƒ¼ï¼š{0}ï¼š{1}", CommonMotions.GetMethodName(), ex.Message);
-                return string.Empty;
-            }
-        }
-        #endregion
+//                //// è«‹æ±‚æ›¸No(4è¡Œç›® Nåˆ—)
+//                string strInvNo = (m_InvData.InvoiceNo / 1000).ToString();
+//                strInvNo += "-";
+//                strInvNo += (m_InvData.InvoiceNo % 1000).ToString("00");
 
-        #region è¡¨ç´™å�°é‘‘è¡¨ç¤º
-        /// <summary>
-        ///  è¡¨ç´™å�°é‘‘è¡¨ç¤º
-        /// </summary>
-        private void PrintCoverSeal(int PersonCode)
-        {
-            IOMPersonInCharge picDB = new IOMPersonInCharge();
-            IOProcessApproval paDB = new IOProcessApproval();
-            try
-            {
-                ArrayList arlist = new ArrayList();
+//                ExcelPrintData InvNoData = new ExcelPrintData();
+//                InvNoData.AddPrintData("N", 3, strInvNo).ExcelCellSet(m_UsedExcel);
 
-                // æ‰¿èª�ãƒ‡ãƒ¼ã‚¿èª­è¾¼
-                StringBuilder strSQLSeal = new StringBuilder();
-                strSQLSeal.Append("SELECT");
-                strSQLSeal.Append(CreatePersonSQL("B."));
-                strSQLSeal.Append(", C.SECRANK FROM PROCESSAPPROVAL A, PERSONINCHARGEMASTER B, SECURITYMASTER C");
-                strSQLSeal.Append(paDB.CreatePrimarykeyString(m_lstReqHead[0].ReqConstructionCode, (int)ClsExcute.ApprovalListNo.OrderBillingApproval, m_lstReqHead[0].OrderNo));
-                strSQLSeal.Append(" AND A.PERSONCODE = B.PERSONCODE");
-                strSQLSeal.Append(" AND C.SECCODE = B.SECCODE");
-                strSQLSeal.Append(" Order By C.SecRank ASC");
-                if (!paDB.ExecuteReader(strSQLSeal.ToString(), ref arlist)) return;
 
-                // å�°åˆ·ãƒ†ãƒ¼ãƒ–ãƒ«ä½œæˆ�
-                int[] PorsonCode = new int[4] { 0, 0, 0, 0 };
-                List<string> NameTable = new List<string>();
-                for (int i = 0; i < PorsonCode.Length; i++) NameTable.Add("");
-                string[] OrderOfPrecedenceTable = new string[4];
+//                //// â‘¢ è«‹æ±‚æ—¥(5è¡Œç›® Måˆ—)
+//                if (m_bDatePrintFlg == true)
+//                {
+//                    ExcelPrintData reqDate = new ExcelPrintData();
+//                    reqDate.AddPrintData("M", 4, dateTimePicker1.Value.ToString("yyyy/MM/dd")).ExcelCellSet(m_UsedExcel);
+//                }
+//                else
+//                {
+//                    ExcelPrintData reqDate = new ExcelPrintData();
+//                    reqDate.AddPrintData("M", 4, "ã€€ã€€å¹´ã€€ã€€æœˆã€€ã€€æ—¥").ExcelCellSet(m_UsedExcel);
+//                }
 
-                int PersonDataCnt = Enum.GetNames(typeof(IOMPersonInCharge.ColumnCnt)).Length;
-                // æ‰¿èª�ãƒ‡ãƒ¼ã‚¿ã‚ˆã‚Šæ‹…å½“è€…ã��ã�®ä»–ã‚’å�–å¾—ã�™ã‚‹
-                for (int i = 0; i < arlist.Count; i++)
-                {
-                    // ã‚¨ã‚¯ã‚»ãƒ«ã�®æž ã‚ˆã‚Šå¤šã�„å ´å�ˆã�¯å‡¦ç�†ã‚’æŠœã�‘ã‚‹
-                    if (i > 3) break;
+//                //// â‘£ è«‹æ±‚å…ˆå��ç§°(9è¡Œç›® Cåˆ—)
+//                ExcelPrintData nameData = new ExcelPrintData();
+//                string str = m_InvData.RequestName + "ã€€æ§˜";
+//                nameData.AddPrintData("C", 8, str).ExcelCellSet(m_UsedExcel);
 
-                    object[] readObj = (object[])arlist[i];
-                    PersonInChargeMaster PersonRec = new PersonInChargeMaster();
-                    picDB.Reader2Struct(readObj, ref PersonRec);
+//                //// â‘¤ è«‹æ±‚é‡‘é¡�(13è¡Œç›® Cåˆ—)
+//                ExcelPrintData priceData = new ExcelPrintData();
+//                priceData.AddPrintData("C", 12, m_InvData.TotalAmount.ToString("#,0")).ExcelCellSet(m_UsedExcel);
 
-                    // ã‚»ã‚­ãƒ¥ãƒªãƒ†ã‚£ãƒ‡ãƒ¼ã‚¿ãƒ�ã‚§ãƒƒã‚¯
-                    int SecRank = CommonMotions.cnvInt(readObj[PersonDataCnt]);
-                    int SRank = (int)CommonDefine.SecurityRankPos.SpecialAuthority;     // ç‰¹åˆ¥æ¨©é™�
-                    int FRank = (int)CommonDefine.SecurityRankPos.FreeAuthority;        // çµ±æ‹¬è€…æ¨©é™�
-                    int LRank = (int)CommonDefine.SecurityRankPos.LimitedAuthority;     // æ‰€å±žé•·æ¨©é™�
+//                //// â‘¥ æ¶ˆè²»ç¨Ž(14è¡Œç›® Cåˆ—)
+//                ExcelPrintData taxData = new ExcelPrintData();
+//                taxData.AddPrintData("C", 13, m_InvData.TaxAmount.ToString("#,0")).ExcelCellSet(m_UsedExcel);
 
-                    // æ‹…å½“è€…ä»¥å¤–ã�¯å½¹è�·ã�Œã�‚ã‚‹
-                    if (SecRank == CommonDefine.SecurityRankList[SRank].Key
-                        || SecRank == CommonDefine.SecurityRankList[FRank].Key
-                        || SecRank == CommonDefine.SecurityRankList[LRank].Key)
-                    {
-                        // ã‚³ãƒ¼ãƒ‰ã�¨å��å‰�ã�¨å½¹è�·ã‚’å�–å¾—ã�™ã‚‹
-                        PorsonCode[i] = PersonRec.PersonCode;
-                        NameTable[i] = PersonRec.SealPrintName;
-                        // 7æ–‡å­—ä»¥ä¸Šã�¯æ–‡å­—ã�Œè¦‹ã�ˆã�ªã�„ã�®ã�§çœ�ç•¥
-                        if (PersonRec.DisplayString.Length > 7)
-                        {
-                            OrderOfPrecedenceTable[i] = PersonRec.DisplayString.Substring(0, 7);
-                        }
-                        else if (PersonRec.DisplayString.Length < 1)
-                        {
-                            OrderOfPrecedenceTable[i] = "æ‹…ã€€å½“";
-                        }
-                        else
-                        {
-                            OrderOfPrecedenceTable[i] = PersonRec.DisplayString;
-                        }
-                    }
-                    else
-                    {   // æ‹…å½“è€…
-                        // ã‚³ãƒ¼ãƒ‰ã�¨å��å‰�ã‚’å�–å¾—ã�™ã‚‹
-                        PorsonCode[3] = PersonRec.PersonCode;
-                        NameTable[3] = PersonRec.SealPrintName;
-                        OrderOfPrecedenceTable[3] = "æ‹…ã€€å½“";
-                    }
-                }
-                // ãƒ†ãƒ¼ãƒ–ãƒ«å†…ã�«å�Œã�˜ã‚³ãƒ¼ãƒ‰ã�Œç„¡ã�„ã�‹å¾Œã�‹ã‚‰èª¿ã�¹ã‚‹
-                for (int i = 0; i < PorsonCode.Length - 1; i++)
-                {
-                    if (PorsonCode[i] == 0) continue;
-                    for (int ii = 0; ii < PorsonCode.Length; ii++)
-                    {
-                        if (i == ii) continue;
-                        if (PorsonCode[i] != PorsonCode[ii]) continue;
+//                //// å·¥äº‹å��(16è¡Œç›® Dåˆ—)
+////                ExcelPrintData cnstnameData = new ExcelPrintData();
+////                cnstnameData.AddPrintData("D", 15, m_lstReqHead[0].ReqConstructionName).ExcelCellSet(m_UsedExcel);
 
-                        PorsonCode[ii] = 0;
-                        NameTable[ii] = string.Empty;
-                        OrderOfPrecedenceTable[ii] = string.Empty;
-                        break;
-                    }
-                }
+//                //// ä¼šç¤¾å��
+//                string strCompany = CommonMotions.SystemMasterData.CompanyName1;
+//                if( CommonMotions.SystemMasterData.CompanyName2 != string.Empty )
+//                {
+//                    strCompany += "ã€€"ã€€+ CommonMotions.SystemMasterData.CompanyName2;
+//                }
 
-                // å�°é‘‘ã‚’æ��ç”»ã�™ã‚‹
-                OfficeShapeDefine shapedef = new OfficeShapeDefine();
-                shapedef.ShapeSheetName = s_shapeSheetName;     // å›³å½¢ã‚·ãƒ¼ãƒˆå��ç§°
-                shapedef.ShapeName = s_shapeName;               // å›³å½¢å��ç§°
-                shapedef.ShapeWidth = s_ShapeSize[0, 0];        // å›³å½¢æ��ç”»ã‚µã‚¤ã‚º Width
-                shapedef.ShapeHeight = s_ShapeSize[0, 1];       // å›³å½¢æ��ç”»ã‚µã‚¤ã‚º Height
+//                // ä»£è¡¨è€…å��
+//                string strPresident = string.Format("{0} {1}", CommonMotions.SystemMasterData.CEOPositionName.Trim()
+//                                                                , CommonMotions.SystemMasterData.CEOName.Trim());
 
-                for (int i = 0; i < 4; i++)
-                {
-                    // 
-                    if (PorsonCode[i] != 0)
-                    {
-                        shapedef.ShapeDrowPointX = s_CoverSealPoint[i, 0];          // å›³å½¢æ��ç”»ä½�ç½® X
-                        shapedef.ShapeDrowPointY = s_CoverSealPoint[i, 1];          // å›³å½¢æ��ç”»ä½�ç½® Y
-                        shapedef.DrowText = NameTable[i];                           // æ��ç”»æ–‡å­—åˆ—
-                        int ifontSize = NameTable[i].Length - 1;
-                        if (ifontSize > 4) ifontSize = 4;
-                        shapedef.FontSize = s_EstimateSeal1FontSize[ifontSize];     // ãƒ•ã‚©ãƒ³ãƒˆã‚µã‚¤ã‚º
-                        // å›³å½¢æ��ç”»
-                        m_UsedExcel.ExcelCopyShape(shapedef);
-                    }
-                    // å½¹è�·ã‚’å�°å­—ã�™ã‚‹(Mï½ž)
-                    int orgNumber = 11 + i;
-                    string strAlpha = CommonMotions.cnvNumberToAlphaCharacter(orgNumber);
-                    m_UsedExcel.ExcelCellSet(string.Format("{0}25", strAlpha), OrderOfPrecedenceTable[i]);
-                }
-            }
-            catch (Exception ex)
-            {
-                logger.ErrorFormat("ã‚·ã‚¹ãƒ†ãƒ ã‚¨ãƒ©ãƒ¼ï¼š{0}ï¼š{1}", CommonMotions.GetMethodName(), ex.Message);
-            }
-            finally
-            {
-                paDB.close(); paDB = null;
-                picDB.close(); picDB = null;
-            }
-        }
-        #endregion
+//                //// éƒµä¾¿ç•ªå�·
+//                string strZip = "ã€’" + CommonMotions.SystemMasterData.ZipCode;
 
-        #region è«‹æ±‚æ›¸(è¡¨ç´™)ä½œæˆ�
-        /// <summary>
-        /// è«‹æ±‚æ›¸(è¡¨ç´™)ä½œæˆ�
-        /// </summary>
-        /// <returns></returns>
-        private CommonDefine.RetunAnswer PrintCover()
-        {
-            try
-            {
-                //// è«‹æ±‚æ›¸è¡¨ç´™ã‚·ãƒ¼ãƒˆã�®å�–å¾—
-                m_UsedExcel.ExcelSheetGet(s_DicSheetName[enumSheetName.Cover]);
+//                //// ä½�æ‰€
+//                string strAddr = CommonMotions.SystemMasterData.Address1;
+//                if( CommonMotions.SystemMasterData.Address2 != string.Empty)
+//                {
+//                    strAddr += CommonMotions.SystemMasterData.Address2;
+//                }
+//                if( CommonMotions.SystemMasterData.Address3 != string.Empty){
+//                    strAddr += CommonMotions.SystemMasterData.Address3;
+//                }
 
-                //// è«‹æ±‚æ›¸No(4è¡Œç›® Nåˆ—)
-                string strInvNo = (m_InvData.InvoiceNo / 1000).ToString();
-                strInvNo += "-";
-                strInvNo += (m_InvData.InvoiceNo % 1000).ToString("00");
+//                //// TEL/FAX
 
-                ExcelPrintData InvNoData = new ExcelPrintData();
-                InvNoData.AddPrintData("N", 3, strInvNo).ExcelCellSet(m_UsedExcel);
+//                string strTelFax = "";
 
+//                if( CommonMotions.SystemMasterData.PhoneNumber != string.Empty )
+//                {
+//                    strTelFax = "TEL " + CommonMotions.SystemMasterData.PhoneNumber + "(ä»£)";
+//                }
+//                if( CommonMotions.SystemMasterData.FaxNumber !=  string.Empty )
+//                {
+//                    if( strTelFax.Length > 0 )
+//                    {
+//                        strTelFax += " ";
+//                    }
+//                    strTelFax += "FAX " + CommonMotions.SystemMasterData.FaxNumber;
+//                }
+//                //// URL
+//                string strUrl = CommonMotions.SystemMasterData.HomePageURL;
 
-                //// â‘¢ è«‹æ±‚æ—¥(5è¡Œç›® Måˆ—)
-                if (m_bDatePrintFlg == true)
-                {
-                    ExcelPrintData reqDate = new ExcelPrintData();
-                    reqDate.AddPrintData("M", 4, dateTimePicker1.Value.ToString("yyyy/MM/dd")).ExcelCellSet(m_UsedExcel);
-                }
-                else
-                {
-                    ExcelPrintData reqDate = new ExcelPrintData();
-                    reqDate.AddPrintData("M", 4, "ã€€ã€€å¹´ã€€ã€€æœˆã€€ã€€æ—¥").ExcelCellSet(m_UsedExcel);
-                }
+//                ExcelPrintData companyData = new ExcelPrintData();
+//                companyData.AddPrintData("L", 17, strCompany);                              // ä¼šç¤¾å��(18è¡Œç›® Låˆ—)           
+//                companyData.AddPrintData("L", 18, strPresident);                            // ä»£è¡¨è€…å��(19è¡Œç›® Låˆ—)           
+//                companyData.AddPrintData("L", 19, strZip);                                  // éƒµä¾¿ç•ªå�·(20è¡Œç›® Låˆ—) 
+//                companyData.AddPrintData("L", 20, strAddr);                                 // ä½�æ‰€(21è¡Œç›® Låˆ—)           
+//                companyData.AddPrintData("L", 21, strTelFax);                               // TEL/FAX(22è¡Œç›® Låˆ—)           
+//                companyData.AddPrintData("L", 22, strUrl);                                  // URL(23è¡Œç›® Låˆ—)           
+//                companyData.ExcelCellSet(m_UsedExcel);
 
-                //// â‘£ è«‹æ±‚å…ˆå��ç§°(9è¡Œç›® Cåˆ—)
-                ExcelPrintData nameData = new ExcelPrintData();
-                string str = m_InvData.RequestName + "ã€€æ§˜";
-                nameData.AddPrintData("C", 8, str).ExcelCellSet(m_UsedExcel);
+//                ExcelPrintData commentData = new ExcelPrintData();
+//                commentData.AddPrintData("C", 17, m_InvData.Comment1);                              // ã‚³ãƒ¡ãƒ³ãƒˆ1(18è¡Œç›® Cåˆ—)           
+//                commentData.AddPrintData("C", 18, m_InvData.Comment2);                              // ã‚³ãƒ¡ãƒ³ãƒˆ2(19è¡Œç›® Cåˆ—)           
+//                commentData.AddPrintData("C", 19, m_InvData.Comment3);                              // ã‚³ãƒ¡ãƒ³ãƒˆ3(20è¡Œç›® Cåˆ—)           
+//                commentData.AddPrintData("C", 20, m_InvData.Comment4);                              // ã‚³ãƒ¡ãƒ³ãƒˆ4(21è¡Œç›® Cåˆ—)           
+//                commentData.AddPrintData("C", 21, m_InvData.Comment5);                              // ã‚³ãƒ¡ãƒ³ãƒˆ5(22è¡Œç›® Cåˆ—)           
+//                commentData.ExcelCellSet(m_UsedExcel);
 
-                //// â‘¤ è«‹æ±‚é‡‘é¡�(13è¡Œç›® Cåˆ—)
-                ExcelPrintData priceData = new ExcelPrintData();
-                priceData.AddPrintData("C", 12, m_InvData.TotalAmount.ToString("#,0")).ExcelCellSet(m_UsedExcel);
+//                ConstructionBaseInfo Info = null;
+//                m_dicConstructionBaseInfo.TryGetValue(m_lstReqHead[0].ReqConstructionCode, out Info);
 
-                //// â‘¥ æ¶ˆè²»ç¨Ž(14è¡Œç›® Cåˆ—)
-                ExcelPrintData taxData = new ExcelPrintData();
-                taxData.AddPrintData("C", 13, m_InvData.TaxAmount.ToString("#,0")).ExcelCellSet(m_UsedExcel);
+//                // å�°é‘‘æ��ç”»
+//                PrintCoverSeal(Info.ConstructionPersonCode);
 
-                //// å·¥äº‹å��(16è¡Œç›® Dåˆ—)
-//                ExcelPrintData cnstnameData = new ExcelPrintData();
-//                cnstnameData.AddPrintData("D", 15, m_lstReqHead[0].ReqConstructionName).ExcelCellSet(m_UsedExcel);
+//                return CommonDefine.RetunAnswer.Answer0;
+//            }
+//            catch (Exception ex)
+//            {
+//                logger.ErrorFormat("ã‚·ã‚¹ãƒ†ãƒ ã‚¨ãƒ©ãƒ¼ï¼š{0}ï¼š{1}", CommonMotions.GetMethodName(), ex.Message);
+//                return CommonDefine.RetunAnswer.Answer1;
+//            }
+//        }
+//        #endregion
 
-                //// ä¼šç¤¾å��
-                string strCompany = CommonMotions.SystemMasterData.CompanyName1;
-                if( CommonMotions.SystemMasterData.CompanyName2 != string.Empty )
-                {
-                    strCompany += "ã€€"ã€€+ CommonMotions.SystemMasterData.CompanyName2;
-                }
+//        #region è«‹æ±‚æ›¸(ä¸€è¦§)ä½œæˆ�
+//        /// <summary>
+//        /// è«‹æ±‚æ›¸(ä¸€è¦§)ä½œæˆ�
+//        /// </summary>
+//        /// <returns></returns>
+//        private CommonDefine.RetunAnswer PrintList()
+//        {
+//            try
+//            {
+//                int trow = 4;
+//                ExcelPrintData ExcelPrnData = null;
 
-                // ä»£è¡¨è€…å��
-                string strPresident = string.Format("{0} {1}", CommonMotions.SystemMasterData.CEOPositionName.Trim()
-                                                                , CommonMotions.SystemMasterData.CEOName.Trim());
+//                //// è«‹æ±‚æ›¸è¡¨ç´™ã‚·ãƒ¼ãƒˆã�®å�–å¾—
+//                m_UsedExcel.ExcelSheetGet(s_DicSheetName[enumSheetName.List]);
 
-                //// éƒµä¾¿ç•ªå�·
-                string strZip = "ã€’" + CommonMotions.SystemMasterData.ZipCode;
+//                List<int> lstKey = new List<int>(m_dicReqData.Keys);
 
-                //// ä½�æ‰€
-                string strAddr = CommonMotions.SystemMasterData.Address1;
-                if( CommonMotions.SystemMasterData.Address2 != string.Empty)
-                {
-                    strAddr += CommonMotions.SystemMasterData.Address2;
-                }
-                if( CommonMotions.SystemMasterData.Address3 != string.Empty){
-                    strAddr += CommonMotions.SystemMasterData.Address3;
-                }
+//                foreach (int nReqNo in lstKey)
+//                {
+//                    List<RequestData> lstData = null;
 
-                //// TEL/FAX
+//                    if (m_dicReqData.TryGetValue(nReqNo, out lstData) == false)
+//                    {
+//                        continue;
+//                    }
 
-                string strTelFax = "";
+//                    foreach (RequestData ReqData in lstData)
+//                    {
+//                        ConstructionBaseInfo Info = null;
 
-                if( CommonMotions.SystemMasterData.PhoneNumber != string.Empty )
-                {
-                    strTelFax = "TEL " + CommonMotions.SystemMasterData.PhoneNumber + "(ä»£)";
-                }
-                if( CommonMotions.SystemMasterData.FaxNumber !=  string.Empty )
-                {
-                    if( strTelFax.Length > 0 )
-                    {
-                        strTelFax += " ";
-                    }
-                    strTelFax += "FAX " + CommonMotions.SystemMasterData.FaxNumber;
-                }
-                //// URL
-                string strUrl = CommonMotions.SystemMasterData.HomePageURL;
+//                        if (m_dicConstructionBaseInfo.TryGetValue(ReqData.MainConstructionCode, out Info) == false)
+//                        {
+//                            continue;
+//                        }
 
-                ExcelPrintData companyData = new ExcelPrintData();
-                companyData.AddPrintData("L", 17, strCompany);                              // ä¼šç¤¾å��(18è¡Œç›® Låˆ—)           
-                companyData.AddPrintData("L", 18, strPresident);                            // ä»£è¡¨è€…å��(19è¡Œç›® Låˆ—)           
-                companyData.AddPrintData("L", 19, strZip);                                  // éƒµä¾¿ç•ªå�·(20è¡Œç›® Låˆ—) 
-                companyData.AddPrintData("L", 20, strAddr);                                 // ä½�æ‰€(21è¡Œç›® Låˆ—)           
-                companyData.AddPrintData("L", 21, strTelFax);                               // TEL/FAX(22è¡Œç›® Låˆ—)           
-                companyData.AddPrintData("L", 22, strUrl);                                  // URL(23è¡Œç›® Låˆ—)           
-                companyData.ExcelCellSet(m_UsedExcel);
+//                        string strname = (ReqData.MainConstructionCode / 100).ToString();
+//                        strname += "-";
+//                        strname += (ReqData.MainConstructionCode % 100).ToString("00");
+//                        strname += "\r\n";
+//                        strname += ReqData.ConstructionName;
 
-                ExcelPrintData commentData = new ExcelPrintData();
-                commentData.AddPrintData("C", 17, m_InvData.Comment1);                              // ã‚³ãƒ¡ãƒ³ãƒˆ1(18è¡Œç›® Cåˆ—)           
-                commentData.AddPrintData("C", 18, m_InvData.Comment2);                              // ã‚³ãƒ¡ãƒ³ãƒˆ2(19è¡Œç›® Cåˆ—)           
-                commentData.AddPrintData("C", 19, m_InvData.Comment3);                              // ã‚³ãƒ¡ãƒ³ãƒˆ3(20è¡Œç›® Cåˆ—)           
-                commentData.AddPrintData("C", 20, m_InvData.Comment4);                              // ã‚³ãƒ¡ãƒ³ãƒˆ4(21è¡Œç›® Cåˆ—)           
-                commentData.AddPrintData("C", 21, m_InvData.Comment5);                              // ã‚³ãƒ¡ãƒ³ãƒˆ5(22è¡Œç›® Cåˆ—)           
-                commentData.ExcelCellSet(m_UsedExcel);
+//                        ExcelPrnData = new ExcelPrintData();
+//                        ExcelPrnData.AddPrintData("B", trow, strname);             // å·¥äº‹ä»¶å��
+//                        ExcelPrnData.AddPrintData("C", trow, string.Format("{0}å¹´{1}æœˆ{2}æ—¥"
+//                                                                        , Info.ConstructionPeriodStart.Year
+//                                                                        , Info.ConstructionPeriodStart.Month.ToString("00")
+//                                                                        , Info.ConstructionPeriodStart.Day.ToString("00")));    // å·¥æœŸé–‹å§‹
 
-                ConstructionBaseInfo Info = null;
-                m_dicConstructionBaseInfo.TryGetValue(m_lstReqHead[0].ReqConstructionCode, out Info);
+//                        string EndDate = string.Empty;
+//                        string DateDescription = string.Empty;
+//                        if (Info.RevCompleteDate != DateTime.MinValue)
+//                        {   // æ¤œæŸ»æ˜¯æ­£å®Œäº†æ—¥
+//                            EndDate = string.Format("{0}å¹´{1}æœˆ{2}æ—¥"
+//                                                                    , Info.RevCompleteDate.Year
+//                                                                    , Info.RevCompleteDate.Month.ToString("00")
+//                                                                    , Info.RevCompleteDate.Day.ToString("00"));
+//                            DateDescription = "ï¼ˆç�¾å ´æ˜¯æ­£å®Œäº†æ—¥ï¼‰";
+//                        }
+//                        else
+//                        {   // è«‹æ±‚ç¢ºèª�æ—¥
+//                            EndDate = string.Format("{0}å¹´{1}æœˆ{2}æ—¥"
+//                                                                    , Info.BillingDate.Year
+//                                                                    , Info.BillingDate.Month.ToString("00")
+//                                                                    , Info.BillingDate.Day.ToString("00"));
+//                            DateDescription = "ï¼ˆè«‹æ±‚æ›¸ç¢ºèª�æ—¥ï¼‰";
+//                        }
+//                        ExcelPrnData.AddPrintData("C", trow + 1, string.Format("ï½ž {0}", EndDate));                 // å·¥æœŸçµ‚äº†
+//                        ExcelPrnData.AddPrintData("C", trow + 2, DateDescription);                                  // çµ‚äº†æ—¥èª¬æ˜Ž
 
-                // å�°é‘‘æ��ç”»
-                PrintCoverSeal(Info.ConstructionPersonCode);
+//                        long lAmount = ReqData.RequestAmount0;
+//                        lAmount += ReqData.RequestAmount1;
+//                        lAmount += ReqData.RequestAmount2;
+//                        lAmount += ReqData.RequestAmount3;
+//                        lAmount += ReqData.RequestAmount4;
+//                        lAmount += ReqData.RequestAmount5;
+//                        lAmount += ReqData.RequestAmount6;
+//                        lAmount += ReqData.TaxAmount;
+//                        lAmount += ReqData.UnpaidAmount;
 
-                return CommonDefine.RetunAnswer.Answer0;
-            }
-            catch (Exception ex)
-            {
-                logger.ErrorFormat("ã‚·ã‚¹ãƒ†ãƒ ã‚¨ãƒ©ãƒ¼ï¼š{0}ï¼š{1}", CommonMotions.GetMethodName(), ex.Message);
-                return CommonDefine.RetunAnswer.Answer1;
-            }
-        }
-        #endregion
+//                        ExcelPrnData.AddPrintData("D", trow, lAmount.ToString("#,0"));                                  // è«‹æ±‚é‡‘é¡�
 
-        #region è«‹æ±‚æ›¸(ä¸€è¦§)ä½œæˆ�
-        /// <summary>
-        /// è«‹æ±‚æ›¸(ä¸€è¦§)ä½œæˆ�
-        /// </summary>
-        /// <returns></returns>
-        private CommonDefine.RetunAnswer PrintList()
-        {
-            try
-            {
-                int trow = 4;
-                ExcelPrintData ExcelPrnData = null;
+//                        ExcelPrnData.AddPrintData("E", trow, ReqData.Note);                                             // å‚™è€ƒ
+//                        ExcelPrnData.ExcelCellSet(m_UsedExcel);
 
-                //// è«‹æ±‚æ›¸è¡¨ç´™ã‚·ãƒ¼ãƒˆã�®å�–å¾—
-                m_UsedExcel.ExcelSheetGet(s_DicSheetName[enumSheetName.List]);
+//                        trow += 3;
 
-                List<int> lstKey = new List<int>(m_dicReqData.Keys);
+//                    }
+//                }
 
-                foreach (int nReqNo in lstKey)
-                {
-                    List<RequestData> lstData = null;
+//                return CommonDefine.RetunAnswer.Answer0;
+//            }
+//            catch (Exception ex)
+//            {
+//                logger.ErrorFormat("ã‚·ã‚¹ãƒ†ãƒ ã‚¨ãƒ©ãƒ¼ï¼š{0}ï¼š{1}", CommonMotions.GetMethodName(), ex.Message);
+//                return CommonDefine.RetunAnswer.Answer1;
+//            }
+//        }
+//        #endregion
 
-                    if (m_dicReqData.TryGetValue(nReqNo, out lstData) == false)
-                    {
-                        continue;
-                    }
+//        #region è«‹æ±‚æ›¸(å†…è¨³)ä½œæˆ�
+//        /// <summary>
+//        /// è«‹æ±‚æ›¸(å†…è¨³)ä½œæˆ�
+//        /// </summary>
+//        /// <param name="dicReqDetail"></param>
+//        /// <param name="constLedger"></param>
+//        /// <param name="lstConstLink"></param>
+//        /// <returns></returns>
+//        private CommonDefine.RetunAnswer PrintDetail(int no, RequestHead ReqHead, RequestData ReqData, ConstructionBaseInfo Info)
+//        {
+//            try
+//            {
+//                // è«‹æ±‚æ›¸å†…è¨³ã‚·ãƒ¼ãƒˆã�®å�–å¾—
+//                m_UsedExcel.ExcelSheetGet(s_DicSheetName[enumSheetName.Detail]);
 
-                    foreach (RequestData ReqData in lstData)
-                    {
-                        ConstructionBaseInfo Info = null;
+//                ExcelPrintData ExcelPrnData = null;
 
-                        if (m_dicConstructionBaseInfo.TryGetValue(ReqData.MainConstructionCode, out Info) == false)
-                        {
-                            continue;
-                        }
+//                // ------------------------------- å·¥äº‹å�� -------------------------------
+//                // â‘  å·¥äº‹ä»¶å��
+//                ExcelPrnData = new ExcelPrintData();
+//                ExcelPrnData.AddPrintData("C", 2, ReqData.ConstructionName).ExcelCellSet(m_UsedExcel);
 
-                        string strname = (ReqData.MainConstructionCode / 100).ToString();
-                        strname += "-";
-                        strname += (ReqData.MainConstructionCode % 100).ToString("00");
-                        strname += "\r\n";
-                        strname += ReqData.ConstructionName;
+//                // ------------------------------- è«‹è² é‡‘é¡� -------------------------------
+//                ExcelPrnData = new ExcelPrintData();
+//                ExcelPrnData.AddPrintData("A", 5, no.ToString());
+//                ExcelPrnData.AddPrintData("G", 5, ReqData.ContractAmount.ToString("#,0"));
+//                ExcelPrnData.ExcelCellSet(m_UsedExcel);
 
-                        ExcelPrnData = new ExcelPrintData();
-                        ExcelPrnData.AddPrintData("B", trow, strname);             // å·¥äº‹ä»¶å��
-                        ExcelPrnData.AddPrintData("C", trow, string.Format("{0}å¹´{1}æœˆ{2}æ—¥"
-                                                                        , Info.ConstructionPeriodStart.Year
-                                                                        , Info.ConstructionPeriodStart.Month.ToString("00")
-                                                                        , Info.ConstructionPeriodStart.Day.ToString("00")));    // å·¥æœŸé–‹å§‹
+//                // ------------------------------- å‰�å›žã�”è«‹æ±‚åˆ† -------------------------------
+//                // åˆ†å‰²æ‰•ã�„ã�®å ´å�ˆ
+//                if (Info.BillingSplitFlg == (int)ConstructionBaseInfo.BillingSplitFlgDef.SplitBilling)
+//                {
+//                    ExcelPrnData = new ExcelPrintData();
+//                    ExcelPrnData.AddPrintData("B", 7, "å‰�å›žã�”è«‹æ±‚æ¸ˆåˆ†");
+//                    ExcelPrnData.AddPrintData("C", 7, "å‰�å›žè«‹æ±‚æ›¸å�‚ç…§â€»å¢—æ¸›è£œæ­£æ¸ˆã�¿");
+//                    ExcelPrnData.AddPrintData("D", 7, "1");
+//                    ExcelPrnData.AddPrintData("E", 7, "å¼�");
+//                    ExcelPrnData.AddPrintData("G", 7, ReqData.PaidAmount.ToString("#,0"));
+//                    ExcelPrnData.ExcelCellSet(m_UsedExcel);
+//                }
 
-                        string EndDate = string.Empty;
-                        string DateDescription = string.Empty;
-                        if (Info.RevCompleteDate != DateTime.MinValue)
-                        {   // æ¤œæŸ»æ˜¯æ­£å®Œäº†æ—¥
-                            EndDate = string.Format("{0}å¹´{1}æœˆ{2}æ—¥"
-                                                                    , Info.RevCompleteDate.Year
-                                                                    , Info.RevCompleteDate.Month.ToString("00")
-                                                                    , Info.RevCompleteDate.Day.ToString("00"));
-                            DateDescription = "ï¼ˆç�¾å ´æ˜¯æ­£å®Œäº†æ—¥ï¼‰";
-                        }
-                        else
-                        {   // è«‹æ±‚ç¢ºèª�æ—¥
-                            EndDate = string.Format("{0}å¹´{1}æœˆ{2}æ—¥"
-                                                                    , Info.BillingDate.Year
-                                                                    , Info.BillingDate.Month.ToString("00")
-                                                                    , Info.BillingDate.Day.ToString("00"));
-                            DateDescription = "ï¼ˆè«‹æ±‚æ›¸ç¢ºèª�æ—¥ï¼‰";
-                        }
-                        ExcelPrnData.AddPrintData("C", trow + 1, string.Format("ï½ž {0}", EndDate));                 // å·¥æœŸçµ‚äº†
-                        ExcelPrnData.AddPrintData("C", trow + 2, DateDescription);                                  // çµ‚äº†æ—¥èª¬æ˜Ž
+//                long lTotalAmount = 0;
 
-                        long lAmount = ReqData.RequestAmount0;
-                        lAmount += ReqData.RequestAmount1;
-                        lAmount += ReqData.RequestAmount2;
-                        lAmount += ReqData.RequestAmount3;
-                        lAmount += ReqData.RequestAmount4;
-                        lAmount += ReqData.RequestAmount5;
-                        lAmount += ReqData.RequestAmount6;
-                        lAmount += ReqData.TaxAmount;
-                        lAmount += ReqData.UnpaidAmount;
+//                // ------------------------------- è¦‹ç©�é‡‘é¡�ï¼ˆæœ¬å·¥äº‹ï¼‰ -------------------------------
+//                ExcelPrnData = new ExcelPrintData();
+//                ExcelPrnData.AddPrintData("G", 9, ReqData.RequestAmount0.ToString("#,0"));
+//                ExcelPrnData.ExcelCellSet(m_UsedExcel);
 
-                        ExcelPrnData.AddPrintData("D", trow, lAmount.ToString("#,0"));                                  // è«‹æ±‚é‡‘é¡�
-
-                        ExcelPrnData.AddPrintData("E", trow, ReqData.Note);                                             // å‚™è€ƒ
-                        ExcelPrnData.ExcelCellSet(m_UsedExcel);
-
-                        trow += 3;
-
-                    }
-                }
-
-                return CommonDefine.RetunAnswer.Answer0;
-            }
-            catch (Exception ex)
-            {
-                logger.ErrorFormat("ã‚·ã‚¹ãƒ†ãƒ ã‚¨ãƒ©ãƒ¼ï¼š{0}ï¼š{1}", CommonMotions.GetMethodName(), ex.Message);
-                return CommonDefine.RetunAnswer.Answer1;
-            }
-        }
-        #endregion
-
-        #region è«‹æ±‚æ›¸(å†…è¨³)ä½œæˆ�
-        /// <summary>
-        /// è«‹æ±‚æ›¸(å†…è¨³)ä½œæˆ�
-        /// </summary>
-        /// <param name="dicReqDetail"></param>
-        /// <param name="constLedger"></param>
-        /// <param name="lstConstLink"></param>
-        /// <returns></returns>
-        private CommonDefine.RetunAnswer PrintDetail(int no, RequestHead ReqHead, RequestData ReqData, ConstructionBaseInfo Info)
-        {
-            try
-            {
-                // è«‹æ±‚æ›¸å†…è¨³ã‚·ãƒ¼ãƒˆã�®å�–å¾—
-                m_UsedExcel.ExcelSheetGet(s_DicSheetName[enumSheetName.Detail]);
-
-                ExcelPrintData ExcelPrnData = null;
-
-                // ------------------------------- å·¥äº‹å�� -------------------------------
-                // â‘  å·¥äº‹ä»¶å��
-                ExcelPrnData = new ExcelPrintData();
-                ExcelPrnData.AddPrintData("C", 2, ReqData.ConstructionName).ExcelCellSet(m_UsedExcel);
-
-                // ------------------------------- è«‹è² é‡‘é¡� -------------------------------
-                ExcelPrnData = new ExcelPrintData();
-                ExcelPrnData.AddPrintData("A", 5, no.ToString());
-                ExcelPrnData.AddPrintData("G", 5, ReqData.ContractAmount.ToString("#,0"));
-                ExcelPrnData.ExcelCellSet(m_UsedExcel);
-
-                // ------------------------------- å‰�å›žã�”è«‹æ±‚åˆ† -------------------------------
-                // åˆ†å‰²æ‰•ã�„ã�®å ´å�ˆ
-                if (Info.BillingSplitFlg == (int)ConstructionBaseInfo.BillingSplitFlgDef.SplitBilling)
-                {
-                    ExcelPrnData = new ExcelPrintData();
-                    ExcelPrnData.AddPrintData("B", 7, "å‰�å›žã�”è«‹æ±‚æ¸ˆåˆ†");
-                    ExcelPrnData.AddPrintData("C", 7, "å‰�å›žè«‹æ±‚æ›¸å�‚ç…§â€»å¢—æ¸›è£œæ­£æ¸ˆã�¿");
-                    ExcelPrnData.AddPrintData("D", 7, "1");
-                    ExcelPrnData.AddPrintData("E", 7, "å¼�");
-                    ExcelPrnData.AddPrintData("G", 7, ReqData.PaidAmount.ToString("#,0"));
-                    ExcelPrnData.ExcelCellSet(m_UsedExcel);
-                }
-
-                long lTotalAmount = 0;
-
-                // ------------------------------- è¦‹ç©�é‡‘é¡�ï¼ˆæœ¬å·¥äº‹ï¼‰ -------------------------------
-                ExcelPrnData = new ExcelPrintData();
-                ExcelPrnData.AddPrintData("G", 9, ReqData.RequestAmount0.ToString("#,0"));
-                ExcelPrnData.ExcelCellSet(m_UsedExcel);
-
-                lTotalAmount += ReqData.RequestAmount0;
+//                lTotalAmount += ReqData.RequestAmount0;
  
-                // ------------------------------- è¦‹ç©�é‡‘é¡�ï¼ˆå¢—æ¸›å·¥äº‹ï¼‰ -------------------------------
-                long[] lAmount = new long[] { ReqData.RequestAmount1, ReqData.RequestAmount2, ReqData.RequestAmount3, ReqData.RequestAmount4, ReqData.RequestAmount5, ReqData.RequestAmount6 };
-                string[] strTitle = new string[] { "å¢—æ¸›å·¥äº‹ï¼‘", "å¢—æ¸›å·¥äº‹ï¼’", "å¢—æ¸›å·¥äº‹ï¼“", "å¢—æ¸›å·¥äº‹ï¼”", "å¢—æ¸›å·¥äº‹ï¼•", "å¢—æ¸›å·¥äº‹ï¼–" };
+//                // ------------------------------- è¦‹ç©�é‡‘é¡�ï¼ˆå¢—æ¸›å·¥äº‹ï¼‰ -------------------------------
+//                long[] lAmount = new long[] { ReqData.RequestAmount1, ReqData.RequestAmount2, ReqData.RequestAmount3, ReqData.RequestAmount4, ReqData.RequestAmount5, ReqData.RequestAmount6 };
+//                string[] strTitle = new string[] { "å¢—æ¸›å·¥äº‹ï¼‘", "å¢—æ¸›å·¥äº‹ï¼’", "å¢—æ¸›å·¥äº‹ï¼“", "å¢—æ¸›å·¥äº‹ï¼”", "å¢—æ¸›å·¥äº‹ï¼•", "å¢—æ¸›å·¥äº‹ï¼–" };
 
-                for (int i = 0; i < 6; i++)
-                {
-                    if (lAmount[i] > 0)
-                    {
-                        ExcelPrnData = new ExcelPrintData();
-                        ExcelPrnData.AddPrintData("B", 10 + i, strTitle[i]);
-                        ExcelPrnData.AddPrintData("C", 10 + i, "è¿½åŠ å¢—æ¸›è¦‹ç©�ã‚‚ã‚Šå�‚ç…§");
-                        ExcelPrnData.AddPrintData("D", 10 + i, "1");
-                        ExcelPrnData.AddPrintData("E", 10 + i, "å¼�");
-                        ExcelPrnData.AddPrintData("G", 10 + i, lAmount[i].ToString("#,0"));
-                        ExcelPrnData.ExcelCellSet(m_UsedExcel);
+//                for (int i = 0; i < 6; i++)
+//                {
+//                    if (lAmount[i] > 0)
+//                    {
+//                        ExcelPrnData = new ExcelPrintData();
+//                        ExcelPrnData.AddPrintData("B", 10 + i, strTitle[i]);
+//                        ExcelPrnData.AddPrintData("C", 10 + i, "è¿½åŠ å¢—æ¸›è¦‹ç©�ã‚‚ã‚Šå�‚ç…§");
+//                        ExcelPrnData.AddPrintData("D", 10 + i, "1");
+//                        ExcelPrnData.AddPrintData("E", 10 + i, "å¼�");
+//                        ExcelPrnData.AddPrintData("G", 10 + i, lAmount[i].ToString("#,0"));
+//                        ExcelPrnData.ExcelCellSet(m_UsedExcel);
 
-                        lTotalAmount += lAmount[i];
-                    }
-                }
+//                        lTotalAmount += lAmount[i];
+//                    }
+//                }
 
-                // ------------------------------- ä»Šå›žã�”è«‹æ±‚åˆ† -------------------------------
-                ExcelPrnData = new ExcelPrintData();
-                ExcelPrnData.AddPrintData("G", 17, lTotalAmount.ToString("#,0"));
-                ExcelPrnData.ExcelCellSet(m_UsedExcel);
+//                // ------------------------------- ä»Šå›žã�”è«‹æ±‚åˆ† -------------------------------
+//                ExcelPrnData = new ExcelPrintData();
+//                ExcelPrnData.AddPrintData("G", 17, lTotalAmount.ToString("#,0"));
+//                ExcelPrnData.ExcelCellSet(m_UsedExcel);
 
-                // ------------------------------- è«‹è² é‡‘é¡�æ®‹é‡‘ -------------------------------
-                // åˆ†å‰²æ‰•ã�„ã�®å ´å�ˆ
-                if (Info.BillingSplitFlg == (int)ConstructionBaseInfo.BillingSplitFlgDef.SplitBilling)
-                {
-                    ExcelPrnData = new ExcelPrintData();
-                    ExcelPrnData.AddPrintData("B", 19, "è«‹è² é‡‘é¡�æ®‹é‡‘");
-                    ExcelPrnData.AddPrintData("D", 19, "1");
-                    ExcelPrnData.AddPrintData("E", 19, "å¼�");
-                    ExcelPrnData.AddPrintData("G", 19, ReqData.UnclaimedAmount.ToString("#,0"));
-                    ExcelPrnData.ExcelCellSet(m_UsedExcel);
-                }
+//                // ------------------------------- è«‹è² é‡‘é¡�æ®‹é‡‘ -------------------------------
+//                // åˆ†å‰²æ‰•ã�„ã�®å ´å�ˆ
+//                if (Info.BillingSplitFlg == (int)ConstructionBaseInfo.BillingSplitFlgDef.SplitBilling)
+//                {
+//                    ExcelPrnData = new ExcelPrintData();
+//                    ExcelPrnData.AddPrintData("B", 19, "è«‹è² é‡‘é¡�æ®‹é‡‘");
+//                    ExcelPrnData.AddPrintData("D", 19, "1");
+//                    ExcelPrnData.AddPrintData("E", 19, "å¼�");
+//                    ExcelPrnData.AddPrintData("G", 19, ReqData.UnclaimedAmount.ToString("#,0"));
+//                    ExcelPrnData.ExcelCellSet(m_UsedExcel);
+//                }
 
-                // ------------------------------- æœªå…¥é‡‘åˆ† -------------------------------
-                if (ReqData.UnpaidAmount > 0)
-                {
-                    ExcelPrnData = new ExcelPrintData();
-                    ExcelPrnData.AddPrintData("B", 21, "æœªå…¥é‡‘åˆ†");
-                    ExcelPrnData.AddPrintData("G", 21, ReqData.UnpaidAmount.ToString("#,0"));
-                    ExcelPrnData.ExcelCellSet(m_UsedExcel);
+//                // ------------------------------- æœªå…¥é‡‘åˆ† -------------------------------
+//                if (ReqData.UnpaidAmount > 0)
+//                {
+//                    ExcelPrnData = new ExcelPrintData();
+//                    ExcelPrnData.AddPrintData("B", 21, "æœªå…¥é‡‘åˆ†");
+//                    ExcelPrnData.AddPrintData("G", 21, ReqData.UnpaidAmount.ToString("#,0"));
+//                    ExcelPrnData.ExcelCellSet(m_UsedExcel);
 
-                    lTotalAmount += ReqData.UnpaidAmount;
-                }
+//                    lTotalAmount += ReqData.UnpaidAmount;
+//                }
 
-                // ------------------------------- å°�è¨ˆ -------------------------------
-                ExcelPrnData = new ExcelPrintData();
-                ExcelPrnData.AddPrintData("G", 23, lTotalAmount.ToString("#,0"));
-                ExcelPrnData.ExcelCellSet(m_UsedExcel);
+//                // ------------------------------- å°�è¨ˆ -------------------------------
+//                ExcelPrnData = new ExcelPrintData();
+//                ExcelPrnData.AddPrintData("G", 23, lTotalAmount.ToString("#,0"));
+//                ExcelPrnData.ExcelCellSet(m_UsedExcel);
 
-                // ------------------------------- æ¶ˆè²»ç¨Ž -------------------------------
-                ExcelPrnData = new ExcelPrintData();
-                ExcelPrnData.AddPrintData("C", 24, string.Format("{0}%",CommonMotions.SystemMasterData.ConsumptionTax));
-                ExcelPrnData.AddPrintData("G", 24, ReqData.TaxAmount.ToString("#,0"));
-                ExcelPrnData.ExcelCellSet(m_UsedExcel);
-                lTotalAmount += ReqData.TaxAmount;
+//                // ------------------------------- æ¶ˆè²»ç¨Ž -------------------------------
+//                ExcelPrnData = new ExcelPrintData();
+//                ExcelPrnData.AddPrintData("C", 24, string.Format("{0}%",CommonMotions.SystemMasterData.ConsumptionTax));
+//                ExcelPrnData.AddPrintData("G", 24, ReqData.TaxAmount.ToString("#,0"));
+//                ExcelPrnData.ExcelCellSet(m_UsedExcel);
+//                lTotalAmount += ReqData.TaxAmount;
 
-                // ------------------------------- ç¨Žè¾¼é‡‘é¡�å�ˆè¨ˆ -------------------------------
-                ExcelPrnData = new ExcelPrintData();
-                ExcelPrnData.AddPrintData("G", 25, lTotalAmount.ToString("#,0"));
-                ExcelPrnData.ExcelCellSet(m_UsedExcel);
+//                // ------------------------------- ç¨Žè¾¼é‡‘é¡�å�ˆè¨ˆ -------------------------------
+//                ExcelPrnData = new ExcelPrintData();
+//                ExcelPrnData.AddPrintData("G", 25, lTotalAmount.ToString("#,0"));
+//                ExcelPrnData.ExcelCellSet(m_UsedExcel);
 
-                return CommonDefine.RetunAnswer.Answer0;
-            }
-            catch (Exception ex)
-            {
-                logger.ErrorFormat("ã‚·ã‚¹ãƒ†ãƒ ã‚¨ãƒ©ãƒ¼ï¼š{0}ï¼š{1}", CommonMotions.GetMethodName(), ex.Message);
-                return CommonDefine.RetunAnswer.Answer1;
-            }
+//                return CommonDefine.RetunAnswer.Answer0;
+//            }
+//            catch (Exception ex)
+//            {
+//                logger.ErrorFormat("ã‚·ã‚¹ãƒ†ãƒ ã‚¨ãƒ©ãƒ¼ï¼š{0}ï¼š{1}", CommonMotions.GetMethodName(), ex.Message);
+//                return CommonDefine.RetunAnswer.Answer1;
+//            }
 
-        }
-        #endregion
+//        }
+//        #endregion
 
-        #region Excelãƒ‡ãƒ¼ã‚¿å‡ºåŠ›ç”¨å†…éƒ¨ã‚¯ãƒ©ã‚¹å®šç¾©
-        /// <summary>
-        /// Excelãƒ‡ãƒ¼ã‚¿å‡ºåŠ›ç”¨å†…éƒ¨ã‚¯ãƒ©ã‚¹å®šç¾©
-        /// </summary>
-        private class ExcelPrintData
-        {
-            // Excelãƒ‡ãƒ¼ã‚¿ä¿�æŒ�ç”¨ç”¨ãƒ‡ã‚£ã‚¯ã‚·ãƒ§ãƒŠãƒª
-            private Dictionary<int, Dictionary<int, object>> m_DicPrintData = new Dictionary<int, Dictionary<int, object>>();
+//        #region Excelãƒ‡ãƒ¼ã‚¿å‡ºåŠ›ç”¨å†…éƒ¨ã‚¯ãƒ©ã‚¹å®šç¾©
+//        /// <summary>
+//        /// Excelãƒ‡ãƒ¼ã‚¿å‡ºåŠ›ç”¨å†…éƒ¨ã‚¯ãƒ©ã‚¹å®šç¾©
+//        /// </summary>
+//        private class ExcelPrintData
+//        {
+//            // Excelãƒ‡ãƒ¼ã‚¿ä¿�æŒ�ç”¨ç”¨ãƒ‡ã‚£ã‚¯ã‚·ãƒ§ãƒŠãƒª
+//            private Dictionary<int, Dictionary<int, object>> m_DicPrintData = new Dictionary<int, Dictionary<int, object>>();
 
-            // Excelã‚«ãƒ©ãƒ å��å�–å¾—ç”¨
-            private static char[] s_Asc = { 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z' };
+//            // Excelã‚«ãƒ©ãƒ å��å�–å¾—ç”¨
+//            private static char[] s_Asc = { 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z' };
 
-            private int m_RowMin = int.MaxValue;
-            private int m_RowMax = int.MinValue;
-            private int m_ColMin = int.MaxValue;
-            private int m_ColMax = int.MinValue;
+//            private int m_RowMin = int.MaxValue;
+//            private int m_RowMax = int.MinValue;
+//            private int m_ColMin = int.MaxValue;
+//            private int m_ColMax = int.MinValue;
 
-            /// <summary>
-            /// ã‚¨ã‚¯ã‚»ãƒ«ã‚«ãƒ©ãƒ å��ã�¨ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ç•ªå�·ã�®ãƒ‡ã‚£ã‚¯ã‚·ãƒ§ãƒŠãƒª
-            /// </summary>
-            private static Dictionary<string, int> s_IndexOfExcelColumn = InitDicColumnIndex();
+//            /// <summary>
+//            /// ã‚¨ã‚¯ã‚»ãƒ«ã‚«ãƒ©ãƒ å��ã�¨ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ç•ªå�·ã�®ãƒ‡ã‚£ã‚¯ã‚·ãƒ§ãƒŠãƒª
+//            /// </summary>
+//            private static Dictionary<string, int> s_IndexOfExcelColumn = InitDicColumnIndex();
 
-            /// <summary>
-            /// Excelã‚«ãƒ©ãƒ ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ãƒ‡ã‚£ã‚¯ã‚·ãƒ§ãƒŠãƒªä½œæˆ�ãƒ¡ã‚½ãƒƒãƒ‰
-            /// </summary>
-            /// <returns></returns>
-            private static Dictionary<string, int> InitDicColumnIndex()
-            {
-                var result = new Dictionary<string, int>();
+//            /// <summary>
+//            /// Excelã‚«ãƒ©ãƒ ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ãƒ‡ã‚£ã‚¯ã‚·ãƒ§ãƒŠãƒªä½œæˆ�ãƒ¡ã‚½ãƒƒãƒ‰
+//            /// </summary>
+//            /// <returns></returns>
+//            private static Dictionary<string, int> InitDicColumnIndex()
+//            {
+//                var result = new Dictionary<string, int>();
 
-                for (int indx = 0; indx < 256; indx++)
-                {
-                    string res = GetColumnString(indx);
+//                for (int indx = 0; indx < 256; indx++)
+//                {
+//                    string res = GetColumnString(indx);
 
-                    result.Add(res, indx);
+//                    result.Add(res, indx);
 
-                }
-                return result;
-            }
+//                }
+//                return result;
+//            }
 
-            /// <summary>
-            /// ã‚«ãƒ©ãƒ è‹±å­—å��ã‚’å�–å¾—
-            /// </summary>
-            /// <param name="colIndex"></param>
-            /// <returns></returns>
-            private static string GetColumnString(int colIndex)
-            {
-                string res = "";
+//            /// <summary>
+//            /// ã‚«ãƒ©ãƒ è‹±å­—å��ã‚’å�–å¾—
+//            /// </summary>
+//            /// <param name="colIndex"></param>
+//            /// <returns></returns>
+//            private static string GetColumnString(int colIndex)
+//            {
+//                string res = "";
 
-                int court = colIndex;
-                while (court >= s_Asc.Count())
-                {
-                    res = s_Asc[court % s_Asc.Count()] + res;
-                    court = (int)Math.Truncate((double)court / (double)s_Asc.Count() - 1);
-                }
-                res = s_Asc[court % s_Asc.Count()] + res;
+//                int court = colIndex;
+//                while (court >= s_Asc.Count())
+//                {
+//                    res = s_Asc[court % s_Asc.Count()] + res;
+//                    court = (int)Math.Truncate((double)court / (double)s_Asc.Count() - 1);
+//                }
+//                res = s_Asc[court % s_Asc.Count()] + res;
 
-                return res;
-            }
+//                return res;
+//            }
 
-            #region ãƒ‡ãƒ¼ã‚¿è¿½åŠ 
-            /// <summary>
-            /// ãƒ‡ãƒ¼ã‚¿è¿½åŠ 
-            /// </summary>
-            /// <param name="colName">ã‚«ãƒ©ãƒ å��æ–‡å­—(â€» "A", "B", ç­‰...</param>
-            /// <param name="rowNo">è¡Œã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ç•ªå�· 0ã‚ªãƒªã‚¸ãƒ³</param>
-            /// <param name="data">å‡ºåŠ›ãƒ‡ãƒ¼ã‚¿ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆ</param>
-            /// <returns></returns>
-            public ExcelPrintData AddPrintData(string colName, int rowNo, object data)
-            {
-                return AddPrintData(s_IndexOfExcelColumn[colName], rowNo, data);
-            }
-            #endregion
+//            #region ãƒ‡ãƒ¼ã‚¿è¿½åŠ 
+//            /// <summary>
+//            /// ãƒ‡ãƒ¼ã‚¿è¿½åŠ 
+//            /// </summary>
+//            /// <param name="colName">ã‚«ãƒ©ãƒ å��æ–‡å­—(â€» "A", "B", ç­‰...</param>
+//            /// <param name="rowNo">è¡Œã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ç•ªå�· 0ã‚ªãƒªã‚¸ãƒ³</param>
+//            /// <param name="data">å‡ºåŠ›ãƒ‡ãƒ¼ã‚¿ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆ</param>
+//            /// <returns></returns>
+//            public ExcelPrintData AddPrintData(string colName, int rowNo, object data)
+//            {
+//                return AddPrintData(s_IndexOfExcelColumn[colName], rowNo, data);
+//            }
+//            #endregion
 
-            #region ãƒ‡ãƒ¼ã‚¿è¿½åŠ 
-            /// <summary>
-            /// ãƒ‡ãƒ¼ã‚¿è¿½åŠ 
-            /// </summary>
-            /// <param name="colIndex">ã‚«ãƒ©ãƒ ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ 0ã‚ªãƒªã‚¸ãƒ³</param>
-            /// <param name="rowNo">è¡Œã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ç•ªå�· 0ã‚ªãƒªã‚¸ãƒ³</param>
-            /// <param name="data">å‡ºåŠ›ãƒ‡ãƒ¼ã‚¿ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆ</param>
-            /// <returns></returns>
-            public ExcelPrintData AddPrintData(int colIndex, int rowNo, object data)
-            {
-                if (!m_DicPrintData.ContainsKey(rowNo))
-                    m_DicPrintData[rowNo] = new Dictionary<int, object>();
+//            #region ãƒ‡ãƒ¼ã‚¿è¿½åŠ 
+//            /// <summary>
+//            /// ãƒ‡ãƒ¼ã‚¿è¿½åŠ 
+//            /// </summary>
+//            /// <param name="colIndex">ã‚«ãƒ©ãƒ ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ 0ã‚ªãƒªã‚¸ãƒ³</param>
+//            /// <param name="rowNo">è¡Œã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ç•ªå�· 0ã‚ªãƒªã‚¸ãƒ³</param>
+//            /// <param name="data">å‡ºåŠ›ãƒ‡ãƒ¼ã‚¿ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆ</param>
+//            /// <returns></returns>
+//            public ExcelPrintData AddPrintData(int colIndex, int rowNo, object data)
+//            {
+//                if (!m_DicPrintData.ContainsKey(rowNo))
+//                    m_DicPrintData[rowNo] = new Dictionary<int, object>();
 
-                m_DicPrintData[rowNo][colIndex] = data;
+//                m_DicPrintData[rowNo][colIndex] = data;
 
-                if (m_RowMin > rowNo) m_RowMin = rowNo;
-                if (m_RowMax < rowNo) m_RowMax = rowNo;
-                if (m_ColMin > colIndex) m_ColMin = colIndex;
-                if (m_ColMax < colIndex) m_ColMax = colIndex;
+//                if (m_RowMin > rowNo) m_RowMin = rowNo;
+//                if (m_RowMax < rowNo) m_RowMax = rowNo;
+//                if (m_ColMin > colIndex) m_ColMin = colIndex;
+//                if (m_ColMax < colIndex) m_ColMax = colIndex;
 
-                return this;
-            }
-            #endregion
+//                return this;
+//            }
+//            #endregion
 
-            #region UsedExcelã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆã�«ãƒ‡ãƒ¼ã‚¿ã‚’ã‚»ãƒƒãƒˆã�™ã‚‹
-            /// <summary>
-            /// UsedExcelã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆã�«ãƒ‡ãƒ¼ã‚¿ã‚’ã‚»ãƒƒãƒˆã�™ã‚‹
-            /// </summary>
-            /// <param name="usedExcel">UsedExcelã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆ(ã‚·ãƒ¼ãƒˆå�–å¾—æ¸ˆã�¿ã�§ã�‚ã‚‹ã�“ã�¨)</param>
-            public void ExcelCellSet(UsedExcel usedExcel)
-            {
-                if (m_RowMin == int.MaxValue ||
-                    m_RowMax == int.MinValue ||
-                    m_ColMin == int.MaxValue ||
-                    m_ColMax == int.MinValue)
-                {
-                    return;
-                }
+//            #region UsedExcelã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆã�«ãƒ‡ãƒ¼ã‚¿ã‚’ã‚»ãƒƒãƒˆã�™ã‚‹
+//            /// <summary>
+//            /// UsedExcelã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆã�«ãƒ‡ãƒ¼ã‚¿ã‚’ã‚»ãƒƒãƒˆã�™ã‚‹
+//            /// </summary>
+//            /// <param name="usedExcel">UsedExcelã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆ(ã‚·ãƒ¼ãƒˆå�–å¾—æ¸ˆã�¿ã�§ã�‚ã‚‹ã�“ã�¨)</param>
+//            public void ExcelCellSet(UsedExcel usedExcel)
+//            {
+//                if (m_RowMin == int.MaxValue ||
+//                    m_RowMax == int.MinValue ||
+//                    m_ColMin == int.MaxValue ||
+//                    m_ColMax == int.MinValue)
+//                {
+//                    return;
+//                }
 
-                // ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆé…�åˆ—ã‚’å®£è¨€
-                object[,] objCells = new object[m_RowMax - m_RowMin + 1, m_ColMax - m_ColMin + 1];
+//                // ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆé…�åˆ—ã‚’å®£è¨€
+//                object[,] objCells = new object[m_RowMax - m_RowMin + 1, m_ColMax - m_ColMin + 1];
 
-                // é…�åˆ—ã�«ãƒ‡ãƒ¼ã‚¿ã‚’ç§»ã�—æ›¿ã�ˆã‚‹
-                foreach (int row in m_DicPrintData.Keys)
-                {
-                    foreach (int col in m_DicPrintData[row].Keys)
-                    {
-                        objCells[row - m_RowMin, col - m_ColMin] = m_DicPrintData[row][col];
-                    }
-                }
+//                // é…�åˆ—ã�«ãƒ‡ãƒ¼ã‚¿ã‚’ç§»ã�—æ›¿ã�ˆã‚‹
+//                foreach (int row in m_DicPrintData.Keys)
+//                {
+//                    foreach (int col in m_DicPrintData[row].Keys)
+//                    {
+//                        objCells[row - m_RowMin, col - m_ColMin] = m_DicPrintData[row][col];
+//                    }
+//                }
 
-                // ã‚»ãƒ«å��ã‚’å�–å¾—
-                string startCell = GetColumnString(m_ColMin) + string.Format("{0}", m_RowMin + 1);
-                string endCell = GetColumnString(m_ColMax) + string.Format("{0}", m_RowMax + 1);
+//                // ã‚»ãƒ«å��ã‚’å�–å¾—
+//                string startCell = GetColumnString(m_ColMin) + string.Format("{0}", m_RowMin + 1);
+//                string endCell = GetColumnString(m_ColMax) + string.Format("{0}", m_RowMax + 1);
 
-                // ã‚»ãƒ«ã�«ã‚»ãƒƒãƒˆ
-                usedExcel.ExcelCellSet(startCell, objCells, endCell);
+//                // ã‚»ãƒ«ã�«ã‚»ãƒƒãƒˆ
+//                usedExcel.ExcelCellSet(startCell, objCells, endCell);
 
-            }
-            #endregion
-        }
-        #endregion
+//            }
+//            #endregion
+//        }
+//        #endregion
 
 
     }
Index: branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/RequestEntry/FrmRequestPrintSel.Designer.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/RequestEntry/FrmRequestPrintSel.Designer.cs	(revision 329)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/RequestEntry/FrmRequestPrintSel.Designer.cs	(revision 330)
@@ -29,11 +29,11 @@
         /// </summary>
         private void InitializeComponent()
         {
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle8 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle9 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle10 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle();
             this.label4 = new System.Windows.Forms.Label();
             this.lbReqMonth = new System.Windows.Forms.Label();
             this.label2 = new System.Windows.Forms.Label();
@@ -55,6 +55,7 @@
             this.panel2 = new System.Windows.Forms.Panel();
             this.label1 = new System.Windows.Forms.Label();
             this.lblProcessTitil = new System.Windows.Forms.Label();
+            this.PrintProgress = new System.Windows.Forms.ProgressBar();
             this.Column1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.col1 = new System.Windows.Forms.DataGridViewCheckBoxColumn();
             this.col2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
@@ -145,18 +146,19 @@
             // 
             this.panel1.BackColor = System.Drawing.Color.LightGray;
             this.panel1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
+            this.panel1.Controls.Add(this.btnAllUnselect);
+            this.panel1.Controls.Add(this.btnAllSelect);
             this.panel1.Controls.Add(this.lbTotalAmount);
             this.panel1.Controls.Add(this.dgv1);
             this.panel1.Controls.Add(this.label8);
-            this.panel1.Controls.Add(this.btnAllUnselect);
             this.panel1.Controls.Add(this.label7);
-            this.panel1.Controls.Add(this.btnAllSelect);
             this.panel1.Controls.Add(this.lbSelect);
             this.panel1.Controls.Add(this.label5);
+            this.panel1.Controls.Add(this.PrintProgress);
             this.panel1.ForeColor = System.Drawing.Color.Black;
-            this.panel1.Location = new System.Drawing.Point(12, 122);
+            this.panel1.Location = new System.Drawing.Point(10, 122);
             this.panel1.Name = "panel1";
-            this.panel1.Size = new System.Drawing.Size(1260, 490);
+            this.panel1.Size = new System.Drawing.Size(1260, 492);
             this.panel1.TabIndex = 37;
             // 
             // lbTotalAmount
@@ -177,15 +179,15 @@
             this.dgv1.AllowUserToResizeColumns = false;
             this.dgv1.AllowUserToResizeRows = false;
             this.dgv1.BackgroundColor = System.Drawing.Color.White;
-            dataGridViewCellStyle6.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
-            dataGridViewCellStyle6.BackColor = System.Drawing.SystemColors.Control;
-            dataGridViewCellStyle6.Font = new System.Drawing.Font("ï¼­ï¼³ æ˜Žæœ�", 11.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
-            dataGridViewCellStyle6.ForeColor = System.Drawing.SystemColors.WindowText;
-            dataGridViewCellStyle6.SelectionBackColor = System.Drawing.SystemColors.Highlight;
-            dataGridViewCellStyle6.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
-            dataGridViewCellStyle6.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
-            this.dgv1.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle6;
-            this.dgv1.ColumnHeadersHeight = 28;
+            dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
+            dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Control;
+            dataGridViewCellStyle1.Font = new System.Drawing.Font("ï¼­ï¼³ æ˜Žæœ�", 11.25F, 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.dgv1.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle1;
+            this.dgv1.ColumnHeadersHeight = 24;
             this.dgv1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing;
             this.dgv1.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
             this.Column1,
@@ -227,7 +229,7 @@
             this.btnAllUnselect.Cursor = System.Windows.Forms.Cursors.Default;
             this.btnAllUnselect.Font = new System.Drawing.Font("ï¼­ï¼³ æ˜Žæœ�", 11.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
             this.btnAllUnselect.ForeColor = System.Drawing.Color.Black;
-            this.btnAllUnselect.Location = new System.Drawing.Point(134, 454);
+            this.btnAllUnselect.Location = new System.Drawing.Point(135, 455);
             this.btnAllUnselect.Name = "btnAllUnselect";
             this.btnAllUnselect.Size = new System.Drawing.Size(120, 30);
             this.btnAllUnselect.TabIndex = 38;
@@ -255,7 +257,7 @@
             this.btnAllSelect.Cursor = System.Windows.Forms.Cursors.Default;
             this.btnAllSelect.Font = new System.Drawing.Font("ï¼­ï¼³ æ˜Žæœ�", 11.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
             this.btnAllSelect.ForeColor = System.Drawing.Color.Black;
-            this.btnAllSelect.Location = new System.Drawing.Point(8, 454);
+            this.btnAllSelect.Location = new System.Drawing.Point(9, 455);
             this.btnAllSelect.Name = "btnAllSelect";
             this.btnAllSelect.Size = new System.Drawing.Size(120, 30);
             this.btnAllSelect.TabIndex = 37;
@@ -337,7 +339,7 @@
             this.panel2.Controls.Add(this.label2);
             this.panel2.Controls.Add(this.label10);
             this.panel2.Controls.Add(this.lbOrderersName);
-            this.panel2.Location = new System.Drawing.Point(12, 40);
+            this.panel2.Location = new System.Drawing.Point(10, 40);
             this.panel2.Name = "panel2";
             this.panel2.Size = new System.Drawing.Size(1260, 74);
             this.panel2.TabIndex = 41;
@@ -366,12 +368,22 @@
             this.lblProcessTitil.TabIndex = 43;
             this.lblProcessTitil.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
             // 
+            // PrintProgress
+            // 
+            this.PrintProgress.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) 
+            | System.Windows.Forms.AnchorStyles.Right)));
+            this.PrintProgress.Location = new System.Drawing.Point(8, 450);
+            this.PrintProgress.Name = "PrintProgress";
+            this.PrintProgress.Size = new System.Drawing.Size(1240, 36);
+            this.PrintProgress.TabIndex = 44;
+            this.PrintProgress.Visible = false;
+            // 
             // Column1
             // 
-            dataGridViewCellStyle7.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
-            dataGridViewCellStyle7.Font = new System.Drawing.Font("Century", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
-            dataGridViewCellStyle7.ForeColor = System.Drawing.Color.Black;
-            this.Column1.DefaultCellStyle = dataGridViewCellStyle7;
+            dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
+            dataGridViewCellStyle2.Font = new System.Drawing.Font("Century", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+            dataGridViewCellStyle2.ForeColor = System.Drawing.Color.Black;
+            this.Column1.DefaultCellStyle = dataGridViewCellStyle2;
             this.Column1.Frozen = true;
             this.Column1.HeaderText = "â„–";
             this.Column1.Name = "Column1";
@@ -381,11 +393,11 @@
             // 
             // col1
             // 
-            dataGridViewCellStyle8.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
-            dataGridViewCellStyle8.Font = new System.Drawing.Font("Century", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
-            dataGridViewCellStyle8.ForeColor = System.Drawing.Color.Black;
-            dataGridViewCellStyle8.NullValue = false;
-            this.col1.DefaultCellStyle = dataGridViewCellStyle8;
+            dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
+            dataGridViewCellStyle3.Font = new System.Drawing.Font("Century", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+            dataGridViewCellStyle3.ForeColor = System.Drawing.Color.Black;
+            dataGridViewCellStyle3.NullValue = false;
+            this.col1.DefaultCellStyle = dataGridViewCellStyle3;
             this.col1.Frozen = true;
             this.col1.HeaderText = "";
             this.col1.Name = "col1";
@@ -400,14 +412,14 @@
             this.col2.ReadOnly = true;
             this.col2.Resizable = System.Windows.Forms.DataGridViewTriState.False;
             this.col2.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
-            this.col2.Width = 370;
+            this.col2.Width = 500;
             // 
             // col3
             // 
-            dataGridViewCellStyle9.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
-            dataGridViewCellStyle9.Font = new System.Drawing.Font("Century", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
-            dataGridViewCellStyle9.ForeColor = System.Drawing.Color.Black;
-            this.col3.DefaultCellStyle = dataGridViewCellStyle9;
+            dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
+            dataGridViewCellStyle4.Font = new System.Drawing.Font("Century", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+            dataGridViewCellStyle4.ForeColor = System.Drawing.Color.Black;
+            this.col3.DefaultCellStyle = dataGridViewCellStyle4;
             this.col3.Frozen = true;
             this.col3.HeaderText = "è«‹æ±‚é‡‘é¡�";
             this.col3.Name = "col3";
@@ -418,8 +430,10 @@
             // 
             // col4
             // 
-            dataGridViewCellStyle10.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
-            this.col4.DefaultCellStyle = dataGridViewCellStyle10;
+            dataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
+            dataGridViewCellStyle5.Font = new System.Drawing.Font("Century", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+            dataGridViewCellStyle5.ForeColor = System.Drawing.Color.Black;
+            this.col4.DefaultCellStyle = dataGridViewCellStyle5;
             this.col4.Frozen = true;
             this.col4.HeaderText = "è«‹æ±‚æ›¸ä½œæˆ�æ—¥";
             this.col4.Name = "col4";
@@ -452,9 +466,9 @@
             this.Controls.Add(this.label1);
             this.Controls.Add(this.panel2);
             this.Controls.Add(this.btnDel);
-            this.Controls.Add(this.panel1);
             this.Controls.Add(this.btnEnd);
             this.Controls.Add(this.btnGenerate);
+            this.Controls.Add(this.panel1);
             this.Font = new System.Drawing.Font("ï¼­ï¼³ æ˜Žæœ�", 11.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
             this.ForeColor = System.Drawing.SystemColors.ControlText;
             this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Fixed3D;
@@ -494,6 +508,7 @@
         private System.Windows.Forms.Panel panel2;
         private System.Windows.Forms.Label label1;
         private System.Windows.Forms.Label lblProcessTitil;
+        private System.Windows.Forms.ProgressBar PrintProgress;
         private System.Windows.Forms.DataGridViewTextBoxColumn Column1;
         private System.Windows.Forms.DataGridViewCheckBoxColumn col1;
         private System.Windows.Forms.DataGridViewTextBoxColumn col2;
Index: branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/RequestEntry/FrmRequestPrintSel.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/RequestEntry/FrmRequestPrintSel.cs	(revision 329)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/RequestEntry/FrmRequestPrintSel.cs	(revision 330)
@@ -401,40 +401,9 @@
         {
             try
             {
-                int ret;
-                string msg = "";
+                // è«‹æ±‚æ›¸ä½œæˆ�å‡¦ç�†
+                GenerateProc();
 
-                // ä½œæˆ�ãƒ�ã‚§ãƒƒã‚¯
-                ret = CheckGenerate(ref msg);
-                bool bError = false;
-                switch (ret)
-                {
-                    case (int)CheckState.Ok:
-                        if (MessageBox.Show(msg, "ç™»éŒ²ç¢ºèª�"
-                                , MessageBoxButtons.YesNo
-                                , MessageBoxIcon.Question) != DialogResult.Yes)
-                        {
-                            return;
-                        }
-                        break;
-                    case (int)CheckState.Warning:
-                        if (MessageBox.Show(msg, "ç™»éŒ²ç¢ºèª�"
-                                , MessageBoxButtons.YesNo
-                                , MessageBoxIcon.Warning) != DialogResult.Yes)
-                        {
-                            return;
-                        }
-                        break;
-                    default:
-                        MessageBox.Show(msg, "ç™»éŒ²ç¢ºèª�", MessageBoxButtons.OK, MessageBoxIcon.Error);
-                        bError = true;
-                        break;
-                }
-                if (bError) return;
-
-                // ãƒ‡ãƒ¼ã‚¿ã�®ç™»éŒ²
-                m_nInvoiceNo = EntryData();
-
                 DialogResult = DialogResult.OK;
             }
             catch (Exception ex)
Index: branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/RequestEntry/FrmRequestPrintSelAux.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/RequestEntry/FrmRequestPrintSelAux.cs	(revision 329)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/RequestEntry/FrmRequestPrintSelAux.cs	(revision 330)
@@ -297,7 +297,8 @@
             try
             {
                 int nCount = m_lstReqHead.Count;
-                if (nCount < 15) nCount = 15;
+                // ã‚°ãƒªãƒƒãƒ‰ä¸€æ�¯ã�®è¡Œã�Œ16è¡Œ
+                if (nCount < 16) nCount = 16;
 
                 // è¡Œã‚’è¿½åŠ 
                 dgv1.Rows.Add(nCount + 1);
@@ -602,7 +603,7 @@
                 if (nInvoiceNo == 0)
                 {
                     // è«‹æ±‚æ›¸Noã�®æŽ¡ç•ª
-                    nInvoiceNo = ioInvData.NumberingInvoiceNo(m_nRequestMonth);
+                    nInvoiceNo = ioInvData.NumberingInvoiceNo(m_nRequestMonth, false);
                     if (nInvoiceNo == -1)
                     {
                         // DBãƒ­ãƒ¼ãƒ«ãƒ�ãƒƒã‚¯
@@ -619,7 +620,7 @@
                     InvData.OrderersDivision = m_nOrderersDivision;
                     InvData.OrderersCode = m_nOrderersCode;
                     InvData.RequestMonth = m_nRequestMonth;
-                    InvData.SeqNo = ioInvData.NumberingSeqNo(m_nOrderersDivision, m_nOrderersCode, m_nRequestMonth);
+                    InvData.SeqNo = ioInvData.NumberingSeqNo(m_nOrderersDivision, m_nOrderersCode, m_nRequestMonth, false);
                     InvData.CretateDate = DateTime.Now;
                     InvData.RequestDate = DateTime.MinValue;
                     InvData.RequestName = m_strOrderersName;
@@ -627,7 +628,7 @@
                     InvData.TaxAmount = 0;
 
                     // è«‹æ±‚æ›¸ãƒ‡ãƒ¼ã‚¿ã�®æŒ¿å…¥
-                    if (ioInvData.InsertAction(InvData) == false)
+                    if (!ioInvData.InsertAction(InvData, false))
                     {
                         // DBãƒ­ãƒ¼ãƒ«ãƒ�ãƒƒã‚¯
                         ioInvData.rollback();
@@ -639,7 +640,7 @@
                 else
                 {
                     // è«‹æ±‚æ›¸ãƒ‡ãƒ¼ã‚¿ã�®å�–å¾—
-                    if (m_dicInvData.TryGetValue(nInvoiceNo, out InvData) == false)
+                    if (!m_dicInvData.TryGetValue(nInvoiceNo, out InvData))
                     {
                         // DBãƒ­ãƒ¼ãƒ«ãƒ�ãƒƒã‚¯
                         ioInvData.rollback();
@@ -654,7 +655,7 @@
 
                     // è«‹æ±‚æ›¸ãƒ‡ãƒ¼ã‚¿ã�®æ›´æ–°
                     string sql = string.Format(" Where InvoiceNo = {0}", nInvoiceNo);
-                    if (ioInvData.UpdateAction(sql, InvData) == false)
+                    if (!ioInvData.UpdateAction(sql, InvData, false))
                     {
                         // DBãƒ­ãƒ¼ãƒ«ãƒ�ãƒƒã‚¯
                         ioInvData.rollback();
@@ -669,7 +670,7 @@
                 {
                     ReqHead.InvoiceNo = nInvoiceNo;
                 }
-                if (ioReqHead.UpdateAction(lstReqHead) == false)
+                if (!ioReqHead.UpdateAction(lstReqHead, false))
                 {
                     // DBãƒ­ãƒ¼ãƒ«ãƒ�ãƒƒã‚¯
                     ioInvData.rollback();
@@ -793,5 +794,48 @@
 
         }
         #endregion
+
+        #region è«‹æ±‚æ›¸ä½œæˆ�å‡¦ç�†
+        /// <summary>
+        /// è«‹æ±‚æ›¸ä½œæˆ�å‡¦ç�†
+        /// </summary>
+        private void GenerateProc()
+        {
+            try
+            {
+                int ret;
+                string msg = "";
+
+                // ä½œæˆ�ãƒ�ã‚§ãƒƒã‚¯
+                ret = CheckGenerate(ref msg);
+                bool bError = false;
+                switch (ret)
+                {
+                    case (int)CheckState.Ok:
+                        if (MessageBox.Show(msg, "ç™»éŒ²ç¢ºèª�"
+                                , MessageBoxButtons.YesNo
+                                , MessageBoxIcon.Question) != DialogResult.Yes) return;
+                        break;
+                    case (int)CheckState.Warning:
+                        if (MessageBox.Show(msg, "ç™»éŒ²ç¢ºèª�"
+                                , MessageBoxButtons.YesNo
+                                , MessageBoxIcon.Warning) != DialogResult.Yes) return;
+                        break;
+                    default:
+                        MessageBox.Show(msg, "ç™»éŒ²ç¢ºèª�", MessageBoxButtons.OK, MessageBoxIcon.Error);
+                        bError = true;
+                        break;
+                }
+                if (bError) return;
+
+                // ãƒ‡ãƒ¼ã‚¿ã�®ç™»éŒ²
+                m_nInvoiceNo = EntryData();
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("ã‚·ã‚¹ãƒ†ãƒ ã‚¨ãƒ©ãƒ¼ï¼š{0}ï¼š{1}", CommonMotions.GetMethodName(), ex.Message);
+            }
+        }
+        #endregion
     }
 }
Index: branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/RequestEntryList/FrmReqEntryListAuxiliary.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/RequestEntryList/FrmReqEntryListAuxiliary.cs	(revision 329)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/RequestEntryList/FrmReqEntryListAuxiliary.cs	(revision 330)
@@ -593,41 +593,6 @@
         }
         #endregion
 
-        #region ƒfƒtƒHƒ‹ƒg‚ÌŠúŽñ“ú�EŠú––“ú‚ð‹�‚ß‚é
-        /// <summary>
-        /// ƒfƒtƒHƒ‹ƒg‚ÌŠúŽñ“ú�EŠú––“ú‚ð‹�‚ß‚é
-        /// </summary>
-        /// <param name="dtStart"></param>
-        /// <param name="dtEnd"></param>
-        private void CreateDefaultStartAndEndDate(ref DateTime dtStart, ref DateTime dtEnd)
-        {
-            try
-            {
-                // “–ŠúŠúŽñ”NŒŽ“ú‚ðŽæ“¾
-                int iYear = 0;
-                int month = 0;
-                int day = 0;
-                bool bPeriod = false;
-                if (CommonMotions.SystemMasterData.ConstructionNoBase == (int)SystemMaster.ConstrNoBaseDef.BusinessPeriod)
-                {   // ‰c‹ÆŠú
-                    iYear = CommonMotions.PeriodCountToYear(CommonMotions.cnvInt(numUDConstPro.Value));
-                    bPeriod = true;
-                }
-                else
-                {   // �HŽ–”N“x
-                    iYear = CommonMotions.SystemMasterData.ConstrYear;
-                }
-                CommonMotions.GetNowBeginMonthDay(bPeriod, ref month, ref day);
-                dtStart = new DateTime(iYear, month, day);
-                dtEnd = dtStart.AddYears(1).AddDays(-1);     // �I—¹‚Í�{1”N�|1“ú
-            }
-            catch (Exception ex)
-            {
-                logger.ErrorFormat("ƒVƒXƒeƒ€ƒGƒ‰�[�F{0}�F{1}", CommonMotions.GetMethodName(), ex.Message);
-            }
-        }
-        #endregion
-
         #region �s�F�Ý’è
         /// <summary>
         /// �s‚ð‘I‘ð�F‚É‚·‚é
Index: branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/RequestInputList/FrmReqInputList.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/RequestInputList/FrmReqInputList.cs	(revision 329)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/RequestInputList/FrmReqInputList.cs	(revision 330)
@@ -287,6 +287,11 @@
         {
             if (m_initDataLoad) return;
 
+            // •”��ƒRƒ“ƒ{ƒ{ƒbƒNƒX•Ï�X
+            SetcmbDepartment();
+            // ’S“–ŽÒƒRƒ“ƒ{ƒ{ƒbƒNƒX•Ï�X
+            SetcmbPersons();
+
             // ƒf�[ƒ^•\Ž¦
             DataDisplay();
         }
@@ -298,7 +303,7 @@
         /// </summary>
         /// <param name="sender"></param>
         /// <param name="e"></param>
-        private void cmbDepartment_TextChanged(object sender, EventArgs e)
+        private void cmbDepartment_SelectedIndexChanged(object sender, EventArgs e)
         {
             if (m_initDataLoad) return;
 
@@ -316,12 +321,12 @@
         /// </summary>
         /// <param name="sender"></param>
         /// <param name="e"></param>
-        private void cmbConstructionPerson_TextChanged(object sender, EventArgs e)
+        private void cmbConstructionPerson_SelectedIndexChanged(object sender, EventArgs e)
         {
             if (m_initDataLoad) return;
 
             // ’S“–ŽÒ‘I‘ðŽž•”��‘I‘ð‚ð�Ý’è‚·‚é
-            SetPerosonToDepartment();
+            if (!SetPerosonToDepartment()) return;
 
             // ƒf�[ƒ^•\Ž¦
             DataDisplay();
Index: branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/RequestInputList/FrmReqInputList.designer.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/RequestInputList/FrmReqInputList.designer.cs	(revision 329)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/RequestInputList/FrmReqInputList.designer.cs	(revision 330)
@@ -225,7 +225,7 @@
             this.cmbConstructionPerson.Name = "cmbConstructionPerson";
             this.cmbConstructionPerson.Size = new System.Drawing.Size(200, 23);
             this.cmbConstructionPerson.TabIndex = 2;
-            this.cmbConstructionPerson.TextChanged += new System.EventHandler(this.cmbConstructionPerson_TextChanged);
+            this.cmbConstructionPerson.SelectedIndexChanged += new System.EventHandler(this.cmbConstructionPerson_SelectedIndexChanged);
             // 
             // cmbDepartment
             // 
@@ -237,7 +237,7 @@
             this.cmbDepartment.Name = "cmbDepartment";
             this.cmbDepartment.Size = new System.Drawing.Size(200, 23);
             this.cmbDepartment.TabIndex = 1;
-            this.cmbDepartment.TextChanged += new System.EventHandler(this.cmbDepartment_TextChanged);
+            this.cmbDepartment.SelectedIndexChanged += new System.EventHandler(this.cmbDepartment_SelectedIndexChanged);
             // 
             // label2
             // 
Index: branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/RequestInputList/FrmReqInputListAuxiliary.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/RequestInputList/FrmReqInputListAuxiliary.cs	(revision 329)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/RequestInputList/FrmReqInputListAuxiliary.cs	(revision 330)
@@ -869,29 +869,18 @@
             m_initDataLoad = true;
             try
             {
+                cmbDepartment.SelectedIndexChanged -= new EventHandler(cmbDepartment_SelectedIndexChanged);
 
                 cmbDepartment.DataSource = null;
                 cmbDepartment.Items.Clear();
                 cmbDepartment.Text = "";
 
+
+                int nTargetCount = CommonMotions.cnvInt(numUDConstPro.Value);
+                // •”��ƒ}ƒXƒ^‚ðŒŸ�õ‚·‚é
                 StringBuilder strSQL = new StringBuilder();
-                // •”��ƒ}ƒXƒ^‚ðŒŸ�õ‚·‚é
-                strSQL.AppendFormat("SELECT A.DEPARTMENTCODE, A.DEPARTMENTSTRING, A.DISPLAYORDER, COUNT(*)");
-                strSQL.Append(" FROM DEPARTMENTMASTER A, PERSONINCHARGEMASTER B, CONSTRUCTIONBASEINFO C");
-                strSQL.Append(" WHERE A.DELETEFLG = 0");
+                CommonMotions.CreateDepCombBoxSQL(ref strSQL, nTargetCount);
 
-                if (CommonMotions.LoginUserData.PersonCode != CommonDefine.AdminCode)
-                {
-                    // ŽQ�Æ•”��ƒ}ƒXƒ^‚æ‚èŽæ“¾‚·‚é
-                    strSQL.Append(" AND A.DEPARTMENTCODE IN (SELECT A1.DEPARTMENTCODE FROM PERSONDEPARTMENTMASTER A1");
-                    strSQL.AppendFormat(" WHERE A1.PERSONCODE = {0})", CommonMotions.LoginUserData.PersonCode);
-                }
-
-                strSQL.Append(" AND A.DEPARTMENTCODE = B.DEPARTMENTCODE");
-                strSQL.Append(" AND B.PERSONCODE = C.CONSTRUCTIONPERSONCODE");
-                strSQL.Append(" GROUP BY A.DEPARTMENTCODE, A.DEPARTMENTSTRING, A.DISPLAYORDER");
-                strSQL.Append(" ORDER BY A.DISPLAYORDER ASC");
-
                 // •”��ƒ}ƒXƒ^“Ç�ž
                 ArrayList arList = new ArrayList();
                 if (!depDB.ExecuteReader(strSQL.ToString(), ref arList)) return;
@@ -920,6 +909,7 @@
             {
                 depDB.close(); depDB = null;
                 m_initDataLoad = bSave;
+                cmbDepartment.SelectedIndexChanged += new EventHandler(cmbDepartment_SelectedIndexChanged);
             }
         }
         #endregion
@@ -931,53 +921,33 @@
         private void SetcmbPersons()
         {
             IOMPersonInCharge picDB = new IOMPersonInCharge();
-            List<PersonInChargeMaster> workList = new List<PersonInChargeMaster>();
             bool bSave = m_initDataLoad;
             m_initDataLoad = true;
             try
             {
+                cmbConstructionPerson.SelectedIndexChanged -= new EventHandler(cmbConstructionPerson_SelectedIndexChanged);
+
                 cmbConstructionPerson.DataSource = null;
                 cmbConstructionPerson.Items.Clear();
                 cmbConstructionPerson.Text = "";
 
+                int nTargetCount = CommonMotions.cnvInt(numUDConstPro.Value);
                 int DepartmentCode = GetDepartmentCode();
                 StringBuilder strSQL = new StringBuilder();
-                // ŒŸ�õ�ðŒ�
-                strSQL.AppendFormat(" WHERE LEDGERFLG = {0}", (int)PersonInChargeMaster.LedgerDivNoDef.CalcTarget);
-                strSQL.Append(" AND (DEPARTMENTCODE");
-                StringBuilder strSubSQL = new StringBuilder();
-                if (DepartmentCode == 0)
-                {
-                    // ŽQ�Æ•”��ƒ}ƒXƒ^‚æ‚èŽæ“¾‚·‚é
-                    strSubSQL.AppendFormat(" IN (SELECT AA.DEPARTMENTCODE FROM PERSONDEPARTMENTMASTER AA WHERE AA.PERSONCODE = {0})"
-                                            , CommonMotions.LoginUserData.PersonCode);
-                }
-                else
-                {
-                    strSubSQL.AppendFormat(" = {0}", DepartmentCode);
-                }
-                strSQL.Append(strSubSQL.ToString());
-                strSQL.Append(")");
+                CommonMotions.CreateManCombBoxSQL(ref strSQL, nTargetCount, DepartmentCode);
 
-                // “–ŠúŠúŽñ“ú�EŠú––“ú‚ðŽæ“¾
-                DateTime dtDefaultStart = DateTime.MinValue;
-                DateTime dtDefaultEnd = DateTime.MinValue;
-                CreateDefaultStartAndEndDate(ref dtDefaultStart, ref dtDefaultEnd);
-
-                strSQL.AppendFormat(" AND (DATE(STARTDATE) <= STR_TO_DATE('{0}','%Y/%m/%d')", dtDefaultEnd.ToShortDateString());
-                strSQL.AppendFormat(" AND (STR_TO_DATE('{0}','%Y/%m/%d') <= DATE(ENDDATE)", dtDefaultStart.ToShortDateString());
-                strSQL.AppendFormat(" OR STR_TO_DATE('{0}','%Y/%m/%d') = DATE(ENDDATE)))", DateTime.MinValue.ToShortDateString());
-
-                strSQL.Append(" Order By DeleteFlg ASC, EmployeeClassFlg ASC, DisplayOrder ASC");
                 // ’S“–ŽÒƒ}ƒXƒ^“Ç�ž
-                if (!picDB.SelectAction(strSQL.ToString(), ref workList)) return;
+                ArrayList workList = new ArrayList();
+                if (!picDB.ExecuteReader(strSQL.ToString(), ref workList)) return;
 
                 List<KeyValuePair<int, string>> ConstructionDataList = new List<KeyValuePair<int, string>>();
                 ConstructionDataList.Add(new KeyValuePair<int, string>(0, ""));
 
-                foreach (PersonInChargeMaster work in workList)
+                PersonInChargeMaster workRec = new PersonInChargeMaster();
+                foreach (object[] work in workList)
                 {
-                    KeyValuePair<int, string> keyval = new KeyValuePair<int, string>(work.PersonCode, work.PersonName);
+                    picDB.Reader2Struct(work, ref workRec);
+                    KeyValuePair<int, string> keyval = new KeyValuePair<int, string>(workRec.PersonCode, workRec.PersonName);
 
                     ConstructionDataList.Add(keyval);
                 }
@@ -995,45 +965,11 @@
             {
                 picDB.close(); picDB = null;
                 m_initDataLoad = bSave;
+                cmbConstructionPerson.SelectedIndexChanged += new EventHandler(cmbConstructionPerson_SelectedIndexChanged);
             }
         }
         #endregion
 
-        #region ƒfƒtƒHƒ‹ƒg‚ÌŠúŽñ“ú�EŠú––“ú‚ð‹�‚ß‚é
-        /// <summary>
-        /// ƒfƒtƒHƒ‹ƒg‚ÌŠúŽñ“ú�EŠú––“ú‚ð‹�‚ß‚é
-        /// </summary>
-        /// <param name="dtStart"></param>
-        /// <param name="dtEnd"></param>
-        private void CreateDefaultStartAndEndDate(ref DateTime dtStart, ref DateTime dtEnd)
-        {
-            try
-            {
-                // “–ŠúŠúŽñ”NŒŽ“ú‚ðŽæ“¾
-                int iYear = 0;
-                int month = 0;
-                int day = 0;
-                bool bPeriod = false;
-                if (CommonMotions.SystemMasterData.ConstructionNoBase == (int)SystemMaster.ConstrNoBaseDef.BusinessPeriod)
-                {   // ‰c‹ÆŠú
-                    iYear = CommonMotions.PeriodCountToYear(CommonMotions.cnvInt(numUDConstPro.Value));
-                    bPeriod = true;
-                }
-                else
-                {   // �HŽ–”N“x
-                    iYear = CommonMotions.SystemMasterData.ConstrYear;
-                }
-                CommonMotions.GetNowBeginMonthDay(bPeriod, ref month, ref day);
-                dtStart = new DateTime(iYear, month, day);
-                dtEnd = dtStart.AddYears(1).AddDays(-1);     // �I—¹‚Í�{1”N�|1“ú
-            }
-            catch (Exception ex)
-            {
-                logger.ErrorFormat("ƒVƒXƒeƒ€ƒGƒ‰�[�F{0}�F{1}", CommonMotions.GetMethodName(), ex.Message);
-            }
-        }
-        #endregion
-
         #region ’S“–ŽÒƒRƒ“ƒ{ƒ{ƒbƒNƒXƒZƒbƒgŽž•”��‚ðƒZƒbƒg‚·‚é
         /// <summary>
         /// ’S“–ŽÒƒRƒ“ƒ{ƒ{ƒbƒNƒXƒZƒbƒgŽž•”��‚ðƒZƒbƒg‚·‚é
@@ -1044,27 +980,36 @@
             IOMPersonInCharge PersonDB = new IOMPersonInCharge();
             try
             {
+                cmbDepartment.SelectedIndexChanged -= new EventHandler(cmbDepartment_SelectedIndexChanged);
+                cmbConstructionPerson.SelectedIndexChanged -= new EventHandler(cmbConstructionPerson_SelectedIndexChanged);
+
                 // ƒRƒ“ƒ{ƒ{ƒbƒNƒX‚æ‚è‘I‘ð’S“–ŽÒ‚ðŽæ“¾‚·‚é
                 int PersonCode = GetConstructionPersonCode();
-                if (PersonCode < 1) return false;
+                if (PersonCode < 1) return true;
 
+                int nTargetCount = CommonMotions.cnvInt(numUDConstPro.Value);
                 int DepartmentCode = GetDepartmentCode();
 
                 StringBuilder strSQL = new StringBuilder();
-                strSQL.Append(PersonDB.CreatePrimarykeyString(PersonCode));
+                CommonMotions.CreateMan2DepSQL(ref strSQL, nTargetCount, PersonCode);
+
+                ArrayList arList = new ArrayList();
+                if (!PersonDB.ExecuteReader(strSQL.ToString(), ref arList)) return false;
+                if (arList.Count < 1) return false;
+
+                object[] objRec = (object[])arList[0];
                 PersonInChargeMaster PersonRec = new PersonInChargeMaster();
-                PersonDB.SelectAction(strSQL.ToString(), ref PersonRec);
+                PersonRec.PersonCode = CommonMotions.cnvInt(objRec[0]);         // ’S“–ŽÒƒR�[ƒh
+                PersonRec.PersonName = CommonMotions.cnvString(objRec[1]);      // ’S“–ŽÒ–¼
+                PersonRec.DepartmentCode = CommonMotions.cnvInt(objRec[2]);     // •”��ƒR�[ƒh
 
+                // “¯‚¶•”��‚Ì�ê�‡‚Í�ˆ—�‚µ‚È‚¢
+                if (DepartmentCode == PersonRec.DepartmentCode) return true;
+
                 // •”��ƒRƒ“ƒ{ƒ{ƒbƒNƒX‚Ö•”��ƒR�[ƒhƒZƒbƒg
-                if (PersonRec.DepartmentCode > 0 && DepartmentCode != PersonRec.DepartmentCode)
-                {
-                    bool bSave = m_initDataLoad;
-                    m_initDataLoad = true;
-                    cmbDepartment.SelectedValue = PersonRec.DepartmentCode;
-                    SetcmbPersons();    // ’S“–ŽÒƒRƒ“ƒ{ƒ{ƒbƒNƒX•Ï�X
-                    cmbConstructionPerson.SelectedValue = PersonCode;
-                    m_initDataLoad = bSave;
-                }
+                cmbDepartment.SelectedValue = PersonRec.DepartmentCode;
+                SetcmbPersons();    // ’S“–ŽÒƒRƒ“ƒ{ƒ{ƒbƒNƒX•Ï�X
+                cmbConstructionPerson.SelectedValue = PersonCode;
 
                 return true;
             }
@@ -1076,6 +1021,9 @@
             finally
             {
                 PersonDB.close(); PersonDB = null;
+
+                cmbDepartment.SelectedIndexChanged += new EventHandler(cmbDepartment_SelectedIndexChanged);
+                cmbConstructionPerson.SelectedIndexChanged += new EventHandler(cmbConstructionPerson_SelectedIndexChanged);
             }
         }
         #endregion
Index: branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/RequestSummaryList/FrmRequestSummaryList.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/RequestSummaryList/FrmRequestSummaryList.cs	(revision 329)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/RequestSummaryList/FrmRequestSummaryList.cs	(revision 330)
@@ -989,6 +989,11 @@
         {
             if (m_initDataLoad) return;
 
+            // •”��ƒRƒ“ƒ{ƒ{ƒbƒNƒX•Ï�X
+            SetcmbDepartment();
+            // ’S“–ŽÒƒRƒ“ƒ{ƒ{ƒbƒNƒX•Ï�X
+            SetcmbPersons();
+
             DispShowView();
         }
         #endregion
@@ -1293,10 +1298,8 @@
         {
             if (m_initDataLoad) return;
 
-            SubControlEvent((int)EventDef.Person);
             // ’S“–ŽÒƒRƒ“ƒ{ƒ{ƒbƒNƒX•Ï�X
             SetcmbPersons();
-            SetControlEvent((int)EventDef.Person);
 
             // ƒf�[ƒ^•\Ž¦
             DispGridData();
@@ -1309,10 +1312,8 @@
         {
             if (m_initDataLoad) return;
 
-            SubControlEvent((int)EventDef.Department);
             // ’S“–ŽÒ‘I‘ðŽž•”��‘I‘ð‚ð�Ý’è‚·‚é
-            SetPerosonToDepartment();
-            SetControlEvent((int)EventDef.Department);
+            if (!SetPerosonToDepartment()) return;
 
             // ƒf�[ƒ^•\Ž¦
             DispGridData();
Index: branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/RequestSummaryList/FrmRequestSummaryList.designer.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/RequestSummaryList/FrmRequestSummaryList.designer.cs	(revision 329)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/RequestSummaryList/FrmRequestSummaryList.designer.cs	(revision 330)
@@ -768,6 +768,7 @@
             this.cmbPerson.Name = "cmbPerson";
             this.cmbPerson.Size = new System.Drawing.Size(200, 23);
             this.cmbPerson.TabIndex = 100;
+            this.cmbPerson.SelectedIndexChanged += new System.EventHandler(this.cmbPerson_SelectedIndexChanged);
             // 
             // cmbDepartment
             // 
@@ -779,6 +780,7 @@
             this.cmbDepartment.Name = "cmbDepartment";
             this.cmbDepartment.Size = new System.Drawing.Size(200, 23);
             this.cmbDepartment.TabIndex = 98;
+            this.cmbDepartment.SelectedIndexChanged += new System.EventHandler(this.cmbDepartment_SelectedIndexChanged);
             // 
             // label4
             // 
Index: branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/RequestSummaryList/FrmRequestSummaryListAuxiliary.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/RequestSummaryList/FrmRequestSummaryListAuxiliary.cs	(revision 329)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/RequestSummaryList/FrmRequestSummaryListAuxiliary.cs	(revision 330)
@@ -272,11 +272,29 @@
             {
                 logger.ErrorFormat("ƒVƒXƒeƒ€ƒGƒ‰�[�F{0}�F{1}", CommonMotions.GetMethodName(), ex.Message);
             }
-            finally
+        }
+        #endregion
+
+        #region Žw’è”NŒŽ‚æ‚è‘Î�ÛŠú�E‘Î�Û”N“x‚ð•Ô‚·
+        /// <summary>
+        /// Žw’è”NŒŽ‚æ‚è‘Î�ÛŠú�E‘Î�Û”N“x‚ð•Ô‚·
+        /// </summary>
+        /// <returns></returns>
+        private int GetTargetCount()
+        {
+            try
             {
-                // ƒCƒxƒ“ƒgƒZƒbƒg
-                SetControlEvent((int)EventDef.Department | (int)EventDef.Person);
+                string strSelectVal = CommonMotions.cnvString(cmbTargetMonth.SelectedValue);
+                int nTargetDateVal = CommonMotions.cnvInt(strSelectVal.Replace("/", ""));
+                int nTargetCount = CommonMotions.ConvDate2YearOrPeriod(new DateTime(nTargetDateVal / 100, nTargetDateVal % 100, 1));
+
+                return nTargetCount;
             }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("ƒVƒXƒeƒ€ƒGƒ‰�[�F{0}�F{1}", CommonMotions.GetMethodName(), ex.Message);
+                return 0;
+            }
         }
         #endregion
 
@@ -291,29 +309,17 @@
             m_initDataLoad = true;
             try
             {
+                cmbDepartment.SelectedIndexChanged -= new System.EventHandler(cmbDepartment_SelectedIndexChanged);
 
                 cmbDepartment.DataSource = null;
                 cmbDepartment.Items.Clear();
                 cmbDepartment.Text = "";
 
+                int nTargetCount = GetTargetCount();
+                // •”��ƒ}ƒXƒ^‚ðŒŸ�õ‚·‚é
                 StringBuilder strSQL = new StringBuilder();
-                // •”��ƒ}ƒXƒ^‚ðŒŸ�õ‚·‚é
-                strSQL.Append("SELECT A.DEPARTMENTCODE, A.DEPARTMENTSTRING, A.DISPLAYORDER, COUNT(*)");
-                strSQL.Append(" FROM DEPARTMENTMASTER A, PERSONINCHARGEMASTER B, CONSTRUCTIONBASEINFO C");
-                strSQL.Append(" WHERE A.DELETEFLG = 0");
+                CommonMotions.CreateDepCombBoxSQL(ref strSQL, nTargetCount);
 
-                if (CommonMotions.LoginUserData.PersonCode != CommonDefine.AdminCode)
-                {
-                    // ŽQ�Æ•”��ƒ}ƒXƒ^‚æ‚èŽæ“¾‚·‚é
-                    strSQL.Append(" AND A.DEPARTMENTCODE IN (SELECT A1.DEPARTMENTCODE FROM PERSONDEPARTMENTMASTER A1");
-                    strSQL.AppendFormat(" WHERE A1.PERSONCODE = {0})", CommonMotions.LoginUserData.PersonCode);
-                }
-
-                strSQL.Append(" AND A.DEPARTMENTCODE = B.DEPARTMENTCODE");
-                strSQL.Append(" AND B.PERSONCODE = C.CONSTRUCTIONPERSONCODE");
-                strSQL.Append(" GROUP BY A.DEPARTMENTCODE, A.DEPARTMENTSTRING, A.DISPLAYORDER");
-                strSQL.Append(" ORDER BY A.DISPLAYORDER ASC");
-
                 // •”��ƒ}ƒXƒ^“Ç�ž
                 ArrayList arList = new ArrayList();
                 if (!depDB.ExecuteReader(strSQL.ToString(), ref arList)) return;
@@ -342,6 +348,7 @@
             {
                 depDB.close(); depDB = null;
                 m_initDataLoad = bSave;
+                cmbDepartment.SelectedIndexChanged += new System.EventHandler(cmbDepartment_SelectedIndexChanged);
             }
         }
         #endregion
@@ -374,53 +381,33 @@
         private void SetcmbPersons()
         {
             IOMPersonInCharge picDB = new IOMPersonInCharge();
-            List<PersonInChargeMaster> workList = new List<PersonInChargeMaster>();
             bool bSave = m_initDataLoad;
             m_initDataLoad = true;
             try
             {
+                cmbPerson.SelectedIndexChanged -= new EventHandler(cmbPerson_SelectedIndexChanged);
+
                 cmbPerson.DataSource = null;
                 cmbPerson.Items.Clear();
                 cmbPerson.Text = "";
 
+                int nTargetCount = GetTargetCount();
                 int DepartmentCode = GetDepartmentCode();
                 StringBuilder strSQL = new StringBuilder();
-                // ŒŸ�õ�ðŒ�
-                strSQL.AppendFormat(" WHERE LEDGERFLG = {0}", (int)PersonInChargeMaster.LedgerDivNoDef.CalcTarget);
-                strSQL.Append(" AND (DEPARTMENTCODE");
-                StringBuilder strSubSQL = new StringBuilder();
-                if (DepartmentCode == 0)
-                {
-                    // ŽQ�Æ•”��ƒ}ƒXƒ^‚æ‚èŽæ“¾‚·‚é
-                    strSubSQL.AppendFormat(" IN (SELECT AA.DEPARTMENTCODE FROM PERSONDEPARTMENTMASTER AA WHERE AA.PERSONCODE = {0})"
-                                            , CommonMotions.LoginUserData.PersonCode);
-                }
-                else
-                {
-                    strSubSQL.AppendFormat(" = {0}", DepartmentCode);
-                }
-                strSQL.Append(strSubSQL.ToString());
-                strSQL.Append(")");
+                CommonMotions.CreateManCombBoxSQL(ref strSQL, nTargetCount, DepartmentCode);
 
-                // “–ŠúŠúŽñ“ú�EŠú––“ú‚ðŽæ“¾
-                DateTime dtDefaultStart = DateTime.MinValue;
-                DateTime dtDefaultEnd = DateTime.MinValue;
-                CreateDefaultStartAndEndDate(ref dtDefaultStart, ref dtDefaultEnd);
-
-                strSQL.AppendFormat(" AND (DATE(STARTDATE) <= STR_TO_DATE('{0}','%Y/%m/%d')", dtDefaultEnd.ToShortDateString());
-                strSQL.AppendFormat(" AND (STR_TO_DATE('{0}','%Y/%m/%d') <= DATE(ENDDATE)", dtDefaultStart.ToShortDateString());
-                strSQL.AppendFormat(" OR STR_TO_DATE('{0}','%Y/%m/%d') = DATE(ENDDATE)))", DateTime.MinValue.ToShortDateString());
-
-                strSQL.Append(" Order By DeleteFlg ASC, EmployeeClassFlg ASC, DisplayOrder ASC");
                 // ’S“–ŽÒƒ}ƒXƒ^“Ç�ž
-                if (!picDB.SelectAction(strSQL.ToString(), ref workList)) return;
+                ArrayList workList = new ArrayList();
+                if (!picDB.ExecuteReader(strSQL.ToString(), ref workList)) return;
 
                 List<KeyValuePair<int, string>> ConstructionDataList = new List<KeyValuePair<int, string>>();
                 ConstructionDataList.Add(new KeyValuePair<int, string>(0, ""));
 
-                foreach (PersonInChargeMaster work in workList)
+                PersonInChargeMaster workRec = new PersonInChargeMaster();
+                foreach (object[] work in workList)
                 {
-                    KeyValuePair<int, string> keyval = new KeyValuePair<int, string>(work.PersonCode, work.PersonName);
+                    picDB.Reader2Struct(work, ref workRec);
+                    KeyValuePair<int, string> keyval = new KeyValuePair<int, string>(workRec.PersonCode, workRec.PersonName);
 
                     ConstructionDataList.Add(keyval);
                 }
@@ -438,41 +425,11 @@
             {
                 picDB.close(); picDB = null;
                 m_initDataLoad = bSave;
+                cmbPerson.SelectedIndexChanged += new EventHandler(cmbPerson_SelectedIndexChanged);
             }
         }
         #endregion
 
-        #region ’S“–ŽÒ‚æ‚è•”��‚ðŽæ“¾‚·‚é
-        /// <summary>
-        /// ’S“–ŽÒ‚æ‚è•”��‚ðŽæ“¾‚·‚é
-        /// </summary>
-        private int GetDepartment(int Person)
-        {
-            IOMPersonInCharge getdepDB = new IOMPersonInCharge();
-            try
-            {
-                int DepCode = 0;
-                StringBuilder strSQL = new StringBuilder();
-                // ’S“–ŽÒƒ}ƒXƒ^‚ðŒŸ�õ‚·‚é
-                strSQL.Append(getdepDB.CreatePrimarykeyString(Person));
-                PersonInChargeMaster PersonRec = new PersonInChargeMaster();
-                if (!getdepDB.SelectAction(strSQL.ToString(), ref PersonRec)) return 0;
-
-                DepCode = PersonRec.DepartmentCode;
-                return DepCode;
-            }
-            catch (Exception ex)
-            {
-                logger.ErrorFormat("ƒVƒXƒeƒ€ƒGƒ‰�[�F{0}�F{1}", CommonMotions.GetMethodName(), ex.Message);
-                return 0;
-            }
-            finally
-            {
-                getdepDB.close(); getdepDB = null;
-            }
-        }
-        #endregion
-
         #region •”��ƒRƒ“ƒ{‚æ‚è’S“–ŽÒƒR�[ƒh‚ðŽæ“¾‚·‚é
         /// <summary>
         /// •”��ƒRƒ“ƒ{‚æ‚è’S“–ŽÒƒR�[ƒh‚ðŽæ“¾‚·‚é
@@ -521,26 +478,36 @@
             IOMPersonInCharge PersonDB = new IOMPersonInCharge();
             try
             {
+                cmbDepartment.SelectedIndexChanged -= new EventHandler(cmbDepartment_SelectedIndexChanged);
+                cmbPerson.SelectedIndexChanged -= new EventHandler(cmbPerson_SelectedIndexChanged);
+
                 // ƒRƒ“ƒ{ƒ{ƒbƒNƒX‚æ‚è‘I‘ð’S“–ŽÒ‚ðŽæ“¾‚·‚é
                 int PersonCode = GetConstrPersonCode();
-                if (PersonCode < 1) return false;
+                if (PersonCode < 1) return true;
 
+                int nTargetCount = GetTargetCount();
                 int DepartmentCode = GetDepartmentCode();
 
-                string strSQL = PersonDB.CreatePrimarykeyString(PersonCode);
+                StringBuilder strSQL = new StringBuilder();
+                CommonMotions.CreateMan2DepSQL(ref strSQL, nTargetCount, PersonCode);
+
+                ArrayList arList = new ArrayList();
+                if (!PersonDB.ExecuteReader(strSQL.ToString(), ref arList)) return false;
+                if (arList.Count < 1) return false;
+
+                object[] objRec = (object[])arList[0];
                 PersonInChargeMaster PersonRec = new PersonInChargeMaster();
-                PersonDB.SelectAction(strSQL, ref PersonRec);
+                PersonRec.PersonCode = CommonMotions.cnvInt(objRec[0]);         // ’S“–ŽÒƒR�[ƒh
+                PersonRec.PersonName = CommonMotions.cnvString(objRec[1]);      // ’S“–ŽÒ–¼
+                PersonRec.DepartmentCode = CommonMotions.cnvInt(objRec[2]);     // •”��ƒR�[ƒh
 
+                // “¯‚¶•”��‚Ì�ê�‡‚Í�ˆ—�‚µ‚È‚¢
+                if (DepartmentCode == PersonRec.DepartmentCode) return true;
+
                 // •”��ƒRƒ“ƒ{ƒ{ƒbƒNƒX‚Ö•”��ƒR�[ƒhƒZƒbƒg
-                if (PersonRec.DepartmentCode > 0 && DepartmentCode != PersonRec.DepartmentCode)
-                {
-                    bool bSave = m_initDataLoad;
-                    m_initDataLoad = true;
-                    cmbDepartment.SelectedValue = PersonRec.DepartmentCode;
-                    SetcmbPersons();    // ’S“–ŽÒƒRƒ“ƒ{ƒ{ƒbƒNƒX•Ï�X
-                    cmbPerson.SelectedValue = PersonCode;
-                    m_initDataLoad = bSave;
-                }
+                cmbDepartment.SelectedValue = PersonRec.DepartmentCode;
+                SetcmbPersons();    // ’S“–ŽÒƒRƒ“ƒ{ƒ{ƒbƒNƒX•Ï�X
+                cmbPerson.SelectedValue = PersonCode;
 
                 return true;
             }
@@ -552,60 +519,13 @@
             finally
             {
                 PersonDB.close(); PersonDB = null;
-            }
-        }
-        #endregion
 
-        #region ƒRƒ“ƒgƒ��[ƒ‹ƒCƒxƒ“ƒg’Ç‰Á�ˆ—�
-        /// <summary>
-        /// ƒRƒ“ƒgƒ��[ƒ‹ƒCƒxƒ“ƒg’Ç‰Á�ˆ—�
-        /// </summary>
-        /// <param name="EventCon"></param>
-        private void SetControlEvent(int EventCon)
-        {
-            try
-            {
-                if ((EventCon | (int)EventDef.Department) != 0)
-                {
-                    cmbDepartment.SelectedIndexChanged += new System.EventHandler(cmbDepartment_SelectedIndexChanged);
-                }
-                if ((EventCon | (int)EventDef.Person) != 0)
-                {
-                    cmbPerson.SelectedIndexChanged += new System.EventHandler(cmbPerson_SelectedIndexChanged);
-                }
+                cmbDepartment.SelectedIndexChanged += new EventHandler(cmbDepartment_SelectedIndexChanged);
+                cmbPerson.SelectedIndexChanged += new EventHandler(cmbPerson_SelectedIndexChanged);
             }
-            catch (Exception ex)
-            {
-                logger.ErrorFormat("ƒVƒXƒeƒ€ƒGƒ‰�[�F{0}�F{1}", CommonMotions.GetMethodName(), ex.Message);
-            }
         }
         #endregion
 
-        #region ƒRƒ“ƒgƒ��[ƒ‹ƒCƒxƒ“ƒg�í�œ�ˆ—�
-        /// <summary>
-        /// ƒRƒ“ƒgƒ��[ƒ‹ƒCƒxƒ“ƒg�í�œ�ˆ—�
-        /// </summary>
-        /// <param name="EventCon"></param>
-        private void SubControlEvent(int EventCon)
-        {
-            try
-            {
-                if ((EventCon | (int)EventDef.Department) != 0)
-                {
-                    cmbDepartment.SelectedIndexChanged -= new System.EventHandler(cmbDepartment_SelectedIndexChanged);
-                }
-                if ((EventCon | (int)EventDef.Person) != 0)
-                {
-                    cmbPerson.SelectedIndexChanged -= new System.EventHandler(cmbPerson_SelectedIndexChanged);
-                }
-            }
-            catch (Exception ex)
-            {
-                logger.ErrorFormat("ƒVƒXƒeƒ€ƒGƒ‰�[�F{0}�F{1}", CommonMotions.GetMethodName(), ex.Message);
-            }
-        }
-        #endregion
-
         #region �‰Šú’l
         /// <summary>
         /// �‰Šú’l
@@ -3841,44 +3761,6 @@
         }
         #endregion
 
-        #region ƒfƒtƒHƒ‹ƒg‚ÌŠúŽñ“ú�EŠú––“ú‚ð‹�‚ß‚é
-        /// <summary>
-        /// ƒfƒtƒHƒ‹ƒg‚ÌŠúŽñ“ú�EŠú––“ú‚ð‹�‚ß‚é
-        /// </summary>
-        /// <param name="dtStart"></param>
-        /// <param name="dtEnd"></param>
-        private void CreateDefaultStartAndEndDate(ref DateTime dtStart, ref DateTime dtEnd)
-        {
-            try
-            {
-                // “–ŠúŠúŽñ”NŒŽ“ú‚ðŽæ“¾
-                int iYear = 0;
-                int month = 0;
-                int day = 0;
-                bool bPeriod = false;
-                if (CommonMotions.SystemMasterData.ConstructionNoBase == (int)SystemMaster.ConstrNoBaseDef.BusinessPeriod)
-                {   // ‰c‹ÆŠú
-                    int Selval = CommonMotions.cnvInt(cmbTargetMonth.SelectedValue);
-                    DateTime dtSel = new DateTime((Selval / 100), (Selval % 100), 1);
-                    DateTime dtCal = DateTimeUtil.EndOfMonth(dtSel);
-                    iYear = CommonMotions.PeriodCountToYear(CommonMotions.ConvDate2YearOrPeriod(dtCal));
-                    bPeriod = true;
-                }
-                else
-                {   // �HŽ–”N“x
-                    iYear = CommonMotions.SystemMasterData.ConstrYear;
-                }
-                CommonMotions.GetNowBeginMonthDay(bPeriod, ref month, ref day);
-                dtStart = new DateTime(iYear, month, day);
-                dtEnd = dtStart.AddYears(1).AddDays(-1);     // �I—¹‚Í�{1”N�|1“ú
-            }
-            catch (Exception ex)
-            {
-                logger.ErrorFormat("ƒVƒXƒeƒ€ƒGƒ‰�[�F{0}�F{1}", CommonMotions.GetMethodName(), ex.Message);
-            }
-        }
-        #endregion
-
         #region ŽèŠÔ�E’Ê�í‹ÆŽÒˆê——‰æ–Ê‚ð•\Ž¦‚·‚é
         /// <summary>
         /// ŽèŠÔ�E’Ê�í‹ÆŽÒˆê——‰æ–Ê‚ð•\Ž¦‚·‚é
Index: branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/SubConstrRegist/FrmSubConstrRegistList.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/SubConstrRegist/FrmSubConstrRegistList.cs	(revision 329)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/SubConstrRegist/FrmSubConstrRegistList.cs	(revision 330)
@@ -294,7 +294,7 @@
         /// </summary>
         /// <param name="sender"></param>
         /// <param name="e"></param>
-        private void cmbDepartment_TextChanged(object sender, EventArgs e)
+        private void cmbDepartment_SelectedIndexChanged(object sender, EventArgs e)
         {
             if (m_OpeRestrict) return;
 
@@ -312,7 +312,7 @@
         /// </summary>
         /// <param name="sender"></param>
         /// <param name="e"></param>
-        private void cmbConstructionPerson_TextChanged(object sender, EventArgs e)
+        private void cmbConstructionPerson_SelectedIndexChanged(object sender, EventArgs e)
         {
             if (m_OpeRestrict) return;
 
Index: branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/SubConstrRegist/FrmSubConstrRegistList.designer.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/SubConstrRegist/FrmSubConstrRegistList.designer.cs	(revision 329)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/SubConstrRegist/FrmSubConstrRegistList.designer.cs	(revision 330)
@@ -198,7 +198,7 @@
             this.cmbConstructionPerson.Name = "cmbConstructionPerson";
             this.cmbConstructionPerson.Size = new System.Drawing.Size(200, 23);
             this.cmbConstructionPerson.TabIndex = 2;
-            this.cmbConstructionPerson.TextChanged += new System.EventHandler(this.cmbConstructionPerson_TextChanged);
+            this.cmbConstructionPerson.SelectedIndexChanged += new System.EventHandler(this.cmbConstructionPerson_SelectedIndexChanged);
             // 
             // cmbDepartment
             // 
@@ -210,7 +210,7 @@
             this.cmbDepartment.Name = "cmbDepartment";
             this.cmbDepartment.Size = new System.Drawing.Size(200, 23);
             this.cmbDepartment.TabIndex = 1;
-            this.cmbDepartment.TextChanged += new System.EventHandler(this.cmbDepartment_TextChanged);
+            this.cmbDepartment.SelectedIndexChanged += new System.EventHandler(this.cmbDepartment_SelectedIndexChanged);
             // 
             // label2
             // 
Index: branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/SubConstrRegist/FrmSubConstrRegistListAuxiliary.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/SubConstrRegist/FrmSubConstrRegistListAuxiliary.cs	(revision 329)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/SubConstrRegist/FrmSubConstrRegistListAuxiliary.cs	(revision 330)
@@ -690,32 +690,20 @@
             m_OpeRestrict = true;
             try
             {
+                cmbDepartment.SelectedIndexChanged -= new EventHandler(cmbDepartment_SelectedIndexChanged);
 
                 cmbDepartment.DataSource = null;
                 cmbDepartment.Items.Clear();
                 cmbDepartment.Text = "";
 
-                string strSQL = string.Empty;
+                int nTargetCount = CommonMotions.cnvInt(numUDConstPro.Value);
                 // •”��ƒ}ƒXƒ^‚ðŒŸ�õ‚·‚é
-                strSQL = "SELECT A.DEPARTMENTCODE, A.DEPARTMENTSTRING, A.DISPLAYORDER, COUNT(*)";
-                strSQL += " FROM DEPARTMENTMASTER A, PERSONINCHARGEMASTER B, CONSTRUCTIONBASEINFO C";
-                strSQL += " WHERE A.DELETEFLG = 0";
+                StringBuilder strSQL = new StringBuilder();
+                CommonMotions.CreateDepCombBoxSQL(ref strSQL, nTargetCount);
 
-                if (CommonMotions.LoginUserData.PersonCode != CommonDefine.AdminCode)
-                {
-                    // ŽQ�Æ•”��ƒ}ƒXƒ^‚æ‚èŽæ“¾‚·‚é
-                    strSQL += " AND A.DEPARTMENTCODE IN (SELECT A1.DEPARTMENTCODE FROM PERSONDEPARTMENTMASTER A1";
-                    strSQL += string.Format(" WHERE A1.PERSONCODE = {0})", CommonMotions.LoginUserData.PersonCode);
-                }
-
-                strSQL += " AND A.DEPARTMENTCODE = B.DEPARTMENTCODE";
-                strSQL += " AND B.PERSONCODE = C.CONSTRUCTIONPERSONCODE";
-                strSQL += " GROUP BY A.DEPARTMENTCODE, A.DEPARTMENTSTRING, A.DISPLAYORDER";
-                strSQL += " ORDER BY A.DISPLAYORDER ASC";
-
                 // •”��ƒ}ƒXƒ^“Ç�ž
                 ArrayList arList = new ArrayList();
-                if (!depDB.ExecuteReader(strSQL, ref arList)) return;
+                if (!depDB.ExecuteReader(strSQL.ToString(), ref arList)) return;
 
                 List<KeyValuePair<int, string>> ConstructionDataList = new List<KeyValuePair<int, string>>();
                 ConstructionDataList.Add(new KeyValuePair<int, string>(0, ""));
@@ -741,6 +729,8 @@
             {
                 depDB.close(); depDB = null;
                 m_OpeRestrict = bSave;
+
+                cmbDepartment.SelectedIndexChanged += new EventHandler(cmbDepartment_SelectedIndexChanged);
             }
         }
         #endregion
@@ -752,52 +742,33 @@
         private void SetcmbPersons()
         {
             IOMPersonInCharge picDB = new IOMPersonInCharge();
-            List<PersonInChargeMaster> workList = new List<PersonInChargeMaster>();
             bool bSave = m_OpeRestrict;
             m_OpeRestrict = true;
             try
             {
+                cmbConstructionPerson.SelectedIndexChanged -= new EventHandler(cmbConstructionPerson_SelectedIndexChanged);
+
                 cmbConstructionPerson.DataSource = null;
                 cmbConstructionPerson.Items.Clear();
                 cmbConstructionPerson.Text = "";
 
+                int nTargetCount = CommonMotions.cnvInt(numUDConstPro.Value);
                 int DepartmentCode = GetDepartmentCode();
-                string strSQL = string.Empty;
-                // ŒŸ�õ�ðŒ�
-                strSQL = string.Format(" WHERE LEDGERFLG = {0}", (int)PersonInChargeMaster.LedgerDivNoDef.CalcTarget);
-                strSQL += " AND (DEPARTMENTCODE";
-                string strSubSQL = string.Empty;
-                if (DepartmentCode == 0)
-                {
-                    // ŽQ�Æ•”��ƒ}ƒXƒ^‚æ‚èŽæ“¾‚·‚é
-                    strSubSQL += string.Format(" IN (SELECT AA.DEPARTMENTCODE FROM PERSONDEPARTMENTMASTER AA WHERE AA.PERSONCODE = {0})"
-                                            , CommonMotions.LoginUserData.PersonCode);
-                }
-                else
-                {
-                    strSubSQL += string.Format(" = {0}", DepartmentCode);
-                }
-                strSQL += strSubSQL + ")";
+                StringBuilder strSQL = new StringBuilder();
+                CommonMotions.CreateManCombBoxSQL(ref strSQL, nTargetCount, DepartmentCode);
 
-                // “–ŠúŠúŽñ“ú�EŠú––“ú‚ðŽæ“¾
-                DateTime dtDefaultStart = DateTime.MinValue;
-                DateTime dtDefaultEnd = DateTime.MinValue;
-                CreateDefaultStartAndEndDate(ref dtDefaultStart, ref dtDefaultEnd);
-
-                strSQL += string.Format(" AND (DATE(STARTDATE) <= STR_TO_DATE('{0}','%Y/%m/%d')", dtDefaultEnd.ToShortDateString());
-                strSQL += string.Format(" AND (STR_TO_DATE('{0}','%Y/%m/%d') <= DATE(ENDDATE)", dtDefaultStart.ToShortDateString());
-                strSQL += string.Format(" OR STR_TO_DATE('{0}','%Y/%m/%d') = DATE(ENDDATE)))", DateTime.MinValue.ToShortDateString());
-
-                strSQL += " Order By DeleteFlg ASC, EmployeeClassFlg ASC, DisplayOrder ASC";
                 // ’S“–ŽÒƒ}ƒXƒ^“Ç�ž
-                if (!picDB.SelectAction(strSQL, ref workList)) return;
+                ArrayList workList = new ArrayList();
+                if (!picDB.ExecuteReader(strSQL.ToString(), ref workList)) return;
 
                 List<KeyValuePair<int, string>> ConstructionDataList = new List<KeyValuePair<int, string>>();
                 ConstructionDataList.Add(new KeyValuePair<int, string>(0, ""));
 
-                foreach (PersonInChargeMaster work in workList)
+                PersonInChargeMaster workRec = new PersonInChargeMaster();
+                foreach (object[] work in workList)
                 {
-                    KeyValuePair<int, string> keyval = new KeyValuePair<int, string>(work.PersonCode, work.PersonName);
+                    picDB.Reader2Struct(work, ref workRec);
+                    KeyValuePair<int, string> keyval = new KeyValuePair<int, string>(workRec.PersonCode, workRec.PersonName);
 
                     ConstructionDataList.Add(keyval);
                 }
@@ -815,42 +786,9 @@
             {
                 picDB.close(); picDB = null;
                 m_OpeRestrict = bSave;
-            }
-        }
-        #endregion
 
-        #region ƒfƒtƒHƒ‹ƒg‚ÌŠúŽñ“ú�EŠú––“ú‚ð‹�‚ß‚é
-        /// <summary>
-        /// ƒfƒtƒHƒ‹ƒg‚ÌŠúŽñ“ú�EŠú––“ú‚ð‹�‚ß‚é
-        /// </summary>
-        /// <param name="dtStart"></param>
-        /// <param name="dtEnd"></param>
-        private void CreateDefaultStartAndEndDate(ref DateTime dtStart, ref DateTime dtEnd)
-        {
-            try
-            {
-                // “–ŠúŠúŽñ”NŒŽ“ú‚ðŽæ“¾
-                int iYear = 0;
-                int month = 0;
-                int day = 0;
-                bool bPeriod = false;
-                if (CommonMotions.SystemMasterData.ConstructionNoBase == (int)SystemMaster.ConstrNoBaseDef.BusinessPeriod)
-                {   // ‰c‹ÆŠú
-                    iYear = CommonMotions.PeriodCountToYear(CommonMotions.cnvInt(numUDConstPro.Value));
-                    bPeriod = true;
-                }
-                else
-                {   // �HŽ–”N“x
-                    iYear = CommonMotions.SystemMasterData.ConstrYear;
-                }
-                CommonMotions.GetNowBeginMonthDay(bPeriod, ref month, ref day);
-                dtStart = new DateTime(iYear, month, day);
-                dtEnd = dtStart.AddYears(1).AddDays(-1);     // �I—¹‚Í�{1”N�|1“ú
+                cmbConstructionPerson.SelectedIndexChanged += new EventHandler(cmbConstructionPerson_SelectedIndexChanged);
             }
-            catch (Exception ex)
-            {
-                logger.ErrorFormat("ƒVƒXƒeƒ€ƒGƒ‰�[�F{0}�F{1}", CommonMotions.GetMethodName(), ex.Message);
-            }
         }
         #endregion
 
@@ -864,26 +802,36 @@
             IOMPersonInCharge PersonDB = new IOMPersonInCharge();
             try
             {
+                cmbDepartment.SelectedIndexChanged -= new EventHandler(cmbDepartment_SelectedIndexChanged);
+                cmbConstructionPerson.SelectedIndexChanged -= new EventHandler(cmbConstructionPerson_SelectedIndexChanged);
+
                 // ƒRƒ“ƒ{ƒ{ƒbƒNƒX‚æ‚è‘I‘ð’S“–ŽÒ‚ðŽæ“¾‚·‚é
                 int PersonCode = GetConstructionPersonCode();
-                if (PersonCode < 1) return false;
+                if (PersonCode < 1) return true;
 
+                int nTargetCount = CommonMotions.cnvInt(numUDConstPro.Value);
                 int DepartmentCode = GetDepartmentCode();
 
-                string strSQL = PersonDB.CreatePrimarykeyString(PersonCode);
+                StringBuilder strSQL = new StringBuilder();
+                CommonMotions.CreateMan2DepSQL(ref strSQL, nTargetCount, PersonCode);
+
+                ArrayList arList = new ArrayList();
+                if (!PersonDB.ExecuteReader(strSQL.ToString(), ref arList)) return false;
+                if (arList.Count < 1) return false;
+
+                object[] objRec = (object[])arList[0];
                 PersonInChargeMaster PersonRec = new PersonInChargeMaster();
-                PersonDB.SelectAction(strSQL, ref PersonRec);
+                PersonRec.PersonCode = CommonMotions.cnvInt(objRec[0]);         // ’S“–ŽÒƒR�[ƒh
+                PersonRec.PersonName = CommonMotions.cnvString(objRec[1]);      // ’S“–ŽÒ–¼
+                PersonRec.DepartmentCode = CommonMotions.cnvInt(objRec[2]);     // •”��ƒR�[ƒh
 
+                // “¯‚¶•”��‚Ì�ê�‡‚Í�ˆ—�‚µ‚È‚¢
+                if (DepartmentCode == PersonRec.DepartmentCode) return true;
+
                 // •”��ƒRƒ“ƒ{ƒ{ƒbƒNƒX‚Ö•”��ƒR�[ƒhƒZƒbƒg
-                if (PersonRec.DepartmentCode > 0 && DepartmentCode != PersonRec.DepartmentCode)
-                {
-                    bool bSave = m_OpeRestrict;
-                    m_OpeRestrict = true;
-                    cmbDepartment.SelectedValue = PersonRec.DepartmentCode;
-                    SetcmbPersons();    // ’S“–ŽÒƒRƒ“ƒ{ƒ{ƒbƒNƒX•Ï�X
-                    cmbConstructionPerson.SelectedValue = PersonCode;
-                    m_OpeRestrict = bSave;
-                }
+                cmbDepartment.SelectedValue = PersonRec.DepartmentCode;
+                SetcmbPersons();    // ’S“–ŽÒƒRƒ“ƒ{ƒ{ƒbƒNƒX•Ï�X
+                cmbConstructionPerson.SelectedValue = PersonCode;
 
                 return true;
             }
@@ -895,9 +843,11 @@
             finally
             {
                 PersonDB.close(); PersonDB = null;
+
+                cmbDepartment.SelectedIndexChanged += new EventHandler(cmbDepartment_SelectedIndexChanged);
+                cmbConstructionPerson.SelectedIndexChanged += new EventHandler(cmbConstructionPerson_SelectedIndexChanged);
             }
         }
         #endregion
-
     }
 }
\ No newline at end of file
Index: branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/TAndPCosts/FrmTAndPCosts.Designer.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/TAndPCosts/FrmTAndPCosts.Designer.cs	(revision 329)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/TAndPCosts/FrmTAndPCosts.Designer.cs	(revision 330)
@@ -3004,6 +3004,8 @@
             this.cmbDepartment.Name = "cmbDepartment";
             this.cmbDepartment.Size = new System.Drawing.Size(260, 29);
             this.cmbDepartment.TabIndex = 1;
+            this.cmbDepartment.SelectedIndexChanged += new System.EventHandler(this.cmbDepartment_SelectedIndexChanged);
+            this.cmbDepartment.Enter += new System.EventHandler(this.cmbDepartment_Enter);
             // 
             // label2
             // 
@@ -3029,6 +3031,8 @@
             this.cmbConstructionPerson.Name = "cmbConstructionPerson";
             this.cmbConstructionPerson.Size = new System.Drawing.Size(200, 29);
             this.cmbConstructionPerson.TabIndex = 2;
+            this.cmbConstructionPerson.SelectedIndexChanged += new System.EventHandler(this.cmbConstructionPerson_SelectedIndexChanged);
+            this.cmbConstructionPerson.Enter += new System.EventHandler(this.cmbConstructionPerson_Enter);
             // 
             // label3
             // 
@@ -3064,6 +3068,8 @@
             this.comboBox1.Name = "comboBox1";
             this.comboBox1.Size = new System.Drawing.Size(160, 29);
             this.comboBox1.TabIndex = 0;
+            this.comboBox1.SelectedIndexChanged += new System.EventHandler(this.comboBox1_SelectedIndexChanged);
+            this.comboBox1.Enter += new System.EventHandler(this.comboBox1_Enter);
             // 
             // pnlApproval
             // 
Index: branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/TAndPCosts/FrmTAndPCosts.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/TAndPCosts/FrmTAndPCosts.cs	(revision 329)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/TAndPCosts/FrmTAndPCosts.cs	(revision 330)
@@ -456,7 +456,7 @@
                 SetcmbDepartment();
                 
                 // æ‹…å½“è€…ã�®ã‚»ãƒƒãƒˆ
-                SetcombBoxPerson();
+                SetcmbPersons();
 
                 // ã‚³ãƒ³ãƒœãƒœãƒƒã‚¯ã‚¹åˆ�æœŸè¡¨ç¤º
                 InitCombBox();
@@ -1045,7 +1045,7 @@
         /// </summary>
         /// <param name="sender"></param>
         /// <param name="e"></param>
-        private void cmbDepartment_TextChanged(object sender, EventArgs e)
+        private void cmbDepartment_SelectedIndexChanged(object sender, EventArgs e)
         {
             if (m_bInitFlg) return;
 
@@ -1061,7 +1061,7 @@
             }
 
             // æ‹…å½“è€…ã‚³ãƒ³ãƒœãƒœãƒƒã‚¯ã‚¹ã‚’ã‚»ãƒƒãƒˆã�™ã‚‹
-            SetcombBoxPerson();
+            SetcmbPersons();
 
             // ãƒ‡ãƒ¼ã‚¿ã‚’è¡¨ç¤ºã�™ã‚‹
             SetGridData();
@@ -1090,7 +1090,7 @@
         /// </summary>
         /// <param name="sender"></param>
         /// <param name="e"></param>
-        private void cmbConstructionPerson_TextChanged(object sender, EventArgs e)
+        private void cmbConstructionPerson_SelectedIndexChanged(object sender, EventArgs e)
         {
             if (m_bInitFlg) return;
 
@@ -1104,7 +1104,7 @@
                     return;
                 }
             }
-            SetPerosonToDepartment();
+            if (!SetPerosonToDepartment()) return;
 
             // ãƒ‡ãƒ¼ã‚¿ã‚’è¡¨ç¤ºã�™ã‚‹
             SetGridData();
@@ -1151,6 +1151,11 @@
                 }
             }
 
+            // éƒ¨ç½²ã‚³ãƒ³ãƒœãƒœãƒƒã‚¯ã‚¹å¤‰æ›´
+            SetcmbDepartment();
+            // æ‹…å½“è€…ã‚³ãƒ³ãƒœãƒœãƒƒã‚¯ã‚¹å¤‰æ›´
+            SetcmbPersons();
+
             // ãƒ‡ãƒ¼ã‚¿ã‚’è¡¨ç¤ºã�™ã‚‹
             SetGridData();
 
Index: branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/TAndPCosts/FrmTAndPCostsAuxiliary.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/TAndPCosts/FrmTAndPCostsAuxiliary.cs	(revision 329)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/TAndPCosts/FrmTAndPCostsAuxiliary.cs	(revision 330)
@@ -87,7 +87,6 @@
         {
             try
             {
-
                 // è¡¨ç¤ºã‚¯ãƒªã‚¢
                 ClearDisplay();
                 foreach (DataGridView dgv in m_dispGridControl)
@@ -101,9 +100,6 @@
                 // å¤‰æ›´ãƒ•ãƒ©ã‚°ã�®ã‚¯ãƒªã‚¢
                 m_bChengeAns = false;
 
-                // ã‚³ãƒ³ãƒœãƒœãƒƒã‚¯ã‚¹ã‚¤ãƒ™ãƒ³ãƒˆã‚»ãƒƒãƒˆ
-                SetCombBoxEvent(true);
-                
                 return true;
             }
             catch (Exception ex)
@@ -114,41 +110,6 @@
         }
         #endregion
 
-        #region ã‚³ãƒ³ãƒœãƒœãƒƒã‚¯ã‚¹ã‚¤ãƒ™ãƒ³ãƒˆè¨­å®šå‡¦ç�†
-        /// <summary>
-        /// ã‚³ãƒ³ãƒœãƒœãƒƒã‚¯ã‚¹ã‚¤ãƒ™ãƒ³ãƒˆè¨­å®šå‡¦ç�†
-        /// </summary>
-        /// <param name="bSetEvent"></param>
-        private void SetCombBoxEvent(bool bSetEvent)
-        {
-            try
-            {
-                if (bSetEvent)
-                {
-                    comboBox1.SelectedIndexChanged += new EventHandler(this.comboBox1_SelectedIndexChanged);
-                    comboBox1.Enter += new EventHandler(this.comboBox1_Enter);
-                    cmbDepartment.TextChanged += new EventHandler(this.cmbDepartment_TextChanged);
-                    cmbDepartment.Enter += new EventHandler(this.cmbDepartment_Enter);
-                    cmbConstructionPerson.TextChanged += new EventHandler(this.cmbConstructionPerson_TextChanged);
-                    cmbConstructionPerson.Enter += new EventHandler(this.cmbConstructionPerson_Enter);
-                }
-                else
-                {
-                    comboBox1.SelectedIndexChanged -= new EventHandler(this.comboBox1_SelectedIndexChanged);
-                    comboBox1.Enter -= new EventHandler(this.comboBox1_Enter);
-                    cmbDepartment.TextChanged -= new EventHandler(this.cmbDepartment_TextChanged);
-                    cmbDepartment.Enter -= new EventHandler(this.cmbDepartment_Enter);
-                    cmbConstructionPerson.TextChanged -= new EventHandler(this.cmbConstructionPerson_TextChanged);
-                    cmbConstructionPerson.Enter -= new EventHandler(this.cmbConstructionPerson_Enter);
-                }
-            }
-            catch (Exception ex)
-            {
-                logger.ErrorFormat("ã‚·ã‚¹ãƒ†ãƒ ã‚¨ãƒ©ãƒ¼ï¼š{0}ï¼š{1}", CommonMotions.GetMethodName(), ex.Message);
-            }
-        }
-        #endregion
-
         #region ç”»é�¢ã‚¯ãƒªã‚¢
         /// <summary>
         /// ç”»é�¢ã‚¯ãƒªã‚¢
@@ -190,7 +151,7 @@
                     cmbDepartment.SelectedValue = CommonMotions.LoginUserData.DepartmentCode;
                 
                 // å¯¾è±¡éƒ¨ç½²ã�®æ‹…å½“è€…ã‚»ãƒƒãƒˆ
-                SetcombBoxPerson();
+                SetcmbPersons();
 
                 // ãƒ—ãƒ­ãƒ‘ãƒ†ã‚£ã�Œã�‚ã‚Œã�°ã��ã‚Œã‚’ã‚»ãƒƒãƒˆ
                 if (m_InitSetFlag && m_PersonCode != 0)
@@ -366,6 +327,29 @@
         }
         #endregion
 
+        #region æŒ‡å®šå¹´æœˆã‚ˆã‚Šå¯¾è±¡æœŸãƒ»å¯¾è±¡å¹´åº¦ã‚’è¿”ã�™
+        /// <summary>
+        /// æŒ‡å®šå¹´æœˆã‚ˆã‚Šå¯¾è±¡æœŸãƒ»å¯¾è±¡å¹´åº¦ã‚’è¿”ã�™
+        /// </summary>
+        /// <returns></returns>
+        private int GetTargetCount()
+        {
+            try
+            {
+                string strSelectVal = CommonMotions.cnvString(comboBox1.SelectedValue);
+                int nTargetDateVal = CommonMotions.cnvInt(strSelectVal.Replace("/", ""));
+                int nTargetCount = CommonMotions.ConvDate2YearOrPeriod(new DateTime(nTargetDateVal / 100, nTargetDateVal % 100, 1));
+
+                return nTargetCount;
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("ã‚·ã‚¹ãƒ†ãƒ ã‚¨ãƒ©ãƒ¼ï¼š{0}ï¼š{1}", CommonMotions.GetMethodName(), ex.Message);
+                return 0;
+            }
+        }
+        #endregion
+
         #region éƒ¨ç½²ã‚³ãƒ³ãƒœãƒœãƒƒã‚¯ã‚¹ã‚’ã‚»ãƒƒãƒˆã�™ã‚‹
         /// <summary>
         /// éƒ¨ç½²ã‚³ãƒ³ãƒœãƒœãƒƒã‚¯ã‚¹ã�¸æ–‡å­—ã‚’ã‚»ãƒƒãƒˆã�™ã‚‹
@@ -377,28 +361,17 @@
             m_bInitFlg = true;
             try
             {
+                cmbDepartment.SelectedIndexChanged -= new EventHandler(cmbDepartment_SelectedIndexChanged);
+
                 cmbDepartment.DataSource = null;
                 cmbDepartment.Items.Clear();
                 cmbDepartment.Text = "";
 
+                int nTargetCount = GetTargetCount();
+                // éƒ¨ç½²ãƒžã‚¹ã‚¿ã‚’æ¤œç´¢ã�™ã‚‹
                 StringBuilder strSQL = new StringBuilder();
-                // éƒ¨ç½²ãƒžã‚¹ã‚¿ã‚’æ¤œç´¢ã�™ã‚‹
-                strSQL.Append("SELECT A.DEPARTMENTCODE, A.DEPARTMENTSTRING, A.DISPLAYORDER, COUNT(*)");
-                strSQL.Append(" FROM DEPARTMENTMASTER A, PERSONINCHARGEMASTER B, CONSTRUCTIONBASEINFO C");
-                strSQL.Append(" WHERE A.DELETEFLG = 0");
+                CommonMotions.CreateDepCombBoxSQL(ref strSQL, nTargetCount);
 
-                if (CommonMotions.LoginUserData.PersonCode != CommonDefine.AdminCode)
-                {
-                    // å�‚ç…§éƒ¨ç½²ãƒžã‚¹ã‚¿ã‚ˆã‚Šå�–å¾—ã�™ã‚‹
-                    strSQL.Append(" AND A.DEPARTMENTCODE IN (SELECT A1.DEPARTMENTCODE FROM PERSONDEPARTMENTMASTER A1");
-                    strSQL.AppendFormat(" WHERE A1.PERSONCODE = {0})", CommonMotions.LoginUserData.PersonCode);
-                }
-
-                strSQL.Append(" AND A.DEPARTMENTCODE = B.DEPARTMENTCODE");
-                strSQL.Append(" AND B.PERSONCODE = C.CONSTRUCTIONPERSONCODE");
-                strSQL.Append(" GROUP BY A.DEPARTMENTCODE, A.DEPARTMENTSTRING, A.DISPLAYORDER");
-                strSQL.Append(" ORDER BY A.DISPLAYORDER ASC");
-
                 // éƒ¨ç½²ãƒžã‚¹ã‚¿èª­è¾¼
                 ArrayList arList = new ArrayList();
                 if (!depDB.ExecuteReader(strSQL.ToString(), ref arList)) return false;
@@ -428,40 +401,9 @@
             {
                 depDB.close(); depDB = null;
                 m_bInitFlg = bSave;
-            }
-        }
-        #endregion
 
-        #region éƒ¨ç½²ã‚³ãƒ³ãƒœãƒœãƒƒã‚¯ã‚¹ã�«å¯¾è±¡ã�Œã�‚ã‚‹ã�‹ã‚’ãƒ�ã‚§ãƒƒã‚¯ã�™ã‚‹
-        /// <summary>
-        /// éƒ¨ç½²ã‚³ãƒ³ãƒœãƒœãƒƒã‚¯ã‚¹ã�«å¯¾è±¡ã�Œã�‚ã‚‹ã�‹ã‚’ãƒ�ã‚§ãƒƒã‚¯ã�™ã‚‹
-        /// </summary>
-        /// <param name="Department"></param>
-        /// <returns></returns>
-        private bool SearchDepartmentCombBoxItem(int Department)
-        {
-            try
-            {
-                bool bRet = false;
-
-                // å¯¾è±¡ã�Œã‚³ãƒ³ãƒœãƒœãƒƒã‚¯ã‚¹ãƒ‡ãƒ¼ã‚¿ã�«ã�‚ã‚Œã�°ã‚»ãƒƒãƒˆã�™ã‚‹
-                for (int i = 0; i < cmbDepartment.Items.Count; i++)
-                {
-                    KeyValuePair<int, string> wrkPair = (KeyValuePair<int, string>)cmbDepartment.Items[i];
-                    if (wrkPair.Key == Department)
-                    {
-                        bRet = true;
-                        break;
-                    }
-                }
-
-                return bRet;
+                cmbDepartment.SelectedIndexChanged += new EventHandler(cmbDepartment_SelectedIndexChanged);
             }
-            catch (Exception ex)
-            {
-                logger.ErrorFormat("ã‚·ã‚¹ãƒ†ãƒ ã‚¨ãƒ©ãƒ¼ï¼š{0}ï¼š{1}", CommonMotions.GetMethodName(), ex.Message);
-                return false;
-            }
         }
         #endregion
 
@@ -469,7 +411,7 @@
         /// <summary>
         /// æ‹…å½“è€…ã‚³ãƒ³ãƒœãƒœãƒƒã‚¯ã‚¹ã�¸æ–‡å­—ã‚’ã‚»ãƒƒãƒˆã�™ã‚‹
         /// </summary>
-        private void SetcombBoxPerson()
+        private void SetcmbPersons()
         {
             IOMPersonInCharge picDB = new IOMPersonInCharge();
             bool bSave = m_bInitFlg;
@@ -476,36 +418,29 @@
             m_bInitFlg = true;
             try
             {
+                cmbConstructionPerson.SelectedIndexChanged -= new EventHandler(cmbConstructionPerson_SelectedIndexChanged);
+
                 cmbConstructionPerson.DataSource = null;
                 cmbConstructionPerson.Items.Clear();
                 cmbConstructionPerson.Text = "";
 
-                List<PersonInChargeMaster> workList = new List<PersonInChargeMaster>();
+                int nTargetCount = GetTargetCount();
+                int DepartmentCode = GetDepartmentCode();
                 StringBuilder strSQL = new StringBuilder();
-                int DepartmentCode = GetDepartmentCode();
-                if (DepartmentCode == 0)
-                {
-                    strSQL.Append(" WHERE DeleteFlg = 0");
-                    strSQL.AppendFormat(" AND EmployeeClassFlg = {0}", (int)PersonInChargeMaster.EmployeeClassFlgDef.Regular);
-                    // å�‚ç…§éƒ¨ç½²ãƒžã‚¹ã‚¿ã‚ˆã‚Šå�–å¾—ã�™ã‚‹
-                    strSQL.Append(" AND DEPARTMENTCODE IN (SELECT AA.DEPARTMENTCODE FROM PERSONDEPARTMENTMASTER AA");
-                    strSQL.AppendFormat(" WHERE AA.PERSONCODE = {0})", CommonMotions.LoginUserData.PersonCode);
-                    strSQL.Append(" Order By EmployeeClassFlg ASC, DisplayOrder ASC");
-                }
-                else
-                {
-                    strSQL.AppendFormat(" WHERE DEPARTMENTCODE = {0} AND DeleteFlg = 0 Order By EmployeeClassFlg ASC, DisplayOrder ASC", DepartmentCode);
-                }
+                CommonMotions.CreateManCombBoxSQL(ref strSQL, nTargetCount, DepartmentCode);
 
                 // æ‹…å½“è€…ãƒžã‚¹ã‚¿èª­è¾¼
-                if (!picDB.SelectAction(strSQL.ToString(), ref workList)) return;
+                ArrayList workList = new ArrayList();
+                if (!picDB.ExecuteReader(strSQL.ToString(), ref workList)) return;
 
                 List<KeyValuePair<int, string>> ConstructionDataList = new List<KeyValuePair<int, string>>();
                 ConstructionDataList.Add(new KeyValuePair<int, string>(0, ""));
 
-                foreach (PersonInChargeMaster work in workList)
+                PersonInChargeMaster workRec = new PersonInChargeMaster();
+                foreach (object[] work in workList)
                 {
-                    KeyValuePair<int, string> keyval = new KeyValuePair<int, string>(work.PersonCode, work.PersonName);
+                    picDB.Reader2Struct(work, ref workRec);
+                    KeyValuePair<int, string> keyval = new KeyValuePair<int, string>(workRec.PersonCode, workRec.PersonName);
 
                     ConstructionDataList.Add(keyval);
                 }
@@ -523,38 +458,9 @@
             {
                 picDB.close(); picDB = null;
                 m_bInitFlg = bSave;
-            }
-        }
-        #endregion
 
-        #region æ‹…å½“è€…ã‚³ãƒ³ãƒœãƒœãƒƒã‚¯ã‚¹ã�«å¯¾è±¡ã�Œã�‚ã‚‹ã�‹ã‚’ãƒ�ã‚§ãƒƒã‚¯ã�™ã‚‹
-        /// <summary>
-        /// æ‹…å½“è€…ã‚³ãƒ³ãƒœãƒœãƒƒã‚¯ã‚¹ã�«å¯¾è±¡ã�Œã�‚ã‚‹ã�‹ã‚’ãƒ�ã‚§ãƒƒã‚¯ã�™ã‚‹
-        /// </summary>
-        /// <param name="PersonCode"></param>
-        /// <returns></returns>
-        private bool SearchPersonCombBoxItem(int PersonCode)
-        {
-            try
-            {
-                bool bRet = false;
-                for (int i = 0; i < cmbConstructionPerson.Items.Count; i++)
-                {
-                    KeyValuePair<int, string> wrkPair = (KeyValuePair<int, string>)cmbConstructionPerson.Items[i];
-                    if (wrkPair.Key == PersonCode)
-                    {
-                        bRet = true;
-                        break;
-                    }
-                }
-
-                return bRet;
+                cmbConstructionPerson.SelectedIndexChanged += new EventHandler(cmbConstructionPerson_SelectedIndexChanged);
             }
-            catch (Exception ex)
-            {
-                logger.ErrorFormat("ã‚·ã‚¹ãƒ†ãƒ ã‚¨ãƒ©ãƒ¼ï¼š{0}ï¼š{1}", CommonMotions.GetMethodName(), ex.Message);
-                return false;
-            }
         }
         #endregion
 
@@ -568,26 +474,36 @@
             IOMPersonInCharge PersonDB = new IOMPersonInCharge();
             try
             {
+                cmbDepartment.SelectedIndexChanged -= new EventHandler(cmbDepartment_SelectedIndexChanged);
+                cmbConstructionPerson.SelectedIndexChanged -= new EventHandler(cmbConstructionPerson_SelectedIndexChanged);
+
                 // ã‚³ãƒ³ãƒœãƒœãƒƒã‚¯ã‚¹ã‚ˆã‚Šé�¸æŠžæ‹…å½“è€…ã‚’å�–å¾—ã�™ã‚‹
                 int PersonCode = GetConstructionPersonCode();
-                if (PersonCode < 1) return false;
+                if (PersonCode < 1) return true;
 
-                int DepartmentCode = CommonMotions.cnvInt(cmbDepartment.SelectedValue);
+                int nTargetCount = GetTargetCount();
+                int DepartmentCode = GetDepartmentCode();
 
-                string strSQL = PersonDB.CreatePrimarykeyString(PersonCode);
+                StringBuilder strSQL = new StringBuilder();
+                CommonMotions.CreateMan2DepSQL(ref strSQL, nTargetCount, PersonCode);
+
+                ArrayList arList = new ArrayList();
+                if (!PersonDB.ExecuteReader(strSQL.ToString(), ref arList)) return false;
+                if (arList.Count < 1) return false;
+
+                object[] objRec = (object[])arList[0];
                 PersonInChargeMaster PersonRec = new PersonInChargeMaster();
-                PersonDB.SelectAction(strSQL, ref PersonRec);
+                PersonRec.PersonCode = CommonMotions.cnvInt(objRec[0]);         // æ‹…å½“è€…ã‚³ãƒ¼ãƒ‰
+                PersonRec.PersonName = CommonMotions.cnvString(objRec[1]);      // æ‹…å½“è€…å��
+                PersonRec.DepartmentCode = CommonMotions.cnvInt(objRec[2]);     // éƒ¨ç½²ã‚³ãƒ¼ãƒ‰
 
+                // å�Œã�˜éƒ¨ç½²ã�®å ´å�ˆã�¯å‡¦ç�†ã�—ã�ªã�„
+                if (DepartmentCode == PersonRec.DepartmentCode) return true;
+
                 // éƒ¨ç½²ã‚³ãƒ³ãƒœãƒœãƒƒã‚¯ã‚¹ã�¸éƒ¨ç½²ã‚³ãƒ¼ãƒ‰ã‚»ãƒƒãƒˆ
-                if (PersonRec.DepartmentCode > 0 && DepartmentCode != PersonRec.DepartmentCode)
-                {
-                    bool bSave = m_bInitFlg;
-                    m_bInitFlg = true;
-                    cmbDepartment.SelectedValue = PersonRec.DepartmentCode;
-                    SetcombBoxPerson();    // æ‹…å½“è€…ã‚³ãƒ³ãƒœãƒœãƒƒã‚¯ã‚¹å¤‰æ›´
-                    cmbConstructionPerson.SelectedValue = PersonCode;
-                    m_bInitFlg = bSave;
-                }
+                cmbDepartment.SelectedValue = PersonRec.DepartmentCode;
+                SetcmbPersons();    // æ‹…å½“è€…ã‚³ãƒ³ãƒœãƒœãƒƒã‚¯ã‚¹å¤‰æ›´
+                cmbConstructionPerson.SelectedValue = PersonCode;
 
                 return true;
             }
@@ -599,6 +515,9 @@
             finally
             {
                 PersonDB.close(); PersonDB = null;
+
+                cmbDepartment.SelectedIndexChanged += new EventHandler(cmbDepartment_SelectedIndexChanged);
+                cmbConstructionPerson.SelectedIndexChanged += new EventHandler(cmbConstructionPerson_SelectedIndexChanged);
             }
         }
         #endregion
Index: branches/src/ProcessManagement/ProcessManagement/Forms/Master/Department/FrmDepartment.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/Master/Department/FrmDepartment.cs	(revision 329)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/Master/Department/FrmDepartment.cs	(revision 330)
@@ -285,7 +285,7 @@
                         , MessageBoxButtons.YesNo, MessageBoxIcon.Question) != DialogResult.Yes) return;
 
                 // ãƒ‡ãƒ¼ã‚¿ç™»éŒ²
-                if (!DepartmentMasterDataEntry()) return;
+                if (!DataEntry()) return;
 
                 CommonMotions.EntryEndMessage("éƒ¨ç½²ãƒ‡ãƒ¼ã‚¿");
 
@@ -346,19 +346,22 @@
                 if (MessageBox.Show("è¡¨ç¤ºä¸­ã�®ãƒ‡ãƒ¼ã‚¿ã�¨\r\næ‰¿èª�çµŒè·¯ãƒžã‚¹ã‚¿ãƒ‡ãƒ¼ã‚¿ã‚’å‰Šé™¤ã�—ã�¾ã�™ã€‚", "å‰Šé™¤ç¢ºèª�"
                     , MessageBoxButtons.YesNo, MessageBoxIcon.Information) != DialogResult.Yes) return;
 
-                string strSQL = dmDB.CreatePrimarykeyString(CommonMotions.cnvInt(m_dispControl[(int)DispControl.DepartmentCode].Text));
-
+                string strKey = dmDB.CreatePrimarykeyString(CommonMotions.cnvInt(m_dispControl[(int)DispControl.DepartmentCode].Text));
+                StringBuilder strSQL = new StringBuilder(); 
                 List<DepartmentMaster> ReadRec = new List<DepartmentMaster>();
-                dmDB.SelectAction(strSQL, ref ReadRec, false);
+                dmDB.SelectAction(strKey, ref ReadRec, false);
                 if (ReadRec.Count > 0)
                 {
-                    if (!dmDB.DeleteAction(strSQL,false))
+                    strSQL.AppendFormat("UPDATE DepartmentMaster Set DeleteFlg = 1 {0}", strKey);
+                    if (!dmDB.ExecuteNonQuery(strSQL.ToString(), false))
                     {
                         dmDB.rollback();
                         MessageBox.Show("éƒ¨ç½²ãƒžã‚¹ã‚¿å‰Šé™¤ã�«å¤±æ•—ã�—ã�¾ã�—ã�Ÿã€‚", "å‰Šé™¤ã‚¨ãƒ©ãƒ¼", MessageBoxButtons.OK, MessageBoxIcon.Error);
                         return;
                     }
-                    if (!expDB.DeleteAction(strSQL,false))
+                    strSQL.Clear();
+                    strSQL.AppendFormat("UPDATE DepartmentExpensesMaster Set DeleteFlg = 1 {0}", strKey);
+                    if (!expDB.ExecuteNonQuery(strSQL.ToString(), false))
                     {
                         dmDB.rollback();
                         expDB.rollback();
@@ -365,7 +368,13 @@
                         MessageBox.Show("éƒ¨ç½²çµŒè²»ãƒžã‚¹ã‚¿å‰Šé™¤ã�«å¤±æ•—ã�—ã�¾ã�—ã�Ÿã€‚", "å‰Šé™¤ã‚¨ãƒ©ãƒ¼", MessageBoxButtons.OK, MessageBoxIcon.Error);
                         return;
                     }
-                    if (!AppDB.DeleteAction(strSQL, false))
+                }
+
+                List<ApprovalMaster> AppRec = new List<ApprovalMaster>();
+                AppDB.SelectAction(strKey, ref AppRec, false);
+                if (AppRec.Count > 0)
+                {
+                    if (!AppDB.DeleteAction(strKey, false))
                     {
                         dmDB.rollback();
                         expDB.rollback();
@@ -446,6 +455,8 @@
                 // çµŒè²»çŽ‡ã‚’è¡¨ç¤ºã�™ã‚‹
                 DispExpExpenses();
 
+                // æœŸè¨­å®š
+                numUDPeriod.Value = CommonMotions.SystemMasterData.BusinessPeriod;
                 // ãƒ¢ãƒ¼ãƒ‰è¡¨ç¤º
                 m_dispControl[(int)DispControl.EditMode].Text = CommonDefine.EditModeStringNew;
                 // ã‚³ãƒ³ãƒœãƒœãƒƒã‚¯ã‚¹åˆ�æœŸå€¤
@@ -609,597 +620,5 @@
         }
         #endregion
 
-        #region ç”»é�¢ãƒ­ãƒƒã‚¯
-        /// <summary>
-        /// ç”»é�¢ãƒ­ãƒƒã‚¯
-        /// </summary>
-        private void ControlLock(bool bctrl = true)
-        {
-            foreach (Control wrk in m_dispControl)
-            {
-                if (CommonMotions.chkObjectIsNull(wrk)) continue;
-                if (!wrk.GetType().Equals(typeof(Label)))
-                    wrk.Enabled = bctrl;
-            }
-        }
-        #endregion
-
-        #region è¡¨ç¤ºã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆã�®å�–å¾—
-        /// <summary>
-        /// è¡¨ç¤ºã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆã�®å�–å¾—
-        /// </summary>
-        private void SetDisplayObject()
-        {
-            int DspCtrlCnt = Enum.GetNames(typeof(DispControl)).Length;
-            m_dispControl = new Control[DspCtrlCnt];
-
-            m_dispControl[(int)DispControl.DepartmentCode] = lblDepartmentCode;
-            m_dispControl[(int)DispControl.DepartmentString] = txtInput01;
-            m_dispControl[(int)DispControl.RatioGrid] = dgvExpenses;
-            m_dispControl[(int)DispControl.ActionSchdule] = cmbActionScheduleDsp;
-            m_dispControl[(int)DispControl.StaffAssign] = cmbStaStaffAssignDsp;
-            m_dispControl[(int)DispControl.EditMode] = lblEditMode;
-            m_dispControl[(int)DispControl.Period] = numUDPeriod;
-        }
-        #endregion
-
-        #region ç”»é�¢ã‚¯ãƒªã‚¢
-        /// <summary>
-        /// ç”»é�¢ã‚¯ãƒªã‚¢
-        /// </summary>
-        private void ClearDisplay()
-        {
-            try
-            {
-                foreach (Control wrk in m_dispControl)
-                {
-                    if (CommonMotions.chkObjectIsNull(wrk)) continue;
-                    wrk.Text = string.Empty;
-                }
-                dgvExpenses.Rows.Clear();
-
-                // æ–°è¦�æ™‚ã�¯ã‚³ãƒ¼ãƒ‰ã‚’è¡¨ç¤ºã�—ã�ªã�„
-                if (m_DepartmentCode == 0)
-                {
-                    lblStaticItemCode.Visible = false;
-                    lblDepartmentCode.Visible = false;
-                }
-                else
-                {
-                    lblStaticItemCode.Visible = true;
-                    lblDepartmentCode.Visible = true;
-                }
-
-                cmbActionScheduleDsp.SelectedIndex = -1;
-                cmbStaStaffAssignDsp.SelectedIndex = -1;
-
-                m_bChengeAns = false;
-            }
-            catch (System.Exception ex)
-            {
-                logger.ErrorFormat("ã‚·ã‚¹ãƒ†ãƒ ã‚¨ãƒ©ãƒ¼ï¼š{0}ï¼š{1}", CommonMotions.GetMethodName(), ex.Message);
-            }
-        }
-        #endregion
-
-        #region ç”»é�¢é …ç›®ã�®ãƒ�ã‚§ãƒƒã‚¯
-        /// <summary>
-        /// ç”»é�¢é …ç›®ã�®ãƒ�ã‚§ãƒƒã‚¯
-        /// </summary>
-        /// <returns></returns>
-        private bool DispFeildCheck()
-        {
-            bool bRet = true;
-            int iLength = 0;
-            try
-            {
-
-                // éƒ¨ç½²å��å��
-                if (m_dispControl[(int)DispControl.DepartmentString].Text.Length != 0) iLength++;
-                bRet &= CommonMotions.DispFieldLengthCheck(m_dispControl[(int)DispControl.DepartmentString], s_DepartmentNameLength, true);
-
-                // çµŒè²»çŽ‡ãƒ�ã‚§ãƒƒã‚¯
-                foreach (DataGridViewRow wrkRow in dgvExpenses.Rows)
-                {
-                    if (CommonMotions.chkObjectIsNull(wrkRow.Cells[(int)ExpGridColumn.ExpensesName].Value)) continue;
-                    bool bAns = CommonMotions.chkNumeric(wrkRow.Cells[(int)ExpGridColumn.Ratio].Value);
-                    // èƒŒæ™¯è‰²å¤‰æ›´
-                    CommonMotions.chgBackColor(wrkRow.Cells[(int)ExpGridColumn.Ratio], bAns);
-                    bRet &= bAns;
-                }
-
-                if (iLength == 0)
-                {
-                    MessageBox.Show("ãƒ‡ãƒ¼ã‚¿ã�Œå…¥åŠ›ã�•ã‚Œã�¦ã�„ã�¾ã�›ã‚“ã€�ç¢ºèª�ã�—ã�¦ã��ã� ã�•ã�„ã€‚", "ãƒ‡ãƒ¼ã‚¿ç¢ºèª�", MessageBoxButtons.OK, MessageBoxIcon.Warning);
-                    return false;
-                }
-                if (!bRet)
-                {
-                    MessageBox.Show("å…¥åŠ›ã‚¨ãƒ©ãƒ¼ã�Œã�‚ã‚Šã�¾ã�™ã€�ç¢ºèª�ã�—ã�¦ã��ã� ã�•ã�„ã€‚", "ãƒ‡ãƒ¼ã‚¿ç¢ºèª�", MessageBoxButtons.OK, MessageBoxIcon.Warning);
-                    return false;
-                }
-                return bRet;
-            }
-            catch (System.Exception ex)
-            {
-                logger.ErrorFormat("ã‚·ã‚¹ãƒ†ãƒ ã‚¨ãƒ©ãƒ¼ï¼š{0}ï¼š{1}", CommonMotions.GetMethodName(), ex.Message);
-                return false;
-            }
-        }
-        #endregion
-
-        #region éƒ¨ç½²ãƒ»éƒ¨ç½²çµŒè²»çŽ‡ãƒžã‚¹ã‚¿ç™»éŒ²
-        /// <summary>
-        /// éƒ¨ç½²ãƒ»éƒ¨ç½²çµŒè²»çŽ‡ãƒžã‚¹ã‚¿ç™»éŒ²
-        /// </summary>
-        private bool DepartmentMasterDataEntry()
-        {
-            IOMDepartment dmDB = new IOMDepartment();
-            IOMDepartmentExpenses exDB = new IOMDepartmentExpenses();
-            try
-            {
-                // ä¸€æ‹¬å‡¦ç�†ã�ªã�®ã�§æŽ¥ç¶šã‚’è¡Œã�†
-                exDB.connect(); exDB.beginTran();
-                dmDB.connect(); dmDB.beginTran();
-
-                // è¡¨ç¤ºé †ã‚’æ›´æ–°ã�™ã‚‹
-                int idno = 0;
-                foreach (DataGridViewRow wrkRow in dgvWorkList.Rows)
-                {
-                    // æ§‹æˆ�ã‚³ãƒ¼ãƒ‰ç„¡ã�¯å‡¦ç�†ã�—ã�ªã�„
-                    if (CommonMotions.chkObjectIsNull(wrkRow.Cells[(int)GridColumn.DepartmentCode].Value)) continue;
-
-                    List<DepartmentMaster> cwrow = new List<DepartmentMaster>();
-
-                    // æ¤œç´¢æ–‡å­—åˆ—ä½œæˆ�
-                    string SQLRow = dmDB.CreatePrimarykeyString(
-                                                CommonMotions.cnvInt(wrkRow.Cells[(int)GridColumn.DepartmentCode].Value));
-
-                    // ãƒ‡ãƒ¼ã‚¿å�–å¾—
-                    if (!dmDB.SelectAction(SQLRow, ref cwrow, false)) break;
-                    // è¡¨ç¤ºé †å¤‰æ›´
-                    cwrow[0].DisplayOrder = ++idno;
-                    // ãƒ‡ãƒ¼ã‚¿æ›´æ–°
-                    dmDB.UpdateAction(SQLRow, cwrow[0], false);
-                }
-
-                // éƒ¨ç½²ãƒžã‚¹ã‚¿ç™»éŒ²
-                DepartmentMaster dmData = new DepartmentMaster();
-                dmData.DepartmentCode = m_DepartmentCode;
-                dmData.DepartmentString = m_dispControl[(int)DispControl.DepartmentString].Text;
-                dmData.ActionScheduleFlg = CommonMotions.cnvInt(((ComboBox)m_dispControl[(int)DispControl.ActionSchdule]).SelectedValue.ToString());
-                dmData.StaffAssignFlg = CommonMotions.cnvInt(((ComboBox)m_dispControl[(int)DispControl.StaffAssign]).SelectedValue.ToString());
-                // è¡¨ç¤ºé †ã�¯ã‚»ãƒƒãƒˆã�—ã�ªã�„
-                dmData.DisplayOrder = 0;
-
-                string strSQL = dmDB.CreatePrimarykeyString(dmData.DepartmentCode);
-                List<DepartmentMaster> dmList = new List<DepartmentMaster>();
-                // çµŒè²»çŽ‡ãƒžã‚¹ã‚¿å�–å¾—
-                if (!dmDB.SelectAction(strSQL, ref dmList, false))
-                {
-                    MessageBox.Show("éƒ¨ç½²ãƒžã‚¹ã‚¿ç™»éŒ²ç¢ºèª�ã�«å¤±æ•—ã�—ã�¾ã�—ã�Ÿã€‚", "ç™»éŒ²ã‚¨ãƒ©ãƒ¼", MessageBoxButtons.OK, MessageBoxIcon.Error);
-                    return false;
-                }
-                if (dmList.Count == 0)
-                {
-                    // è¡¨ç¤ºé †ã‚»ãƒƒãƒˆ
-                    dmData.DisplayOrder = GetGridLineEffectivenessCount() + 1;
-                    // ãƒ‡ãƒ¼ã‚¿ã�Œã�ªã�„å ´å�ˆã�¯è¿½åŠ 
-                    dmList.Clear();
-                    dmList.Add(dmData);
-
-                    // ãƒ‡ãƒ¼ã‚¿ç™»éŒ²
-                    if (!dmDB.InsertAction(dmList, false))
-                    {
-                        dmDB.rollback();
-                        MessageBox.Show("éƒ¨ç½²ãƒžã‚¹ã‚¿ç™»éŒ²ã�«å¤±æ•—ã�—ã�¾ã�—ã�Ÿã€‚", "ç™»éŒ²ã‚¨ãƒ©ãƒ¼", MessageBoxButtons.OK, MessageBoxIcon.Error);
-                        return false;
-                    }
-                }
-                else
-                {
-                    // è¡¨ç¤ºé †ã‚»ãƒƒãƒˆ
-                    dmData.DisplayOrder = dmList[0].DisplayOrder;
-                    // ãƒ‡ãƒ¼ã‚¿ç™»éŒ²
-                    if (!dmDB.UpdateAction(strSQL, dmData, false))
-                    {
-                        dmDB.rollback();
-                        MessageBox.Show("æ›´æ–°ã�«å¤±æ•—ã�—ã�¾ã�—ã�Ÿã€‚", "ç™»éŒ²ã‚¨ãƒ©ãƒ¼", MessageBoxButtons.OK, MessageBoxIcon.Error);
-                        return false;
-                    }
-                }
-
-                // ----- çµŒè²»ãƒžã‚¹ã‚¿ç™»éŒ²
-                // å½“å¹´ã�®å�–å¾—
-                int ExpensesPeriod = CommonMotions.cnvInt(numUDPeriod.Value);
-                // å½“å¹´ãƒ‡ãƒ¼ã‚¿ã‚’ã�¾ã�šå‰Šé™¤
-                exDB.DeleteAction(exDB.CreatePrimarykeyString(m_DepartmentCode, ExpensesPeriod), false);
-
-                if (!DepartmentExpensesEntry(exDB, ExpensesPeriod))
-                {
-                    dmDB.rollback();
-                    exDB.rollback();
-                    MessageBox.Show("çµŒè²»çŽ‡ãƒžã‚¹ã‚¿ç™»éŒ²ã�«å¤±æ•—ã�—ã�¾ã�—ã�Ÿã€‚", "ç™»éŒ²ã‚¨ãƒ©ãƒ¼", MessageBoxButtons.OK, MessageBoxIcon.Error);
-                    return false;
-                }
-
-                // ç¿Œå¹´ã�®å�–å¾—
-                ExpensesPeriod++;
-                List<DepartmentExpenses> deList = new List<DepartmentExpenses>();
-                // å½“å¹´ãƒ‡ãƒ¼ã‚¿ã‚’ã�¾ã�šå‰Šé™¤
-                if(!exDB.SelectAction(exDB.CreatePrimarykeyString(m_DepartmentCode, ExpensesPeriod), ref deList, false))
-                {
-                    dmDB.rollback();
-                    exDB.rollback();
-                    MessageBox.Show("çµŒè²»çŽ‡ãƒžã‚¹ã‚¿ç¿Œå¹´ç™»éŒ²ç¢ºèª�ã�«å¤±æ•—ã�—ã�¾ã�—ã�Ÿã€‚", "ç™»éŒ²ç¢ºèª�ã‚¨ãƒ©ãƒ¼", MessageBoxButtons.OK, MessageBoxIcon.Error);
-                    return false;
-                }
-                // ç¿Œå¹´ã�®ãƒ‡ãƒ¼ã‚¿ã�Œç„¡ã�„å ´å�ˆã�¯ç¿Œå¹´ç™»éŒ²ã�™ã‚‹
-                if (deList.Count == 0)
-                {
-                    if (!DepartmentExpensesEntry(exDB, ExpensesPeriod))
-                    {
-                        dmDB.rollback();
-                        exDB.rollback();
-                        MessageBox.Show("çµŒè²»çŽ‡ãƒžã‚¹ã‚¿ç¿Œå¹´ç™»éŒ²ã�«å¤±æ•—ã�—ã�¾ã�—ã�Ÿã€‚", "ç™»éŒ²ã‚¨ãƒ©ãƒ¼", MessageBoxButtons.OK, MessageBoxIcon.Error);
-                        return false;
-                    }
-                }
-
-                // æˆ�åŠŸã�—ã�Ÿã‚‰commit
-                exDB.commit();
-                dmDB.commit();
-
-                return true;
-
-            }
-            catch (System.Exception ex)
-            {
-                logger.ErrorFormat("ã‚·ã‚¹ãƒ†ãƒ ã‚¨ãƒ©ãƒ¼ï¼š{0}ï¼š{1}", CommonMotions.GetMethodName(), ex.Message);
-                return false;
-            }
-            finally
-            {
-                exDB.close(); exDB = null;
-                dmDB.close(); dmDB = null;
-            }
-        }
-        #endregion
-
-        #region éƒ¨ç½²çµŒè²»çŽ‡ãƒžã‚¹ã‚¿ç™»éŒ²
-        /// <summary>
-        /// éƒ¨ç½²çµŒè²»çŽ‡ãƒžã‚¹ã‚¿ç™»éŒ²
-        /// </summary>
-        /// <param name="ExpensesPeriod"></param>
-        /// <returns></returns>
-        private bool DepartmentExpensesEntry(IOMDepartmentExpenses exDB, int ExpensesPeriod)
-        {
-            try
-            {
-                DepartmentExpenses exList = new DepartmentExpenses();
-                int idisp = 0;
-                // ãƒ‡ãƒ¼ã‚¿ã‚’ç”»é�¢ã‚ˆã‚Šå�–å¾—
-                foreach (DataGridViewRow wrkRow in dgvExpenses.Rows)
-                {
-                    if (CommonMotions.chkCellBlank(wrkRow.Cells[(int)ExpGridColumn.ExpensesCode].Value)) continue;
-                    if (CommonMotions.chkCellBlank(wrkRow.Cells[(int)ExpGridColumn.ExpensesName].Value)) continue;
-
-                    // ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆ
-                    exList.DepartmentCode = m_DepartmentCode;
-                    exList.ExpensesPeriod = ExpensesPeriod;
-                    exList.NameCode = CommonMotions.cnvInt(wrkRow.Cells[(int)ExpGridColumn.ExpensesCode].Value);
-                    exList.DisplayOrder = ++idisp;
-                    exList.ExpensesRaito = CommonMotions.cnvDouble(wrkRow.Cells[(int)ExpGridColumn.Ratio].Value);
-                    exList.DeleteFlg = 0;
-
-                    // SQLä½œæˆ�
-                    string strSQL = exDB.CreatePrimarykeyString(exList.DepartmentCode, exList.NameCode);
-
-                    // ãƒ‡ãƒ¼ã‚¿ç™»éŒ²
-                    if (!exDB.InsertAction(exList, false))
-                    {
-                        MessageBox.Show("çµŒè²»çŽ‡ãƒžã‚¹ã‚¿ç™»éŒ²ã�«å¤±æ•—ã�—ã�¾ã�—ã�Ÿã€‚", "ç™»éŒ²ã‚¨ãƒ©ãƒ¼", MessageBoxButtons.OK, MessageBoxIcon.Error);
-                        return false;
-                    }
-                }
-
-                return true;
-            }
-            catch (System.Exception ex)
-            {
-                logger.ErrorFormat("ã‚·ã‚¹ãƒ†ãƒ ã‚¨ãƒ©ãƒ¼ï¼š{0}ï¼š{1}", CommonMotions.GetMethodName(), ex.Message);
-                return false;
-            }
-        }
-        #endregion
-
-        #region ã‚°ãƒªãƒƒãƒ‰ãƒ‡ãƒ¼ã‚¿è¡¨ç¤º
-        /// <summary>
-        /// ã‚°ãƒªãƒƒãƒ‰ãƒ‡ãƒ¼ã‚¿è¡¨ç¤º
-        /// </summary>
-        private bool DispDepartmentGridData()
-        {
-            IOMDepartment dmDB = new IOMDepartment();
-            try
-            {
-                // ã‚°ãƒªãƒƒãƒ‰ã�®è¡Œã‚’0ã�«æˆ»ã�™
-                dgvWorkList.Rows.Clear();
-
-                // SQLä½œæˆ�
-                string strSQL = " Where DeleteFlg = 0 Order By DisplayOrder ASC";
-                List<DepartmentMaster> dmList = new List<DepartmentMaster>();
-                // éƒ¨ç½²å�–å¾—
-                if (!dmDB.SelectAction(strSQL, ref dmList)) return false;
-
-                // ãƒ‡ãƒ¼ã‚¿è¡¨ç¤º
-                int icnt = 0;
-                foreach (DepartmentMaster work in dmList)
-                {
-                    dgvWorkList.Rows.Add(work.DisplayOrder
-                                        , work.DepartmentCode
-                                        , work.DepartmentString.ToString());
-                    dgvWorkList.Rows[icnt++].Cells[(int)GridColumn.DepartmentString].ToolTipText = work.DepartmentString.ToString();
-
-                }
-
-                // è¡¨ç¤ºè¡Œã�Œè¶³ã‚Šã�ªã�„å ´å�ˆã�¯è¿½åŠ ã�™ã‚‹
-                if (dgvWorkList.Rows.Count <= CommonDefine.s_MaxInitLineCountMastamente)
-                {
-                    int iAddLine = CommonDefine.s_MaxInitLineCountMastamente - dgvWorkList.Rows.Count;
-                    for (int i = 0; i < iAddLine; i++)
-                    {
-                        dgvWorkList.Rows.Add();
-                    }
-                }
-
-                dgvWorkList.Rows.Add();
-
-                // èª­è¾¼æ™‚ãƒ‡ãƒ¼ã‚¿ã‚«ã‚¦ãƒ³ãƒˆå�–å¾—
-                m_initDataCount = dmList.Count;
-
-                return true;
-            }
-            catch (Exception ex)
-            {
-                logger.ErrorFormat("ã‚·ã‚¹ãƒ†ãƒ ã‚¨ãƒ©ãƒ¼ï¼š{0}ï¼š{1}", CommonMotions.GetMethodName(), ex.Message);
-                return false;
-            }
-            finally
-            {
-                dmDB.close();
-                dmDB = null;
-            }
-        }
-        #endregion
-
-        #region çµŒè²»çŽ‡è¡¨ç¤º
-        /// <summary>
-        /// çµŒè²»çŽ‡è¡¨ç¤º
-        /// </summary>
-        private void DispExpExpenses()
-        {
-            IOMDepartmentExpenses expDB = new IOMDepartmentExpenses();
-            try
-            {
-                dgvExpenses.Rows.Clear();
-
-                int preiod = CommonMotions.cnvInt(numUDPeriod.Value);
-                // éƒ¨ç½²çµŒè²»çŽ‡ãƒžã‚¹ã‚¿å�–å¾—
-                string strSQL = "SELECT A.DIVISIONCODE, A.NAMECODE, A.NAMESTRING,A.DISPLAYORDER, IFNULL(B.EXPENSESRAITO, 0)";
-                strSQL += " FROM DIVISIONMASTER A LEFT OUTER JOIN";
-                strSQL += " (SELECT NAMECODE, DEPARTMENTCODE, EXPENSESRAITO, EXPENSESPERIOD FROM DEPARTMENTEXPENSESMASTER";
-                strSQL += string.Format(" WHERE DEPARTMENTCODE = {0}) B", m_DepartmentCode);
-                strSQL += " ON A.NAMECODE = B.NAMECODE";
-                strSQL += string.Format(" AND B.EXPENSESPERIOD = {0}", CommonMotions.cnvInt(numUDPeriod.Value));
-                strSQL += string.Format(" WHERE A.DIVISIONCODE = {0}", (int)DivisionMaster.DivisionMasterCodeDefine.ConstructionExpenses);
-                strSQL += " ORDER BY A.DISPLAYORDER";
-                ArrayList arData = new ArrayList();
-                expDB.ExecuteReader(strSQL, ref arData);
-
-                // ãƒ‡ãƒ¼ã‚¿è¡¨ç¤º
-                foreach (object[] objwrk in arData)
-                {
-                    // ãƒ‡ãƒ¼ã‚¿è¡¨ç¤º
-                    int icnt = dgvExpenses.Rows.Add(CommonMotions.cnvInt(objwrk[1]),                // çµŒè²»çŽ‡ã‚³ãƒ¼ãƒ‰
-                                            CommonMotions.cnvString(objwrk[2]),                     // çµŒè²»çŽ‡å��ç§°
-                                            CommonMotions.cnvDouble(objwrk[4]).ToString("0.00"));   // çµŒè²»çŽ‡
-                    dgvExpenses.Rows[icnt].Cells[(int)ExpGridColumn.Ratio].ReadOnly = false;
-                }
-                int RowCnt = 4 - dgvExpenses.RowCount;
-                if (RowCnt > 0)
-                {
-                    dgvExpenses.Rows.Add(RowCnt);
-                    //dgvExpenses.Columns[(int)ExpGridColumn.ExpensesName].Width = s_CellSize[(int)ExpGridColumn.ExpensesName] + dgvExpenses.RowHeadersWidth;
-                }
-
-                m_bChengeAns = false;
-            }
-            catch (Exception ex)
-            {
-                logger.ErrorFormat("ã‚·ã‚¹ãƒ†ãƒ ã‚¨ãƒ©ãƒ¼ï¼š{0}ï¼š{1}", CommonMotions.GetMethodName(), ex.Message);
-            }
-            finally
-            {
-                expDB.close(); expDB = null;
-            }
-        }
-        #endregion
-
-        #region ãƒ‡ãƒ¼ã‚¿è¡¨ç¤º
-        /// <summary>
-        /// ãƒ‡ãƒ¼ã‚¿å�–å¾—
-        /// </summary>
-        private void DispMentenanceData()
-        {
-            IOMDepartment dmDB = new IOMDepartment();
-            try
-            {
-
-                // çµŒè²»çŽ‡ã‚’è¡¨ç¤ºã�™ã‚‹
-                DispExpExpenses();
-                // ã‚³ãƒ³ãƒœãƒœãƒƒã‚¯ã‚¹ã�®åˆ�æœŸå€¤
-                cmbActionScheduleDsp.SelectedValue = 0;
-
-                // æ–°è¦�æ™‚ã�¯ä»¥ä¸‹è¡¨ç¤ºã�—ã�ªã�„
-                if (m_DepartmentCode == 0) return;
-
-                // éƒ¨ç½²å�–å¾—
-                string strSQL = dmDB.CreatePrimarykeyString(m_DepartmentCode);
-                List<DepartmentMaster> dmList = new List<DepartmentMaster>();
-                if (!dmDB.SelectAction(strSQL, ref dmList)) return;
-                m_dispControl[(int)DispControl.DepartmentCode].Text = dmList[0].DepartmentCode.ToString();
-                m_dispControl[(int)DispControl.DepartmentString].Text = dmList[0].DepartmentString;
-                ((ComboBox)m_dispControl[(int)DispControl.ActionSchdule]).SelectedValue = dmList[0].ActionScheduleFlg;
-                ((ComboBox)m_dispControl[(int)DispControl.StaffAssign]).SelectedValue = dmList[0].StaffAssignFlg;
-
-                if (m_EditLock)
-                    m_dispControl[(int)DispControl.EditMode].Text = CommonDefine.EditModeStringRef;                     // â€�å�‚ç…§â€�
-                else
-                    m_dispControl[(int)DispControl.EditMode].Text = CommonDefine.EditModeStringEdit;                    // â€�ä¿®æ­£â€�
-
-                m_bChengeAns = false;
-            }
-            catch (Exception ex)
-            {
-                logger.ErrorFormat("ã‚·ã‚¹ãƒ†ãƒ ã‚¨ãƒ©ãƒ¼ï¼š{0}ï¼š{1}", CommonMotions.GetMethodName(), ex.Message);
-            }
-            finally
-            {
-                dmDB.close(); dmDB = null;
-            }
-        }
-        #endregion
-
-        #region è¡Œå‹•äºˆå®šè¡¨ç¤ºã‚³ãƒ³ãƒœãƒœãƒƒã‚¯ã‚¹ã‚»ãƒƒãƒˆ
-        /// <summary>
-        /// è¡Œå‹•äºˆå®šè¡¨ç¤ºã‚³ãƒ³ãƒœãƒœãƒƒã‚¯ã‚¹ã‚»ãƒƒãƒˆ
-        /// </summary>
-        private void InitActionScheduleDspCombBox()
-        {
-            try
-            {
-                List<KeyValuePair<int, string>> DataList = new List<KeyValuePair<int, string>>();
-                // ãƒ‡ãƒ¼ã‚¿è¡¨ç¤º
-                for (int i = 0; i < cmbDspString.Length; i++)
-                {
-                    KeyValuePair<int, string> keyval = new KeyValuePair<int, string>(i, cmbDspString[i]);
-
-                    DataList.Add(keyval);
-                }
-                // ã‚³ãƒ³ãƒœãƒœãƒƒã‚¯ã‚¹åˆ�æœŸè¡¨ç¤º
-                ComboBoxAction.InitDataSetCombBox(cmbActionScheduleDsp, DataList);
-            }
-            catch (Exception ex)
-            {
-                logger.ErrorFormat("ã‚·ã‚¹ãƒ†ãƒ ã‚¨ãƒ©ãƒ¼ï¼š{0}ï¼š{1}", CommonMotions.GetMethodName(), ex.Message);
-            }
-        }
-        #endregion
-
-        #region äººå“¡é…�ç½®è¡¨ç¤ºã‚³ãƒ³ãƒœãƒœãƒƒã‚¯ã‚¹ã‚»ãƒƒãƒˆ
-        /// <summary>
-        /// äººå“¡é…�ç½®è¡¨ç¤ºã‚³ãƒ³ãƒœãƒœãƒƒã‚¯ã‚¹ã‚»ãƒƒãƒˆ
-        /// </summary>
-        private void InitStaffAssignDspCombBox()
-        {
-            try
-            {
-                List<KeyValuePair<int, string>> DataList = new List<KeyValuePair<int, string>>();
-                // ãƒ‡ãƒ¼ã‚¿è¡¨ç¤º
-                for (int i = 0; i < cmbDspString.Length; i++)
-                {
-                    KeyValuePair<int, string> keyval = new KeyValuePair<int, string>(i, cmbDspString[i]);
-
-                    DataList.Add(keyval);
-                }
-                // ã‚³ãƒ³ãƒœãƒœãƒƒã‚¯ã‚¹åˆ�æœŸè¡¨ç¤º
-                ComboBoxAction.InitDataSetCombBox(cmbStaStaffAssignDsp, DataList);
-            }
-            catch (Exception ex)
-            {
-                logger.ErrorFormat("ã‚·ã‚¹ãƒ†ãƒ ã‚¨ãƒ©ãƒ¼ï¼š{0}ï¼š{1}", CommonMotions.GetMethodName(), ex.Message);
-            }
-        }
-        #endregion
-
-        #region ã‚°ãƒªãƒƒãƒ‰ã�®æœ‰åŠ¹è¡Œã‚’ã‚«ã‚¦ãƒ³ãƒˆã�™ã‚‹
-        /// <summary>
-        /// ã‚°ãƒªãƒƒãƒ‰ã�®æœ‰åŠ¹è¡Œã‚’ã‚«ã‚¦ãƒ³ãƒˆã�™ã‚‹
-        /// </summary>
-        /// <returns></returns>
-        private int GetGridLineEffectivenessCount()
-        {
-            try
-            {
-                int linecount = 0;
-                foreach (DataGridViewRow wrkRow in dgvWorkList.Rows)
-                {
-                    if (CommonMotions.chkCellBlank(wrkRow.Cells[(int)GridColumn.DepartmentString].Value)) continue;
-
-                    linecount++;
-                }
-                return linecount;
-            }
-            catch (Exception ex)
-            {
-                logger.ErrorFormat("ã‚·ã‚¹ãƒ†ãƒ ã‚¨ãƒ©ãƒ¼ï¼š{0}ï¼š{1}", CommonMotions.GetMethodName(), ex.Message);
-                return 0;
-            }
-        }
-        #endregion
-
-        #region å¯¾è±¡æœŸæ•°ã‚³ãƒ³ãƒœãƒœãƒƒã‚¯ã‚¹åˆ�æœŸè¡¨ç¤ºå‡¦ç�†
-        /// <summary>
-        /// å¯¾è±¡æœŸæ•°ã‚³ãƒ³ãƒœãƒœãƒƒã‚¯ã‚¹åˆ�æœŸè¡¨ç¤ºå‡¦ç�†
-        /// </summary>
-        private void SetnumUDPeriod()
-        {
-            // ãƒ•ãƒ©ã‚°åˆ�æœŸåŒ–
-            m_bInitDataFlg = true;
-            try
-            {
-
-                // æ¤œç´¢å¹´åº¦ã‚»ãƒƒãƒˆ
-                // ãƒ‡ãƒ¼ã‚¿ã�«ã�‚ã‚‹äº‹æ¥­æœŸã�¨ç�¾åœ¨ã�®äº‹æ¥­ã‚»ãƒƒãƒˆ
-                int minval = 0;
-                int maxval = 0;
-                CommonMotions.GetPeriodYear(ref minval, ref maxval);
-                numUDPeriod.Minimum = minval;
-                numUDPeriod.Maximum = CommonMotions.SystemMasterData.BusinessPeriod + 1;
-                numUDPeriod.Value = CommonMotions.SystemMasterData.BusinessPeriod;
-                numUDPeriod.Text = CommonMotions.SystemMasterData.BusinessPeriod.ToString();
-            }
-            catch (Exception ex)
-            {
-                logger.ErrorFormat("ã‚·ã‚¹ãƒ†ãƒ ã‚¨ãƒ©ãƒ¼ï¼š{0}ï¼š{1}", CommonMotions.GetMethodName(), ex.Message);
-            }
-            finally
-            {
-                m_bInitDataFlg = false;
-            }
-        }
-        #endregion
-
-        #region å�‚ç…§æ™‚ãƒ­ãƒƒã‚¯å‡¦ç�†
-        /// <summary>
-        /// å�‚ç…§æ™‚ãƒ­ãƒƒã‚¯å‡¦ç�†
-        /// </summary>
-        private void ExecReadOnly()
-        {
-            try
-            {
-                ControlLock(false);
-                btnDataEntry.Visible = false;
-                btnDataDelete.Visible = false;
-                btnDataLineEntry.Visible = false;
-                btnDispDown.Visible = false;
-                btnDispUp.Visible = false;
-            }
-            catch (Exception ex)
-            {
-                logger.ErrorFormat("ã‚·ã‚¹ãƒ†ãƒ ã‚¨ãƒ©ãƒ¼ï¼š{0}ï¼š{1}", CommonMotions.GetMethodName(), ex.Message);
-            }
-        }
-        #endregion
     }
 }
\ No newline at end of file
Index: branches/src/ProcessManagement/ProcessManagement/Forms/Master/Department/FrmDepartmentAux.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/Master/Department/FrmDepartmentAux.cs	(nonexistent)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/Master/Department/FrmDepartmentAux.cs	(revision 330)
@@ -0,0 +1,899 @@
+ï»¿using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Windows.Forms;
+using System.Collections;
+using System.Diagnostics;
+using System.Threading;
+
+using log4net;
+using log4net.Appender;
+using log4net.Repository.Hierarchy;
+
+using ProcessManagement.Common;
+using ProcessManagement.DB.IOAccess;
+using ProcessManagement.DataModel;
+using ProcessManagement.DB.Core;
+using ProcessManagement.Forms.SubForms;
+using ProcessManagement.Forms.CustomControls;
+using ProcessManagement.Forms.ControlsAction;
+
+namespace ProcessManagement.Forms.Master
+{
+    partial class FrmDepartment
+    {
+        #region ç”»é�¢ãƒ­ãƒƒã‚¯
+        /// <summary>
+        /// ç”»é�¢ãƒ­ãƒƒã‚¯
+        /// </summary>
+        private void ControlLock(bool bctrl = true)
+        {
+            foreach (Control wrk in m_dispControl)
+            {
+                if (CommonMotions.chkObjectIsNull(wrk)) continue;
+                if (!wrk.GetType().Equals(typeof(Label)))
+                    wrk.Enabled = bctrl;
+            }
+        }
+        #endregion
+
+        #region è¡¨ç¤ºã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆã�®å�–å¾—
+        /// <summary>
+        /// è¡¨ç¤ºã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆã�®å�–å¾—
+        /// </summary>
+        private void SetDisplayObject()
+        {
+            int DspCtrlCnt = Enum.GetNames(typeof(DispControl)).Length;
+            m_dispControl = new Control[DspCtrlCnt];
+
+            m_dispControl[(int)DispControl.DepartmentCode] = lblDepartmentCode;
+            m_dispControl[(int)DispControl.DepartmentString] = txtInput01;
+            m_dispControl[(int)DispControl.RatioGrid] = dgvExpenses;
+            m_dispControl[(int)DispControl.ActionSchdule] = cmbActionScheduleDsp;
+            m_dispControl[(int)DispControl.StaffAssign] = cmbStaStaffAssignDsp;
+            m_dispControl[(int)DispControl.EditMode] = lblEditMode;
+            m_dispControl[(int)DispControl.Period] = numUDPeriod;
+        }
+        #endregion
+
+        #region ç”»é�¢ã‚¯ãƒªã‚¢
+        /// <summary>
+        /// ç”»é�¢ã‚¯ãƒªã‚¢
+        /// </summary>
+        private void ClearDisplay()
+        {
+            try
+            {
+                foreach (Control wrk in m_dispControl)
+                {
+                    if (CommonMotions.chkObjectIsNull(wrk)) continue;
+                    wrk.Text = string.Empty;
+                }
+                dgvExpenses.Rows.Clear();
+
+                // æ–°è¦�æ™‚ã�¯ã‚³ãƒ¼ãƒ‰ã‚’è¡¨ç¤ºã�—ã�ªã�„
+                if (m_DepartmentCode == 0)
+                {
+                    lblStaticItemCode.Visible = false;
+                    lblDepartmentCode.Visible = false;
+                }
+                else
+                {
+                    lblStaticItemCode.Visible = true;
+                    lblDepartmentCode.Visible = true;
+                }
+
+                cmbActionScheduleDsp.SelectedIndex = -1;
+                cmbStaStaffAssignDsp.SelectedIndex = -1;
+
+                m_bChengeAns = false;
+            }
+            catch (System.Exception ex)
+            {
+                logger.ErrorFormat("ã‚·ã‚¹ãƒ†ãƒ ã‚¨ãƒ©ãƒ¼ï¼š{0}ï¼š{1}", CommonMotions.GetMethodName(), ex.Message);
+            }
+        }
+        #endregion
+
+        #region ç”»é�¢é …ç›®ã�®ãƒ�ã‚§ãƒƒã‚¯
+        /// <summary>
+        /// ç”»é�¢é …ç›®ã�®ãƒ�ã‚§ãƒƒã‚¯
+        /// </summary>
+        /// <returns></returns>
+        private bool DispFeildCheck()
+        {
+            bool bRet = true;
+            int iLength = 0;
+            try
+            {
+
+                // éƒ¨ç½²å��å��
+                if (m_dispControl[(int)DispControl.DepartmentString].Text.Length != 0) iLength++;
+                bRet &= CommonMotions.DispFieldLengthCheck(m_dispControl[(int)DispControl.DepartmentString], s_DepartmentNameLength, true);
+
+                // çµŒè²»çŽ‡ãƒ�ã‚§ãƒƒã‚¯
+                foreach (DataGridViewRow wrkRow in dgvExpenses.Rows)
+                {
+                    if (CommonMotions.chkObjectIsNull(wrkRow.Cells[(int)ExpGridColumn.ExpensesName].Value)) continue;
+                    bool bAns = CommonMotions.chkNumeric(wrkRow.Cells[(int)ExpGridColumn.Ratio].Value);
+                    // èƒŒæ™¯è‰²å¤‰æ›´
+                    CommonMotions.chgBackColor(wrkRow.Cells[(int)ExpGridColumn.Ratio], bAns);
+                    bRet &= bAns;
+                }
+
+                if (iLength == 0)
+                {
+                    MessageBox.Show("ãƒ‡ãƒ¼ã‚¿ã�Œå…¥åŠ›ã�•ã‚Œã�¦ã�„ã�¾ã�›ã‚“ã€�ç¢ºèª�ã�—ã�¦ã��ã� ã�•ã�„ã€‚", "ãƒ‡ãƒ¼ã‚¿ç¢ºèª�", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+                    return false;
+                }
+                if (!bRet)
+                {
+                    MessageBox.Show("å…¥åŠ›ã‚¨ãƒ©ãƒ¼ã�Œã�‚ã‚Šã�¾ã�™ã€�ç¢ºèª�ã�—ã�¦ã��ã� ã�•ã�„ã€‚", "ãƒ‡ãƒ¼ã‚¿ç¢ºèª�", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+                    return false;
+                }
+                return bRet;
+            }
+            catch (System.Exception ex)
+            {
+                logger.ErrorFormat("ã‚·ã‚¹ãƒ†ãƒ ã‚¨ãƒ©ãƒ¼ï¼š{0}ï¼š{1}", CommonMotions.GetMethodName(), ex.Message);
+                return false;
+            }
+        }
+        #endregion
+
+        #region éƒ¨ç½²ãƒ»éƒ¨ç½²çµŒè²»çŽ‡ãƒžã‚¹ã‚¿ç™»éŒ²
+        /// <summary>
+        /// éƒ¨ç½²ãƒ»éƒ¨ç½²çµŒè²»çŽ‡ãƒžã‚¹ã‚¿ç™»éŒ²
+        /// </summary>
+        private bool DataEntry()
+        {
+            IOMDepartment dmDB = new IOMDepartment();
+            IOMDepartmentExpenses exDB = new IOMDepartmentExpenses();
+            IOConstructionBaseInfoDetail DetailDB = new IOConstructionBaseInfoDetail();
+            try
+            {
+                // éƒ¨ç½²å��ã�Œå¤‰ã‚�ã�£ã�Ÿæ™‚ã�«å·¥äº‹æƒ…å ±ã�«å¯¾è±¡ã�Œã�‚ã‚‹ã�‹ã‚’åˆ¤å®šã�™ã‚‹
+                bool bChgName = false;
+                List<int> TergetPeriod = new List<int>();
+                if (m_DepartmentCode > 0)
+                {   // æ–°è¦�ä»¥å¤–ã�®æ™‚ã�«å‡¦ç�†ã�™ã‚‹
+                    bChgName = NameChangeCheck(m_DepartmentCode, ref TergetPeriod);
+                }
+
+                // ä¸€æ‹¬å‡¦ç�†ã�ªã�®ã�§æŽ¥ç¶šã‚’è¡Œã�†
+                exDB.connect(); exDB.beginTran();
+                dmDB.connect(); dmDB.beginTran();
+                DetailDB.connect(); DetailDB.beginTran();
+
+                // è¡¨ç¤ºé †ã‚’æ›´æ–°ã�™ã‚‹
+                int idno = 0;
+                foreach (DataGridViewRow wrkRow in dgvWorkList.Rows)
+                {
+                    // æ§‹æˆ�ã‚³ãƒ¼ãƒ‰ç„¡ã�¯å‡¦ç�†ã�—ã�ªã�„
+                    if (CommonMotions.chkObjectIsNull(wrkRow.Cells[(int)GridColumn.DepartmentCode].Value)) continue;
+
+                    List<DepartmentMaster> cwrow = new List<DepartmentMaster>();
+
+                    // æ¤œç´¢æ–‡å­—åˆ—ä½œæˆ�
+                    string SQLRow = dmDB.CreatePrimarykeyString(
+                                                CommonMotions.cnvInt(wrkRow.Cells[(int)GridColumn.DepartmentCode].Value));
+
+                    // ãƒ‡ãƒ¼ã‚¿å�–å¾—
+                    if (!dmDB.SelectAction(SQLRow, ref cwrow, false)) break;
+                    // è¡¨ç¤ºé †å¤‰æ›´
+                    cwrow[0].DisplayOrder = ++idno;
+                    // ãƒ‡ãƒ¼ã‚¿æ›´æ–°
+                    dmDB.UpdateAction(SQLRow, cwrow[0], false);
+                }
+
+                // éƒ¨ç½²ãƒžã‚¹ã‚¿ç™»éŒ²
+                DepartmentMaster dmData = new DepartmentMaster();
+                dmData.DepartmentCode = m_DepartmentCode;
+                dmData.DepartmentString = m_dispControl[(int)DispControl.DepartmentString].Text;
+                dmData.ActionScheduleFlg = CommonMotions.cnvInt(((ComboBox)m_dispControl[(int)DispControl.ActionSchdule]).SelectedValue.ToString());
+                dmData.StaffAssignFlg = CommonMotions.cnvInt(((ComboBox)m_dispControl[(int)DispControl.StaffAssign]).SelectedValue.ToString());
+                // è¡¨ç¤ºé †ã�¯ã‚»ãƒƒãƒˆã�—ã�ªã�„
+                dmData.DisplayOrder = 0;
+
+                string strSQL = dmDB.CreatePrimarykeyString(dmData.DepartmentCode);
+                List<DepartmentMaster> dmList = new List<DepartmentMaster>();
+                // çµŒè²»çŽ‡ãƒžã‚¹ã‚¿å�–å¾—
+                if (!dmDB.SelectAction(strSQL, ref dmList, false))
+                {
+                    MessageBox.Show("éƒ¨ç½²ãƒžã‚¹ã‚¿ç™»éŒ²ç¢ºèª�ã�«å¤±æ•—ã�—ã�¾ã�—ã�Ÿã€‚", "ç™»éŒ²ã‚¨ãƒ©ãƒ¼", MessageBoxButtons.OK, MessageBoxIcon.Error);
+                    return false;
+                }
+                if (dmList.Count == 0)
+                {
+                    // è¡¨ç¤ºé †ã‚»ãƒƒãƒˆ
+                    dmData.DisplayOrder = GetGridLineEffectivenessCount() + 1;
+                    // ãƒ‡ãƒ¼ã‚¿ã�Œã�ªã�„å ´å�ˆã�¯è¿½åŠ 
+                    dmList.Clear();
+                    dmList.Add(dmData);
+
+                    // ãƒ‡ãƒ¼ã‚¿ç™»éŒ²
+                    if (!dmDB.InsertAction(dmList, false))
+                    {
+                        dmDB.rollback();
+                        MessageBox.Show("éƒ¨ç½²ãƒžã‚¹ã‚¿ç™»éŒ²ã�«å¤±æ•—ã�—ã�¾ã�—ã�Ÿã€‚", "ç™»éŒ²ã‚¨ãƒ©ãƒ¼", MessageBoxButtons.OK, MessageBoxIcon.Error);
+                        return false;
+                    }
+                }
+                else
+                {
+                    // è¡¨ç¤ºé †ã‚»ãƒƒãƒˆ
+                    dmData.DisplayOrder = dmList[0].DisplayOrder;
+                    // ãƒ‡ãƒ¼ã‚¿ç™»éŒ²
+                    if (!dmDB.UpdateAction(strSQL, dmData, false))
+                    {
+                        dmDB.rollback();
+                        MessageBox.Show("æ›´æ–°ã�«å¤±æ•—ã�—ã�¾ã�—ã�Ÿã€‚", "ç™»éŒ²ã‚¨ãƒ©ãƒ¼", MessageBoxButtons.OK, MessageBoxIcon.Error);
+                        return false;
+                    }
+                }
+
+                // ----- çµŒè²»ãƒžã‚¹ã‚¿ç™»éŒ²
+                // å½“å¹´ã�®å�–å¾—
+                int ExpensesPeriod = CommonMotions.cnvInt(numUDPeriod.Value);
+                // å½“å¹´ãƒ‡ãƒ¼ã‚¿ã‚’ã�¾ã�šå‰Šé™¤
+                exDB.DeleteAction(exDB.CreatePrimarykeyString(m_DepartmentCode, ExpensesPeriod), false);
+
+                if (!DepartmentExpensesEntry(exDB, ExpensesPeriod))
+                {
+                    dmDB.rollback();
+                    exDB.rollback();
+                    MessageBox.Show("çµŒè²»çŽ‡ãƒžã‚¹ã‚¿ç™»éŒ²ã�«å¤±æ•—ã�—ã�¾ã�—ã�Ÿã€‚", "ç™»éŒ²ã‚¨ãƒ©ãƒ¼", MessageBoxButtons.OK, MessageBoxIcon.Error);
+                    return false;
+                }
+
+                // ç¿Œå¹´ã�®å�–å¾—
+                ExpensesPeriod++;
+                List<DepartmentExpenses> deList = new List<DepartmentExpenses>();
+                // å½“å¹´ãƒ‡ãƒ¼ã‚¿ã‚’ã�¾ã�šå‰Šé™¤
+                if (!exDB.SelectAction(exDB.CreatePrimarykeyString(m_DepartmentCode, ExpensesPeriod), ref deList, false))
+                {
+                    dmDB.rollback();
+                    exDB.rollback();
+                    MessageBox.Show("çµŒè²»çŽ‡ãƒžã‚¹ã‚¿ç¿Œå¹´ç™»éŒ²ç¢ºèª�ã�«å¤±æ•—ã�—ã�¾ã�—ã�Ÿã€‚", "ç™»éŒ²ç¢ºèª�ã‚¨ãƒ©ãƒ¼", MessageBoxButtons.OK, MessageBoxIcon.Error);
+                    return false;
+                }
+                // ç¿Œå¹´ã�®ãƒ‡ãƒ¼ã‚¿ã�Œç„¡ã�„å ´å�ˆã�¯ç¿Œå¹´ç™»éŒ²ã�™ã‚‹
+                if (deList.Count == 0)
+                {
+                    if (!DepartmentExpensesEntry(exDB, ExpensesPeriod))
+                    {
+                        dmDB.rollback();
+                        exDB.rollback();
+                        MessageBox.Show("çµŒè²»çŽ‡ãƒžã‚¹ã‚¿ç¿Œå¹´ç™»éŒ²ã�«å¤±æ•—ã�—ã�¾ã�—ã�Ÿã€‚", "ç™»éŒ²ã‚¨ãƒ©ãƒ¼", MessageBoxButtons.OK, MessageBoxIcon.Error);
+                        return false;
+                    }
+                }
+
+                // æ‹…å½“è€…éƒ¨ç½²å¤‰æ›´å‡¦ç�†
+                if (bChgName && TergetPeriod.Count > 0)
+                {
+                    string strBDepName = dmList[0].DepartmentString;
+                    string strADepName = txtInput01.Text;
+                    int nDepCode = m_DepartmentCode;
+                    if(!ChangeDepName(DetailDB, TergetPeriod, nDepCode, strADepName))
+                    {
+                        exDB.rollback();
+                        dmDB.rollback();
+                        DetailDB.rollback();
+                        MessageBox.Show("å·¥äº‹æƒ…å ±ï¼šæ‹…å½“è€…éƒ¨ç½²å��æ›´æ–°ã�«å¤±æ•—ã�—ã�¾ã�—ã�Ÿã€‚", "ç™»éŒ²ã‚¨ãƒ©ãƒ¼", MessageBoxButtons.OK, MessageBoxIcon.Error);
+                        return false;
+                    }
+                }
+
+                // æˆ�åŠŸã�—ã�Ÿã‚‰commit
+                exDB.commit();
+                dmDB.commit();
+                DetailDB.commit();
+
+                return true;
+
+            }
+            catch (System.Exception ex)
+            {
+                logger.ErrorFormat("ã‚·ã‚¹ãƒ†ãƒ ã‚¨ãƒ©ãƒ¼ï¼š{0}ï¼š{1}", CommonMotions.GetMethodName(), ex.Message);
+                return false;
+            }
+            finally
+            {
+                exDB.close(); exDB = null;
+                dmDB.close(); dmDB = null;
+                DetailDB.close(); DetailDB = null;
+
+            }
+        }
+        #endregion
+
+        #region éƒ¨ç½²çµŒè²»çŽ‡ãƒžã‚¹ã‚¿ç™»éŒ²
+        /// <summary>
+        /// éƒ¨ç½²çµŒè²»çŽ‡ãƒžã‚¹ã‚¿ç™»éŒ²
+        /// </summary>
+        /// <param name="ExpensesPeriod"></param>
+        /// <returns></returns>
+        private bool DepartmentExpensesEntry(IOMDepartmentExpenses exDB, int ExpensesPeriod)
+        {
+            try
+            {
+                DepartmentExpenses exList = new DepartmentExpenses();
+                int idisp = 0;
+                // ãƒ‡ãƒ¼ã‚¿ã‚’ç”»é�¢ã‚ˆã‚Šå�–å¾—
+                foreach (DataGridViewRow wrkRow in dgvExpenses.Rows)
+                {
+                    if (CommonMotions.chkCellBlank(wrkRow.Cells[(int)ExpGridColumn.ExpensesCode].Value)) continue;
+                    if (CommonMotions.chkCellBlank(wrkRow.Cells[(int)ExpGridColumn.ExpensesName].Value)) continue;
+
+                    // ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆ
+                    exList.DepartmentCode = m_DepartmentCode;
+                    exList.ExpensesPeriod = ExpensesPeriod;
+                    exList.NameCode = CommonMotions.cnvInt(wrkRow.Cells[(int)ExpGridColumn.ExpensesCode].Value);
+                    exList.DisplayOrder = ++idisp;
+                    exList.ExpensesRaito = CommonMotions.cnvDouble(wrkRow.Cells[(int)ExpGridColumn.Ratio].Value);
+                    exList.DeleteFlg = 0;
+
+                    // SQLä½œæˆ�
+                    string strSQL = exDB.CreatePrimarykeyString(exList.DepartmentCode, exList.NameCode);
+
+                    // ãƒ‡ãƒ¼ã‚¿ç™»éŒ²
+                    if (!exDB.InsertAction(exList, false))
+                    {
+                        MessageBox.Show("çµŒè²»çŽ‡ãƒžã‚¹ã‚¿ç™»éŒ²ã�«å¤±æ•—ã�—ã�¾ã�—ã�Ÿã€‚", "ç™»éŒ²ã‚¨ãƒ©ãƒ¼", MessageBoxButtons.OK, MessageBoxIcon.Error);
+                        return false;
+                    }
+                }
+
+                return true;
+            }
+            catch (System.Exception ex)
+            {
+                logger.ErrorFormat("ã‚·ã‚¹ãƒ†ãƒ ã‚¨ãƒ©ãƒ¼ï¼š{0}ï¼š{1}", CommonMotions.GetMethodName(), ex.Message);
+                return false;
+            }
+        }
+        #endregion
+
+        #region å·¥äº‹æƒ…å ±æ‹…å½“è€…éƒ¨ç½²ç¢ºèª�
+        /// <summary>
+        /// å·¥äº‹æƒ…å ±æ‹…å½“è€…éƒ¨ç½²ç¢ºèª�
+        /// </summary>
+        /// <returns></returns>
+        private bool NameChangeCheck(int DepartmentCode, ref List<int> PeriodList)
+        {
+            IOMDepartment depDB = new IOMDepartment();
+            IOConstructionBaseInfoDetail DetailDB = new IOConstructionBaseInfoDetail();
+            FrmCustomCount frm = new FrmCustomCount();
+            try
+            {
+                StringBuilder strSQL = new StringBuilder();
+                strSQL.AppendFormat(" Where DepartmentCode = {0}", m_DepartmentCode);
+                List<DepartmentMaster> GetList = new List<DepartmentMaster>();
+                if (!depDB.SelectAction(strSQL.ToString(), ref GetList)) return false;
+                if (GetList.Count < 1) return false;
+
+                // ç™»éŒ²ãƒ‡ãƒ¼ã‚¿ã�¨å��ç§°ã�Œé�•ã�ˆã�°å‡¦ç�†ã�™ã‚‹
+                if (GetList[0].DepartmentString == txtInput01.Text) return false;
+
+                // å·¥äº‹æƒ…å ±ä»¶æ•°å�–å¾—
+                strSQL.Clear();
+                strSQL.Append("Select B.ConstructionPeriod, Count(*)");
+                strSQL.Append(" From constructionbaseinfodetail As A");
+                strSQL.Append(" Inner Join constructionbaseinfo As B");
+                strSQL.Append(" On B.ConstructionCode = A.ConstructionCode");
+                strSQL.Append(" Where ");
+                strSQL.AppendFormat(" A.DetailNo In({0}, {1}, {2}, {3})", (int)ConstructionBaseInfoDetail.DataNoDef.SalesDepartmentName
+                                                                        , (int)ConstructionBaseInfoDetail.DataNoDef.ConstrDepartmentName
+                                                                        , (int)ConstructionBaseInfoDetail.DataNoDef.ConstrSubDepartmentName
+                                                                        , (int)ConstructionBaseInfoDetail.DataNoDef.InstrDepartmentName);
+                strSQL.AppendFormat(" And A.DetailString = '{0}'", GetList[0].DepartmentString);
+                strSQL.Append(" Group By ConstructionPeriod");
+                strSQL.Append(" Order By ConstructionPeriod desc");
+                ArrayList arList = new ArrayList();
+                if (!DetailDB.ExecuteReader(strSQL.ToString(), ref arList)) return false;
+
+                // å·¥äº‹æƒ…å ±ä»¶æ•°ãƒ�ã‚§ãƒƒã‚¯
+                int nAllCnt = 0;
+                frm.arrayList.Clear();
+                foreach (object[] objRec in arList)
+                {
+                    nAllCnt += CommonMotions.cnvInt(objRec[1]);
+                    frm.arrayList.Add(new KeyValuePair<int, int>(CommonMotions.cnvInt(objRec[0])
+                                                                , CommonMotions.cnvInt(objRec[1])));
+                }
+                // å¯¾è±¡å·¥äº‹æƒ…å ±ã�Œ1ä»¶ã‚‚ç„¡ã�„å ´å�ˆ
+                if (nAllCnt < 1) return false;
+
+                // ã�‚ã‚Œã�°ã‚µãƒ–ãƒ•ã‚©ãƒ¼ãƒ ã‚’è¡¨ç¤ºã�™ã‚‹
+                frm.ShowDialog();
+                if (frm.ReturnValue == DialogResult.Cancel) return false;
+
+                // ãƒªã‚¹ãƒˆè¿½åŠ 
+                foreach (KeyValuePair<int, int> CurData in frm.arrayList)
+                {
+                    PeriodList.Add(CurData.Key);
+                }
+
+                return true;
+            }
+            catch (System.Exception ex)
+            {
+                logger.ErrorFormat("ã‚·ã‚¹ãƒ†ãƒ ã‚¨ãƒ©ãƒ¼ï¼š{0}ï¼š{1}", CommonMotions.GetMethodName(), ex.Message);
+                return false;
+            }
+            finally
+            {
+                depDB.close(); depDB = null;
+                DetailDB.close(); DetailDB = null;
+                frm.Dispose(); frm = null;
+            }
+        }
+        #endregion
+
+        #region æ‹…å½“è€…éƒ¨ç½²å¤‰æ›´å‡¦ç�†
+        /// <summary>
+        /// æ‹…å½“è€…éƒ¨ç½²å¤‰æ›´å‡¦ç�†
+        /// </summary>
+        /// <returns></returns>
+        private bool ChangeDepName(IOConstructionBaseInfoDetail DetailDB
+                                    , List<int> TergetPeriod
+                                    , int DepCode
+                                    , string strAfterDepName)
+        {
+            try
+            {
+                // å¯¾è±¡å¹´åˆ†ãƒ‡ãƒ¼ã‚¿ã‚’å�–å¾—ã�™ã‚‹
+                ArrayList arList = new ArrayList();
+                if (!ChgDepNameGetData(DetailDB, TergetPeriod, DepCode, ref arList)) return false;
+
+                // å·¥äº‹æƒ…å ±æ˜Žç´°å¯¾è±¡éƒ¨ç½²å��å¤‰æ›´
+                if (!ChgDepNameBaseInfoDetail(DetailDB, arList, DepCode, strAfterDepName)) return false;
+
+                return true;
+            }
+            catch (System.Exception ex)
+            {
+                logger.ErrorFormat("ã‚·ã‚¹ãƒ†ãƒ ã‚¨ãƒ©ãƒ¼ï¼š{0}ï¼š{1}", CommonMotions.GetMethodName(), ex.Message);
+                return false;
+            }
+        }
+        #endregion
+
+        #region éƒ¨ç½²å��å¤‰æ›´å�–å¾—ãƒ‡ãƒ¼ã‚¿ä¸¦ã�³
+        /// <summary>
+        /// éƒ¨ç½²å��å¤‰æ›´å�–å¾—ãƒ‡ãƒ¼ã‚¿ä¸¦ã�³
+        /// </summary>
+        private enum GetChgDepData
+        {
+            ConstronCode = 0
+            , DetailNo
+            , SalesDepCode
+            , ConstrDepCode
+            , ConstrSubDepCode
+            , ConstrInstrDepCode
+        }
+        #endregion
+
+        #region æ‹…å½“è€…éƒ¨ç½²å¤‰æ›´å¯¾è±¡ãƒ‡ãƒ¼ã‚¿ã‚’å�–å¾—ã�™ã‚‹
+        /// <summary>
+        /// æ‹…å½“è€…éƒ¨ç½²å¤‰æ›´å¯¾è±¡ãƒ‡ãƒ¼ã‚¿ã‚’å�–å¾—ã�™ã‚‹
+        /// </summary>
+        /// <returns></returns>
+        private bool ChgDepNameGetData(IOConstructionBaseInfoDetail DetailDB
+                                        , List<int> TergetPeriod
+                                        , int DepCode
+                                        , ref ArrayList arList)
+        {
+            try
+            {
+                // å¯¾è±¡å¹´åˆ†ãƒ‡ãƒ¼ã‚¿ã‚’å�–å¾—ã�™ã‚‹
+                StringBuilder strSQL = new StringBuilder();
+                strSQL.Append("Select");
+                strSQL.Append(" A.ConstructionCode");
+                strSQL.Append(", B.DetailNo");
+                strSQL.Append(", A.SalesDepCode");
+                strSQL.Append(", A.ConstrDepCode");
+                strSQL.Append(", A.ConstrSubDepCode");
+                strSQL.Append(", A.ConstrInstrDepCode");
+                strSQL.Append(" From");
+                strSQL.Append(" ConstructionBaseInfo As A");
+                strSQL.Append(" Inner Join constructionbaseinfodetail As B");
+                strSQL.Append(" On B.ConstructionCode = A.ConstructionCode");
+                strSQL.AppendFormat(" And B.DetailNo In({0}, {1}, {2}, {3})"
+                                                                    , (int)ConstructionBaseInfoDetail.DataNoDef.SalesDepartmentName
+                                                                    , (int)ConstructionBaseInfoDetail.DataNoDef.ConstrDepartmentName
+                                                                    , (int)ConstructionBaseInfoDetail.DataNoDef.ConstrSubDepartmentName
+                                                                    , (int)ConstructionBaseInfoDetail.DataNoDef.InstrDepartmentName);
+
+                strSQL.Append(" Where A.ConstructionPeriod In (");
+                bool bFirst = true;
+                foreach (int nCurPeriod in TergetPeriod)
+                {
+                    if (bFirst) strSQL.AppendFormat("{0}", nCurPeriod);
+                    else strSQL.AppendFormat(",{0}", nCurPeriod);
+                    bFirst = false;
+                }
+                strSQL.Append(")");
+
+                strSQL.AppendFormat(" And (SalesDepCode = {0}", DepCode);
+                strSQL.AppendFormat(" Or ConstrDepCode = {0}", DepCode);
+                strSQL.AppendFormat(" Or ConstrSubDepCode = {0}", DepCode);
+                strSQL.AppendFormat(" Or ConstrInstrDepCode = {0})", DepCode);
+                strSQL.Append(" Order By ConstructionCode");
+
+                if (!DetailDB.ExecuteReader(strSQL.ToString(), ref arList, false)) return false;
+
+                return true;
+            }
+            catch (System.Exception ex)
+            {
+                logger.ErrorFormat("ã‚·ã‚¹ãƒ†ãƒ ã‚¨ãƒ©ãƒ¼ï¼š{0}ï¼š{1}", CommonMotions.GetMethodName(), ex.Message);
+                return false;
+            }
+        }
+        #endregion
+
+
+        #region å·¥äº‹æƒ…å ±æ˜Žç´°å¯¾è±¡éƒ¨ç½²å��å¤‰æ›´
+        /// <summary>
+        /// å·¥äº‹æƒ…å ±æ˜Žç´°å¯¾è±¡éƒ¨ç½²å��å¤‰æ›´
+        /// </summary>
+        /// <returns></returns>
+        private bool ChgDepNameBaseInfoDetail(IOConstructionBaseInfoDetail DetailDB
+                                                    , ArrayList arList
+                                                    , int DepCode
+                                                    , string strAfterDepName)
+        {
+            try
+            {
+                StringBuilder strUpdateSQL = new StringBuilder();
+                strUpdateSQL.Append(" Update constructionbaseinfodetail SET");
+                StringBuilder strSQL = new StringBuilder();
+
+                // å·¥äº‹æƒ…å ±æ˜Žç´°å¯¾è±¡éƒ¨ç½²å��å¤‰æ›´
+                foreach (object[] objRec in arList)
+                {
+                    int nConstrCode = CommonMotions.cnvInt(objRec[(int)GetChgDepData.ConstronCode]);
+
+                    strSQL.Clear();
+                    if (CommonMotions.cnvInt(objRec[(int)GetChgDepData.SalesDepCode]) == DepCode)
+                    {
+                        strSQL.Append(strUpdateSQL.ToString());
+                        strSQL.AppendFormat(" DetailString = '{0}'", strAfterDepName);
+                        strSQL.AppendFormat(", UpdateDate = NOW()");
+                        strSQL.AppendFormat(" WHERE ConstructionCode = {0}", nConstrCode);
+                        strSQL.AppendFormat(" And DetailNo = {0};", (int)ConstructionBaseInfoDetail.DataNoDef.SalesDepartmentName);
+                    }
+                    if (CommonMotions.cnvInt(objRec[(int)GetChgDepData.ConstrDepCode]) == DepCode)
+                    {
+                        strSQL.Append(strUpdateSQL.ToString());
+                        strSQL.AppendFormat(" DetailString = '{0}'", strAfterDepName);
+                        strSQL.AppendFormat(", UpdateDate = NOW()");
+                        strSQL.AppendFormat(" WHERE ConstructionCode = {0}", nConstrCode);
+                        strSQL.AppendFormat(" And DetailNo = {0};", (int)ConstructionBaseInfoDetail.DataNoDef.ConstrDepartmentName);
+                    }
+                    if (CommonMotions.cnvInt(objRec[(int)GetChgDepData.ConstrSubDepCode]) == DepCode)
+                    {
+                        strSQL.Append(strUpdateSQL.ToString());
+                        strSQL.AppendFormat(" DetailString = '{0}'", strAfterDepName);
+                        strSQL.AppendFormat(", UpdateDate = NOW()");
+                        strSQL.AppendFormat(" WHERE ConstructionCode = {0}", nConstrCode);
+                        strSQL.AppendFormat(" And DetailNo = {0};", (int)ConstructionBaseInfoDetail.DataNoDef.ConstrSubDepartmentName);
+                    }
+                    if (CommonMotions.cnvInt(objRec[(int)GetChgDepData.ConstrInstrDepCode]) == DepCode)
+                    {
+                        strSQL.Append(strUpdateSQL.ToString());
+                        strSQL.AppendFormat(" DetailString = '{0}'", strAfterDepName);
+                        strSQL.AppendFormat(", UpdateDate = NOW()");
+                        strSQL.AppendFormat(" WHERE ConstructionCode = {0}", nConstrCode);
+                        strSQL.AppendFormat(" And DetailNo = {0};", (int)ConstructionBaseInfoDetail.DataNoDef.InstrDepartmentName);
+                    }
+
+                    if (!DetailDB.ExecuteNonQuery(strSQL.ToString(), false)) return false;
+                }
+
+                return true;
+            }
+            catch (System.Exception ex)
+            {
+                logger.ErrorFormat("ã‚·ã‚¹ãƒ†ãƒ ã‚¨ãƒ©ãƒ¼ï¼š{0}ï¼š{1}", CommonMotions.GetMethodName(), ex.Message);
+                return false;
+            }
+        }
+        #endregion
+
+        #region ã‚°ãƒªãƒƒãƒ‰ãƒ‡ãƒ¼ã‚¿è¡¨ç¤º
+        /// <summary>
+        /// ã‚°ãƒªãƒƒãƒ‰ãƒ‡ãƒ¼ã‚¿è¡¨ç¤º
+        /// </summary>
+        private bool DispDepartmentGridData()
+        {
+            IOMDepartment dmDB = new IOMDepartment();
+            try
+            {
+                // ã‚°ãƒªãƒƒãƒ‰ã�®è¡Œã‚’0ã�«æˆ»ã�™
+                dgvWorkList.Rows.Clear();
+
+                // SQLä½œæˆ�
+                string strSQL = " Where DeleteFlg = 0 Order By DisplayOrder ASC";
+                List<DepartmentMaster> dmList = new List<DepartmentMaster>();
+                // éƒ¨ç½²å�–å¾—
+                if (!dmDB.SelectAction(strSQL, ref dmList)) return false;
+
+                // ãƒ‡ãƒ¼ã‚¿è¡¨ç¤º
+                int icnt = 0;
+                foreach (DepartmentMaster work in dmList)
+                {
+                    dgvWorkList.Rows.Add(work.DisplayOrder
+                                        , work.DepartmentCode
+                                        , work.DepartmentString.ToString());
+                    dgvWorkList.Rows[icnt++].Cells[(int)GridColumn.DepartmentString].ToolTipText = work.DepartmentString.ToString();
+
+                }
+
+                // è¡¨ç¤ºè¡Œã�Œè¶³ã‚Šã�ªã�„å ´å�ˆã�¯è¿½åŠ ã�™ã‚‹
+                if (dgvWorkList.Rows.Count <= CommonDefine.s_MaxInitLineCountMastamente)
+                {
+                    int iAddLine = CommonDefine.s_MaxInitLineCountMastamente - dgvWorkList.Rows.Count;
+                    for (int i = 0; i < iAddLine; i++)
+                    {
+                        dgvWorkList.Rows.Add();
+                    }
+                }
+
+                dgvWorkList.Rows.Add();
+
+                // èª­è¾¼æ™‚ãƒ‡ãƒ¼ã‚¿ã‚«ã‚¦ãƒ³ãƒˆå�–å¾—
+                m_initDataCount = dmList.Count;
+
+                return true;
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("ã‚·ã‚¹ãƒ†ãƒ ã‚¨ãƒ©ãƒ¼ï¼š{0}ï¼š{1}", CommonMotions.GetMethodName(), ex.Message);
+                return false;
+            }
+            finally
+            {
+                dmDB.close();
+                dmDB = null;
+            }
+        }
+        #endregion
+
+        #region çµŒè²»çŽ‡è¡¨ç¤º
+        /// <summary>
+        /// çµŒè²»çŽ‡è¡¨ç¤º
+        /// </summary>
+        private void DispExpExpenses()
+        {
+            IOMDepartmentExpenses expDB = new IOMDepartmentExpenses();
+            try
+            {
+                dgvExpenses.Rows.Clear();
+
+                int preiod = CommonMotions.cnvInt(numUDPeriod.Value);
+                // éƒ¨ç½²çµŒè²»çŽ‡ãƒžã‚¹ã‚¿å�–å¾—
+                string strSQL = "SELECT A.DIVISIONCODE, A.NAMECODE, A.NAMESTRING,A.DISPLAYORDER, IFNULL(B.EXPENSESRAITO, 0)";
+                strSQL += " FROM DIVISIONMASTER A LEFT OUTER JOIN";
+                strSQL += " (SELECT NAMECODE, DEPARTMENTCODE, EXPENSESRAITO, EXPENSESPERIOD FROM DEPARTMENTEXPENSESMASTER";
+                strSQL += string.Format(" WHERE DEPARTMENTCODE = {0}) B", m_DepartmentCode);
+                strSQL += " ON A.NAMECODE = B.NAMECODE";
+                strSQL += string.Format(" AND B.EXPENSESPERIOD = {0}", CommonMotions.cnvInt(numUDPeriod.Value));
+                strSQL += string.Format(" WHERE A.DIVISIONCODE = {0}", (int)DivisionMaster.DivisionMasterCodeDefine.ConstructionExpenses);
+                strSQL += " ORDER BY A.DISPLAYORDER";
+                ArrayList arData = new ArrayList();
+                expDB.ExecuteReader(strSQL, ref arData);
+
+                // ãƒ‡ãƒ¼ã‚¿è¡¨ç¤º
+                foreach (object[] objwrk in arData)
+                {
+                    // ãƒ‡ãƒ¼ã‚¿è¡¨ç¤º
+                    int icnt = dgvExpenses.Rows.Add(CommonMotions.cnvInt(objwrk[1]),                // çµŒè²»çŽ‡ã‚³ãƒ¼ãƒ‰
+                                            CommonMotions.cnvString(objwrk[2]),                     // çµŒè²»çŽ‡å��ç§°
+                                            CommonMotions.cnvDouble(objwrk[4]).ToString("0.00"));   // çµŒè²»çŽ‡
+                    dgvExpenses.Rows[icnt].Cells[(int)ExpGridColumn.Ratio].ReadOnly = false;
+                }
+                int RowCnt = 4 - dgvExpenses.RowCount;
+                if (RowCnt > 0)
+                {
+                    dgvExpenses.Rows.Add(RowCnt);
+                    //dgvExpenses.Columns[(int)ExpGridColumn.ExpensesName].Width = s_CellSize[(int)ExpGridColumn.ExpensesName] + dgvExpenses.RowHeadersWidth;
+                }
+
+                m_bChengeAns = false;
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("ã‚·ã‚¹ãƒ†ãƒ ã‚¨ãƒ©ãƒ¼ï¼š{0}ï¼š{1}", CommonMotions.GetMethodName(), ex.Message);
+            }
+            finally
+            {
+                expDB.close(); expDB = null;
+            }
+        }
+        #endregion
+
+        #region ãƒ‡ãƒ¼ã‚¿è¡¨ç¤º
+        /// <summary>
+        /// ãƒ‡ãƒ¼ã‚¿å�–å¾—
+        /// </summary>
+        private void DispMentenanceData()
+        {
+            IOMDepartment dmDB = new IOMDepartment();
+            try
+            {
+
+                // çµŒè²»çŽ‡ã‚’è¡¨ç¤ºã�™ã‚‹
+                DispExpExpenses();
+                // ã‚³ãƒ³ãƒœãƒœãƒƒã‚¯ã‚¹ã�®åˆ�æœŸå€¤
+                cmbActionScheduleDsp.SelectedValue = 0;
+
+                // æ–°è¦�æ™‚ã�¯ä»¥ä¸‹è¡¨ç¤ºã�—ã�ªã�„
+                if (m_DepartmentCode == 0) return;
+
+                // éƒ¨ç½²å�–å¾—
+                string strSQL = dmDB.CreatePrimarykeyString(m_DepartmentCode);
+                List<DepartmentMaster> dmList = new List<DepartmentMaster>();
+                if (!dmDB.SelectAction(strSQL, ref dmList)) return;
+                m_dispControl[(int)DispControl.DepartmentCode].Text = dmList[0].DepartmentCode.ToString();
+                m_dispControl[(int)DispControl.DepartmentString].Text = dmList[0].DepartmentString;
+                ((ComboBox)m_dispControl[(int)DispControl.ActionSchdule]).SelectedValue = dmList[0].ActionScheduleFlg;
+                ((ComboBox)m_dispControl[(int)DispControl.StaffAssign]).SelectedValue = dmList[0].StaffAssignFlg;
+
+                if (m_EditLock)
+                    m_dispControl[(int)DispControl.EditMode].Text = CommonDefine.EditModeStringRef;                     // â€�å�‚ç…§â€�
+                else
+                    m_dispControl[(int)DispControl.EditMode].Text = CommonDefine.EditModeStringEdit;                    // â€�ä¿®æ­£â€�
+
+                m_bChengeAns = false;
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("ã‚·ã‚¹ãƒ†ãƒ ã‚¨ãƒ©ãƒ¼ï¼š{0}ï¼š{1}", CommonMotions.GetMethodName(), ex.Message);
+            }
+            finally
+            {
+                dmDB.close(); dmDB = null;
+            }
+        }
+        #endregion
+
+        #region è¡Œå‹•äºˆå®šè¡¨ç¤ºã‚³ãƒ³ãƒœãƒœãƒƒã‚¯ã‚¹ã‚»ãƒƒãƒˆ
+        /// <summary>
+        /// è¡Œå‹•äºˆå®šè¡¨ç¤ºã‚³ãƒ³ãƒœãƒœãƒƒã‚¯ã‚¹ã‚»ãƒƒãƒˆ
+        /// </summary>
+        private void InitActionScheduleDspCombBox()
+        {
+            try
+            {
+                List<KeyValuePair<int, string>> DataList = new List<KeyValuePair<int, string>>();
+                // ãƒ‡ãƒ¼ã‚¿è¡¨ç¤º
+                for (int i = 0; i < cmbDspString.Length; i++)
+                {
+                    KeyValuePair<int, string> keyval = new KeyValuePair<int, string>(i, cmbDspString[i]);
+
+                    DataList.Add(keyval);
+                }
+                // ã‚³ãƒ³ãƒœãƒœãƒƒã‚¯ã‚¹åˆ�æœŸè¡¨ç¤º
+                ComboBoxAction.InitDataSetCombBox(cmbActionScheduleDsp, DataList);
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("ã‚·ã‚¹ãƒ†ãƒ ã‚¨ãƒ©ãƒ¼ï¼š{0}ï¼š{1}", CommonMotions.GetMethodName(), ex.Message);
+            }
+        }
+        #endregion
+
+        #region äººå“¡é…�ç½®è¡¨ç¤ºã‚³ãƒ³ãƒœãƒœãƒƒã‚¯ã‚¹ã‚»ãƒƒãƒˆ
+        /// <summary>
+        /// äººå“¡é…�ç½®è¡¨ç¤ºã‚³ãƒ³ãƒœãƒœãƒƒã‚¯ã‚¹ã‚»ãƒƒãƒˆ
+        /// </summary>
+        private void InitStaffAssignDspCombBox()
+        {
+            try
+            {
+                List<KeyValuePair<int, string>> DataList = new List<KeyValuePair<int, string>>();
+                // ãƒ‡ãƒ¼ã‚¿è¡¨ç¤º
+                for (int i = 0; i < cmbDspString.Length; i++)
+                {
+                    KeyValuePair<int, string> keyval = new KeyValuePair<int, string>(i, cmbDspString[i]);
+
+                    DataList.Add(keyval);
+                }
+                // ã‚³ãƒ³ãƒœãƒœãƒƒã‚¯ã‚¹åˆ�æœŸè¡¨ç¤º
+                ComboBoxAction.InitDataSetCombBox(cmbStaStaffAssignDsp, DataList);
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("ã‚·ã‚¹ãƒ†ãƒ ã‚¨ãƒ©ãƒ¼ï¼š{0}ï¼š{1}", CommonMotions.GetMethodName(), ex.Message);
+            }
+        }
+        #endregion
+
+        #region ã‚°ãƒªãƒƒãƒ‰ã�®æœ‰åŠ¹è¡Œã‚’ã‚«ã‚¦ãƒ³ãƒˆã�™ã‚‹
+        /// <summary>
+        /// ã‚°ãƒªãƒƒãƒ‰ã�®æœ‰åŠ¹è¡Œã‚’ã‚«ã‚¦ãƒ³ãƒˆã�™ã‚‹
+        /// </summary>
+        /// <returns></returns>
+        private int GetGridLineEffectivenessCount()
+        {
+            try
+            {
+                int linecount = 0;
+                foreach (DataGridViewRow wrkRow in dgvWorkList.Rows)
+                {
+                    if (CommonMotions.chkCellBlank(wrkRow.Cells[(int)GridColumn.DepartmentString].Value)) continue;
+
+                    linecount++;
+                }
+                return linecount;
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("ã‚·ã‚¹ãƒ†ãƒ ã‚¨ãƒ©ãƒ¼ï¼š{0}ï¼š{1}", CommonMotions.GetMethodName(), ex.Message);
+                return 0;
+            }
+        }
+        #endregion
+
+        #region å¯¾è±¡æœŸæ•°ã‚³ãƒ³ãƒœãƒœãƒƒã‚¯ã‚¹åˆ�æœŸè¡¨ç¤ºå‡¦ç�†
+        /// <summary>
+        /// å¯¾è±¡æœŸæ•°ã‚³ãƒ³ãƒœãƒœãƒƒã‚¯ã‚¹åˆ�æœŸè¡¨ç¤ºå‡¦ç�†
+        /// </summary>
+        private void SetnumUDPeriod()
+        {
+            // ãƒ•ãƒ©ã‚°åˆ�æœŸåŒ–
+            m_bInitDataFlg = true;
+            try
+            {
+
+                // æ¤œç´¢å¹´åº¦ã‚»ãƒƒãƒˆ
+                // ãƒ‡ãƒ¼ã‚¿ã�«ã�‚ã‚‹äº‹æ¥­æœŸã�¨ç�¾åœ¨ã�®äº‹æ¥­ã‚»ãƒƒãƒˆ
+                int minval = 0;
+                int maxval = 0;
+                CommonMotions.GetPeriodYear(ref minval, ref maxval);
+                numUDPeriod.Minimum = minval;
+                numUDPeriod.Maximum = CommonMotions.SystemMasterData.BusinessPeriod + 1;
+                numUDPeriod.Value = CommonMotions.SystemMasterData.BusinessPeriod;
+                numUDPeriod.Text = CommonMotions.SystemMasterData.BusinessPeriod.ToString();
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("ã‚·ã‚¹ãƒ†ãƒ ã‚¨ãƒ©ãƒ¼ï¼š{0}ï¼š{1}", CommonMotions.GetMethodName(), ex.Message);
+            }
+            finally
+            {
+                m_bInitDataFlg = false;
+            }
+        }
+        #endregion
+
+        #region å�‚ç…§æ™‚ãƒ­ãƒƒã‚¯å‡¦ç�†
+        /// <summary>
+        /// å�‚ç…§æ™‚ãƒ­ãƒƒã‚¯å‡¦ç�†
+        /// </summary>
+        private void ExecReadOnly()
+        {
+            try
+            {
+                ControlLock(false);
+                btnDataEntry.Visible = false;
+                btnDataDelete.Visible = false;
+                btnDataLineEntry.Visible = false;
+                btnDispDown.Visible = false;
+                btnDispUp.Visible = false;
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("ã‚·ã‚¹ãƒ†ãƒ ã‚¨ãƒ©ãƒ¼ï¼š{0}ï¼š{1}", CommonMotions.GetMethodName(), ex.Message);
+            }
+        }
+        #endregion
+    }
+}
Index: branches/src/ProcessManagement/ProcessManagement/Forms/Master/PersonInCharge/FrmPersonInCharge.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/Master/PersonInCharge/FrmPersonInCharge.cs	(revision 329)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/Master/PersonInCharge/FrmPersonInCharge.cs	(revision 330)
@@ -88,6 +88,18 @@
         }
         #endregion
 
+        #region é…�å±žã‚°ãƒªãƒƒãƒ‰è¡¨ç¤ºé †
+        /// <summary>
+        /// é…�å±žã‚°ãƒªãƒƒãƒ‰è¡¨ç¤ºé †
+        /// </summary>
+        private enum AssignGridColumn
+        {
+            StartData = 0,
+            DepName,
+            DepCode,
+        }
+        #endregion
+
         #region å�‚ç…§éƒ¨ç½²ã‚°ãƒªãƒƒãƒ‰è¡¨ç¤ºé †
         /// <summary>
         /// å�‚ç…§éƒ¨ç½²ã‚°ãƒªãƒƒãƒ‰è¡¨ç¤ºé †
@@ -126,6 +138,7 @@
             SecurityManegement,
             CommutingDistance,
             CommuteCosts,
+            AssignStDate,
         }
         #endregion
 
@@ -145,6 +158,10 @@
         /// å�‚ç…§éƒ¨ç½²ã‚°ãƒªãƒƒãƒ‰å›ºå®šè¡Œ
         /// </summary>
         const int s_FixRowsRefDepGrid = 5;
+        /// <summary>
+        /// é…�å±žéƒ¨ç½²ã‚°ãƒªãƒƒãƒ‰å›ºå®šè¡Œ
+        /// </summary>
+        const int s_FixRowsRefAssGrid = 4;
         #endregion
         #endregion
 
@@ -359,7 +376,7 @@
                         , MessageBoxButtons.YesNo, MessageBoxIcon.Question) != DialogResult.Yes) return;
 
                 // ãƒ‡ãƒ¼ã‚¿ç™»éŒ²
-                if (!PersonInChargeMasterDataEntry()) return;
+                if (!DataEntry()) return;
 
                 CommonMotions.EntryEndMessage("æ‹…å½“è€…æƒ…å ±ãƒ‡ãƒ¼ã‚¿");
 
@@ -398,54 +415,16 @@
         /// <param name="e"></param>
         private void btnDataDelete_Click(object sender, EventArgs e)
         {
-            IOMPersonInCharge picDB = new IOMPersonInCharge();
             try
             {
                 if (MessageBox.Show("è¡¨ç¤ºä¸­ã�®ãƒ‡ãƒ¼ã‚¿ã‚’å‰Šé™¤ã�—ã�¾ã�™ã€‚", "å‰Šé™¤ç¢ºèª�"
                     , MessageBoxButtons.YesNo, MessageBoxIcon.Information) != DialogResult.Yes) return;
 
-                picDB.connect(); picDB.beginTran();
+                // ãƒ‡ãƒ¼ã‚¿å‰Šé™¤å‡¦ç�†
+                if (!RemoveData()) return;
 
-                PersonInChargeMaster workList = new PersonInChargeMaster();
-                // ãƒ‡ãƒ¼ã‚¿å­˜åœ¨ç¢ºèª�
-                int PersonCode = CommonMotions.cnvInt(m_dispControl[(int)DispCtrl.PersonCode].Text);
-                string strWhere = string.Format(" Where PersonCode = {0}", PersonCode);
-                // ãƒ‡ãƒ¼ã‚¿èª­è¾¼
-                if (!picDB.SelectAction(strWhere, ref workList, false))
-                {
-                    MessageBox.Show("å‰Šé™¤ç¢ºèª�ã�«å¤±æ•—ã�—ã�¾ã�—ã�Ÿã€‚", "å‰Šé™¤ã‚¨ãƒ©ãƒ¼", MessageBoxButtons.OK, MessageBoxIcon.Error);
-                    return;
-                }
-
-                // çµ‚äº†å¹´æœˆæ—¥
-                if (!picDB.UpdateFeild(PersonCode, (int)IOMPersonInCharge.ColumnCnt.EndDate, DateTime.Now, false))
-                {
-                    picDB.rollback();
-                    MessageBox.Show("å‰Šé™¤ã�«å¤±æ•—ã�—ã�¾ã�—ã�Ÿã€‚", "å‰Šé™¤ã‚¨ãƒ©ãƒ¼", MessageBoxButtons.OK, MessageBoxIcon.Error);
-                    return;
-                }
-                // å‰Šé™¤ãƒ•ãƒ©ã‚°
-                if (!picDB.UpdateFeild(PersonCode, (int)IOMPersonInCharge.ColumnCnt.DeleteFlg, 1, false))
-                {
-                    picDB.rollback();
-                    MessageBox.Show("å‰Šé™¤ã�«å¤±æ•—ã�—ã�¾ã�—ã�Ÿã€‚", "å‰Šé™¤ã‚¨ãƒ©ãƒ¼", MessageBoxButtons.OK, MessageBoxIcon.Error);
-                    return;
-                }
-                picDB.commit();
-
                 CommonMotions.RemoveEndMessage("æ‹…å½“è€…æƒ…å ±ãƒ‡ãƒ¼ã‚¿");
 
-                //// çµ‚äº†å¹´æœˆæ—¥
-                //workList[0].EndDate = DateTime.Now;
-                //// å‰Šé™¤ãƒ•ãƒ©ã‚°
-                //workList[0].DeleteFlg = 1;
-                //// ãƒ‡ãƒ¼ã‚¿æ›´æ–°
-                //if (!picDB.UpdateAction(strWhere, workList[0]))
-                //{
-                //    MessageBox.Show("å‰Šé™¤ã�«å¤±æ•—ã�—ã�¾ã�—ã�Ÿã€‚", "å‰Šé™¤ã‚¨ãƒ©ãƒ¼", MessageBoxButtons.OK, MessageBoxIcon.Error);
-                //    return;
-                //}
-
                 // æ›´æ–°ã‚¨ãƒªã‚¢ã‚¯ãƒªã‚¢
                 ClearDisplay();
 
@@ -470,11 +449,6 @@
             {
                 logger.ErrorFormat("ã‚·ã‚¹ãƒ†ãƒ ã‚¨ãƒ©ãƒ¼ï¼š{0}ï¼š{1}", CommonMotions.GetMethodName(), ex.Message);
             }
-            finally
-            {
-                picDB.close();
-                picDB = null;
-            }
         }
         #endregion
 
@@ -691,15 +665,24 @@
         /// <param name="e"></param>
         private void btnSalaryDelete_Click(object sender, EventArgs e)
         {
-            DataGridView dgv = dgvSalary;
-            int rowCnt = dgv.CurrentRow.Index;
+            try
+            {
+                DataGridView dgv = dgvSalary;
+                DataGridViewRow CurRow = dgv.CurrentRow;
+                int rowCnt = dgv.CurrentRow.Index;
 
-            // ãƒ‡ãƒ¼ã‚¿ç„¡è¡Œã�¯å‡¦ç�†ã�—ã�ªã�„
-            string sStartDate = CommonMotions.cnvDate(dgv.Rows[rowCnt].Cells[(int)SalaryGridColumn.StartData].Value).ToShortDateString();
-            if (sStartDate.Length == 0) return;
+                // ãƒ‡ãƒ¼ã‚¿ç„¡è¡Œã�¯å‡¦ç�†ã�—ã�ªã�„
+                DataGridViewCell CurCell = CurRow.Cells[(int)SalaryGridColumn.StartData];
+                string sStartDate = CommonMotions.cnvDate(CurCell.Value).ToShortDateString();
+                if (sStartDate.Length == 0) return;
 
-            // çµ¦ä¸Žã‚°ãƒªãƒƒãƒ‰å‰Šé™¤
-            SalaryGridDataRemove(rowCnt);
+                // çµ¦ä¸Žã‚°ãƒªãƒƒãƒ‰å‰Šé™¤
+                SalaryGridDataRemove(rowCnt);
+            }
+            catch (System.Exception ex)
+            {
+                logger.ErrorFormat("ã‚·ã‚¹ãƒ†ãƒ ã‚¨ãƒ©ãƒ¼ï¼š{0}ï¼š{1}", CommonMotions.GetMethodName(), ex.Message);
+            }
         }
         #endregion
 
@@ -736,6 +719,48 @@
         }
         #endregion
 
+        #region é…�å±žè¿½åŠ ãƒœã‚¿ãƒ³
+        /// <summary>
+        /// é…�å±žè¿½åŠ ãƒœã‚¿ãƒ³
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        private void BtnDepartMentAdd_Click(object sender, EventArgs e)
+        {
+            // é…�å±žã‚°ãƒªãƒƒãƒ‰è¿½åŠ 
+            AssignGridDataAdd();
+        }
+        #endregion
+
+        #region é…�å±žå‰Šé™¤ãƒœã‚¿ãƒ³
+        /// <summary>
+        /// é…�å±žå‰Šé™¤ãƒœã‚¿ãƒ³
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        private void BtnDepartMentDel_Click(object sender, EventArgs e)
+        {
+            try
+            {
+                DataGridView dgv = dgvAssignment;
+                DataGridViewRow CurRow = dgv.CurrentRow;
+                int rowCnt = dgv.CurrentRow.Index;
+
+                // ãƒ‡ãƒ¼ã‚¿ç„¡è¡Œã�¯å‡¦ç�†ã�—ã�ªã�„
+                DataGridViewCell CurCell = CurRow.Cells[(int)SalaryGridColumn.StartData];
+                string sStartDate = CommonMotions.cnvDate(CurCell.Value).ToShortDateString();
+                if (sStartDate.Length == 0) return;
+
+                // é…�å±žã‚°ãƒªãƒƒãƒ‰å‰Šé™¤
+                AssignGridDataRemove(rowCnt);
+            }
+            catch (System.Exception ex)
+            {
+                logger.ErrorFormat("ã‚·ã‚¹ãƒ†ãƒ ã‚¨ãƒ©ãƒ¼ï¼š{0}ï¼š{1}", CommonMotions.GetMethodName(), ex.Message);
+            }
+        }
+        #endregion
+
         #region ç¤¾å“¡ã‚ˆã‚Šå¸¸ç”¨è€…
         /// <summary>
         /// ç¤¾å“¡ã‚ˆã‚Šå¸¸ç”¨è€…
Index: branches/src/ProcessManagement/ProcessManagement/Forms/Master/PersonInCharge/FrmPersonInCharge.designer.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/Master/PersonInCharge/FrmPersonInCharge.designer.cs	(revision 329)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/Master/PersonInCharge/FrmPersonInCharge.designer.cs	(revision 330)
@@ -40,6 +40,10 @@
             System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle8 = new System.Windows.Forms.DataGridViewCellStyle();
             System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle9 = new System.Windows.Forms.DataGridViewCellStyle();
             System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle10 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle11 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle12 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle13 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle14 = new System.Windows.Forms.DataGridViewCellStyle();
             this.btnDataEntry = new System.Windows.Forms.Button();
             this.btnEnd = new System.Windows.Forms.Button();
             this.label1 = new System.Windows.Forms.Label();
@@ -61,10 +65,6 @@
             this.txtInput3 = new ProcessManagement.Forms.CustomControls.TextBoxEX();
             this.txtInput4 = new System.Windows.Forms.TextBox();
             this.label2 = new System.Windows.Forms.Label();
-            this.dgvSalary = new ProcessManagement.Forms.CustomControls.DataGridViewEX();
-            this.SalaryColumn1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.SalaryColumn2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.SalaryColumn3 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.label7 = new System.Windows.Forms.Label();
             this.txtInput6 = new System.Windows.Forms.TextBox();
             this.label10 = new System.Windows.Forms.Label();
@@ -92,16 +92,28 @@
             this.label21 = new System.Windows.Forms.Label();
             this.txtInput11 = new System.Windows.Forms.TextBox();
             this.label22 = new System.Windows.Forms.Label();
-            this.cmbRefDepartment = new ProcessManagement.Forms.CustomControls.ComboBoxEX();
-            this.btnRefDepAdd = new System.Windows.Forms.Button();
-            this.btnRefDepDel = new System.Windows.Forms.Button();
-            this.dgvRefDepartment = new ProcessManagement.Forms.CustomControls.DataGridViewEX();
-            this.Column8 = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.TextBoxColumn1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.label12 = new System.Windows.Forms.Label();
             this.label15 = new System.Windows.Forms.Label();
             this.txtInput12 = new System.Windows.Forms.TextBox();
             this.label23 = new System.Windows.Forms.Label();
+            this.dgvSalary = new ProcessManagement.Forms.CustomControls.DataGridViewEX();
+            this.SalaryColumn1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.SalaryColumn2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.SalaryColumn3 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.dgvRefDepartment = new ProcessManagement.Forms.CustomControls.DataGridViewEX();
+            this.Column8 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.TextBoxColumn1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.cmbRefDepartment = new ProcessManagement.Forms.CustomControls.ComboBoxEX();
+            this.btnRefDepDel = new System.Windows.Forms.Button();
+            this.btnRefDepAdd = new System.Windows.Forms.Button();
+            this.dgvAssignment = new ProcessManagement.Forms.CustomControls.DataGridViewEX();
+            this.dataGridViewTextBoxColumn1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.dataGridViewTextBoxColumn2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.dataGridViewTextBoxColumn3 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.BtnDepartMentAdd = new System.Windows.Forms.Button();
+            this.BtnDepartMentDel = new System.Windows.Forms.Button();
+            this.txtInput13 = new System.Windows.Forms.TextBox();
+            this.label24 = new System.Windows.Forms.Label();
             this.lblSecurtyManegement = new System.Windows.Forms.Label();
             this.rdbMode2 = new System.Windows.Forms.RadioButton();
             this.rdbMode1 = new System.Windows.Forms.RadioButton();
@@ -123,6 +135,7 @@
             this.tableLayoutPanel1.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)(this.dgvSalary)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.dgvRefDepartment)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.dgvAssignment)).BeginInit();
             this.panel2.SuspendLayout();
             this.panel3.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)(this.dgvMaster)).BeginInit();
@@ -267,7 +280,6 @@
             this.tableLayoutPanel1.Controls.Add(this.txtInput3, 1, 3);
             this.tableLayoutPanel1.Controls.Add(this.txtInput4, 1, 4);
             this.tableLayoutPanel1.Controls.Add(this.label2, 0, 4);
-            this.tableLayoutPanel1.Controls.Add(this.dgvSalary, 0, 7);
             this.tableLayoutPanel1.Controls.Add(this.label7, 0, 5);
             this.tableLayoutPanel1.Controls.Add(this.txtInput6, 1, 5);
             this.tableLayoutPanel1.Controls.Add(this.label10, 2, 5);
@@ -277,35 +289,41 @@
             this.tableLayoutPanel1.Controls.Add(this.btnSalaryAdd, 2, 6);
             this.tableLayoutPanel1.Controls.Add(this.btnSalaryDel, 3, 6);
             this.tableLayoutPanel1.Controls.Add(this.label6, 0, 10);
-            this.tableLayoutPanel1.Controls.Add(this.label5, 0, 11);
-            this.tableLayoutPanel1.Controls.Add(this.label13, 0, 12);
-            this.tableLayoutPanel1.Controls.Add(this.label14, 0, 13);
-            this.tableLayoutPanel1.Controls.Add(this.label16, 0, 14);
+            this.tableLayoutPanel1.Controls.Add(this.label5, 0, 15);
+            this.tableLayoutPanel1.Controls.Add(this.label13, 0, 16);
+            this.tableLayoutPanel1.Controls.Add(this.label14, 0, 17);
+            this.tableLayoutPanel1.Controls.Add(this.label16, 0, 18);
             this.tableLayoutPanel1.Controls.Add(this.cmbDepartment, 1, 10);
-            this.tableLayoutPanel1.Controls.Add(this.txtInput5, 1, 11);
-            this.tableLayoutPanel1.Controls.Add(this.txtInput8, 1, 12);
-            this.tableLayoutPanel1.Controls.Add(this.txtInput9, 1, 13);
-            this.tableLayoutPanel1.Controls.Add(this.cmbLedgerFlg, 1, 14);
-            this.tableLayoutPanel1.Controls.Add(this.label17, 0, 15);
-            this.tableLayoutPanel1.Controls.Add(this.cmbSecManage, 1, 15);
-            this.tableLayoutPanel1.Controls.Add(this.label18, 0, 16);
-            this.tableLayoutPanel1.Controls.Add(this.lblSecRank, 1, 16);
-            this.tableLayoutPanel1.Controls.Add(this.lblSecRange, 1, 17);
-            this.tableLayoutPanel1.Controls.Add(this.label4, 0, 17);
-            this.tableLayoutPanel1.Controls.Add(this.label21, 0, 18);
-            this.tableLayoutPanel1.Controls.Add(this.txtInput11, 1, 18);
-            this.tableLayoutPanel1.Controls.Add(this.label22, 2, 18);
-            this.tableLayoutPanel1.Controls.Add(this.cmbRefDepartment, 0, 24);
-            this.tableLayoutPanel1.Controls.Add(this.btnRefDepAdd, 2, 24);
-            this.tableLayoutPanel1.Controls.Add(this.btnRefDepDel, 3, 24);
-            this.tableLayoutPanel1.Controls.Add(this.dgvRefDepartment, 0, 21);
-            this.tableLayoutPanel1.Controls.Add(this.label12, 0, 20);
-            this.tableLayoutPanel1.Controls.Add(this.label15, 0, 19);
-            this.tableLayoutPanel1.Controls.Add(this.txtInput12, 1, 19);
-            this.tableLayoutPanel1.Controls.Add(this.label23, 2, 19);
+            this.tableLayoutPanel1.Controls.Add(this.txtInput5, 1, 15);
+            this.tableLayoutPanel1.Controls.Add(this.txtInput8, 1, 16);
+            this.tableLayoutPanel1.Controls.Add(this.txtInput9, 1, 17);
+            this.tableLayoutPanel1.Controls.Add(this.cmbLedgerFlg, 1, 18);
+            this.tableLayoutPanel1.Controls.Add(this.label17, 0, 19);
+            this.tableLayoutPanel1.Controls.Add(this.cmbSecManage, 1, 19);
+            this.tableLayoutPanel1.Controls.Add(this.label18, 0, 20);
+            this.tableLayoutPanel1.Controls.Add(this.lblSecRank, 1, 20);
+            this.tableLayoutPanel1.Controls.Add(this.lblSecRange, 1, 21);
+            this.tableLayoutPanel1.Controls.Add(this.label4, 0, 21);
+            this.tableLayoutPanel1.Controls.Add(this.label21, 0, 22);
+            this.tableLayoutPanel1.Controls.Add(this.txtInput11, 1, 22);
+            this.tableLayoutPanel1.Controls.Add(this.label22, 2, 22);
+            this.tableLayoutPanel1.Controls.Add(this.label12, 0, 24);
+            this.tableLayoutPanel1.Controls.Add(this.label15, 0, 23);
+            this.tableLayoutPanel1.Controls.Add(this.txtInput12, 1, 23);
+            this.tableLayoutPanel1.Controls.Add(this.label23, 2, 23);
+            this.tableLayoutPanel1.Controls.Add(this.dgvSalary, 1, 7);
+            this.tableLayoutPanel1.Controls.Add(this.dgvRefDepartment, 1, 24);
+            this.tableLayoutPanel1.Controls.Add(this.cmbRefDepartment, 1, 27);
+            this.tableLayoutPanel1.Controls.Add(this.btnRefDepDel, 3, 28);
+            this.tableLayoutPanel1.Controls.Add(this.btnRefDepAdd, 2, 28);
+            this.tableLayoutPanel1.Controls.Add(this.dgvAssignment, 1, 12);
+            this.tableLayoutPanel1.Controls.Add(this.BtnDepartMentAdd, 2, 11);
+            this.tableLayoutPanel1.Controls.Add(this.BtnDepartMentDel, 3, 11);
+            this.tableLayoutPanel1.Controls.Add(this.txtInput13, 1, 11);
+            this.tableLayoutPanel1.Controls.Add(this.label24, 0, 11);
             this.tableLayoutPanel1.Location = new System.Drawing.Point(1, 1);
             this.tableLayoutPanel1.Name = "tableLayoutPanel1";
-            this.tableLayoutPanel1.RowCount = 25;
+            this.tableLayoutPanel1.RowCount = 29;
             this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 35F));
             this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 35F));
             this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 35F));
@@ -320,6 +338,7 @@
             this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 35F));
             this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 35F));
             this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 35F));
+            this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 40F));
             this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 35F));
             this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 35F));
             this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 35F));
@@ -328,11 +347,13 @@
             this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 35F));
             this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 35F));
             this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 35F));
+            this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 35F));
+            this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 35F));
+            this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 35F));
             this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 40F));
             this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 35F));
             this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 35F));
-            this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
-            this.tableLayoutPanel1.Size = new System.Drawing.Size(580, 887);
+            this.tableLayoutPanel1.Size = new System.Drawing.Size(580, 1030);
             this.tableLayoutPanel1.TabIndex = 1;
             // 
             // lblPersonCode
@@ -459,78 +480,6 @@
             this.label2.Text = "ãƒ‘ã‚¹ãƒ¯ãƒ¼ãƒ‰";
             this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
             // 
-            // dgvSalary
-            // 
-            this.dgvSalary.AllowUserToAddRows = false;
-            this.dgvSalary.AllowUserToDeleteRows = false;
-            this.dgvSalary.AllowUserToResizeColumns = false;
-            this.dgvSalary.AllowUserToResizeRows = false;
-            this.dgvSalary.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
-            | System.Windows.Forms.AnchorStyles.Left)));
-            this.dgvSalary.BackgroundColor = System.Drawing.Color.White;
-            this.dgvSalary.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.dgvSalary.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle1;
-            this.dgvSalary.ColumnHeadersHeight = 22;
-            this.dgvSalary.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing;
-            this.dgvSalary.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
-            this.SalaryColumn1,
-            this.SalaryColumn2,
-            this.SalaryColumn3});
-            this.tableLayoutPanel1.SetColumnSpan(this.dgvSalary, 4);
-            this.dgvSalary.EditMode = System.Windows.Forms.DataGridViewEditMode.EditOnEnter;
-            this.dgvSalary.Location = new System.Drawing.Point(3, 248);
-            this.dgvSalary.MultiSelect = false;
-            this.dgvSalary.Name = "dgvSalary";
-            this.dgvSalary.RowHeadersVisible = false;
-            this.dgvSalary.RowHeadersWidth = 18;
-            this.dgvSalary.RowHeadersWidthSizeMode = System.Windows.Forms.DataGridViewRowHeadersWidthSizeMode.DisableResizing;
-            this.tableLayoutPanel1.SetRowSpan(this.dgvSalary, 3);
-            this.dgvSalary.RowTemplate.Height = 20;
-            this.dgvSalary.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
-            this.dgvSalary.Size = new System.Drawing.Size(570, 104);
-            this.dgvSalary.TabIndex = 21;
-            this.dgvSalary.TabStop = false;
-            // 
-            // SalaryColumn1
-            // 
-            dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
-            this.SalaryColumn1.DefaultCellStyle = dataGridViewCellStyle2;
-            this.SalaryColumn1.Frozen = true;
-            this.SalaryColumn1.HeaderText = "çµ¦ä¸Žé–‹å§‹å¹´æœˆæ—¥";
-            this.SalaryColumn1.Name = "SalaryColumn1";
-            this.SalaryColumn1.ReadOnly = true;
-            this.SalaryColumn1.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
-            this.SalaryColumn1.Width = 190;
-            // 
-            // SalaryColumn2
-            // 
-            dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
-            this.SalaryColumn2.DefaultCellStyle = dataGridViewCellStyle3;
-            this.SalaryColumn2.Frozen = true;
-            this.SalaryColumn2.HeaderText = "æœˆçµ¦ä¸Žé¡�";
-            this.SalaryColumn2.Name = "SalaryColumn2";
-            this.SalaryColumn2.ReadOnly = true;
-            this.SalaryColumn2.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
-            this.SalaryColumn2.Width = 180;
-            // 
-            // SalaryColumn3
-            // 
-            dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
-            this.SalaryColumn3.DefaultCellStyle = dataGridViewCellStyle4;
-            this.SalaryColumn3.Frozen = true;
-            this.SalaryColumn3.HeaderText = "å¹´çµ¦ä¸Žé¡�";
-            this.SalaryColumn3.Name = "SalaryColumn3";
-            this.SalaryColumn3.ReadOnly = true;
-            this.SalaryColumn3.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
-            this.SalaryColumn3.Width = 180;
-            // 
             // label7
             // 
             this.label7.Anchor = System.Windows.Forms.AnchorStyles.Left;
@@ -541,7 +490,7 @@
             this.label7.Name = "label7";
             this.label7.Size = new System.Drawing.Size(139, 25);
             this.label7.TabIndex = 30;
-            this.label7.Text = "æœˆçµ¦ä¸Žé¡�(å††)";
+            this.label7.Text = "çµ¦ä¸Žæœˆé¡�(å††)";
             this.label7.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
             // 
             // txtInput6
@@ -566,7 +515,7 @@
             this.label10.Name = "label10";
             this.label10.Size = new System.Drawing.Size(139, 25);
             this.label10.TabIndex = 30;
-            this.label10.Text = "å¹´çµ¦ä¸Žé¡�(å††)";
+            this.label10.Text = "çµ¦ä¸Žå¹´é¡�(å††)";
             this.label10.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
             // 
             // txtInput7
@@ -636,7 +585,7 @@
             this.btnSalaryDel.Size = new System.Drawing.Size(139, 29);
             this.btnSalaryDel.TabIndex = 33;
             this.btnSalaryDel.TabStop = false;
-            this.btnSalaryDel.Text = "çµ¦ä¸Žå‰Šé™¤";
+            this.btnSalaryDel.Text = "çµ¦ä¸Žå±¥æ­´å‰Šé™¤";
             this.btnSalaryDel.UseVisualStyleBackColor = false;
             this.btnSalaryDel.Click += new System.EventHandler(this.btnSalaryDelete_Click);
             // 
@@ -650,7 +599,7 @@
             this.label6.Name = "label6";
             this.label6.Size = new System.Drawing.Size(139, 25);
             this.label6.TabIndex = 30;
-            this.label6.Text = "æ‰€å±žéƒ¨ç½²";
+            this.label6.Text = "ç�¾åœ¨æ‰€å±žéƒ¨ç½²";
             this.label6.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
             // 
             // label5
@@ -659,7 +608,7 @@
             this.label5.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(128)))));
             this.label5.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
             this.label5.ForeColor = System.Drawing.Color.Black;
-            this.label5.Location = new System.Drawing.Point(3, 395);
+            this.label5.Location = new System.Drawing.Point(3, 540);
             this.label5.Name = "label5";
             this.label5.Size = new System.Drawing.Size(139, 25);
             this.label5.TabIndex = 30;
@@ -672,7 +621,7 @@
             this.label13.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(128)))));
             this.label13.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
             this.label13.ForeColor = System.Drawing.Color.Black;
-            this.label13.Location = new System.Drawing.Point(3, 430);
+            this.label13.Location = new System.Drawing.Point(3, 575);
             this.label13.Name = "label13";
             this.label13.Size = new System.Drawing.Size(139, 25);
             this.label13.TabIndex = 30;
@@ -685,7 +634,7 @@
             this.label14.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(128)))));
             this.label14.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
             this.label14.ForeColor = System.Drawing.Color.Black;
-            this.label14.Location = new System.Drawing.Point(3, 465);
+            this.label14.Location = new System.Drawing.Point(3, 610);
             this.label14.Name = "label14";
             this.label14.Size = new System.Drawing.Size(139, 25);
             this.label14.TabIndex = 30;
@@ -698,7 +647,7 @@
             this.label16.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(128)))));
             this.label16.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
             this.label16.ForeColor = System.Drawing.Color.Black;
-            this.label16.Location = new System.Drawing.Point(3, 500);
+            this.label16.Location = new System.Drawing.Point(3, 645);
             this.label16.Name = "label16";
             this.label16.Size = new System.Drawing.Size(139, 25);
             this.label16.TabIndex = 30;
@@ -708,13 +657,13 @@
             // cmbDepartment
             // 
             this.cmbDepartment.Anchor = System.Windows.Forms.AnchorStyles.Left;
-            this.tableLayoutPanel1.SetColumnSpan(this.cmbDepartment, 2);
+            this.tableLayoutPanel1.SetColumnSpan(this.cmbDepartment, 3);
             this.cmbDepartment.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
             this.cmbDepartment.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
             this.cmbDepartment.FormattingEnabled = true;
             this.cmbDepartment.Location = new System.Drawing.Point(148, 362);
             this.cmbDepartment.Name = "cmbDepartment";
-            this.cmbDepartment.Size = new System.Drawing.Size(284, 24);
+            this.cmbDepartment.Size = new System.Drawing.Size(429, 24);
             this.cmbDepartment.TabIndex = 8;
             this.cmbDepartment.TextChanged += new System.EventHandler(this.valueChange);
             // 
@@ -723,11 +672,11 @@
             this.txtInput5.Anchor = System.Windows.Forms.AnchorStyles.Left;
             this.tableLayoutPanel1.SetColumnSpan(this.txtInput5, 2);
             this.txtInput5.ImeMode = System.Windows.Forms.ImeMode.On;
-            this.txtInput5.Location = new System.Drawing.Point(148, 396);
+            this.txtInput5.Location = new System.Drawing.Point(148, 541);
             this.txtInput5.MaxLength = 40;
             this.txtInput5.Name = "txtInput5";
             this.txtInput5.Size = new System.Drawing.Size(250, 23);
-            this.txtInput5.TabIndex = 9;
+            this.txtInput5.TabIndex = 10;
             this.txtInput5.TextChanged += new System.EventHandler(this.valueChange);
             // 
             // txtInput8
@@ -735,11 +684,11 @@
             this.txtInput8.Anchor = System.Windows.Forms.AnchorStyles.Left;
             this.tableLayoutPanel1.SetColumnSpan(this.txtInput8, 3);
             this.txtInput8.ImeMode = System.Windows.Forms.ImeMode.On;
-            this.txtInput8.Location = new System.Drawing.Point(148, 431);
+            this.txtInput8.Location = new System.Drawing.Point(148, 576);
             this.txtInput8.MaxLength = 120;
             this.txtInput8.Name = "txtInput8";
             this.txtInput8.Size = new System.Drawing.Size(429, 23);
-            this.txtInput8.TabIndex = 10;
+            this.txtInput8.TabIndex = 11;
             this.txtInput8.TextChanged += new System.EventHandler(this.valueChange);
             // 
             // txtInput9
@@ -746,11 +695,11 @@
             // 
             this.txtInput9.Anchor = System.Windows.Forms.AnchorStyles.Left;
             this.txtInput9.ImeMode = System.Windows.Forms.ImeMode.On;
-            this.txtInput9.Location = new System.Drawing.Point(148, 466);
+            this.txtInput9.Location = new System.Drawing.Point(148, 611);
             this.txtInput9.MaxLength = 11;
             this.txtInput9.Name = "txtInput9";
             this.txtInput9.Size = new System.Drawing.Size(139, 23);
-            this.txtInput9.TabIndex = 11;
+            this.txtInput9.TabIndex = 12;
             this.txtInput9.TextChanged += new System.EventHandler(this.valueChange);
             // 
             // cmbLedgerFlg
@@ -759,10 +708,10 @@
             this.cmbLedgerFlg.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
             this.cmbLedgerFlg.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
             this.cmbLedgerFlg.FormattingEnabled = true;
-            this.cmbLedgerFlg.Location = new System.Drawing.Point(148, 502);
+            this.cmbLedgerFlg.Location = new System.Drawing.Point(148, 647);
             this.cmbLedgerFlg.Name = "cmbLedgerFlg";
             this.cmbLedgerFlg.Size = new System.Drawing.Size(139, 24);
-            this.cmbLedgerFlg.TabIndex = 12;
+            this.cmbLedgerFlg.TabIndex = 13;
             this.cmbLedgerFlg.TextChanged += new System.EventHandler(this.valueChange);
             // 
             // label17
@@ -771,7 +720,7 @@
             this.label17.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(128)))));
             this.label17.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
             this.label17.ForeColor = System.Drawing.Color.Black;
-            this.label17.Location = new System.Drawing.Point(3, 535);
+            this.label17.Location = new System.Drawing.Point(3, 680);
             this.label17.Name = "label17";
             this.label17.Size = new System.Drawing.Size(139, 25);
             this.label17.TabIndex = 30;
@@ -785,10 +734,10 @@
             this.cmbSecManage.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
             this.cmbSecManage.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
             this.cmbSecManage.FormattingEnabled = true;
-            this.cmbSecManage.Location = new System.Drawing.Point(148, 537);
+            this.cmbSecManage.Location = new System.Drawing.Point(148, 682);
             this.cmbSecManage.Name = "cmbSecManage";
             this.cmbSecManage.Size = new System.Drawing.Size(284, 24);
-            this.cmbSecManage.TabIndex = 13;
+            this.cmbSecManage.TabIndex = 14;
             this.cmbSecManage.SelectedValueChanged += new System.EventHandler(this.cmbSecManage_SelectedValueChanged);
             this.cmbSecManage.TextChanged += new System.EventHandler(this.valueChange);
             // 
@@ -799,7 +748,7 @@
             this.label18.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
             this.label18.Font = new System.Drawing.Font("ï¼­ï¼³ æ˜Žæœ�", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
             this.label18.ForeColor = System.Drawing.Color.Black;
-            this.label18.Location = new System.Drawing.Point(3, 570);
+            this.label18.Location = new System.Drawing.Point(3, 715);
             this.label18.Name = "label18";
             this.label18.Size = new System.Drawing.Size(139, 25);
             this.label18.TabIndex = 30;
@@ -811,10 +760,10 @@
             this.lblSecRank.Anchor = System.Windows.Forms.AnchorStyles.Left;
             this.lblSecRank.BackColor = System.Drawing.SystemColors.Window;
             this.tableLayoutPanel1.SetColumnSpan(this.lblSecRank, 2);
-            this.lblSecRank.Location = new System.Drawing.Point(148, 571);
+            this.lblSecRank.Location = new System.Drawing.Point(148, 716);
             this.lblSecRank.Name = "lblSecRank";
             this.lblSecRank.Size = new System.Drawing.Size(284, 23);
-            this.lblSecRank.TabIndex = 14;
+            this.lblSecRank.TabIndex = 15;
             this.lblSecRank.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
             // 
             // lblSecRange
@@ -822,10 +771,10 @@
             this.lblSecRange.Anchor = System.Windows.Forms.AnchorStyles.Left;
             this.lblSecRange.BackColor = System.Drawing.SystemColors.Window;
             this.tableLayoutPanel1.SetColumnSpan(this.lblSecRange, 2);
-            this.lblSecRange.Location = new System.Drawing.Point(148, 606);
+            this.lblSecRange.Location = new System.Drawing.Point(148, 751);
             this.lblSecRange.Name = "lblSecRange";
             this.lblSecRange.Size = new System.Drawing.Size(284, 23);
-            this.lblSecRange.TabIndex = 15;
+            this.lblSecRange.TabIndex = 16;
             this.lblSecRange.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
             // 
             // label4
@@ -835,7 +784,7 @@
             this.label4.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
             this.label4.Font = new System.Drawing.Font("ï¼­ï¼³ æ˜Žæœ�", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
             this.label4.ForeColor = System.Drawing.Color.Black;
-            this.label4.Location = new System.Drawing.Point(3, 605);
+            this.label4.Location = new System.Drawing.Point(3, 750);
             this.label4.Name = "label4";
             this.label4.Size = new System.Drawing.Size(139, 25);
             this.label4.TabIndex = 30;
@@ -849,7 +798,7 @@
             this.label21.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
             this.label21.Font = new System.Drawing.Font("ï¼­ï¼³ æ˜Žæœ�", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
             this.label21.ForeColor = System.Drawing.Color.Black;
-            this.label21.Location = new System.Drawing.Point(3, 640);
+            this.label21.Location = new System.Drawing.Point(3, 785);
             this.label21.Name = "label21";
             this.label21.Size = new System.Drawing.Size(139, 25);
             this.label21.TabIndex = 30;
@@ -860,11 +809,11 @@
             // 
             this.txtInput11.Anchor = System.Windows.Forms.AnchorStyles.Left;
             this.txtInput11.ImeMode = System.Windows.Forms.ImeMode.Disable;
-            this.txtInput11.Location = new System.Drawing.Point(148, 641);
+            this.txtInput11.Location = new System.Drawing.Point(148, 786);
             this.txtInput11.MaxLength = 11;
             this.txtInput11.Name = "txtInput11";
             this.txtInput11.Size = new System.Drawing.Size(139, 23);
-            this.txtInput11.TabIndex = 14;
+            this.txtInput11.TabIndex = 17;
             this.txtInput11.TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
             this.txtInput11.Validated += new System.EventHandler(this.txtInputDecimal_Validated);
             // 
@@ -875,7 +824,7 @@
             this.label22.BackColor = System.Drawing.Color.Black;
             this.label22.Font = new System.Drawing.Font("ï¼­ï¼³ æ˜Žæœ�", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
             this.label22.ForeColor = System.Drawing.Color.White;
-            this.label22.Location = new System.Drawing.Point(293, 644);
+            this.label22.Location = new System.Drawing.Point(293, 789);
             this.label22.Name = "label22";
             this.label22.Size = new System.Drawing.Size(110, 16);
             this.label22.TabIndex = 30;
@@ -882,53 +831,131 @@
             this.label22.Text = "ï¼«ï½�ï¼ˆç‰‡é�“ï¼‰";
             this.label22.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
             // 
-            // cmbRefDepartment
+            // label12
             // 
-            this.cmbRefDepartment.Anchor = System.Windows.Forms.AnchorStyles.Left;
-            this.tableLayoutPanel1.SetColumnSpan(this.cmbRefDepartment, 2);
-            this.cmbRefDepartment.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
-            this.cmbRefDepartment.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
-            this.cmbRefDepartment.FormattingEnabled = true;
-            this.cmbRefDepartment.Location = new System.Drawing.Point(3, 858);
-            this.cmbRefDepartment.Name = "cmbRefDepartment";
-            this.cmbRefDepartment.Size = new System.Drawing.Size(284, 24);
-            this.cmbRefDepartment.TabIndex = 16;
-            this.cmbRefDepartment.TextChanged += new System.EventHandler(this.valueChange);
+            this.label12.Anchor = System.Windows.Forms.AnchorStyles.Left;
+            this.label12.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(128)))));
+            this.label12.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
+            this.label12.ForeColor = System.Drawing.Color.Black;
+            this.label12.Location = new System.Drawing.Point(3, 855);
+            this.label12.Name = "label12";
+            this.label12.Size = new System.Drawing.Size(139, 25);
+            this.label12.TabIndex = 30;
+            this.label12.Text = "å�‚ç…§éƒ¨ç½²";
+            this.label12.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
             // 
-            // btnRefDepAdd
+            // label15
             // 
-            this.btnRefDepAdd.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
-            | System.Windows.Forms.AnchorStyles.Left) 
-            | System.Windows.Forms.AnchorStyles.Right)));
-            this.btnRefDepAdd.BackColor = System.Drawing.Color.Green;
-            this.btnRefDepAdd.Font = new System.Drawing.Font("ï¼­ï¼³ æ˜Žæœ�", 11.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
-            this.btnRefDepAdd.ForeColor = System.Drawing.Color.White;
-            this.btnRefDepAdd.Location = new System.Drawing.Point(293, 853);
-            this.btnRefDepAdd.Name = "btnRefDepAdd";
-            this.btnRefDepAdd.Size = new System.Drawing.Size(139, 31);
-            this.btnRefDepAdd.TabIndex = 32;
-            this.btnRefDepAdd.TabStop = false;
-            this.btnRefDepAdd.Text = "å�‚ç…§éƒ¨ç½²è¿½åŠ ";
-            this.btnRefDepAdd.UseVisualStyleBackColor = false;
-            this.btnRefDepAdd.Click += new System.EventHandler(this.btnRefDepAdd_Click);
+            this.label15.Anchor = System.Windows.Forms.AnchorStyles.Left;
+            this.label15.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(128)))));
+            this.label15.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
+            this.label15.Font = new System.Drawing.Font("ï¼­ï¼³ æ˜Žæœ�", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
+            this.label15.ForeColor = System.Drawing.Color.Black;
+            this.label15.Location = new System.Drawing.Point(3, 820);
+            this.label15.Name = "label15";
+            this.label15.Size = new System.Drawing.Size(139, 25);
+            this.label15.TabIndex = 30;
+            this.label15.Text = "é€šå‹¤äº¤é€šè²»";
+            this.label15.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
             // 
-            // btnRefDepDel
+            // txtInput12
             // 
-            this.btnRefDepDel.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
-            | System.Windows.Forms.AnchorStyles.Left) 
-            | System.Windows.Forms.AnchorStyles.Right)));
-            this.btnRefDepDel.BackColor = System.Drawing.Color.Red;
-            this.btnRefDepDel.Font = new System.Drawing.Font("ï¼­ï¼³ æ˜Žæœ�", 11.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
-            this.btnRefDepDel.ForeColor = System.Drawing.Color.White;
-            this.btnRefDepDel.Location = new System.Drawing.Point(438, 853);
-            this.btnRefDepDel.Name = "btnRefDepDel";
-            this.btnRefDepDel.Size = new System.Drawing.Size(139, 31);
-            this.btnRefDepDel.TabIndex = 33;
-            this.btnRefDepDel.TabStop = false;
-            this.btnRefDepDel.Text = "å�‚ç…§éƒ¨ç½²å‰Šé™¤";
-            this.btnRefDepDel.UseVisualStyleBackColor = false;
-            this.btnRefDepDel.Click += new System.EventHandler(this.btnRefDepDel_Click);
+            this.txtInput12.Anchor = System.Windows.Forms.AnchorStyles.Left;
+            this.txtInput12.ImeMode = System.Windows.Forms.ImeMode.Disable;
+            this.txtInput12.Location = new System.Drawing.Point(148, 821);
+            this.txtInput12.MaxLength = 11;
+            this.txtInput12.Name = "txtInput12";
+            this.txtInput12.Size = new System.Drawing.Size(139, 23);
+            this.txtInput12.TabIndex = 18;
+            this.txtInput12.TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
+            this.txtInput12.Validated += new System.EventHandler(this.txtInputSalary_Validated);
             // 
+            // label23
+            // 
+            this.label23.Anchor = System.Windows.Forms.AnchorStyles.Left;
+            this.label23.AutoSize = true;
+            this.label23.BackColor = System.Drawing.Color.Black;
+            this.label23.Font = new System.Drawing.Font("ï¼­ï¼³ æ˜Žæœ�", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
+            this.label23.ForeColor = System.Drawing.Color.White;
+            this.label23.Location = new System.Drawing.Point(293, 824);
+            this.label23.Name = "label23";
+            this.label23.Size = new System.Drawing.Size(110, 16);
+            this.label23.TabIndex = 30;
+            this.label23.Text = "å††ï¼ˆå…¬èª�åˆ†ï¼‰";
+            this.label23.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
+            // 
+            // dgvSalary
+            // 
+            this.dgvSalary.AllowUserToAddRows = false;
+            this.dgvSalary.AllowUserToDeleteRows = false;
+            this.dgvSalary.AllowUserToResizeColumns = false;
+            this.dgvSalary.AllowUserToResizeRows = false;
+            this.dgvSalary.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
+            | System.Windows.Forms.AnchorStyles.Left)));
+            this.dgvSalary.BackgroundColor = System.Drawing.Color.White;
+            this.dgvSalary.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.dgvSalary.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle1;
+            this.dgvSalary.ColumnHeadersHeight = 22;
+            this.dgvSalary.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing;
+            this.dgvSalary.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
+            this.SalaryColumn1,
+            this.SalaryColumn2,
+            this.SalaryColumn3});
+            this.tableLayoutPanel1.SetColumnSpan(this.dgvSalary, 3);
+            this.dgvSalary.EditMode = System.Windows.Forms.DataGridViewEditMode.EditOnEnter;
+            this.dgvSalary.Location = new System.Drawing.Point(148, 248);
+            this.dgvSalary.MultiSelect = false;
+            this.dgvSalary.Name = "dgvSalary";
+            this.dgvSalary.RowHeadersVisible = false;
+            this.dgvSalary.RowHeadersWidth = 18;
+            this.dgvSalary.RowHeadersWidthSizeMode = System.Windows.Forms.DataGridViewRowHeadersWidthSizeMode.DisableResizing;
+            this.tableLayoutPanel1.SetRowSpan(this.dgvSalary, 3);
+            this.dgvSalary.RowTemplate.Height = 20;
+            this.dgvSalary.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
+            this.dgvSalary.Size = new System.Drawing.Size(429, 104);
+            this.dgvSalary.TabIndex = 21;
+            this.dgvSalary.TabStop = false;
+            // 
+            // SalaryColumn1
+            // 
+            dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
+            this.SalaryColumn1.DefaultCellStyle = dataGridViewCellStyle2;
+            this.SalaryColumn1.Frozen = true;
+            this.SalaryColumn1.HeaderText = "çµ¦ä¸Žé–‹å§‹å¹´æœˆæ—¥";
+            this.SalaryColumn1.Name = "SalaryColumn1";
+            this.SalaryColumn1.ReadOnly = true;
+            this.SalaryColumn1.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
+            this.SalaryColumn1.Width = 129;
+            // 
+            // SalaryColumn2
+            // 
+            dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
+            this.SalaryColumn2.DefaultCellStyle = dataGridViewCellStyle3;
+            this.SalaryColumn2.Frozen = true;
+            this.SalaryColumn2.HeaderText = "æœˆçµ¦ä¸Žé¡�";
+            this.SalaryColumn2.Name = "SalaryColumn2";
+            this.SalaryColumn2.ReadOnly = true;
+            this.SalaryColumn2.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
+            this.SalaryColumn2.Width = 140;
+            // 
+            // SalaryColumn3
+            // 
+            dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
+            this.SalaryColumn3.DefaultCellStyle = dataGridViewCellStyle4;
+            this.SalaryColumn3.Frozen = true;
+            this.SalaryColumn3.HeaderText = "å¹´çµ¦ä¸Žé¡�";
+            this.SalaryColumn3.Name = "SalaryColumn3";
+            this.SalaryColumn3.ReadOnly = true;
+            this.SalaryColumn3.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
+            this.SalaryColumn3.Width = 140;
+            // 
             // dgvRefDepartment
             // 
             this.dgvRefDepartment.AllowUserToAddRows = false;
@@ -953,17 +980,18 @@
             this.dgvRefDepartment.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
             this.Column8,
             this.TextBoxColumn1});
-            this.tableLayoutPanel1.SetColumnSpan(this.dgvRefDepartment, 4);
+            this.tableLayoutPanel1.SetColumnSpan(this.dgvRefDepartment, 3);
             this.dgvRefDepartment.EditMode = System.Windows.Forms.DataGridViewEditMode.EditOnEnter;
-            this.dgvRefDepartment.Location = new System.Drawing.Point(3, 743);
+            this.dgvRefDepartment.Location = new System.Drawing.Point(148, 853);
             this.dgvRefDepartment.MultiSelect = false;
             this.dgvRefDepartment.Name = "dgvRefDepartment";
+            this.dgvRefDepartment.RowHeadersVisible = false;
             this.dgvRefDepartment.RowHeadersWidth = 18;
             this.dgvRefDepartment.RowHeadersWidthSizeMode = System.Windows.Forms.DataGridViewRowHeadersWidthSizeMode.DisableResizing;
             this.tableLayoutPanel1.SetRowSpan(this.dgvRefDepartment, 3);
             this.dgvRefDepartment.RowTemplate.Height = 20;
             this.dgvRefDepartment.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
-            this.dgvRefDepartment.Size = new System.Drawing.Size(570, 104);
+            this.dgvRefDepartment.Size = new System.Drawing.Size(429, 104);
             this.dgvRefDepartment.TabIndex = 18;
             this.dgvRefDepartment.TabStop = false;
             // 
@@ -985,62 +1013,187 @@
             this.TextBoxColumn1.ReadOnly = true;
             this.TextBoxColumn1.Resizable = System.Windows.Forms.DataGridViewTriState.False;
             this.TextBoxColumn1.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
-            this.TextBoxColumn1.Width = 530;
+            this.TextBoxColumn1.Width = 409;
             // 
-            // label12
+            // cmbRefDepartment
             // 
-            this.label12.Anchor = System.Windows.Forms.AnchorStyles.Left;
-            this.label12.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(128)))));
-            this.label12.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
-            this.tableLayoutPanel1.SetColumnSpan(this.label12, 4);
-            this.label12.ForeColor = System.Drawing.Color.Black;
-            this.label12.Location = new System.Drawing.Point(3, 710);
-            this.label12.Name = "label12";
-            this.label12.Size = new System.Drawing.Size(570, 25);
-            this.label12.TabIndex = 30;
-            this.label12.Text = "å�‚ç…§éƒ¨ç½²";
-            this.label12.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
+            this.cmbRefDepartment.Anchor = System.Windows.Forms.AnchorStyles.Left;
+            this.tableLayoutPanel1.SetColumnSpan(this.cmbRefDepartment, 3);
+            this.cmbRefDepartment.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+            this.cmbRefDepartment.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
+            this.cmbRefDepartment.FormattingEnabled = true;
+            this.cmbRefDepartment.Location = new System.Drawing.Point(148, 967);
+            this.cmbRefDepartment.Name = "cmbRefDepartment";
+            this.cmbRefDepartment.Size = new System.Drawing.Size(429, 24);
+            this.cmbRefDepartment.TabIndex = 19;
+            this.cmbRefDepartment.TextChanged += new System.EventHandler(this.valueChange);
             // 
-            // label15
+            // btnRefDepDel
             // 
-            this.label15.Anchor = System.Windows.Forms.AnchorStyles.Left;
-            this.label15.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(128)))));
-            this.label15.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
-            this.label15.Font = new System.Drawing.Font("ï¼­ï¼³ æ˜Žæœ�", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
-            this.label15.ForeColor = System.Drawing.Color.Black;
-            this.label15.Location = new System.Drawing.Point(3, 675);
-            this.label15.Name = "label15";
-            this.label15.Size = new System.Drawing.Size(139, 25);
-            this.label15.TabIndex = 30;
-            this.label15.Text = "é€šå‹¤äº¤é€šè²»";
-            this.label15.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
+            this.btnRefDepDel.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
+            | System.Windows.Forms.AnchorStyles.Left) 
+            | System.Windows.Forms.AnchorStyles.Right)));
+            this.btnRefDepDel.BackColor = System.Drawing.Color.Red;
+            this.btnRefDepDel.Font = new System.Drawing.Font("ï¼­ï¼³ æ˜Žæœ�", 11.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
+            this.btnRefDepDel.ForeColor = System.Drawing.Color.White;
+            this.btnRefDepDel.Location = new System.Drawing.Point(438, 998);
+            this.btnRefDepDel.Name = "btnRefDepDel";
+            this.btnRefDepDel.Size = new System.Drawing.Size(139, 29);
+            this.btnRefDepDel.TabIndex = 33;
+            this.btnRefDepDel.TabStop = false;
+            this.btnRefDepDel.Text = "å�‚ç…§éƒ¨ç½²å‰Šé™¤";
+            this.btnRefDepDel.UseVisualStyleBackColor = false;
+            this.btnRefDepDel.Click += new System.EventHandler(this.btnRefDepDel_Click);
             // 
-            // txtInput12
+            // btnRefDepAdd
             // 
-            this.txtInput12.Anchor = System.Windows.Forms.AnchorStyles.Left;
-            this.txtInput12.ImeMode = System.Windows.Forms.ImeMode.Disable;
-            this.txtInput12.Location = new System.Drawing.Point(148, 676);
-            this.txtInput12.MaxLength = 11;
-            this.txtInput12.Name = "txtInput12";
-            this.txtInput12.Size = new System.Drawing.Size(139, 23);
-            this.txtInput12.TabIndex = 15;
-            this.txtInput12.TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
-            this.txtInput12.Validated += new System.EventHandler(this.txtInputSalary_Validated);
+            this.btnRefDepAdd.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
+            | System.Windows.Forms.AnchorStyles.Left) 
+            | System.Windows.Forms.AnchorStyles.Right)));
+            this.btnRefDepAdd.BackColor = System.Drawing.Color.Green;
+            this.btnRefDepAdd.Font = new System.Drawing.Font("ï¼­ï¼³ æ˜Žæœ�", 11.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
+            this.btnRefDepAdd.ForeColor = System.Drawing.Color.White;
+            this.btnRefDepAdd.Location = new System.Drawing.Point(293, 998);
+            this.btnRefDepAdd.Name = "btnRefDepAdd";
+            this.btnRefDepAdd.Size = new System.Drawing.Size(139, 29);
+            this.btnRefDepAdd.TabIndex = 32;
+            this.btnRefDepAdd.TabStop = false;
+            this.btnRefDepAdd.Text = "å�‚ç…§éƒ¨ç½²è¿½åŠ ";
+            this.btnRefDepAdd.UseVisualStyleBackColor = false;
+            this.btnRefDepAdd.Click += new System.EventHandler(this.btnRefDepAdd_Click);
             // 
-            // label23
+            // dgvAssignment
             // 
-            this.label23.Anchor = System.Windows.Forms.AnchorStyles.Left;
-            this.label23.AutoSize = true;
-            this.label23.BackColor = System.Drawing.Color.Black;
-            this.label23.Font = new System.Drawing.Font("ï¼­ï¼³ æ˜Žæœ�", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
-            this.label23.ForeColor = System.Drawing.Color.White;
-            this.label23.Location = new System.Drawing.Point(293, 679);
-            this.label23.Name = "label23";
-            this.label23.Size = new System.Drawing.Size(110, 16);
-            this.label23.TabIndex = 30;
-            this.label23.Text = "å††ï¼ˆå…¬èª�åˆ†ï¼‰";
-            this.label23.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
+            this.dgvAssignment.AllowUserToAddRows = false;
+            this.dgvAssignment.AllowUserToDeleteRows = false;
+            this.dgvAssignment.AllowUserToResizeColumns = false;
+            this.dgvAssignment.AllowUserToResizeRows = false;
+            this.dgvAssignment.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
+            | System.Windows.Forms.AnchorStyles.Left)));
+            this.dgvAssignment.BackgroundColor = System.Drawing.Color.White;
+            this.dgvAssignment.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
+            dataGridViewCellStyle7.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
+            dataGridViewCellStyle7.BackColor = System.Drawing.SystemColors.Control;
+            dataGridViewCellStyle7.Font = new System.Drawing.Font("ï¼­ï¼³ æ˜Žæœ�", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
+            dataGridViewCellStyle7.ForeColor = System.Drawing.SystemColors.WindowText;
+            dataGridViewCellStyle7.SelectionBackColor = System.Drawing.SystemColors.Highlight;
+            dataGridViewCellStyle7.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
+            dataGridViewCellStyle7.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
+            this.dgvAssignment.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle7;
+            this.dgvAssignment.ColumnHeadersHeight = 22;
+            this.dgvAssignment.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing;
+            this.dgvAssignment.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
+            this.dataGridViewTextBoxColumn1,
+            this.dataGridViewTextBoxColumn2,
+            this.dataGridViewTextBoxColumn3});
+            this.tableLayoutPanel1.SetColumnSpan(this.dgvAssignment, 3);
+            this.dgvAssignment.EditMode = System.Windows.Forms.DataGridViewEditMode.EditOnEnter;
+            this.dgvAssignment.Location = new System.Drawing.Point(148, 428);
+            this.dgvAssignment.MultiSelect = false;
+            this.dgvAssignment.Name = "dgvAssignment";
+            this.dgvAssignment.RowHeadersVisible = false;
+            this.dgvAssignment.RowHeadersWidth = 18;
+            this.dgvAssignment.RowHeadersWidthSizeMode = System.Windows.Forms.DataGridViewRowHeadersWidthSizeMode.DisableResizing;
+            this.tableLayoutPanel1.SetRowSpan(this.dgvAssignment, 3);
+            this.dgvAssignment.RowTemplate.Height = 20;
+            this.dgvAssignment.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
+            this.dgvAssignment.Size = new System.Drawing.Size(429, 104);
+            this.dgvAssignment.TabIndex = 21;
+            this.dgvAssignment.TabStop = false;
             // 
+            // dataGridViewTextBoxColumn1
+            // 
+            dataGridViewCellStyle8.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
+            this.dataGridViewTextBoxColumn1.DefaultCellStyle = dataGridViewCellStyle8;
+            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 = 129;
+            // 
+            // dataGridViewTextBoxColumn2
+            // 
+            dataGridViewCellStyle9.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
+            this.dataGridViewTextBoxColumn2.DefaultCellStyle = dataGridViewCellStyle9;
+            this.dataGridViewTextBoxColumn2.Frozen = true;
+            this.dataGridViewTextBoxColumn2.HeaderText = "é…�å±žéƒ¨ç½²å��";
+            this.dataGridViewTextBoxColumn2.Name = "dataGridViewTextBoxColumn2";
+            this.dataGridViewTextBoxColumn2.ReadOnly = true;
+            this.dataGridViewTextBoxColumn2.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
+            this.dataGridViewTextBoxColumn2.Width = 280;
+            // 
+            // dataGridViewTextBoxColumn3
+            // 
+            dataGridViewCellStyle10.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
+            this.dataGridViewTextBoxColumn3.DefaultCellStyle = dataGridViewCellStyle10;
+            this.dataGridViewTextBoxColumn3.Frozen = true;
+            this.dataGridViewTextBoxColumn3.HeaderText = "éƒ¨ç½²ã‚³ãƒ¼ãƒ‰";
+            this.dataGridViewTextBoxColumn3.Name = "dataGridViewTextBoxColumn3";
+            this.dataGridViewTextBoxColumn3.ReadOnly = true;
+            this.dataGridViewTextBoxColumn3.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
+            this.dataGridViewTextBoxColumn3.Visible = false;
+            this.dataGridViewTextBoxColumn3.Width = 5;
+            // 
+            // BtnDepartMentAdd
+            // 
+            this.BtnDepartMentAdd.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
+            | System.Windows.Forms.AnchorStyles.Left) 
+            | System.Windows.Forms.AnchorStyles.Right)));
+            this.BtnDepartMentAdd.BackColor = System.Drawing.Color.Green;
+            this.BtnDepartMentAdd.Font = new System.Drawing.Font("ï¼­ï¼³ æ˜Žæœ�", 11.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
+            this.BtnDepartMentAdd.ForeColor = System.Drawing.Color.White;
+            this.BtnDepartMentAdd.Location = new System.Drawing.Point(293, 393);
+            this.BtnDepartMentAdd.Name = "BtnDepartMentAdd";
+            this.BtnDepartMentAdd.Size = new System.Drawing.Size(139, 29);
+            this.BtnDepartMentAdd.TabIndex = 32;
+            this.BtnDepartMentAdd.TabStop = false;
+            this.BtnDepartMentAdd.Text = "é…�å±žè¿½åŠ ";
+            this.BtnDepartMentAdd.UseVisualStyleBackColor = false;
+            this.BtnDepartMentAdd.Click += new System.EventHandler(this.BtnDepartMentAdd_Click);
+            // 
+            // BtnDepartMentDel
+            // 
+            this.BtnDepartMentDel.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
+            | System.Windows.Forms.AnchorStyles.Left) 
+            | System.Windows.Forms.AnchorStyles.Right)));
+            this.BtnDepartMentDel.BackColor = System.Drawing.Color.Red;
+            this.BtnDepartMentDel.Font = new System.Drawing.Font("ï¼­ï¼³ æ˜Žæœ�", 11.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
+            this.BtnDepartMentDel.ForeColor = System.Drawing.Color.White;
+            this.BtnDepartMentDel.Location = new System.Drawing.Point(438, 393);
+            this.BtnDepartMentDel.Name = "BtnDepartMentDel";
+            this.BtnDepartMentDel.Size = new System.Drawing.Size(139, 29);
+            this.BtnDepartMentDel.TabIndex = 33;
+            this.BtnDepartMentDel.TabStop = false;
+            this.BtnDepartMentDel.Text = "é…�å±žå±¥æ­´å‰Šé™¤";
+            this.BtnDepartMentDel.UseVisualStyleBackColor = false;
+            this.BtnDepartMentDel.Click += new System.EventHandler(this.BtnDepartMentDel_Click);
+            // 
+            // txtInput13
+            // 
+            this.txtInput13.Anchor = System.Windows.Forms.AnchorStyles.Left;
+            this.txtInput13.ImeMode = System.Windows.Forms.ImeMode.Disable;
+            this.txtInput13.Location = new System.Drawing.Point(148, 396);
+            this.txtInput13.MaxLength = 11;
+            this.txtInput13.Name = "txtInput13";
+            this.txtInput13.Size = new System.Drawing.Size(139, 23);
+            this.txtInput13.TabIndex = 9;
+            this.txtInput13.TextChanged += new System.EventHandler(this.txtInput_TextChanged);
+            this.txtInput13.Validated += new System.EventHandler(this.txtInput_Validated);
+            // 
+            // label24
+            // 
+            this.label24.Anchor = System.Windows.Forms.AnchorStyles.Left;
+            this.label24.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(128)))));
+            this.label24.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
+            this.label24.ForeColor = System.Drawing.Color.Black;
+            this.label24.Location = new System.Drawing.Point(3, 395);
+            this.label24.Name = "label24";
+            this.label24.Size = new System.Drawing.Size(139, 25);
+            this.label24.TabIndex = 30;
+            this.label24.Text = "é…�å±žå¹´æœˆæ—¥";
+            this.label24.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
+            // 
             // lblSecurtyManegement
             // 
             this.lblSecurtyManegement.BackColor = System.Drawing.Color.White;
@@ -1154,14 +1307,14 @@
             this.dgvMaster.AllowUserToResizeRows = false;
             this.dgvMaster.BackgroundColor = System.Drawing.Color.White;
             this.dgvMaster.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
-            dataGridViewCellStyle7.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
-            dataGridViewCellStyle7.BackColor = System.Drawing.SystemColors.Control;
-            dataGridViewCellStyle7.Font = new System.Drawing.Font("ï¼­ï¼³ æ˜Žæœ�", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
-            dataGridViewCellStyle7.ForeColor = System.Drawing.SystemColors.WindowText;
-            dataGridViewCellStyle7.SelectionBackColor = System.Drawing.SystemColors.Highlight;
-            dataGridViewCellStyle7.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
-            dataGridViewCellStyle7.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
-            this.dgvMaster.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle7;
+            dataGridViewCellStyle11.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
+            dataGridViewCellStyle11.BackColor = System.Drawing.SystemColors.Control;
+            dataGridViewCellStyle11.Font = new System.Drawing.Font("ï¼­ï¼³ æ˜Žæœ�", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
+            dataGridViewCellStyle11.ForeColor = System.Drawing.SystemColors.WindowText;
+            dataGridViewCellStyle11.SelectionBackColor = System.Drawing.SystemColors.Highlight;
+            dataGridViewCellStyle11.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
+            dataGridViewCellStyle11.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
+            this.dgvMaster.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle11;
             this.dgvMaster.ColumnHeadersHeight = 24;
             this.dgvMaster.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing;
             this.dgvMaster.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
@@ -1186,9 +1339,9 @@
             // 
             // Column1
             // 
-            dataGridViewCellStyle8.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
-            dataGridViewCellStyle8.Font = new System.Drawing.Font("ï¼­ï¼³ æ˜Žæœ�", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
-            this.Column1.DefaultCellStyle = dataGridViewCellStyle8;
+            dataGridViewCellStyle12.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
+            dataGridViewCellStyle12.Font = new System.Drawing.Font("ï¼­ï¼³ æ˜Žæœ�", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
+            this.Column1.DefaultCellStyle = dataGridViewCellStyle12;
             this.Column1.Frozen = true;
             this.Column1.HeaderText = "â„–";
             this.Column1.Name = "Column1";
@@ -1198,8 +1351,8 @@
             // 
             // Column2
             // 
-            dataGridViewCellStyle9.Font = new System.Drawing.Font("ï¼­ï¼³ æ˜Žæœ�", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
-            this.Column2.DefaultCellStyle = dataGridViewCellStyle9;
+            dataGridViewCellStyle13.Font = new System.Drawing.Font("ï¼­ï¼³ æ˜Žæœ�", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
+            this.Column2.DefaultCellStyle = dataGridViewCellStyle13;
             this.Column2.Frozen = true;
             this.Column2.HeaderText = "æ‹…å½“è€…ã‚³ãƒ¼ãƒ‰";
             this.Column2.Name = "Column2";
@@ -1209,9 +1362,9 @@
             // 
             // Column3
             // 
-            dataGridViewCellStyle10.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
-            dataGridViewCellStyle10.Font = new System.Drawing.Font("ï¼­ï¼³ æ˜Žæœ�", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
-            this.Column3.DefaultCellStyle = dataGridViewCellStyle10;
+            dataGridViewCellStyle14.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
+            dataGridViewCellStyle14.Font = new System.Drawing.Font("ï¼­ï¼³ æ˜Žæœ�", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
+            this.Column3.DefaultCellStyle = dataGridViewCellStyle14;
             this.Column3.HeaderText = "æ‹…ã€€å½“ã€€è€…ã€€å��";
             this.Column3.Name = "Column3";
             this.Column3.ReadOnly = true;
@@ -1281,6 +1434,7 @@
             this.tableLayoutPanel1.PerformLayout();
             ((System.ComponentModel.ISupportInitialize)(this.dgvSalary)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.dgvRefDepartment)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.dgvAssignment)).EndInit();
             this.panel2.ResumeLayout(false);
             this.panel2.PerformLayout();
             this.panel3.ResumeLayout(false);
@@ -1301,13 +1455,6 @@
         private System.Windows.Forms.Button btnDataLineEntry;
         private System.Windows.Forms.Button btnDispDown;
         private System.Windows.Forms.Button btnDispUp;
-        private System.Windows.Forms.DataGridViewTextBoxColumn Column1;
-        private System.Windows.Forms.DataGridViewTextBoxColumn Column2;
-        private System.Windows.Forms.DataGridViewTextBoxColumn Column3;
-        private System.Windows.Forms.DataGridViewTextBoxColumn Column4;
-        private System.Windows.Forms.DataGridViewTextBoxColumn Column5;
-        private System.Windows.Forms.DataGridViewTextBoxColumn Column6;
-        private System.Windows.Forms.DataGridViewTextBoxColumn Column7;
         private System.Windows.Forms.Panel panel1;
         private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
         private System.Windows.Forms.Label lblPersonCode;
@@ -1346,11 +1493,6 @@
         private System.Windows.Forms.Button btnRefDepAdd;
         private System.Windows.Forms.Button btnRefDepDel;
         private DataGridViewEX dgvRefDepartment;
-        private System.Windows.Forms.DataGridViewTextBoxColumn Column8;
-        private System.Windows.Forms.DataGridViewTextBoxColumn TextBoxColumn1;
-        private System.Windows.Forms.DataGridViewTextBoxColumn SalaryColumn1;
-        private System.Windows.Forms.DataGridViewTextBoxColumn SalaryColumn2;
-        private System.Windows.Forms.DataGridViewTextBoxColumn SalaryColumn3;
         private System.Windows.Forms.Label label17;
         private System.Windows.Forms.Label label18;
         private System.Windows.Forms.Label lblSecRank;
@@ -1370,5 +1512,25 @@
         private System.Windows.Forms.Label label15;
         private System.Windows.Forms.TextBox txtInput12;
         private System.Windows.Forms.Label label23;
+        private System.Windows.Forms.DataGridViewTextBoxColumn SalaryColumn1;
+        private System.Windows.Forms.DataGridViewTextBoxColumn SalaryColumn2;
+        private System.Windows.Forms.DataGridViewTextBoxColumn SalaryColumn3;
+        private System.Windows.Forms.DataGridViewTextBoxColumn Column8;
+        private System.Windows.Forms.DataGridViewTextBoxColumn TextBoxColumn1;
+        private DataGridViewEX dgvAssignment;
+        private System.Windows.Forms.DataGridViewTextBoxColumn Column1;
+        private System.Windows.Forms.DataGridViewTextBoxColumn Column2;
+        private System.Windows.Forms.DataGridViewTextBoxColumn Column3;
+        private System.Windows.Forms.DataGridViewTextBoxColumn Column4;
+        private System.Windows.Forms.DataGridViewTextBoxColumn Column5;
+        private System.Windows.Forms.DataGridViewTextBoxColumn Column6;
+        private System.Windows.Forms.DataGridViewTextBoxColumn Column7;
+        private System.Windows.Forms.Button BtnDepartMentAdd;
+        private System.Windows.Forms.Button BtnDepartMentDel;
+        private System.Windows.Forms.TextBox txtInput13;
+        private System.Windows.Forms.Label label24;
+        private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn1;
+        private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn2;
+        private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn3;
     }
 }
\ No newline at end of file
Index: branches/src/ProcessManagement/ProcessManagement/Forms/Master/PersonInCharge/FrmPersonInCharge.resx
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/Master/PersonInCharge/FrmPersonInCharge.resx	(revision 329)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/Master/PersonInCharge/FrmPersonInCharge.resx	(revision 330)
@@ -117,9 +117,6 @@
   <resheader name="writer">
     <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </resheader>
-  <metadata name="tableLayoutPanel1.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
   <metadata name="SalaryColumn1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
@@ -135,6 +132,15 @@
   <metadata name="TextBoxColumn1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
+  <metadata name="dataGridViewTextBoxColumn1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="dataGridViewTextBoxColumn2.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="dataGridViewTextBoxColumn3.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
   <metadata name="Column1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
Index: branches/src/ProcessManagement/ProcessManagement/Forms/Master/PersonInCharge/FrmPersonInChargeAuxiliary.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/Master/PersonInCharge/FrmPersonInChargeAuxiliary.cs	(revision 329)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/Master/PersonInCharge/FrmPersonInChargeAuxiliary.cs	(revision 330)
@@ -6,6 +6,7 @@
 using System.Text;
 using System.Windows.Forms;
 using System.Collections;
+using System.Linq;
 
 using log4net;
 using log4net.Appender;
@@ -74,25 +75,53 @@
                 m_DispFixLabel[1].Text = s_label1[(m_EntryMode - 1)];
                 m_DispFixLabel[2].Text = s_label2[(m_EntryMode - 1)];
 
-                int SRank = (int)CommonDefine.SecurityRankPos.SpecialAuthority;
-                if (CommonMotions.LoginUserData.PersonCode == CommonDefine.AdminCode
-                || CommonMotions.LoginUserSecurity.SecRank == (int)CommonDefine.SecurityRankList[SRank].Key)
+                // ãƒ†ãƒ¼ãƒ–ãƒ«ãƒ¬ã‚¤ã‚¢ã‚¦ãƒˆè¡Œè¡¨ç¤ºåˆ¶å¾¡
+                SetTableStyle(false);
+
+                // çµ¦æ–™ãƒ˜ãƒƒãƒ€ãƒ¼è‰²ã‚»ãƒƒãƒˆ
+                dgvSalary.EnableHeadersVisualStyles = false;
+                dgvSalary.ColumnHeadersDefaultCellStyle.ForeColor = Color.White;
+                dgvSalary.ColumnHeadersDefaultCellStyle.BackColor = Color.DarkGray;
+
+                // é…�å±žãƒ˜ãƒƒãƒ€ãƒ¼è‰²ã‚»ãƒƒãƒˆ
+                dgvAssignment.EnableHeadersVisualStyles = false;
+                dgvAssignment.ColumnHeadersDefaultCellStyle.ForeColor = Color.White;
+                dgvAssignment.ColumnHeadersDefaultCellStyle.BackColor = Color.DarkGray;
+            }
+            catch (System.Exception ex)
+            {
+                logger.ErrorFormat("ã‚·ã‚¹ãƒ†ãƒ ã‚¨ãƒ©ãƒ¼ï¼š{0}ï¼š{1}", CommonMotions.GetMethodName(), ex.Message);
+            }
+        }
+        #endregion
+
+        #region ãƒ†ãƒ¼ãƒ–ãƒ«ãƒ¬ã‚¤ã‚¢ã‚¦ãƒˆè¡Œè¡¨ç¤ºåˆ¶å¾¡
+        /// <summary>
+        /// ãƒ†ãƒ¼ãƒ–ãƒ«ãƒ¬ã‚¤ã‚¢ã‚¦ãƒˆè¡Œè¡¨ç¤ºåˆ¶å¾¡
+        /// </summary>
+        private void SetTableStyle(bool bVisble)
+        {
+            try
+            {
+                if(bVisble)
                 {
-                    tableLayoutPanel1.Height = (23 * 35) + (40 * 2);
-                    panel2.Visible = true;
-                    panel3.Visible = true;
+                    tableLayoutPanel1.RowStyles[24] = new RowStyle(SizeType.Absolute, 35F);
+                    tableLayoutPanel1.RowStyles[25] = new RowStyle(SizeType.Absolute, 35F);
+                    tableLayoutPanel1.RowStyles[26] = new RowStyle(SizeType.Absolute, 40F);
+                    tableLayoutPanel1.RowStyles[27] = new RowStyle(SizeType.Absolute, 35F);
+                    tableLayoutPanel1.RowStyles[28] = new RowStyle(SizeType.Absolute, 35F);
+                    tableLayoutPanel1.Height = (35 * 26) + (40 * 3);
                 }
                 else
                 {
-                    tableLayoutPanel1.Height = (22 * 35) + (40 * 2);
-                    panel2.Visible = false;
-                    panel3.Visible = false;
+                    tableLayoutPanel1.RowStyles[24] = new RowStyle(SizeType.Absolute, 0F);
+                    tableLayoutPanel1.RowStyles[25] = new RowStyle(SizeType.Absolute, 0F);
+                    tableLayoutPanel1.RowStyles[26] = new RowStyle(SizeType.Absolute, 0F);
+                    tableLayoutPanel1.RowStyles[27] = new RowStyle(SizeType.Absolute, 0F);
+                    tableLayoutPanel1.RowStyles[28] = new RowStyle(SizeType.Absolute, 0F);
+                    tableLayoutPanel1.Height = (35 * 22) + (40 * 2);
                 }
-            
-                // çµ¦æ–™ãƒ˜ãƒƒãƒ€ãƒ¼è‰²ã‚»ãƒƒãƒˆ
-                dgvSalary.EnableHeadersVisualStyles = false;
-                dgvSalary.ColumnHeadersDefaultCellStyle.ForeColor = Color.White;
-                dgvSalary.ColumnHeadersDefaultCellStyle.BackColor = Color.DarkGray;
+
             }
             catch (System.Exception ex)
             {
@@ -117,6 +146,8 @@
                 }
                 btnSalaryAdd.Enabled = bctrl;
                 btnSalaryDel.Enabled = bctrl;
+                BtnDepartMentAdd.Enabled = bctrl;
+                BtnDepartMentDel.Enabled = bctrl;
                 btnRefDepAdd.Enabled = bctrl;
                 btnRefDepDel.Enabled = bctrl;
             }
@@ -162,6 +193,7 @@
                 // ã‚°ãƒªãƒƒãƒ‰ã‚¯ãƒªã‚¢
                 dgvSalary.Rows.Clear();
                 dgvRefDepartment.Rows.Clear();
+                dgvAssignment.Rows.Clear();
 
                 m_bChengeAns = false;
             }
@@ -406,6 +438,9 @@
                 // çµ¦ä¸Žã‚°ãƒªãƒƒãƒ‰è¡¨ç¤º
                 DisplaySalaryGrid();
 
+                // é…�å±žä¸€è¦§ã‚°ãƒªãƒƒãƒ‰
+                DisplayAssignmentGrid();
+
                 return true;
             }
             catch (Exception ex)
@@ -457,6 +492,43 @@
         }
         #endregion
 
+        #region é…�å±žä¸€è¦§ã‚°ãƒªãƒƒãƒ‰
+        /// <summary>
+        /// é…�å±žä¸€è¦§ã‚°ãƒªãƒƒãƒ‰
+        /// </summary>
+        private void DisplayAssignmentGrid()
+        {
+            IOMChgChargeDep AssignDB = new IOMChgChargeDep();
+            try
+            {
+                dgvAssignment.Rows.Clear();
+
+                string strSQL = AssignDB.CreatePrimarykeyString(m_PersonCode, DateTime.MinValue);
+                strSQL += " ORDER BY StartDate DESC";
+                List<ChgChargeDep> AssignList = new List<ChgChargeDep>();
+                AssignDB.SelectAction(strSQL, ref AssignList);
+
+                foreach (ChgChargeDep wrkRec in AssignList)
+                {
+                    dgvAssignment.Rows.Add(wrkRec.StartDate.ToShortDateString(),
+                                        wrkRec.DepartmentName,
+                                        wrkRec.DepartmentCode);
+                }
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("ã‚·ã‚¹ãƒ†ãƒ ã‚¨ãƒ©ãƒ¼ï¼š{0}ï¼š{1}", CommonMotions.GetMethodName(), ex.Message);
+            }
+            finally
+            {
+                AssignDB.close(); AssignDB = null;
+                // ç©ºè¡Œè©°ã‚�
+                int count = s_FixRowsRefAssGrid - dgvAssignment.RowCount;
+                if (count > 0) dgvAssignment.RowCount += count;
+            }
+        }
+        #endregion
+
         #region å�‚ç…§éƒ¨ç½²ãƒ‡ãƒ¼ã‚¿è¡¨ç¤ºéƒ¨åˆ¶å¾¡
         /// <summary>
         /// å�‚ç…§éƒ¨ç½²ãƒ‡ãƒ¼ã‚¿è¡¨ç¤ºéƒ¨åˆ¶å¾¡
@@ -489,6 +561,8 @@
                     btnRefDepAdd.Visible = false;
                     btnRefDepDel.Visible = false;
                     dgvRefDepartment.Visible = true;
+                    // ãƒ†ãƒ¼ãƒ–ãƒ«ãƒ¬ã‚¤ã‚¢ã‚¦ãƒˆè¡Œè¡¨ç¤ºåˆ¶å¾¡
+                    SetTableStyle(true);
                 }
                 else if (SecRange == CommonDefine.SecurityRangeList[(int)CommonDefine.SecurityRangePos.Multiple].Key)
                 {   // è¤‡æ•°éƒ¨ç½²å¯¾è±¡ã�¯è¿½åŠ ãƒ»å‰Šé™¤å�¯èƒ½
@@ -497,6 +571,8 @@
                     btnRefDepAdd.Visible = true;
                     btnRefDepDel.Visible = true;
                     dgvRefDepartment.Visible = true;
+                    // ãƒ†ãƒ¼ãƒ–ãƒ«ãƒ¬ã‚¤ã‚¢ã‚¦ãƒˆè¡Œè¡¨ç¤ºåˆ¶å¾¡
+                    SetTableStyle(true);
                 }
                 else
                 {   // ã��ã�®ä»–ã�¯è¡¨ç¤ºã�—ã�ªã�„
@@ -506,6 +582,8 @@
                     btnRefDepDel.Visible = false;
                     dgvRefDepartment.Visible = false;
                     dgvRefDepartment.Rows.Clear();
+                    // ãƒ†ãƒ¼ãƒ–ãƒ«ãƒ¬ã‚¤ã‚¢ã‚¦ãƒˆè¡Œè¡¨ç¤ºåˆ¶å¾¡
+                    SetTableStyle(false);
                 }
 
                 // ----- å�‚ç…§éƒ¨ç½²è¡¨ç¤º
@@ -606,7 +684,7 @@
                 m_bChengeAns = true;
                 m_bDateChange = false;
 
-                // é–‹å§‹æ—¥ä»˜ä»¥å¤–ã�¯å‡¦ç�†çµ‚äº†ã�™ã‚‹
+                // ===== é–‹å§‹æ—¥ä»˜ä»¥å¤–ã�¯å‡¦ç�†çµ‚äº†ã�™ã‚‹
                 if (txtbox != (TextBox)m_dispControl[(int)DispCtrl.StartDate]) return;
 
                 // ä»¥ä¸‹ã�¯æ–°è¦�ã�®ã�¨ã��ã�®ã�¿å‡¦ç�†ã�™ã‚‹
@@ -746,6 +824,34 @@
                     CommonMotions.chgBackColor(m_dispControl[(int)DispCtrl.CommuteCosts], false);
                 }
 
+                // é…�å±žæƒ…å ±
+                foreach (DataGridViewCell Curcell in dgvAssignment.Rows[0].Cells)
+                {
+                    CommonMotions.chgBackColor(Curcell, true);
+                }
+                // æœªå…¥åŠ›ã‚¨ãƒ©ãƒ¼
+                if (dgvAssignment.RowCount < 1)
+                {
+                    iLength = 0;
+                    foreach (DataGridViewCell Curcell in dgvAssignment.Rows[0].Cells)
+                    {
+                        CommonMotions.chgBackColor(Curcell, false);
+                        dgvAssignment.Rows[1].Selected = true;
+                    }
+                }
+                // ã‚¢ãƒ³ãƒžãƒƒãƒ�ã‚¨ãƒ©ãƒ¼
+                int nSelDepCode = CommonMotions.cnvInt(cmbDepartment.SelectedValue);
+                int nDspDepCode = CommonMotions.cnvInt(dgvAssignment.Rows[0].Cells[2].Value);
+                if (nSelDepCode!= nDspDepCode)
+                {
+                    bRet &= false;
+                    foreach (DataGridViewCell Curcell in dgvAssignment.Rows[0].Cells)
+                    {
+                        CommonMotions.chgBackColor(Curcell, false);
+                        dgvAssignment.Rows[1].Selected = true;
+                    }
+                }
+
                 if (iLength == 0)
                 {
                     MessageBox.Show("ãƒ‡ãƒ¼ã‚¿ã�Œå…¥åŠ›ã�•ã‚Œã�¦ã�„ã�¾ã�›ã‚“ã€�ç¢ºèª�ã�—ã�¦ã��ã� ã�•ã�„ã€‚", "ãƒ‡ãƒ¼ã‚¿ç¢ºèª�", MessageBoxButtons.OK, MessageBoxIcon.Warning);
@@ -835,17 +941,31 @@
         /// <summary>
         /// æ‹…å½“è€…ãƒžã‚¹ã‚¿ç™»éŒ²
         /// </summary>
-        private bool PersonInChargeMasterDataEntry()
+        private bool DataEntry()
         {
             IOMPersonInCharge picDB = new IOMPersonInCharge();
             IOMPersonSalary salaryDB = new IOMPersonSalary();
             IOMPersonDepartment pDepDB = new IOMPersonDepartment();
+            IOMChgChargeDep AssignDB = new IOMChgChargeDep();
+            IOConstructionBaseInfo BaseDB = new IOConstructionBaseInfo();
+            IOConstructionBaseInfoDetail DetailDB = new IOConstructionBaseInfoDetail();
             try
             {
+                // éƒ¨ç½²ã�Œå¤‰ã‚�ã�£ã�Ÿæ™‚ã�«å·¥äº‹æƒ…å ±ã�«å¯¾è±¡ã�Œã�‚ã‚‹ã�‹ã‚’åˆ¤å®šã�™ã‚‹
+                bool bChgDep = false;
+                List<int> TergetPeriod = new List<int>();
+                if (m_PersonCode > 0)
+                {   // æ–°è¦�ä»¥å¤–ã�®æ™‚ã�«å‡¦ç�†ã�™ã‚‹
+                    bChgDep = DepChangeCheck(m_PersonCode, ref TergetPeriod);
+                }
+
                 // ä¸€æ‹¬å‡¦ç�†ã�ªã�®ã�§æŽ¥ç¶šã‚’è¡Œã�†
                 picDB.connect(); picDB.beginTran();
                 salaryDB.connect(); salaryDB.beginTran();
                 pDepDB.connect(); pDepDB.beginTran();
+                AssignDB.connect(); AssignDB.beginTran();
+                BaseDB.connect(); BaseDB.beginTran();
+                DetailDB.connect(); DetailDB.beginTran();
 
                 // è¡¨ç¤ºé †ã‚’æ›´æ–°ã�™ã‚‹
                 foreach (DataGridViewRow wrkRow in dgvMaster.Rows)
@@ -876,33 +996,45 @@
                     return false;
                 }
 
-                PersonInChargeMaster work = new PersonInChargeMaster();
-                List<PersonInChargeMaster> workList = new List<PersonInChargeMaster>();
+                // æ‹…å½“è€…é…�å±žãƒ‡ãƒ¼ã‚¿æ›´æ–°
+                if (!AssignDataEntry(AssignDB))
+                {
+                    picDB.rollback();
+                    salaryDB.rollback();
+                    AssignDB.rollback();
+                    MessageBox.Show("æ‹…å½“è€…é…�å±žãƒ‡ãƒ¼ã‚¿æ›´æ–°ã�«å¤±æ•—ã�—ã�¾ã�—ã�Ÿã€‚", "ç™»éŒ²ã‚¨ãƒ©ãƒ¼", MessageBoxButtons.OK, MessageBoxIcon.Error);
+                    return false;
+                }
 
+                PersonInChargeMaster wrkRec = new PersonInChargeMaster();
+                List<PersonInChargeMaster> workGetList = new List<PersonInChargeMaster>();
+
                 // ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆ
-                SetPersonMasterData(picDB, ref work);
+                SetPersonMasterData(picDB, ref wrkRec);
 
                 // ãƒ‡ãƒ¼ã‚¿å­˜åœ¨ç¢ºèª�
-                string strWhere = string.Format(" Where PersonCode = {0}", work.PersonCode.ToString());
+                string strWhere = string.Format(" Where PersonCode = {0}", wrkRec.PersonCode.ToString());
 
-                if (!picDB.SelectAction(strWhere, ref workList, false))
+                if (!picDB.SelectAction(strWhere, ref workGetList, false))
                 {
                     picDB.rollback();
+                    salaryDB.rollback();
+                    AssignDB.rollback();
                     MessageBox.Show("æ‹…å½“è€…ãƒžã‚¹ã‚¿ç™»éŒ²ç¢ºèª�ã�«å¤±æ•—ã�—ã�¾ã�—ã�Ÿã€‚", "ç™»éŒ²ã‚¨ãƒ©ãƒ¼", MessageBoxButtons.OK, MessageBoxIcon.Error);
                     return false;
                 }
 
-                if (workList.Count == 0)
+                if (workGetList.Count == 0)
                 {
                     // è¡¨ç¤ºé †ã‚»ãƒƒãƒˆ
-                    work.DisplayOrder = picDB.SelectMaxDisplayCount("", false) + 1;
+                    wrkRec.DisplayOrder = picDB.SelectMaxDisplayCount("", false) + 1;
                     // ãƒ‡ãƒ¼ã‚¿ã�Œã�ªã�„å ´å�ˆ
-                    workList.Clear();
-                    workList.Add(work);
                     // ãƒ‡ãƒ¼ã‚¿ç™»éŒ²
-                    if (!picDB.InsertAction(workList, false))
+                    if (!picDB.InsertAction(wrkRec, false))
                     {
                         picDB.rollback();
+                        salaryDB.rollback();
+                        AssignDB.rollback();
                         MessageBox.Show("æ‹…å½“è€…ãƒžã‚¹ã‚¿ç™»éŒ²ã�«å¤±æ•—ã�—ã�¾ã�—ã�Ÿã€‚", "ç™»éŒ²ã‚¨ãƒ©ãƒ¼", MessageBoxButtons.OK, MessageBoxIcon.Error);
                         return false;
                     }
@@ -910,12 +1042,14 @@
                 else
                 {
                     // è¡¨ç¤ºé †ã‚»ãƒƒãƒˆ
-                    work.DisplayOrder = workList[0].DisplayOrder;
+                    wrkRec.DisplayOrder = workGetList[0].DisplayOrder;
                     // ãƒ‡ãƒ¼ã‚¿ã�Œã�‚ã‚‹å ´å�ˆ
                     // ãƒ‡ãƒ¼ã‚¿æ›´æ–°
-                    if (!picDB.UpdateAction(strWhere, work, false))
+                    if (!picDB.UpdateAction(strWhere, wrkRec, false))
                     {
                         picDB.rollback();
+                        salaryDB.rollback();
+                        AssignDB.rollback();
                         MessageBox.Show("æ‹…å½“è€…ãƒžã‚¹ã‚¿æ›´æ–°ã�«å¤±æ•—ã�—ã�¾ã�—ã�Ÿã€‚", "ç™»éŒ²ã‚¨ãƒ©ãƒ¼", MessageBoxButtons.OK, MessageBoxIcon.Error);
                         return false;
                     }
@@ -927,14 +1061,39 @@
                     picDB.rollback();
                     salaryDB.rollback();
                     pDepDB.rollback();
+                    AssignDB.rollback();
                     MessageBox.Show("å�‚ç…§éƒ¨ç½²ãƒžã‚¹ã‚¿æ›´æ–°ã�«å¤±æ•—ã�—ã�¾ã�—ã�Ÿã€‚", "ç™»éŒ²ã‚¨ãƒ©ãƒ¼", MessageBoxButtons.OK, MessageBoxIcon.Error);
                     return false;
                 }
 
+                // æ‹…å½“è€…éƒ¨ç½²å¤‰æ›´å‡¦ç�†
+                if(bChgDep && TergetPeriod.Count > 0)
+                {
+                    int nBDepCode = workGetList[0].DepartmentCode;
+                    int nADepCode = CommonMotions.cnvInt(cmbDepartment.SelectedValue);
+                    string strDepName = cmbDepartment.Text;
+                    if (!ChangePersonDep(BaseDB, DetailDB
+                                            , TergetPeriod, m_PersonCode
+                                            , nBDepCode, nADepCode, strDepName))
+                    {
+                        picDB.rollback();
+                        salaryDB.rollback();
+                        pDepDB.rollback();
+                        AssignDB.rollback();
+                        BaseDB.rollback();
+                        DetailDB.rollback();
+                        MessageBox.Show("å·¥äº‹æƒ…å ±ï¼šæ‹…å½“è€…éƒ¨ç½²æ›´æ–°ã�«å¤±æ•—ã�—ã�¾ã�—ã�Ÿã€‚", "ç™»éŒ²ã‚¨ãƒ©ãƒ¼", MessageBoxButtons.OK, MessageBoxIcon.Error);
+                        return false;
+                    }
+                }
+
                 // æˆ�åŠŸã�—ã�Ÿã‚‰commit
                 picDB.commit();
                 salaryDB.commit();
                 pDepDB.commit();
+                AssignDB.commit();
+                BaseDB.commit();
+                DetailDB.commit();
 
                 // ã‚³ãƒ¼ãƒ‰ã‚¯ãƒªã‚¢
                 m_PersonCode = 0;
@@ -951,10 +1110,318 @@
                 picDB.close(); picDB = null;
                 salaryDB.close(); salaryDB = null;
                 pDepDB.close(); pDepDB = null;
+                AssignDB.close(); AssignDB = null;
+                BaseDB.close(); BaseDB = null;
+                DetailDB.close(); DetailDB = null;
             }
         }
         #endregion
 
+        #region å·¥äº‹æƒ…å ±æ‹…å½“è€…éƒ¨ç½²ç¢ºèª�
+        /// <summary>
+        /// å·¥äº‹æƒ…å ±æ‹…å½“è€…éƒ¨ç½²ç¢ºèª�
+        /// </summary>
+        /// <returns></returns>
+        private bool DepChangeCheck(int PersonCode, ref List<int> PeriodList)
+        {
+            IOMPersonInCharge picDB = new IOMPersonInCharge();
+            IOConstructionBaseInfo BaseDB = new IOConstructionBaseInfo();
+            FrmCustomCount frm = new FrmCustomCount();
+            try
+            {
+                StringBuilder strSQL = new StringBuilder();
+                strSQL.AppendFormat(" Where PersonCode = {0}", PersonCode);
+                List<PersonInChargeMaster> GetList = new List<PersonInChargeMaster>();
+                if (!picDB.SelectAction(strSQL.ToString(), ref GetList)) return false;
+                if (GetList.Count < 1) return false;
+
+                // ç™»éŒ²ãƒ‡ãƒ¼ã‚¿ã�¨éƒ¨ç½²ã�Œé�•ã�ˆã�°å‡¦ç�†ã�™ã‚‹
+                if (GetList[0].DepartmentCode == CommonMotions.cnvInt(cmbDepartment.SelectedValue)) return false;
+
+                // å·¥äº‹æƒ…å ±ä»¶æ•°å�–å¾—
+                strSQL.Clear();
+                strSQL.Append("Select ConstructionPeriod, Count(*) From constructionbaseinfo");
+                strSQL.Append(" Where (");
+                strSQL.AppendFormat(" (SalesPersonCode = {0} And SalesDepCode = {1})", PersonCode, GetList[0].DepartmentCode);
+                strSQL.AppendFormat(" Or (ConstructionPersonCode = {0} And ConstrDepCode = {1})", PersonCode, GetList[0].DepartmentCode);
+                strSQL.AppendFormat(" Or (ConstrSubPersonCode = {0} And ConstrSubDepCode = {1})", PersonCode, GetList[0].DepartmentCode);
+                strSQL.AppendFormat(" Or (ConstructionInstructor = {0} And ConstrInstrDepCode = {1})", PersonCode, GetList[0].DepartmentCode);
+                strSQL.Append(")");
+                strSQL.Append(" Group By ConstructionPeriod");
+                strSQL.Append(" Order By ConstructionPeriod desc");
+                ArrayList arList = new ArrayList();
+                if (!BaseDB.ExecuteReader(strSQL.ToString(), ref arList)) return false;
+
+                // å·¥äº‹æƒ…å ±ä»¶æ•°ãƒ�ã‚§ãƒƒã‚¯
+                int nAllCnt = 0;
+                frm.arrayList.Clear();
+                foreach (object[] objRec in arList)
+                {
+                    nAllCnt += CommonMotions.cnvInt(objRec[1]);
+                    frm.arrayList.Add(new KeyValuePair<int, int>(CommonMotions.cnvInt(objRec[0])
+                                                                , CommonMotions.cnvInt(objRec[1])));
+                }
+                // å¯¾è±¡å·¥äº‹æƒ…å ±ã�Œ1ä»¶ã‚‚ç„¡ã�„å ´å�ˆ
+                if (nAllCnt < 1) return false;
+
+                // ã�‚ã‚Œã�°ã‚µãƒ–ãƒ•ã‚©ãƒ¼ãƒ ã‚’è¡¨ç¤ºã�™ã‚‹
+                frm.ShowDialog();
+                if (frm.ReturnValue == DialogResult.Cancel) return false;
+
+                // ãƒªã‚¹ãƒˆè¿½åŠ 
+                foreach (KeyValuePair<int, int> CurData in frm.arrayList)
+                {
+                    PeriodList.Add(CurData.Key);
+                }
+
+                return true;
+            }
+            catch (System.Exception ex)
+            {
+                logger.ErrorFormat("ã‚·ã‚¹ãƒ†ãƒ ã‚¨ãƒ©ãƒ¼ï¼š{0}ï¼š{1}", CommonMotions.GetMethodName(), ex.Message);
+                return false;
+            }
+            finally
+            {
+                picDB.close(); picDB = null;
+                BaseDB.close(); BaseDB = null;
+                frm.Dispose(); frm = null;
+            }
+        }
+        #endregion
+
+        #region æ‹…å½“è€…éƒ¨ç½²å¤‰æ›´å�–å¾—ãƒ‡ãƒ¼ã‚¿ä¸¦ã�³
+        /// <summary>
+        /// æ‹…å½“è€…éƒ¨ç½²å¤‰æ›´å�–å¾—ãƒ‡ãƒ¼ã‚¿ä¸¦ã�³
+        /// </summary>
+        private enum GetChgDepData
+        {
+            ConstronCode = 0
+            , ConstrPeriod
+            , SalesDepCode
+            , SalesPersonCode
+            , ConstrDepCode
+            , ConstPersonCode
+            , ConstrSubDepCode
+            , ConstrSubPersonCode
+            , ConstrInstrDepCode
+            , ConstructionInstructor
+        }
+        #endregion
+
+        #region æ‹…å½“è€…éƒ¨ç½²å¤‰æ›´å‡¦ç�†
+        /// <summary>
+        /// æ‹…å½“è€…éƒ¨ç½²å¤‰æ›´å‡¦ç�†
+        /// </summary>
+        /// <returns></returns>
+        private bool ChangePersonDep(IOConstructionBaseInfo BaseDB
+                                                    , IOConstructionBaseInfoDetail DetailDB
+                                                    , List<int> TergetPeriod
+                                                    , int PersonCode
+                                                    , int nBeforeDepCode, int nAfterDepCode, string strAfterDepName)
+        {
+            try
+            {
+                // å¯¾è±¡å¹´åˆ†ãƒ‡ãƒ¼ã‚¿ã‚’å�–å¾—ã�™ã‚‹
+                ArrayList arList = new ArrayList();
+                if (!ChgPersonDepGetData(BaseDB, TergetPeriod, PersonCode, ref arList)) return false;
+
+                // å·¥äº‹æƒ…å ±å¯¾è±¡éƒ¨ç½²ã‚³ãƒ¼ãƒ‰å¤‰æ›´
+                if (!ChgPersonDepBaseInfo(BaseDB, arList, PersonCode, nAfterDepCode)) return false;
+
+                // å·¥äº‹æƒ…å ±æ˜Žç´°å¯¾è±¡éƒ¨ç½²å��å¤‰æ›´
+                if (!ChgPersonDepBaseInfoDetail(DetailDB, arList, PersonCode, strAfterDepName)) return false;
+
+                return true;
+            }
+            catch (System.Exception ex)
+            {
+                logger.ErrorFormat("ã‚·ã‚¹ãƒ†ãƒ ã‚¨ãƒ©ãƒ¼ï¼š{0}ï¼š{1}", CommonMotions.GetMethodName(), ex.Message);
+                return false;
+            }
+        }
+        #endregion
+
+        #region æ‹…å½“è€…éƒ¨ç½²å¤‰æ›´å¯¾è±¡ãƒ‡ãƒ¼ã‚¿ã‚’å�–å¾—ã�™ã‚‹
+        /// <summary>
+        /// æ‹…å½“è€…éƒ¨ç½²å¤‰æ›´å¯¾è±¡ãƒ‡ãƒ¼ã‚¿ã‚’å�–å¾—ã�™ã‚‹
+        /// </summary>
+        /// <returns></returns>
+        private bool ChgPersonDepGetData(IOConstructionBaseInfo BaseDB
+                                        , List<int> TergetPeriod
+                                        , int PersonCode
+                                        , ref ArrayList arList)
+        {
+            try
+            {
+                // å¯¾è±¡å¹´åˆ†ãƒ‡ãƒ¼ã‚¿ã‚’å�–å¾—ã�™ã‚‹
+                StringBuilder strSQL = new StringBuilder();
+                strSQL.Append("Select");
+                strSQL.Append(" ConstructionCode");
+                strSQL.Append(", ConstructionPeriod");
+                strSQL.Append(", SalesDepCode");
+                strSQL.Append(", SalesPersonCode");
+                strSQL.Append(", ConstrDepCode");
+                strSQL.Append(", ConstructionPersonCode");
+                strSQL.Append(", ConstrSubDepCode");
+                strSQL.Append(", ConstrSubPersonCode");
+                strSQL.Append(", ConstrInstrDepCode");
+                strSQL.Append(", ConstructionInstructor");
+                strSQL.Append(" From");
+                strSQL.Append(" ConstructionBaseInfo");
+
+                strSQL.Append(" Where ConstructionPeriod In (");
+                bool bFirst = true;
+                foreach (int nCurPeriod in TergetPeriod)
+                {
+                    if (bFirst) strSQL.AppendFormat("{0}", nCurPeriod);
+                    else strSQL.AppendFormat(",{0}", nCurPeriod);
+                    bFirst = false;
+                }
+                strSQL.Append(")");
+
+                strSQL.AppendFormat(" And (SalesPersonCode = {0}", PersonCode);
+                strSQL.AppendFormat(" Or ConstructionPersonCode = {0}", PersonCode);
+                strSQL.AppendFormat(" Or ConstrSubPersonCode = {0}", PersonCode);
+                strSQL.AppendFormat(" Or ConstructionInstructor = {0})", PersonCode);
+                strSQL.Append(" Order By ConstructionCode");
+
+                if (!BaseDB.ExecuteReader(strSQL.ToString(), ref arList, false)) return false;
+
+                return true;
+            }
+            catch (System.Exception ex)
+            {
+                logger.ErrorFormat("ã‚·ã‚¹ãƒ†ãƒ ã‚¨ãƒ©ãƒ¼ï¼š{0}ï¼š{1}", CommonMotions.GetMethodName(), ex.Message);
+                return false;
+            }
+        }
+        #endregion
+
+        #region å·¥äº‹æƒ…å ±å¯¾è±¡éƒ¨ç½²ã‚³ãƒ¼ãƒ‰å¤‰æ›´
+        /// <summary>
+        /// å·¥äº‹æƒ…å ±å¯¾è±¡éƒ¨ç½²ã‚³ãƒ¼ãƒ‰å¤‰æ›´
+        /// </summary>
+        /// <returns></returns>
+        private bool ChgPersonDepBaseInfo(IOConstructionBaseInfo BaseDB
+                                            , ArrayList arList
+                                            , int PersonCode
+                                            , int nAfterDepCode)
+        {
+            try
+            {
+                StringBuilder strSQL = new StringBuilder();
+                strSQL.Append("Update constructionbaseinfo");
+                strSQL.Append(" SET");
+                strSQL.Append(" SalesDepCode = case SalesPersonCode");
+                strSQL.AppendFormat(" WHEN {0} THEN {1}", PersonCode, nAfterDepCode);
+                strSQL.Append(" ELSE SalesDepCode");
+                strSQL.Append(" END");
+                strSQL.Append(", ConstrDepCode = case ConstructionPersonCode");
+                strSQL.AppendFormat(" WHEN {0} THEN {1}", PersonCode, nAfterDepCode);
+                strSQL.Append(" ELSE ConstrDepCode");
+                strSQL.Append(" END");
+                strSQL.Append(", ConstrSubDepCode = case ConstrSubPersonCode");
+                strSQL.AppendFormat(" WHEN {0} THEN {1}", PersonCode, nAfterDepCode);
+                strSQL.Append(" ELSE ConstrSubDepCode");
+                strSQL.Append(" END");
+                strSQL.Append(", ConstrInstrDepCode = case ConstructionInstructor");
+                strSQL.AppendFormat(" WHEN {0} THEN {1}", PersonCode, nAfterDepCode);
+                strSQL.Append(" ELSE ConstrInstrDepCode");
+                strSQL.Append(" END");
+                strSQL.Append(", UpdateDate = NOW()");
+                strSQL.Append(" WHERE ConstructionCode IN (");
+
+                bool bFirst = true;
+                foreach (object[] objRec in arList)
+                {
+                    int nConstrCode = CommonMotions.cnvInt(objRec[(int)GetChgDepData.ConstronCode]);
+                    if (bFirst) strSQL.AppendFormat("{0}", nConstrCode);
+                    else strSQL.AppendFormat(",{0}", nConstrCode);
+                    bFirst = false;
+                }
+                strSQL.Append(" )");
+
+                if (!BaseDB.ExecuteNonQuery(strSQL.ToString(), false)) return false;
+
+                return true;
+            }
+            catch (System.Exception ex)
+            {
+                logger.ErrorFormat("ã‚·ã‚¹ãƒ†ãƒ ã‚¨ãƒ©ãƒ¼ï¼š{0}ï¼š{1}", CommonMotions.GetMethodName(), ex.Message);
+                return false;
+            }
+        }
+        #endregion
+
+        #region å·¥äº‹æƒ…å ±æ˜Žç´°å¯¾è±¡éƒ¨ç½²å��å¤‰æ›´
+        /// <summary>
+        /// å·¥äº‹æƒ…å ±æ˜Žç´°å¯¾è±¡éƒ¨ç½²å��å¤‰æ›´
+        /// </summary>
+        /// <returns></returns>
+        private bool ChgPersonDepBaseInfoDetail(IOConstructionBaseInfoDetail DetailDB
+                                                    , ArrayList arList
+                                                    , int PersonCode
+                                                    , string strAfterDepName)
+        {
+            try
+            {
+                StringBuilder strUpdateSQL = new StringBuilder();
+                strUpdateSQL.Append(" Update constructionbaseinfodetail SET");
+                StringBuilder strSQL = new StringBuilder();
+
+                // å·¥äº‹æƒ…å ±æ˜Žç´°å¯¾è±¡éƒ¨ç½²å��å¤‰æ›´
+                foreach (object[] objRec in arList)
+                {
+                    int nConstrCode = CommonMotions.cnvInt(objRec[(int)GetChgDepData.ConstronCode]);
+
+                    strSQL.Clear();
+                    if (CommonMotions.cnvInt(objRec[(int)GetChgDepData.SalesPersonCode]) == PersonCode)
+                    {
+                        strSQL.Append(strUpdateSQL.ToString());
+                        strSQL.AppendFormat(" DetailString = '{0}'", strAfterDepName);
+                        strSQL.AppendFormat(", UpdateDate = NOW()");
+                        strSQL.AppendFormat(" WHERE ConstructionCode = {0}", nConstrCode);
+                        strSQL.AppendFormat(" And DetailNo = {0};", (int)ConstructionBaseInfoDetail.DataNoDef.SalesDepartmentName);
+                    }
+                    if (CommonMotions.cnvInt(objRec[(int)GetChgDepData.ConstPersonCode]) == PersonCode)
+                    {
+                        strSQL.Append(strUpdateSQL.ToString());
+                        strSQL.AppendFormat(" DetailString = '{0}'", strAfterDepName);
+                        strSQL.AppendFormat(", UpdateDate = NOW()");
+                        strSQL.AppendFormat(" WHERE ConstructionCode = {0}", nConstrCode);
+                        strSQL.AppendFormat(" And DetailNo = {0};", (int)ConstructionBaseInfoDetail.DataNoDef.ConstrDepartmentName);
+                    }
+                    if (CommonMotions.cnvInt(objRec[(int)GetChgDepData.ConstrSubPersonCode]) == PersonCode)
+                    {
+                        strSQL.Append(strUpdateSQL.ToString());
+                        strSQL.AppendFormat(" DetailString = '{0}'", strAfterDepName);
+                        strSQL.AppendFormat(", UpdateDate = NOW()");
+                        strSQL.AppendFormat(" WHERE ConstructionCode = {0}", nConstrCode);
+                        strSQL.AppendFormat(" And DetailNo = {0};", (int)ConstructionBaseInfoDetail.DataNoDef.ConstrSubDepartmentName);
+                    }
+                    if (CommonMotions.cnvInt(objRec[(int)GetChgDepData.ConstructionInstructor]) == PersonCode)
+                    {
+                        strSQL.Append(strUpdateSQL.ToString());
+                        strSQL.AppendFormat(" DetailString = '{0}'", strAfterDepName);
+                        strSQL.AppendFormat(", UpdateDate = NOW()");
+                        strSQL.AppendFormat(" WHERE ConstructionCode = {0}", nConstrCode);
+                        strSQL.AppendFormat(" And DetailNo = {0};", (int)ConstructionBaseInfoDetail.DataNoDef.InstrDepartmentName);
+                    }
+
+                    if (!DetailDB.ExecuteNonQuery(strSQL.ToString(), false)) return false;
+                }
+
+                return true;
+            }
+            catch (System.Exception ex)
+            {
+                logger.ErrorFormat("ã‚·ã‚¹ãƒ†ãƒ ã‚¨ãƒ©ãƒ¼ï¼š{0}ï¼š{1}", CommonMotions.GetMethodName(), ex.Message);
+                return false;
+            }
+        }
+        #endregion
+
         #region æ‹…å½“è€…ãƒžã‚¹ã‚¿ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆ
         /// <summary>
         /// æ‹…å½“è€…ãƒžã‚¹ã‚¿ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆ
@@ -965,7 +1432,7 @@
             try
             {
                 // æ‹…å½“è€…ã‚³ãƒ¼ãƒ‰
-                work.PersonCode = CommonMotions.cnvInt(m_dispControl[(int)DispCtrl.PersonCode].Text.ToString());
+                work.PersonCode = CommonMotions.cnvInt(m_dispControl[(int)DispCtrl.PersonCode].Text);
 
                 // æ‹…å½“è€…å��
                 work.PersonName = m_dispControl[(int)DispCtrl.PersonName].Text.ToString();
@@ -996,11 +1463,11 @@
 
                 // æ©Ÿå¯†åŒºåˆ†
                 if (m_dispControl[(int)DispCtrl.SecManage].Text.Length != 0)
-                    work.SecCode = CommonMotions.cnvInt(((ComboBox)m_dispControl[(int)DispCtrl.SecManage]).SelectedValue.ToString());
+                    work.SecCode = CommonMotions.cnvInt(((ComboBox)m_dispControl[(int)DispCtrl.SecManage]).SelectedValue);
                 
                 // å·¥äº‹è©³ç´°å�°å¸³
                 if (m_dispControl[(int)DispCtrl.LedgerFlg].Text.Length != 0)
-                    work.LedgerFlg = CommonMotions.cnvInt(((ComboBox)m_dispControl[(int)DispCtrl.LedgerFlg]).SelectedValue.ToString());
+                    work.LedgerFlg = CommonMotions.cnvInt(((ComboBox)m_dispControl[(int)DispCtrl.LedgerFlg]).SelectedValue);
 
                 // é€šå‹¤è·�é›¢
                 work.CommutingDistance = CommonMotions.cnvDouble(m_dispControl[(int)DispCtrl.CommutingDistance].Text);
@@ -1023,7 +1490,7 @@
 
                 // éƒ¨ç½²ã‚³ãƒ¼ãƒ‰
                 if (m_dispControl[(int)DispCtrl.Department].Text.Length != 0)
-                    work.DepartmentCode = CommonMotions.cnvInt(((ComboBox)m_dispControl[(int)DispCtrl.Department]).SelectedValue.ToString());
+                    work.DepartmentCode = CommonMotions.cnvInt(((ComboBox)m_dispControl[(int)DispCtrl.Department]).SelectedValue);
 
                 // è³‡æ ¼æƒ…å ±
                 work.Qualification = m_dispControl[(int)DispCtrl.Qualification].Text.ToString();
@@ -1083,6 +1550,55 @@
         }
         #endregion
 
+        #region æ‹…å½“è€…é…�å±žãƒ‡ãƒ¼ã‚¿æ›´æ–°
+        /// <summary>
+        /// æ‹…å½“è€…é…�å±žãƒ‡ãƒ¼ã‚¿æ›´æ–°
+        /// </summary>
+        private bool AssignDataEntry(IOMChgChargeDep AssignDB)
+        {
+            try
+            {
+                // ã�¾ã�šå‰Šé™¤ã�™ã‚‹
+                string strSQL = AssignDB.CreatePrimarykeyString(m_PersonCode, DateTime.MinValue);
+                AssignDB.DeleteAction(strSQL, false);
+
+                DataGridView dgv = dgvAssignment;
+                foreach (DataGridViewRow wrkRow in dgv.Rows)
+                {
+                    DateTime StartDate = CommonMotions.cnvDate(wrkRow.Cells[0].Value);
+                    if (StartDate == DateTime.MinValue) continue;
+
+                    ChgChargeDep RowRec = new ChgChargeDep();
+                    RowRec.PersonCode = m_PersonCode;                                   // æ‹…å½“è€…ã‚³ãƒ¼ãƒ‰
+                    RowRec.StartDate = StartDate;                                       // é–‹å§‹å¹´æœˆæ—¥ä»˜
+                    // çµ‚äº†å¹´æœˆæ—¥ä»˜
+                    if (wrkRow.Index > 0)
+                    {
+                        int nRow = wrkRow.Index - 1;
+                        DateTime CompDate = CommonMotions.cnvDate(dgv.Rows[nRow].Cells[0].Value);
+                        RowRec.CompDate = CompDate.AddDays(-1);
+                    }
+                    else
+                    {
+                        if (m_dispControl[(int)DispCtrl.EndDate].Text.Length != 0)
+                            RowRec.CompDate = CommonMotions.cnvDate(m_dispControl[(int)DispCtrl.EndDate].Text);
+                    }
+                    RowRec.DepartmentCode = CommonMotions.cnvInt(wrkRow.Cells[2].Value);	// éƒ¨ç½²ã‚³ãƒ¼ãƒ‰
+                    RowRec.DepartmentName = CommonMotions.cnvString(wrkRow.Cells[1].Value); // éƒ¨ç½²å��
+
+                    if (!AssignDB.InsertAction(RowRec, false)) return false;
+                }
+
+                return true;
+            }
+            catch (System.Exception ex)
+            {
+                logger.ErrorFormat("ã‚·ã‚¹ãƒ†ãƒ ã‚¨ãƒ©ãƒ¼ï¼š{0}ï¼š{1}", CommonMotions.GetMethodName(), ex.Message);
+                return false;
+            }
+        }
+        #endregion
+
         #region å¯¾è±¡éƒ¨ç½²ãƒžã‚¹ã‚¿æ›´æ–°
         /// <summary>
         /// å¯¾è±¡éƒ¨ç½²ãƒžã‚¹ã‚¿æ›´æ–°
@@ -1101,7 +1617,7 @@
                 PersonDepartmentMaster depRec = new PersonDepartmentMaster();
                 depRec.PersonCode = m_PersonCode;                                           // æ‹…å½“è€…ã‚³ãƒ¼ãƒ‰
                 depRec.DepartmentCode = CommonMotions.cnvInt(cmbDepartment.SelectedValue);  // å¯¾è±¡éƒ¨ç½²ã‚³ãƒ¼ãƒ‰
-                depRec.AffiliationFlg = (int)PersonInChargeMaster.AffiFlgDef.Affiliation;       // æ‰€å±žãƒ•ãƒ©ã‚°
+                depRec.AffiliationFlg = (int)PersonInChargeMaster.AffiFlgDef.Affiliation;   // æ‰€å±žãƒ•ãƒ©ã‚°
                 if (!pDepDB.InsertAction(depRec, false)) return false;
 
                 // å�‚ç…§éƒ¨ç½²è¨­å®šç„¡ã�¯å‡¦ç�†ã�—ã�ªã�„
@@ -1109,14 +1625,19 @@
 
                 foreach (DataGridViewRow wrkRow in dgvRefDepartment.Rows)
                 {
+                    // ç©ºç™½è¡Œã�¯å‡¦ç�†ã�—ã�ªã�„
                     string RefDep = CommonMotions.cnvString(wrkRow.Cells[1].Value);
                     if (RefDep.Length == 0) continue;
+                    
+                    int nRowDepCode = CommonMotions.cnvInt(wrkRow.Cells[0].Value);
+                    // è‡ªéƒ¨ç½²ã�Œã‚°ãƒªãƒƒãƒ‰ã�«ã�‚ã‚Œã�°å‡¦ç�†ã�—ã�ªã�„
+                    if (nRowDepCode == depRec.DepartmentCode) continue;
 
                     PersonDepartmentMaster RowRec = new PersonDepartmentMaster();
 
-                    RowRec.PersonCode = m_PersonCode;                                           // æ‹…å½“è€…ã‚³ãƒ¼ãƒ‰
-                    RowRec.DepartmentCode = CommonMotions.cnvInt(wrkRow.Cells[0].Value);        // å¯¾è±¡éƒ¨ç½²ã‚³ãƒ¼ãƒ‰
-                    RowRec.AffiliationFlg = (int)PersonInChargeMaster.AffiFlgDef.Ohter;             // æ‰€å±žãƒ•ãƒ©ã‚°
+                    RowRec.PersonCode = m_PersonCode;                                       // æ‹…å½“è€…ã‚³ãƒ¼ãƒ‰
+                    RowRec.DepartmentCode = nRowDepCode;                                    // å¯¾è±¡éƒ¨ç½²ã‚³ãƒ¼ãƒ‰
+                    RowRec.AffiliationFlg = (int)PersonInChargeMaster.AffiFlgDef.Ohter;     // æ‰€å±žãƒ•ãƒ©ã‚°
                     if (!pDepDB.InsertAction(RowRec, false)) return false;
                 }
 
@@ -1130,6 +1651,85 @@
         }
         #endregion
 
+        #region æ‹…å½“è€…ãƒžã‚¹ã‚¿å‰Šé™¤å‡¦ç�†
+        /// <summary>
+        /// æ‹…å½“è€…ãƒžã‚¹ã‚¿å‰Šé™¤å‡¦ç�†
+        /// </summary>
+        private bool RemoveData()
+        {
+            IOMPersonInCharge picDB = new IOMPersonInCharge();
+            IOMChgChargeDep chgDepDB = new IOMChgChargeDep();
+            try
+            {
+                picDB.connect(); picDB.beginTran();
+                chgDepDB.connect(); chgDepDB.beginTran();
+
+                int PersonCode = CommonMotions.cnvInt(m_dispControl[(int)DispCtrl.PersonCode].Text);
+                StringBuilder strSQL = new StringBuilder();
+                strSQL.AppendFormat(" Where PersonCode = {0}", PersonCode);
+
+                // æ‹…å½“è€…ãƒžã‚¹ã‚¿ãƒ‡ãƒ¼ã‚¿å­˜åœ¨ç¢ºèª�
+                PersonInChargeMaster workRec = new PersonInChargeMaster();
+                if (!picDB.SelectAction(strSQL.ToString(), ref workRec, false))
+                {
+                    MessageBox.Show("æ‹…å½“è€…ãƒžã‚¹ã‚¿ï¼šå‰Šé™¤ç¢ºèª�ã�«å¤±æ•—ã�—ã�¾ã�—ã�Ÿã€‚", "å‰Šé™¤ã‚¨ãƒ©ãƒ¼", MessageBoxButtons.OK, MessageBoxIcon.Error);
+                    return false;
+                }
+
+                // æ‹…å½“è€…éƒ¨ç½²å±¥æ­´ãƒ‡ãƒ¼ã‚¿å­˜åœ¨ç¢ºèª�
+                strSQL.Append(" Order By StartDate DESC");
+                List<ChgChargeDep> chgDepList = new List<ChgChargeDep>();
+                if (!chgDepDB.SelectAction(strSQL.ToString(), ref chgDepList, false))
+                {
+                    MessageBox.Show("æ‹…å½“è€…éƒ¨ç½²å±¥æ­´ãƒ‡ãƒ¼ã‚¿ï¼šå‰Šé™¤ç¢ºèª�ã�«å¤±æ•—ã�—ã�¾ã�—ã�Ÿã€‚", "å‰Šé™¤ã‚¨ãƒ©ãƒ¼", MessageBoxButtons.OK, MessageBoxIcon.Error);
+                    return false;
+                }
+
+                // æ‹…å½“è€…ãƒžã‚¹ã‚¿ï¼šçµ‚äº†å¹´æœˆæ—¥ãƒ»å‰Šé™¤ãƒ•ãƒ©ã‚°æ›´æ–°
+                strSQL.Clear();
+                strSQL.Append("Update personinchargemaster");
+                strSQL.Append(" Set");
+                strSQL.Append(" EndDate = DATE(Now()), DeleteFlg = 1");
+                strSQL.AppendFormat(" Where PersonCode = {0}", workRec.PersonCode);
+                if (!picDB.ExecuteNonQuery(strSQL.ToString(), false))
+                {
+                    picDB.rollback();
+                    MessageBox.Show("æ‹…å½“è€…ãƒžã‚¹ã‚¿ï¼šå‰Šé™¤ã�«å¤±æ•—ã�—ã�¾ã�—ã�Ÿã€‚", "å‰Šé™¤ã‚¨ãƒ©ãƒ¼", MessageBoxButtons.OK, MessageBoxIcon.Error);
+                    return false;
+                }
+
+                // ä»Šå­£çµ‚äº†å¹´æœˆæ—¥ã‚’å�–å¾—ã�™ã‚‹
+                int TargetNo = CommonMotions.SystemMasterData.BusinessPeriod;
+                DateTime dtDefaultEnd = CommonMotions.GetOpeningEndDate(TargetNo, false);
+
+                // æ‹…å½“è€…éƒ¨ç½²å±¥æ­´ãƒ‡ãƒ¼ã‚¿ï¼šæœ€çµ‚ãƒ‡ãƒ¼ã‚¿çµ‚äº†å¹´æœˆæ—¥æ›´æ–°
+                if (!chgDepDB.UpdateFeild(PersonCode, chgDepList[0].StartDate, (int)IOMChgChargeDep.ColumnCnt.CompDate, dtDefaultEnd, false))
+                {
+                    picDB.rollback();
+                    chgDepDB.rollback();
+                    MessageBox.Show("æ‹…å½“è€…éƒ¨ç½²å±¥æ­´ãƒ‡ãƒ¼ã‚¿ï¼šå‰Šé™¤ã�«å¤±æ•—ã�—ã�¾ã�—ã�Ÿã€‚", "å‰Šé™¤ã‚¨ãƒ©ãƒ¼", MessageBoxButtons.OK, MessageBoxIcon.Error);
+                    return false;
+                }
+
+
+                picDB.commit();
+                chgDepDB.commit();
+
+                return true;
+            }
+            catch (System.Exception ex)
+            {
+                logger.ErrorFormat("ã‚·ã‚¹ãƒ†ãƒ ã‚¨ãƒ©ãƒ¼ï¼š{0}ï¼š{1}", CommonMotions.GetMethodName(), ex.Message);
+                return false;
+            }
+            finally
+            {
+                picDB.close(); picDB = null;
+                chgDepDB.close(); chgDepDB = null;
+            }
+        }
+        #endregion
+
         #region è¡¨ç¤ºã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆã�®å�–å¾—
         /// <summary>
         /// è¡¨ç¤ºã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆã�®å�–å¾—
@@ -1160,6 +1760,7 @@
             m_dispControl[(int)DispCtrl.SecurityManegement] = lblSecurtyManegement;
             m_dispControl[(int)DispCtrl.CommutingDistance] = txtInput11;
             m_dispControl[(int)DispCtrl.CommuteCosts] = txtInput12;
+            m_dispControl[(int)DispCtrl.AssignStDate] = txtInput13;
         }
         #endregion
 
@@ -1293,6 +1894,105 @@
         }
         #endregion
 
+        #region é…�å±žã‚°ãƒªãƒƒãƒ‰è¿½åŠ 
+        /// <summary>
+        /// é…�å±žã‚°ãƒªãƒƒãƒ‰è¿½åŠ 
+        /// </summary>
+        private void AssignGridDataAdd()
+        {
+            try
+            {
+                foreach(DataGridViewRow CurRow in dgvAssignment.Rows)
+                {
+                    foreach(DataGridViewCell CurCell in CurRow.Cells)
+                    {
+                        CommonMotions.chgBackColor(CurCell, true);
+                    }
+                }
+                
+                // ----- ãƒ‡ãƒ¼ã‚¿ãƒ�ã‚§ãƒƒã‚¯
+                bool bRet = true;
+                // é…�å±žå¹´æœˆæ—¥
+                bRet &= CommonMotions.DispFieldDateCheck(m_dispControl[(int)DispCtrl.AssignStDate], true);
+
+                // é�¸æŠžéƒ¨ç½²
+                CommonMotions.chgBackColor(cmbDepartment, true);
+                if (cmbDepartment.Text.Length < 1)
+                {
+                    bRet &= false;
+                    CommonMotions.chgBackColor(cmbDepartment, false);
+                }
+
+                if (!bRet)
+                {
+                    MessageBox.Show("é�¸æŠžã�•ã‚Œã�¦ã�„ã�¾ã�›ã‚“ã€�ç¢ºèª�ã�—ã�¦ã��ã� ã�•ã�„ã€‚", "ãƒ‡ãƒ¼ã‚¿ç¢ºèª�", MessageBoxButtons.OK, MessageBoxIcon.Error);
+                    return;
+                }
+
+                // ã‚°ãƒªãƒƒãƒ‰ãƒ‡ãƒ¼ã‚¿ãƒ�ã‚§ãƒƒã‚¯
+                DataGridView dgv = dgvAssignment;
+                DateTime TergetDate = CommonMotions.cnvDate(m_dispControl[(int)DispCtrl.AssignStDate].Text);
+                DataGridViewRow[] ValRow = dgv.Rows.Cast<DataGridViewRow>().Where(x => CommonMotions.cnvDate(x.Cells[(int)AssignGridColumn.StartData].Value).Date == TergetDate.Date)
+                                                                            .ToArray();
+                if (ValRow.Count() > 0)
+                {
+                    MessageBox.Show("å�Œã�˜æ—¥ä»˜ã�Œã�‚ã‚Šã�¾ã�™ã€�ç¢ºèª�ã�—ã�¦ã��ã� ã�•ã�„ã€‚", "ãƒ‡ãƒ¼ã‚¿ç¢ºèª�", MessageBoxButtons.OK, MessageBoxIcon.Error);
+                    return;
+                }
+
+                int nRowCnt = dgv.Rows.Add(m_dispControl[(int)DispCtrl.AssignStDate].Text
+                                            , cmbDepartment.Text
+                                            , cmbDepartment.SelectedValue);
+
+                dgv.Columns[0].SortMode = DataGridViewColumnSortMode.Automatic;
+                dgv.Sort(dgv.Columns[0], ListSortDirection.Descending);
+                dgv.Columns[0].SortMode = DataGridViewColumnSortMode.NotSortable;
+
+                m_dispControl[(int)DispCtrl.AssignStDate].Text = string.Empty;
+
+
+                m_bChengeAns = true;
+            }
+            catch (System.Exception ex)
+            {
+                logger.ErrorFormat("ã‚·ã‚¹ãƒ†ãƒ ã‚¨ãƒ©ãƒ¼ï¼š{0}ï¼š{1}", CommonMotions.GetMethodName(), ex.Message);
+            }
+        }
+        #endregion
+
+        #region é…�å±žã‚°ãƒªãƒƒãƒ‰å‰Šé™¤
+        /// <summary>
+        /// é…�å±žã‚°ãƒªãƒƒãƒ‰å‰Šé™¤
+        /// </summary>
+        private void AssignGridDataRemove(int RowCnt)
+        {
+            try
+            {
+                if (MessageBox.Show("é�¸æŠžè¡Œã�®ãƒ‡ãƒ¼ã‚¿ã�Œå‰Šé™¤ã�•ã‚Œã�¾ã�™ã€�ç¢ºèª�ã�—ã�¦ã��ã� ã�•ã�„ã€‚", "å‰Šé™¤ç¢ºèª�",
+                                    MessageBoxButtons.OKCancel, MessageBoxIcon.Question) == DialogResult.Cancel) return;
+
+                DataGridView dgv = dgvAssignment;
+                dgv.Rows.RemoveAt(RowCnt);
+
+                dgv.Columns[0].SortMode = DataGridViewColumnSortMode.Automatic;
+                dgv.Sort(dgv.Columns[0], ListSortDirection.Descending);
+                dgv.Columns[0].SortMode = DataGridViewColumnSortMode.NotSortable;
+
+                m_bChengeAns = true;
+            }
+            catch (System.Exception ex)
+            {
+                logger.ErrorFormat("ã‚·ã‚¹ãƒ†ãƒ ã‚¨ãƒ©ãƒ¼ï¼š{0}ï¼š{1}", CommonMotions.GetMethodName(), ex.Message);
+            }
+            finally
+            {
+                // ç©ºè¡Œè©°ã‚�
+                int count = s_FixRowsSalaryGrid - dgvAssignment.RowCount;
+                if (count > 0) dgvAssignment.RowCount += count;
+            }
+        }
+        #endregion
+
         #region çµ¦ä¸Žã‚°ãƒªãƒƒãƒ‰è¿½åŠ 
         /// <summary>
         /// çµ¦ä¸Žã‚°ãƒªãƒƒãƒ‰è¿½åŠ 
@@ -1335,11 +2035,13 @@
                 }
 
                 DataGridView dgv = dgvSalary;
-                dgv.Rows.Insert(0, 1);
+                dgv.Rows.Add(m_dispControl[(int)DispCtrl.SalaryStDate].Text
+                                , m_dispControl[(int)DispCtrl.MonthlySalary].Text
+                                , m_dispControl[(int)DispCtrl.YearSalary].Text);
 
-                dgv.Rows[0].Cells[(int)SalaryGridColumn.StartData].Value = m_dispControl[(int)DispCtrl.SalaryStDate].Text;
-                dgv.Rows[0].Cells[(int)SalaryGridColumn.MonthlySalary].Value = m_dispControl[(int)DispCtrl.MonthlySalary].Text;
-                dgv.Rows[0].Cells[(int)SalaryGridColumn.YearSalary].Value = m_dispControl[(int)DispCtrl.YearSalary].Text;
+                dgv.Columns[0].SortMode = DataGridViewColumnSortMode.Automatic;
+                dgv.Sort(dgv.Columns[0], ListSortDirection.Descending);
+                dgv.Columns[0].SortMode = DataGridViewColumnSortMode.NotSortable;
 
                 m_dispControl[(int)DispCtrl.SalaryStDate].Text = string.Empty;
                 m_dispControl[(int)DispCtrl.MonthlySalary].Text = string.Empty;
@@ -1368,6 +2070,10 @@
                 DataGridView dgv = dgvSalary;
                 dgv.Rows.RemoveAt(RowCnt);
 
+                dgv.Columns[0].SortMode = DataGridViewColumnSortMode.Automatic;
+                dgv.Sort(dgv.Columns[0], ListSortDirection.Descending);
+                dgv.Columns[0].SortMode = DataGridViewColumnSortMode.NotSortable;
+
                 m_bChengeAns = true;
             }
             catch (System.Exception ex)
Index: branches/src/ProcessManagement/ProcessManagement/Forms/Master/System/FrmBizHisList.Designer.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/Master/System/FrmBizHisList.Designer.cs	(revision 329)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/Master/System/FrmBizHisList.Designer.cs	(revision 330)
@@ -55,7 +55,7 @@
             this.label1.Name = "label1";
             this.label1.Size = new System.Drawing.Size(580, 20);
             this.label1.TabIndex = 6;
-            this.label1.Text = "é�Žã€€åŽ»ã€€å±¥ã€€æ­´ã€€ä¸€ã€€è¦§";
+            this.label1.Text = "å±¥ã€€æ­´ã€€ä¸€ã€€è¦§";
             this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
             // 
             // btnEnd
@@ -161,7 +161,7 @@
             this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 16F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.BackColor = System.Drawing.Color.Black;
-            this.ClientSize = new System.Drawing.Size(588, 310);
+            this.ClientSize = new System.Drawing.Size(584, 306);
             this.ControlBox = false;
             this.Controls.Add(this.dgvDispData);
             this.Controls.Add(this.btnEnd);
Index: branches/src/ProcessManagement/ProcessManagement/Forms/SubForms/FrmCustomCount.Designer.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/SubForms/FrmCustomCount.Designer.cs	(nonexistent)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/SubForms/FrmCustomCount.Designer.cs	(revision 330)
@@ -0,0 +1,190 @@
+ï»¿namespace ProcessManagement.Forms.SubForms
+{
+    partial class FrmCustomCount
+    {
+        /// <summary>
+        /// Required designer variable.
+        /// </summary>
+        private System.ComponentModel.IContainer components = null;
+
+        /// <summary>
+        /// Clean up any resources being used.
+        /// </summary>
+        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+        protected override void Dispose(bool disposing)
+        {
+            if (disposing && (components != null))
+            {
+                components.Dispose();
+            }
+            base.Dispose(disposing);
+        }
+
+        #region Windows Form Designer generated code
+
+        /// <summary>
+        /// Required method for Designer support - do not modify
+        /// the contents of this method with the code editor.
+        /// </summary>
+        private void InitializeComponent()
+        {
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
+            this.btnOK = new System.Windows.Forms.Button();
+            this.btnCANCEL = new System.Windows.Forms.Button();
+            this.dgvData = new ProcessManagement.Forms.CustomControls.DataGridViewEX();
+            this.Column1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.Column2 = new System.Windows.Forms.DataGridViewCheckBoxColumn();
+            this.Column3 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.Column7 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.label1 = new System.Windows.Forms.Label();
+            ((System.ComponentModel.ISupportInitialize)(this.dgvData)).BeginInit();
+            this.SuspendLayout();
+            // 
+            // btnOK
+            // 
+            this.btnOK.BackColor = System.Drawing.Color.Green;
+            this.btnOK.Font = new System.Drawing.Font("Century", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+            this.btnOK.ForeColor = System.Drawing.Color.White;
+            this.btnOK.Location = new System.Drawing.Point(149, 239);
+            this.btnOK.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
+            this.btnOK.Name = "btnOK";
+            this.btnOK.Size = new System.Drawing.Size(120, 30);
+            this.btnOK.TabIndex = 1;
+            this.btnOK.Text = "Oã€€K";
+            this.btnOK.UseVisualStyleBackColor = false;
+            this.btnOK.Click += new System.EventHandler(this.btnOK_Click);
+            // 
+            // btnCANCEL
+            // 
+            this.btnCANCEL.BackColor = System.Drawing.Color.Blue;
+            this.btnCANCEL.Font = new System.Drawing.Font("Century", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+            this.btnCANCEL.ForeColor = System.Drawing.Color.White;
+            this.btnCANCEL.Location = new System.Drawing.Point(277, 239);
+            this.btnCANCEL.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
+            this.btnCANCEL.Name = "btnCANCEL";
+            this.btnCANCEL.Size = new System.Drawing.Size(120, 30);
+            this.btnCANCEL.TabIndex = 1;
+            this.btnCANCEL.Text = "CANCEL";
+            this.btnCANCEL.UseVisualStyleBackColor = false;
+            this.btnCANCEL.Click += new System.EventHandler(this.btnCANCEL_Click);
+            // 
+            // dgvData
+            // 
+            this.dgvData.AllowUserToAddRows = false;
+            this.dgvData.AllowUserToDeleteRows = false;
+            this.dgvData.AllowUserToResizeColumns = false;
+            this.dgvData.AllowUserToResizeRows = false;
+            this.dgvData.BackgroundColor = System.Drawing.Color.White;
+            this.dgvData.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.dgvData.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle1;
+            this.dgvData.ColumnHeadersHeight = 24;
+            this.dgvData.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing;
+            this.dgvData.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
+            this.Column1,
+            this.Column2,
+            this.Column3,
+            this.Column7});
+            this.dgvData.EditMode = System.Windows.Forms.DataGridViewEditMode.EditProgrammatically;
+            this.dgvData.Location = new System.Drawing.Point(17, 7);
+            this.dgvData.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
+            this.dgvData.MultiSelect = false;
+            this.dgvData.Name = "dgvData";
+            this.dgvData.RowHeadersVisible = false;
+            this.dgvData.RowHeadersWidth = 22;
+            this.dgvData.RowHeadersWidthSizeMode = System.Windows.Forms.DataGridViewRowHeadersWidthSizeMode.DisableResizing;
+            this.dgvData.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.CellSelect;
+            this.dgvData.Size = new System.Drawing.Size(380, 176);
+            this.dgvData.TabIndex = 7;
+            // 
+            // Column1
+            // 
+            dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
+            dataGridViewCellStyle2.ForeColor = System.Drawing.Color.Black;
+            this.Column1.DefaultCellStyle = dataGridViewCellStyle2;
+            this.Column1.Frozen = true;
+            this.Column1.HeaderText = "â„–";
+            this.Column1.Name = "Column1";
+            this.Column1.ReadOnly = true;
+            this.Column1.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
+            this.Column1.Width = 60;
+            // 
+            // Column2
+            // 
+            this.Column2.HeaderText = "å¤‰æ›´";
+            this.Column2.Name = "Column2";
+            // 
+            // Column3
+            // 
+            dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
+            dataGridViewCellStyle3.ForeColor = System.Drawing.Color.Black;
+            this.Column3.DefaultCellStyle = dataGridViewCellStyle3;
+            this.Column3.HeaderText = "å¯¾è±¡æœŸ";
+            this.Column3.Name = "Column3";
+            this.Column3.ReadOnly = true;
+            this.Column3.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
+            // 
+            // Column7
+            // 
+            dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
+            dataGridViewCellStyle4.ForeColor = System.Drawing.Color.Black;
+            this.Column7.DefaultCellStyle = dataGridViewCellStyle4;
+            this.Column7.HeaderText = "ãƒ‡ãƒ¼ã‚¿ä»¶æ•°";
+            this.Column7.Name = "Column7";
+            this.Column7.ReadOnly = true;
+            // 
+            // label1
+            // 
+            this.label1.Font = new System.Drawing.Font("ï¼­ï¼³ æ˜Žæœ�", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
+            this.label1.ForeColor = System.Drawing.Color.Red;
+            this.label1.Location = new System.Drawing.Point(30, 191);
+            this.label1.Name = "label1";
+            this.label1.Size = new System.Drawing.Size(354, 44);
+            this.label1.TabIndex = 8;
+            this.label1.Text = "â€»å·¥äº‹æƒ…å ±ã�«å¤‰æ›´å‰�ã�®\r\néƒ¨ç½²æƒ…å ±ç™»éŒ²ã�Œã�‚ã‚Šã�¾ã�™ã€�å¤‰æ›´ã�—ã�¾ã�™ã�‹ï¼Ÿ";
+            this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
+            // 
+            // FrmCustomCount
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 16F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.BackColor = System.Drawing.Color.White;
+            this.ClientSize = new System.Drawing.Size(414, 274);
+            this.ControlBox = false;
+            this.Controls.Add(this.label1);
+            this.Controls.Add(this.dgvData);
+            this.Controls.Add(this.btnCANCEL);
+            this.Controls.Add(this.btnOK);
+            this.Font = new System.Drawing.Font("ï¼­ï¼³ æ˜Žæœ�", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
+            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
+            this.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
+            this.MaximizeBox = false;
+            this.MinimizeBox = false;
+            this.Name = "FrmCustomCount";
+            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
+            this.Load += new System.EventHandler(this.FrmCustomCount_Load);
+            ((System.ComponentModel.ISupportInitialize)(this.dgvData)).EndInit();
+            this.ResumeLayout(false);
+
+        }
+
+        #endregion
+        private System.Windows.Forms.Button btnOK;
+        private System.Windows.Forms.Button btnCANCEL;
+        private CustomControls.DataGridViewEX dgvData;
+        private System.Windows.Forms.DataGridViewTextBoxColumn Column1;
+        private System.Windows.Forms.DataGridViewCheckBoxColumn Column2;
+        private System.Windows.Forms.DataGridViewTextBoxColumn Column3;
+        private System.Windows.Forms.DataGridViewTextBoxColumn Column7;
+        private System.Windows.Forms.Label label1;
+    }
+}
\ No newline at end of file
Index: branches/src/ProcessManagement/ProcessManagement/Forms/SubForms/FrmCustomCount.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/SubForms/FrmCustomCount.cs	(nonexistent)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/SubForms/FrmCustomCount.cs	(revision 330)
@@ -0,0 +1,206 @@
+ï»¿using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Diagnostics;
+using System.Data;
+using System.Drawing;
+using System.Text;
+using System.Windows.Forms;
+using System.Collections;
+using System.Linq;
+
+using log4net;
+using log4net.Appender;
+using log4net.Repository.Hierarchy;
+
+using ProcessManagement.Common;
+using ProcessManagement.DB.IOAccess;
+using ProcessManagement.DataModel;
+using ProcessManagement.DB.Core;
+using ProcessManagement.Forms.Master;
+using ProcessManagement.Forms.SubForms;
+using ProcessManagement.Forms.ControlsAction;
+using ProcessManagement.Forms.CustomControls;
+//*---------------------------- ã‚«ã‚¹ã‚¿ãƒ ã‚«ã‚¦ãƒ³ãƒˆé�¸æŠž --------------------------*
+//  2018/03/24  Ver1.0.0.0      Create Source           
+//
+//
+//
+//*----------------------------------------------------------------------------*
+namespace ProcessManagement.Forms.SubForms
+{
+    public partial class FrmCustomCount : Form
+    {
+        #region ä½¿ç”¨å®šç¾©
+        //log4netãƒ­ã‚°ã‚’ä½¿ç”¨ã�™ã‚‹
+        private static readonly log4net.ILog logger = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
+        #endregion
+
+        #region å®šæ•°
+
+        #endregion
+
+        #region å¤‰æ•°
+
+        /// <summary>
+        /// å�—å�–ã‚¨ãƒªã‚¢
+        /// </summary>
+        private ArrayList m_arrayList = new ArrayList();
+
+        #endregion
+
+        #region ãƒ—ãƒ­ãƒ‘ãƒ†ã‚£
+
+        #region å�—å�–ã‚¨ãƒªã‚¢
+        /// <summary>
+        /// å�—å�–ã‚¨ãƒªã‚¢
+        /// </summary>
+        public ArrayList arrayList
+        {
+            get { return m_arrayList; }
+            set { m_arrayList = value; }
+        }
+        #endregion
+
+        #region æˆ»ã‚Šå€¤
+        /// <summary>
+        /// æˆ»ã‚Šå€¤
+        /// </summary>
+        public DialogResult ReturnValue;
+        #endregion
+
+        #endregion
+
+        #region ã‚³ãƒ³ã‚¹ãƒˆãƒ©ã‚¯ã‚¿
+        /// <summary>
+        /// ã‚³ãƒ³ã‚¹ãƒˆãƒ©ã‚¯ã‚¿
+        /// </summary>
+        public FrmCustomCount()
+        {
+            InitializeComponent();
+        }
+        #endregion
+
+        #region ãƒ•ã‚©ãƒ¼ãƒ ãƒ­ãƒ¼ãƒ‰
+        /// <summary>
+        /// ãƒ•ã‚©ãƒ¼ãƒ ãƒ­ãƒ¼ãƒ‰
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        private void FrmCustomCount_Load(object sender, EventArgs e)
+        {
+            // ãƒ‡ãƒ¼ã‚¿è¡¨ç¤ºå‡¦ç�†
+            DpsData();
+
+        }
+        #endregion
+
+        #region ï¼¯ï¼«ãƒœã‚¿ãƒ³ã‚¯ãƒªãƒƒã‚¯
+        /// <summary>
+        /// ï¼¯ï¼«ãƒœã‚¿ãƒ³ã‚¯ãƒªãƒƒã‚¯
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        private void btnOK_Click(object sender, EventArgs e)
+        {
+            if (MessageBox.Show("é�¸æŠžã�•ã‚Œã�Ÿãƒ‡ãƒ¼ã‚¿ã‚’æ›´æ–°ã�—ã�¾ã�™ã€‚"
+                                , "å®Ÿè¡Œç¢ºèª�"
+                                , MessageBoxButtons.OKCancel
+                                , MessageBoxIcon.Question) == DialogResult.Cancel) return;
+
+            // ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆ
+            GetSelectData();
+
+            ReturnValue = DialogResult.OK;
+            this.Close();
+        }
+        #endregion
+
+        #region ã‚­ãƒ£ãƒ³ã‚»ãƒ«ãƒœã‚¿ãƒ³ã‚¯ãƒªãƒƒã‚¯
+        /// <summary>
+        /// ã‚­ãƒ£ãƒ³ã‚»ãƒ«ãƒœã‚¿ãƒ³ã‚¯ãƒªãƒƒã‚¯
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        private void btnCANCEL_Click(object sender, EventArgs e)
+        {
+            if (MessageBox.Show("é�¸æŠžã�•ã‚Œã�Ÿãƒ‡ãƒ¼ã‚¿ã�®æ›´æ–°ã‚’ã�›ã�šã�«å‡¦ç�†ã‚’ç¶šè¡Œã�—ã�¾ã�™ã€‚"
+                                , "ã‚­ãƒ£ãƒ³ã‚»ãƒ«ç¢ºèª�"
+                                , MessageBoxButtons.OKCancel
+                                , MessageBoxIcon.Question) == DialogResult.Cancel) return;
+
+            ReturnValue = DialogResult.Cancel;
+            this.Close();
+        }
+        #endregion
+
+        #region ãƒ‡ãƒ¼ã‚¿è¡¨ç¤ºå‡¦ç�†
+        /// <summary>
+        /// ãƒ‡ãƒ¼ã‚¿è¡¨ç¤ºå‡¦ç�†
+        /// </summary>
+        private void DpsData()
+        {
+            try
+            {
+                DataGridView dgv = dgvData;
+
+                // ãƒ˜ãƒƒãƒ€ãƒ¼è‰²ã‚»ãƒƒãƒˆ
+                dgv.EnableHeadersVisualStyles = false;
+                dgv.ColumnHeadersDefaultCellStyle.ForeColor = Color.Black;
+                dgv.ColumnHeadersDefaultCellStyle.BackColor = Color.DarkGray;
+
+                int no = 1;
+                foreach (KeyValuePair<int,int> CurData in m_arrayList)
+                {
+                    int nPeriod = CurData.Key;
+                    int nCount = CurData.Value;
+                    bool bCheck = false;
+
+                    // ãƒ‡ãƒ¼ã�¯ç„¡ã�„ã�¯è¡¨ç¤ºã�—ã�ªã�„
+                    if (nCount < 1) continue;
+
+                    // ä»ŠæœŸã�¨æ�¥æœŸã�¯ãƒ�ã‚§ãƒƒã‚¯ï¼¯ï¼®
+                    if (nPeriod == CommonMotions.SystemMasterData.BusinessPeriod
+                        || nPeriod == (CommonMotions.SystemMasterData.BusinessPeriod + 1)) bCheck = true;
+
+                    int nRowCnt = dgv.Rows.Add(no++
+                                            , bCheck
+                                            , nPeriod
+                                            , nCount);
+                }
+            }
+            catch (System.Exception ex)
+            {
+                logger.ErrorFormat("ã‚·ã‚¹ãƒ†ãƒ ã‚¨ãƒ©ãƒ¼ï¼š{0}ï¼š{1}", CommonMotions.GetMethodName(), ex.Message);
+            }
+        }
+        #endregion
+
+        #region é�¸æŠžãƒ‡ãƒ¼ã‚¿å�–å¾—å‡¦ç�†
+        /// <summary>
+        /// é�¸æŠžãƒ‡ãƒ¼ã‚¿å�–å¾—å‡¦ç�†
+        /// </summary>
+        private void GetSelectData()
+        {
+            try
+            {
+                m_arrayList.Clear();
+
+                DataGridView dgv = dgvData;
+                foreach (DataGridViewRow CurRow in dgv.Rows)
+                {
+                    // ãƒ�ã‚§ãƒƒã‚¯ã�®ã�¿ã‚’è¿”ã�™
+                    if (!CommonMotions.cnvBool(CurRow.Cells[1].Value)) continue;
+
+                    // ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆ
+                    m_arrayList.Add(new KeyValuePair<int, int>(CommonMotions.cnvInt(CurRow.Cells[2].Value), 0));
+                }
+            }
+            catch (System.Exception ex)
+            {
+                logger.ErrorFormat("ã‚·ã‚¹ãƒ†ãƒ ã‚¨ãƒ©ãƒ¼ï¼š{0}ï¼š{1}", CommonMotions.GetMethodName(), ex.Message);
+            }
+        }
+        #endregion
+    }
+}
Index: branches/src/ProcessManagement/ProcessManagement/Forms/SubForms/FrmCustomCount.resx
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/SubForms/FrmCustomCount.resx	(nonexistent)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/SubForms/FrmCustomCount.resx	(revision 330)
@@ -0,0 +1,132 @@
+ï»¿<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <metadata name="Column1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="Column2.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="Column3.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="Column7.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+</root>
\ No newline at end of file
Index: branches/src/ProcessManagement/ProcessManagement/Forms/ZMenu/FrmMenu.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/ZMenu/FrmMenu.cs	(revision 329)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/ZMenu/FrmMenu.cs	(revision 330)
@@ -2036,6 +2036,9 @@
         {
             if (bGraphNotDrow) return;
 
+            // éƒ¨ç½²ã‚³ãƒ³ãƒœãƒœãƒƒã‚¯ã‚¹ã�¸ã‚»ãƒƒãƒˆã�™ã‚‹
+            SetcmbDepartment();
+
             DispSalesGraph();
         }
         #endregion
Index: branches/src/ProcessManagement/ProcessManagement/Forms/ZMenu/FrmMenuAuxiliary.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/ZMenu/FrmMenuAuxiliary.cs	(revision 329)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/ZMenu/FrmMenuAuxiliary.cs	(revision 330)
@@ -5904,28 +5904,17 @@
             IOMDepartment depDB = new IOMDepartment();
             try
             {
+                cmbDepartment.SelectedIndexChanged -= new EventHandler(cmbDepartment_SelectedIndexChanged);
+
                 cmbDepartment.DataSource = null;
                 cmbDepartment.Items.Clear();
                 cmbDepartment.Text = "";
 
+                int nTargetCount = CommonMotions.cnvInt(SalseGraphNum.Value);
+                // éƒ¨ç½²ãƒžã‚¹ã‚¿ã‚’æ¤œç´¢ã�™ã‚‹
                 StringBuilder strSQL = new StringBuilder();
-                // éƒ¨ç½²ãƒžã‚¹ã‚¿ã‚’æ¤œç´¢ã�™ã‚‹
-                strSQL.Append("SELECT A.DEPARTMENTCODE, A.DEPARTMENTSTRING, A.DISPLAYORDER, COUNT(*)");
-                strSQL.Append(" FROM DEPARTMENTMASTER A, PERSONINCHARGEMASTER B, CONSTRUCTIONBASEINFO C");
-                strSQL.Append(" WHERE A.DELETEFLG = 0");
+                CommonMotions.CreateDepCombBoxSQL(ref strSQL, nTargetCount);
 
-                if (CommonMotions.LoginUserData.PersonCode != CommonDefine.AdminCode)
-                {
-                    // å�‚ç…§éƒ¨ç½²ãƒžã‚¹ã‚¿ã‚ˆã‚Šå�–å¾—ã�™ã‚‹
-                    strSQL.Append(" AND A.DEPARTMENTCODE IN (SELECT A1.DEPARTMENTCODE FROM PERSONDEPARTMENTMASTER A1");
-                    strSQL.AppendFormat(" WHERE A1.PERSONCODE = {0})", CommonMotions.LoginUserData.PersonCode);
-                }
-
-                strSQL.Append(" AND A.DEPARTMENTCODE = B.DEPARTMENTCODE");
-                strSQL.Append(" AND B.PERSONCODE = C.CONSTRUCTIONPERSONCODE");
-                strSQL.Append(" GROUP BY A.DEPARTMENTCODE, A.DEPARTMENTSTRING, A.DISPLAYORDER");
-                strSQL.Append(" ORDER BY A.DISPLAYORDER ASC");
-
                 // éƒ¨ç½²ãƒžã‚¹ã‚¿èª­è¾¼
                 ArrayList arList = new ArrayList();
                 if (!depDB.ExecuteReader(strSQL.ToString(), ref arList)) return;
@@ -5953,6 +5942,7 @@
             finally
             {
                 depDB.close(); depDB = null;
+                cmbDepartment.SelectedIndexChanged += new EventHandler(cmbDepartment_SelectedIndexChanged);
             }
         }
         #endregion
@@ -5992,7 +5982,8 @@
 
                 strSQL.Append(" From");
                 strSQL.Append(" personinchargemaster AS Person");
-                strSQL.Append(" LEFT JOIN departmentmaster AS Dep ON Dep.DepartmentCode = Person.DepartmentCode");
+                strSQL.AppendFormat(" LEFT JOIN {0} AS Dep ON Dep.DepartmentCode = Person.DepartmentCode"
+                                        , CreateGraphDepSQL((int)SalseGraphNum.Value));
                 strSQL.Append(" LEFT JOIN constructionbaseinfo AS Constr ON Constr.ConstructionPersonCode = Person.PersonCode");
                 strSQL.Append(" LEFT JOIN constructionledger As Ledger ON Ledger.ConstructionCode = Constr.ConstructionCode");
 
@@ -6058,6 +6049,74 @@
         }
         #endregion
 
+        #region ã‚°ãƒ©ãƒ•ãƒ‡ãƒ¼ã‚¿éƒ¨ç½²å��å�–å¾—SQLä½œæˆ�
+        /// <summary>
+        /// ã‚°ãƒ©ãƒ•ãƒ‡ãƒ¼ã‚¿éƒ¨ç½²å��å�–å¾—SQLä½œæˆ�
+        /// </summary>
+        private string CreateGraphDepSQL(int nTargetCount)
+        {
+            try
+            {
+                StringBuilder strSQL = new StringBuilder();
+
+                strSQL.Append("(Select");
+                strSQL.Append(" A1.SalesDepCode As DEPARTMENTCODE");
+                strSQL.Append(", B1.DetailString As DEPARTMENTSTRING");
+                strSQL.Append(", ifnull(C1.DisplayOrder, 10) As DISPLAYORDER");
+                strSQL.Append(" From Constructionbaseinfo As A1");
+                strSQL.Append("  Inner Join constructionbaseinfodetail As B1");
+                strSQL.Append("        On B1.ConstructionCode = A1.ConstructionCode");
+                strSQL.AppendFormat("  And B1.DetailNo = {0}", (int)ConstructionBaseInfoDetail.DataNoDef.SalesDepartmentName);
+                strSQL.Append("  Left Join departmentmaster As C1");
+                strSQL.Append("       On C1.DepartmentCode = A1.SalesDepCode");
+                strSQL.AppendFormat(" Where A1.ConstructionPeriod = {0}", nTargetCount);
+
+                strSQL.Append(" Union Select");
+                strSQL.Append(" A2.ConstrDepCode As DEPARTMENTCODE");
+                strSQL.Append(" , B2.DetailString As DEPARTMENTSTRING");
+                strSQL.Append(" , ifnull(C2.DisplayOrder, 10) As DISPLAYORDER");
+                strSQL.Append(" From Constructionbaseinfo As A2");
+                strSQL.Append(" Inner Join constructionbaseinfodetail As B2");
+                strSQL.Append("       On B2.ConstructionCode = A2.ConstructionCode");
+                strSQL.AppendFormat(" And B2.DetailNo = {0}", (int)ConstructionBaseInfoDetail.DataNoDef.ConstrDepartmentName);
+                strSQL.Append(" Left Join departmentmaster As C2");
+                strSQL.Append("      On C2.DepartmentCode = A2.ConstrDepCode");
+                strSQL.AppendFormat(" Where A2.ConstructionPeriod = {0}", nTargetCount);
+
+                strSQL.Append(" Union Select");
+                strSQL.Append(" A3.ConstrSubDepCode As DEPARTMENTCODE");
+                strSQL.Append(", B3.DetailString As DEPARTMENTSTRING");
+                strSQL.Append(", ifnull(C3.DisplayOrder, 10) As DISPLAYORDER");
+                strSQL.Append(" From Constructionbaseinfo As A3");
+                strSQL.Append(" Inner Join constructionbaseinfodetail As B3");
+                strSQL.Append("       On B3.ConstructionCode = A3.ConstructionCode");
+                strSQL.AppendFormat(" And B3.DetailNo = {0}", (int)ConstructionBaseInfoDetail.DataNoDef.ConstrSubDepartmentName);
+                strSQL.Append(" Left Join departmentmaster As C3");
+                strSQL.Append("      On C3.DepartmentCode = A3.ConstrSubDepCode");
+                strSQL.AppendFormat(" Where A3.ConstructionPeriod = {0}", nTargetCount);
+
+                strSQL.Append(" Union Select");
+                strSQL.Append(" A4.ConstrInstrDepCode As DEPARTMENTCODE");
+                strSQL.Append(", B4.DetailString As DEPARTMENTSTRING");
+                strSQL.Append(", ifnull(C4.DisplayOrder, 10) As DISPLAYORDER");
+                strSQL.Append(" From Constructionbaseinfo As A4");
+                strSQL.Append(" Inner Join constructionbaseinfodetail As B4");
+                strSQL.Append("       On B4.ConstructionCode = A4.ConstructionCode");
+                strSQL.AppendFormat(" And B4.DetailNo = {0}", (int)ConstructionBaseInfoDetail.DataNoDef.InstrDepartmentName);
+                strSQL.Append(" Left Join departmentmaster As C4");
+                strSQL.Append("      On C4.DepartmentCode = A4.ConstrInstrDepCode");
+                strSQL.AppendFormat(" Where A4.ConstructionPeriod = {0})", nTargetCount);
+
+                return strSQL.ToString();
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("ã‚·ã‚¹ãƒ†ãƒ ã‚¨ãƒ©ãƒ¼ï¼š{0}ï¼š{1}", CommonMotions.GetMethodName(), ex.Message);
+                return string.Empty;
+            }
+        }
+        #endregion
+
         #region ãƒ‡ãƒ¼ã‚¿ã�®è¨­å®š
         /// <summary>
         /// ãƒ‡ãƒ¼ã‚¿ã�®è¨­å®š
Index: branches/src/ProcessManagement/ProcessManagement/ProcessManagement.csproj
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/ProcessManagement.csproj	(revision 329)
+++ branches/src/ProcessManagement/ProcessManagement/ProcessManagement.csproj	(revision 330)
@@ -148,6 +148,7 @@
     <Compile Include="DataModel\GridCellStyleMember.cs" />
     <Compile Include="DataModel\ConstrCharge.cs" />
     <Compile Include="DataModel\PersonApprovalDetail.cs" />
+    <Compile Include="DataModel\ChgChargeDep.cs" />
     <Compile Include="DataModel\SFPDataDetail.cs" />
     <Compile Include="DataModel\SFPData.cs" />
     <Compile Include="DataModel\AttendanceDailyData.cs" />
@@ -239,6 +240,7 @@
     <Compile Include="DB\IOAccess\IOMaterialTypes.cs" />
     <Compile Include="DB\IOAccess\IOMCategoryName.cs" />
     <Compile Include="DB\IOAccess\IOMBizPeriodHistory.cs" />
+    <Compile Include="DB\IOAccess\IOMChgChargeDep.cs" />
     <Compile Include="DB\IOAccess\IOPeriodAvoidance.cs" />
     <Compile Include="DB\IOAccess\IOPersonApprovalDetail.cs" />
     <Compile Include="DB\IOAccess\IOSFPDataDetail.cs" />
@@ -342,12 +344,6 @@
     <Compile Include="Forms\DataEntry\DepExpenssList\FrmDepExpenssListAuxiliary.cs">
       <SubType>Form</SubType>
     </Compile>
-    <Compile Include="Forms\DataEntry\ConstructionLedger\FrmSelectPerson.cs">
-      <SubType>Form</SubType>
-    </Compile>
-    <Compile Include="Forms\DataEntry\ConstructionLedger\FrmSelectPerson.Designer.cs">
-      <DependentUpon>FrmSelectPerson.cs</DependentUpon>
-    </Compile>
     <Compile Include="Forms\DataEntry\DRConstruction\PrintCommon.cs">
       <SubType>Form</SubType>
     </Compile>
@@ -806,6 +802,9 @@
     <Compile Include="Forms\Master\CategoryName\FrmCategoryNameMaster.designer.cs">
       <DependentUpon>FrmCategoryNameMaster.cs</DependentUpon>
     </Compile>
+    <Compile Include="Forms\Master\Department\FrmDepartmentAux.cs">
+      <SubType>Form</SubType>
+    </Compile>
     <Compile Include="Forms\Master\Material\MaterialItemsMaster\FrmMaterialItemsMaster.cs">
       <SubType>Form</SubType>
     </Compile>
@@ -857,6 +856,12 @@
     <Compile Include="Forms\Master\System\FrmBizHisList.Designer.cs">
       <DependentUpon>FrmBizHisList.cs</DependentUpon>
     </Compile>
+    <Compile Include="Forms\SubForms\FrmCustomCount.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="Forms\SubForms\FrmCustomCount.Designer.cs">
+      <DependentUpon>FrmCustomCount.cs</DependentUpon>
+    </Compile>
     <Compile Include="Forms\SubForms\FrmCustomMsgBox.cs">
       <SubType>Form</SubType>
     </Compile>
@@ -1454,9 +1459,6 @@
     <EmbeddedResource Include="Forms\DataEntry\DepExpenssList\FrmDepExpenssList.resx">
       <DependentUpon>FrmDepExpenssList.cs</DependentUpon>
     </EmbeddedResource>
-    <EmbeddedResource Include="Forms\DataEntry\ConstructionLedger\FrmSelectPerson.resx">
-      <DependentUpon>FrmSelectPerson.cs</DependentUpon>
-    </EmbeddedResource>
     <EmbeddedResource Include="Forms\DataEntry\DRList\FrmDRList.resx">
       <DependentUpon>FrmDRList.cs</DependentUpon>
     </EmbeddedResource>
@@ -1592,6 +1594,9 @@
     <EmbeddedResource Include="Forms\Master\System\FrmBizHisList.resx">
       <DependentUpon>FrmBizHisList.cs</DependentUpon>
     </EmbeddedResource>
+    <EmbeddedResource Include="Forms\SubForms\FrmCustomCount.resx">
+      <DependentUpon>FrmCustomCount.cs</DependentUpon>
+    </EmbeddedResource>
     <EmbeddedResource Include="Forms\SubForms\FrmCustomMsgBox.resx">
       <DependentUpon>FrmCustomMsgBox.cs</DependentUpon>
     </EmbeddedResource>
@@ -1757,6 +1762,9 @@
     <EmbeddedResource Include="Forms\SubForms\Material\FrmMaterialSelect.resx">
       <DependentUpon>FrmMaterialSelect.cs</DependentUpon>
     </EmbeddedResource>
+    <EmbeddedResource Include="Forms\TestForm\Form1.resx">
+      <DependentUpon>Form1.cs</DependentUpon>
+    </EmbeddedResource>
     <EmbeddedResource Include="Forms\ZMenu\FrmChangePassword.resx">
       <DependentUpon>FrmChangePassword.cs</DependentUpon>
     </EmbeddedResource>
Index: branches/src/ProcessManagement/ProcessManagement/Properties/AssemblyInfo.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Properties/AssemblyInfo.cs	(revision 329)
+++ branches/src/ProcessManagement/ProcessManagement/Properties/AssemblyInfo.cs	(revision 330)
@@ -32,7 +32,7 @@
 // ã�™ã�¹ã�¦ã�®å€¤ã‚’æŒ‡å®šã�™ã‚‹ã�‹ã€�ä¸‹ã�®ã‚ˆã�†ã�« '*' ã‚’ä½¿ã�£ã�¦ãƒ“ãƒ«ãƒ‰ã�Šã‚ˆã�³ãƒªãƒ“ã‚¸ãƒ§ãƒ³ç•ªå�·ã‚’ 
 // æ—¢å®šå€¤ã�«ã�™ã‚‹ã�“ã�¨ã�Œã�§ã��ã�¾ã�™:
 // [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.0.1.154")]
-[assembly: AssemblyFileVersion("1.0.1.154")]
+[assembly: AssemblyVersion("1.0.1.155")]
+[assembly: AssemblyFileVersion("1.0.1.155")]
 // Log4netã‚’ä½¿ç”¨ã�™ã‚‹
 [assembly: log4net.Config.XmlConfigurator(ConfigFile = @"log4net.config", Watch = true)]
\ No newline at end of file
