Index: branches/src/ProcessManagement/ProcessManagement/Common/CommonMotions.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Common/CommonMotions.cs	(revision 364)
+++ branches/src/ProcessManagement/ProcessManagement/Common/CommonMotions.cs	(revision 365)
@@ -2986,16 +2986,17 @@
                 bool bFirst = true;
                 foreach (object[] ObjRec in TargetList)
                 {
+                    int DepartmentCode = CommonMotions.cnvInt(ObjRec[(int)CommonLedgerData.GetPersonTerm.DepartmentCode]);
                     int PersonCode = CommonMotions.cnvInt(ObjRec[(int)CommonLedgerData.GetPersonTerm.PersonCode]);
+                    int nKeyCode = (DepartmentCode * 100000000) + PersonCode;
                     DateTime dtStart = CommonMotions.cnvDate(ObjRec[(int)CommonLedgerData.GetPersonTerm.StartDate]);
                     DateTime dtLast = CommonMotions.cnvDate(ObjRec[(int)CommonLedgerData.GetPersonTerm.CompDate]);
 
                     if (!bFirst) strSQL.Append(" UNION ");
 
-                    strSQL.AppendFormat("SELECT {0} As LinkKey, SUM(SAL{0}.SALARY) FROM", PersonCode);
+                    strSQL.AppendFormat("SELECT {0} As LinkKey, SUM(SAL{0}.SALARY) FROM", nKeyCode);
 
                     strSQL.Append(" (SELECT AX.hiduke,");
-                    //strSQL.AppendFormat(" ROUND((AX.salary * {0}) / DATE_FORMAT(LAST_DAY(AX.hiduke), '%d')) AS SALARY,", CommonDefine.s_SalaryCorrection);
                     strSQL.AppendFormat(" ROUND((AX.salary * {0}) / 30) AS SALARY,", CommonDefine.s_SalaryCorrection);
                     strSQL.Append(" MAX(AX.StartD) FROM");
                     strSQL.Append(" (SELECT A.d hiduke, B.MonthlySalary salary, B.STARTDATE StartD FROM");
@@ -3065,7 +3066,7 @@
                     strSQL.Append(" ORDER BY A.d, B.STARTDATE DESC) AS AX");
                     strSQL.Append(" GROUP BY AX.hiduke");
                     strSQL.Append(" ORDER BY AX.hiduke");
-                    strSQL.AppendFormat(" ) AS SAL{0}", PersonCode);
+                    strSQL.AppendFormat(" ) AS SAL{0}", nKeyCode);
 
                     bFirst = false;
                 }
@@ -3106,6 +3107,7 @@
                 int PrevTargetYear = (TargetYear - 1);
                 if (PrevTargetYear < 1) return;
 
+                List<KeyValuePair<int, int>> wrkManCode = new List<KeyValuePair<int, int>>();
                 List<KeyValuePair<DateTime, DateTime>> wrkStEdDate = new List<KeyValuePair<DateTime, DateTime>>();
                 bool bFirst = true;
                 StringBuilder strSQL = new StringBuilder();
@@ -3120,9 +3122,14 @@
                                         CommonMotions.cnvDate(ObjRec[(int)CommonLedgerData.GetPersonTerm.HireCompDays]),
                                         CommonMotions.cnvDate(ObjRec[(int)CommonLedgerData.GetPersonTerm.NextStartDate]),
                                         CommonMotions.cnvDate(ObjRec[(int)CommonLedgerData.GetPersonTerm.NextCompDate]),
+                                        CommonMotions.cnvDate(ObjRec[(int)CommonLedgerData.GetPersonTerm.DepHistoryStartDate]),
+                                        CommonMotions.cnvDate(ObjRec[(int)CommonLedgerData.GetPersonTerm.DepHistoryCompDate]),
                                         ref stDate, ref edDate);
 
+                    int nDepCode = CommonMotions.cnvInt(ObjRec[(int)CommonLedgerData.GetPersonTerm.DepartmentCode]);
                     int nPersonCode = CommonMotions.cnvInt(ObjRec[(int)CommonLedgerData.GetPersonTerm.PersonCode]);
+
+                    wrkManCode.Add(new KeyValuePair<int,int>(nDepCode, nPersonCode));
                     wrkStEdDate.Add(new KeyValuePair<DateTime, DateTime>(stDate, edDate));
 
                     // ä»ŠæœŸã�®æœ€åˆ�ã�Œå…ˆæœŸã�®æœ€å¾Œã‚ˆã‚Šå¤§ã��ã�„å ´å�ˆã�¯å‡¦ç�†ã�—ã�ªã�„
@@ -3189,25 +3196,41 @@
                 if (!SalDB.ExecuteReader(strSQL.ToString(), ref ArData)) return;
 
                 int DateCnt = 0;
+                int NextDiffDay = 0;
+                int PrevDiffDay = 0;
                 foreach (object[] ObjRec in TargetList)
                 {
+                    int nDepCode = CommonMotions.cnvInt(ObjRec[(int)CommonLedgerData.GetPersonTerm.DepartmentCode]);
                     int nPersonCode = CommonMotions.cnvInt(ObjRec[(int)CommonLedgerData.GetPersonTerm.PersonCode]);
 
                     // å�Šç«¯åˆ†ã�®æ—¥æ•°ã‚’å�–å¾—ã�™ã‚‹
-                    int NextDiffDay = ArData.Cast<object[]>().Where(x => CommonMotions.cnvInt(x[0]) == TargetYear
+                    NextDiffDay = 0;
+                    PrevDiffDay = 0;
+                    NextDiffDay = ArData.Cast<object[]>().Where(x => CommonMotions.cnvInt(x[0]) == TargetYear
                                                                     && CommonMotions.cnvInt(x[2]) == nPersonCode)
                                                             .Sum(y => CommonMotions.cnvInt(y[7]));
 
                     // å…ˆæœŸã�®å�Šç«¯åˆ†ã�®æ—¥æ•°ã‚’å�–å¾—ã�™ã‚‹
-                    int PrevDiffDay = ArData.Cast<object[]>().Where(x => CommonMotions.cnvInt(x[0]) == PrevTargetYear
+                    PrevDiffDay = ArData.Cast<object[]>().Where(x => CommonMotions.cnvInt(x[0]) == PrevTargetYear
                                                                     && CommonMotions.cnvInt(x[2]) == nPersonCode)
                                                             .Sum(y => CommonMotions.cnvInt(y[7]));
+                    // å�Œã�˜ãƒ‡ãƒ¼ã‚¿ã‚’æŽ¢ã�™
+                    DateCnt = 0;
+                    foreach (KeyValuePair<int, int> CurRec in wrkManCode)
+                    {
+                        if (CurRec.Key == nDepCode && CurRec.Value == nPersonCode) break;
+                        DateCnt++;
+                    }
+                    KeyValuePair<DateTime, DateTime> CurStEd = wrkStEdDate[DateCnt];
 
-                    KeyValuePair<DateTime, DateTime> CurStEd = wrkStEdDate[DateCnt++];
+                    DateTime dtDepMove = CommonMotions.cnvDate(ObjRec[(int)CommonLedgerData.GetPersonTerm.DepHistoryStartDate]);
+                    
                     // ä»ŠæœŸçµ‚äº†æ—¥å¤‰æ›´
                     DateTime wrkDate = CurStEd.Value.AddDays(NextDiffDay);
                     if (dtDefaultEnd.Date < wrkDate.Date) wrkDate = dtDefaultEnd;
                     ObjRec[(int)CommonLedgerData.GetPersonTerm.CompDate] = wrkDate;
+
+                    if (dtDepMove.Date == CurStEd.Key.Date) PrevDiffDay = 0;    // éƒ¨ç½²ç§»å‹•æ—¥ã�Œã‚»ãƒƒãƒˆã�•ã‚Œã�¦ã�„ã‚‹å ´å�ˆã�¯æ—¥ä»˜ã‚’å¤‰ã�ˆã�ªã�„
                     // ä»ŠæœŸé–‹å§‹æ—¥å¤‰æ›´
                     wrkDate = CurStEd.Key.AddDays(PrevDiffDay);
                     if (dtDefaultEnd.Date < wrkDate.Date) wrkDate = dtDefaultEnd;
@@ -3230,25 +3253,29 @@
                                         DateTime dtDefaultStart, DateTime dtDefaultEnd,
                                         DateTime HireStartDate, DateTime HireCompDate,
                                         DateTime NextStartDate, DateTime NextCompDate,
+                                        DateTime DepHisStDate, DateTime DepHisCompDate,
                                         ref DateTime StartDate, ref DateTime CompDate)
         {
             try
             {
                 // ----- è¨ˆç®—é–‹å§‹æ—¥ã‚»ãƒƒãƒˆ
-                if (StartDate == DateTime.MinValue)
+                if (StartDate.Date == DateTime.MinValue.Date)
                 {
                     StartDate = dtDefaultStart;
                 }
-                else if (dtDefaultStart <= HireStartDate && HireStartDate <= dtDefaultEnd)
+                else if (dtDefaultStart.Date <= HireStartDate.Date && HireStartDate.Date <= dtDefaultEnd.Date)
                 {
                     StartDate = HireStartDate;
                 }
-                else if (dtDefaultStart < StartDate)
+                else if (dtDefaultStart.Date < StartDate.Date)
                 {
                     StartDate = dtDefaultStart;
                 }
                 // å…¥ç¤¾æ—¥ã�ŒæœŸå†…ã�ªã‚‰ã�°é–‹å§‹ã‚’å…¥ç¤¾æ—¥ã�«ã�™ã‚‹
-                if (dtDefaultStart < HireStartDate && HireStartDate < dtDefaultEnd) StartDate = HireStartDate;
+                if (dtDefaultStart.Date < HireStartDate && HireStartDate.Date < dtDefaultEnd.Date)
+                {
+                    StartDate = HireStartDate;
+                }
 
                 // ----- è¨ˆç®—çµ‚äº†æ—¥ã‚»ãƒƒãƒˆ
                 // Defaultã�¯æœŸæœ«
@@ -3255,13 +3282,34 @@
                 CompDate = dtDefaultEnd;
 
                 // é€€ç¤¾æ—¥ã�ŒæœŸå†…ã�ªã‚‰ã�°çµ‚äº†ã‚’é€€ç¤¾æ—¥ã�«ã�™ã‚‹
-                if (dtDefaultStart < HireCompDate && HireCompDate < dtDefaultEnd) CompDate = HireCompDate;
+                if (dtDefaultStart.Date < HireCompDate.Date && HireCompDate.Date < dtDefaultEnd.Date)
+                {
+                    CompDate = HireCompDate;
+                }
 
                 // æ�¥å­£ã�®é–‹å§‹ã�Œã�‚ã�£ã�¦æœŸæœ«æ—¥ã‚ˆã‚Šå°�ã�•ã�„å ´å�ˆã�¯ç½®ã��æ�›ã�ˆã‚‹
-                if (NextStartDate != DateTime.MinValue)
+                if (NextStartDate.Date != DateTime.MinValue.Date)
                 {
-                    if (StartDate < NextStartDate && NextStartDate < CompDate) CompDate = NextStartDate.AddDays(-1);
+                    if (StartDate.Date < NextStartDate.Date && NextStartDate.Date < CompDate.Date)
+                    {
+                        CompDate = NextStartDate.AddDays(-1);
+                    }
                 }
+
+                // ----- éƒ¨ç½²ç§»å‹•ã�Œã�‚ã‚Œã�°ã��ã�¡ã‚‰ã�®å¹´æœˆæ—¥ã‚’ä½¿ç”¨ã�™ã‚‹
+                // ç§»å‹•é–‹å§‹å¹´æœˆæ—¥ã�Œä»ŠæœŸã�ªã‚‰ã�°ã‚»ãƒƒãƒˆã�™ã‚‹
+                if (dtDefaultStart.Date <= DepHisStDate.Date && DepHisStDate.Date <= dtDefaultEnd.Date)
+                {
+                    if (StartDate.Date < DepHisStDate.Date) StartDate = DepHisStDate;
+                }
+
+                // ç§»å‹•çµ‚äº†å¹´æœˆæ—¥ã�Œä»ŠæœŸã�ªã‚‰ã�°ã‚»ãƒƒãƒˆã�™ã‚‹
+                if (dtDefaultStart.Date <= DepHisCompDate.Date && DepHisCompDate.Date <= dtDefaultEnd.Date)
+                {
+                    if (DepHisCompDate.Date < CompDate.Date) CompDate = DepHisCompDate;
+                }
+
+
             }
             catch (Exception ex)
             {
@@ -3583,6 +3631,7 @@
                 strSQL.AppendFormat(" OR DATE('{0}') = DATE(B.CompDate)))", DateTime.MinValue.ToShortDateString());
 
                 strSQL.AppendFormat(" AND A.PersonCode = {0}", nPersonCode);
+                strSQL.Append(" Order By B.ComplateDate desc");
             }
             catch (Exception ex)
             {
Index: branches/src/ProcessManagement/ProcessManagement/Common/CommonVersion.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Common/CommonVersion.cs	(revision 364)
+++ branches/src/ProcessManagement/ProcessManagement/Common/CommonVersion.cs	(revision 365)
@@ -14,7 +14,7 @@
         /// <summary>
         /// æœ¬ä½“ãƒ�ãƒ¼ã‚¸ãƒ§ãƒ³
         /// </summary>
-        public static int s_SystemVersion = 217;
+        public static int s_SystemVersion = 220;
 
         /// <summary>
         /// ã‚³ãƒ”ãƒ¼ãƒ»ç’°å¢ƒãƒ�ãƒ¼ã‚¸ãƒ§ãƒ³
Index: branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstractionList/FrmConstructionList.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstractionList/FrmConstructionList.cs	(revision 364)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstractionList/FrmConstructionList.cs	(revision 365)
@@ -293,19 +293,24 @@
         /// <param name="e"></param>
         private void numUDConstPro_ValueChanged(object sender, EventArgs e)
         {
-            // ƒCƒxƒ“ƒgƒNƒŠƒA
-            SubControlEvent();
+            try
+            {
+                // ƒCƒxƒ“ƒgƒNƒŠƒA
+                SubControlEvent();
 
-            // •”��ƒRƒ“ƒ{ƒ{ƒbƒNƒX•Ï�X
-            SetcmbDepartment();
-            // ’S“–ŽÒƒRƒ“ƒ{ƒ{ƒbƒNƒX•Ï�X
-            SetcmbPersons();
+                // •”��ƒRƒ“ƒ{ƒ{ƒbƒNƒX•Ï�X
+                SetcmbDepartment();
+                // ’S“–ŽÒƒRƒ“ƒ{ƒ{ƒbƒNƒX•Ï�X
+                SetcmbPersons();
 
-            // ƒf�[ƒ^•\Ž¦
-            DataDisplay();
-
-            // ƒCƒxƒ“ƒgƒZƒbƒg
-            SetControlEvent();
+                // ƒf�[ƒ^•\Ž¦
+                DataDisplay();
+            }
+            finally
+            {
+                // ƒCƒxƒ“ƒgƒZƒbƒg
+                SetControlEvent();
+            }
         }
         #endregion
 
@@ -317,17 +322,22 @@
         /// <param name="e"></param>
         private void cmbDepartment_SelectedIndexChanged(object sender, EventArgs e)
         {
-            // ƒCƒxƒ“ƒgƒNƒŠƒA
-            SubControlEvent();
+            try
+            {
+                // ƒCƒxƒ“ƒgƒNƒŠƒA
+                SubControlEvent();
 
-            // ’S“–ŽÒƒRƒ“ƒ{ƒ{ƒbƒNƒX•Ï�X
-            SetcmbPersons();
+                // ’S“–ŽÒƒRƒ“ƒ{ƒ{ƒbƒNƒX•Ï�X
+                SetcmbPersons();
 
-            // ƒf�[ƒ^•\Ž¦
-            DataDisplay();
-
-            // ƒCƒxƒ“ƒgƒZƒbƒg
-            SetControlEvent();
+                // ƒf�[ƒ^•\Ž¦
+                DataDisplay();
+            }
+            finally
+            {
+                // ƒCƒxƒ“ƒgƒZƒbƒg
+                SetControlEvent();
+            }
         }
 
         #endregion
@@ -340,17 +350,22 @@
         /// <param name="e"></param>
         private void cmbConstructionPerson_SelectedIndexChanged(object sender, EventArgs e)
         {
-            // ƒCƒxƒ“ƒgƒNƒŠƒA
-            SubControlEvent();
+            try
+            {
+                // ƒCƒxƒ“ƒgƒNƒŠƒA
+                SubControlEvent();
 
-            // ’S“–ŽÒƒRƒ“ƒ{ƒ{ƒbƒNƒXƒZƒbƒgŽž•”��‚ðƒZƒbƒg‚·‚é
-            if (!SetPerosonToDepartment()) return;
+                // ’S“–ŽÒƒRƒ“ƒ{ƒ{ƒbƒNƒXƒZƒbƒgŽž•”��‚ðƒZƒbƒg‚·‚é
+                if (!SetPerosonToDepartment()) return;
 
-            // ƒf�[ƒ^•\Ž¦
-            DataDisplay();
-
-            // ƒCƒxƒ“ƒgƒZƒbƒg
-            SetControlEvent();
+                // ƒf�[ƒ^•\Ž¦
+                DataDisplay();
+            }
+            finally
+            {
+                // ƒCƒxƒ“ƒgƒZƒbƒg
+                SetControlEvent();
+            }
         }
         #endregion
 
Index: branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstractionList/FrmConstructionListAuxiliary.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstractionList/FrmConstructionListAuxiliary.cs	(revision 364)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstractionList/FrmConstructionListAuxiliary.cs	(revision 365)
@@ -2172,6 +2172,7 @@
 
                 int nTargetCount = (int)numUDConstPro.Value;
                 int DepartmentCode = GetDepartmentCode();
+                if (DepartmentCode > 0) return true;
 
                 StringBuilder strSQL = new StringBuilder();
                 CommonMotions.CreateMan2DepSQL(ref strSQL, nTargetCount, PersonCode);
Index: branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionBaseInfo/FrmConstructionBaseInfo.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionBaseInfo/FrmConstructionBaseInfo.cs	(revision 364)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionBaseInfo/FrmConstructionBaseInfo.cs	(revision 365)
@@ -1662,7 +1662,7 @@
             if (!rdbStatusHikitugiFlg.Checked) return;
 
             // •”��ˆøŒpƒtƒ‰ƒO‚ðƒNƒŠƒA‚·‚é
-            rdbStatusHikitugiFlg.Checked = false;
+            //rdbStatusHikitugiFlg.Checked = false;
 
             // ŒfŽ¦”Â‚Öƒ�ƒbƒZ�[ƒW‚ð�Ú‚¹‚é
             m_Transfer2MesageFlg = true;
Index: branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionBaseInfo/FrmConstructionBaseInfoAuxiliary.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionBaseInfo/FrmConstructionBaseInfoAuxiliary.cs	(revision 364)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionBaseInfo/FrmConstructionBaseInfoAuxiliary.cs	(revision 365)
@@ -2168,6 +2168,7 @@
 
                 int nTargetCount = GetTargetYear();
                 int DepartmentCode = CommonMotions.cnvInt(DepCmb.SelectedValue);
+                if (DepartmentCode > 0) return true;
 
                 StringBuilder strSQL = new StringBuilder();
                 CommonMotions.CreateMan2DepSQL(ref strSQL, nTargetCount, PersonCode);
@@ -4402,7 +4403,7 @@
                                         IORecordKey RecDB)
         {
             // ƒf�[ƒ^ƒZƒbƒgŽž‚ÉˆøŒp’†ˆÈŠO‚Í�ˆ—�‚µ‚È‚¢
-            if (rdbStatusHikitugiFlg.Checked) return true;
+            //if (rdbStatusHikitugiFlg.Checked) return true;
             try
             {
                 // ’S“–ŽÒ‘I‘ð–³‚Í�ˆ—�‚µ‚È‚¢
Index: branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionJoin/FrmConstructionJoin.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionJoin/FrmConstructionJoin.cs	(revision 364)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionJoin/FrmConstructionJoin.cs	(revision 365)
@@ -307,21 +307,26 @@
         /// <param name="e"></param>
         private void numUDConstPro_ValueChanged(object sender, EventArgs e)
         {
-            // ã‚¤ãƒ™ãƒ³ãƒˆã‚¯ãƒªã‚¢
-            SubControlEvent();
+            try
+            {
+                // ã‚¤ãƒ™ãƒ³ãƒˆã‚¯ãƒªã‚¢
+                SubControlEvent();
 
-            // éƒ¨ç½²ã‚³ãƒ³ãƒœãƒœãƒƒã‚¯ã‚¹å¤‰æ›´
-            SetcmbDepartment();
-            // æ‹…å½“è€…ã‚³ãƒ³ãƒœãƒœãƒƒã‚¯ã‚¹å¤‰æ›´
-            SetcmbPersons();
-            // æ‹…å½“è€…ã‚³ãƒ³ãƒœãƒœãƒƒã‚¯ã‚¹ã‚»ãƒƒãƒˆæ™‚éƒ¨ç½²ã‚’ã‚»ãƒƒãƒˆã�™ã‚‹
-            if (!SetPerosonToDepartment()) return;
+                // éƒ¨ç½²ã‚³ãƒ³ãƒœãƒœãƒƒã‚¯ã‚¹å¤‰æ›´
+                SetcmbDepartment();
+                // æ‹…å½“è€…ã‚³ãƒ³ãƒœãƒœãƒƒã‚¯ã‚¹å¤‰æ›´
+                SetcmbPersons();
+                // æ‹…å½“è€…ã‚³ãƒ³ãƒœãƒœãƒƒã‚¯ã‚¹ã‚»ãƒƒãƒˆæ™‚éƒ¨ç½²ã‚’ã‚»ãƒƒãƒˆã�™ã‚‹
+                if (!SetPerosonToDepartment()) return;
 
-            // ãƒ‡ãƒ¼ã‚¿è¡¨ç¤º
-            InitDataLoad();
-
-            // ã‚¤ãƒ™ãƒ³ãƒˆã‚»ãƒƒãƒˆ
-            SetControlEvent();
+                // ãƒ‡ãƒ¼ã‚¿è¡¨ç¤º
+                InitDataLoad();
+            }
+            finally
+            {
+                // ã‚¤ãƒ™ãƒ³ãƒˆã‚»ãƒƒãƒˆ
+                SetControlEvent();
+            }
         }
         #endregion
 
@@ -355,17 +360,22 @@
         /// <param name="e"></param>
         private void cmbConstructionPerson_SelectedIndexChanged(object sender, EventArgs e)
         {
-            // ã‚¤ãƒ™ãƒ³ãƒˆã‚¯ãƒªã‚¢
-            SubControlEvent();
+            try
+            {
+                // ã‚¤ãƒ™ãƒ³ãƒˆã‚¯ãƒªã‚¢
+                SubControlEvent();
 
-            // æ‹…å½“è€…ã‚³ãƒ³ãƒœãƒœãƒƒã‚¯ã‚¹ã‚»ãƒƒãƒˆæ™‚éƒ¨ç½²ã‚’ã‚»ãƒƒãƒˆã�™ã‚‹
-            if (!SetPerosonToDepartment()) return;
+                // æ‹…å½“è€…ã‚³ãƒ³ãƒœãƒœãƒƒã‚¯ã‚¹ã‚»ãƒƒãƒˆæ™‚éƒ¨ç½²ã‚’ã‚»ãƒƒãƒˆã�™ã‚‹
+                if (!SetPerosonToDepartment()) return;
 
-            // ãƒ‡ãƒ¼ã‚¿è¡¨ç¤º
-            InitDataLoad();
-
-            // ã‚¤ãƒ™ãƒ³ãƒˆã‚»ãƒƒãƒˆ
-            SetControlEvent();
+                // ãƒ‡ãƒ¼ã‚¿è¡¨ç¤º
+                InitDataLoad();
+            }
+            finally
+            {
+                // ã‚¤ãƒ™ãƒ³ãƒˆã‚»ãƒƒãƒˆ
+                SetControlEvent();
+            }
         }
         #endregion
     
Index: branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionJoin/FrmConstructionJoinAuxiliary.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionJoin/FrmConstructionJoinAuxiliary.cs	(revision 364)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionJoin/FrmConstructionJoinAuxiliary.cs	(revision 365)
@@ -340,6 +340,7 @@
 
                 int nTargetCount = (int)numUDConstPro.Value;
                 int DepartmentCode = GetDepartmentCode();
+                if (DepartmentCode > 0) return true;
 
                 StringBuilder strSQL = new StringBuilder();
                 CommonMotions.CreateMan2DepSQL(ref strSQL, nTargetCount, PersonCode);
Index: branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionLedger/FrmConstructionLedgerAuxiliary.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionLedger/FrmConstructionLedgerAuxiliary.cs	(revision 364)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionLedger/FrmConstructionLedgerAuxiliary.cs	(revision 365)
@@ -4793,7 +4793,7 @@
                         return false;
                     }
 
-                    // ç©�ç®—äºˆç®—æ›¸ãƒ‡ãƒ¼ã‚¿ãƒ‡ãƒ¼ã‚¿ç™»éŒ²
+                    // å·¥äº‹è©³ç´°å�°å¸³çµŒè²»ãƒ‡ãƒ¼ã‚¿ãƒ‡ãƒ¼ã‚¿ç™»éŒ²
                     if (workList.Count == 0)
                     {
                         // ãƒ‡ãƒ¼ã‚¿ã�Œã�ªã�„å ´å�ˆãƒ»ãƒ‡ãƒ¼ã‚¿ç™»éŒ²
Index: branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionLedgerList/CommonLedgerData.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionLedgerList/CommonLedgerData.cs	(revision 364)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionLedgerList/CommonLedgerData.cs	(revision 365)
@@ -86,6 +86,14 @@
             /// æ�¥å­£å¥‘ç´„å·¥æœŸçµ‚äº†
             /// </summary>
             NextCompDate,
+            /// <summary>
+            /// éƒ¨ç½²åœ¨ç±�é–‹å§‹å¹´æœˆæ—¥
+            /// </summary>
+            DepHistoryStartDate,
+            /// <summary>
+            /// éƒ¨ç½²åœ¨ç±�çµ‚äº†å¹´æœˆæ—¥
+            /// </summary>
+            DepHistoryCompDate,
         }
         #endregion
 
@@ -104,6 +112,8 @@
 
                 DateTime dtDefaultStart = CommonMotions.GetOpeningEndDate(BusinessPeriod, true);
                 DateTime dtDefaultEnd = CommonMotions.GetOpeningEndDate(BusinessPeriod, false);
+                string strdtDefSt = dtDefaultStart.ToShortDateString();
+                string strdtDefEd = dtDefaultEnd.ToShortDateString();
 
                 int nPrevYear = (BusinessPeriod - 1);
                 if (nPrevYear < 0) nPrevYear = 0;
@@ -110,6 +120,9 @@
                 DateTime dtPrevStart = CommonMotions.GetOpeningEndDate(nPrevYear, true);
                 DateTime dtNextEnd = CommonMotions.GetOpeningEndDate((BusinessPeriod + 1), false);
 
+                string strdtMin = DateTime.MinValue.ToShortDateString();
+                string strdtMax = DateTime.MaxValue.ToShortDateString();
+
                 strSQL.Append("Select");
                 strSQL.Append(" DepHis.DepartmentCode");
                 strSQL.Append(", Person.PersonCode");
@@ -122,14 +135,34 @@
                 strSQL.Append(", Person.EndDate AS HireCompDays");
                 strSQL.Append(", NextDetail.SDate AS NextStart");
                 strSQL.Append(", NextDetail.EDate AS NextEnd");
+                strSQL.Append(", DepHis.StartDate");
+                strSQL.Append(", DepHis.CompDate");
+
                 strSQL.Append(" From");
-                strSQL.Append(" personinchargemaster As Person");
 
-                strSQL.Append(" Left Join chgchargedep As DepHis");
+                strSQL.Append(" (Select");
+                strSQL.Append(" PersonCode");
+                strSQL.Append(", DisplayOrder");
+                strSQL.Append(", PersonName");
+                strSQL.Append(", StartDate");
+                strSQL.AppendFormat(", Case WHEN DATE(EndDate) = DATE('{0}') Then DATE('{1}')", strdtMin, strdtMax);
+                strSQL.Append(" Else DATE(EndDate) End As EndDate");
+                strSQL.Append(", EmployeeClassFlg");
+                strSQL.Append(", LedgerFlg");
+                strSQL.Append(", MonthlySalary");
+                strSQL.Append(" From PERSONINCHARGEMASTER) As Person");
+
+                strSQL.Append(" INNER JOIN (Select");
+                strSQL.Append(" PersonCode");
+                strSQL.Append(", StartDate");
+                strSQL.AppendFormat(", Case WHEN DATE(CompDate) = DATE('{0}') Then DATE('{1}')", strdtMin, strdtMax);
+                strSQL.Append(" Else DATE(CompDate) End As CompDate");
+                strSQL.Append(", DepartmentCode");
+                strSQL.Append(", DepartmentName");
+                strSQL.Append(" From chgchargedep) As DepHis");
                 strSQL.Append(" ON DepHis.PersonCode = Person.PersonCode");
-                strSQL.AppendFormat(" AND ((DATE(DepHis.STARTDATE) <= DATE('{0}'))", dtDefaultEnd.ToShortDateString());
-                strSQL.AppendFormat(" AND (DATE('{0}') <= DATE(DepHis.CompDate)", dtDefaultStart.ToShortDateString());
-                strSQL.AppendFormat(" OR DATE('{0}') = DATE(DepHis.CompDate)))", DateTime.MinValue.ToShortDateString());
+                strSQL.AppendFormat(" AND (DATE(DepHis.STARTDATE) <= DATE('{0}')", strdtDefEd);
+                strSQL.AppendFormat(" AND DATE('{0}') <= DATE(DepHis.CompDate))", strdtDefSt);
 
                 // ä»ŠæœŸã�®é–‹å§‹çµ‚äº†ï¼ˆå·¥äº‹é–‹å§‹å¹´æœˆæ—¥ã�Œå…ˆæœŸé–‹å§‹å¹´æœˆæ—¥ä»¥é™�ã‚’æ¤œç´¢ã�™ã‚‹ï¼‰
                 strSQL.Append(" Left Join");
@@ -161,7 +194,7 @@
                 strSQL.Append("       From constructionLedgerdetail As LDetail2");
                 strSQL.Append("            Inner Join constructionLedger As Ledger2");
                 strSQL.Append("                  On Ledger2.ConstructionCode = LDetail2.ConstructionCode");
-                strSQL.AppendFormat("             And DATE('{0}') <= DATE(Ledger2.Constructionstart)", dtDefaultStart.ToShortDateString());
+                strSQL.AppendFormat("             And DATE('{0}') <= DATE(Ledger2.Constructionstart)", strdtDefSt);
                 strSQL.Append("            Inner Join constructionbaseinfo As Base");
                 strSQL.Append("                  On Base.ConstructionCode = LDetail2.ConstructionCode");
                 strSQL.AppendFormat("            And Base.ConstructionStatusFlg <> {0}", NotOrder);
@@ -177,12 +210,6 @@
 
                 strSQL.AppendFormat(" Where Person.LEDGERFLG = {0}", (int)PersonInChargeMaster.LedgerDivNoDef.CalcTarget);
 
-                //if (CommonMotions.LoginUserData.PersonCode != CommonDefine.AdminCode)
-                //{
-                //    strSQL.Append(" AND Person.DEPARTMENTCODE IN (select PDep.DepartmentCode from PersonDepartmentMaster AS PDep");
-                //    strSQL.AppendFormat(" WHERE PDep.PersonCode = {0})", CommonMotions.LoginUserData.PersonCode);
-                //}
-
                 // å·¥äº‹å�°å¸³ãƒ‡ãƒ¼ã‚¿ã�®éƒ¨ç½²ã� ã�‘ã�Œå¯¾è±¡
                 if (DepartmentCode > 0)
                 {
@@ -191,9 +218,8 @@
                 }
                 if (PersonCode != 0) strSQL.AppendFormat(" AND Person.PERSONCODE = {0}", PersonCode);
 
-                strSQL.AppendFormat(" AND ((DATE(Person.STARTDATE) <= DATE('{0}'))", dtDefaultEnd.ToShortDateString());
-                strSQL.AppendFormat(" AND (DATE('{0}') <= DATE(Person.ENDDATE)", dtDefaultStart.ToShortDateString());
-                strSQL.AppendFormat(" OR DATE('{0}') = DATE(Person.ENDDATE)))", DateTime.MinValue.ToShortDateString());
+                strSQL.AppendFormat(" AND (DATE(Person.STARTDATE) <= DATE('{0}')", strdtDefEd);
+                strSQL.AppendFormat(" AND DATE('{0}') <= DATE(Person.ENDDATE))", strdtDefSt);
 
                 strSQL.AppendFormat(" ORDER BY DepHis.DepartmentCode, Person.EmployeeClassFlg, Person.DISPLAYORDER");
 
@@ -349,11 +375,6 @@
                     strSQL.Append("          And B.GroupCount = A.GroupCount");
                     strSQL.Append("          And B.LineCount = A.LineCount");
 
-                    if (DepartmentCode != 0)
-                        strSQL.AppendFormat("    AND B.ComponentCode = {0}", DepartmentCode);
-                    if (PersonCode != 0)
-                        strSQL.AppendFormat(" AND B.CompanyCode = {0}", PersonCode);
-
                     strSQL.Append("   Inner Join CONSTRUCTIONBASEINFO As C");
                     strSQL.Append("          On C.ConstructionCode = A.ConstructionCode");
                     strSQL.AppendFormat("    And C.CONSTRUCTIONPERIOD = {0}", TargetYear);
@@ -361,6 +382,11 @@
 
                     strSQL.Append(" Where");
                     strSQL.AppendFormat("   A.GroupCount = {0}", (int)FrmConstructionLedger.DataGroup.Payroll);
+
+                    if (DepartmentCode > 0)
+                        strSQL.AppendFormat(" AND B.ComponentCode = {0}", DepartmentCode);
+                    if (PersonCode > 0)
+                        strSQL.AppendFormat(" AND B.CompanyCode = {0}", PersonCode);
                 }
                 else
                 {
@@ -376,9 +402,9 @@
                     strSQL.Append(" Where");
                     strSQL.AppendFormat(" A.GroupCount = {0}", (int)FrmConstructionLedger.DataGroup.Payroll);
 
-                    if (DepartmentCode != 0)
+                    if (DepartmentCode > 0)
                         strSQL.AppendFormat(" AND A.ComponentCode = {0}", DepartmentCode);
-                    if (PersonCode != 0)
+                    if (PersonCode > 0)
                         strSQL.AppendFormat(" AND A.CompanyCode = {0}", PersonCode);
                 }
 
@@ -482,10 +508,11 @@
                 {
                     int nDepartmentCode = CommonMotions.cnvInt(ObjRec[(int)CommonLedgerData.GetPersonTerm.DepartmentCode]);
                     int nPersonCode = CommonMotions.cnvInt(ObjRec[(int)CommonLedgerData.GetPersonTerm.PersonCode]);
+                    int nKeyCode = (nDepartmentCode * 100000000) + nPersonCode;
                     DateTime stDate = CommonMotions.cnvDate(ObjRec[(int)CommonLedgerData.GetPersonTerm.StartDate]);
                     DateTime edDate = CommonMotions.cnvDate(ObjRec[(int)CommonLedgerData.GetPersonTerm.CompDate]);
 
-                    KeyValuePair<int, long> CurValuePair = SalDataList.Find(x => x.Key == nPersonCode);
+                    KeyValuePair<int, long> CurValuePair = SalDataList.Find(x => x.Key == nKeyCode);
 
                     // é…�åˆ—ã‚»ãƒƒãƒˆ
                     ArrarySalary.Add(new SalaryClass(nDepartmentCode, nPersonCode, (int)CurValuePair.Value, stDate, edDate));
@@ -498,6 +525,36 @@
         }
         #endregion
 
+        #region æœŸé–“ãƒ‡ãƒ¼ã‚¿é…�åˆ—ã‚ˆã‚Šå¯¾è±¡ã�¨ã�ªã‚‹æ‹…å½“è€…ãƒ‡ãƒ¼ã‚¿ã�®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã‚’å�–å¾—ã�™ã‚‹
+        /// <summary>
+        /// æœŸé–“ãƒ‡ãƒ¼ã‚¿é…�åˆ—ã‚ˆã‚Šå¯¾è±¡ã�¨ã�ªã‚‹æ‹…å½“è€…ã�®ãƒ‡ãƒ¼ã‚¿ã�®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã‚’å�–å¾—ã�™ã‚‹
+        /// </summary>
+        public static int GetTargetPersonRec(ArrayList TargetList, int nDepCode, int nPersonCode)
+        {
+            try
+            {
+                int nindex = 0;
+                foreach(object[] wrkRec in TargetList)
+                {
+                    int wrkDep = CommonMotions.cnvInt(wrkRec[(int)GetPersonTerm.DepartmentCode]);
+                    int wrkManNo = CommonMotions.cnvInt(wrkRec[(int)GetPersonTerm.PersonCode]);
+
+                    if(nDepCode == wrkDep && nPersonCode == wrkManNo)
+                    {
+                        return nindex;
+                    }
+                    nindex++;
+                }
+                return -1;
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("ã‚·ã‚¹ãƒ†ãƒ ã‚¨ãƒ©ãƒ¼ï¼š{0}ï¼š{1}", CommonMotions.GetMethodName(), ex.Message);
+                return -1;
+            }
+        }
+        #endregion
+
         #region æ‹…å½“è€…æ¯Žå‰²å½“ç„¡è²»ç›®æ¯Žã�®çµŒè²»ã‚’ä¸€æ‹¬å�–å¾—ã�™ã‚‹
         /// <summary>
         /// æ‹…å½“è€…æ¯Žå‰²å½“ç„¡è²»ç›®æ¯Žã�®çµŒè²»ã‚’ä¸€æ‹¬å�–å¾—ã�™ã‚‹
@@ -504,6 +561,7 @@
         /// </summary>
         public static void GetPersonExpensesCostValueAll(IOCostDataOfPerson CostDB,
                                                         int nNowYear,
+                                                        ArrayList TargetList,
                                                         List<SalaryClass> ArrarySalary,
                                                         ref List<PersonExpensesCost> CostValue)
         {
@@ -518,9 +576,35 @@
                 StringBuilder strSQL = new StringBuilder();
                 foreach (SalaryClass CurData in ArrarySalary)
                 {
-                    if(!bFirst) strSQL.Append(" UNION ");
+
+                    string strDtSt = dtDefaultStart.ToShortDateString();
+                    string strDtEd = dtDefaultEnd.ToShortDateString();
+                    // å¯¾è±¡è€…ã�®æœŸé–“ãƒ‡ãƒ¼ã‚¿ã‚’å�–å¾—ã�™ã‚‹
+                    int nRecIdx = GetTargetPersonRec(TargetList, CurData.DepartmentCode, CurData.PersonCode);
+                    if (nRecIdx > -1)
+                    {
+                        object[] wrkCur = (object[])TargetList[nRecIdx];
+                        DateTime dtStart = CommonMotions.cnvDate(wrkCur[(int)GetPersonTerm.DepHistoryStartDate]);
+                        DateTime dtComp = CommonMotions.cnvDate(wrkCur[(int)GetPersonTerm.DepHistoryCompDate]);
+
+                        if (dtDefaultStart.Date <= dtStart.Date && dtStart.Date <= dtDefaultEnd)
+                        {
+                            strDtSt = dtStart.ToShortDateString();
+                        }
+                        if (dtDefaultStart.Date <= dtComp.Date && dtComp.Date <= dtDefaultEnd)
+                        {
+                            strDtEd = dtComp.ToShortDateString();
+                        }
+                    }
+
+                    if (!bFirst) strSQL.Append(" UNION ");
                     strSQL.Append("SELECT");
-                    strSQL.Append(" PERSONCODE");
+                    if (nRecIdx > -1)
+                    {
+                        object[] wrkCur = (object[])TargetList[nRecIdx];
+                        strSQL.AppendFormat(" {0}", CommonMotions.cnvInt(wrkCur[0]));
+                    }
+                    strSQL.Append(", PERSONCODE");
                     strSQL.Append(", B.DATATYPE AS DATATYPE");
                     strSQL.Append(", SUM(B.ENTRYPRICE) AS SUMPRICE");
                     strSQL.Append(" FROM");
@@ -529,8 +613,8 @@
 
                     strSQL.AppendFormat(" B.PERSONCODE = {0}", CurData.PersonCode);
 
-                    strSQL.AppendFormat(" AND (DATE('{0}') <= DATE(B.ACTIONDATE)", dtDefaultStart.ToShortDateString());
-                    strSQL.AppendFormat(" AND DATE(B.ACTIONDATE) <= DATE('{0}'))", dtDefaultEnd.ToShortDateString());
+                    strSQL.AppendFormat(" AND (DATE('{0}') <= DATE(B.ACTIONDATE)", strDtSt);
+                    strSQL.AppendFormat(" AND DATE(B.ACTIONDATE) <= DATE('{0}'))", strDtEd);
                     strSQL.Append(" AND B.CONSTRUCTIONCODE = 0");
                     strSQL.Append(" GROUP BY B.DATATYPE");
 
@@ -552,9 +636,10 @@
                                     ; i <= (int)CostDataOfPerson.DataNoDef.DisposalCost
                                     ; i++)
                         {
-                            GetCostVal[i] = arList.Cast<object[]>().Where(x => CommonMotions.cnvInt(x[0]) == CurData.PersonCode
-                                                                            && CommonMotions.cnvInt(x[1]) == i)
-                                                                    .Sum(y => CommonMotions.cnvInt(y[2]));
+                            GetCostVal[i] = arList.Cast<object[]>().Where(x => CommonMotions.cnvInt(x[0]) == CurData.DepartmentCode
+                                                                            && CommonMotions.cnvInt(x[1]) == CurData.PersonCode
+                                                                            && CommonMotions.cnvInt(x[2]) == i)
+                                                                    .Sum(y => CommonMotions.cnvInt(y[3]));
                         }
                     }
 
@@ -562,9 +647,9 @@
                                                             , CurData.PersonCode
                                                             , CurData.StartDate
                                                             , CurData.CompDate
-                                                            , new int[] { GetCostVal[0], GetCostVal[1], GetCostVal[2],
-                                                                                GetCostVal[3],GetCostVal[4],GetCostVal[5],
-                                                                                GetCostVal[6] }));
+                                                            , new int[] { GetCostVal[0],            // Dummy
+                                                                            GetCostVal[1], GetCostVal[2], GetCostVal[3],
+                                                                            GetCostVal[4], GetCostVal[5], GetCostVal[6] }));
                 }
             }
             catch (Exception ex)
Index: branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionLedgerList/FrmConstructionLedgerList.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionLedgerList/FrmConstructionLedgerList.cs	(revision 364)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionLedgerList/FrmConstructionLedgerList.cs	(revision 365)
@@ -665,20 +665,26 @@
         /// <param name="e"></param>
         private void numUDConstPro_ValueChanged(object sender, EventArgs e)
         {
-            // ƒCƒxƒ“ƒgƒNƒŠƒA
-            SubControlEvent();
+            try
+            {
+                // ƒCƒxƒ“ƒgƒNƒŠƒA
+                SubControlEvent();
 
-            // ‰æ–ÊƒNƒŠƒA
-            ClearDisplay();
+                // ‰æ–ÊƒNƒŠƒA
+                ClearDisplay();
 
-            // ’S“–ŽÒƒRƒ“ƒ{ƒ{ƒbƒNƒXƒZƒbƒgŽž•”��‚ðƒZƒbƒg‚·‚é
-            if (!SetPerosonToDepartment()) return;
+                // ’S“–ŽÒƒRƒ“ƒ{ƒ{ƒbƒNƒXƒZƒbƒgŽž•”��‚ðƒZƒbƒg‚·‚é
+                if (!SetPerosonToDepartment()) return;
 
-            // ƒf�[ƒ^•\Ž¦
-            DataDisplay();
+                // ƒf�[ƒ^•\Ž¦
+                DataDisplay();
 
-            // ƒCƒxƒ“ƒgƒZƒbƒg
-            SetControlEvent();
+            }
+            finally
+            {
+                // ƒCƒxƒ“ƒgƒZƒbƒg
+                SetControlEvent();
+            }
         }
         #endregion
 
@@ -715,26 +721,31 @@
         /// <param name="e"></param>
         private void cmbConstructionPerson_SelectedIndexChanged(object sender, EventArgs e)
         {
-            // ƒCƒxƒ“ƒgƒNƒŠƒA
-            SubControlEvent();
+            try
+            {
+                // ƒCƒxƒ“ƒgƒNƒŠƒA
+                SubControlEvent();
 
-            // ‰æ–ÊƒNƒŠƒA
-            ClearDisplay();
+                // ‰æ–ÊƒNƒŠƒA
+                ClearDisplay();
 
-            // ’S“–ŽÒƒRƒ“ƒ{ƒ{ƒbƒNƒXƒZƒbƒgŽž•”��‚ðƒZƒbƒg‚·‚é
-            if (!SetPerosonToDepartment()) return;
+                // ’S“–ŽÒƒRƒ“ƒ{ƒ{ƒbƒNƒXƒZƒbƒgŽž•”��‚ðƒZƒbƒg‚·‚é
+                if (!SetPerosonToDepartment()) return;
 
-            // •”��•Êˆê——‚©‚ç‚Ì‹N“®‚Í’S“–ŽÒ•Ï�XŽžƒpƒ‰ƒ��[ƒ^•Ï�X
-            if (!m_FirstStartFlg)
+                // •”��•Êˆê——‚©‚ç‚Ì‹N“®‚Í’S“–ŽÒ•Ï�XŽžƒpƒ‰ƒ��[ƒ^•Ï�X
+                if (!m_FirstStartFlg)
+                {
+                    m_FirstStartPersonCode = CommonMotions.cnvInt(cmbConstructionPerson.SelectedValue);
+                }
+
+                // ƒf�[ƒ^•\Ž¦
+                DataDisplay();
+            }
+            finally
             {
-                m_FirstStartPersonCode = CommonMotions.cnvInt(cmbConstructionPerson.SelectedValue);
+                // ƒCƒxƒ“ƒgƒZƒbƒg
+                SetControlEvent();
             }
-
-            // ƒf�[ƒ^•\Ž¦
-            DataDisplay();
-
-            // ƒCƒxƒ“ƒgƒZƒbƒg
-            SetControlEvent();
         }
         #endregion
 
@@ -822,33 +833,29 @@
 
             // ƒf�[ƒ^‚ª‚È‚¢�ê�‡‚Í”²‚¯‚é
             if (dgv.RowCount == 0) return;
-            if (CommonMotions.chkCellBlank(CurRow.Cells[(int)DCFirstHalf.SelectionCode].Value) &&
-                CommonMotions.chkCellBlank(CurRow.Cells[(int)DCFirstHalf.SelectionName].Value))
+
+            // �‡Œv�s‚Í�ˆ—�‚µ‚È‚¢
+            string strWork = CommonMotions.cnvString(CurRow.Cells[(int)DCFirstHalf.SelectionName].Value);
+            bool bTitle = false;
+            foreach (string strTitle in s_TotalTitleArray)
             {
-                return;
-            }
-            else
-            {
-                // �‡Œv�s‚Í�ˆ—�‚µ‚È‚¢
-                string strWork = CommonMotions.cnvString(CurRow.Cells[(int)DCFirstHalf.SelectionName].Value);
-                bool bTitle = false;
-                foreach (string strTitle in s_TotalTitleArray)
+                if (strWork.Equals(strTitle))
                 {
-                    if (strWork.Equals(strTitle))
-                    {
-                        bTitle = true;
-                        break;
-                    }
+                    bTitle = true;
+                    break;
                 }
-                if (bTitle) return;
             }
+
             // �s‘I‘ð�F‚ðŒ³‚É–ß‚·
             if (m_BeforeGridRow >= 0) DefaultRowChangeColor(m_BeforeGridRow);
 
-            // ‘I‘ð�s�”‚ð‘Þ”ð
-            m_BeforeGridRow = dgv.CurrentRow.Index;
-            // �s‘I‘ð�F‚ð�Ý’è
-            SelectRowChangeColor(m_BeforeGridRow);
+            if (!bTitle)
+            {
+                // ‘I‘ð�s�”‚ð‘Þ”ð
+                m_BeforeGridRow = dgv.CurrentRow.Index;
+                // �s‘I‘ð�F‚ð�Ý’è
+                SelectRowChangeColor(m_BeforeGridRow);
+            }
         }
         #endregion
 
Index: branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionLedgerList/FrmConstructionLedgerListAuxiliary.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionLedgerList/FrmConstructionLedgerListAuxiliary.cs	(revision 364)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionLedgerList/FrmConstructionLedgerListAuxiliary.cs	(revision 365)
@@ -725,9 +725,9 @@
         }
         #endregion
 
-        #region •›’S“–ŽÒ�^Žw“±ˆõ‚Ì‹‹—^‚ðŽæ“¾‚·‚é
+        #region ‹‹—^‚ðŽæ“¾‚·‚é
         /// <summary>
-        /// •›’S“–ŽÒ�^Žw“±ˆõ‚Ì‹‹—^‚ðŽæ“¾‚·‚é
+        /// ‹‹—^‚ðŽæ“¾‚·‚é
         /// </summary>
         private int SetAuxiliaryCost(IOConstructionLedger LedgerDB)
         {
@@ -1041,7 +1041,7 @@
 
                 // ‘Î�Û‚ÌŒo”ï‚ðŽæ“¾‚·‚é
                 List<PersonExpensesCost> ArraryCost = new List<PersonExpensesCost>();
-                CommonLedgerData.GetPersonExpensesCostValueAll(CostDB, (int)numUDConstPro.Value, ArrarySalary, ref ArraryCost);
+                CommonLedgerData.GetPersonExpensesCostValueAll(CostDB, (int)numUDConstPro.Value, TargetList, ArrarySalary, ref ArraryCost);
 
                 // ProgressBar‚Ì’l‚ð•Ï�X‚·‚é
                 prgber.Value++;
@@ -1173,6 +1173,17 @@
         {
             try
             {
+                string strdtMin = DateTime.MinValue.ToShortDateString();
+                string strdtMax = DateTime.MaxValue.ToShortDateString();
+
+                int nTargetYear = (int)numUDConstPro.Value;
+                // �¡ŠúŠJŽn�I—¹”NŒŽ“ú
+                DateTime dtDefaultStart = CommonMotions.GetOpeningEndDate(nTargetYear, true);
+                DateTime dtDefaultEnd = CommonMotions.GetOpeningEndDate(nTargetYear, false);
+                // �Å‘å�E�Å�¬”NŒŽ“ú
+                string strdtStart = dtDefaultStart.ToShortDateString();
+                string strdtEnd = dtDefaultEnd.ToShortDateString();
+
                 // SQL‚ÉƒAƒNƒZƒX�§ŒÀ‚ð‚©‚¯‚é
                 StringBuilder strSecurity = new StringBuilder();
                 CreateSecuritySQL(ref strSecurity);
@@ -1191,9 +1202,6 @@
                 strSQL.Append(", C.PERSONNAME");
                 strSQL.Append(", B.DETAILSTRING");
                 strSQL.Append(", A.ORDERSDECISIONPRICE");
-                //strSQL.Append(", A.COMPANYEXPENSES");
-                //strSQL.Append(", A.DEPARTMENTEXPENSES");
-                //strSQL.Append(", A.SALESEXPENSES");
                 strSQL.Append(", A.TOTALPAYMENT");
                 strSQL.Append(", A.GROSSPROFIT");
                 strSQL.Append(", A.ALLOWANCE");
@@ -1202,7 +1210,7 @@
                 strSQL.Append(", E.DISPLAYORDER");
                 strSQL.Append(", C.DISPLAYORDER");
                 strSQL.Append(", C.DEPARTMENTCODE");
-                strSQL.Append(", ifnull(F.DetailString, '')");
+                strSQL.Append(", ifnull(I.DepartmentName, '')");
                 strSQL.Append(", D.CONSTRUCTIONSTATUSFLG");
 
                 strSQL.Append(", G.SeqNo As ExpSeqNo");
@@ -1220,10 +1228,14 @@
                 strSQL.AppendFormat(" ON H.DivisionCode = {0}",(int)DivisionMaster.DivisionMasterCodeDef.ConstructionExpenses);
                 strSQL.Append("       And H.NameCode = G.NameCode");
 
-                strSQL.Append(" INNER JOIN CONSTRUCTIONBASEINFO AS D");
+                strSQL.Append(" LEFT JOIN CONSTRUCTIONBASEINFO AS D");
                 strSQL.Append("       ON A.CONSTRUCTIONCODE = D.CONSTRUCTIONCODE");
+                if (DepartmentCode > 0)
+                {
+                    strSQL.AppendFormat("       AND D.ConstrDepCode = {0}", DepartmentCode);
+                }
                 strSQL.AppendFormat(" AND D.TyingFlg != {0}", (int)ConstructionBaseInfo.TyingFlgDef.Tying);
-                strSQL.AppendFormat(" AND D.CONSTRUCTIONPERIOD = {0}", numUDConstPro.Value);
+                strSQL.AppendFormat(" AND D.CONSTRUCTIONPERIOD = {0}", nTargetYear);
                 strSQL.AppendFormat(" AND D.CONSTRUCTIONSTATUSFLG != {0}", NotOrder);
 
                 strSQL.Append(" LEFT JOIN CONSTRUCTIONBASEINFODETAIL AS B");
@@ -1230,6 +1242,15 @@
                 strSQL.Append("       ON A.CONSTRUCTIONCODE = B.CONSTRUCTIONCODE");
                 strSQL.AppendFormat(" AND B.DETAILNO = {0}", (int)ConstructionBaseInfoDetail.DataNoDef.ConstructionName);
 
+                strSQL.Append(" Inner Join(Select H.PersonCode, H.StartDate");
+                strSQL.AppendFormat("         , Case WHEN DATE(H.CompDate) = DATE('{0}') Then DATE('{1}')", strdtMin, strdtMax);
+                strSQL.Append("                      Else DATE(H.CompDate) End As CompDate");
+                strSQL.Append("               , H.DepartmentCode, H.DepartmentName");
+                strSQL.Append("            From chgchargedep As H) As I");
+                strSQL.Append("       On I.PersonCode = D.ConstructionPersonCode");
+                strSQL.AppendFormat(" And(DATE(I.StartDate) <= DATE('{0}')", strdtEnd);
+                strSQL.AppendFormat(" And DATE('{0}') <= DATE(I.CompDate))", strdtStart);
+
                 strSQL.Append(" LEFT JOIN CONSTRUCTIONBASEINFODETAIL AS F");
                 strSQL.Append("       On F.ConstructionCode = A.ConstructionCode");
                 strSQL.AppendFormat(" And F.DetailNo = {0}", (int)ConstructionBaseInfoDetail.DataNoDef.ConstrDepartmentName);
@@ -1243,8 +1264,7 @@
                 if (strSecurity.Length > 0) strSQL.Append(strSecurity.ToString());
                 if (DepartmentCode > 0)
                 {
-                    strSQL.AppendFormat(" AND (D.ConstrDepCode = {0}", DepartmentCode);
-                    strSQL.AppendFormat(" AND F.DetailString = '{0}')", cmbDepartment.Text);
+                    strSQL.AppendFormat(" AND I.DepartmentCode = {0}", DepartmentCode);
                 }
                 if (PersonCode > 0)
                 {
@@ -1726,6 +1746,7 @@
 
                 int nTargetCount = (int)numUDConstPro.Value;
                 int DepartmentCode = GetDepartmentCode();
+                if (DepartmentCode > 0) return true;
 
                 StringBuilder strSQL = new StringBuilder();
                 CommonMotions.CreateMan2DepSQL(ref strSQL, nTargetCount, PersonCode);
Index: branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionSplit/FrmConstructionSplit.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionSplit/FrmConstructionSplit.cs	(revision 364)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionSplit/FrmConstructionSplit.cs	(revision 365)
@@ -198,21 +198,26 @@
         /// <param name="e"></param>
         private void numUDConstPro_ValueChanged(object sender, EventArgs e)
         {
-            // ã‚¤ãƒ™ãƒ³ãƒˆã‚¯ãƒªã‚¢
-            SubControlEvent();
+            try
+            {
+                // ã‚¤ãƒ™ãƒ³ãƒˆã‚¯ãƒªã‚¢
+                SubControlEvent();
 
-            // éƒ¨ç½²ã‚³ãƒ³ãƒœãƒœãƒƒã‚¯ã‚¹å¤‰æ›´
-            SetcmbDepartment();
-            // æ‹…å½“è€…ã‚³ãƒ³ãƒœãƒœãƒƒã‚¯ã‚¹å¤‰æ›´
-            SetcmbPersons();
-            // æ‹…å½“è€…ã‚³ãƒ³ãƒœãƒœãƒƒã‚¯ã‚¹ã‚»ãƒƒãƒˆæ™‚éƒ¨ç½²ã‚’ã‚»ãƒƒãƒˆã�™ã‚‹
-            if (!SetPerosonToDepartment()) return;
+                // éƒ¨ç½²ã‚³ãƒ³ãƒœãƒœãƒƒã‚¯ã‚¹å¤‰æ›´
+                SetcmbDepartment();
+                // æ‹…å½“è€…ã‚³ãƒ³ãƒœãƒœãƒƒã‚¯ã‚¹å¤‰æ›´
+                SetcmbPersons();
+                // æ‹…å½“è€…ã‚³ãƒ³ãƒœãƒœãƒƒã‚¯ã‚¹ã‚»ãƒƒãƒˆæ™‚éƒ¨ç½²ã‚’ã‚»ãƒƒãƒˆã�™ã‚‹
+                if (!SetPerosonToDepartment()) return;
 
-            // ãƒ‡ãƒ¼ã‚¿è¡¨ç¤º
-            InitDataLoad();
-
-            // ã‚¤ãƒ™ãƒ³ãƒˆã‚»ãƒƒãƒˆ
-            SetControlEvent();
+                // ãƒ‡ãƒ¼ã‚¿è¡¨ç¤º
+                InitDataLoad();
+            }
+            finally
+            {
+                // ã‚¤ãƒ™ãƒ³ãƒˆã‚»ãƒƒãƒˆ
+                SetControlEvent();
+            }
         }
         #endregion
 
@@ -246,17 +251,22 @@
         /// <param name="e"></param>
         private void cmbConstructionPerson_SelectedIndexChanged(object sender, EventArgs e)
         {
-            // ã‚¤ãƒ™ãƒ³ãƒˆã‚¯ãƒªã‚¢
-            SubControlEvent();
+            try
+            {
+                // ã‚¤ãƒ™ãƒ³ãƒˆã‚¯ãƒªã‚¢
+                SubControlEvent();
 
-            // æ‹…å½“è€…ã‚³ãƒ³ãƒœãƒœãƒƒã‚¯ã‚¹ã‚»ãƒƒãƒˆæ™‚éƒ¨ç½²ã‚’ã‚»ãƒƒãƒˆã�™ã‚‹
-            if (!SetPerosonToDepartment()) return;
+                // æ‹…å½“è€…ã‚³ãƒ³ãƒœãƒœãƒƒã‚¯ã‚¹ã‚»ãƒƒãƒˆæ™‚éƒ¨ç½²ã‚’ã‚»ãƒƒãƒˆã�™ã‚‹
+                if (!SetPerosonToDepartment()) return;
 
-            // ãƒ‡ãƒ¼ã‚¿è¡¨ç¤º
-            InitDataLoad();
-
-            // ã‚¤ãƒ™ãƒ³ãƒˆã‚»ãƒƒãƒˆ
-            SetControlEvent();
+                // ãƒ‡ãƒ¼ã‚¿è¡¨ç¤º
+                InitDataLoad();
+            }
+            finally
+            {
+                // ã‚¤ãƒ™ãƒ³ãƒˆã‚»ãƒƒãƒˆ
+                SetControlEvent();
+            }
         }
         #endregion
     }
Index: branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionSplit/FrmConstructionSplitAuxiliary.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionSplit/FrmConstructionSplitAuxiliary.cs	(revision 364)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionSplit/FrmConstructionSplitAuxiliary.cs	(revision 365)
@@ -338,6 +338,7 @@
 
                 int nTargetCount = (int)numUDConstPro.Value;
                 int DepartmentCode = GetDepartmentCode();
+                if (DepartmentCode > 0) return true;
 
                 StringBuilder strSQL = new StringBuilder();
                 CommonMotions.CreateMan2DepSQL(ref strSQL, nTargetCount, PersonCode);
Index: branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/CopyTargetList/FrmCopyTargetList.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/CopyTargetList/FrmCopyTargetList.cs	(revision 364)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/CopyTargetList/FrmCopyTargetList.cs	(revision 365)
@@ -260,21 +260,26 @@
         /// <param name="e"></param>
         private void numUDConstPro_ValueChanged(object sender, EventArgs e)
         {
-            // ƒCƒxƒ“ƒgƒNƒŠƒA
-            SubControlEvent();
+            try
+            {
+                // ƒCƒxƒ“ƒgƒNƒŠƒA
+                SubControlEvent();
 
-            // •”��ƒRƒ“ƒ{ƒ{ƒbƒNƒX•Ï�X
-            SetcmbDepartment();
-            // ’S“–ŽÒƒRƒ“ƒ{ƒ{ƒbƒNƒX•Ï�X
-            SetcmbPersons();
-            // ’S“–ŽÒƒRƒ“ƒ{ƒ{ƒbƒNƒXƒZƒbƒgŽž•”��‚ðƒZƒbƒg‚·‚é
-            if (!SetPerosonToDepartment()) return;
+                // •”��ƒRƒ“ƒ{ƒ{ƒbƒNƒX•Ï�X
+                SetcmbDepartment();
+                // ’S“–ŽÒƒRƒ“ƒ{ƒ{ƒbƒNƒX•Ï�X
+                SetcmbPersons();
+                // ’S“–ŽÒƒRƒ“ƒ{ƒ{ƒbƒNƒXƒZƒbƒgŽž•”��‚ðƒZƒbƒg‚·‚é
+                if (!SetPerosonToDepartment()) return;
 
-            // ƒf�[ƒ^•\Ž¦
-            DataDisplay();
-
-            // ƒCƒxƒ“ƒgƒZƒbƒg
-            SetControlEvent();
+                // ƒf�[ƒ^•\Ž¦
+                DataDisplay();
+            }
+            finally
+            {
+                // ƒCƒxƒ“ƒgƒZƒbƒg
+                SetControlEvent();
+            }
         }
         #endregion
 
@@ -308,17 +313,22 @@
         /// <param name="e"></param>
         private void cmbConstructionPerson_SelectedIndexChanged(object sender, EventArgs e)
         {
-            // ƒCƒxƒ“ƒgƒNƒŠƒA
-            SubControlEvent();
+            try
+            {
+                // ƒCƒxƒ“ƒgƒNƒŠƒA
+                SubControlEvent();
 
-            // ’S“–ŽÒƒRƒ“ƒ{ƒ{ƒbƒNƒXƒZƒbƒgŽž•”��‚ðƒZƒbƒg‚·‚é
-            if (!SetPerosonToDepartment()) return;
+                // ’S“–ŽÒƒRƒ“ƒ{ƒ{ƒbƒNƒXƒZƒbƒgŽž•”��‚ðƒZƒbƒg‚·‚é
+                if (!SetPerosonToDepartment()) return;
 
-            // ƒf�[ƒ^•\Ž¦
-            DataDisplay();
-
-            // ƒCƒxƒ“ƒgƒZƒbƒg
-            SetControlEvent();
+                // ƒf�[ƒ^•\Ž¦
+                DataDisplay();
+            }
+            finally
+            {
+                // ƒCƒxƒ“ƒgƒZƒbƒg
+                SetControlEvent();
+            }
         }
         #endregion
 
Index: branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/CopyTargetList/FrmCopyTargetListAuxiliary.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/CopyTargetList/FrmCopyTargetListAuxiliary.cs	(revision 364)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/CopyTargetList/FrmCopyTargetListAuxiliary.cs	(revision 365)
@@ -806,6 +806,7 @@
 
                 int nTargetCount = (int)numUDConstPro.Value;
                 int DepartmentCode = GetDepartmentCode();
+                if (DepartmentCode > 0) return true;
 
                 StringBuilder strSQL = new StringBuilder();
                 CommonMotions.CreateMan2DepSQL(ref strSQL, nTargetCount, PersonCode);
Index: branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/CostomerRegist/FrmCostomerRegist.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/CostomerRegist/FrmCostomerRegist.cs	(revision 364)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/CostomerRegist/FrmCostomerRegist.cs	(revision 365)
@@ -333,7 +333,7 @@
             }
 
             // æ‰¿èª�ç”»é�¢ã�®ã€Œæ‰¿èª�å¯¾è±¡ãƒ‡ãƒ¼ã‚¿ã‚’è¦‹ã‚‹ã€�ã�‹ã‚‰ã�®èµ·å‹•æ™‚ã�¯æ‰¿èª�ãƒœã‚¿ãƒ³ã�®è¡¨ç¤ºã�Œã�‚ã‚‹
-            bool bApproval = ClsApprovalPermission.ExceApprovalScreen((int)ClsExcute.SubFormExecuteNo.ApprovalPerson);
+            bool bApproval = ClsApprovalPermission.ExceApprovalScreen();
             if (bApproval)
             {
                 // æ‰¿èª�å¯¾è±¡ã‚³ãƒ¼ãƒ‰ã‚’å�–å¾—ã�™ã‚‹
Index: branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/CostomerRegist/FrmCostomerRegistAuxiliary.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/CostomerRegist/FrmCostomerRegistAuxiliary.cs	(revision 364)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/CostomerRegist/FrmCostomerRegistAuxiliary.cs	(revision 365)
@@ -208,7 +208,7 @@
                 int iApprovalCode = ClsExcute.AppovalList.First(x => x.Value.Equals(s_MyProcessName)).Key;
 
                 // èµ·å‹•å…ƒã�®ãƒªã‚¹ãƒˆã�«æ‰¿èª�ç”»é�¢ã�Œã�‚ã‚Œã�°è¡¨ç¤ºã�—ã�ªã�„
-                if (ClsApprovalPermission.ExceApprovalScreen((int)ClsExcute.SubFormExecuteNo.ApprovalPerson))
+                if (ClsApprovalPermission.ExceApprovalScreen())
                 {
                     pnlApproval.Visible = false;
                 }
Index: branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/CostomerRegist/FrmCostomerRegistList.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/CostomerRegist/FrmCostomerRegistList.cs	(revision 364)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/CostomerRegist/FrmCostomerRegistList.cs	(revision 365)
@@ -267,21 +267,26 @@
         /// <param name="e"></param>
         private void numUDConstPro_ValueChanged(object sender, EventArgs e)
         {
-            // ƒCƒxƒ“ƒgƒNƒŠƒA
-            SubControlEvent();
+            try
+            {
+                // ƒCƒxƒ“ƒgƒNƒŠƒA
+                SubControlEvent();
 
-            // •”��ƒRƒ“ƒ{ƒ{ƒbƒNƒX•Ï�X
-            SetcmbDepartment();
-            // ’S“–ŽÒƒRƒ“ƒ{ƒ{ƒbƒNƒX•Ï�X
-            SetcmbPersons();
-            // ’S“–ŽÒƒRƒ“ƒ{ƒ{ƒbƒNƒXƒZƒbƒgŽž•”��‚ðƒZƒbƒg‚·‚é
-            if (!SetPerosonToDepartment()) return;
+                // •”��ƒRƒ“ƒ{ƒ{ƒbƒNƒX•Ï�X
+                SetcmbDepartment();
+                // ’S“–ŽÒƒRƒ“ƒ{ƒ{ƒbƒNƒX•Ï�X
+                SetcmbPersons();
+                // ’S“–ŽÒƒRƒ“ƒ{ƒ{ƒbƒNƒXƒZƒbƒgŽž•”��‚ðƒZƒbƒg‚·‚é
+                if (!SetPerosonToDepartment()) return;
 
-            // ƒf�[ƒ^•\Ž¦
-            DataDisplay();
-
-            // ƒCƒxƒ“ƒgƒZƒbƒg
-            SetControlEvent();
+                // ƒf�[ƒ^•\Ž¦
+                DataDisplay();
+            }
+            finally
+            {
+                // ƒCƒxƒ“ƒgƒZƒbƒg
+                SetControlEvent();
+            }
         }
         #endregion
 
Index: branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/CostomerRegist/FrmCostomerRegistListAuxiliary.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/CostomerRegist/FrmCostomerRegistListAuxiliary.cs	(revision 364)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/CostomerRegist/FrmCostomerRegistListAuxiliary.cs	(revision 365)
@@ -767,6 +767,7 @@
 
                 int nTargetCount = (int)numUDConstPro.Value;
                 int DepartmentCode = GetDepartmentCode();
+                if (DepartmentCode > 0) return true;
 
                 StringBuilder strSQL = new StringBuilder();
                 CommonMotions.CreateMan2DepSQL(ref strSQL, nTargetCount, PersonCode);
Index: branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/DRList/FrmDRList.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/DRList/FrmDRList.cs	(revision 364)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/DRList/FrmDRList.cs	(revision 365)
@@ -319,17 +319,22 @@
         /// <param name="e"></param>
         private void cmbPerson_SelectedIndexChanged(object sender, EventArgs e)
         {
-            // ƒCƒxƒ“ƒgƒNƒŠƒA
-            SubControlEvent();
+            try
+            {
+                // ƒCƒxƒ“ƒgƒNƒŠƒA
+                SubControlEvent();
 
-            // ’S“–ŽÒ‘I‘ðŽž•”��‘I‘ð‚ð�Ý’è‚·‚é
-            if (!SetPerosonToDepartment()) return;
+                // ’S“–ŽÒ‘I‘ðŽž•”��‘I‘ð‚ð�Ý’è‚·‚é
+                if (!SetPerosonToDepartment()) return;
 
-            // ƒf�[ƒ^•\Ž¦
-            DataDisplay();
-
-            // ƒCƒxƒ“ƒgƒZƒbƒg
-            SetControlEvent();
+                // ƒf�[ƒ^•\Ž¦
+                DataDisplay();
+            }
+            finally
+            {
+                // ƒCƒxƒ“ƒgƒZƒbƒg
+                SetControlEvent();
+            }
         }
         #endregion
 
Index: branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/DRList/FrmDRListAuxiliary.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/DRList/FrmDRListAuxiliary.cs	(revision 364)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/DRList/FrmDRListAuxiliary.cs	(revision 365)
@@ -1006,6 +1006,7 @@
 
                 int nTargetCount = (int)numUDConstPro.Value;
                 int DepartmentCode = GetDepartmentCode();
+                if (DepartmentCode > 0) return true;
 
                 StringBuilder strSQL = new StringBuilder();
                 CommonMotions.CreateMan2DepSQL(ref strSQL, nTargetCount, PersonCode);
Index: branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/DRWork/FrmDRWork.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/DRWork/FrmDRWork.cs	(revision 364)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/DRWork/FrmDRWork.cs	(revision 365)
@@ -325,7 +325,7 @@
                 }
 
                 // æ‰¿èª�ç”»é�¢ã�®ã€Œæ‰¿èª�å¯¾è±¡ãƒ‡ãƒ¼ã‚¿ã‚’è¦‹ã‚‹ã€�ã�‹ã‚‰ã�®èµ·å‹•æ™‚ã�¯æ‰¿èª�ãƒœã‚¿ãƒ³ã�®è¡¨ç¤ºã�Œã�‚ã‚‹
-                bool bApproval = ClsApprovalPermission.ExceApprovalScreen((int)ClsExcute.SubFormExecuteNo.ApprovalPerson);
+                bool bApproval = ClsApprovalPermission.ExceApprovalScreen();
                 if (bApproval)
                 {
                     // æ‰¿èª�å¯¾è±¡ã‚³ãƒ¼ãƒ‰ã‚’å�–å¾—ã�™ã‚‹
Index: branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/DRWork/FrmDRWorkAuxiliary.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/DRWork/FrmDRWorkAuxiliary.cs	(revision 364)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/DRWork/FrmDRWorkAuxiliary.cs	(revision 365)
@@ -1119,6 +1119,7 @@
                 if (!cmbConstructionPerson.Visible && PersonCode < 1) return false;
 
                 int DepartmentCode = CommonMotions.cnvInt(cmbDepartment.SelectedValue);
+                if (DepartmentCode > 0) return true;
 
                 string strSQL = PersonDB.CreatePrimarykeyString(PersonCode);
                 PersonInChargeMaster PersonRec = new PersonInChargeMaster();
@@ -2091,7 +2092,7 @@
                 int iApprovalCode = ClsExcute.AppovalList.First(x => x.Value.Equals(s_MyProcessName)).Key;
 
                 // èµ·å‹•å…ƒã�®ãƒªã‚¹ãƒˆã�«æ‰¿èª�ç”»é�¢ã�Œã�‚ã‚Œã�°è¡¨ç¤ºã�—ã�ªã�„
-                if (ClsApprovalPermission.ExceApprovalScreen((int)ClsExcute.SubFormExecuteNo.ApprovalPerson))
+                if (ClsApprovalPermission.ExceApprovalScreen())
                 {
                     pnlApproval.Visible = false;
                 }
Index: branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/DepExpenssList/FrmDepExpenssList.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/DepExpenssList/FrmDepExpenssList.cs	(revision 364)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/DepExpenssList/FrmDepExpenssList.cs	(revision 365)
@@ -442,33 +442,28 @@
 
             // ƒf�[ƒ^‚ª‚È‚¢�ê�‡‚Í”²‚¯‚é
             if (dgv.RowCount == 0) return;
-            if (CommonMotions.chkCellBlank(CurRow.Cells[(int)DCFirstHalf.SelectionCode].Value) &&
-                CommonMotions.chkCellBlank(CurRow.Cells[(int)DCFirstHalf.SelectionName].Value))
+            // �‡Œv�s‚Í�ˆ—�‚µ‚È‚¢
+            string strWork = CommonMotions.cnvString(CurRow.Cells[(int)DCFirstHalf.SelectionName].Value);
+            bool bTitle = false;
+            foreach (string strTitle in s_TotalTitleArray)
             {
-                return;
-            }
-            else
-            {
-                // �‡Œv�s‚Í�ˆ—�‚µ‚È‚¢
-                string strWork = CommonMotions.cnvString(CurRow.Cells[(int)DCFirstHalf.SelectionName].Value);
-                bool bTitle = false;
-                foreach (string strTitle in s_TotalTitleArray)
+                if (strWork.Equals(strTitle))
                 {
-                    if (strWork.Equals(strTitle))
-                    {
-                        bTitle = true;
-                        break;
-                    }
+                    bTitle = true;
+                    break;
                 }
-                if (bTitle) return;
             }
+
             // �s‘I‘ð�F‚ðŒ³‚É–ß‚·
             if (m_BeforeGridRow >= 0) DefaultRowChangeColor(m_BeforeGridRow);
 
-            // ‘I‘ð�s�”‚ð‘Þ”ð
-            m_BeforeGridRow = dgv.CurrentRow.Index;
-            // �s‘I‘ð�F‚ð�Ý’è
-            SelectRowChangeColor(m_BeforeGridRow);
+            if (!bTitle)
+            {
+                // ‘I‘ð�s�”‚ð‘Þ”ð
+                m_BeforeGridRow = dgv.CurrentRow.Index;
+                // �s‘I‘ð�F‚ð�Ý’è
+                SelectRowChangeColor(m_BeforeGridRow);
+            }
         }
         #endregion
 
@@ -492,20 +487,26 @@
         /// <param name="e"></param>
         private void numUDConstPro_ValueChanged(object sender, EventArgs e)
         {
-            // ƒCƒxƒ“ƒgƒNƒŠƒA
-            SubControlEvent();
+            try
+            {
+                // ƒCƒxƒ“ƒgƒNƒŠƒA
+                SubControlEvent();
 
-            // ‰æ–ÊƒNƒŠƒA
-            ClearDisplay();
+                // ‰æ–ÊƒNƒŠƒA
+                ClearDisplay();
 
-            // •”��ƒRƒ“ƒ{ƒ{ƒbƒNƒX•Ï�X
-            SetcmbDepartment();
+                // •”��ƒRƒ“ƒ{ƒ{ƒbƒNƒX•Ï�X
+                SetcmbDepartment();
 
-            // ƒf�[ƒ^•\Ž¦
-            DataDisplay();
+                // ƒf�[ƒ^•\Ž¦
+                DataDisplay();
 
-            // ƒCƒxƒ“ƒgƒZƒbƒg
-            SetControlEvent();
+            }
+            finally
+            {
+                // ƒCƒxƒ“ƒgƒZƒbƒg
+                SetControlEvent();
+            }
         }
         #endregion
 
Index: branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/DepExpenssList/FrmDepExpenssListAuxiliary.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/DepExpenssList/FrmDepExpenssListAuxiliary.cs	(revision 364)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/DepExpenssList/FrmDepExpenssListAuxiliary.cs	(revision 365)
@@ -324,15 +324,18 @@
                 DataGridViewEX dgv = dgvMaster;
 
                 // ‘Î�Ûƒf�[ƒ^‚ðŽæ“¾‚·‚é
-                var SumData = arData.Cast<object[]>().Max(y => CommonMotions.cnvLong(y[(int)DBGetData.OrdersDecisionprice]));
+                //var SumData = arData.Cast<object[]>().Max(y => CommonMotions.cnvLong(y[(int)DBGetData.OrdersDecisionprice]));
                 ArrayList ArrayData = new ArrayList();
                 object[] objwrk = null;
                 long MaxOrder = -1;
                 foreach (object[] ObjRec in arData)
                 {
+                    // ƒŒƒR�[ƒh‚Ì�æ“ª‚ÍƒR�[ƒh
                     int wrkCode = CommonMotions.cnvInt(ObjRec[(int)DBGetData.DepartmentCode]);
                     if (wrkCode != ExecCode) continue;
+
                     ArrayData.Add(ObjRec);
+
                     // Žó’�‹àŠz‚ª‘å‚«‚¢‚à‚Ì‚ðŽc‚·
                     long wrkOrder = CommonMotions.cnvLong(ObjRec[(int)DBGetData.OrdersDecisionprice]);
                     if (MaxOrder < wrkOrder)
@@ -351,15 +354,15 @@
                     wrkArray[i] = CommonMotions.cnvInt(objwrk[i]);
                 }
                 // ------ •”��ƒR�[ƒh�E’S“–ŽÒƒR�[ƒhŽæ“¾
-                int DepartmentCode = 0;
+                int DepartmentCode = GetDepartmentCode();
                 int PersonCode = 0;
-                if (GetDepartmentCode() == 0)
+
+                if (DepartmentCode == 0)
                 {   // �Ý’è•”��‚ª–³‚¯‚ê‚Îƒf�[ƒ^‚©‚ç“Ç‚Ý�ž‚Þ
                     DepartmentCode = CommonMotions.cnvInt(objwrk[(int)DBGetData.DepartmentCode]);
                 }
                 else
                 {   // •”��‚ª‚ ‚ê‚Î’S“–ŽÒƒR�[ƒh‚ðƒf�[ƒ^‚æ‚èŽæ“¾‚·‚é
-                    DepartmentCode = GetDepartmentCode();
                     PersonCode = CommonMotions.cnvInt(objwrk[(int)DBGetData.DepartmentCode]);
                 }
                 // ------------------------------------------------------------------------------------------
@@ -375,14 +378,17 @@
                 if (PersonCode == 0)
                 {
                     int CurPersonCode = 0;
+                    int nDepCode = 0;
                     foreach (object[] ObjRec in TargetList)
                     {
-                        int nDepCode = CommonMotions.cnvInt(ObjRec[(int)CommonLedgerData.GetPersonTerm.DepartmentCode]);
+                        nDepCode = CommonMotions.cnvInt(ObjRec[(int)CommonLedgerData.GetPersonTerm.DepartmentCode]);
                         if (nDepCode != DepartmentCode) continue;
 
                         CurPersonCode = CommonMotions.cnvInt(ObjRec[(int)CommonLedgerData.GetPersonTerm.PersonCode]);
                         // Œo”ïŽæ“¾
-                        PersonExpensesCost[] GetCostList = ArraryCost.Where(x => x.PersonCode == CurPersonCode).ToArray();
+                        PersonExpensesCost[] GetCostList = ArraryCost.Where(x => x.DepartmentCode == DepartmentCode
+                                                                                && x.PersonCode == CurPersonCode)
+                                                                        .ToArray();
                         foreach (PersonExpensesCost CurCostRec in GetCostList)
                         {
                             CostValue += CurCostRec.CostValue.Sum();
@@ -389,7 +395,8 @@
                         }
                     }
                     // ‹‹—^—Ý�ÏŽæ“¾
-                    TotalSalary += ArrarySalary.Where(x => x.DepartmentCode == DepartmentCode).Sum(y => y.SalaryValue);
+                    TotalSalary += ArrarySalary.Where(x => x.DepartmentCode == DepartmentCode)
+                                                .Sum(y => y.SalaryValue);
 
                     // �U•ª‹‹—^‹àŠz
                     CommonLedgerData.ProfitGeneral(LedgerDB, TargetYear, DepartmentCode, 0, ref OnSalary);
@@ -409,13 +416,17 @@
                     if (ObjCur == null) return;
 
                     // Œo”ïŽæ“¾
-                    PersonExpensesCost[] GetCostList = ArraryCost.Where(x => x.PersonCode == PersonCode).ToArray();
+                    PersonExpensesCost[] GetCostList = ArraryCost.Where(x => x.DepartmentCode == DepartmentCode
+                                                                                && x.PersonCode == PersonCode)
+                                                                    .ToArray();
                     foreach (PersonExpensesCost CurCostRec in GetCostList)
                     {
                         CostValue += CurCostRec.CostValue.Sum();
                     }
                     // ‹‹—^—Ý�ÏŽæ“¾
-                    TotalSalary = ArrarySalary.Where(x => x.PersonCode == PersonCode).Sum(y => y.SalaryValue);
+                    TotalSalary = ArrarySalary.Where(x => x.DepartmentCode == DepartmentCode
+                                                        && x.PersonCode == PersonCode)
+                                                .Sum(y => y.SalaryValue);
 
                     // �U•ª‹‹—^‹àŠz
                     CommonLedgerData.ProfitGeneral(LedgerDB, TargetYear, DepartmentCode, PersonCode, ref OnSalary);
@@ -859,7 +870,7 @@
 
                 // ‘Î�Û‚ÌŒo”ï‚ðŽæ“¾‚·‚é
                 List<PersonExpensesCost> ArraryCost = new List<PersonExpensesCost>();
-                CommonLedgerData.GetPersonExpensesCostValueAll(CostDB, TargetYear, ArrarySalary, ref ArraryCost);
+                CommonLedgerData.GetPersonExpensesCostValueAll(CostDB, TargetYear, TargetList, ArrarySalary, ref ArraryCost);
 
                 // ProgressBar‚Ì’l‚ð•Ï�X‚·‚é
                 prgber.Value++;
@@ -883,11 +894,11 @@
                 switch (DispType)
                 {
                     case (int)DispDataTypeCode.AllTotal:
-                        CreateInitSQLType1(ref strSQL);
+                        CreateSQL(ref strSQL);
                         break;
 
                     case (int)DispDataTypeCode.Department:
-                        CreateInitSQLType2(ref strSQL);
+                        CreateSQL(ref strSQL, false, true);
                         break;
                 }
 
@@ -1003,18 +1014,16 @@
             try
             {
                 // ‘Î�Û•”�iŽÒ�jƒR�[ƒhŽæ“¾
-                var Target = arData.Cast<object[]>().GroupBy(x => CommonMotions.cnvInt(x[(int)DBGetData.DepartmentCode])).ToArray();
-                List<int> vs = new List<int>();
+                var Target = arData.Cast<object[]>().GroupBy(y => CommonMotions.cnvInt(y[(int)DBGetData.DepartmentCode]))
+                                                    .ToArray();
                 foreach (var ObjCur in Target)
                 {
-                    vs.Add(CommonMotions.cnvInt(ObjCur.Key));
-                }
+                    int nKeyCode = CommonMotions.cnvInt(ObjCur.Key);
+                    if (nKeyCode < 1) continue;
 
-                // ----- Ž{�H’†ƒf�[ƒ^•\Ž¦
-                foreach (int CurCode in vs)
-                {
+                    // ----- Ž{�H’†ƒf�[ƒ^•\Ž¦
                     // ƒOƒŠƒbƒh‚Öƒf�[ƒ^•\Ž¦
-                    GridDataSet(CurCode, arData, ref ino, ref TotalArea,
+                    GridDataSet(nKeyCode, arData, ref ino, ref TotalArea,
                                 TargetList,
                                 dtDefaultStart, dtDefaultEnd,
                                 SalaryDB, LedgerDB, CostDB,
@@ -1075,9 +1084,6 @@
             DepartmentString,
             DisplayOrder,
             OrdersDecisionprice,
-            //CompanyExpenses,
-            //DepartmentExpenses,
-            //SalesExpenses,
             TotalPayment,
             GrossProfit,
             NetProfit,
@@ -1091,26 +1097,45 @@
         }
         #endregion
 
-        #region ƒf�[ƒ^Žæ“¾SQL�ì�¬Type1
+        #region ƒf�[ƒ^Žæ“¾SQL�ì�¬
         /// <summary>
-        /// •\Ž¦—pƒf�[ƒ^Žæ“¾SQL�ì�¬Type1
+        /// •\Ž¦—pƒf�[ƒ^Žæ“¾SQL�ì�¬
         /// </summary>
-        private void CreateInitSQLType1(ref StringBuilder strSQL)
+        private void CreateSQL(ref StringBuilder strSQL, bool bDepartment = true, bool bExistsFlg = true)
         {
             try
             {
                 int NotOrder = CommonDefine.ProjectsStatus.First(x => x.Value.Equals("”ñ Žó ’�")).Key;
+                int DepCode = CommonMotions.cnvInt(cmbDepartment.SelectedValue);
+
+                // �Å‘å�E�Å�¬”NŒŽ“ú
+                string strdtMin = DateTime.MinValue.ToShortDateString();
+                string strdtMax = DateTime.MaxValue.ToShortDateString();
+
+                // �¡ŠúŠJŽn�I—¹”NŒŽ“ú
+                int nTargetYear = (int)numUDConstPro.Value;
+                DateTime dtDefaultStart = CommonMotions.GetOpeningEndDate(nTargetYear, true);
+                DateTime dtDefaultEnd = CommonMotions.GetOpeningEndDate(nTargetYear, false);
+                string strdtStart = dtDefaultStart.ToShortDateString();
+                string strdtEnd = dtDefaultEnd.ToShortDateString();
+
                 // ----- ‚r‚p‚k�ì�¬
                 // ‘¶�Ý�Ú�×‘ä’ ƒf�[ƒ^ŒŸ�õ
                 strSQL.Append("SELECT");
+                if (bDepartment)
+                {
+                    strSQL.Append(" B.ConstrDepCode");
+                    strSQL.Append(", D.DepartmentString");
+                    strSQL.Append(", D.DISPLAYORDER AS DISPLAYORDER");
+                }
+                else
+                {
+                    strSQL.Append(" C.PersonCode");
+                    strSQL.Append(", C.PersonName");
+                    strSQL.Append(", C.DISPLAYORDER AS 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)");
-                //strSQL.Append(", SUM(A.SALESEXPENSES)");
                 strSQL.Append(", SUM(A.TOTALPAYMENT)");
                 strSQL.Append(", SUM(A.GROSSPROFIT)");
                 strSQL.Append(", SUM(A.NETPROFIT)");
@@ -1124,111 +1149,48 @@
                 strSQL.Append(", G.NameString");
                 strSQL.Append(", G.DisplayOrder");
 
-                strSQL.Append(" FROM PERSONINCHARGEMASTER AS C");
-                strSQL.Append(" LEFT JOIN CONSTRUCTIONBASEINFO AS 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.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 AS A");
-                strSQL.Append("       ON A.CONSTRUCTIONCODE = B.CONSTRUCTIONCODE");
+                strSQL.Append(" FROM");
 
-                strSQL.Append(" LEFT JOIN constrledgerexpenses AS F");
-                strSQL.Append("        ON F.CONSTRUCTIONCODE = B.CONSTRUCTIONCODE");
-                strSQL.Append(" LEFT JOIN divisionmaster AS G");
-                strSQL.AppendFormat("  ON G.DivisionCode = {0}", (int)DivisionMaster.DivisionMasterCodeDef.ConstructionExpenses);
-                strSQL.Append("        And G.NameCode = F.NameCode");
+                strSQL.Append(" (Select DepartmentCode");
+                strSQL.Append(", DisplayOrder");
+                strSQL.Append(", DepartmentString");
+                strSQL.Append(", StartDate");
+                strSQL.AppendFormat(", Case WHEN DATE(CompDate) = DATE('{0}') Then DATE('{1}')", strdtMin, strdtMax);
+                strSQL.Append("  Else DATE(CompDate) End As CompDate");
+                strSQL.Append(", DeleteFlg");
+                strSQL.Append(" From departmentmaster) As D");
 
-                strSQL.Append(", DEPARTMENTMASTER D");
-                strSQL.Append(" WHERE D.DEPARTMENTCODE = B.ConstrDepCode");
+                strSQL.Append(" INNER JOIN(Select");
+                strSQL.Append(" PersonCode");
+                strSQL.Append(", StartDate");
+                strSQL.AppendFormat(", Case WHEN DATE(CompDate) = DATE('{0}') Then DATE('{1}')", strdtMin, strdtMax);
+                strSQL.Append(" Else DATE(CompDate) End As CompDate");
+                strSQL.Append(", DepartmentCode");
+                strSQL.Append(", DepartmentName");
+                strSQL.Append(" From chgchargedep) As ChgDep");
+                strSQL.Append(" On ChgDep.DepartmentCode = D.DepartmentCode");
+                strSQL.AppendFormat(" And(DATE(ChgDep.StartDate) <= DATE('{0}')", strdtEnd);
+                strSQL.AppendFormat(" And DATE('{0}') <= DATE(ChgDep.CompDate))", strdtStart);
 
-                strSQL.Append(" GROUP BY");
-                strSQL.Append(" B.ConstrDepCode");
-                strSQL.Append(", E.DetailString");
-                strSQL.Append(", D.DISPLAYORDER");
-                strSQL.Append(", F.NameCode");
+                strSQL.Append(" LEFT JOIN(Select");
+                strSQL.Append(" PersonCode");
+                strSQL.Append(", DisplayOrder");
+                strSQL.Append(", PersonName");
+                strSQL.Append(", StartDate");
+                strSQL.AppendFormat(", Case WHEN DATE(EndDate) = DATE('{0}') Then DATE('{1}')", strdtMin, strdtMax);
+                strSQL.Append(" Else DATE(EndDate) End As EndDate");
+                strSQL.Append(", EmployeeClassFlg");
+                strSQL.Append(", LedgerFlg");
+                strSQL.Append(" From PERSONINCHARGEMASTER) AS C");
+                strSQL.Append(" ON C.PersonCode = ChgDep.PersonCode");
+                strSQL.AppendFormat(" And C.LedgerFlg = {0}", (int)PersonInChargeMaster.EmployeeClassFlgDef.Regular);
 
-                strSQL.Append(" ORDER BY D.DISPLAYORDER ASC, G.DisplayOrder ASC");
-            }
-            catch (Exception ex)
-            {
-                logger.ErrorFormat("ƒVƒXƒeƒ€ƒGƒ‰�[�F{0}�F{1}", ex.Message, strSQL);
-            }
-        }
-        #endregion
-
-        #region ƒf�[ƒ^Žæ“¾SQL�ì�¬Type2
-        /// <summary>
-        /// ƒf�[ƒ^Žæ“¾SQL�ì�¬Type2(•”��‚²‚Æ‚Ìˆê——ƒf�[ƒ^)
-        /// </summary>
-        private void CreateInitSQLType2(ref StringBuilder strSQL)
-        {
-            try
-            {
-                // ----- ‚r‚p‚k�ì�¬
-                CreateType2SQL(true, ref strSQL);
-            }
-            catch (Exception ex)
-            {
-                logger.ErrorFormat("ƒVƒXƒeƒ€ƒGƒ‰�[�F{0}�F{1}", ex.Message, strSQL);
-            }
-        }
-        #endregion
-
-        #region •”��‚²‚Æ‚Ìˆê——‚r‚p‚k‚ð�ì�¬‚·‚é
-        /// <summary>
-        /// •”��‚²‚Æ‚Ìˆê——‚r‚p‚k‚ð�ì�¬‚·‚é
-        /// </summary>
-        private void CreateType2SQL(bool bExistsFlg, ref StringBuilder strSQL)
-        {
-            try
-            {
-                int NotOrder = CommonDefine.ProjectsStatus.First(x => x.Value.Equals("”ñ Žó ’�")).Key;
-                int DepCode = CommonMotions.cnvInt(cmbDepartment.SelectedValue);
-
-                // Šú‚©‚çŠúŽñ�EŠú––“ú‚ðŽæ“¾‚·‚é
-                DateTime dtDefaultStart = CommonMotions.GetOpeningEndDate((int)numUDConstPro.Value, true);
-                DateTime dtDefaultEnd = CommonMotions.GetOpeningEndDate((int)numUDConstPro.Value, false);
-
-                // ----- ‚r‚p‚k�ì�¬
-                // ‘¶�Ý�Ú�×‘ä’ ƒf�[ƒ^ŒŸ�õ
-                strSQL.Append("SELECT");
-
-                strSQL.Append(" C.PERSONCODE");
-                strSQL.Append(", C.PERSONNAME");
-                strSQL.Append(", C.DISPLAYORDER AS DISPLAYORDER");
-                strSQL.Append(", SUM(A.ORDERSDECISIONPRICE)");
-                //strSQL.Append(", SUM(A.COMPANYEXPENSES)");
-                //strSQL.Append(", SUM(A.DEPARTMENTEXPENSES)");
-                //strSQL.Append(", SUM(A.SALESEXPENSES)");
-                strSQL.Append(", SUM(A.TOTALPAYMENT)");
-                strSQL.Append(", SUM(A.GROSSPROFIT)");
-                strSQL.Append(", SUM(A.NETPROFIT)");
-                strSQL.Append(", C.EMPLOYEECLASSFLG AS EMPLOYEECLASSFLG");
-                strSQL.Append(", F.SeqNo As ExpSeqNo");
-                strSQL.Append(", F.NameCode As ExpCode");
-                strSQL.Append(", F.ExpensesRaito As ExpRaito");
-                strSQL.Append(", SUM(F.ExpensesValue) AS ExpValue");
-                strSQL.Append(", G.NameString");
-                strSQL.Append(", G.DisplayOrder");
-
-                strSQL.Append(" FROM PERSONINCHARGEMASTER AS C");
-
-                strSQL.Append(" LEFT JOIN chgchargedep AS D");
-                strSQL.Append("      ON D.PersonCode = C.PersonCode");
-                strSQL.AppendFormat(" AND((DATE(D.STARTDATE) <= DATE('{0}'))", dtDefaultEnd.ToShortDateString());
-                strSQL.AppendFormat(" AND(DATE('{0}') <= DATE(D.CompDate)", dtDefaultStart.ToShortDateString());
-                strSQL.AppendFormat(" OR DATE('{0}') = DATE(D.CompDate)))", DateTime.MinValue.ToShortDateString());
-
                 strSQL.Append(" LEFT JOIN CONSTRUCTIONBASEINFO AS B");
                 strSQL.Append("      ON B.CONSTRUCTIONPERSONCODE = C.PERSONCODE");
+                strSQL.Append("       AND B.ConstrDepCode = D.DepartmentCode");
                 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");
@@ -1235,37 +1197,51 @@
                 strSQL.AppendFormat(" And E.DetailNo = {0}", (int)ConstructionBaseInfoDetail.DataNoDef.ConstrDepartmentName);
 
                 strSQL.Append(" LEFT JOIN CONSTRUCTIONLEDGER AS A");
-                strSQL.Append("      ON A.CONSTRUCTIONCODE = B.CONSTRUCTIONCODE");
+                strSQL.Append("       ON A.CONSTRUCTIONCODE = B.CONSTRUCTIONCODE");
 
                 strSQL.Append(" LEFT JOIN constrledgerexpenses AS F");
                 strSQL.Append("        ON F.CONSTRUCTIONCODE = B.CONSTRUCTIONCODE");
+
                 strSQL.Append(" LEFT JOIN divisionmaster AS G");
                 strSQL.AppendFormat("  ON G.DivisionCode = {0}", (int)DivisionMaster.DivisionMasterCodeDef.ConstructionExpenses);
                 strSQL.Append("        And G.NameCode = F.NameCode");
 
                 strSQL.Append(" WHERE");
-                strSQL.AppendFormat(" ((DATE(C.STARTDATE) <= DATE('{0}'))", dtDefaultEnd.ToShortDateString());
-                strSQL.AppendFormat(" AND(DATE('{0}') <= DATE(C.ENDDATE)", dtDefaultStart.ToShortDateString());
-                strSQL.AppendFormat(" OR DATE('{0}') = DATE(C.ENDDATE)))", DateTime.MinValue.ToShortDateString());
+                strSQL.AppendFormat(" (DATE(D.StartDate) <= DATE('{0}')", strdtEnd);
+                strSQL.AppendFormat(" And DATE('{0}') <= DATE(D.CompDate))", strdtStart);
 
-                strSQL.AppendFormat(" AND C.LedgerFlg = {0}", (int)PersonInChargeMaster.LedgerDivNoDef.CalcTarget);
+                // ‘S‘ÌŒŸ�õ‚©•”��ŒŸ�õ‚©�H
+                if (bDepartment)
+                {
+                    strSQL.Append(" GROUP BY");
+                    strSQL.Append(" D.DepartmentCode, F.NameCode");
 
-                strSQL.AppendFormat(" AND D.DepartmentCode = {0}", DepCode);
-
-                if (bExistsFlg)
-                {   // ‘Î�ÛŠú‚Í�Ý�Ð‚µ‚½�l
-                    strSQL.AppendFormat(" AND (DATE('{0}') < DATE(C.EndDate)", dtDefaultEnd.ToShortDateString());
-                    strSQL.AppendFormat(" OR DATE('{0}') = DATE(C.ENDDATE))", DateTime.MinValue.ToShortDateString());
+                    strSQL.Append(" ORDER BY D.DISPLAYORDER ASC, G.DisplayOrder ASC");
                 }
                 else
-                {   // ‘Î�ÛŠú‚ÉŽ«‚ß‚½’S“–ŽÒ
-                    strSQL.AppendFormat(" AND(DATE('{0}') <= DATE(C.EndDate)", dtDefaultStart.ToShortDateString());
-                    strSQL.AppendFormat(" AND DATE(C.EndDate) <= DATE('{0}'))", dtDefaultEnd.ToShortDateString());
-                }
+                {
+                    strSQL.AppendFormat(" AND (DATE(C.STARTDATE) <= DATE('{0}')", strdtEnd);
+                    strSQL.AppendFormat(" AND DATE('{0}') <= DATE(C.ENDDATE))", strdtStart);
 
-                strSQL.Append(" GROUP BY C.DISPLAYORDER, C.PERSONCODE, C.PERSONNAME, C.EMPLOYEECLASSFLG, F.NameCode");
-                strSQL.Append(" ORDER BY C.EMPLOYEECLASSFLG ASC, C.DISPLAYORDER ASC, G.DisplayOrder ASC");
+                    strSQL.AppendFormat(" AND C.LedgerFlg = {0}", (int)PersonInChargeMaster.LedgerDivNoDef.CalcTarget);
 
+                    strSQL.AppendFormat(" AND D.DepartmentCode = {0}", DepCode);
+
+                    // �Ý�ÐŽÒ�E‘Þ�EŽÒ
+                    if (bExistsFlg)
+                    {   // �Ý�Ð‚µ‚Ä‚¢‚é’S“–ŽÒ
+                        strSQL.AppendFormat(" AND (DATE('{0}') < DATE(C.EndDate)", strdtEnd);
+                        strSQL.AppendFormat(" OR DATE('{0}') = DATE(C.ENDDATE))", strdtMax);
+                    }
+                    else
+                    {   // ‘Î�ÛŠú‚ÉŽ«‚ß‚½’S“–ŽÒ
+                        strSQL.AppendFormat(" AND(DATE('{0}') <= DATE(C.EndDate)", strdtStart);
+                        strSQL.AppendFormat(" AND DATE(C.EndDate) <= DATE('{0}'))", strdtEnd);
+                    }
+
+                    strSQL.Append(" GROUP BY D.DepartmentCode, C.PersonCode, F.NameCode");
+                    strSQL.Append(" ORDER BY D.DISPLAYORDER ASC, C.DisplayOrder ASC, G.DisplayOrder ASC");
+                }
             }
             catch (Exception ex)
             {
@@ -1284,7 +1260,8 @@
             try
             {
                 // ----- ‚r‚p‚k�ì�¬
-                CreateType2SQL(false, ref strSQL);
+                //CreateType2SQL(false, ref strSQL);
+                CreateSQL(ref strSQL, false, false);
 
                 if (!LedgerDB.ExecuteReader(strSQL.ToString(), ref arData)) return;
             }
Index: branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/EstimateInput/FrmEstimateInput.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/EstimateInput/FrmEstimateInput.cs	(revision 364)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/EstimateInput/FrmEstimateInput.cs	(revision 365)
@@ -43,7 +43,8 @@
         /// </summary>
         private const string s_MyProcessName = "�ÏŽZŒ©�Ï�‘�³”F";
         #endregion
-        
+
+        #region •\Ž¦ƒJƒ‰ƒ€
         /// <summary>
         /// •\Ž¦ƒJƒ‰ƒ€
         /// </summary>
@@ -104,7 +105,9 @@
             SubConstractorName,     // ----- ‚±‚±‚Ü‚Å‚Í’†�€–ÚƒOƒŠƒbƒh‚Æ“¯‚¶
             MasterIn,
         }
+        #endregion
 
+        #region •\Ž¦ƒ‰ƒxƒ‹
         /// <summary>
         /// •\Ž¦ƒ‰ƒxƒ‹
         /// </summary>
@@ -121,7 +124,9 @@
             WorkCount,
             GridTotal,
         }
+        #endregion
 
+        #region ƒ{ƒ^ƒ“ƒRƒ“ƒgƒ��[ƒ‹
         /// <summary>
         /// ƒ{ƒ^ƒ“ƒRƒ“ƒgƒ��[ƒ‹
         /// </summary>
@@ -132,6 +137,9 @@
             DataEntry,
             DataDelete,
         }
+        #endregion
+
+        #region ƒy�[ƒWƒ‰ƒxƒ‹ƒJƒEƒ“ƒg
         /// <summary>
         /// ƒy�[ƒWƒ‰ƒxƒ‹ƒJƒEƒ“ƒg
         /// </summary>
@@ -143,6 +151,7 @@
             ComponentLabel,
             GridTotal,
         }
+        #endregion
 
         /// <summary>
         /// ŒÅ’è”­’�ŽÒƒR�[ƒh�i‚»‚Ì‘¼�j
Index: branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Material/ConstrMATLList/FrmConstrMATLList.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Material/ConstrMATLList/FrmConstrMATLList.cs	(revision 364)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Material/ConstrMATLList/FrmConstrMATLList.cs	(revision 365)
@@ -266,21 +266,26 @@
         /// <param name="e"></param>
         private void numUDConstPro_ValueChanged(object sender, EventArgs e)
         {
-            // ƒCƒxƒ“ƒgƒNƒŠƒA
-            SubControlEvent();
+            try
+            {
+                // ƒCƒxƒ“ƒgƒNƒŠƒA
+                SubControlEvent();
 
-            // •”��ƒRƒ“ƒ{ƒ{ƒbƒNƒX•Ï�X
-            SetcmbDepartment();
-            // ’S“–ŽÒƒRƒ“ƒ{ƒ{ƒbƒNƒX•Ï�X
-            SetcmbPersons();
-            // ’S“–ŽÒƒRƒ“ƒ{ƒ{ƒbƒNƒXƒZƒbƒgŽž•”��‚ðƒZƒbƒg‚·‚é
-            if (!SetPerosonToDepartment()) return;
+                // •”��ƒRƒ“ƒ{ƒ{ƒbƒNƒX•Ï�X
+                SetcmbDepartment();
+                // ’S“–ŽÒƒRƒ“ƒ{ƒ{ƒbƒNƒX•Ï�X
+                SetcmbPersons();
+                // ’S“–ŽÒƒRƒ“ƒ{ƒ{ƒbƒNƒXƒZƒbƒgŽž•”��‚ðƒZƒbƒg‚·‚é
+                if (!SetPerosonToDepartment()) return;
 
-            // ƒf�[ƒ^•\Ž¦
-            DataDisplay();
-
-            // ƒCƒxƒ“ƒgƒZƒbƒg
-            SetControlEvent();
+                // ƒf�[ƒ^•\Ž¦
+                DataDisplay();
+            }
+            finally
+            {
+                // ƒCƒxƒ“ƒgƒZƒbƒg
+                SetControlEvent();
+            }
         }
         #endregion
 
@@ -314,17 +319,22 @@
         /// <param name="e"></param>
         private void cmbConstructionPerson_SelectedIndexChanged(object sender, EventArgs e)
         {
-            // ƒCƒxƒ“ƒgƒNƒŠƒA
-            SubControlEvent();
+            try
+            {
+                // ƒCƒxƒ“ƒgƒNƒŠƒA
+                SubControlEvent();
 
-            // ’S“–ŽÒ‘I‘ðŽž•”��‘I‘ð‚ð�Ý’è‚·‚é
-            if (!SetPerosonToDepartment()) return;
+                // ’S“–ŽÒ‘I‘ðŽž•”��‘I‘ð‚ð�Ý’è‚·‚é
+                if (!SetPerosonToDepartment()) return;
 
-            // ƒf�[ƒ^•\Ž¦
-            DataDisplay();
-
-            // ƒCƒxƒ“ƒgƒZƒbƒg
-            SetControlEvent();
+                // ƒf�[ƒ^•\Ž¦
+                DataDisplay();
+            }
+            finally
+            {
+                // ƒCƒxƒ“ƒgƒZƒbƒg
+                SetControlEvent();
+            }
         }
         #endregion
 
Index: branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Material/ConstrMATLList/FrmConstrMATLListAuxiliary.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Material/ConstrMATLList/FrmConstrMATLListAuxiliary.cs	(revision 364)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Material/ConstrMATLList/FrmConstrMATLListAuxiliary.cs	(revision 365)
@@ -1189,6 +1189,7 @@
 
                 int nTargetCount = (int)numUDConstPro.Value;
                 int DepartmentCode = GetDepartmentCode();
+                if (DepartmentCode > 0) return true;
 
                 StringBuilder strSQL = new StringBuilder();
                 CommonMotions.CreateMan2DepSQL(ref strSQL, nTargetCount, PersonCode);
Index: branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/PriceOfBudget/FrmPriceOfBudget.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/PriceOfBudget/FrmPriceOfBudget.cs	(revision 364)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/PriceOfBudget/FrmPriceOfBudget.cs	(revision 365)
@@ -227,21 +227,26 @@
         /// <param name="e"></param>
         private void numUDConstPro_ValueChanged(object sender, EventArgs e)
         {
-            // ã‚¤ãƒ™ãƒ³ãƒˆã‚¯ãƒªã‚¢
-            SubControlEvent();
+            try
+            {
+                // ã‚¤ãƒ™ãƒ³ãƒˆã‚¯ãƒªã‚¢
+                SubControlEvent();
 
-            // éƒ¨ç½²ã‚³ãƒ³ãƒœãƒœãƒƒã‚¯ã‚¹å¤‰æ›´
-            SetcmbDepartment();
-            // æ‹…å½“è€…ã‚³ãƒ³ãƒœãƒœãƒƒã‚¯ã‚¹å¤‰æ›´
-            SetcmbPersons();
-            // æ‹…å½“è€…ã‚³ãƒ³ãƒœãƒœãƒƒã‚¯ã‚¹ã‚»ãƒƒãƒˆæ™‚éƒ¨ç½²ã‚’ã‚»ãƒƒãƒˆã�™ã‚‹
-            if (!SetPerosonToDepartment()) return;
+                // éƒ¨ç½²ã‚³ãƒ³ãƒœãƒœãƒƒã‚¯ã‚¹å¤‰æ›´
+                SetcmbDepartment();
+                // æ‹…å½“è€…ã‚³ãƒ³ãƒœãƒœãƒƒã‚¯ã‚¹å¤‰æ›´
+                SetcmbPersons();
+                // æ‹…å½“è€…ã‚³ãƒ³ãƒœãƒœãƒƒã‚¯ã‚¹ã‚»ãƒƒãƒˆæ™‚éƒ¨ç½²ã‚’ã‚»ãƒƒãƒˆã�™ã‚‹
+                if (!SetPerosonToDepartment()) return;
 
-            // ãƒ‡ãƒ¼ã‚¿è¡¨ç¤º
-            DispData();
-
-            // ã‚¤ãƒ™ãƒ³ãƒˆã‚»ãƒƒãƒˆ
-            SetControlEvent();
+                // ãƒ‡ãƒ¼ã‚¿è¡¨ç¤º
+                DispData();
+            }
+            finally
+            {
+                // ã‚¤ãƒ™ãƒ³ãƒˆã‚»ãƒƒãƒˆ
+                SetControlEvent();
+            }
         }
         #endregion
 
@@ -275,17 +280,22 @@
         /// <param name="e"></param>
         private void cmbConstructionPerson_SelectedIndexChanged(object sender, EventArgs e)
         {
-            // ã‚¤ãƒ™ãƒ³ãƒˆã‚¯ãƒªã‚¢
-            SubControlEvent();
+            try
+            {
+                // ã‚¤ãƒ™ãƒ³ãƒˆã‚¯ãƒªã‚¢
+                SubControlEvent();
 
-            // æ‹…å½“è€…é�¸æŠžæ™‚éƒ¨ç½²é�¸æŠžã‚’è¨­å®šã�™ã‚‹
-            if (!SetPerosonToDepartment()) return;
+                // æ‹…å½“è€…é�¸æŠžæ™‚éƒ¨ç½²é�¸æŠžã‚’è¨­å®šã�™ã‚‹
+                if (!SetPerosonToDepartment()) return;
 
-            // ãƒ‡ãƒ¼ã‚¿è¡¨ç¤º
-            DispData();
-
-            // ã‚¤ãƒ™ãƒ³ãƒˆã‚»ãƒƒãƒˆ
-            SetControlEvent();
+                // ãƒ‡ãƒ¼ã‚¿è¡¨ç¤º
+                DispData();
+            }
+            finally
+            {
+                // ã‚¤ãƒ™ãƒ³ãƒˆã‚»ãƒƒãƒˆ
+                SetControlEvent();
+            }
         }
         #endregion
 
Index: branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/PriceOfBudget/FrmPriceOfBudgetAuxiliary.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/PriceOfBudget/FrmPriceOfBudgetAuxiliary.cs	(revision 364)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/PriceOfBudget/FrmPriceOfBudgetAuxiliary.cs	(revision 365)
@@ -1209,6 +1209,7 @@
 
                 int nTargetCount = (int)numUDConstPro.Value;
                 int DepartmentCode = GetDepartmentCode();
+                if (DepartmentCode > 0) return true;
 
                 StringBuilder strSQL = new StringBuilder();
                 CommonMotions.CreateMan2DepSQL(ref strSQL, nTargetCount, PersonCode);
Index: branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Proceedings/FrmProceedingsAuxiliary.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Proceedings/FrmProceedingsAuxiliary.cs	(revision 364)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Proceedings/FrmProceedingsAuxiliary.cs	(revision 365)
@@ -1115,6 +1115,7 @@
 
                 int nTargetCount = CommonMotions.ConvDate2YearOrPeriod(dtMeetingDate.Value);
                 int DepartmentCode = GetDepartmentCode();
+                if (DepartmentCode > 0) return true;
 
                 StringBuilder strSQL = new StringBuilder();
                 CommonMotions.CreateMan2DepSQL(ref strSQL, nTargetCount, PersonCode);
Index: branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/PurchaseOrderStatus/FrmPurchaseOrderStatus.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/PurchaseOrderStatus/FrmPurchaseOrderStatus.cs	(revision 364)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/PurchaseOrderStatus/FrmPurchaseOrderStatus.cs	(revision 365)
@@ -321,17 +321,22 @@
         /// <param name="e"></param>
         private void cmbConstructionPerson_SelectedIndexChanged(object sender, EventArgs e)
         {
-            // ƒCƒxƒ“ƒgƒNƒŠƒA
-            SubControlEvent();
+            try
+            {
+                // ƒCƒxƒ“ƒgƒNƒŠƒA
+                SubControlEvent();
 
-            // ’S“–ŽÒ‘I‘ðŽž•”��‘I‘ð‚ð�Ý’è‚·‚é
-            if (!SetPerosonToDepartment()) return;
+                // ’S“–ŽÒ‘I‘ðŽž•”��‘I‘ð‚ð�Ý’è‚·‚é
+                if (!SetPerosonToDepartment()) return;
 
-            // ƒf�[ƒ^•\Ž¦
-            DataDisplay();
-
-            // ƒCƒxƒ“ƒgƒZƒbƒg
-            SetControlEvent();
+                // ƒf�[ƒ^•\Ž¦
+                DataDisplay();
+            }
+            finally
+            {
+                // ƒCƒxƒ“ƒgƒZƒbƒg
+                SetControlEvent();
+            }
         }
         #endregion
 
Index: branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/PurchaseOrderStatus/FrmPurchaseOrderStatusAuxiliary.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/PurchaseOrderStatus/FrmPurchaseOrderStatusAuxiliary.cs	(revision 364)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/PurchaseOrderStatus/FrmPurchaseOrderStatusAuxiliary.cs	(revision 365)
@@ -1094,6 +1094,7 @@
 
                 int nTargetCount = (int)numUDConstPro.Value;
                 int DepartmentCode = GetDepartmentCode();
+                if (DepartmentCode > 0) return true;
 
                 StringBuilder strSQL = new StringBuilder();
                 CommonMotions.CreateMan2DepSQL(ref strSQL, nTargetCount, PersonCode);
Index: branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ReqbillingStatus/FrmReqBillingStatus.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ReqbillingStatus/FrmReqBillingStatus.cs	(revision 364)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ReqbillingStatus/FrmReqBillingStatus.cs	(revision 365)
@@ -301,17 +301,22 @@
         /// <param name="e"></param>
         private void numUDConstPro_ValueChanged(object sender, EventArgs e)
         {
-            // ƒCƒxƒ“ƒgƒNƒŠƒA
-            SubControlEvent();
+            try
+            {
+                // ƒCƒxƒ“ƒgƒNƒŠƒA
+                SubControlEvent();
 
-            // ’S“–ŽÒƒRƒ“ƒ{ƒ{ƒbƒNƒXƒZƒbƒgŽž•”��‚ðƒZƒbƒg‚·‚é
-            if (!SetPerosonToDepartment()) return;
+                // ’S“–ŽÒƒRƒ“ƒ{ƒ{ƒbƒNƒXƒZƒbƒgŽž•”��‚ðƒZƒbƒg‚·‚é
+                if (!SetPerosonToDepartment()) return;
 
-            // ƒf�[ƒ^•\Ž¦
-            DataDisplay();
-
-            // ƒCƒxƒ“ƒgƒZƒbƒg
-            SetControlEvent();
+                // ƒf�[ƒ^•\Ž¦
+                DataDisplay();
+            }
+            finally
+            {
+                // ƒCƒxƒ“ƒgƒZƒbƒg
+                SetControlEvent();
+            }
         }
         #endregion
 
@@ -345,17 +350,22 @@
         /// <param name="e"></param>
         private void cmbConstructionPerson_SelectedIndexChanged(object sender, EventArgs e)
         {
-            // ƒCƒxƒ“ƒgƒNƒŠƒA
-            SubControlEvent();
+            try
+            {
+                // ƒCƒxƒ“ƒgƒNƒŠƒA
+                SubControlEvent();
 
-            // ’S“–ŽÒ‘I‘ðŽž•”��‘I‘ð‚ð�Ý’è‚·‚é
-            if (!SetPerosonToDepartment()) return;
+                // ’S“–ŽÒ‘I‘ðŽž•”��‘I‘ð‚ð�Ý’è‚·‚é
+                if (!SetPerosonToDepartment()) return;
 
-            // ƒf�[ƒ^•\Ž¦
-            DataDisplay();
-
-            // ƒCƒxƒ“ƒgƒZƒbƒg
-            SetControlEvent();
+                // ƒf�[ƒ^•\Ž¦
+                DataDisplay();
+            }
+            finally
+            {
+                // ƒCƒxƒ“ƒgƒZƒbƒg
+                SetControlEvent();
+            }
         }
         #endregion
 
Index: branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ReqbillingStatus/FrmReqBillingStatusAuxiliary.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ReqbillingStatus/FrmReqBillingStatusAuxiliary.cs	(revision 364)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ReqbillingStatus/FrmReqBillingStatusAuxiliary.cs	(revision 365)
@@ -1121,6 +1121,7 @@
 
                 int nTargetCount = (int)numUDConstPro.Value;
                 int DepartmentCode = GetDepartmentCode();
+                if (DepartmentCode > 0) return true;
 
                 StringBuilder strSQL = new StringBuilder();
                 CommonMotions.CreateMan2DepSQL(ref strSQL, nTargetCount, PersonCode);
Index: branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/RequestInputList/FrmReqInputList.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/RequestInputList/FrmReqInputList.cs	(revision 364)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/RequestInputList/FrmReqInputList.cs	(revision 365)
@@ -280,21 +280,26 @@
         /// <param name="e"></param>
         private void numUDConstPro_ValueChanged(object sender, EventArgs e)
         {
-            // ƒCƒxƒ“ƒgƒNƒŠƒA
-            SubControlEvent();
+            try
+            {
+                // ƒCƒxƒ“ƒgƒNƒŠƒA
+                SubControlEvent();
 
-            // •”��ƒRƒ“ƒ{ƒ{ƒbƒNƒX•Ï�X
-            SetcmbDepartment();
-            // ’S“–ŽÒƒRƒ“ƒ{ƒ{ƒbƒNƒX•Ï�X
-            SetcmbPersons();
-            // ’S“–ŽÒƒRƒ“ƒ{ƒ{ƒbƒNƒXƒZƒbƒgŽž•”��‚ðƒZƒbƒg‚·‚é
-            if (!SetPerosonToDepartment()) return;
+                // •”��ƒRƒ“ƒ{ƒ{ƒbƒNƒX•Ï�X
+                SetcmbDepartment();
+                // ’S“–ŽÒƒRƒ“ƒ{ƒ{ƒbƒNƒX•Ï�X
+                SetcmbPersons();
+                // ’S“–ŽÒƒRƒ“ƒ{ƒ{ƒbƒNƒXƒZƒbƒgŽž•”��‚ðƒZƒbƒg‚·‚é
+                if (!SetPerosonToDepartment()) return;
 
-            // ƒf�[ƒ^•\Ž¦
-            DataDisplay();
-
-            // ƒCƒxƒ“ƒgƒZƒbƒg
-            SetControlEvent();
+                // ƒf�[ƒ^•\Ž¦
+                DataDisplay();
+            }
+            finally
+            {
+                // ƒCƒxƒ“ƒgƒZƒbƒg
+                SetControlEvent();
+            }
         }
         #endregion
 
@@ -328,17 +333,22 @@
         /// <param name="e"></param>
         private void cmbConstructionPerson_SelectedIndexChanged(object sender, EventArgs e)
         {
-            // ƒCƒxƒ“ƒgƒNƒŠƒA
-            SubControlEvent();
+            try
+            {
+                // ƒCƒxƒ“ƒgƒNƒŠƒA
+                SubControlEvent();
 
-            // ’S“–ŽÒ‘I‘ðŽž•”��‘I‘ð‚ð�Ý’è‚·‚é
-            if (!SetPerosonToDepartment()) return;
+                // ’S“–ŽÒ‘I‘ðŽž•”��‘I‘ð‚ð�Ý’è‚·‚é
+                if (!SetPerosonToDepartment()) return;
 
-            // ƒf�[ƒ^•\Ž¦
-            DataDisplay();
-
-            // ƒCƒxƒ“ƒgƒZƒbƒg
-            SetControlEvent();
+                // ƒf�[ƒ^•\Ž¦
+                DataDisplay();
+            }
+            finally
+            {
+                // ƒCƒxƒ“ƒgƒZƒbƒg
+                SetControlEvent();
+            }
         }
         #endregion
 
Index: branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/RequestInputList/FrmReqInputListAuxiliary.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/RequestInputList/FrmReqInputListAuxiliary.cs	(revision 364)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/RequestInputList/FrmReqInputListAuxiliary.cs	(revision 365)
@@ -1012,6 +1012,7 @@
 
                 int nTargetCount = (int)numUDConstPro.Value;
                 int DepartmentCode = GetDepartmentCode();
+                if (DepartmentCode > 0) return true;
 
                 StringBuilder strSQL = new StringBuilder();
                 CommonMotions.CreateMan2DepSQL(ref strSQL, nTargetCount, PersonCode);
Index: branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/RequestSummaryList/FrmRequestSummaryListAuxiliary.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/RequestSummaryList/FrmRequestSummaryListAuxiliary.cs	(revision 364)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/RequestSummaryList/FrmRequestSummaryListAuxiliary.cs	(revision 365)
@@ -489,6 +489,7 @@
 
                 int nTargetCount = GetTargetCount();
                 int DepartmentCode = GetDepartmentCode();
+                if (DepartmentCode > 0) return true;
 
                 StringBuilder strSQL = new StringBuilder();
                 CommonMotions.CreateMan2DepSQL(ref strSQL, nTargetCount, PersonCode);
@@ -3196,7 +3197,7 @@
                 InitApprovalDisplay();
 
                 // �³”F‰æ–Ê‚Ì�u�³”F‘Î�Ûƒf�[ƒ^‚ðŒ©‚é�v‚©‚ç‚Ì‹N“®Žž‚Í�³”Fƒ{ƒ^ƒ“‚Ì•\Ž¦‚ª‚ ‚é
-                bool bApproval = ClsApprovalPermission.ExceApprovalScreen((int)ClsExcute.SubFormExecuteNo.ApprovalPerson);
+                bool bApproval = ClsApprovalPermission.ExceApprovalScreen();
                 if (!bApproval) return;
 
                 // �³”F‘Î�ÛƒR�[ƒh‚ðŽæ“¾‚·‚é
@@ -3240,7 +3241,7 @@
                 int iApprovalCode = ClsExcute.AppovalList.First(x => x.Value.Equals(s_MyProcessName[m_Labourkind])).Key;
 
                 // ‹N“®Œ³‚ÌƒŠƒXƒg‚É�³”F‰æ–Ê‚ª‚ ‚ê‚Î•\Ž¦‚µ‚È‚¢
-                if (ClsApprovalPermission.ExceApprovalScreen((int)ClsExcute.SubFormExecuteNo.ApprovalPerson))
+                if (ClsApprovalPermission.ExceApprovalScreen())
                 {
                     pnlApproval.Visible = false;
                 }
Index: branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/SubConstrRegist/FrmSubConstrRegist.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/SubConstrRegist/FrmSubConstrRegist.cs	(revision 364)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/SubConstrRegist/FrmSubConstrRegist.cs	(revision 365)
@@ -348,7 +348,7 @@
             }
 
             // æ‰¿èª�ç”»é�¢ã�®ã€Œæ‰¿èª�å¯¾è±¡ãƒ‡ãƒ¼ã‚¿ã‚’è¦‹ã‚‹ã€�ã�‹ã‚‰ã�®èµ·å‹•æ™‚ã�¯æ‰¿èª�ãƒœã‚¿ãƒ³ã�®è¡¨ç¤ºã�Œã�‚ã‚‹
-            bool bApproval = ClsApprovalPermission.ExceApprovalScreen((int)ClsExcute.SubFormExecuteNo.ApprovalPerson);
+            bool bApproval = ClsApprovalPermission.ExceApprovalScreen();
             if (bApproval)
             {
                 // æ‰¿èª�å¯¾è±¡ã‚³ãƒ¼ãƒ‰ã‚’å�–å¾—ã�™ã‚‹
Index: branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/SubConstrRegist/FrmSubConstrRegistAuxiliary.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/SubConstrRegist/FrmSubConstrRegistAuxiliary.cs	(revision 364)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/SubConstrRegist/FrmSubConstrRegistAuxiliary.cs	(revision 365)
@@ -263,7 +263,7 @@
                 int iApprovalCode = ClsExcute.AppovalList.First(x => x.Value.Equals(s_MyProcessName)).Key;
 
                 // èµ·å‹•å…ƒã�®ãƒªã‚¹ãƒˆã�«æ‰¿èª�ç”»é�¢ã�Œã�‚ã‚Œã�°è¡¨ç¤ºã�—ã�ªã�„
-                if (ClsApprovalPermission.ExceApprovalScreen((int)ClsExcute.SubFormExecuteNo.ApprovalPerson))
+                if (ClsApprovalPermission.ExceApprovalScreen())
                 {
                     pnlApproval.Visible = false;
                 }
Index: branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/SubConstrRegist/FrmSubConstrRegistList.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/SubConstrRegist/FrmSubConstrRegistList.cs	(revision 364)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/SubConstrRegist/FrmSubConstrRegistList.cs	(revision 365)
@@ -268,21 +268,26 @@
         /// <param name="e"></param>
         private void numUDConstPro_ValueChanged(object sender, EventArgs e)
         {
-            // ƒCƒxƒ“ƒgƒNƒŠƒA
-            SubControlEvent();
+            try
+            {
+                // ƒCƒxƒ“ƒgƒNƒŠƒA
+                SubControlEvent();
 
-            // •”��ƒRƒ“ƒ{ƒ{ƒbƒNƒX•Ï�X
-            SetcmbDepartment();
-            // ’S“–ŽÒƒRƒ“ƒ{ƒ{ƒbƒNƒX•Ï�X
-            SetcmbPersons();
-            // ’S“–ŽÒƒRƒ“ƒ{ƒ{ƒbƒNƒXƒZƒbƒgŽž•”��‚ðƒZƒbƒg‚·‚é
-            if (!SetPerosonToDepartment()) return;
+                // •”��ƒRƒ“ƒ{ƒ{ƒbƒNƒX•Ï�X
+                SetcmbDepartment();
+                // ’S“–ŽÒƒRƒ“ƒ{ƒ{ƒbƒNƒX•Ï�X
+                SetcmbPersons();
+                // ’S“–ŽÒƒRƒ“ƒ{ƒ{ƒbƒNƒXƒZƒbƒgŽž•”��‚ðƒZƒbƒg‚·‚é
+                if (!SetPerosonToDepartment()) return;
 
-            // ƒf�[ƒ^•\Ž¦
-            DataDisplay();
-
-            // ƒCƒxƒ“ƒgƒZƒbƒg
-            SetControlEvent();
+                // ƒf�[ƒ^•\Ž¦
+                DataDisplay();
+            }
+            finally
+            {
+                // ƒCƒxƒ“ƒgƒZƒbƒg
+                SetControlEvent();
+            }
         }
         #endregion
 
Index: branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/SubConstrRegist/FrmSubConstrRegistListAuxiliary.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/SubConstrRegist/FrmSubConstrRegistListAuxiliary.cs	(revision 364)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/SubConstrRegist/FrmSubConstrRegistListAuxiliary.cs	(revision 365)
@@ -772,6 +772,7 @@
 
                 int nTargetCount = (int)numUDConstPro.Value;
                 int DepartmentCode = GetDepartmentCode();
+                if (DepartmentCode > 0) return true;
 
                 StringBuilder strSQL = new StringBuilder();
                 CommonMotions.CreateMan2DepSQL(ref strSQL, nTargetCount, PersonCode);
Index: branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/TAndPCosts/FrmTAndPCostsAuxiliary.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/TAndPCosts/FrmTAndPCostsAuxiliary.cs	(revision 364)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/TAndPCosts/FrmTAndPCostsAuxiliary.cs	(revision 365)
@@ -484,6 +484,7 @@
 
                 int nTargetCount = GetTargetCount();
                 int DepartmentCode = GetDepartmentCode();
+                if (DepartmentCode > 0) return true;
 
                 StringBuilder strSQL = new StringBuilder();
                 CommonMotions.CreateMan2DepSQL(ref strSQL, nTargetCount, PersonCode);
Index: branches/src/ProcessManagement/ProcessManagement/Forms/Master/Department/FrmDepartmentAux.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/Master/Department/FrmDepartmentAux.cs	(revision 364)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/Master/Department/FrmDepartmentAux.cs	(revision 365)
@@ -194,10 +194,10 @@
                 // éƒ¨ç½²å��ã�Œå¤‰ã‚�ã�£ã�Ÿæ™‚ã�«å·¥äº‹æƒ…å ±ã�«å¯¾è±¡ã�Œã�‚ã‚‹ã�‹ã‚’åˆ¤å®šã�™ã‚‹
                 bool bChgName = false;
                 List<int> TergetPeriod = new List<int>();
-                if (m_DepartmentCode > 0)
-                {   // æ–°è¦�ä»¥å¤–ã�®æ™‚ã�«å‡¦ç�†ã�™ã‚‹
-                    bChgName = NameChangeCheck(m_DepartmentCode, ref TergetPeriod);
-                }
+                //if (m_DepartmentCode > 0)
+                //{   // æ–°è¦�ä»¥å¤–ã�®æ™‚ã�«å‡¦ç�†ã�™ã‚‹
+                //    bChgName = NameChangeCheck(m_DepartmentCode, ref TergetPeriod);
+                //}
 
                 if (MessageBox.Show("è¡¨ç¤ºä¸­ã�®ãƒ‡ãƒ¼ã‚¿ã‚’ç™»éŒ²ã�—ã�¾ã�™ã€‚", "ç™»éŒ²ç¢ºèª�"
                         , MessageBoxButtons.YesNo, MessageBoxIcon.Question) != DialogResult.Yes) return false;
@@ -436,6 +436,15 @@
                         MessageBox.Show("éƒ¨ç½²ãƒžã‚¹ã‚¿å‰Šé™¤ã�«å¤±æ•—ã�—ã�¾ã�—ã�Ÿã€‚", "å‰Šé™¤ã‚¨ãƒ©ãƒ¼", MessageBoxButtons.OK, MessageBoxIcon.Error);
                         return false;
                     }
+                    if (!dmDB.UpdateFeild(DepCodeKey
+                                            , (int)IOMDepartment.NameColumn.CompDate
+                                            , DateTime.Now
+                                            , false))
+                    {
+                        dmDB.rollback();
+                        MessageBox.Show("éƒ¨ç½²ãƒžã‚¹ã‚¿å‰Šé™¤ã�«å¤±æ•—ã�—ã�¾ã�—ã�Ÿã€‚", "å‰Šé™¤ã‚¨ãƒ©ãƒ¼", MessageBoxButtons.OK, MessageBoxIcon.Error);
+                        return false;
+                    }
                     if (!expDB.UpdateFeild(DepCodeKey, 0, 0
                                             , (int)IOMDepartmentExpenses.NameColumn.DeleteFlg
                                             , (int)CommonDefine.DataRowDeleteDef.Deleted
@@ -863,15 +872,27 @@
                 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;
-                m_dispControl[(int)DispControl.StartDate].Text = dmList[0].StartDate.ToShortDateString();
+                if (dmList[0].StartDate > DateTime.MinValue)
+                {
+                    m_dispControl[(int)DispControl.StartDate].Text = dmList[0].StartDate.ToShortDateString();
+                }
                 ((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;                     // â€�å�‚ç…§â€�
+                {   // â€�å�‚ç…§â€�
+                    m_dispControl[(int)DispControl.EditMode].Text = CommonDefine.EditModeStringRef;
+                }
                 else
-                    m_dispControl[(int)DispControl.EditMode].Text = CommonDefine.EditModeStringEdit;                    // â€�ä¿®æ­£â€�
+                {   // â€�ä¿®æ­£â€�
+                    m_dispControl[(int)DispControl.EditMode].Text = CommonDefine.EditModeStringEdit;
+                }
 
+                if (m_dispControl[(int)DispControl.StartDate].Text.Length > 0)
+                {
+                    m_dispControl[(int)DispControl.StartDate].Enabled = false;
+                }
+
                 m_bChengeAns = false;
             }
             catch (Exception ex)
Index: branches/src/ProcessManagement/ProcessManagement/Forms/Master/PersonInCharge/FrmPersonInCharge.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/Master/PersonInCharge/FrmPersonInCharge.cs	(revision 364)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/Master/PersonInCharge/FrmPersonInCharge.cs	(revision 365)
@@ -414,6 +414,9 @@
         {
             try
             {
+                //ãƒ‡ãƒ¼ã‚¿ãƒ�ã‚§ãƒƒã‚¯
+                if (!DataRemoveCheck()) return;
+
                 if (MessageBox.Show("è¡¨ç¤ºä¸­ã�®ãƒ‡ãƒ¼ã‚¿ã‚’å‰Šé™¤ã�—ã�¾ã�™ã€‚", "å‰Šé™¤ç¢ºèª�"
                     , MessageBoxButtons.YesNo, MessageBoxIcon.Information) != DialogResult.Yes) return;
 
Index: branches/src/ProcessManagement/ProcessManagement/Forms/Master/PersonInCharge/FrmPersonInCharge.designer.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/Master/PersonInCharge/FrmPersonInCharge.designer.cs	(revision 364)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/Master/PersonInCharge/FrmPersonInCharge.designer.cs	(revision 365)
@@ -28,20 +28,20 @@
         /// </summary>
         private void InitializeComponent()
         {
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle15 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle16 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle17 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle18 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle19 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle20 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle21 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle22 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle23 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle24 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle25 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle26 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle27 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle28 = 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();
+            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();
+            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();
@@ -60,6 +60,7 @@
             this.label8 = new System.Windows.Forms.Label();
             this.txtInput2 = new System.Windows.Forms.TextBox();
             this.label9 = new System.Windows.Forms.Label();
+            this.txtInput3 = new ProcessManagement.Forms.CustomControls.TextBoxEX();
             this.txtInput4 = new System.Windows.Forms.TextBox();
             this.label2 = new System.Windows.Forms.Label();
             this.label7 = new System.Windows.Forms.Label();
@@ -75,10 +76,13 @@
             this.label13 = new System.Windows.Forms.Label();
             this.label14 = new System.Windows.Forms.Label();
             this.label16 = new System.Windows.Forms.Label();
+            this.cmbDepartment = new ProcessManagement.Forms.CustomControls.ComboBoxEX();
             this.txtInput5 = new System.Windows.Forms.TextBox();
             this.txtInput8 = new System.Windows.Forms.TextBox();
             this.txtInput9 = new System.Windows.Forms.TextBox();
+            this.cmbLedgerFlg = new ProcessManagement.Forms.CustomControls.ComboBoxEX();
             this.label17 = new System.Windows.Forms.Label();
+            this.cmbSecManage = new ProcessManagement.Forms.CustomControls.ComboBoxEX();
             this.label18 = new System.Windows.Forms.Label();
             this.lblSecRank = new System.Windows.Forms.Label();
             this.lblSecRange = new System.Windows.Forms.Label();
@@ -90,8 +94,20 @@
             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();
@@ -105,22 +121,6 @@
             this.btnChrgToEmp = new System.Windows.Forms.Button();
             this.btnEmpToChrg = new System.Windows.Forms.Button();
             this.label20 = new System.Windows.Forms.Label();
-            this.txtInput3 = new ProcessManagement.Forms.CustomControls.TextBoxEX();
-            this.cmbDepartment = new ProcessManagement.Forms.CustomControls.ComboBoxEX();
-            this.cmbLedgerFlg = new ProcessManagement.Forms.CustomControls.ComboBoxEX();
-            this.cmbSecManage = new ProcessManagement.Forms.CustomControls.ComboBoxEX();
-            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.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.dgvMaster = new ProcessManagement.Forms.CustomControls.DataGridViewEX();
             this.Column1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.Column2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
@@ -131,11 +131,11 @@
             this.Column7 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.panel1.SuspendLayout();
             this.tableLayoutPanel1.SuspendLayout();
-            this.panel2.SuspendLayout();
-            this.panel3.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();
             this.SuspendLayout();
             // 
@@ -442,6 +442,18 @@
             this.label9.Text = "çµ‚äº†å¹´æœˆæ—¥";
             this.label9.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
             // 
+            // txtInput3
+            // 
+            this.txtInput3.Anchor = System.Windows.Forms.AnchorStyles.Left;
+            this.txtInput3.ImeMode = System.Windows.Forms.ImeMode.Disable;
+            this.txtInput3.Location = new System.Drawing.Point(148, 111);
+            this.txtInput3.MaxLength = 11;
+            this.txtInput3.Name = "txtInput3";
+            this.txtInput3.Size = new System.Drawing.Size(139, 23);
+            this.txtInput3.TabIndex = 3;
+            this.txtInput3.TextChanged += new System.EventHandler(this.txtInput_TextChanged);
+            this.txtInput3.Validated += new System.EventHandler(this.txtInput_Validated);
+            // 
             // txtInput4
             // 
             this.txtInput4.Anchor = System.Windows.Forms.AnchorStyles.Left;
@@ -640,6 +652,19 @@
             this.label16.Text = "å�°å¸³è¨ˆç®—å¯¾è±¡";
             this.label16.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
             // 
+            // cmbDepartment
+            // 
+            this.cmbDepartment.Anchor = System.Windows.Forms.AnchorStyles.Left;
+            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(429, 24);
+            this.cmbDepartment.TabIndex = 8;
+            this.cmbDepartment.TextChanged += new System.EventHandler(this.valueChange);
+            // 
             // txtInput5
             // 
             this.txtInput5.Anchor = System.Windows.Forms.AnchorStyles.Left;
@@ -675,6 +700,18 @@
             this.txtInput9.TabIndex = 12;
             this.txtInput9.TextChanged += new System.EventHandler(this.valueChange);
             // 
+            // cmbLedgerFlg
+            // 
+            this.cmbLedgerFlg.Anchor = System.Windows.Forms.AnchorStyles.Left;
+            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, 647);
+            this.cmbLedgerFlg.Name = "cmbLedgerFlg";
+            this.cmbLedgerFlg.Size = new System.Drawing.Size(139, 24);
+            this.cmbLedgerFlg.TabIndex = 13;
+            this.cmbLedgerFlg.TextChanged += new System.EventHandler(this.valueChange);
+            // 
             // label17
             // 
             this.label17.Anchor = System.Windows.Forms.AnchorStyles.Left;
@@ -688,6 +725,20 @@
             this.label17.Text = "æ©Ÿå¯†åŒºåˆ†";
             this.label17.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
             // 
+            // cmbSecManage
+            // 
+            this.cmbSecManage.Anchor = System.Windows.Forms.AnchorStyles.Left;
+            this.tableLayoutPanel1.SetColumnSpan(this.cmbSecManage, 2);
+            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, 682);
+            this.cmbSecManage.Name = "cmbSecManage";
+            this.cmbSecManage.Size = new System.Drawing.Size(284, 24);
+            this.cmbSecManage.TabIndex = 14;
+            this.cmbSecManage.SelectedValueChanged += new System.EventHandler(this.cmbSecManage_SelectedValueChanged);
+            this.cmbSecManage.TextChanged += new System.EventHandler(this.valueChange);
+            // 
             // label18
             // 
             this.label18.Anchor = System.Windows.Forms.AnchorStyles.Left;
@@ -831,6 +882,150 @@
             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;
+            this.dgvRefDepartment.AllowUserToDeleteRows = false;
+            this.dgvRefDepartment.AllowUserToResizeColumns = false;
+            this.dgvRefDepartment.AllowUserToResizeRows = false;
+            this.dgvRefDepartment.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
+            | System.Windows.Forms.AnchorStyles.Left)));
+            this.dgvRefDepartment.BackgroundColor = System.Drawing.Color.White;
+            this.dgvRefDepartment.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
+            dataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
+            dataGridViewCellStyle5.BackColor = System.Drawing.SystemColors.Control;
+            dataGridViewCellStyle5.Font = new System.Drawing.Font("ï¼­ï¼³ æ˜Žæœ�", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
+            dataGridViewCellStyle5.ForeColor = System.Drawing.SystemColors.WindowText;
+            dataGridViewCellStyle5.SelectionBackColor = System.Drawing.SystemColors.Highlight;
+            dataGridViewCellStyle5.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
+            dataGridViewCellStyle5.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
+            this.dgvRefDepartment.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle5;
+            this.dgvRefDepartment.ColumnHeadersHeight = 24;
+            this.dgvRefDepartment.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing;
+            this.dgvRefDepartment.ColumnHeadersVisible = false;
+            this.dgvRefDepartment.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
+            this.Column8,
+            this.TextBoxColumn1});
+            this.tableLayoutPanel1.SetColumnSpan(this.dgvRefDepartment, 3);
+            this.dgvRefDepartment.EditMode = System.Windows.Forms.DataGridViewEditMode.EditOnEnter;
+            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(429, 104);
+            this.dgvRefDepartment.TabIndex = 18;
+            this.dgvRefDepartment.TabStop = false;
+            // 
+            // Column8
+            // 
+            this.Column8.Frozen = true;
+            this.Column8.HeaderText = "éƒ¨ç½²ã‚³ãƒ¼ãƒ‰";
+            this.Column8.Name = "Column8";
+            this.Column8.ReadOnly = true;
+            this.Column8.Visible = false;
+            // 
+            // TextBoxColumn1
+            // 
+            dataGridViewCellStyle6.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
+            this.TextBoxColumn1.DefaultCellStyle = dataGridViewCellStyle6;
+            this.TextBoxColumn1.Frozen = true;
+            this.TextBoxColumn1.HeaderText = "å�‚ã€€ç…§ã€€éƒ¨ã€€ç½²ã€€å��ã€€ç§°";
+            this.TextBoxColumn1.Name = "TextBoxColumn1";
+            this.TextBoxColumn1.ReadOnly = true;
+            this.TextBoxColumn1.Resizable = System.Windows.Forms.DataGridViewTriState.False;
+            this.TextBoxColumn1.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
+            this.TextBoxColumn1.Width = 409;
+            // 
+            // cmbRefDepartment
+            // 
+            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);
+            // 
             // btnRefDepDel
             // 
             this.btnRefDepDel.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
@@ -865,6 +1060,79 @@
             this.btnRefDepAdd.UseVisualStyleBackColor = false;
             this.btnRefDepAdd.Click += new System.EventHandler(this.btnRefDepAdd_Click);
             // 
+            // dgvAssignment
+            // 
+            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) 
@@ -1029,274 +1297,6 @@
             this.label20.Text = "ãƒ‡ãƒ¼ã‚¿å¤‰æ›´";
             this.label20.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
             // 
-            // txtInput3
-            // 
-            this.txtInput3.Anchor = System.Windows.Forms.AnchorStyles.Left;
-            this.txtInput3.ImeMode = System.Windows.Forms.ImeMode.Disable;
-            this.txtInput3.Location = new System.Drawing.Point(148, 111);
-            this.txtInput3.MaxLength = 11;
-            this.txtInput3.Name = "txtInput3";
-            this.txtInput3.Size = new System.Drawing.Size(139, 23);
-            this.txtInput3.TabIndex = 3;
-            this.txtInput3.TextChanged += new System.EventHandler(this.txtInput_TextChanged);
-            this.txtInput3.Validated += new System.EventHandler(this.txtInput_Validated);
-            // 
-            // cmbDepartment
-            // 
-            this.cmbDepartment.Anchor = System.Windows.Forms.AnchorStyles.Left;
-            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, 360);
-            this.cmbDepartment.Name = "cmbDepartment";
-            this.cmbDepartment.Size = new System.Drawing.Size(429, 24);
-            this.cmbDepartment.TabIndex = 8;
-            this.cmbDepartment.TextChanged += new System.EventHandler(this.valueChange);
-            // 
-            // cmbLedgerFlg
-            // 
-            this.cmbLedgerFlg.Anchor = System.Windows.Forms.AnchorStyles.Left;
-            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, 645);
-            this.cmbLedgerFlg.Name = "cmbLedgerFlg";
-            this.cmbLedgerFlg.Size = new System.Drawing.Size(139, 24);
-            this.cmbLedgerFlg.TabIndex = 13;
-            this.cmbLedgerFlg.TextChanged += new System.EventHandler(this.valueChange);
-            // 
-            // cmbSecManage
-            // 
-            this.cmbSecManage.Anchor = System.Windows.Forms.AnchorStyles.Left;
-            this.tableLayoutPanel1.SetColumnSpan(this.cmbSecManage, 2);
-            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, 680);
-            this.cmbSecManage.Name = "cmbSecManage";
-            this.cmbSecManage.Size = new System.Drawing.Size(284, 24);
-            this.cmbSecManage.TabIndex = 14;
-            this.cmbSecManage.SelectedValueChanged += new System.EventHandler(this.cmbSecManage_SelectedValueChanged);
-            this.cmbSecManage.TextChanged += new System.EventHandler(this.valueChange);
-            // 
-            // 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;
-            dataGridViewCellStyle15.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
-            dataGridViewCellStyle15.BackColor = System.Drawing.SystemColors.Control;
-            dataGridViewCellStyle15.Font = new System.Drawing.Font("ï¼­ï¼³ æ˜Žæœ�", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
-            dataGridViewCellStyle15.ForeColor = System.Drawing.SystemColors.WindowText;
-            dataGridViewCellStyle15.SelectionBackColor = System.Drawing.SystemColors.Highlight;
-            dataGridViewCellStyle15.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
-            dataGridViewCellStyle15.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
-            this.dgvSalary.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle15;
-            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
-            // 
-            dataGridViewCellStyle16.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
-            this.SalaryColumn1.DefaultCellStyle = dataGridViewCellStyle16;
-            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
-            // 
-            dataGridViewCellStyle17.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
-            this.SalaryColumn2.DefaultCellStyle = dataGridViewCellStyle17;
-            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
-            // 
-            dataGridViewCellStyle18.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
-            this.SalaryColumn3.DefaultCellStyle = dataGridViewCellStyle18;
-            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;
-            this.dgvRefDepartment.AllowUserToDeleteRows = false;
-            this.dgvRefDepartment.AllowUserToResizeColumns = false;
-            this.dgvRefDepartment.AllowUserToResizeRows = false;
-            this.dgvRefDepartment.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
-            | System.Windows.Forms.AnchorStyles.Left)));
-            this.dgvRefDepartment.BackgroundColor = System.Drawing.Color.White;
-            this.dgvRefDepartment.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
-            dataGridViewCellStyle19.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
-            dataGridViewCellStyle19.BackColor = System.Drawing.SystemColors.Control;
-            dataGridViewCellStyle19.Font = new System.Drawing.Font("ï¼­ï¼³ æ˜Žæœ�", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
-            dataGridViewCellStyle19.ForeColor = System.Drawing.SystemColors.WindowText;
-            dataGridViewCellStyle19.SelectionBackColor = System.Drawing.SystemColors.Highlight;
-            dataGridViewCellStyle19.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
-            dataGridViewCellStyle19.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
-            this.dgvRefDepartment.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle19;
-            this.dgvRefDepartment.ColumnHeadersHeight = 24;
-            this.dgvRefDepartment.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing;
-            this.dgvRefDepartment.ColumnHeadersVisible = false;
-            this.dgvRefDepartment.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
-            this.Column8,
-            this.TextBoxColumn1});
-            this.tableLayoutPanel1.SetColumnSpan(this.dgvRefDepartment, 3);
-            this.dgvRefDepartment.EditMode = System.Windows.Forms.DataGridViewEditMode.EditOnEnter;
-            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(429, 104);
-            this.dgvRefDepartment.TabIndex = 18;
-            this.dgvRefDepartment.TabStop = false;
-            // 
-            // Column8
-            // 
-            this.Column8.Frozen = true;
-            this.Column8.HeaderText = "éƒ¨ç½²ã‚³ãƒ¼ãƒ‰";
-            this.Column8.Name = "Column8";
-            this.Column8.ReadOnly = true;
-            this.Column8.Visible = false;
-            // 
-            // TextBoxColumn1
-            // 
-            dataGridViewCellStyle20.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
-            this.TextBoxColumn1.DefaultCellStyle = dataGridViewCellStyle20;
-            this.TextBoxColumn1.Frozen = true;
-            this.TextBoxColumn1.HeaderText = "å�‚ã€€ç…§ã€€éƒ¨ã€€ç½²ã€€å��ã€€ç§°";
-            this.TextBoxColumn1.Name = "TextBoxColumn1";
-            this.TextBoxColumn1.ReadOnly = true;
-            this.TextBoxColumn1.Resizable = System.Windows.Forms.DataGridViewTriState.False;
-            this.TextBoxColumn1.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
-            this.TextBoxColumn1.Width = 409;
-            // 
-            // cmbRefDepartment
-            // 
-            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, 965);
-            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);
-            // 
-            // dgvAssignment
-            // 
-            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;
-            dataGridViewCellStyle21.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
-            dataGridViewCellStyle21.BackColor = System.Drawing.SystemColors.Control;
-            dataGridViewCellStyle21.Font = new System.Drawing.Font("ï¼­ï¼³ æ˜Žæœ�", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
-            dataGridViewCellStyle21.ForeColor = System.Drawing.SystemColors.WindowText;
-            dataGridViewCellStyle21.SelectionBackColor = System.Drawing.SystemColors.Highlight;
-            dataGridViewCellStyle21.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
-            dataGridViewCellStyle21.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
-            this.dgvAssignment.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle21;
-            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
-            // 
-            dataGridViewCellStyle22.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
-            this.dataGridViewTextBoxColumn1.DefaultCellStyle = dataGridViewCellStyle22;
-            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
-            // 
-            dataGridViewCellStyle23.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
-            this.dataGridViewTextBoxColumn2.DefaultCellStyle = dataGridViewCellStyle23;
-            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
-            // 
-            dataGridViewCellStyle24.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
-            this.dataGridViewTextBoxColumn3.DefaultCellStyle = dataGridViewCellStyle24;
-            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;
-            // 
             // dgvMaster
             // 
             this.dgvMaster.AllowUserToAddRows = false;
@@ -1305,14 +1305,14 @@
             this.dgvMaster.AllowUserToResizeRows = false;
             this.dgvMaster.BackgroundColor = System.Drawing.Color.White;
             this.dgvMaster.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
-            dataGridViewCellStyle25.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
-            dataGridViewCellStyle25.BackColor = System.Drawing.SystemColors.Control;
-            dataGridViewCellStyle25.Font = new System.Drawing.Font("ï¼­ï¼³ æ˜Žæœ�", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
-            dataGridViewCellStyle25.ForeColor = System.Drawing.SystemColors.WindowText;
-            dataGridViewCellStyle25.SelectionBackColor = System.Drawing.SystemColors.Highlight;
-            dataGridViewCellStyle25.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
-            dataGridViewCellStyle25.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
-            this.dgvMaster.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle25;
+            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[] {
@@ -1337,9 +1337,9 @@
             // 
             // Column1
             // 
-            dataGridViewCellStyle26.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
-            dataGridViewCellStyle26.Font = new System.Drawing.Font("ï¼­ï¼³ æ˜Žæœ�", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
-            this.Column1.DefaultCellStyle = dataGridViewCellStyle26;
+            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";
@@ -1349,8 +1349,8 @@
             // 
             // Column2
             // 
-            dataGridViewCellStyle27.Font = new System.Drawing.Font("ï¼­ï¼³ æ˜Žæœ�", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
-            this.Column2.DefaultCellStyle = dataGridViewCellStyle27;
+            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";
@@ -1360,9 +1360,9 @@
             // 
             // Column3
             // 
-            dataGridViewCellStyle28.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
-            dataGridViewCellStyle28.Font = new System.Drawing.Font("ï¼­ï¼³ æ˜Žæœ�", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
-            this.Column3.DefaultCellStyle = dataGridViewCellStyle28;
+            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;
@@ -1430,12 +1430,12 @@
             this.panel1.ResumeLayout(false);
             this.tableLayoutPanel1.ResumeLayout(false);
             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);
-            ((System.ComponentModel.ISupportInitialize)(this.dgvSalary)).EndInit();
-            ((System.ComponentModel.ISupportInitialize)(this.dgvRefDepartment)).EndInit();
-            ((System.ComponentModel.ISupportInitialize)(this.dgvAssignment)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.dgvMaster)).EndInit();
             this.ResumeLayout(false);
 
Index: branches/src/ProcessManagement/ProcessManagement/Forms/Master/PersonInCharge/FrmPersonInChargeAuxiliary.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/Master/PersonInCharge/FrmPersonInChargeAuxiliary.cs	(revision 364)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/Master/PersonInCharge/FrmPersonInChargeAuxiliary.cs	(revision 365)
@@ -874,6 +874,37 @@
         }
         #endregion
 
+        #region å‰Šé™¤æ™‚ã�®ãƒ�ã‚§ãƒƒã‚¯
+        /// <summary>
+        /// å‰Šé™¤æ™‚ã�®ãƒ�ã‚§ãƒƒã‚¯
+        /// </summary>
+        /// <returns></returns>
+        private bool DataRemoveCheck()
+        {
+            bool bRet = true;
+            int iLength = 0;
+            try
+            {
+                // ãƒžã‚¹ã‚¿ä½¿ç”¨çµ‚äº†å¹´æœˆ
+                if (m_dispControl[(int)DispCtrl.EndDate].Text.Length != 0) iLength++;
+                bRet &= CommonMotions.DispFieldDateCheck(m_dispControl[(int)DispCtrl.EndDate], true);
+
+                if (!bRet)
+                {
+                    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>
         /// çµ¦ä¸Žã‚°ãƒªãƒƒãƒ‰ãƒ‡ãƒ¼ã‚¿å­˜åœ¨ãƒ�ã‚§ãƒƒã‚¯
@@ -955,10 +986,10 @@
                 // éƒ¨ç½²ã�Œå¤‰ã‚�ã�£ã�Ÿæ™‚ã�«å·¥äº‹æƒ…å ±ã�«å¯¾è±¡ã�Œã�‚ã‚‹ã�‹ã‚’åˆ¤å®šã�™ã‚‹
                 bool bChgDep = false;
                 List<int> TergetPeriod = new List<int>();
-                if (m_PersonCode > 0)
-                {   // æ–°è¦�ä»¥å¤–ã�®æ™‚ã�«å‡¦ç�†ã�™ã‚‹
-                    bChgDep = DepChangeCheck(m_PersonCode, ref TergetPeriod);
-                }
+                //if (m_PersonCode > 0)
+                //{   // æ–°è¦�ä»¥å¤–ã�®æ™‚ã�«å‡¦ç�†ã�™ã‚‹
+                //    bChgDep = DepChangeCheck(m_PersonCode, ref TergetPeriod);
+                //}
 
                 if (MessageBox.Show("è¡¨ç¤ºä¸­ã�®ãƒ‡ãƒ¼ã‚¿ã‚’ç™»éŒ²ã�—ã�¾ã�™ã€‚", "ç™»éŒ²ç¢ºèª�"
                         , MessageBoxButtons.YesNo, MessageBoxIcon.Question) != DialogResult.Yes) return false;
@@ -1720,13 +1751,29 @@
                     MessageBox.Show("æ‹…å½“è€…ãƒžã‚¹ã‚¿ï¼šå‰Šé™¤ã�«å¤±æ•—ã�—ã�¾ã�—ã�Ÿã€‚", "å‰Šé™¤ã‚¨ãƒ©ãƒ¼", MessageBoxButtons.OK, MessageBoxIcon.Error);
                     return false;
                 }
+                // çµ‚äº†å¹´æœˆæ—¥
+                DateTime dtEnd = DateTime.Today;
+                if (m_dispControl[(int)DispCtrl.EndDate].Text.Length != 0)
+                {
+                    dtEnd = CommonMotions.cnvDate(m_dispControl[(int)DispCtrl.EndDate].Text);
+                }
 
-                // ä»Šå­£çµ‚äº†å¹´æœˆæ—¥ã‚’å�–å¾—ã�™ã‚‹
-                int TargetNo = CommonMotions.GetPeriodYear();
-                DateTime dtDefaultEnd = CommonMotions.GetOpeningEndDate(TargetNo, false);
+                if (!picDB.UpdateFeild(workRec.PersonCode
+                                            , (int)IOMPersonInCharge.ColumnCnt.EndDate
+                                            , dtEnd
+                                            , false))
+                {
+                    picDB.rollback();
+                    MessageBox.Show("æ‹…å½“è€…ãƒžã‚¹ã‚¿ï¼šå‰Šé™¤ã�«å¤±æ•—ã�—ã�¾ã�—ã�Ÿã€‚", "å‰Šé™¤ã‚¨ãƒ©ãƒ¼", MessageBoxButtons.OK, MessageBoxIcon.Error);
+                    return false;
+                }
 
+                //// ä»Šå­£çµ‚äº†å¹´æœˆæ—¥ã‚’å�–å¾—ã�™ã‚‹
+                //int TargetNo = CommonMotions.GetPeriodYear();
+                //DateTime dtDefaultEnd = CommonMotions.GetOpeningEndDate(TargetNo, false);
+
                 // æ‹…å½“è€…éƒ¨ç½²å±¥æ­´ãƒ‡ãƒ¼ã‚¿ï¼šæœ€çµ‚ãƒ‡ãƒ¼ã‚¿çµ‚äº†å¹´æœˆæ—¥æ›´æ–°
-                if (!chgDepDB.UpdateFeild(PersonCode, chgDepList[0].StartDate, (int)IOMChgChargeDep.ColumnCnt.CompDate, dtDefaultEnd, false))
+                if (!chgDepDB.UpdateFeild(PersonCode, chgDepList[0].StartDate, (int)IOMChgChargeDep.ColumnCnt.CompDate, dtEnd, false))
                 {
                     picDB.rollback();
                     chgDepDB.rollback();
Index: branches/src/ProcessManagement/ProcessManagement/Forms/SubForms/FrmCustomCount.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/SubForms/FrmCustomCount.cs	(revision 364)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/SubForms/FrmCustomCount.cs	(revision 365)
@@ -103,14 +103,24 @@
         /// <param name="e"></param>
         private void btnOK_Click(object sender, EventArgs e)
         {
-            if (MessageBox.Show("é�¸æŠžã�•ã‚Œã�Ÿãƒ‡ãƒ¼ã‚¿ã‚’æ›´æ–°ã�—ã�¾ã�™ã€‚"
+            int nCount = 0;
+            DataGridViewEX dgv = dgvData;
+            foreach (DataGridViewRow CurRow in dgv.Rows)
+            {
+                // ãƒ�ã‚§ãƒƒã‚¯ã�®ã�¿ã‚’è¿”ã�™
+                if (!CommonMotions.cnvBool(CurRow.Cells[1].Value)) continue;
+                nCount++;
+            }
+            if (nCount > 0)
+            {
+                if (MessageBox.Show("é�¸æŠžã�•ã‚Œã�Ÿãƒ‡ãƒ¼ã‚¿ã‚’æ›´æ–°ã�—ã�¾ã�™ã€‚"
                                 , "å®Ÿè¡Œç¢ºèª�"
                                 , MessageBoxButtons.OKCancel
                                 , MessageBoxIcon.Question) == DialogResult.Cancel) return;
+            }
 
             // ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆ
             GetSelectData();
-
             ReturnValue = DialogResult.OK;
             this.Close();
         }
@@ -159,9 +169,9 @@
                     // ãƒ‡ãƒ¼ã�¯ç„¡ã�„ã�¯è¡¨ç¤ºã�—ã�ªã�„
                     if (nCount < 1) continue;
 
-                    // ä»ŠæœŸã�¨æ�¥æœŸã�¯ãƒ�ã‚§ãƒƒã‚¯ï¼¯ï¼®
-                    int nNowYear = CommonMotions.GetPeriodYear();
-                    if (nPeriod == nNowYear || nPeriod == (nNowYear + 1)) bCheck = true;
+                    //// ä»ŠæœŸã�¨æ�¥æœŸã�¯ãƒ�ã‚§ãƒƒã‚¯ï¼¯ï¼®
+                    //int nNowYear = CommonMotions.GetPeriodYear();
+                    //if (nPeriod == nNowYear || nPeriod == (nNowYear + 1)) bCheck = true;
 
                     int nRowCnt = dgv.Rows.Add(no++
                                             , bCheck
Index: branches/src/ProcessManagement/ProcessManagement/Forms/ZMenu/FrmMenuAuxiliary.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/ZMenu/FrmMenuAuxiliary.cs	(revision 364)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/ZMenu/FrmMenuAuxiliary.cs	(revision 365)
@@ -2509,10 +2509,21 @@
                 strSQL.Append(" AND B.RECORDNUMBER = A.RECORDNUMBER");
                 strSQL.Append(" AND B.BRANCHNUMBER = A.BRANCHNUMBER");
 
-                strSQL.Append(" Order By");
-                strSQL.Append(" A.WritingDate Desc");
-                strSQL.Append(", A.MessageTitile Asc");
-                strSQL.Append(", B.SeqNum ASC");
+                if (exeflg == (int)TabNameEnum.MessageBoard)
+                {
+                    strSQL.Append(" Order By");
+                    strSQL.Append(" A.RecordNumber Desc");
+                    strSQL.Append(", A.BranchNumber Asc");
+                    strSQL.Append(", B.SeqNum ASC");
+
+                }
+                else
+                {   // æŽ²ç¤ºæ�¿ãƒ‡ãƒ¼ã‚¿
+                    strSQL.Append(" Order By");
+                    strSQL.Append(" A.WritingDate Desc");
+                    strSQL.Append(", A.MessageTitile Asc");
+                    strSQL.Append(", B.SeqNum ASC");
+                }
             }
             catch (Exception ex)
             {
@@ -2678,9 +2689,21 @@
                 strSQL.AppendFormat(" IFNULL(G.APPROVALSTATUS, {0})", (int)CommonDefine.ApprovalStatus.Undecided);
 
 
-                strSQL.Append(" FROM PROCESSAPPROVAL A INNER JOIN PERSONINCHARGEMASTER C ON C.PERSONCODE = A.PERSONCODE");
-                strSQL.Append(" LEFT JOIN APPROVALMASTER E ON E.APPROVALCODE = A.APPROVALCODE AND E.DEPARTMENTCODE = C.DEPARTMENTCODE");
+                strSQL.Append(" FROM PROCESSAPPROVAL A");
+                strSQL.Append(" INNER JOIN PERSONINCHARGEMASTER C ON C.PERSONCODE = A.PERSONCODE");
 
+                strSQL.Append(" Inner Join(Select H.PersonCode, H.StartDate");
+                strSQL.Append("           , Case When DATE (H.CompDate) = DATE('0001/01/01') Then DATE ('9999/12/31')");
+                strSQL.Append("                  Else DATE(H.CompDate) End As ComplateDate");
+                strSQL.Append("           , H.DepartmentCode");
+                strSQL.Append("           , H.DepartmentName");
+                strSQL.Append("           From ChgChargeDep As H) As I");
+                strSQL.Append("       On I.PersonCode = C.PersonCode");
+                strSQL.Append("       And(DATE(I.StartDate) <= DATE(A.EntryDate)");
+                strSQL.Append("       And DATE(A.EntryDate) <= DATE(I.ComplateDate))");
+
+                strSQL.Append(" LEFT JOIN APPROVALMASTER E ON E.APPROVALCODE = A.APPROVALCODE AND E.DEPARTMENTCODE = I.DEPARTMENTCODE");
+
                 strSQL.Append(" LEFT JOIN PROCESSAPPROVAL G");
                 strSQL.Append(" ON G.CONSTRUCTIONCODE = A.CONSTRUCTIONCODE");
                 strSQL.Append(" AND G.APPROVALCODE = A.APPROVALCODE");
@@ -6167,7 +6190,7 @@
 
                     // å·¥äº‹ã�«å±žã�—ã�¦ã�„ã�ªã�„çµŒè²»ã‚’å�–å¾—ã�™ã‚‹
                     List<PersonExpensesCost> ArraryCost = new List<PersonExpensesCost>();
-                    CommonLedgerData.GetPersonExpensesCostValueAll(CostDB, TargetYear, ArrarySalary, ref ArraryCost);
+                    CommonLedgerData.GetPersonExpensesCostValueAll(CostDB, TargetYear, TargetList, ArrarySalary, ref ArraryCost);
                     int CostValue = 0;
                     foreach (PersonExpensesCost CurRec in ArraryCost)
                     {
Index: branches/src/ProcessManagement/ProcessManagement/Properties/AssemblyInfo.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Properties/AssemblyInfo.cs	(revision 364)
+++ branches/src/ProcessManagement/ProcessManagement/Properties/AssemblyInfo.cs	(revision 365)
@@ -10,7 +10,7 @@
 [assembly: AssemblyConfiguration("")]
 [assembly: AssemblyCompany("H-YOUã‚·ã‚¹ãƒ†ãƒ é–‹ç™º")]
 [assembly: AssemblyProduct("ç�¾å ´ç›£ç�£ç§˜æ›¸")]
-[assembly: AssemblyCopyright("H-YOU Systems Copyright Â©  2015-2017")]
+[assembly: AssemblyCopyright("H-YOU Systems Copyright Â©  2015-2018")]
 [assembly: AssemblyTrademark("")]
 [assembly: AssemblyCulture("")]
 
@@ -32,7 +32,7 @@
 // ã�™ã�¹ã�¦ã�®å€¤ã‚’æŒ‡å®šã�™ã‚‹ã�‹ã€�ä¸‹ã�®ã‚ˆã�†ã�« '*' ã‚’ä½¿ã�£ã�¦ãƒ“ãƒ«ãƒ‰ã�Šã‚ˆã�³ãƒªãƒ“ã‚¸ãƒ§ãƒ³ç•ªå�·ã‚’ 
 // æ—¢å®šå€¤ã�«ã�™ã‚‹ã�“ã�¨ã�Œã�§ã��ã�¾ã�™:
 // [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.0.1.217")]
-[assembly: AssemblyFileVersion("1.0.1.217")]
+[assembly: AssemblyVersion("1.0.1.220")]
+[assembly: AssemblyFileVersion("1.0.1.220")]
 // Log4netã‚’ä½¿ç”¨ã�™ã‚‹
 [assembly: log4net.Config.XmlConfigurator(ConfigFile = @"log4net.config", Watch = true)]
\ No newline at end of file
