Index: trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ApprovalList/FrmApprovalList.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ApprovalList/FrmApprovalList.cs	(revision 141)
+++ trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ApprovalList/FrmApprovalList.cs	(revision 142)
@@ -194,6 +194,7 @@
         /// <param name="e"></param>
         private void FrmConstructionBaseInfoList_Load(object sender, EventArgs e)
         {
+            SetInitnumUDConstPro();
             // ƒRƒ“ƒ{ƒ{ƒbƒNƒXƒZƒbƒg
             SetcmbDepartment();
             SetcmbPersons();
@@ -263,6 +264,15 @@
         private void numUDConstPro_ValueChanged(object sender, EventArgs e)
         {
             if (m_bInitFlg) return;
+
+            // ƒRƒ“ƒ{ƒ{ƒbƒNƒXƒZƒbƒg
+            int DepCode = CommonMotions.cnvInt(cmbDepartment.SelectedValue);
+            int PerCode = CommonMotions.cnvInt(cmbConstructionPerson.SelectedValue);
+            SetcmbDepartment();
+            SetcmbPersons();
+            cmbDepartment.SelectedValue = DepCode;
+            cmbConstructionPerson.SelectedValue = PerCode;
+
             // ƒf�[ƒ^•\Ž¦
             DataDisplay();
         }
Index: trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ApprovalList/FrmApprovalListAuxiliary.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ApprovalList/FrmApprovalListAuxiliary.cs	(revision 141)
+++ trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ApprovalList/FrmApprovalListAuxiliary.cs	(revision 142)
@@ -483,22 +483,34 @@
                 cmbConstructionPerson.Items.Clear();
                 cmbConstructionPerson.Text = "";
 
+                int DepartmentCode = GetDepartmentCode();
                 string strSQL = string.Empty;
-                int DepartmentCode = GetDepartmentCode();
+                // ŒŸ�õ�ðŒ�
+                strSQL = string.Format(" WHERE LEDGERFLG = {0}", (int)CommonDefine.PersonLedgerDivNo.CalcTarget);
+                strSQL += " AND (DEPARTMENTCODE";
+                string strSubSQL = string.Empty;
                 if (DepartmentCode == 0)
                 {
-                    strSQL = " WHERE DeleteFlg = 0";
-                    strSQL += string.Format(" AND EmployeeClassFlg = {0}", (int)CommonDefine.EmployeeClassFlg.Regular);
                     // ŽQ�Æ•”��ƒ}ƒXƒ^‚æ‚èŽæ“¾‚·‚é
-                    strSQL += " AND DEPARTMENTCODE IN (SELECT AA.DEPARTMENTCODE FROM PERSONDEPARTMENTMASTER AA";
-                    strSQL += string.Format(" WHERE AA.PERSONCODE = {0})", CommonMotions.LoginUserData.PersonCode);
-                    strSQL += " Order By EmployeeClassFlg ASC, DisplayOrder ASC";
+                    strSubSQL += string.Format(" IN (SELECT AA.DEPARTMENTCODE FROM PERSONDEPARTMENTMASTER AA WHERE AA.PERSONCODE = {0})"
+                                            , CommonMotions.LoginUserData.PersonCode);
                 }
                 else
                 {
-                    strSQL = string.Format(" WHERE DEPARTMENTCODE = {0} AND DeleteFlg = 0 Order By EmployeeClassFlg ASC, DisplayOrder ASC", DepartmentCode);
+                    strSubSQL += string.Format(" = {0}", DepartmentCode);
                 }
+                strSQL += strSubSQL + ")";
 
+                // “–ŠúŠúŽñ“ú�EŠú––“ú‚ðŽæ“¾
+                DateTime dtDefaultStart = DateTime.MinValue;
+                DateTime dtDefaultEnd = DateTime.MinValue;
+                CreateDefaultStartAndEndDate(ref dtDefaultStart, ref dtDefaultEnd);
+
+                strSQL += string.Format(" AND (STARTDATE <= TO_DATE('{0}','YYYY/MM/DD')", dtDefaultEnd.ToShortDateString());
+                strSQL += string.Format(" AND (TO_DATE('{0}','YYYY/MM/DD') <= ENDDATE", dtDefaultStart.ToShortDateString());
+                strSQL += string.Format(" OR TO_DATE('{0}','YYYY/MM/DD') = ENDDATE))", DateTime.MinValue.ToShortDateString());
+
+                strSQL += " Order By DeleteFlg ASC, EmployeeClassFlg ASC, DisplayOrder ASC";
                 // ’S“–ŽÒƒ}ƒXƒ^“Ç�ž
                 if (!picDB.SelectAction(strSQL, ref workList)) return false;
 
@@ -541,6 +553,37 @@
         }
         #endregion
 
+        #region ƒfƒtƒHƒ‹ƒg‚ÌŠúŽñ“ú�EŠú––“ú‚ð‹�‚ß‚é
+        /// <summary>
+        /// ƒfƒtƒHƒ‹ƒg‚ÌŠúŽñ“ú�EŠú––“ú‚ð‹�‚ß‚é
+        /// </summary>
+        /// <param name="dtStart"></param>
+        /// <param name="dtEnd"></param>
+        private void CreateDefaultStartAndEndDate(ref DateTime dtStart, ref DateTime dtEnd)
+        {
+            try
+            {
+                // “–ŠúŠúŽñ”NŒŽ“ú‚ðŽæ“¾
+                int iYear = 0;
+                int month = 0;
+                int day = 0;
+                bool bPeriod = true;
+                if (CommonMotions.SystemMasterData.ConstructionNoBase == (int)CommonDefine.SystemConstructionNoBase.BusinessPeriod)
+                {   // ‰c‹ÆŠú
+                    iYear = CommonMotions.PeriodCountToYear(CommonMotions.cnvInt(numUDConstPro.Value));
+                    bPeriod = true;
+                }
+                CommonMotions.GetBeginningMonthDay(bPeriod, ref month, ref day);
+                dtStart = new DateTime(iYear, month, day);
+                dtEnd = dtStart.AddYears(1).AddDays(-1);     // �I—¹‚Í�{1”N�|1“ú
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("ƒVƒXƒeƒ€ƒGƒ‰�[�F{0}�F{1}", CommonMotions.GetMethodName(), ex.Message);
+            }
+        }
+        #endregion
+
         #region ƒf�[ƒ^•\Ž¦�ˆ—�
         /// <summary>
         /// ˆê——ƒf�[ƒ^•\Ž¦�ˆ—�
@@ -1245,6 +1288,31 @@
         }
         #endregion
 
+        #region ‘Î�Û”N“x�‰ŠúƒZƒbƒg
+        /// <summary>
+        /// ‘Î�Û”N“x�‰ŠúƒZƒbƒg
+        /// </summary>
+        private void SetInitnumUDConstPro()
+        {
+            try
+            {
+                // ŒŸ�õ”N“xƒZƒbƒg
+                // ƒf�[ƒ^‚É‚ ‚éŽ–‹ÆŠú‚ÆŒ»�Ý‚ÌŽ–‹ÆƒZƒbƒg
+                int minval = 0;
+                int maxval = 0;
+                CommonMotions.GetPeriodYear(ref minval, ref maxval);
+                numUDConstPro.Minimum = minval;
+                numUDConstPro.Maximum = maxval;
+                numUDConstPro.Value = CommonMotions.SystemMasterData.BusinessPeriod;
+
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("ƒVƒXƒeƒ€ƒGƒ‰�[�F{0}�F{1}", CommonMotions.GetMethodName(), ex.Message);
+            }
+        }
+        #endregion
+
         #region �‰ŠúŽž‚Éƒ�ƒOƒCƒ“’S“–ŽÒ‚ðƒZƒbƒg‚·‚é
         /// <summary>
         /// �‰ŠúŽž‚Éƒ�ƒOƒCƒ“’S“–ŽÒ‚ðƒZƒbƒg‚·‚é
@@ -1279,7 +1347,7 @@
                 else
                 {
                     // ‘I‘ð•”��‚ª•¡�”‚ÌŽÒ‚ÍƒZƒbƒg‚µ‚È‚¢
-                    if (cmbDepartment.Items.Count > 1) return;
+                    if (cmbDepartment.Items.Count > 2) return;
                     cmbDepartment.SelectedValue = CommonMotions.LoginUserData.DepartmentCode;
                     SetcmbPersons();
                     cmbConstructionPerson.SelectedValue = CommonMotions.LoginUserData.PersonCode;
Index: trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstractionList/FrmConstructionList.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstractionList/FrmConstructionList.cs	(revision 141)
+++ trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstractionList/FrmConstructionList.cs	(revision 142)
@@ -203,6 +203,7 @@
         /// <param name="e"></param>
         private void FrmConstructionBaseInfoList_Load(object sender, EventArgs e)
         {
+            SetInitnumUDConstPro();
             // ƒRƒ“ƒ{ƒ{ƒbƒNƒXƒZƒbƒg
             SetcmbDepartment();
             SetcmbPersons();
@@ -295,6 +296,15 @@
         private void numUDConstPro_ValueChanged(object sender, EventArgs e)
         {
             if (m_initDataLoad) return;
+
+            // ƒRƒ“ƒ{ƒ{ƒbƒNƒXƒZƒbƒg
+            int DepCode = CommonMotions.cnvInt(cmbDepartment.SelectedValue);
+            int PerCode = CommonMotions.cnvInt(cmbConstructionPerson.SelectedValue);
+            SetcmbDepartment();
+            SetcmbPersons();
+            cmbDepartment.SelectedValue = DepCode;
+            cmbConstructionPerson.SelectedValue = PerCode;
+
             // ƒf�[ƒ^•\Ž¦
             DataDisplay();
         }
Index: trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstractionList/FrmConstructionListAuxiliary.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstractionList/FrmConstructionListAuxiliary.cs	(revision 141)
+++ trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstractionList/FrmConstructionListAuxiliary.cs	(revision 142)
@@ -974,6 +974,31 @@
         }
         #endregion
 
+        #region ‘Î�Û”N“x�‰ŠúƒZƒbƒg
+        /// <summary>
+        /// ‘Î�Û”N“x�‰ŠúƒZƒbƒg
+        /// </summary>
+        private void SetInitnumUDConstPro()
+        {
+            try
+            {
+                // ŒŸ�õ”N“xƒZƒbƒg
+                // ƒf�[ƒ^‚É‚ ‚éŽ–‹ÆŠú‚ÆŒ»�Ý‚ÌŽ–‹ÆƒZƒbƒg
+                int minval = 0;
+                int maxval = 0;
+                CommonMotions.GetPeriodYear(ref minval, ref maxval);
+                numUDConstPro.Minimum = minval;
+                numUDConstPro.Maximum = maxval;
+                numUDConstPro.Value = CommonMotions.SystemMasterData.BusinessPeriod;
+
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("ƒVƒXƒeƒ€ƒGƒ‰�[�F{0}�F{1}", CommonMotions.GetMethodName(), ex.Message);
+            }
+        }
+        #endregion
+
         #region �‰ŠúŽž‚Éƒ�ƒOƒCƒ“’S“–ŽÒ‚ðƒZƒbƒg‚·‚é
         /// <summary>
         /// �‰ŠúŽž‚Éƒ�ƒOƒCƒ“’S“–ŽÒ‚ðƒZƒbƒg‚·‚é
@@ -1011,7 +1036,7 @@
                 else
                 {
                     // ‘I‘ð•”��‚ª•¡�”‚ÌŽÒ‚ÍƒZƒbƒg‚µ‚È‚¢
-                    if (cmbDepartment.Items.Count > 1) return;
+                    if (cmbDepartment.Items.Count > 2) return;
                     cmbDepartment.SelectedValue = CommonMotions.LoginUserData.DepartmentCode;
                     SetcmbPersons();
                     cmbConstructionPerson.SelectedValue = CommonMotions.LoginUserData.PersonCode;
@@ -1515,6 +1540,7 @@
         private void SetcmbPersons()
         {
             IOMPersonInCharge picDB = new IOMPersonInCharge();
+            List<PersonInChargeMaster> workList = new List<PersonInChargeMaster>();
             bool bSave = m_initDataLoad;
             m_initDataLoad = true;
             try
@@ -1523,23 +1549,34 @@
                 cmbConstructionPerson.Items.Clear();
                 cmbConstructionPerson.Text = "";
 
-                List<PersonInChargeMaster> workList = new List<PersonInChargeMaster>();
+                int DepartmentCode = GetDepartmentCode();
                 string strSQL = string.Empty;
-                int DepartmentCode = GetDepartmentCode();
+                // ŒŸ�õ�ðŒ�
+                strSQL = string.Format(" WHERE LEDGERFLG = {0}", (int)CommonDefine.PersonLedgerDivNo.CalcTarget);
+                strSQL += " AND (DEPARTMENTCODE";
+                string strSubSQL = string.Empty;
                 if (DepartmentCode == 0)
                 {
-                    strSQL = " WHERE DeleteFlg = 0";
-                    strSQL += string.Format(" AND EmployeeClassFlg = {0}", (int)CommonDefine.EmployeeClassFlg.Regular);
                     // ŽQ�Æ•”��ƒ}ƒXƒ^‚æ‚èŽæ“¾‚·‚é
-                    strSQL += " AND DEPARTMENTCODE IN (SELECT AA.DEPARTMENTCODE FROM PERSONDEPARTMENTMASTER AA";
-                    strSQL += string.Format(" WHERE AA.PERSONCODE = {0})", CommonMotions.LoginUserData.PersonCode);
-                    strSQL += " Order By EmployeeClassFlg ASC, DisplayOrder ASC";
+                    strSubSQL += string.Format(" IN (SELECT AA.DEPARTMENTCODE FROM PERSONDEPARTMENTMASTER AA WHERE AA.PERSONCODE = {0})"
+                                            , CommonMotions.LoginUserData.PersonCode);
                 }
                 else
                 {
-                    strSQL = string.Format(" WHERE DEPARTMENTCODE = {0} AND DeleteFlg = 0 Order By EmployeeClassFlg ASC, DisplayOrder ASC", DepartmentCode);
+                    strSubSQL += string.Format(" = {0}", DepartmentCode);
                 }
+                strSQL += strSubSQL + ")";
 
+                // “–ŠúŠúŽñ“ú�EŠú––“ú‚ðŽæ“¾
+                DateTime dtDefaultStart = DateTime.MinValue;
+                DateTime dtDefaultEnd = DateTime.MinValue;
+                CreateDefaultStartAndEndDate(ref dtDefaultStart, ref dtDefaultEnd);
+
+                strSQL += string.Format(" AND (STARTDATE <= TO_DATE('{0}','YYYY/MM/DD')", dtDefaultEnd.ToShortDateString());
+                strSQL += string.Format(" AND (TO_DATE('{0}','YYYY/MM/DD') <= ENDDATE", dtDefaultStart.ToShortDateString());
+                strSQL += string.Format(" OR TO_DATE('{0}','YYYY/MM/DD') = ENDDATE))", DateTime.MinValue.ToShortDateString());
+
+                strSQL += " Order By DeleteFlg ASC, EmployeeClassFlg ASC, DisplayOrder ASC";
                 // ’S“–ŽÒƒ}ƒXƒ^“Ç�ž
                 if (!picDB.SelectAction(strSQL, ref workList)) return;
 
@@ -1570,6 +1607,37 @@
         }
         #endregion
 
+        #region ƒfƒtƒHƒ‹ƒg‚ÌŠúŽñ“ú�EŠú––“ú‚ð‹�‚ß‚é
+        /// <summary>
+        /// ƒfƒtƒHƒ‹ƒg‚ÌŠúŽñ“ú�EŠú––“ú‚ð‹�‚ß‚é
+        /// </summary>
+        /// <param name="dtStart"></param>
+        /// <param name="dtEnd"></param>
+        private void CreateDefaultStartAndEndDate(ref DateTime dtStart, ref DateTime dtEnd)
+        {
+            try
+            {
+                // “–ŠúŠúŽñ”NŒŽ“ú‚ðŽæ“¾
+                int iYear = 0;
+                int month = 0;
+                int day = 0;
+                bool bPeriod = true;
+                if (CommonMotions.SystemMasterData.ConstructionNoBase == (int)CommonDefine.SystemConstructionNoBase.BusinessPeriod)
+                {   // ‰c‹ÆŠú
+                    iYear = CommonMotions.PeriodCountToYear(CommonMotions.cnvInt(numUDConstPro.Value));
+                    bPeriod = true;
+                }
+                CommonMotions.GetBeginningMonthDay(bPeriod, ref month, ref day);
+                dtStart = new DateTime(iYear, month, day);
+                dtEnd = dtStart.AddYears(1).AddDays(-1);     // �I—¹‚Í�{1”N�|1“ú
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("ƒVƒXƒeƒ€ƒGƒ‰�[�F{0}�F{1}", CommonMotions.GetMethodName(), ex.Message);
+            }
+        }
+        #endregion
+
         #region ’S“–ŽÒƒRƒ“ƒ{ƒ{ƒbƒNƒXƒZƒbƒgŽž•”��‚ðƒZƒbƒg‚·‚é
         /// <summary>
         /// ’S“–ŽÒƒRƒ“ƒ{ƒ{ƒbƒNƒXƒZƒbƒgŽž•”��‚ðƒZƒbƒg‚·‚é
Index: trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionJoin/FrmConstructionJoin.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionJoin/FrmConstructionJoin.cs	(revision 141)
+++ trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionJoin/FrmConstructionJoin.cs	(revision 142)
@@ -313,6 +313,15 @@
         private void numUDConstPro_ValueChanged(object sender, EventArgs e)
         {
             if (m_bInitFlag) return;
+
+            // ã‚³ãƒ³ãƒœãƒœãƒƒã‚¯ã‚¹ã‚»ãƒƒãƒˆ
+            int DepCode = CommonMotions.cnvInt(cmbDepartment.SelectedValue);
+            int PerCode = CommonMotions.cnvInt(cmbConstructionPerson.SelectedValue);
+            SetcmbDepartment();
+            SetcmbPersons();
+            cmbDepartment.SelectedValue = DepCode;
+            cmbConstructionPerson.SelectedValue = PerCode;
+
             // ãƒ‡ãƒ¼ã‚¿è¡¨ç¤º
             InitDataLoad();
         }
Index: trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionJoin/FrmConstructionJoinAuxiliary.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionJoin/FrmConstructionJoinAuxiliary.cs	(revision 141)
+++ trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionJoin/FrmConstructionJoinAuxiliary.cs	(revision 142)
@@ -355,13 +355,34 @@
                 cmbConstructionPerson.Items.Clear();
                 cmbConstructionPerson.Text = "";
 
+                int DepartmentCode = GetDepartmentCode();
                 string strSQL = string.Empty;
-                int DepartmentCode = GetDepartmentCode();
+                // æ¤œç´¢æ�¡ä»¶
+                strSQL = string.Format(" WHERE LEDGERFLG = {0}", (int)CommonDefine.PersonLedgerDivNo.CalcTarget);
+                strSQL += " AND (DEPARTMENTCODE";
+                string strSubSQL = string.Empty;
                 if (DepartmentCode == 0)
-                    strSQL = " WHERE DELETEFLG = 0 ORDER BY EMPLOYEECLASSFLG ASC, DISPLAYORDER ASC";
+                {
+                    // å�‚ç…§éƒ¨ç½²ãƒžã‚¹ã‚¿ã‚ˆã‚Šå�–å¾—ã�™ã‚‹
+                    strSubSQL += string.Format(" IN (SELECT AA.DEPARTMENTCODE FROM PERSONDEPARTMENTMASTER AA WHERE AA.PERSONCODE = {0})"
+                                            , CommonMotions.LoginUserData.PersonCode);
+                }
                 else
-                    strSQL = string.Format(" WHERE DEPARTMENTCODE = {0} AND DELETEFLG = 0 ORDER BY EMPLOYEECLASSFLG ASC, DISPLAYORDER ASC", DepartmentCode);
+                {
+                    strSubSQL += string.Format(" = {0}", DepartmentCode);
+                }
+                strSQL += strSubSQL + ")";
 
+                // å½“æœŸæœŸé¦–æ—¥ãƒ»æœŸæœ«æ—¥ã‚’å�–å¾—
+                DateTime dtDefaultStart = DateTime.MinValue;
+                DateTime dtDefaultEnd = DateTime.MinValue;
+                CreateDefaultStartAndEndDate(ref dtDefaultStart, ref dtDefaultEnd);
+
+                strSQL += string.Format(" AND (STARTDATE <= TO_DATE('{0}','YYYY/MM/DD')", dtDefaultEnd.ToShortDateString());
+                strSQL += string.Format(" AND (TO_DATE('{0}','YYYY/MM/DD') <= ENDDATE", dtDefaultStart.ToShortDateString());
+                strSQL += string.Format(" OR TO_DATE('{0}','YYYY/MM/DD') = ENDDATE))", DateTime.MinValue.ToShortDateString());
+
+                strSQL += " Order By DeleteFlg ASC, EmployeeClassFlg ASC, DisplayOrder ASC";
                 // æ‹…å½“è€…ãƒžã‚¹ã‚¿èª­è¾¼
                 if (!picDB.SelectAction(strSQL, ref workList)) return;
 
@@ -402,6 +423,37 @@
         }
         #endregion
 
+        #region ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã�®æœŸé¦–æ—¥ãƒ»æœŸæœ«æ—¥ã‚’æ±‚ã‚�ã‚‹
+        /// <summary>
+        /// ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã�®æœŸé¦–æ—¥ãƒ»æœŸæœ«æ—¥ã‚’æ±‚ã‚�ã‚‹
+        /// </summary>
+        /// <param name="dtStart"></param>
+        /// <param name="dtEnd"></param>
+        private void CreateDefaultStartAndEndDate(ref DateTime dtStart, ref DateTime dtEnd)
+        {
+            try
+            {
+                // å½“æœŸæœŸé¦–å¹´æœˆæ—¥ã‚’å�–å¾—
+                int iYear = 0;
+                int month = 0;
+                int day = 0;
+                bool bPeriod = true;
+                if (CommonMotions.SystemMasterData.ConstructionNoBase == (int)CommonDefine.SystemConstructionNoBase.BusinessPeriod)
+                {   // å–¶æ¥­æœŸ
+                    iYear = CommonMotions.PeriodCountToYear(CommonMotions.cnvInt(numUDConstPro.Value));
+                    bPeriod = true;
+                }
+                CommonMotions.GetBeginningMonthDay(bPeriod, ref month, ref day);
+                dtStart = new DateTime(iYear, month, day);
+                dtEnd = dtStart.AddYears(1).AddDays(-1);     // çµ‚äº†ã�¯ï¼‹1å¹´ï¼�1æ—¥
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("ã‚·ã‚¹ãƒ†ãƒ ã‚¨ãƒ©ãƒ¼ï¼š{0}ï¼š{1}", CommonMotions.GetMethodName(), ex.Message);
+            }
+        }
+        #endregion
+
         #region æ‹…å½“è€…ã‚³ãƒ³ãƒœãƒœãƒƒã‚¯ã‚¹ã‚»ãƒƒãƒˆæ™‚éƒ¨ç½²ã‚’ã‚»ãƒƒãƒˆã�™ã‚‹
         /// <summary>
         /// æ‹…å½“è€…ã‚³ãƒ³ãƒœãƒœãƒƒã‚¯ã‚¹ã‚»ãƒƒãƒˆæ™‚éƒ¨ç½²ã‚’ã‚»ãƒƒãƒˆã�™ã‚‹
@@ -813,8 +865,9 @@
                     frm.NameList.Add(CommonMotions.cnvString(CurRow.Cells[(int)DispGridColumn.ConstructionName].Value));
                 }
 
-                frm.OrderersDivision = m_OrderersDivision;  // ç™ºæ³¨è€…åŒºåˆ†
-                frm.OrdererCode = m_OrdererCode;            // ç™ºæ³¨è€…ç•ªå�·
+                frm.ExcuteFlg = (int)FrmJoinSelect.ExcuteType.Join;    // å‹•ä½œã‚¿ã‚¤ãƒ—
+                frm.OrderersDivision = m_OrderersDivision;              // ç™ºæ³¨è€…åŒºåˆ†
+                frm.OrdererCode = m_OrdererCode;                        // ç™ºæ³¨è€…ç•ªå�·
                 frm.ShowDialog();
                 if (frm.Result == DialogResult.Cancel) return;
 
Index: trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionJoin/FrmJoinSelect.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionJoin/FrmJoinSelect.cs	(revision 141)
+++ trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionJoin/FrmJoinSelect.cs	(revision 142)
@@ -24,7 +24,24 @@
         #endregion
 
         #region å®šæ•°
-
+        /// <summary>
+        /// ç”»é�¢å‹•ä½œã‚¿ã‚¤ãƒ—
+        /// </summary>
+        public enum ExcuteType
+        {
+            /// <summary>
+            /// ç„¡ã�—
+            /// </summary>
+            None=0,
+            /// <summary>
+            /// çµ�å�ˆå‡¦ç�†
+            /// </summary>
+            Join,
+            /// <summary>
+            /// åˆ†å‰²å‡¦ç�†
+            /// </summary>
+            Split,
+        }
         #endregion
 
         #region å¤‰æ•°
@@ -49,6 +66,11 @@
         private string m_ConstructionName = string.Empty;
 
         /// <summary>
+        /// å‹•ä½œåŒºåˆ†
+        /// </summary>
+        private int m_ExcuteFlg = 0;
+
+        /// <summary>
         /// çµ‚äº†ãƒœã‚¿ãƒ³
         /// </summary>
         private DialogResult m_Result = DialogResult.Cancel;
@@ -61,6 +83,7 @@
 
         #region ãƒ—ãƒ­ãƒ‘ãƒ†ã‚£
 
+
         /// <summary>
         /// å·¥äº‹å��ç§°ä¸€è¦§
         /// </summary>
@@ -94,6 +117,15 @@
         }
 
         /// <summary>
+        /// å‹•ä½œåŒºåˆ†
+        /// </summary>
+        public int ExcuteFlg
+        {
+            get { return m_ExcuteFlg; }
+            set { m_ExcuteFlg = value; }
+        }
+
+        /// <summary>
         /// çµ‚äº†ãƒœã‚¿ãƒ³
         /// </summary>
         public DialogResult Result
@@ -121,6 +153,18 @@
         /// <param name="e"></param>
         private void FrmJoinSelect_Load(object sender, EventArgs e)
         {
+            switch (m_ExcuteFlg)
+            {
+                case (int)ExcuteType.Join:
+                    this.Text = "æ–°è¦�çµ�å�ˆä½œæˆ�å‡¦ç�†";
+                    label3.Text = "çµ�å�ˆå¾Œã�«ä½¿ç”¨ã�™ã‚‹å·¥äº‹å��ç§°ã‚’å…¥åŠ›ã�—ã�¦ã��ã� ã�•ã�„ã€‚";
+                    break;
+                case (int)ExcuteType.Split:
+                    this.Text = "æ–°è¦�åˆ†å‰²ä½œæˆ�å‡¦ç�†";
+                    label3.Text = "åˆ†å‰²å¾Œã�«ä½¿ç”¨ã�™ã‚‹å·¥äº‹å��ç§°ã‚’å…¥åŠ›ã�—ã�¦ã��ã� ã�•ã�„ã€‚";
+                    break;
+            }
+
             InitDataDisp();
         }
         #endregion
Index: trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionLedgerList/FrmConstructionLedgerList.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionLedgerList/FrmConstructionLedgerList.cs	(revision 141)
+++ trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionLedgerList/FrmConstructionLedgerList.cs	(revision 142)
@@ -167,9 +167,9 @@
         /// <summary>
         /// ƒOƒŠƒbƒh�€–Ú�sƒ^ƒCƒgƒ‹
         /// </summary>
-        private static string[] s_GroupTitle = new string[] {"•›’S“–ŽÒ�U•ª",
-                                                            "Žw “± ˆõ �U •ª",
-                                                            "’S“–ŽÒ‹‹—^�·Šz"};
+        private static string[] s_GroupTitle = new string[] {" •›’S“–ŽÒŽû‰v ",
+                                                             "  Žw“±ˆõŽû‰v  ",
+                                                             "’S“–ŽÒ‹‹—^�·Šz"};
         #endregion
 
         #region Ž©ƒvƒ�ƒZƒX‚Ì”Ô�†
@@ -455,7 +455,7 @@
         /// <param name="e"></param>
         private void FrmLedgerStatus_Load(object sender, EventArgs e)
         {
-
+            SetInitnumUDConstPro();
             // ƒRƒ“ƒ{ƒ{ƒbƒNƒXƒZƒbƒg
             SetcmbDepartment();
             SetcmbPersons();
@@ -554,6 +554,15 @@
         private void numUDConstPro_ValueChanged(object sender, EventArgs e)
         {
             if (m_initDataLoad) return;
+
+            // ƒRƒ“ƒ{ƒ{ƒbƒNƒXƒZƒbƒg
+            int DepCode = CommonMotions.cnvInt(cmbDepartment.SelectedValue);
+            int PerCode = CommonMotions.cnvInt(cmbConstructionPerson.SelectedValue);
+            SetcmbDepartment();
+            SetcmbPersons();
+            cmbDepartment.SelectedValue = DepCode;
+            cmbConstructionPerson.SelectedValue = PerCode;
+
             // ƒf�[ƒ^•\Ž¦
             DataDisplay();
         }
Index: trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionLedgerList/FrmConstructionLedgerList.designer.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionLedgerList/FrmConstructionLedgerList.designer.cs	(revision 141)
+++ trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionLedgerList/FrmConstructionLedgerList.designer.cs	(revision 142)
@@ -28,24 +28,24 @@
         /// </summary>
         private void InitializeComponent()
         {
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle37 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle38 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle54 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle39 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle40 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle41 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle42 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle43 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle44 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle45 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle46 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle47 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle48 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle49 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle50 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle51 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle52 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle53 = 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 dataGridViewCellStyle36 = 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 dataGridViewCellStyle29 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle30 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle31 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle32 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle33 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle34 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle35 = new System.Windows.Forms.DataGridViewCellStyle();
             this.btnEnd = new System.Windows.Forms.Button();
             this.label1 = new System.Windows.Forms.Label();
             this.groupBox1 = new System.Windows.Forms.GroupBox();
@@ -105,6 +105,7 @@
             this.Column11 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.Column12 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.btnLedgerStatus = new System.Windows.Forms.Button();
+            this.label18 = new System.Windows.Forms.Label();
             this.groupBox1.SuspendLayout();
             this.pnlPayroll.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)(this.numUDConstPro)).BeginInit();
@@ -162,6 +163,7 @@
             // 
             this.pnlPayroll.BackColor = System.Drawing.Color.PaleGoldenrod;
             this.pnlPayroll.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
+            this.pnlPayroll.Controls.Add(this.label18);
             this.pnlPayroll.Controls.Add(this.lblEndDate);
             this.pnlPayroll.Controls.Add(this.lblStartDate);
             this.pnlPayroll.Controls.Add(this.label8);
@@ -259,7 +261,7 @@
             // 
             // label23
             // 
-            this.label23.BackColor = System.Drawing.Color.LightSalmon;
+            this.label23.BackColor = System.Drawing.Color.Orange;
             this.label23.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
             this.label23.Font = new System.Drawing.Font("ï¼­ï¼³ æ˜Žæœ�", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
             this.label23.ForeColor = System.Drawing.Color.White;
@@ -267,7 +269,7 @@
             this.label23.Name = "label23";
             this.label23.Size = new System.Drawing.Size(110, 25);
             this.label23.TabIndex = 51;
-            this.label23.Text = "å½“æœŸç´”åˆ©ç›Š";
+            this.label23.Text = "æ‹…å½“å¤–å�Žç›Š";
             this.label23.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
             // 
             // label11
@@ -297,7 +299,7 @@
             // 
             // label19
             // 
-            this.label19.BackColor = System.Drawing.Color.LightSalmon;
+            this.label19.BackColor = System.Drawing.Color.Orange;
             this.label19.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
             this.label19.Font = new System.Drawing.Font("ï¼­ï¼³ æ˜Žæœ�", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
             this.label19.ForeColor = System.Drawing.Color.White;
@@ -305,7 +307,7 @@
             this.label19.Name = "label19";
             this.label19.Size = new System.Drawing.Size(110, 25);
             this.label19.TabIndex = 49;
-            this.label19.Text = "å½“æœŸç´”åˆ©ç›Š";
+            this.label19.Text = "æ‹…å½“å¤–å�Žç›Š";
             this.label19.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
             // 
             // lblPlusorMinus2
@@ -382,7 +384,7 @@
             this.label22.Name = "label22";
             this.label22.Size = new System.Drawing.Size(110, 25);
             this.label22.TabIndex = 32;
-            this.label22.Text = "å½“æœŸæš«å®šç´”åˆ©ç›Š";
+            this.label22.Text = "å½“æœŸäººä»¶è²»";
             this.label22.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
             // 
             // lblTotalValue2
@@ -403,7 +405,7 @@
             this.label14.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
             this.label14.Font = new System.Drawing.Font("ï¼­ï¼³ æ˜Žæœ�", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
             this.label14.ForeColor = System.Drawing.Color.DarkRed;
-            this.label14.Location = new System.Drawing.Point(379, 28);
+            this.label14.Location = new System.Drawing.Point(72, 53);
             this.label14.Name = "label14";
             this.label14.Size = new System.Drawing.Size(110, 25);
             this.label14.TabIndex = 32;
@@ -424,15 +426,15 @@
             // 
             // label20
             // 
-            this.label20.BackColor = System.Drawing.Color.DarkOrange;
+            this.label20.BackColor = System.Drawing.Color.LightGoldenrodYellow;
             this.label20.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
             this.label20.Font = new System.Drawing.Font("ï¼­ï¼³ æ˜Žæœ�", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
-            this.label20.ForeColor = System.Drawing.Color.White;
+            this.label20.ForeColor = System.Drawing.Color.Black;
             this.label20.Location = new System.Drawing.Point(72, 28);
             this.label20.Name = "label20";
             this.label20.Size = new System.Drawing.Size(110, 25);
             this.label20.TabIndex = 11;
-            this.label20.Text = "æŒ¯åˆ†æ¸ˆç´”åˆ©ç›Š";
+            this.label20.Text = "å‰¯æ‹…å½“å�Žç›Š";
             this.label20.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
             // 
             // label13
@@ -474,15 +476,15 @@
             // 
             // label17
             // 
-            this.label17.BackColor = System.Drawing.Color.Green;
+            this.label17.BackColor = System.Drawing.Color.OldLace;
             this.label17.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
             this.label17.Font = new System.Drawing.Font("ï¼­ï¼³ æ˜Žæœ�", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
-            this.label17.ForeColor = System.Drawing.Color.White;
-            this.label17.Location = new System.Drawing.Point(72, 53);
+            this.label17.ForeColor = System.Drawing.Color.Black;
+            this.label17.Location = new System.Drawing.Point(379, 28);
             this.label17.Name = "label17";
             this.label17.Size = new System.Drawing.Size(110, 25);
             this.label17.TabIndex = 6;
-            this.label17.Text = "æœªæŒ¯åˆ†ç´”åˆ©ç›Š";
+            this.label17.Text = "æŒ‡å°Žå“¡å�Žç›Š";
             this.label17.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
             // 
             // label9
@@ -674,21 +676,21 @@
             this.dgvMaster.AllowUserToDeleteRows = false;
             this.dgvMaster.AllowUserToResizeColumns = false;
             this.dgvMaster.AllowUserToResizeRows = false;
-            dataGridViewCellStyle37.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(255)))), ((int)(((byte)(192)))));
-            this.dgvMaster.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle37;
+            dataGridViewCellStyle19.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(255)))), ((int)(((byte)(192)))));
+            this.dgvMaster.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle19;
             this.dgvMaster.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
             | System.Windows.Forms.AnchorStyles.Left) 
             | System.Windows.Forms.AnchorStyles.Right)));
             this.dgvMaster.BackgroundColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224)))));
             this.dgvMaster.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
-            dataGridViewCellStyle38.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
-            dataGridViewCellStyle38.BackColor = System.Drawing.SystemColors.Control;
-            dataGridViewCellStyle38.Font = new System.Drawing.Font("ï¼­ï¼³ æ˜Žæœ�", 11.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
-            dataGridViewCellStyle38.ForeColor = System.Drawing.SystemColors.WindowText;
-            dataGridViewCellStyle38.SelectionBackColor = System.Drawing.SystemColors.Highlight;
-            dataGridViewCellStyle38.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
-            dataGridViewCellStyle38.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
-            this.dgvMaster.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle38;
+            dataGridViewCellStyle20.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
+            dataGridViewCellStyle20.BackColor = System.Drawing.SystemColors.Control;
+            dataGridViewCellStyle20.Font = new System.Drawing.Font("ï¼­ï¼³ æ˜Žæœ�", 11.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
+            dataGridViewCellStyle20.ForeColor = System.Drawing.SystemColors.WindowText;
+            dataGridViewCellStyle20.SelectionBackColor = System.Drawing.SystemColors.Highlight;
+            dataGridViewCellStyle20.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
+            dataGridViewCellStyle20.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
+            this.dgvMaster.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle20;
             this.dgvMaster.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing;
             this.dgvMaster.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
             this.Column1,
@@ -706,14 +708,14 @@
             this.Column10,
             this.Column11,
             this.Column12});
-            dataGridViewCellStyle54.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
-            dataGridViewCellStyle54.BackColor = System.Drawing.SystemColors.Window;
-            dataGridViewCellStyle54.Font = new System.Drawing.Font("ï¼­ï¼³ æ˜Žæœ�", 11.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
-            dataGridViewCellStyle54.ForeColor = System.Drawing.SystemColors.ControlText;
-            dataGridViewCellStyle54.SelectionBackColor = System.Drawing.Color.LightSeaGreen;
-            dataGridViewCellStyle54.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
-            dataGridViewCellStyle54.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
-            this.dgvMaster.DefaultCellStyle = dataGridViewCellStyle54;
+            dataGridViewCellStyle36.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
+            dataGridViewCellStyle36.BackColor = System.Drawing.SystemColors.Window;
+            dataGridViewCellStyle36.Font = new System.Drawing.Font("ï¼­ï¼³ æ˜Žæœ�", 11.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
+            dataGridViewCellStyle36.ForeColor = System.Drawing.SystemColors.ControlText;
+            dataGridViewCellStyle36.SelectionBackColor = System.Drawing.Color.LightSeaGreen;
+            dataGridViewCellStyle36.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
+            dataGridViewCellStyle36.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
+            this.dgvMaster.DefaultCellStyle = dataGridViewCellStyle36;
             this.dgvMaster.EditMode = System.Windows.Forms.DataGridViewEditMode.EditOnEnter;
             this.dgvMaster.Location = new System.Drawing.Point(5, 168);
             this.dgvMaster.Name = "dgvMaster";
@@ -731,8 +733,8 @@
             // 
             // Column1
             // 
-            dataGridViewCellStyle39.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
-            this.Column1.DefaultCellStyle = dataGridViewCellStyle39;
+            dataGridViewCellStyle21.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
+            this.Column1.DefaultCellStyle = dataGridViewCellStyle21;
             this.Column1.Frozen = true;
             this.Column1.HeaderText = "â„–";
             this.Column1.Name = "Column1";
@@ -743,8 +745,8 @@
             // 
             // Column13
             // 
-            dataGridViewCellStyle40.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
-            this.Column13.DefaultCellStyle = dataGridViewCellStyle40;
+            dataGridViewCellStyle22.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
+            this.Column13.DefaultCellStyle = dataGridViewCellStyle22;
             this.Column13.Frozen = true;
             this.Column13.HeaderText = "æ¸ˆ";
             this.Column13.Name = "Column13";
@@ -754,8 +756,8 @@
             // 
             // Column14
             // 
-            dataGridViewCellStyle41.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
-            this.Column14.DefaultCellStyle = dataGridViewCellStyle41;
+            dataGridViewCellStyle23.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
+            this.Column14.DefaultCellStyle = dataGridViewCellStyle23;
             this.Column14.Frozen = true;
             this.Column14.HeaderText = "éƒ¨ç½²";
             this.Column14.Name = "Column14";
@@ -763,8 +765,8 @@
             // 
             // Column2
             // 
-            dataGridViewCellStyle42.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
-            this.Column2.DefaultCellStyle = dataGridViewCellStyle42;
+            dataGridViewCellStyle24.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
+            this.Column2.DefaultCellStyle = dataGridViewCellStyle24;
             this.Column2.Frozen = true;
             this.Column2.HeaderText = "æ‹…å½“è€…å��";
             this.Column2.Name = "Column2";
@@ -774,8 +776,8 @@
             // 
             // Column3
             // 
-            dataGridViewCellStyle43.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
-            this.Column3.DefaultCellStyle = dataGridViewCellStyle43;
+            dataGridViewCellStyle25.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
+            this.Column3.DefaultCellStyle = dataGridViewCellStyle25;
             this.Column3.Frozen = true;
             this.Column3.HeaderText = "å·¥äº‹ã‚³ãƒ¼ãƒ‰";
             this.Column3.Name = "Column3";
@@ -787,8 +789,8 @@
             // 
             // Column4
             // 
-            dataGridViewCellStyle44.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
-            this.Column4.DefaultCellStyle = dataGridViewCellStyle44;
+            dataGridViewCellStyle26.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
+            this.Column4.DefaultCellStyle = dataGridViewCellStyle26;
             this.Column4.Frozen = true;
             this.Column4.HeaderText = "å·¥ã€€äº‹ã€€å��ã€€ç§°";
             this.Column4.Name = "Column4";
@@ -799,9 +801,9 @@
             // 
             // Column15
             // 
-            dataGridViewCellStyle45.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
-            dataGridViewCellStyle45.Font = new System.Drawing.Font("ï¼­ï¼³ æ˜Žæœ�", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
-            this.Column15.DefaultCellStyle = dataGridViewCellStyle45;
+            dataGridViewCellStyle27.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
+            dataGridViewCellStyle27.Font = new System.Drawing.Font("ï¼­ï¼³ æ˜Žæœ�", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
+            this.Column15.DefaultCellStyle = dataGridViewCellStyle27;
             this.Column15.Frozen = true;
             this.Column15.HeaderText = "çŠ¶ã€€æ…‹";
             this.Column15.Name = "Column15";
@@ -810,9 +812,9 @@
             // 
             // Column5
             // 
-            dataGridViewCellStyle46.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
-            dataGridViewCellStyle46.Font = new System.Drawing.Font("ï¼­ï¼³ ï¼°æ˜Žæœ�", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
-            this.Column5.DefaultCellStyle = dataGridViewCellStyle46;
+            dataGridViewCellStyle28.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
+            dataGridViewCellStyle28.Font = new System.Drawing.Font("ï¼­ï¼³ ï¼°æ˜Žæœ�", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
+            this.Column5.DefaultCellStyle = dataGridViewCellStyle28;
             this.Column5.Frozen = true;
             this.Column5.HeaderText = "å�—æ³¨é‡‘é¡�";
             this.Column5.Name = "Column5";
@@ -823,9 +825,9 @@
             // 
             // Column6
             // 
-            dataGridViewCellStyle47.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
-            dataGridViewCellStyle47.Font = new System.Drawing.Font("ï¼­ï¼³ ï¼°æ˜Žæœ�", 9F, System.Drawing.FontStyle.Bold);
-            this.Column6.DefaultCellStyle = dataGridViewCellStyle47;
+            dataGridViewCellStyle29.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
+            dataGridViewCellStyle29.Font = new System.Drawing.Font("ï¼­ï¼³ ï¼°æ˜Žæœ�", 9F, System.Drawing.FontStyle.Bold);
+            this.Column6.DefaultCellStyle = dataGridViewCellStyle29;
             this.Column6.HeaderText = "ä¼šç¤¾çµŒè²»";
             this.Column6.Name = "Column6";
             this.Column6.ReadOnly = true;
@@ -834,9 +836,9 @@
             // 
             // Column7
             // 
-            dataGridViewCellStyle48.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
-            dataGridViewCellStyle48.Font = new System.Drawing.Font("ï¼­ï¼³ ï¼°æ˜Žæœ�", 9F, System.Drawing.FontStyle.Bold);
-            this.Column7.DefaultCellStyle = dataGridViewCellStyle48;
+            dataGridViewCellStyle30.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
+            dataGridViewCellStyle30.Font = new System.Drawing.Font("ï¼­ï¼³ ï¼°æ˜Žæœ�", 9F, System.Drawing.FontStyle.Bold);
+            this.Column7.DefaultCellStyle = dataGridViewCellStyle30;
             this.Column7.HeaderText = "éƒ¨ç½²çµŒè²»";
             this.Column7.Name = "Column7";
             this.Column7.ReadOnly = true;
@@ -845,9 +847,9 @@
             // 
             // Column8
             // 
-            dataGridViewCellStyle49.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
-            dataGridViewCellStyle49.Font = new System.Drawing.Font("ï¼­ï¼³ ï¼°æ˜Žæœ�", 9F, System.Drawing.FontStyle.Bold);
-            this.Column8.DefaultCellStyle = dataGridViewCellStyle49;
+            dataGridViewCellStyle31.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
+            dataGridViewCellStyle31.Font = new System.Drawing.Font("ï¼­ï¼³ ï¼°æ˜Žæœ�", 9F, System.Drawing.FontStyle.Bold);
+            this.Column8.DefaultCellStyle = dataGridViewCellStyle31;
             this.Column8.HeaderText = "å–¶æ¥­çµŒè²»";
             this.Column8.Name = "Column8";
             this.Column8.ReadOnly = true;
@@ -856,9 +858,9 @@
             // 
             // Column9
             // 
-            dataGridViewCellStyle50.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
-            dataGridViewCellStyle50.Font = new System.Drawing.Font("ï¼­ï¼³ ï¼°æ˜Žæœ�", 9F, System.Drawing.FontStyle.Bold);
-            this.Column9.DefaultCellStyle = dataGridViewCellStyle50;
+            dataGridViewCellStyle32.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
+            dataGridViewCellStyle32.Font = new System.Drawing.Font("ï¼­ï¼³ ï¼°æ˜Žæœ�", 9F, System.Drawing.FontStyle.Bold);
+            this.Column9.DefaultCellStyle = dataGridViewCellStyle32;
             this.Column9.HeaderText = "ç·�æ”¯æ‰•é¡�";
             this.Column9.Name = "Column9";
             this.Column9.ReadOnly = true;
@@ -867,9 +869,9 @@
             // 
             // Column10
             // 
-            dataGridViewCellStyle51.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
-            dataGridViewCellStyle51.Font = new System.Drawing.Font("ï¼­ï¼³ ï¼°æ˜Žæœ�", 9F, System.Drawing.FontStyle.Bold);
-            this.Column10.DefaultCellStyle = dataGridViewCellStyle51;
+            dataGridViewCellStyle33.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
+            dataGridViewCellStyle33.Font = new System.Drawing.Font("ï¼­ï¼³ ï¼°æ˜Žæœ�", 9F, System.Drawing.FontStyle.Bold);
+            this.Column10.DefaultCellStyle = dataGridViewCellStyle33;
             this.Column10.HeaderText = "ç²—ã€€åˆ©";
             this.Column10.Name = "Column10";
             this.Column10.ReadOnly = true;
@@ -878,9 +880,9 @@
             // 
             // Column11
             // 
-            dataGridViewCellStyle52.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
-            dataGridViewCellStyle52.Font = new System.Drawing.Font("ï¼­ï¼³ ï¼°æ˜Žæœ�", 9F, System.Drawing.FontStyle.Bold);
-            this.Column11.DefaultCellStyle = dataGridViewCellStyle52;
+            dataGridViewCellStyle34.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
+            dataGridViewCellStyle34.Font = new System.Drawing.Font("ï¼­ï¼³ ï¼°æ˜Žæœ�", 9F, System.Drawing.FontStyle.Bold);
+            this.Column11.DefaultCellStyle = dataGridViewCellStyle34;
             this.Column11.HeaderText = "çµ¦ã€€ä¸Ž";
             this.Column11.Name = "Column11";
             this.Column11.ReadOnly = true;
@@ -891,9 +893,9 @@
             // 
             // Column12
             // 
-            dataGridViewCellStyle53.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
-            dataGridViewCellStyle53.Font = new System.Drawing.Font("ï¼­ï¼³ ï¼°æ˜Žæœ�", 9F, System.Drawing.FontStyle.Bold);
-            this.Column12.DefaultCellStyle = dataGridViewCellStyle53;
+            dataGridViewCellStyle35.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
+            dataGridViewCellStyle35.Font = new System.Drawing.Font("ï¼­ï¼³ ï¼°æ˜Žæœ�", 9F, System.Drawing.FontStyle.Bold);
+            this.Column12.DefaultCellStyle = dataGridViewCellStyle35;
             this.Column12.HeaderText = "ç´”åˆ©ç›Š";
             this.Column12.Name = "Column12";
             this.Column12.ReadOnly = true;
@@ -914,6 +916,18 @@
             this.btnLedgerStatus.UseVisualStyleBackColor = false;
             this.btnLedgerStatus.Click += new System.EventHandler(this.btnLedgerStatus_Click);
             // 
+            // label18
+            // 
+            this.label18.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+            this.label18.AutoSize = true;
+            this.label18.Font = new System.Drawing.Font("ï¼­ï¼³ æ˜Žæœ�", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
+            this.label18.ForeColor = System.Drawing.Color.Red;
+            this.label18.Location = new System.Drawing.Point(944, 59);
+            this.label18.Name = "label18";
+            this.label18.Size = new System.Drawing.Size(282, 19);
+            this.label18.TabIndex = 55;
+            this.label18.Text = "â€»å½“æœŸäººä»¶è²»ã�®ã�¿ã�®è¨ˆç®—ã�§ã�™";
+            // 
             // FrmLedgerStatus
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
@@ -1010,5 +1024,6 @@
         private System.Windows.Forms.Label lblCalcValue1;
         private System.Windows.Forms.Label label10;
         private System.Windows.Forms.Button btnLedgerStatus;
+        private System.Windows.Forms.Label label18;
     }
 }
\ No newline at end of file
Index: trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionLedgerList/FrmConstructionLedgerListAuxiliary.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionLedgerList/FrmConstructionLedgerListAuxiliary.cs	(revision 141)
+++ trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionLedgerList/FrmConstructionLedgerListAuxiliary.cs	(revision 142)
@@ -686,7 +686,7 @@
         /// <param name="dtStartArray"></param>
         /// <param name="dtCompArray"></param>
         /// <returns></returns>
-        private int SetOtherCost(List<int> PersonCDArray, List<DateTime> dtStartArray, List<DateTime> dtCompArray)
+        private int SetOtherCost(List<int> PersonCDArray, List<DateTime> dtStartArray, List<DateTime> dtCompArray,  List<DateTime> dtHireStDayArray)
         {
             try
             {
@@ -704,11 +704,18 @@
                 for (int ii = 0; ii < PersonCDArray.Count; ii++)
                 {
                     // ŠJŽn�E�I—¹“ú‚ª–³‚¢�ê�‡‚ÍƒfƒtƒHƒ‹ƒg‚ÌŠúŽñ�EŠú––‚ðŽg—p‚·‚é
-                    if (dtStartArray[ii] == DateTime.MinValue || dtStartArray[ii] == DateTime.MaxValue) dtStartArray[ii] = dtDefaultStart;
-                    if (dtCompArray[ii] == DateTime.MinValue || dtCompArray[ii] == DateTime.MaxValue) dtCompArray[ii] = dtDefaultEnd;
+                    //if (dtStartArray[ii] == DateTime.MinValue || dtStartArray[ii] == DateTime.MaxValue) dtStartArray[ii] = dtDefaultStart;
+                    //if (dtCompArray[ii] == DateTime.MinValue || dtCompArray[ii] == DateTime.MaxValue) dtCompArray[ii] = dtDefaultEnd;
+                    // ŠJŽn�E�I—¹“ú‚ª–³‚¢�ê�‡‚ÍƒfƒtƒHƒ‹ƒg‚ÌŠúŽñ�EŠú––‚ðŽg—p‚·‚é
 
+                    DateTime stDate = dtStartArray[ii];
+                    DateTime edDate = dtCompArray[ii];
+                    CalcStartCompDate(dtDefaultStart, dtDefaultEnd, dtHireStDayArray[ii], dtCompArray[ii], ref stDate, ref edDate);
+
+
                     // Œo”ïŽæ“¾
-                    GetPersonExpensesCostValue(PersonCDArray[ii], dtStartArray[ii], dtCompArray[ii], ref CostValue);
+                    //GetPersonExpensesCostValue(PersonCDArray[ii], dtStartArray[ii], dtCompArray[ii], ref CostValue);
+                    GetPersonExpensesCostValue(PersonCDArray[ii], stDate, edDate, ref CostValue);
                 }
 
                 // ----- Œo”ï‚Ì�WŒv
@@ -722,6 +729,7 @@
                     dgv.Rows[RowCnt].Cells[(int)DispColumn.SelectionName].Value = CommonDefine.CostDataNoString[i];
                     // ‹àŠzƒZƒbƒg
                     dgv.Rows[RowCnt].Cells[(int)DispColumn.TotalPayment].Value = CostValue[i].ToString("#,0");
+                    dgv.Rows[RowCnt].Cells[(int)DispColumn.NetProfit].Value = (CostValue[i] * -1).ToString("#,0");
                     SumData += CostValue[i];
                 }
 
@@ -733,6 +741,7 @@
                 dgv.Rows[ExpensesCnt].Cells[(int)DispColumn.SelectionName].Style.Alignment = DataGridViewContentAlignment.MiddleCenter;
                 // ‹àŠzƒZƒbƒg
                 dgv.Rows[ExpensesCnt].Cells[(int)DispColumn.TotalPayment].Value = SumData.ToString("#,0");
+                dgv.Rows[ExpensesCnt].Cells[(int)DispColumn.NetProfit].Value = (SumData * -1).ToString("#,0");
                 // �s‚Ì�F‚ð•Ï‚¦‚é
                 SetRowColor(dgv.Rows[ExpensesCnt], s_RowTotalBackColor, s_RowTotalForeColor);
 
@@ -778,7 +787,7 @@
                     // Œo”ï–¼�Ì
                     dgv.Rows[RowCnt].Cells[(int)DispColumn.SelectionName].Value = s_GroupTitle[i];
                     // ‹àŠzƒZƒbƒg
-                    dgv.Rows[RowCnt].Cells[(int)DispColumn.GrossProfit].Value = CostValue[i].ToString("#,0");
+                    dgv.Rows[RowCnt].Cells[(int)DispColumn.NetProfit].Value = CostValue[i].ToString("#,0");
                     SumData += CostValue[i];
                 }
 
@@ -789,7 +798,7 @@
                 // Œo”ï–¼�Ì
                 dgv.Rows[RowCnt].Cells[(int)DispColumn.SelectionName].Value = s_GroupTitle[2];
                 // ‹àŠzƒZƒbƒg
-                dgv.Rows[RowCnt].Cells[(int)DispColumn.GrossProfit].Value = ConstrCost.ToString("#,0");
+                dgv.Rows[RowCnt].Cells[(int)DispColumn.NetProfit].Value = ConstrCost.ToString("#,0");
                 SumData += ConstrCost;
 
                 // ----- •â�•�U•ª‚ÌŒv‚ð•\Ž¦‚·‚é
@@ -799,7 +808,7 @@
                 dgv.Rows[AuxiliaryCnt].Cells[(int)DispColumn.SelectionName].Value = s_TotalTitleArray[(int)RowTitleNum.Auxiliary];
                 dgv.Rows[AuxiliaryCnt].Cells[(int)DispColumn.SelectionName].Style.Alignment = DataGridViewContentAlignment.MiddleCenter;
                 // ‹àŠzƒZƒbƒg
-                dgv.Rows[AuxiliaryCnt].Cells[(int)DispColumn.GrossProfit].Value = SumData.ToString("#,0");
+                dgv.Rows[AuxiliaryCnt].Cells[(int)DispColumn.NetProfit].Value = SumData.ToString("#,0");
                 // �s‚Ì�F‚ð•Ï‚¦‚é
                 SetRowColor(dgv.Rows[AuxiliaryCnt], s_RowTotalBackColor, s_RowTotalForeColor);
 
@@ -981,22 +990,34 @@
                 strSQL += string.Format(" AND E.CONSTRUCTIONSTATUSFLG <> {0}", NotOrder);
                 strSQL += string.Format(" AND E.CONSTRUCTIONPERIOD = {0}", numUDConstPro.Value);
 
-                strSQL += " WHERE P.DELETEFLG = 0";
-                strSQL += string.Format(" AND P.LEDGERFLG = {0}", (int)CommonDefine.PersonLedgerDivNo.CalcTarget);
+                strSQL += string.Format(" WHERE P.LEDGERFLG = {0}", (int)CommonDefine.PersonLedgerDivNo.CalcTarget);
 
+                // “–ŠúŠúŽñ“ú�EŠú––“ú‚ðŽæ“¾
+                DateTime dtDefaultStart = DateTime.MinValue;
+                DateTime dtDefaultEnd = DateTime.MinValue;
+                CreateDefaultStartAndEndDate(ref dtDefaultStart, ref dtDefaultEnd);
+                strSQL += string.Format(" AND (P.STARTDATE <= TO_DATE('{0}','YYYY/MM/DD')", dtDefaultEnd.ToShortDateString());
+                strSQL += string.Format(" AND (TO_DATE('{0}','YYYY/MM/DD') <= P.ENDDATE", dtDefaultStart.ToShortDateString());
+                strSQL += string.Format(" OR TO_DATE('{0}','YYYY/MM/DD') = P.ENDDATE))", DateTime.MinValue.ToShortDateString());
+
                 // �HŽ–‘ä’ ƒf�[ƒ^‚Ì•”��‚¾‚¯‚ª‘Î�Û
-                strSQL += " AND P.DEPARTMENTCODE IN";
-                strSQL += " (SELECT DEPARTMENTCODE FROM (SELECT A.DEPARTMENTCODE, A.DEPARTMENTSTRING, A.DISPLAYORDER, COUNT(*) CNT";
-                strSQL += " FROM DEPARTMENTMASTER A, PERSONINCHARGEMASTER B, CONSTRUCTIONBASEINFO C , CONSTRUCTIONLEDGERDETAIL D";
-                strSQL += " WHERE A.DELETEFLG = 0";
-                strSQL += " AND A.DEPARTMENTCODE = B.DEPARTMENTCODE";
-                strSQL += " AND B.PERSONCODE = C.CONSTRUCTIONPERSONCODE";
-                strSQL += " AND D.CONSTRUCTIONCODE = C.CONSTRUCTIONCODE";
+                if (DepartmentCode == 0)
+                {
+                    strSQL += " AND P.DEPARTMENTCODE IN";
+                    strSQL += " (SELECT TMP.DEPARTMENTCODE FROM (SELECT A.DEPARTMENTCODE, A.DEPARTMENTSTRING, A.DISPLAYORDER, COUNT(*) CNT";
+                    strSQL += " FROM DEPARTMENTMASTER A, PERSONINCHARGEMASTER B, CONSTRUCTIONBASEINFO C , CONSTRUCTIONLEDGERDETAIL D";
+                    strSQL += " WHERE A.DELETEFLG = 0";
+                    strSQL += " AND A.DEPARTMENTCODE = B.DEPARTMENTCODE";
+                    strSQL += " AND B.PERSONCODE = C.CONSTRUCTIONPERSONCODE";
+                    strSQL += " AND D.CONSTRUCTIONCODE = C.CONSTRUCTIONCODE";
 
-                strSQL += " GROUP BY A.DEPARTMENTCODE, A.DEPARTMENTSTRING, A.DISPLAYORDER))";
-
-                // •”��ƒR�[ƒh‘I‘ðŽž‚Í•”��‚ðŒŸ�õ�ðŒ�‚Ö“ü‚ê‚é
-                if (DepartmentCode != 0) strSQL += string.Format(" AND P.DEPARTMENTCODE = {0}", DepartmentCode);
+                    strSQL += " GROUP BY A.DEPARTMENTCODE, A.DEPARTMENTSTRING, A.DISPLAYORDER) TMP)";
+                }
+                else
+                {
+                    // •”��ƒR�[ƒh‘I‘ðŽž‚Í•”��‚ðŒŸ�õ�ðŒ�‚Ö“ü‚ê‚é
+                    strSQL += string.Format(" AND P.DEPARTMENTCODE = {0}", DepartmentCode);
+                }
                 if (PersonCode != 0) strSQL += string.Format(" AND P.PERSONCODE = {0}", PersonCode);
 
                 strSQL += " GROUP BY P.PERSONCODE, P.PERSONNAME, P.DISPLAYORDER, P.MonthlySalary, P.STARTDATE, P.ENDDATE";
@@ -1005,11 +1026,6 @@
                 ArrayList arList = new ArrayList();
                 if (!PersonDB.ExecuteReader(strSQL, ref arList)) return 0;
 
-                // “–ŠúŠúŽñ“ú�EŠú––“ú‚ðŽæ“¾
-                DateTime dtDefaultStart = DateTime.MinValue;
-                DateTime dtDefaultEnd = DateTime.MinValue;
-                CreateDefaultStartAndEndDate(ref dtDefaultStart, ref dtDefaultEnd);
-
                 DateTime stDate = DateTime.MaxValue;
                 DateTime edDate = DateTime.MinValue;
                 DateTime maxDate = DateTime.MinValue;
@@ -1132,9 +1148,7 @@
                 int NotOrder = CommonDefine.ProjectsStatus.First(x => x.Value.Equals("”ñ Žó ’�")).Key;
 
                 // �HŽ–�Ú�×‘ä’ ƒf�[ƒ^‚æ‚è•â�•�U•ª‚ðŽæ“¾‚·‚é
-                //string strSQL = "SELECT A.CONSTRUCTIONPERIOD, P.GROUPCOUNT, SUM(P.EXECUTIONAMOUNT)";
                 string strSQL = "SELECT A.CONSTRUCTIONPERIOD, P.GROUPCOUNT, SUM(B.PAYMENTAMOUNT)";
-                //strSQL += " FROM CONSTRUCTIONLEDGERDETAIL P, CONSTRUCTIONBASEINFO A";
                 strSQL += " FROM CONSTRUCTIONLEDGERDETAIL P LEFT JOIN CONSTRUCTIONLEDGEREXCUTE B";
                 strSQL += " ON B.CONSTRUCTIONCODE = P.CONSTRUCTIONCODE AND B.GROUPCOUNT = P.GROUPCOUNT AND B.LINECOUNT = P.LINECOUNT";
                 strSQL += " , CONSTRUCTIONBASEINFO A";
@@ -1152,9 +1166,7 @@
                 strSQL += " GROUP BY A.CONSTRUCTIONPERIOD, P.GROUPCOUNT";
 
                 strSQL += " UNION";
-                //strSQL += " SELECT A.CONSTRUCTIONPERIOD, P.GROUPCOUNT, SUM(P.EXECUTIONAMOUNT)";
                 strSQL += " SELECT A.CONSTRUCTIONPERIOD, P.GROUPCOUNT, SUM(B.PAYMENTAMOUNT)";
-                //strSQL += " FROM CONSTRUCTIONLEDGERDETAIL P, CONSTRUCTIONBASEINFO A";
                 strSQL += " FROM CONSTRUCTIONLEDGERDETAIL P LEFT JOIN CONSTRUCTIONLEDGEREXCUTE B";
                 strSQL += " ON B.CONSTRUCTIONCODE = P.CONSTRUCTIONCODE AND B.GROUPCOUNT = P.GROUPCOUNT AND B.LINECOUNT = P.LINECOUNT";
                 strSQL += " , CONSTRUCTIONBASEINFO A";
@@ -1298,60 +1310,6 @@
         }
         #endregion
 
-        #region ƒwƒbƒ_�[‚Ì—˜‰v‚©‚çŒo”ï‚ðˆø‚­
-        /// <summary>
-        /// ƒwƒbƒ_�[‚Ì—˜‰v‚©‚çŒo”ï‚ðˆø‚­
-        /// </summary>
-        private void ReCalcHeader(int Expenses)
-        {
-            try
-            {
-                // �U•ª‹‹—^‹àŠz
-                int OnSalary = CommonMotions.cnvInt(lblCalcValue1.Text);
-
-                // �ƒ—˜‰v‹àŠz
-                int NetIncome = CommonMotions.cnvInt(lblCalcValue2.Text);
-
-                // ‘e—˜‰v‹àŠzŽæ“¾
-                int NonSalary = CommonMotions.cnvInt(lblCalcValue3.Text);
-
-                // ‹‹—^—Ý�Ï•\Ž¦
-                int TotalSalary = CommonMotions.cnvInt(lblPayroll.Text);
-
-
-                // �U•ª‹‹—^‹àŠz•\Ž¦
-                lblCalcValue1.Text = OnSalary.ToString("#,0");
-
-                // ‹‹—^—Ý�Ï•\Ž¦
-                lblPayroll.Text = TotalSalary.ToString("#,0");
-
-                // ‹‹—^�·ŠzŒvŽZ�E•\Ž¦
-                int TotalValue = OnSalary - TotalSalary;
-                lblTotalValue.Text = TotalValue.ToString("#,0");
-                lblTotalValue2.Text = TotalValue.ToString("#,0");
-
-                // �ƒ—˜‰v‹àŠz•\Ž¦
-                lblCalcValue2.Text = NetIncome.ToString("#,0");
-
-                // “–Šú�ƒ—˜‰vŒvŽZ
-                int CalcTotal1 = NetIncome + TotalValue;
-                lblTotalCalcValue1.Text = CalcTotal1.ToString("#,0");
-                lblTotalCalcValue2.Text = CalcTotal1.ToString("#,0");
-
-                // ‘e—˜‰v‹àŠzŽæ“¾
-                lblCalcValue3.Text = NonSalary.ToString("#,0");
-
-                // “–Šú�ƒ—˜‰vŒvŽZ
-                int CalcTotal = NonSalary + CalcTotal1 - Expenses;
-                lblTotalCalcValue.Text = CalcTotal.ToString("#,0");
-            }
-            catch (Exception ex)
-            {
-                logger.ErrorFormat("ƒVƒXƒeƒ€ƒGƒ‰�[�F{0}�F{1}", CommonMotions.GetMethodName(), ex.Message);
-            }
-        }
-        #endregion
-
         #region ˆê——ƒf�[ƒ^•\Ž¦�ˆ—�
         /// <summary>
         /// ˆê——ƒf�[ƒ^•\Ž¦�ˆ—�
@@ -1524,6 +1482,9 @@
                 DateTime dtDefaultEnd = DateTime.MinValue;
                 CreateDefaultStartAndEndDate(ref dtDefaultStart, ref dtDefaultEnd);
 
+                // ‘I‘ðŠú�”‚ª“–Šú‚æ‚è‘å‚«‚¢�ê�‡‚ÍˆÈ‰º‚ð�ˆ—�‚µ‚È‚¢
+                if (numUDConstPro.Value > CommonMotions.SystemMasterData.BusinessPeriod) return;
+
                 // ----- Œo‰ß‹‹—^•\Ž¦�iƒwƒbƒ_�[‚É•\Ž¦�j
                 SetPayrollData(PersonCDArray, dtDefaultStart, dtDefaultEnd,
                                 dtStartArray, dtCompArray,
@@ -1531,7 +1492,7 @@
                                 dtHireStDays, dtHireEdDays);
 
                 // ----- Œo”ï‚ð•\Ž¦‚·‚é
-                int Expenses = SetOtherCost(PersonCDArray, dtStartArray, dtCompArray);
+                int Expenses = SetOtherCost(PersonCDArray, dtStartArray, dtCompArray, dtHireStDays);
 
                 // ProgressBar‚Ì’l‚ð•Ï�X‚·‚é
                 prgber.Value++;
@@ -1545,10 +1506,13 @@
                 prgber.Value++;
                 prgber.Update();
 
-                // Œo”ï�^•â�•�U•ª‚ðŽx•¥Šz‚Ö‘«‚µ‚Ä�A—˜‰v‚æ‚èˆø‚­
+                // Žx•¥‘�Šz
                 TotalArea[(int)DispColumn.TotalPayment] += Expenses;                // Žx•¥‘�Šz+Œo”ï
+
+                // ‘e—˜
                 TotalArea[(int)DispColumn.GrossProfit] -= Expenses;                 // ‘e—˜-Œo”ï
-                TotalArea[(int)DispColumn.GrossProfit] += Auxiliary;                // ‘e—˜+•â�•�lŒ�”ï
+                
+                // �ƒ—˜‰v
                 TotalArea[(int)DispColumn.NetProfit] -= Expenses;                   // �ƒ—˜‰v-Œo”ï
                 TotalArea[(int)DispColumn.NetProfit] += Auxiliary;                  // �ƒ—˜‰v+•â�•�lŒ�”ï
 
@@ -1732,20 +1696,6 @@
         }
         #endregion
 
-        #region ‹‹—^ƒGƒŠƒAƒNƒŠƒA
-        /// <summary>
-        /// ‹‹—^ƒGƒŠƒAƒNƒŠƒA
-        /// </summary>
-        private void ClearSalary()
-        {
-            lblPayroll.Text = "";
-            lblCalcValue1.Text = "";
-            lblTotalValue.Text = "";
-            lblCalcValue3.Text = "";
-            lblCalcValue2.Text = "";
-        }
-        #endregion
-
         #region ’S“–ŽÒ–ˆ‚ÌŽw’èŠú‚Ì�HŽ–ŠJŽn“ú‚ðŽæ“¾‚·‚é
         /// <summary>
         /// ’S“–ŽÒ–ˆ‚ÌŽw’èŠú‚Ì�HŽ–ŠJŽn“ú‚ðŽæ“¾‚·‚é
@@ -1788,115 +1738,50 @@
         }
         #endregion
 
-        #region ‹‹—^ƒf�[ƒ^•\Ž¦”»’è
+        #region ŒvŽZŠJŽn�E�I—¹“ú‚Ìƒ`ƒFƒbƒN“ü‚ê‘Ö‚¦
         /// <summary>
-        /// ‹‹—^ƒf�[ƒ^•\Ž¦”»’è
+        /// ŒvŽZŠJŽn�E�I—¹“ú‚Ìƒ`ƒFƒbƒN“ü‚ê‘Ö‚¦
         /// </summary>
-        /// <returns></returns>
-        private bool SalaryDisplay()
+        private void CalcStartCompDate(DateTime dtDefaultStart, DateTime dtDefaultEnd,
+                                        DateTime HireStartDate, DateTime HireCompDate,
+                                        ref DateTime StartDate, ref DateTime CompDate)
         {
-            IOMPersonInCharge personDB = new IOMPersonInCharge();
             try
             {
-                bool bRet = false;
-
-                // ‚Ü‚¸ƒf�[ƒ^”ñ•\Ž¦
-                pnlPayroll.Visible = false;
-
-                // ƒRƒ“ƒ{ƒ{ƒbƒNƒX‚æ‚è‘I‘ð’S“–ŽÒ‚ðŽæ“¾‚·‚é
-                int PersonCode = GetConstructionPersonCode();
-                if (!cmbConstructionPerson.Visible) PersonCode = CommonMotions.LoginUserData.PersonCode;
-
-                // �VƒZƒLƒ…ƒŠƒeƒBƒf�[ƒ^‘Î‰ž�Ï‚Ý‚©‚ðŠm”F‚·‚é
-                if (CommonMotions.LoginUserData.SecCode == 0)
+                if (StartDate == DateTime.MinValue)
                 {
-                    // ƒZƒLƒ…ƒŠƒeƒBƒŒƒxƒ‹Žæ“¾
-                    int SecLevel1 = CommonDefine.SystemManageDiv[(int)CommonDefine.SysManaDivNo.PresidentAuthority].Key;
-                    int SecLevel2 = CommonDefine.SystemManageDiv[(int)CommonDefine.SysManaDivNo.SupervisorAuthority].Key;
-                    int SecLevel3 = CommonDefine.SystemManageDiv[(int)CommonDefine.SysManaDivNo.SuperiorAuthority].Key;
-                    // ƒVƒXƒeƒ€Œ ŒÀ‚É‚æ‚Á‚Äƒf�[ƒ^ƒAƒNƒZƒX‚É�§ŒÀ‚ª‚ ‚é
-                    if (CommonMotions.LoginUserData.SecurityManagement == CommonDefine.AdminSecurityManagement)
-                    {
-                        // ƒVƒXƒeƒ€ŠÇ—�ŽÒ�i‚·‚×‚Ä‘Î�Û�j
-                        bRet = true;
-                    }
-                    else if (CommonMotions.LoginUserData.SecurityManagement == SecLevel1)
-                    {
-                        // �Å�‚‹@–§ŠÇ—�ŽÒ�i‚·‚×‚Ä‘Î�Û�j
-                        bRet = true;
-                    }
-                    else if (CommonMotions.LoginUserData.SecurityManagement == SecLevel2)
-                    {
-                        // “�Š‡‹@–§ŠÇ—�ŽÒ�i‹@”\�§ŒÀ�j
-                        bRet = true;
-                    }
-                    else if (CommonMotions.LoginUserData.SecurityManagement == SecLevel3)
-                    {
-                        // �Š‘®’·
-                        bRet = true;
-                    }
-                    else
-                    {
-                        // ˆê”Êƒ†�[ƒU�[‚ÍŽ©•ª‚Ì‹‹—^‚ªŒ©‚¦‚é
-                        if (CommonMotions.LoginUserData.PersonCode == PersonCode)
-                            bRet = true;
-                        else
-                            bRet = false;
-                    }
+                    StartDate = dtDefaultStart;
                 }
-                else
+                else if (dtDefaultStart <= HireStartDate && HireStartDate <= dtDefaultEnd)
                 {
-                    int SRank = (int)CommonDefine.SecurityRankPos.SpecialAuthority;
-                    int FRank = (int)CommonDefine.SecurityRankPos.FreeAuthority;
-                    int LRank = (int)CommonDefine.SecurityRankPos.LimitedAuthority;
-
-                    // ƒVƒXƒeƒ€Œ ŒÀ‚É‚æ‚Á‚Äƒf�[ƒ^ƒAƒNƒZƒX‚É�§ŒÀ‚ª‚ ‚é
-                    if (CommonMotions.LoginUserData.PersonCode == CommonDefine.AdminCode)
-                    {
-                        // ƒVƒXƒeƒ€ŠÇ—�ŽÒ�i‚·‚×‚Ä‘Î�Û�j
-                        bRet = true;
-                    }
-                    else if (CommonMotions.LoginUserSecurity.SecRank == CommonDefine.SecurityRankList[SRank].Key)
-                    {
-                        // Œo‰cŽÒ�i‚·‚×‚Ä‘Î�Û�j
-                        bRet = true;
-                    }
-                    else if (CommonMotions.LoginUserSecurity.SecRank == CommonDefine.SecurityRankList[FRank].Key)
-                    {
-                        // “�Š‡ŠÇ—�ŽÒ�i‹@”\�§ŒÀ�j
-                        bRet = true;
-                    }
-                    else if (CommonMotions.LoginUserSecurity.SecRank == CommonDefine.SecurityRankList[LRank].Key)
-                    {
-                        // �Š‘®’·
-                        bRet = true;
-                    }
-                    else
-                    {
-                        // ˆê”Êƒ†�[ƒU�[‚ÍŽ©•ª‚Ì‹‹—^‚ªŒ©‚¦‚é
-                        if (CommonMotions.LoginUserData.PersonCode == PersonCode)
-                            bRet = true;
-                        else
-                            bRet = false;
-                    }
+                    StartDate = HireStartDate;
                 }
-                // ƒf�[ƒ^•\Ž¦
-                pnlPayroll.Visible = bRet;
+                else if (dtDefaultStart < StartDate)
+                {
+                    StartDate = dtDefaultStart;
+                }
 
-                // —ÌˆæƒNƒŠƒA
-                ClearSalary();
+                // �Å‘å“ú‚ª�¡“ú‚æ‚è�¬‚³‚¢�ê�‡ˆÈŠO‚Í�ˆ—�‚µ‚È‚¢
+                if (CompDate.Date > DateTime.Today.Date) return;
 
-                return bRet;
+                if (numUDConstPro.Value < CommonMotions.SystemMasterData.BusinessPeriod)
+                {   // ‘OŠúˆÈ‘O‚ÍŠú––
+                    CompDate = dtDefaultEnd;
+                }
+                else if (HireCompDate != DateTime.MinValue
+                        && (dtDefaultStart < HireCompDate && HireCompDate < dtDefaultEnd))
+                {   // ‘ÞŽÐ“ú‚ªŠú“à‚È‚ç‚Î�I—¹‚ð‘ÞŽÐ“ú‚É‚·‚é
+                    CompDate = HireCompDate;
+                }
+                else
+                {   // ˆÈŠO‚Í�¡“ú
+                    CompDate = DateTime.Today.Date;
+                }
             }
             catch (Exception ex)
             {
-                logger.ErrorFormat("ƒVƒXƒeƒ€ƒGƒ‰�[�F{0}�F{1}", CommonMotions.GetMethodName(), ex.Message);
-                return false;
+                logger.ErrorFormat("ƒVƒXƒeƒ€ƒGƒ‰�[�F{0}", ex.Message);
             }
-            finally
-            {
-                personDB.close(); personDB = null;
-            }
         }
         #endregion
 
@@ -1919,81 +1804,41 @@
                 // •”��ƒR�[ƒhŽæ“¾
                 int DepartmentCode = GetDepartmentCode();
 
-                // “–ŠúŠúŽñ“ú�EŠú––“ú‚ðŽæ“¾
-                DateTime dtCurDefaultStart = dtDefaultStart;
-                DateTime dtCurDefaultEnd = dtDefaultEnd;
-
                 int TotalSalary = 0;        // ‹‹—^—Ý�ÏŽæ“¾
                 int OnSalary = 0;           // �U•ª‹‹—^‹àŠzŽæ“¾
                 int NetIncome = 0;          // �ƒ—˜‰v‹àŠzŽæ“¾
                 int NonSalary = 0;          // ‘e—˜‰v‹àŠzŽæ“¾
 
-                DateTime dtStart = DateTime.MinValue;
-                DateTime dtEnd = DateTime.MinValue;
-                DateTime dtMax = DateTime.MaxValue;
-                DateTime dtDispStart = DateTime.MaxValue;
-                DateTime dtDispComplate = DateTime.MinValue;
+                DateTime stDate = DateTime.Today;
+                DateTime edDate = DateTime.Today;
+
+                DateTime dtCurDefaultStart = dtDefaultStart;
+                DateTime dtCurDefaultEnd = DateTime.Today;
                 // ‹‹—^‚ð�WŒv‚·‚é
                 for (int i = 0; i < PersonCDArray.Count; i++)
                 {
-                    // “–ŠúŠúŽñ“ú�EŠú––“ú‚ðŽæ“¾
-                    dtCurDefaultStart = dtDefaultStart;
-                    dtCurDefaultEnd = dtDefaultEnd;
+                    // ŠJŽn�E�I—¹“ú‚ª–³‚¢�ê�‡‚ÍƒfƒtƒHƒ‹ƒg‚ÌŠúŽñ�EŠú––‚ðŽg—p‚·‚é
+                    stDate = dtStartArray[i];
+                    edDate = dtMaxCompArray[i];
+                    CalcStartCompDate(dtDefaultStart, dtDefaultEnd, dtHireStDayArray[i], dtHireEdDayArray[i], ref stDate, ref edDate);
 
-                    // “üŽÐ“ú‚ªŠú“à‚È‚ç‚ÎŠJŽn‚ð“üŽÐ“ú‚É‚·‚é
-                    if (dtDefaultStart < dtHireStDayArray[i] && dtHireStDayArray[i] < dtDefaultEnd)
-                    {
-                        dtCurDefaultStart = dtHireStDayArray[i];
-                    }
-                    // ‘ÞŽÐ“ú‚ªŠú“à‚È‚ç‚Î�I—¹‚ð‘ÞŽÐ“ú‚É‚·‚é
-                    if (dtDefaultStart < dtHireEdDayArray[i] && dtHireEdDayArray[i] < dtDefaultEnd)
-                    {
-                        dtCurDefaultEnd = dtHireEdDayArray[i];
-                    }
-
-                    // ŠJŽn“úŽæ“¾
-                    dtStart = dtStartArray[i];
-                    // ƒf�[ƒ^‚ª–³‚¢�ê�‡‚ÍŠúŽñ“ú‚ðƒZƒbƒg‚·‚é
-                    if (dtStart == DateTime.MaxValue)
-                    {
-                        dtStart = dtCurDefaultStart;
-                    }
-                    else if (dtCurDefaultStart < dtStart)
-                    {   // ŠJŽn“ú‚ªŠúŽñ‚æ‚èŒã‚È‚ç‚ÎŠúŽñ“ú‚ðƒZƒbƒg‚·‚é
-                        dtStart = dtCurDefaultStart;
-                    }
-
-                    // �Å‘å“úŽæ“¾
-                    dtMax = dtMaxCompArray[i];
-                    if (dtMax == DateTime.MinValue) dtMax = dtCurDefaultEnd;
-                    // �Å‘å“ú‚ª�¡“ú‚æ‚è�¬‚³‚¢�ê�‡
-                    if (dtMax < DateTime.Today.Date)
-                    {
-                        if (numUDConstPro.Value < CommonMotions.SystemMasterData.BusinessPeriod)
-                        {   // ‘OŠúˆÈ‘O‚ÍŠú––
-                            dtMax = dtCurDefaultEnd;
-                        }
-                        else if (dtHireEdDayArray[i] != DateTime.MinValue && dtDefaultStart < dtHireEdDayArray[i] && dtHireEdDayArray[i] < dtDefaultEnd)
-                        {   // ‘ÞŽÐ“ú‚ªŠú“à‚È‚ç‚Î�I—¹‚ð‘ÞŽÐ“ú‚É‚·‚é
-                            dtMax = dtCurDefaultEnd;
-                        }
-                        else
-                        {   // ˆÈŠO‚Í�¡“ú
-                            dtMax = DateTime.Today.Date;
-                        }
-                    }
-
                     // ‹‹—^—Ý�ÏŽæ“¾
-                    int workSalary = CalcElapsedSalary(dtStart, dtMax, PersonCDArray[i], SalaryArray[i]);
+                    int workSalary = CalcElapsedSalary(stDate, edDate, PersonCDArray[i], SalaryArray[i]);
                     // —ÝŒv‰ÁŽZ
-                    if (workSalary > 0) TotalSalary += workSalary;
-                    //Debug.WriteLine(string.Format("Code={0} Val={1} Start={2} End={3}", PersonCDArray[i], workSalary.ToString("0,0"), dtStart, dtMax));
+                    TotalSalary += workSalary;
 
-                    // ŒvŽZŠJŽn�I—¹“ú‚ðŽæ“¾‚·‚é
-                    if (dtStart < dtDispStart) dtDispStart = dtStart;
-                    if (dtDispComplate < dtMax) dtDispComplate = dtMax;
+                    if (stDate < dtCurDefaultStart) dtCurDefaultStart = stDate;
+                    if (dtCurDefaultEnd < edDate) dtCurDefaultEnd = edDate;
                 }
+                if (PersonCDArray.Count == 1)
+                {
+                    if (dtHireStDayArray[0] != DateTime.MinValue)
+                        if (dtDefaultStart < dtHireStDayArray[0]) dtCurDefaultStart = dtHireStDayArray[0];
 
+                    if (dtHireEdDayArray[0] != DateTime.MinValue)
+                        if (dtHireEdDayArray[0] < dtDefaultEnd) dtCurDefaultEnd = dtHireEdDayArray[0];
+                }
+
                 // ----- •\Ž¦�ˆ—�
                 // �U•ª‹‹—^‹àŠz�E�ƒ—˜‰v‹àŠz�E‘e—˜‰v‹àŠzŽæ“¾
                 ProfitGeneral(ref OnSalary, ref  NetIncome, ref  NonSalary);
@@ -2007,26 +1852,30 @@
                 // ‹‹—^�·ŠzŒvŽZ�E•\Ž¦
                 int TotalValue = OnSalary - TotalSalary;
                 lblTotalValue.Text = TotalValue.ToString("#,0");
-                lblTotalValue2.Text = TotalValue.ToString("#,0");
+                lblCalcValue3.Text = TotalValue.ToString("#,0");
 
-                // �ƒ—˜‰v‹àŠz•\Ž¦
-                lblCalcValue2.Text = NetIncome.ToString("#,0");
-                
-                // “–Šú�ƒ—˜‰vŒvŽZ
-                int CalcTotal1 = NetIncome + TotalValue;
+                // �U•ª‹àŠz‚ðŽæ“¾‚·‚é
+                int[] CostValue = new int[2];
+                GetPersonAuxiliaryCostValue(ref CostValue);
+
+                // •›’S“–ŽÒŽû‰v‹àŠz•\Ž¦
+                lblCalcValue2.Text = CostValue[0].ToString("#,0");
+
+                // Žw“±ˆõŽû‰v‹àŠz•\Ž¦
+                lblTotalValue2.Text = CostValue[1].ToString("#,0");
+
+                // ’S“–ŠOŽû‰vŒvŽZ
+                int CalcTotal1 = CostValue[0] + CostValue[1];
                 lblTotalCalcValue1.Text = CalcTotal1.ToString("#,0");
                 lblTotalCalcValue2.Text = CalcTotal1.ToString("#,0");
 
-                // ‘e—˜‰v‹àŠzŽæ“¾
-                lblCalcValue3.Text = NonSalary.ToString("#,0");
-
-                // “–Šú�ƒ—˜‰vŒvŽZ
-                int CalcTotal = NonSalary + CalcTotal1;
+                // �lŒ�”ïŒv
+                int CalcTotal = TotalValue + CalcTotal1;
                 lblTotalCalcValue.Text = CalcTotal.ToString("#,0");
 
                 // ‹‹—^ŒvŽZŠJŽn“ú�E�I—¹“ú
-                lblStartDate.Text = dtDispStart.ToShortDateString();
-                lblEndDate.Text = dtDispComplate.ToShortDateString();
+                lblStartDate.Text = dtCurDefaultStart.ToShortDateString();
+                lblEndDate.Text = dtCurDefaultEnd.ToShortDateString();
             }
             catch (Exception ex)
             {
@@ -2047,23 +1896,9 @@
             IOMPersonSalary SalDB = new IOMPersonSalary();
             try
             {
-                //// ‰Ò“­“ú�”‚ðŽæ“¾‚·‚é
-                //int WorkingDay = ClsCalendar.CalcPassedDaysCount(dtStart, dtLast);
-
-                //// ‹‹—^Žæ“¾
-                //int MonthlyPay = CommonMotions.cnvRound(Salary * CommonDefine.s_SalaryCorrection);
-
-                //// “ú“–ŒvŽZ
-                //double daylySalary = CommonMotions.cnvRound(MonthlyPay / CommonDefine.s_ManHourUnitMonth);
-
-                //// Œo‰ß‹‹—^ŒvŽZ
-                //int RetSalary = CommonMotions.cnvRound(WorkingDay * daylySalary);
-
-                //string strSQL = "SELECT * FROM";
                 string strSQL = "SELECT SUM(SALARY) FROM";
 
                 strSQL += " (SELECT AX.DT,";
-                //strSQL += string.Format(" ROUND((A.MONTHLYSALARY * {0})/ {1}),", CommonDefine.s_SalaryCorrection, CommonDefine.s_ManHourUnitMonth);
                 strSQL += string.Format(" ROUND((A.MONTHLYSALARY * {0})/ {1}) SALARY,", CommonDefine.s_SalaryCorrection, CommonDefine.s_ManHourUnitMonth);
                 
                 strSQL += " row_number() OVER(PARTITION BY AX.DT ORDER BY A.STARTDATE DESC) row_num";
@@ -2363,21 +2198,34 @@
                 cmbConstructionPerson.Items.Clear();
                 cmbConstructionPerson.Text = "";
 
+                int DepartmentCode = GetDepartmentCode();
                 string strSQL = string.Empty;
-                int DepartmentCode = GetDepartmentCode();
+                // ŒŸ�õ�ðŒ�
+                strSQL = string.Format(" WHERE LEDGERFLG = {0}", (int)CommonDefine.PersonLedgerDivNo.CalcTarget);
+                strSQL += " AND (DEPARTMENTCODE";
+                string strSubSQL = string.Empty;
                 if (DepartmentCode == 0)
                 {
-                    strSQL = " WHERE DeleteFlg = 0";
-                    strSQL += string.Format(" AND EmployeeClassFlg = {0}",(int)CommonDefine.EmployeeClassFlg.Regular);
                     // ŽQ�Æ•”��ƒ}ƒXƒ^‚æ‚èŽæ“¾‚·‚é
-                    strSQL += " AND DEPARTMENTCODE IN (SELECT AA.DEPARTMENTCODE FROM PERSONDEPARTMENTMASTER AA";
-                    strSQL += string.Format(" WHERE AA.PERSONCODE = {0})", CommonMotions.LoginUserData.PersonCode);
-                    strSQL += " Order By EmployeeClassFlg ASC, DisplayOrder ASC";
+                    strSubSQL += string.Format(" IN (SELECT AA.DEPARTMENTCODE FROM PERSONDEPARTMENTMASTER AA WHERE AA.PERSONCODE = {0})"
+                                            , CommonMotions.LoginUserData.PersonCode);
                 }
                 else
                 {
-                    strSQL = string.Format(" WHERE DEPARTMENTCODE = {0} AND DeleteFlg = 0 Order By EmployeeClassFlg ASC, DisplayOrder ASC", DepartmentCode);
+                    strSubSQL += string.Format(" = {0}", DepartmentCode);
                 }
+                strSQL += strSubSQL + ")";
+
+                // “–ŠúŠúŽñ“ú�EŠú––“ú‚ðŽæ“¾
+                DateTime dtDefaultStart = DateTime.MinValue;
+                DateTime dtDefaultEnd = DateTime.MinValue;
+                CreateDefaultStartAndEndDate(ref dtDefaultStart, ref dtDefaultEnd);
+
+                strSQL += string.Format(" AND (STARTDATE <= TO_DATE('{0}','YYYY/MM/DD')", dtDefaultEnd.ToShortDateString());
+                strSQL += string.Format(" AND (TO_DATE('{0}','YYYY/MM/DD') <= ENDDATE", dtDefaultStart.ToShortDateString());
+                strSQL += string.Format(" OR TO_DATE('{0}','YYYY/MM/DD') = ENDDATE))", DateTime.MinValue.ToShortDateString());
+                
+                strSQL += " Order By DeleteFlg ASC, EmployeeClassFlg ASC, DisplayOrder ASC";
                 // ’S“–ŽÒƒ}ƒXƒ^“Ç�ž
                 if (!picDB.SelectAction(strSQL, ref workList)) return;
 
@@ -2524,6 +2372,31 @@
         }
         #endregion
 
+        #region ‘Î�Û”N“x�‰ŠúƒZƒbƒg
+        /// <summary>
+        /// ‘Î�Û”N“x�‰ŠúƒZƒbƒg
+        /// </summary>
+        private void SetInitnumUDConstPro()
+        {
+            try
+            {
+                // ŒŸ�õ”N“xƒZƒbƒg
+                // ƒf�[ƒ^‚É‚ ‚éŽ–‹ÆŠú‚ÆŒ»�Ý‚ÌŽ–‹ÆƒZƒbƒg
+                int minval = 0;
+                int maxval = 0;
+                CommonMotions.GetPeriodYear(ref minval, ref maxval);
+                numUDConstPro.Minimum = minval;
+                numUDConstPro.Maximum = maxval;
+                numUDConstPro.Value = CommonMotions.SystemMasterData.BusinessPeriod;
+
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("ƒVƒXƒeƒ€ƒGƒ‰�[�F{0}�F{1}", CommonMotions.GetMethodName(), ex.Message);
+            }
+        }
+        #endregion
+
         #region �‰ŠúŽž‚Éƒ�ƒOƒCƒ“’S“–ŽÒ‚ðƒZƒbƒg‚·‚é
         /// <summary>
         /// �‰ŠúŽž‚Éƒ�ƒOƒCƒ“’S“–ŽÒ‚ðƒZƒbƒg‚·‚é
@@ -2568,7 +2441,7 @@
                     else
                     {
                         // ‘I‘ð•”��‚ª•¡�”‚ÌŽÒ‚ÍƒZƒbƒg‚µ‚È‚¢
-                        if (cmbDepartment.Items.Count > 1) return;
+                        if (cmbDepartment.Items.Count > 2) return;
                         cmbDepartment.SelectedValue = CommonMotions.LoginUserData.DepartmentCode;
                         SetcmbPersons();
                         cmbConstructionPerson.SelectedValue = CommonMotions.LoginUserData.PersonCode;
Index: trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionSplit/FrmConstructionSplit.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionSplit/FrmConstructionSplit.cs	(revision 141)
+++ trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionSplit/FrmConstructionSplit.cs	(revision 142)
@@ -202,6 +202,15 @@
         private void numUDConstPro_ValueChanged(object sender, EventArgs e)
         {
             if (m_bInitFlag) return;
+
+            // ã‚³ãƒ³ãƒœãƒœãƒƒã‚¯ã‚¹ã‚»ãƒƒãƒˆ
+            int DepCode = CommonMotions.cnvInt(cmbDepartment.SelectedValue);
+            int PerCode = CommonMotions.cnvInt(cmbConstructionPerson.SelectedValue);
+            SetcmbDepartment();
+            SetcmbPersons();
+            cmbDepartment.SelectedValue = DepCode;
+            cmbConstructionPerson.SelectedValue = PerCode;
+
             // ãƒ‡ãƒ¼ã‚¿è¡¨ç¤º
             InitDataLoad();
         }
Index: trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionSplit/FrmConstructionSplitAuxiliary.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionSplit/FrmConstructionSplitAuxiliary.cs	(revision 141)
+++ trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionSplit/FrmConstructionSplitAuxiliary.cs	(revision 142)
@@ -345,8 +345,6 @@
         {
             IOMPersonInCharge picDB = new IOMPersonInCharge();
             List<PersonInChargeMaster> workList = new List<PersonInChargeMaster>();
-            bool bSave = m_bInitFlag;
-            m_bInitFlag = true;
             try
             {
                 cmbConstructionPerson.DataSource = null;
@@ -353,13 +351,34 @@
                 cmbConstructionPerson.Items.Clear();
                 cmbConstructionPerson.Text = "";
 
+                int DepartmentCode = GetDepartmentCode();
                 string strSQL = string.Empty;
-                int DepartmentCode = GetDepartmentCode();
+                // æ¤œç´¢æ�¡ä»¶
+                strSQL = string.Format(" WHERE LEDGERFLG = {0}", (int)CommonDefine.PersonLedgerDivNo.CalcTarget);
+                strSQL += " AND (DEPARTMENTCODE";
+                string strSubSQL = string.Empty;
                 if (DepartmentCode == 0)
-                    strSQL = " WHERE DELETEFLG = 0 ORDER BY EMPLOYEECLASSFLG ASC, DISPLAYORDER ASC";
+                {
+                    // å�‚ç…§éƒ¨ç½²ãƒžã‚¹ã‚¿ã‚ˆã‚Šå�–å¾—ã�™ã‚‹
+                    strSubSQL += string.Format(" IN (SELECT AA.DEPARTMENTCODE FROM PERSONDEPARTMENTMASTER AA WHERE AA.PERSONCODE = {0})"
+                                            , CommonMotions.LoginUserData.PersonCode);
+                }
                 else
-                    strSQL = string.Format(" WHERE DEPARTMENTCODE = {0} AND DELETEFLG = 0 ORDER BY EMPLOYEECLASSFLG ASC, DISPLAYORDER ASC", DepartmentCode);
+                {
+                    strSubSQL += string.Format(" = {0}", DepartmentCode);
+                }
+                strSQL += strSubSQL + ")";
 
+                // å½“æœŸæœŸé¦–æ—¥ãƒ»æœŸæœ«æ—¥ã‚’å�–å¾—
+                DateTime dtDefaultStart = DateTime.MinValue;
+                DateTime dtDefaultEnd = DateTime.MinValue;
+                CreateDefaultStartAndEndDate(ref dtDefaultStart, ref dtDefaultEnd);
+
+                strSQL += string.Format(" AND (STARTDATE <= TO_DATE('{0}','YYYY/MM/DD')", dtDefaultEnd.ToShortDateString());
+                strSQL += string.Format(" AND (TO_DATE('{0}','YYYY/MM/DD') <= ENDDATE", dtDefaultStart.ToShortDateString());
+                strSQL += string.Format(" OR TO_DATE('{0}','YYYY/MM/DD') = ENDDATE))", DateTime.MinValue.ToShortDateString());
+
+                strSQL += " Order By DeleteFlg ASC, EmployeeClassFlg ASC, DisplayOrder ASC";
                 // æ‹…å½“è€…ãƒžã‚¹ã‚¿èª­è¾¼
                 if (!picDB.SelectAction(strSQL, ref workList)) return;
 
@@ -395,11 +414,41 @@
             finally
             {
                 picDB.close(); picDB = null;
-                m_bInitFlag = bSave;
             }
         }
         #endregion
 
+        #region ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã�®æœŸé¦–æ—¥ãƒ»æœŸæœ«æ—¥ã‚’æ±‚ã‚�ã‚‹
+        /// <summary>
+        /// ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã�®æœŸé¦–æ—¥ãƒ»æœŸæœ«æ—¥ã‚’æ±‚ã‚�ã‚‹
+        /// </summary>
+        /// <param name="dtStart"></param>
+        /// <param name="dtEnd"></param>
+        private void CreateDefaultStartAndEndDate(ref DateTime dtStart, ref DateTime dtEnd)
+        {
+            try
+            {
+                // å½“æœŸæœŸé¦–å¹´æœˆæ—¥ã‚’å�–å¾—
+                int iYear = 0;
+                int month = 0;
+                int day = 0;
+                bool bPeriod = true;
+                if (CommonMotions.SystemMasterData.ConstructionNoBase == (int)CommonDefine.SystemConstructionNoBase.BusinessPeriod)
+                {   // å–¶æ¥­æœŸ
+                    iYear = CommonMotions.PeriodCountToYear(CommonMotions.cnvInt(numUDConstPro.Value));
+                    bPeriod = true;
+                }
+                CommonMotions.GetBeginningMonthDay(bPeriod, ref month, ref day);
+                dtStart = new DateTime(iYear, month, day);
+                dtEnd = dtStart.AddYears(1).AddDays(-1);     // çµ‚äº†ã�¯ï¼‹1å¹´ï¼�1æ—¥
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("ã‚·ã‚¹ãƒ†ãƒ ã‚¨ãƒ©ãƒ¼ï¼š{0}ï¼š{1}", CommonMotions.GetMethodName(), ex.Message);
+            }
+        }
+        #endregion
+
         #region æ‹…å½“è€…ã‚³ãƒ³ãƒœãƒœãƒƒã‚¯ã‚¹ã‚»ãƒƒãƒˆæ™‚éƒ¨ç½²ã‚’ã‚»ãƒƒãƒˆã�™ã‚‹
         /// <summary>
         /// æ‹…å½“è€…ã‚³ãƒ³ãƒœãƒœãƒƒã‚¯ã‚¹ã‚»ãƒƒãƒˆæ™‚éƒ¨ç½²ã‚’ã‚»ãƒƒãƒˆã�™ã‚‹
@@ -498,6 +547,7 @@
 
                 int depCode = GetDepartmentCode();
                 int personCode = GetConstructionPersonCode();
+                if (personCode == 0 || depCode == 0) return;
 
                 string strSQL = string.Empty;
                 int StatusCode = CommonDefine.ProjectsStatus.First(x => x.Value.Equals("é�ž å�— æ³¨")).Key;
@@ -512,10 +562,9 @@
                 strSQL += ", D.ORDERERSNAME2";
                 strSQL += ", A.CONSTRUCTIONSTATUSFLG";
                 strSQL += " FROM CONSTRUCTIONBASEINFO A, CONSTRUCTIONBASEINFODETAIL B, PERSONINCHARGEMASTER C, ORDERERSMASTER D";
-                strSQL += string.Format(" WHERE NOT EXISTS (SELECT * FROM PROCESSAPPROVAL APP WHERE APP.APPROVALCODE > {0} AND APP.APPROVALSTATUS = {1})",
-                                        (int)ClsExcute.ApprovalListNo.EstimateApproval,
-                                        //(int)ClsExcute.ApprovalListNo.PurchaseOrderEntryApproval,
-                                        (int)CommonDefine.ApprovalStatus.Approval);
+                strSQL += string.Format(" WHERE NOT EXISTS (SELECT * FROM PROCESSAPPROVAL APP WHERE APP.APPROVALCODE > {0}",(int)ClsExcute.ApprovalListNo.EstimateApproval);
+                strSQL += string.Format(" AND APP.APPROVALSTATUS = {0}", (int)CommonDefine.ApprovalStatus.Approval);
+                strSQL += " AND APP.CONSTRUCTIONCODE = A.CONSTRUCTIONCODE)";
                 strSQL += string.Format(" AND A.CONSTRUCTIONSTATUSFLG <> {0}", StatusCode);
                 strSQL += string.Format(" AND (A.CONSTRUCTIONPERIOD = {0})", numUDConstPro.Value);
                 strSQL += string.Format(" AND (A.CONSTRUCTIONCODE = B.CONSTRUCTIONCODE AND B.DETAILNO = {0})", (int)ConstructionBaseInfoDetail.DetailDataNo.ConstructionName);
@@ -634,6 +683,8 @@
                 DataGridViewRow CurRow = dgvMaster.CurrentRow;
                 if (CurRow.Cells[(int)MasterGridColumn.ConstructionName].Value == null) return;
 
+                // å‹•ä½œã‚¿ã‚¤ãƒ—
+                frm.ExcuteFlg = (int)FrmJoinSelect.ExcuteType.Split;
                 // å·¥äº‹ç•ªå�·å�–å¾—
                 string strConstrCode = CommonMotions.cnvString(dgvMaster.CurrentRow.Cells[(int)MasterGridColumn.ConstructionCode].Value).Replace("-", "");
                 m_SelectionCode = CommonMotions.cnvInt(strConstrCode);
Index: trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/CopyTargetList/FrmCopyTargetList.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/CopyTargetList/FrmCopyTargetList.cs	(revision 141)
+++ trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/CopyTargetList/FrmCopyTargetList.cs	(revision 142)
@@ -195,6 +195,7 @@
         /// <param name="e"></param>
         private void FrmConstructionBaseInfoList_Load(object sender, EventArgs e)
         {
+            SetInitnumUDConstPro();
             // ƒRƒ“ƒ{ƒ{ƒbƒNƒXƒZƒbƒg
             SetcmbDepartment();
             SetcmbPersons();
@@ -267,7 +268,15 @@
         private void numUDConstPro_ValueChanged(object sender, EventArgs e)
         {
             if (m_initDataLoad) return;
-            
+
+            // ƒRƒ“ƒ{ƒ{ƒbƒNƒXƒZƒbƒg
+            int DepCode = CommonMotions.cnvInt(cmbDepartment.SelectedValue);
+            int PerCode = CommonMotions.cnvInt(cmbConstructionPerson.SelectedValue);
+            SetcmbDepartment();
+            SetcmbPersons();
+            cmbDepartment.SelectedValue = DepCode;
+            cmbConstructionPerson.SelectedValue = PerCode;
+
             // ƒf�[ƒ^•\Ž¦
             DataDisplay();
         }
Index: trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/CopyTargetList/FrmCopyTargetListAuxiliary.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/CopyTargetList/FrmCopyTargetListAuxiliary.cs	(revision 141)
+++ trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/CopyTargetList/FrmCopyTargetListAuxiliary.cs	(revision 142)
@@ -391,6 +391,31 @@
         }
         #endregion
 
+        #region ‘Î�Û”N“x�‰ŠúƒZƒbƒg
+        /// <summary>
+        /// ‘Î�Û”N“x�‰ŠúƒZƒbƒg
+        /// </summary>
+        private void SetInitnumUDConstPro()
+        {
+            try
+            {
+                // ŒŸ�õ”N“xƒZƒbƒg
+                // ƒf�[ƒ^‚É‚ ‚éŽ–‹ÆŠú‚ÆŒ»�Ý‚ÌŽ–‹ÆƒZƒbƒg
+                int minval = 0;
+                int maxval = 0;
+                CommonMotions.GetPeriodYear(ref minval, ref maxval);
+                numUDConstPro.Minimum = minval;
+                numUDConstPro.Maximum = maxval;
+                numUDConstPro.Value = CommonMotions.SystemMasterData.BusinessPeriod;
+
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("ƒVƒXƒeƒ€ƒGƒ‰�[�F{0}�F{1}", CommonMotions.GetMethodName(), ex.Message);
+            }
+        }
+        #endregion
+
         #region �‰ŠúŽžƒf�[ƒ^Žæ“¾
         /// <summary>
         /// �‰ŠúŽžƒf�[ƒ^Žæ“¾
@@ -810,13 +835,34 @@
                 cmbConstructionPerson.Items.Clear();
                 cmbConstructionPerson.Text = "";
 
+                int DepartmentCode = GetDepartmentCode();
                 string strSQL = string.Empty;
-                int DepartmentCode = GetDepartmentCode();
+                // ŒŸ�õ�ðŒ�
+                strSQL = string.Format(" WHERE LEDGERFLG = {0}", (int)CommonDefine.PersonLedgerDivNo.CalcTarget);
+                strSQL += " AND (DEPARTMENTCODE";
+                string strSubSQL = string.Empty;
                 if (DepartmentCode == 0)
-                    strSQL = " WHERE DeleteFlg = 0 Order By EmployeeClassFlg ASC, DisplayOrder ASC";
+                {
+                    // ŽQ�Æ•”��ƒ}ƒXƒ^‚æ‚èŽæ“¾‚·‚é
+                    strSubSQL += string.Format(" IN (SELECT AA.DEPARTMENTCODE FROM PERSONDEPARTMENTMASTER AA WHERE AA.PERSONCODE = {0})"
+                                            , CommonMotions.LoginUserData.PersonCode);
+                }
                 else
-                    strSQL = string.Format(" WHERE DEPARTMENTCODE = {0} AND DeleteFlg = 0 Order By EmployeeClassFlg ASC, DisplayOrder ASC", DepartmentCode);
+                {
+                    strSubSQL += string.Format(" = {0}", DepartmentCode);
+                }
+                strSQL += strSubSQL + ")";
 
+                // “–ŠúŠúŽñ“ú�EŠú––“ú‚ðŽæ“¾
+                DateTime dtDefaultStart = DateTime.MinValue;
+                DateTime dtDefaultEnd = DateTime.MinValue;
+                CreateDefaultStartAndEndDate(ref dtDefaultStart, ref dtDefaultEnd);
+
+                strSQL += string.Format(" AND (STARTDATE <= TO_DATE('{0}','YYYY/MM/DD')", dtDefaultEnd.ToShortDateString());
+                strSQL += string.Format(" AND (TO_DATE('{0}','YYYY/MM/DD') <= ENDDATE", dtDefaultStart.ToShortDateString());
+                strSQL += string.Format(" OR TO_DATE('{0}','YYYY/MM/DD') = ENDDATE))", DateTime.MinValue.ToShortDateString());
+
+                strSQL += " Order By DeleteFlg ASC, EmployeeClassFlg ASC, DisplayOrder ASC";
                 // ’S“–ŽÒƒ}ƒXƒ^“Ç�ž
                 if (!picDB.SelectAction(strSQL, ref workList)) return false;
 
@@ -859,6 +905,37 @@
         }
         #endregion
 
+        #region ƒfƒtƒHƒ‹ƒg‚ÌŠúŽñ“ú�EŠú––“ú‚ð‹�‚ß‚é
+        /// <summary>
+        /// ƒfƒtƒHƒ‹ƒg‚ÌŠúŽñ“ú�EŠú––“ú‚ð‹�‚ß‚é
+        /// </summary>
+        /// <param name="dtStart"></param>
+        /// <param name="dtEnd"></param>
+        private void CreateDefaultStartAndEndDate(ref DateTime dtStart, ref DateTime dtEnd)
+        {
+            try
+            {
+                // “–ŠúŠúŽñ”NŒŽ“ú‚ðŽæ“¾
+                int iYear = 0;
+                int month = 0;
+                int day = 0;
+                bool bPeriod = true;
+                if (CommonMotions.SystemMasterData.ConstructionNoBase == (int)CommonDefine.SystemConstructionNoBase.BusinessPeriod)
+                {   // ‰c‹ÆŠú
+                    iYear = CommonMotions.PeriodCountToYear(CommonMotions.cnvInt(numUDConstPro.Value));
+                    bPeriod = true;
+                }
+                CommonMotions.GetBeginningMonthDay(bPeriod, ref month, ref day);
+                dtStart = new DateTime(iYear, month, day);
+                dtEnd = dtStart.AddYears(1).AddDays(-1);     // �I—¹‚Í�{1”N�|1“ú
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("ƒVƒXƒeƒ€ƒGƒ‰�[�F{0}�F{1}", CommonMotions.GetMethodName(), ex.Message);
+            }
+        }
+        #endregion
+
         #region ’S“–ŽÒƒRƒ“ƒ{ƒ{ƒbƒNƒXƒZƒbƒgŽž•”��‚ðƒZƒbƒg‚·‚é
         /// <summary>
         /// ’S“–ŽÒƒRƒ“ƒ{ƒ{ƒbƒNƒXƒZƒbƒgŽž•”��‚ðƒZƒbƒg‚·‚é
Index: trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/CostomerRegist/FrmCostomerRegistList.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/CostomerRegist/FrmCostomerRegistList.cs	(revision 141)
+++ trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/CostomerRegist/FrmCostomerRegistList.cs	(revision 142)
@@ -273,6 +273,15 @@
         private void numUDConstPro_ValueChanged(object sender, EventArgs e)
         {
             if (m_OpeRestrict) return;
+
+            // ƒRƒ“ƒ{ƒ{ƒbƒNƒXƒZƒbƒg
+            int DepCode = CommonMotions.cnvInt(cmbDepartment.SelectedValue);
+            int PerCode = CommonMotions.cnvInt(cmbConstructionPerson.SelectedValue);
+            SetcmbDepartment();
+            SetcmbPersons();
+            cmbDepartment.SelectedValue = DepCode;
+            cmbConstructionPerson.SelectedValue = PerCode;
+
             // ƒf�[ƒ^•\Ž¦
             DataDisplay();
         }
Index: trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/CostomerRegist/FrmCostomerRegistListAuxiliary.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/CostomerRegist/FrmCostomerRegistListAuxiliary.cs	(revision 141)
+++ trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/CostomerRegist/FrmCostomerRegistListAuxiliary.cs	(revision 142)
@@ -66,7 +66,7 @@
         {
             try
             {
-                if (cmbDepartment.Items.Count > 1) return;
+                if (cmbDepartment.Items.Count > 2) return;
                 cmbDepartment.SelectedValue = CommonMotions.LoginUserData.DepartmentCode;
                 SetcmbPersons();
                 cmbConstructionPerson.SelectedValue = CommonMotions.LoginUserData.PersonCode;
@@ -759,22 +759,34 @@
                 cmbConstructionPerson.Items.Clear();
                 cmbConstructionPerson.Text = "";
 
+                int DepartmentCode = GetDepartmentCode();
                 string strSQL = string.Empty;
-                int DepartmentCode = GetDepartmentCode();
+                // ŒŸ�õ�ðŒ�
+                strSQL = string.Format(" WHERE LEDGERFLG = {0}", (int)CommonDefine.PersonLedgerDivNo.CalcTarget);
+                strSQL += " AND (DEPARTMENTCODE";
+                string strSubSQL = string.Empty;
                 if (DepartmentCode == 0)
                 {
-                    strSQL = " WHERE DeleteFlg = 0";
-                    strSQL += string.Format(" AND EmployeeClassFlg = {0}", (int)CommonDefine.EmployeeClassFlg.Regular);
                     // ŽQ�Æ•”��ƒ}ƒXƒ^‚æ‚èŽæ“¾‚·‚é
-                    strSQL += " AND DEPARTMENTCODE IN (SELECT AA.DEPARTMENTCODE FROM PERSONDEPARTMENTMASTER AA";
-                    strSQL += string.Format(" WHERE AA.PERSONCODE = {0})", CommonMotions.LoginUserData.PersonCode);
-                    strSQL += " Order By EmployeeClassFlg ASC, DisplayOrder ASC";
+                    strSubSQL += string.Format(" IN (SELECT AA.DEPARTMENTCODE FROM PERSONDEPARTMENTMASTER AA WHERE AA.PERSONCODE = {0})"
+                                            , CommonMotions.LoginUserData.PersonCode);
                 }
                 else
                 {
-                    strSQL = string.Format(" WHERE DEPARTMENTCODE = {0} AND DeleteFlg = 0 Order By EmployeeClassFlg ASC, DisplayOrder ASC", DepartmentCode);
+                    strSubSQL += string.Format(" = {0}", DepartmentCode);
                 }
+                strSQL += strSubSQL + ")";
 
+                // “–ŠúŠúŽñ“ú�EŠú––“ú‚ðŽæ“¾
+                DateTime dtDefaultStart = DateTime.MinValue;
+                DateTime dtDefaultEnd = DateTime.MinValue;
+                CreateDefaultStartAndEndDate(ref dtDefaultStart, ref dtDefaultEnd);
+
+                strSQL += string.Format(" AND (STARTDATE <= TO_DATE('{0}','YYYY/MM/DD')", dtDefaultEnd.ToShortDateString());
+                strSQL += string.Format(" AND (TO_DATE('{0}','YYYY/MM/DD') <= ENDDATE", dtDefaultStart.ToShortDateString());
+                strSQL += string.Format(" OR TO_DATE('{0}','YYYY/MM/DD') = ENDDATE))", DateTime.MinValue.ToShortDateString());
+                
+                strSQL += " Order By DeleteFlg ASC, EmployeeClassFlg ASC, DisplayOrder ASC";
                 // ’S“–ŽÒƒ}ƒXƒ^“Ç�ž
                 if (!picDB.SelectAction(strSQL, ref workList)) return;
 
@@ -805,6 +817,37 @@
         }
         #endregion
 
+        #region ƒfƒtƒHƒ‹ƒg‚ÌŠúŽñ“ú�EŠú––“ú‚ð‹�‚ß‚é
+        /// <summary>
+        /// ƒfƒtƒHƒ‹ƒg‚ÌŠúŽñ“ú�EŠú––“ú‚ð‹�‚ß‚é
+        /// </summary>
+        /// <param name="dtStart"></param>
+        /// <param name="dtEnd"></param>
+        private void CreateDefaultStartAndEndDate(ref DateTime dtStart, ref DateTime dtEnd)
+        {
+            try
+            {
+                // “–ŠúŠúŽñ”NŒŽ“ú‚ðŽæ“¾
+                int iYear = 0;
+                int month = 0;
+                int day = 0;
+                bool bPeriod = true;
+                if (CommonMotions.SystemMasterData.ConstructionNoBase == (int)CommonDefine.SystemConstructionNoBase.BusinessPeriod)
+                {   // ‰c‹ÆŠú
+                    iYear = CommonMotions.PeriodCountToYear(CommonMotions.cnvInt(numUDConstPro.Value));
+                    bPeriod = true;
+                }
+                CommonMotions.GetBeginningMonthDay(bPeriod, ref month, ref day);
+                dtStart = new DateTime(iYear, month, day);
+                dtEnd = dtStart.AddYears(1).AddDays(-1);     // �I—¹‚Í�{1”N�|1“ú
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("ƒVƒXƒeƒ€ƒGƒ‰�[�F{0}�F{1}", CommonMotions.GetMethodName(), ex.Message);
+            }
+        }
+        #endregion
+
         #region ’S“–ŽÒƒRƒ“ƒ{ƒ{ƒbƒNƒXƒZƒbƒgŽž•”��‚ðƒZƒbƒg‚·‚é
         /// <summary>
         /// ’S“–ŽÒƒRƒ“ƒ{ƒ{ƒbƒNƒXƒZƒbƒgŽž•”��‚ðƒZƒbƒg‚·‚é
Index: trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/DRList/FrmDRList.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/DRList/FrmDRList.cs	(revision 141)
+++ trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/DRList/FrmDRList.cs	(revision 142)
@@ -206,6 +206,7 @@
         /// <param name="e"></param>
         private void FrmDRList_Load(object sender, EventArgs e)
         {
+            SetInitnumUDConstPro();
             // ƒRƒ“ƒ{ƒ{ƒbƒNƒXƒZƒbƒg
             SetcmbDepartment();
             SetcmbPersons();
@@ -281,6 +282,14 @@
         {
             if (m_initDataLoad) return;
 
+            // ƒRƒ“ƒ{ƒ{ƒbƒNƒXƒZƒbƒg
+            int DepCode = CommonMotions.cnvInt(cmbDepartment.SelectedValue);
+            int PerCode = CommonMotions.cnvInt(cmbConstructionPerson.SelectedValue);
+            SetcmbDepartment();
+            SetcmbPersons();
+            cmbDepartment.SelectedValue = DepCode;
+            cmbConstructionPerson.SelectedValue = PerCode;
+
             // ƒf�[ƒ^•\Ž¦
             DataDisplay();
         }
Index: trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/DRList/FrmDRListAuxiliary.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/DRList/FrmDRListAuxiliary.cs	(revision 141)
+++ trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/DRList/FrmDRListAuxiliary.cs	(revision 142)
@@ -819,6 +819,31 @@
         }
         #endregion
 
+        #region ‘Î�Û”N“x�‰ŠúƒZƒbƒg
+        /// <summary>
+        /// ‘Î�Û”N“x�‰ŠúƒZƒbƒg
+        /// </summary>
+        private void SetInitnumUDConstPro()
+        {
+            try
+            {
+                // ŒŸ�õ”N“xƒZƒbƒg
+                // ƒf�[ƒ^‚É‚ ‚éŽ–‹ÆŠú‚ÆŒ»�Ý‚ÌŽ–‹ÆƒZƒbƒg
+                int minval = 0;
+                int maxval = 0;
+                CommonMotions.GetPeriodYear(ref minval, ref maxval);
+                numUDConstPro.Minimum = minval;
+                numUDConstPro.Maximum = maxval;
+                numUDConstPro.Value = CommonMotions.SystemMasterData.BusinessPeriod;
+
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("ƒVƒXƒeƒ€ƒGƒ‰�[�F{0}�F{1}", CommonMotions.GetMethodName(), ex.Message);
+            }
+        }
+        #endregion
+
         #region �‰ŠúŽž‚Éƒ�ƒOƒCƒ“’S“–ŽÒ‚ðƒZƒbƒg‚·‚é
         /// <summary>
         /// �‰ŠúŽž‚Éƒ�ƒOƒCƒ“’S“–ŽÒ‚ðƒZƒbƒg‚·‚é
@@ -853,7 +878,7 @@
                 else
                 {
                     // ‘I‘ð•”��‚ª•¡�”‚ÌŽÒ‚ÍƒZƒbƒg‚µ‚È‚¢
-                    if (cmbDepartment.Items.Count > 1) return;
+                    if (cmbDepartment.Items.Count > 2) return;
                     cmbDepartment.SelectedValue = CommonMotions.LoginUserData.DepartmentCode;
                     SetcmbPersons();
                     cmbConstructionPerson.SelectedValue = CommonMotions.LoginUserData.PersonCode;
@@ -981,22 +1006,34 @@
                 cmbConstructionPerson.Items.Clear();
                 cmbConstructionPerson.Text = "";
 
+                int DepartmentCode = GetDepartmentCode();
                 string strSQL = string.Empty;
-                int DepartmentCode = GetDepartmentCode();
+                // ŒŸ�õ�ðŒ�
+                strSQL = string.Format(" WHERE LEDGERFLG = {0}", (int)CommonDefine.PersonLedgerDivNo.CalcTarget);
+                strSQL += " AND (DEPARTMENTCODE";
+                string strSubSQL = string.Empty;
                 if (DepartmentCode == 0)
                 {
-                    strSQL = " WHERE DeleteFlg = 0";
-                    strSQL += string.Format(" AND EmployeeClassFlg = {0}", (int)CommonDefine.EmployeeClassFlg.Regular);
                     // ŽQ�Æ•”��ƒ}ƒXƒ^‚æ‚èŽæ“¾‚·‚é
-                    strSQL += " AND DEPARTMENTCODE IN (SELECT AA.DEPARTMENTCODE FROM PERSONDEPARTMENTMASTER AA";
-                    strSQL += string.Format(" WHERE AA.PERSONCODE = {0})", CommonMotions.LoginUserData.PersonCode);
-                    strSQL += " Order By EmployeeClassFlg ASC, DisplayOrder ASC";
+                    strSubSQL += string.Format(" IN (SELECT AA.DEPARTMENTCODE FROM PERSONDEPARTMENTMASTER AA WHERE AA.PERSONCODE = {0})"
+                                            , CommonMotions.LoginUserData.PersonCode);
                 }
                 else
                 {
-                    strSQL = string.Format(" WHERE DEPARTMENTCODE = {0} AND DeleteFlg = 0 Order By EmployeeClassFlg ASC, DisplayOrder ASC", DepartmentCode);
+                    strSubSQL += string.Format(" = {0}", DepartmentCode);
                 }
+                strSQL += strSubSQL + ")";
 
+                // “–ŠúŠúŽñ“ú�EŠú––“ú‚ðŽæ“¾
+                DateTime dtDefaultStart = DateTime.MinValue;
+                DateTime dtDefaultEnd = DateTime.MinValue;
+                CreateDefaultStartAndEndDate(ref dtDefaultStart, ref dtDefaultEnd);
+
+                strSQL += string.Format(" AND (STARTDATE <= TO_DATE('{0}','YYYY/MM/DD')", dtDefaultEnd.ToShortDateString());
+                strSQL += string.Format(" AND (TO_DATE('{0}','YYYY/MM/DD') <= ENDDATE", dtDefaultStart.ToShortDateString());
+                strSQL += string.Format(" OR TO_DATE('{0}','YYYY/MM/DD') = ENDDATE))", DateTime.MinValue.ToShortDateString());
+
+                strSQL += " Order By DeleteFlg ASC, EmployeeClassFlg ASC, DisplayOrder ASC";
                 // ’S“–ŽÒƒ}ƒXƒ^“Ç�ž
                 if (!picDB.SelectAction(strSQL, ref workList)) return false;
 
@@ -1039,6 +1076,37 @@
         }
         #endregion
 
+        #region ƒfƒtƒHƒ‹ƒg‚ÌŠúŽñ“ú�EŠú––“ú‚ð‹�‚ß‚é
+        /// <summary>
+        /// ƒfƒtƒHƒ‹ƒg‚ÌŠúŽñ“ú�EŠú––“ú‚ð‹�‚ß‚é
+        /// </summary>
+        /// <param name="dtStart"></param>
+        /// <param name="dtEnd"></param>
+        private void CreateDefaultStartAndEndDate(ref DateTime dtStart, ref DateTime dtEnd)
+        {
+            try
+            {
+                // “–ŠúŠúŽñ”NŒŽ“ú‚ðŽæ“¾
+                int iYear = 0;
+                int month = 0;
+                int day = 0;
+                bool bPeriod = true;
+                if (CommonMotions.SystemMasterData.ConstructionNoBase == (int)CommonDefine.SystemConstructionNoBase.BusinessPeriod)
+                {   // ‰c‹ÆŠú
+                    iYear = CommonMotions.PeriodCountToYear(CommonMotions.cnvInt(numUDConstPro.Value));
+                    bPeriod = true;
+                }
+                CommonMotions.GetBeginningMonthDay(bPeriod, ref month, ref day);
+                dtStart = new DateTime(iYear, month, day);
+                dtEnd = dtStart.AddYears(1).AddDays(-1);     // �I—¹‚Í�{1”N�|1“ú
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("ƒVƒXƒeƒ€ƒGƒ‰�[�F{0}�F{1}", CommonMotions.GetMethodName(), ex.Message);
+            }
+        }
+        #endregion
+
         #region ’S“–ŽÒƒRƒ“ƒ{ƒ{ƒbƒNƒXƒZƒbƒgŽž•”��‚ðƒZƒbƒg‚·‚é
         /// <summary>
         /// ’S“–ŽÒƒRƒ“ƒ{ƒ{ƒbƒNƒXƒZƒbƒgŽž•”��‚ðƒZƒbƒg‚·‚é
Index: trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/DepExpenssList/FrmDepExpenssList.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/DepExpenssList/FrmDepExpenssList.cs	(revision 141)
+++ trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/DepExpenssList/FrmDepExpenssList.cs	(revision 142)
@@ -106,22 +106,14 @@
         private enum RowTitleNum
         {
             /// <summary>
-            /// Ž{�H’†�‡Œv�s
+            /// ’S“–ŽÒ�‡Œv
             /// </summary>
-            Execution = 0,
+            Incumbents = 0,
             /// <summary>
-            /// Š®—¹�Ï‚Ý
+            /// ‘Þ�EŽÒŒv
             /// </summary>
-            Completed,
+            Retiree,
             /// <summary>
-            /// Œo”ïŒv�s
-            /// </summary>
-            Expenses,
-            /// <summary>
-            /// •â�•�U•ª
-            /// </summary>
-            Auxiliary,
-            /// <summary>
             /// ‘��‡Œv�s
             /// </summary>
             AllTotal,
@@ -131,9 +123,7 @@
         /// �‡Œv�sƒ^ƒCƒgƒ‹
         /// </summary>
         private static string[] s_TotalTitleArray = new string[] {  "�–’S�@“–�@ŽÒ�@�‡�@Œv�–",
-                                                                    "�–Š®�@—¹�@�Ï�@�‡�@Œv�–",
-                                                                    "�–�@Œo�@�@”ï�@�@Œv�@�–",
-                                                                    "�–�l Œ� ”ï �U •ª Œv�–",
+                                                                    "�–‘Þ�@�E�@ŽÒ�@�‡�@Œv�–",
                                                                     "�–�–�@‘��@�‡�@Œv�@�–�–",
                                                                 };
         #endregion
@@ -188,11 +178,6 @@
         private bool m_initDataLoad = true;
 
         /// <summary>
-        /// �‰Šú“Ç�žŽžƒf�[ƒ^ƒJƒEƒ“ƒg
-        /// </summary>
-        private int m_initDataCount = 0;
-
-        /// <summary>
         /// ‹N“®ƒtƒ‰ƒO
         /// </summary>
         private int m_ExecuteFlg = 0;
Index: trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/DepExpenssList/FrmDepExpenssList.designer.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/DepExpenssList/FrmDepExpenssList.designer.cs	(revision 141)
+++ trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/DepExpenssList/FrmDepExpenssList.designer.cs	(revision 142)
@@ -81,6 +81,7 @@
             this.label7 = new System.Windows.Forms.Label();
             this.lblCellTotal = new System.Windows.Forms.Label();
             this.ProgressBar = new System.Windows.Forms.ProgressBar();
+            this.btnLedgerStatus = new System.Windows.Forms.Button();
             this.dgvMaster = new ProcessManagement.Forms.CustomControls.DataGridViewEX();
             this.Column3 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.Column1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
@@ -92,7 +93,7 @@
             this.Column9 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.Column10 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.Column12 = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.btnLedgerStatus = new System.Windows.Forms.Button();
+            this.label18 = new System.Windows.Forms.Label();
             this.groupBox1.SuspendLayout();
             this.pnlPayroll.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)(this.numUDConstPro)).BeginInit();
@@ -148,6 +149,7 @@
             // 
             this.pnlPayroll.BackColor = System.Drawing.Color.LightSteelBlue;
             this.pnlPayroll.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
+            this.pnlPayroll.Controls.Add(this.label18);
             this.pnlPayroll.Controls.Add(this.lblEndDate);
             this.pnlPayroll.Controls.Add(this.lblStartDate);
             this.pnlPayroll.Controls.Add(this.label8);
@@ -245,7 +247,7 @@
             // 
             // label23
             // 
-            this.label23.BackColor = System.Drawing.Color.LightSalmon;
+            this.label23.BackColor = System.Drawing.Color.Orange;
             this.label23.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
             this.label23.Font = new System.Drawing.Font("ï¼­ï¼³ æ˜Žæœ�", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
             this.label23.ForeColor = System.Drawing.Color.White;
@@ -253,7 +255,7 @@
             this.label23.Name = "label23";
             this.label23.Size = new System.Drawing.Size(110, 25);
             this.label23.TabIndex = 51;
-            this.label23.Text = "å½“æœŸç´”åˆ©ç›Š";
+            this.label23.Text = "æ‹…å½“å¤–å�Žç›Š";
             this.label23.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
             // 
             // label11
@@ -283,7 +285,7 @@
             // 
             // label19
             // 
-            this.label19.BackColor = System.Drawing.Color.LightSalmon;
+            this.label19.BackColor = System.Drawing.Color.Orange;
             this.label19.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
             this.label19.Font = new System.Drawing.Font("ï¼­ï¼³ æ˜Žæœ�", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
             this.label19.ForeColor = System.Drawing.Color.White;
@@ -291,7 +293,7 @@
             this.label19.Name = "label19";
             this.label19.Size = new System.Drawing.Size(110, 25);
             this.label19.TabIndex = 49;
-            this.label19.Text = "å½“æœŸç´”åˆ©ç›Š";
+            this.label19.Text = "æ‹…å½“å¤–å�Žç›Š";
             this.label19.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
             // 
             // lblPlusorMinus2
@@ -368,7 +370,7 @@
             this.label22.Name = "label22";
             this.label22.Size = new System.Drawing.Size(110, 25);
             this.label22.TabIndex = 32;
-            this.label22.Text = "å½“æœŸæš«å®šç´”åˆ©ç›Š";
+            this.label22.Text = "å½“æœŸäººä»¶è²»";
             this.label22.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
             // 
             // lblTotalValue2
@@ -389,7 +391,7 @@
             this.label14.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
             this.label14.Font = new System.Drawing.Font("ï¼­ï¼³ æ˜Žæœ�", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
             this.label14.ForeColor = System.Drawing.Color.DarkRed;
-            this.label14.Location = new System.Drawing.Point(379, 28);
+            this.label14.Location = new System.Drawing.Point(72, 53);
             this.label14.Name = "label14";
             this.label14.Size = new System.Drawing.Size(110, 25);
             this.label14.TabIndex = 32;
@@ -410,15 +412,15 @@
             // 
             // label20
             // 
-            this.label20.BackColor = System.Drawing.Color.DarkOrange;
+            this.label20.BackColor = System.Drawing.Color.LightGoldenrodYellow;
             this.label20.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
             this.label20.Font = new System.Drawing.Font("ï¼­ï¼³ æ˜Žæœ�", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
-            this.label20.ForeColor = System.Drawing.Color.White;
+            this.label20.ForeColor = System.Drawing.Color.Black;
             this.label20.Location = new System.Drawing.Point(72, 28);
             this.label20.Name = "label20";
             this.label20.Size = new System.Drawing.Size(110, 25);
             this.label20.TabIndex = 11;
-            this.label20.Text = "æŒ¯åˆ†æ¸ˆç´”åˆ©ç›Š";
+            this.label20.Text = "å‰¯æ‹…å½“å�Žç›Š";
             this.label20.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
             // 
             // label13
@@ -460,15 +462,15 @@
             // 
             // label17
             // 
-            this.label17.BackColor = System.Drawing.Color.Green;
+            this.label17.BackColor = System.Drawing.Color.OldLace;
             this.label17.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
             this.label17.Font = new System.Drawing.Font("ï¼­ï¼³ æ˜Žæœ�", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
-            this.label17.ForeColor = System.Drawing.Color.White;
-            this.label17.Location = new System.Drawing.Point(72, 53);
+            this.label17.ForeColor = System.Drawing.Color.Black;
+            this.label17.Location = new System.Drawing.Point(379, 28);
             this.label17.Name = "label17";
             this.label17.Size = new System.Drawing.Size(110, 25);
             this.label17.TabIndex = 6;
-            this.label17.Text = "æœªæŒ¯åˆ†ç´”åˆ©ç›Š";
+            this.label17.Text = "æŒ‡å°Žå“¡å�Žç›Š";
             this.label17.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
             // 
             // label6
@@ -629,6 +631,20 @@
             this.ProgressBar.TabIndex = 30;
             this.ProgressBar.Visible = false;
             // 
+            // btnLedgerStatus
+            // 
+            this.btnLedgerStatus.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+            this.btnLedgerStatus.BackColor = System.Drawing.Color.DodgerBlue;
+            this.btnLedgerStatus.Font = new System.Drawing.Font("ï¼­ï¼³ æ˜Žæœ�", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
+            this.btnLedgerStatus.ForeColor = System.Drawing.Color.Black;
+            this.btnLedgerStatus.Location = new System.Drawing.Point(1185, 5);
+            this.btnLedgerStatus.Name = "btnLedgerStatus";
+            this.btnLedgerStatus.Size = new System.Drawing.Size(150, 30);
+            this.btnLedgerStatus.TabIndex = 48;
+            this.btnLedgerStatus.Text = "æœªä½œæˆ�å�°å¸³ç¢ºèª�";
+            this.btnLedgerStatus.UseVisualStyleBackColor = false;
+            this.btnLedgerStatus.Click += new System.EventHandler(this.btnLedgerStatus_Click);
+            // 
             // dgvMaster
             // 
             this.dgvMaster.AllowUserToAddRows = false;
@@ -813,19 +829,17 @@
             this.Column12.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
             this.Column12.Width = 140;
             // 
-            // btnLedgerStatus
+            // label18
             // 
-            this.btnLedgerStatus.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
-            this.btnLedgerStatus.BackColor = System.Drawing.Color.DodgerBlue;
-            this.btnLedgerStatus.Font = new System.Drawing.Font("ï¼­ï¼³ æ˜Žæœ�", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
-            this.btnLedgerStatus.ForeColor = System.Drawing.Color.Black;
-            this.btnLedgerStatus.Location = new System.Drawing.Point(1185, 5);
-            this.btnLedgerStatus.Name = "btnLedgerStatus";
-            this.btnLedgerStatus.Size = new System.Drawing.Size(150, 30);
-            this.btnLedgerStatus.TabIndex = 48;
-            this.btnLedgerStatus.Text = "æœªä½œæˆ�å�°å¸³ç¢ºèª�";
-            this.btnLedgerStatus.UseVisualStyleBackColor = false;
-            this.btnLedgerStatus.Click += new System.EventHandler(this.btnLedgerStatus_Click);
+            this.label18.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+            this.label18.AutoSize = true;
+            this.label18.Font = new System.Drawing.Font("ï¼­ï¼³ æ˜Žæœ�", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
+            this.label18.ForeColor = System.Drawing.Color.Red;
+            this.label18.Location = new System.Drawing.Point(944, 59);
+            this.label18.Name = "label18";
+            this.label18.Size = new System.Drawing.Size(282, 19);
+            this.label18.TabIndex = 56;
+            this.label18.Text = "â€»å½“æœŸäººä»¶è²»ã�®ã�¿ã�®è¨ˆç®—ã�§ã�™";
             // 
             // FrmDepExpenssList
             // 
@@ -916,5 +930,6 @@
         private System.Windows.Forms.Label label8;
         private System.Windows.Forms.Label label3;
         private System.Windows.Forms.Button btnLedgerStatus;
+        private System.Windows.Forms.Label label18;
     }
 }
\ No newline at end of file
Index: trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/DepExpenssList/FrmDepExpenssListAuxiliary.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/DepExpenssList/FrmDepExpenssListAuxiliary.cs	(revision 141)
+++ trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/DepExpenssList/FrmDepExpenssListAuxiliary.cs	(revision 142)
@@ -381,15 +381,10 @@
         /// <summary>
         /// ƒOƒŠƒbƒh�sƒf�[ƒ^ƒZƒbƒg
         /// </summary>
-        /// <param name="objwrk"></param>
-        /// <param name="ino"></param>
-        /// <param name="TotalArea"></param>
-        /// <param name="initFlg"></param>
-        /// <param name="StatusFlg"></param>
-        private void GridDataSet(object[] objwrk, ref int ino, ref int[] TotalArea, ref bool initFlg, ref int StatusFlg,
+        private void GridDataSet(object[] objwrk, ref int ino, ref int[] TotalArea,
                                     List<int> DepInPerArray, List<int> PersonCDArray,
                                     List<DateTime> dtStartArray, List<DateTime> dtCompArray, List<int> SalaryArray,
-                                    List<DateTime> dtHireStDayArray,
+                                    List<DateTime> dtHireStDayArray, List<DateTime> dtHireEdDayArray,
                                     DateTime dtDefaultStart, DateTime dtDefaultEnd)
         {
             try
@@ -434,9 +429,13 @@
                     {
                         if (DepInPerArray[i] != DepartmentCode) continue;
                         // ŠJŽn�E�I—¹“ú‚ª–³‚¢�ê�‡‚ÍƒfƒtƒHƒ‹ƒg‚ÌŠúŽñ�EŠú––‚ðŽg—p‚·‚é
-                        if (dtStartArray[i] == DateTime.MinValue || dtStartArray[i] == DateTime.MaxValue) dtStartArray[i] = dtDefaultStart;
-                        if (dtCompArray[i] == DateTime.MinValue || dtCompArray[i] == DateTime.MaxValue) dtCompArray[i] = dtDefaultEnd;
+                        DateTime stDate = dtStartArray[i];
+                        DateTime edDate = dtCompArray[i];
+                        CalcStartCompDate(dtDefaultStart, dtDefaultEnd, dtHireStDayArray[i], dtHireEdDayArray[i], ref stDate, ref edDate);
 
+                        dtStartArray[i] = stDate;
+                        dtCompArray[i] = edDate;
+
                         // Œo”ïŽæ“¾
                         GetPersonExpensesCostValue(PersonCDArray[i], dtStartArray[i], dtCompArray[i], ref CostValue2);
 
@@ -443,7 +442,7 @@
                         // ‹‹—^—Ý�ÏŽæ“¾
                         int workSalary = CalcElapsedSalary(dtStartArray[i], dtCompArray[i], PersonCDArray[i], SalaryArray[i]);
                         // —ÝŒv‰ÁŽZ
-                        if (workSalary > 0) TotalSalary += workSalary;
+                        TotalSalary += workSalary;
                     }
 
                     // �U•ª‹‹—^‹àŠz�E�ƒ—˜‰v‹àŠz�E‘e—˜‰v‹àŠzŽæ“¾
@@ -454,10 +453,6 @@
                     int PersonCount = -1;
                     for (int i = 0; i < PersonCDArray.Count; i++)
                     {
-                        //// ŠJŽn�E�I—¹“ú‚ª–³‚¢�ê�‡‚ÍƒfƒtƒHƒ‹ƒg‚ÌŠúŽñ�EŠú––‚ðŽg—p‚·‚é
-                        //if (dtStartArray[i] == DateTime.MinValue || dtStartArray[i] == DateTime.MaxValue) dtStartArray[i] = dtDefaultStart;
-                        //if (dtCompArray[i] == DateTime.MinValue || dtCompArray[i] == DateTime.MaxValue) dtCompArray[i] = dtDefaultEnd;
-
                         // “¯‚¶’S“–ŽÒƒR�[ƒh‚ð’T‚·
                         if (PersonCode == PersonCDArray[i])
                         {
@@ -468,14 +463,12 @@
                     if (PersonCount < 0) return;
 
                     // ŠJŽn�E�I—¹“ú‚ª–³‚¢�ê�‡‚ÍƒfƒtƒHƒ‹ƒg‚ÌŠúŽñ�EŠú––‚ðŽg—p‚·‚é
-                    if (dtStartArray[PersonCount] == DateTime.MinValue || dtStartArray[PersonCount] == DateTime.MaxValue)
-                    {
-                        if (dtDefaultStart < dtHireStDayArray[PersonCount] && dtHireStDayArray[PersonCount] < dtDefaultEnd)
-                            dtStartArray[PersonCount] = dtHireStDayArray[PersonCount];
-                        else
-                            dtStartArray[PersonCount] = dtDefaultStart;
-                    }
-                    if (dtCompArray[PersonCount] == DateTime.MinValue || dtCompArray[PersonCount] == DateTime.MaxValue) dtCompArray[PersonCount] = dtDefaultEnd;
+                    DateTime stDate = dtStartArray[PersonCount];
+                    DateTime edDate = dtCompArray[PersonCount];
+                    CalcStartCompDate(dtDefaultStart, dtDefaultEnd, dtHireStDayArray[PersonCount], dtHireEdDayArray[PersonCount], ref stDate, ref edDate);
+
+                    dtStartArray[PersonCount] = stDate;
+                    dtCompArray[PersonCount] = edDate;
                     
                     // Œo”ïŽæ“¾
                     GetPersonExpensesCostValue(PersonCDArray[PersonCount], dtStartArray[PersonCount], dtCompArray[PersonCount], ref CostValue2);
@@ -494,7 +487,6 @@
                     wrkArray[(int)DBGetData.NetProfit] -= CostValue2[i];            // �ƒ—˜‰v-�w“ü•i
                 }
                 int TotalValue = OnSalary - TotalSalary;
-                //wrkArray[(int)DBGetData.GrossProfit] += TotalValue;                 // ‘e—˜‰v+�U•ª‹‹—^�·Šz
                 wrkArray[(int)DBGetData.NetProfit] += TotalValue;                   // �ƒ—˜‰v+�U•ª‹‹—^�·Šz
                 // ------------------------------------------------------------------------------------------
 
@@ -538,6 +530,53 @@
         }
         #endregion
 
+        #region ŒvŽZŠJŽn�E�I—¹“ú‚Ìƒ`ƒFƒbƒN“ü‚ê‘Ö‚¦
+        /// <summary>
+        /// ŒvŽZŠJŽn�E�I—¹“ú‚Ìƒ`ƒFƒbƒN“ü‚ê‘Ö‚¦
+        /// </summary>
+        private void CalcStartCompDate(DateTime dtDefaultStart, DateTime dtDefaultEnd,
+                                        DateTime HireStartDate, DateTime HireCompDate,
+                                        ref DateTime StartDate, ref DateTime CompDate)
+        {
+            try
+            {
+                if (StartDate == DateTime.MinValue)
+                {
+                    StartDate = dtDefaultStart;
+                }
+                else if (dtDefaultStart <= HireStartDate && HireStartDate <= dtDefaultEnd)
+                {
+                    StartDate = HireStartDate;
+                }
+                else if (dtDefaultStart < StartDate)
+                {
+                    StartDate = dtDefaultStart;
+                }
+
+                // �Å‘å“ú‚ª�¡“ú‚æ‚è�¬‚³‚¢�ê�‡ˆÈŠO‚Í�ˆ—�‚µ‚È‚¢
+                if (CompDate.Date > DateTime.Today.Date) return;
+
+                if (numUDConstPro.Value < CommonMotions.SystemMasterData.BusinessPeriod)
+                {   // ‘OŠúˆÈ‘O‚ÍŠú––
+                    CompDate = dtDefaultEnd;
+                }
+                else if (HireCompDate != DateTime.MinValue
+                        && (dtDefaultStart < HireCompDate && HireCompDate < dtDefaultEnd))
+                {   // ‘ÞŽÐ“ú‚ªŠú“à‚È‚ç‚Î�I—¹‚ð‘ÞŽÐ“ú‚É‚·‚é
+                    CompDate = HireCompDate;
+                }
+                else
+                {   // ˆÈŠO‚Í�¡“ú
+                    CompDate = DateTime.Today.Date;
+                }
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("ƒVƒXƒeƒ€ƒGƒ‰�[�F{0}", ex.Message);
+            }
+        }
+        #endregion
+
         #region �‰ŠúŽžƒf�[ƒ^Žæ“¾
         /// <summary>
         /// �‰ŠúŽžƒf�[ƒ^Žæ“¾
@@ -974,48 +1013,73 @@
                 strSQL += " MAX(C.CONSTRUCTIONPERIODEND) M3, MAX(C.CONSTRUCTIONPERIODEND2) M4,";
                 strSQL += " MAX(D.CONSTRUCTIONPERIODEND) S3, MAX(D.CONSTRUCTIONPERIODEND2) S4,";
                 strSQL += " MAX(E.CONSTRUCTIONPERIODEND) I3, MAX(E.CONSTRUCTIONPERIODEND2) I4,";
-                strSQL += " SUM(C2.EXECUTIONAMOUNT) M5, SUM(D2.EXECUTIONAMOUNT) S5, SUM(E2.EXECUTIONAMOUNT) I5,";
-                strSQL += " COUNT(C2.EXECUTIONAMOUNT) M6, COUNT(D2.EXECUTIONAMOUNT) S6, COUNT(E2.EXECUTIONAMOUNT) I6,";
+                strSQL += " SUM(C.EXECUTIONAMOUNT) M5, SUM(D.EXECUTIONAMOUNT) S5, SUM(E.EXECUTIONAMOUNT) I5,";
+                strSQL += " COUNT(C.EXECUTIONAMOUNT) M6, COUNT(D.EXECUTIONAMOUNT) S6, COUNT(E.EXECUTIONAMOUNT) I6,";
                 strSQL += " P.STARTDATE, P.ENDDATE";
                 strSQL += " FROM PERSONINCHARGEMASTER P";
-                
+
                 // �HŽ–’S“–ŽÒ‚Ìƒf�[ƒ^Žæ“¾
-                strSQL += " LEFT JOIN CONSTRUCTIONBASEINFO C ON C.CONSTRUCTIONPERSONCODE = P.PERSONCODE";
+                strSQL += " LEFT JOIN (SELECT C1.CONSTRUCTIONPERSONCODE, C1.CONSTRUCTIONSTATUSFLG, C1.CONSTRUCTIONPERIOD";
+                strSQL += ", C1.CONSTRUCTIONPERIODSTART, C1.CONSTRUCTIONPERIODSTART2, C1.CONSTRUCTIONPERIODEND, C1.CONSTRUCTIONPERIODEND2, C2.EXECUTIONAMOUNT";
+                strSQL += " FROM CONSTRUCTIONBASEINFO C1, CONSTRUCTIONLEDGERDETAIL C2, CONSTRUCTIONLEDGER C3";
+                strSQL += " WHERE C2.CONSTRUCTIONCODE = C1.CONSTRUCTIONCODE";
+                strSQL += string.Format(" AND C2.GROUPCOUNT = {0}", (int)FrmConstructionLedger.DataGroup.Payroll);
+                strSQL += " AND C3.CONSTRUCTIONCODE = C1.CONSTRUCTIONCODE) C";
+                strSQL += " ON C.CONSTRUCTIONPERSONCODE = P.PERSONCODE";
                 strSQL += string.Format(" AND C.CONSTRUCTIONSTATUSFLG <> {0}", NotOrder);
                 strSQL += string.Format(" AND C.CONSTRUCTIONPERIOD = {0}", numUDConstPro.Value);
-                strSQL += " AND EXISTS (SELECT * FROM CONSTRUCTIONLEDGER C3 WHERE C3.CONSTRUCTIONCODE = C.CONSTRUCTIONCODE)";
-                strSQL += " LEFT JOIN CONSTRUCTIONLEDGERDETAIL C2 ON C2.CONSTRUCTIONCODE = C.CONSTRUCTIONCODE";
-                strSQL += string.Format(" AND C2.GROUPCOUNT = {0}",(int)FrmConstructionLedger.DataGroup.Payroll);
 
                 // �HŽ–•›’S“–ŽÒ‚Ìƒf�[ƒ^Žæ“¾
-                strSQL += " LEFT JOIN CONSTRUCTIONBASEINFO D ON D.CONSTRSUBPERSONCODE = P.PERSONCODE";
+                strSQL += " LEFT JOIN (SELECT D1.CONSTRSUBPERSONCODE CONSTRUCTIONPERSONCODE, D1.CONSTRUCTIONSTATUSFLG, D1.CONSTRUCTIONPERIOD";
+                strSQL += ", D1.CONSTRUCTIONPERIODSTART, D1.CONSTRUCTIONPERIODSTART2, D1.CONSTRUCTIONPERIODEND, D1.CONSTRUCTIONPERIODEND2, D2.EXECUTIONAMOUNT";
+                strSQL += " FROM CONSTRUCTIONBASEINFO D1, CONSTRUCTIONLEDGERDETAIL D2, CONSTRUCTIONLEDGER D3";
+                strSQL += " WHERE D2.CONSTRUCTIONCODE = D1.CONSTRUCTIONCODE";
+                strSQL += string.Format(" AND D2.GROUPCOUNT = {0}", (int)FrmConstructionLedger.DataGroup.Assistant);
+                strSQL += " AND D3.CONSTRUCTIONCODE = D1.CONSTRUCTIONCODE) D";
+                strSQL += " ON D.CONSTRUCTIONPERSONCODE = P.PERSONCODE";
                 strSQL += string.Format(" AND D.CONSTRUCTIONSTATUSFLG <> {0}", NotOrder);
                 strSQL += string.Format(" AND D.CONSTRUCTIONPERIOD = {0}", numUDConstPro.Value);
-                strSQL += " AND EXISTS (SELECT * FROM CONSTRUCTIONLEDGER D3 WHERE D3.CONSTRUCTIONCODE = D.CONSTRUCTIONCODE)";
-                strSQL += " LEFT JOIN CONSTRUCTIONLEDGERDETAIL D2 ON D2.CONSTRUCTIONCODE = D.CONSTRUCTIONCODE";
-                strSQL += string.Format(" AND D2.GROUPCOUNT = {0}", (int)FrmConstructionLedger.DataGroup.Assistant);
 
                 // �HŽ–Žw“±ˆõ‚Ìƒf�[ƒ^Žæ“¾
-                strSQL += " LEFT JOIN CONSTRUCTIONBASEINFO E ON E.CONSTRUCTIONINSTRUCTOR = P.PERSONCODE";
+                strSQL += " LEFT JOIN (SELECT E1.CONSTRUCTIONINSTRUCTOR CONSTRUCTIONPERSONCODE, E1.CONSTRUCTIONSTATUSFLG, E1.CONSTRUCTIONPERIOD";
+                strSQL += ", E1.CONSTRUCTIONPERIODSTART, E1.CONSTRUCTIONPERIODSTART2, E1.CONSTRUCTIONPERIODEND, E1.CONSTRUCTIONPERIODEND2, E2.EXECUTIONAMOUNT";
+                strSQL += " FROM CONSTRUCTIONBASEINFO E1, CONSTRUCTIONLEDGERDETAIL E2, CONSTRUCTIONLEDGER E3";
+                strSQL += " WHERE E2.CONSTRUCTIONCODE = E1.CONSTRUCTIONCODE";
+                strSQL += string.Format(" AND E2.GROUPCOUNT = {0}", (int)FrmConstructionLedger.DataGroup.Instructor);
+                strSQL += " AND E3.CONSTRUCTIONCODE = E1.CONSTRUCTIONCODE) E";
+                strSQL += " ON E.CONSTRUCTIONPERSONCODE = P.PERSONCODE";
                 strSQL += string.Format(" AND E.CONSTRUCTIONSTATUSFLG <> {0}", NotOrder);
                 strSQL += string.Format(" AND E.CONSTRUCTIONPERIOD = {0}", numUDConstPro.Value);
-                strSQL += " AND EXISTS (SELECT * FROM CONSTRUCTIONLEDGER E3 WHERE E3.CONSTRUCTIONCODE = C.CONSTRUCTIONCODE)";
-                strSQL += " LEFT JOIN CONSTRUCTIONLEDGERDETAIL E2 ON E2.CONSTRUCTIONCODE = E.CONSTRUCTIONCODE";
-                strSQL += string.Format(" AND E2.GROUPCOUNT = {0}", (int)FrmConstructionLedger.DataGroup.Instructor);
 
                 strSQL += string.Format(" WHERE P.LEDGERFLG = {0}", (int)CommonDefine.PersonLedgerDivNo.CalcTarget);
+
+                // “–ŠúŠúŽñ“ú�EŠú––“ú‚ðŽæ“¾
+                DateTime dtDefaultStart = DateTime.MinValue;
+                DateTime dtDefaultEnd = DateTime.MinValue;
+                CreateDefaultStartAndEndDate(ref dtDefaultStart, ref dtDefaultEnd);
+                strSQL += string.Format(" AND (P.STARTDATE <= TO_DATE('{0}','YYYY/MM/DD')", dtDefaultEnd.ToShortDateString());
+                strSQL += string.Format(" AND (TO_DATE('{0}','YYYY/MM/DD') <= P.ENDDATE", dtDefaultStart.ToShortDateString());
+                strSQL += string.Format(" OR TO_DATE('{0}','YYYY/MM/DD') = P.ENDDATE))", DateTime.MinValue.ToShortDateString());
+
                 // �HŽ–‘ä’ ƒf�[ƒ^‚Ì•”��‚¾‚¯‚ª‘Î�Û
-                strSQL += " AND P.DEPARTMENTCODE IN";
-                strSQL += " (SELECT DEPARTMENTCODE FROM (SELECT A.DEPARTMENTCODE, A.DEPARTMENTSTRING, A.DISPLAYORDER, COUNT(*) CNT";
-                strSQL += " FROM DEPARTMENTMASTER A, PERSONINCHARGEMASTER B, CONSTRUCTIONBASEINFO C, CONSTRUCTIONLEDGERDETAIL D";
-                strSQL += " WHERE A.DELETEFLG = 0";
-                strSQL += " AND A.DEPARTMENTCODE = B.DEPARTMENTCODE";
-                strSQL += " AND (B.PERSONCODE = C.CONSTRUCTIONPERSONCODE OR B.PERSONCODE = C.CONSTRUCTIONINSTRUCTOR OR B.PERSONCODE = C.CONSTRSUBPERSONCODE)";
-                strSQL += " AND D.CONSTRUCTIONCODE = C.CONSTRUCTIONCODE";
-                strSQL += " GROUP BY A.DEPARTMENTCODE, A.DEPARTMENTSTRING, A.DISPLAYORDER))";
+                if (DepartmentCode == 0)
+                {
+                    strSQL += " AND P.DEPARTMENTCODE IN";
+                    strSQL += " (SELECT AA.DEPARTMENTCODE FROM (SELECT A.DEPARTMENTCODE, A.DEPARTMENTSTRING, A.DISPLAYORDER, COUNT(*) CNT";
+                    strSQL += " FROM DEPARTMENTMASTER A, PERSONINCHARGEMASTER B, CONSTRUCTIONBASEINFO C , CONSTRUCTIONLEDGERDETAIL D";
+                    strSQL += " WHERE A.DELETEFLG = 0";
+                    strSQL += " AND A.DEPARTMENTCODE = B.DEPARTMENTCODE";
+                    strSQL += " AND B.PERSONCODE = C.CONSTRUCTIONPERSONCODE";
+                    strSQL += " AND D.CONSTRUCTIONCODE = C.CONSTRUCTIONCODE";
 
-                if (DepartmentCode != 0)
+                    strSQL += " GROUP BY A.DEPARTMENTCODE, A.DEPARTMENTSTRING, A.DISPLAYORDER) AA)";
+                }
+                else
+                {
+                    // •”��ƒR�[ƒh‘I‘ðŽž‚Í•”��‚ðŒŸ�õ�ðŒ�‚Ö“ü‚ê‚é
                     strSQL += string.Format(" AND P.DEPARTMENTCODE = {0}", DepartmentCode);
+                }
+
                 strSQL += " GROUP BY P.DEPARTMENTCODE, P.PERSONCODE, P.PERSONNAME, P.DISPLAYORDER, P.MonthlySalary, P.STARTDATE, P.ENDDATE";
                 strSQL += " ORDER BY P.DISPLAYORDER";
 
@@ -1022,11 +1086,6 @@
                 ArrayList arList = new ArrayList();
                 if (!PersonDB.ExecuteReader(strSQL, ref arList)) return 0;
 
-                // “–ŠúŠúŽñ“ú�EŠú––“ú‚ðŽæ“¾
-                DateTime dtDefaultStart = DateTime.MinValue;
-                DateTime dtDefaultEnd = DateTime.MinValue;
-                CreateDefaultStartAndEndDate(ref dtDefaultStart, ref dtDefaultEnd);
-
                 DateTime stDate = DateTime.MaxValue;
                 DateTime edDate = DateTime.MinValue;
                 DateTime maxDate = DateTime.MinValue;
@@ -1320,6 +1379,7 @@
             IOConstructionLedger LedgerDB = new IOConstructionLedger();
             DataGridView dgv = dgvMaster;
             ProgressBar prgber = ProgressBar;
+            int initDataCount = 0;
             try
             {
                 dgv.SuspendLayout();
@@ -1387,72 +1447,52 @@
                 // ----- �HŽ–�Ú�×‘ä’ Žæ“¾
                 if (!LedgerDB.ExecuteReader(strSQL, ref arData)) return;
 
-                // •”��‚²‚Æˆê——‚Ì�ê�‡‚Í‘Þ�EŽÒ‚Å‚àƒf�[ƒ^‚ª‚ ‚ê‚Î•\Ž¦‚·‚é
-                if (DispType== (int)DispDataTypeCode.Department)
-                {
-                    GetType2DeleteData(LedgerDB, ref arData);
-                }
-
-                // “Ç�žŽžƒf�[ƒ^ƒJƒEƒ“ƒgŽæ“¾
-                m_initDataCount = arData.Count;
-                if (arData.Count == 0) return;
-
                 // ProgressBar‚Ì’l‚ð•Ï�X‚·‚é
                 prgber.Value++;
                 prgber.Update();
 
-                // �‡ŒvƒGƒŠƒA
+                // “Ç�žŽžƒf�[ƒ^ƒJƒEƒ“ƒgŽæ“¾
+                initDataCount = arData.Count;
+
+                // �‡ŒvƒGƒŠƒA�‰Šú‰»
                 int TotalColCnt = Enum.GetNames(typeof(DispColumn)).Length;
                 int[] TotalArea = new int[TotalColCnt];
                 Array.Clear(TotalArea, 0, TotalArea.Length);
 
+                int ino = 1;
                 // ƒf�[ƒ^•\Ž¦
-                int ino = 1;
-                int StatusFlg = -1;
-                bool initFlg = true;
-                string strStatus = string.Empty;
-               // ----- Ž{�H’†ƒf�[ƒ^•\Ž¦
-                foreach (object[] objwrk in arData)
+                if (arData.Count != 0)
                 {
-                    // ƒOƒŠƒbƒh‚Öƒf�[ƒ^•\Ž¦
-                    GridDataSet(objwrk, ref ino, ref TotalArea, ref initFlg, ref StatusFlg,
-                                DepInPerArray, PersonCDArray, dtStartArray, dtCompArray, SalaryArray, dtHireStDayArray,
-                                dtDefaultStart, dtDefaultEnd);
+                    // ƒf�[ƒ^•\Ž¦
+                    CreateRowBlock(DispType, arData, ref ino, ref TotalArea,
+                                    DepInPerArray, PersonCDArray,
+                                    dtStartArray, dtMaxCompArray, SalaryArray,
+                                        dtHireStDayArray, dtHireEdDayArray,
+                                        dtDefaultStart, dtDefaultEnd, true);
                 }
 
-                dgv.Columns[(int)DispColumn.SelectionName].HeaderText = GridColumnHeader[DispType];
-
-                // ProgressBar‚Ì’l‚ð•Ï�X‚·‚é
-                prgber.Value++;
-                prgber.Update();
-
-                int depcode = GetDepartmentCode();
-                // ----- �‡Œv•\Ž¦
-                if (arData.Count != 0 && depcode != 0)
+                // •”��‚²‚Æˆê——‚Ì�ê�‡‚Í‘Þ�EŽÒ‚Å‚àƒf�[ƒ^‚ª‚ ‚ê‚Î•\Ž¦‚·‚é
+                if (DispType == (int)DispDataTypeCode.Department)
                 {
-                    //dgv.Rows.Add();       // ‹ó�s
+                    arData.Clear();
+                    int[] RetireeTotalArea = new int[TotalColCnt];
 
-                    // �‡Œv�s•\Ž¦
-                    int TotalRow = dgv.Rows.Add(1);
-                    dgv.Rows[TotalRow].Cells[(int)DispColumn.SelectionName].Value = s_TotalTitleArray[(int)RowTitleNum.Execution];
-                    // �s‚Ì�F‚ð•Ï‚¦‚é
-                    SetRowColor(dgv.Rows[TotalRow], s_RowTotalBackColor, s_RowTotalForeColor);
-
-                    // �”’l•\Ž¦
-                    for (int i = (int)DispColumn.OrdersDecisionPrice; i <= (int)DispColumn.NetProfit; i++)
+                    GetType2DeleteData(LedgerDB, ref arData);
+                    if (arData.Count > 0)
                     {
-                        dgv.Rows[TotalRow].Cells[i].Value = TotalArea[i].ToString("#,0");
+                        CreateRowBlock(DispType, arData, ref ino, ref RetireeTotalArea,
+                                        DepInPerArray, PersonCDArray,
+                                        dtStartArray, dtMaxCompArray, SalaryArray,
+                                            dtHireStDayArray, dtHireEdDayArray,
+                                            dtDefaultStart, dtDefaultEnd, false);
+                        for (int i = 0; i < TotalArea.Length; i++)
+                        {
+                            TotalArea[i] += RetireeTotalArea[i];
+                        }
                     }
                 }
 
-                dgv.Rows.Add();       // ‹ó�s
-
-                // ProgressBar‚Ì’l‚ð•Ï�X‚·‚é
-                prgber.Value++;
-                prgber.Update();
-
                 // ----- ‘��‡Œv�s•\Ž¦
-                dgv.Rows.Add();       // ‹ó�s
                 int AllTotalRow = dgv.Rows.Add(1);
                 dgv.Rows[AllTotalRow].Cells[(int)DispColumn.SelectionName].Value = s_TotalTitleArray[(int)RowTitleNum.AllTotal];
 
@@ -1464,11 +1504,6 @@
                 {
                     dgv.Rows[AllTotalRow].Cells[i].Value = TotalArea[i].ToString("#,0");
                 }
-
-                // ProgressBar‚Ì’l‚ð•Ï�X‚·‚é
-                prgber.Value = prgber.Maximum;
-                prgber.Update();
-
             }
             catch (Exception ex)
             {
@@ -1484,7 +1519,7 @@
                 }
                 else
                 {
-                    dgv.RowCount += (CommonDefine.s_MaxInitLineCount - m_initDataCount);
+                    dgv.RowCount += (CommonDefine.s_MaxInitLineCount - initDataCount);
                 }
 
                 LedgerDB.close(); LedgerDB = null;
@@ -1498,6 +1533,71 @@
         }
         #endregion
 
+        #region ‘I‘ð‚³‚ê‚½ƒf�[ƒ^‚ð�‡Œv‚Æ‹¤‚É•\Ž¦‚·‚é
+        /// <summary>
+        /// ‘I‘ð‚³‚ê‚½ƒf�[ƒ^‚ð�‡Œv‚Æ‹¤‚É•\Ž¦‚·‚é
+        /// </summary>
+        private void CreateRowBlock(int DispType, ArrayList arData, ref int ino, ref int[] TotalArea,
+                                    List<int> DepInPerArray, List<int> PersonCDArray,
+                                    List<DateTime> dtStartArray, List<DateTime> dtCompArray, List<int> SalaryArray,
+                                    List<DateTime> dtHireStDayArray, List<DateTime> dtHireEdDayArray,
+                                    DateTime dtDefaultStart, DateTime dtDefaultEnd, bool IncumbentsFlg)
+        {
+            DataGridView dgv = dgvMaster;
+            ProgressBar prgber = ProgressBar;
+            try
+            {
+               // ----- Ž{�H’†ƒf�[ƒ^•\Ž¦
+                foreach (object[] objwrk in arData)
+                {
+                    // ƒOƒŠƒbƒh‚Öƒf�[ƒ^•\Ž¦
+                    GridDataSet(objwrk, ref ino, ref TotalArea,
+                                DepInPerArray, PersonCDArray, dtStartArray, dtCompArray, SalaryArray,
+                                dtHireStDayArray, dtHireEdDayArray,
+                                dtDefaultStart, dtDefaultEnd);
+                }
+
+                dgv.Columns[(int)DispColumn.SelectionName].HeaderText = GridColumnHeader[DispType];
+
+                // ProgressBar‚Ì’l‚ð•Ï�X‚·‚é
+                prgber.Value++;
+                prgber.Update();
+
+                int depcode = GetDepartmentCode();
+                // ----- �‡Œv•\Ž¦
+                if (arData.Count != 0 && depcode != 0)
+                {
+                    // �‡Œv�s•\Ž¦
+                    int TotalRow = dgv.Rows.Add(1);
+                    
+                    if (IncumbentsFlg)
+                        dgv.Rows[TotalRow].Cells[(int)DispColumn.SelectionName].Value = s_TotalTitleArray[(int)RowTitleNum.Incumbents];
+                    else
+                        dgv.Rows[TotalRow].Cells[(int)DispColumn.SelectionName].Value = s_TotalTitleArray[(int)RowTitleNum.Retiree];
+
+                    // �s‚Ì�F‚ð•Ï‚¦‚é
+                    SetRowColor(dgv.Rows[TotalRow], s_RowTotalBackColor, s_RowTotalForeColor);
+
+                    // �”’l•\Ž¦
+                    for (int i = (int)DispColumn.OrdersDecisionPrice; i <= (int)DispColumn.NetProfit; i++)
+                    {
+                        dgv.Rows[TotalRow].Cells[i].Value = TotalArea[i].ToString("#,0");
+                    }
+                }
+
+                dgv.Rows.Add();       // ‹ó�s
+
+                // ProgressBar‚Ì’l‚ð•Ï�X‚·‚é
+                prgber.Value++;
+                prgber.Update();
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("ƒVƒXƒeƒ€ƒGƒ‰�[�F{0}�F{1}", CommonMotions.GetMethodName(), ex.Message);
+            }
+        }
+        #endregion
+
         #region ‚c‚aŽæ“¾�‡”Ô
         /// <summary>
         /// ‚c‚aŽæ“¾�‡”Ô
@@ -1574,6 +1674,24 @@
         {
             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 bDelFlg, ref string strSQL)
+        {
+            try
+            {
                 // SQL‚ÉƒAƒNƒZƒX�§ŒÀ‚ð‚©‚¯‚é
                 string strSecurity = string.Empty;
                 CreateSecuritySQL(ref strSecurity);
@@ -1580,6 +1698,7 @@
 
                 int NotOrder = CommonDefine.ProjectsStatus.First(x => x.Value.Equals("”ñ Žó ’�")).Key;
                 int DepCode = CommonMotions.cnvInt(cmbDepartment.SelectedValue);
+
                 // ----- ‚r‚p‚k�ì�¬
                 // ‘¶�Ý�Ú�×‘ä’ ƒf�[ƒ^ŒŸ�õ
                 strSQL = "SELECT";
@@ -1603,8 +1722,12 @@
                 strSQL += string.Format(" AND B.TyingFlg != {0}", (int)CommonDefine.BaseInfoTyingFlg.Tying);
                 strSQL += " LEFT JOIN CONSTRUCTIONLEDGER A ON A.CONSTRUCTIONCODE = B.CONSTRUCTIONCODE";
                 strSQL += string.Format(" WHERE C.DEPARTMENTCODE = {0}", DepCode);
-                strSQL += " AND C.DELETEFLG = 0";
-                //strSQL += string.Format(" AND C.EMPLOYEECLASSFLG = {0}", (int)CommonDefine.EmployeeClassFlg.Regular);
+                
+                if (bDelFlg)
+                    strSQL += " AND C.DELETEFLG = 0";
+                else
+                    strSQL += " AND C.DELETEFLG != 0";
+
                 strSQL += " GROUP BY C.DISPLAYORDER, C.PERSONCODE, C.PERSONNAME, C.EMPLOYEECLASSFLG";
                 strSQL += " ORDER BY 11, 3 ASC";
 
@@ -1616,9 +1739,9 @@
         }
         #endregion
 
-        #region •”��‚²‚Æ‚Ìˆê——ƒf�[ƒ^‚Å’S“–ŽÒ‚Ìƒf�[ƒ^‚ð’Ç‰Á‚ÅŽæ“¾‚·‚é
+        #region •”��‚²‚Æ‚Ìˆê——ƒf�[ƒ^‚Å’S“–ŽÒ‚Ì�í�œƒf�[ƒ^‚ð’Ç‰Á‚ÅŽæ“¾‚·‚é
         /// <summary>
-        /// •”��‚²‚Æ‚Ìˆê——ƒf�[ƒ^‚Å’S“–ŽÒ‚Ìƒf�[ƒ^‚ð’Ç‰Á‚ÅŽæ“¾‚·‚é
+        /// •”��‚²‚Æ‚Ìˆê——ƒf�[ƒ^‚Å’S“–ŽÒ‚Ì�í�œƒf�[ƒ^‚ð’Ç‰Á‚ÅŽæ“¾‚·‚é
         /// </summary>
         private void GetType2DeleteData(IOConstructionLedger LedgerDB, ref ArrayList arData)
         {
@@ -1625,46 +1748,9 @@
             string strSQL = string.Empty;
             try
             {
-                // SQL‚ÉƒAƒNƒZƒX�§ŒÀ‚ð‚©‚¯‚é
-                string strSecurity = string.Empty;
-                CreateSecuritySQL(ref strSecurity);
-
-                int NotOrder = CommonDefine.ProjectsStatus.First(x => x.Value.Equals("”ñ Žó ’�")).Key;
-                int DepCode = CommonMotions.cnvInt(cmbDepartment.SelectedValue);
                 // ----- ‚r‚p‚k�ì�¬
-                // ‘¶�Ý�Ú�×‘ä’ ƒf�[ƒ^ŒŸ�õ
-                strSQL = "SELECT";
-
-                strSQL += " C.PERSONCODE";
-                strSQL += " ,C.PERSONNAME";
-                strSQL += " ,C.DISPLAYORDER";
-                strSQL += " ,SUM(A.ORDERSDECISIONPRICE)";
-                strSQL += " ,SUM(A.COMPANYEXPENSES)";
-                strSQL += " ,SUM(A.DEPARTMENTEXPENSES)";
-                strSQL += " ,SUM(A.SALESEXPENSES)";
-                strSQL += " ,SUM(A.TOTALPAYMENT)";
-                strSQL += " ,SUM(A.GROSSPROFIT)";
-                strSQL += " ,SUM(A.NETPROFIT)";
-                strSQL += " ,C.EMPLOYEECLASSFLG";
-
-                strSQL += " FROM PERSONINCHARGEMASTER C";
-                strSQL += " LEFT JOIN CONSTRUCTIONBASEINFO B ON B.CONSTRUCTIONPERSONCODE = C.PERSONCODE";
-                strSQL += string.Format(" AND B.CONSTRUCTIONPERIOD = {0}", numUDConstPro.Value);
-                strSQL += string.Format(" AND B.CONSTRUCTIONSTATUSFLG != {0}", NotOrder);
-                strSQL += string.Format(" AND B.TyingFlg != {0}", (int)CommonDefine.BaseInfoTyingFlg.Tying);
-
-                strSQL += ", CONSTRUCTIONLEDGER A";
-                //strSQL += " LEFT JOIN CONSTRUCTIONLEDGER A ON A.CONSTRUCTIONCODE = B.CONSTRUCTIONCODE";
-
-                strSQL += string.Format(" WHERE C.DEPARTMENTCODE = {0}", DepCode);
-                strSQL += " AND A.CONSTRUCTIONCODE = B.CONSTRUCTIONCODE";
-
-                strSQL += " AND C.DELETEFLG != 0";
-                //strSQL += string.Format(" AND C.EMPLOYEECLASSFLG = {0}", (int)CommonDefine.EmployeeClassFlg.Regular);
-
-                strSQL += " GROUP BY C.DISPLAYORDER, C.PERSONCODE, C.PERSONNAME, C.EMPLOYEECLASSFLG";
-                strSQL += " ORDER BY 11, 3 ASC";
-
+                CreateType2SQL(false, ref strSQL);
+                
                 if (!LedgerDB.ExecuteReader(strSQL, ref arData)) return;
             }
             catch (Exception ex)
@@ -1689,80 +1775,31 @@
                 // •”��ƒR�[ƒhŽæ“¾
                 int DepartmentCode = GetDepartmentCode();
 
-                // “–ŠúŠúŽñ“ú�EŠú––“ú‚ðŽæ“¾
-                DateTime dtCurDefaultStart = dtDefaultStart;
-                DateTime dtCurDefaultEnd = dtDefaultEnd;
-
                 int TotalSalary = 0;        // ‹‹—^—Ý�ÏŽæ“¾
                 int OnSalary = 0;           // �U•ª‹‹—^‹àŠzŽæ“¾
                 int NetIncome = 0;          // �ƒ—˜‰v‹àŠzŽæ“¾
                 int NonSalary = 0;          // ‘e—˜‰v‹àŠzŽæ“¾
 
-                DateTime dtStart = DateTime.MinValue;
-                DateTime dtEnd = DateTime.MinValue;
-                DateTime dtMax = DateTime.MaxValue;
-                DateTime dtDispStart = DateTime.MaxValue;
-                DateTime dtDispComplate = DateTime.MinValue;
+                DateTime stDate = DateTime.Today;
+                DateTime edDate = DateTime.Today;
+
+                DateTime dtCurDefaultStart = dtDefaultStart;
+                DateTime dtCurDefaultEnd = DateTime.Today;
                 // ‹‹—^‚ð�WŒv‚·‚é
                 for (int i = 0; i < PersonCDArray.Count; i++)
                 {
-                    // “–ŠúŠúŽñ“ú�EŠú––“ú‚ðŽæ“¾
-                    dtCurDefaultStart = dtDefaultStart;
-                    dtCurDefaultEnd = dtDefaultEnd;
+                    // ŠJŽn�E�I—¹“ú‚ª–³‚¢�ê�‡‚ÍƒfƒtƒHƒ‹ƒg‚ÌŠúŽñ�EŠú––‚ðŽg—p‚·‚é
+                    stDate = dtStartArray[i];
+                    edDate = dtMaxCompArray[i];
+                    CalcStartCompDate(dtDefaultStart, dtDefaultEnd, dtHireStDayArray[i], dtHireEdDayArray[i], ref stDate, ref edDate);
 
-                    // “üŽÐ“ú‚ªŠú“à‚È‚ç‚ÎŠJŽn‚ð“üŽÐ“ú‚É‚·‚é
-                    if (dtDefaultStart < dtHireStDayArray[i] && dtHireStDayArray[i] < dtDefaultEnd)
-                    {
-                        dtCurDefaultStart = dtHireStDayArray[i];
-                    }
-                    // ‘ÞŽÐ“ú‚ªŠú“à‚È‚ç‚Î�I—¹‚ð‘ÞŽÐ“ú‚É‚·‚é
-                    if (dtDefaultStart < dtHireEdDayArray[i] && dtHireEdDayArray[i] < dtDefaultEnd)
-                    {
-                        dtCurDefaultEnd = dtHireEdDayArray[i];
-                    }
-                    
-                    // ŠJŽn“úŽæ“¾
-                    dtStart = dtStartArray[i];
-                    // ƒf�[ƒ^‚ª–³‚¢�ê�‡‚ÍŠúŽñ“ú‚ðƒZƒbƒg‚·‚é
-                    if (dtStart == DateTime.MaxValue)
-                    {
-                        dtStart = dtCurDefaultStart;
-                    }
-                    else if (dtCurDefaultStart < dtStart)
-                    {   // ŠJŽn“ú‚ªŠúŽñ‚æ‚èŒã‚È‚ç‚ÎŠúŽñ“ú‚ðƒZƒbƒg‚·‚é
-                        dtStart = dtCurDefaultStart;
-                    }
-
-                    // �Å‘å“úŽæ“¾
-                    dtMax = dtMaxCompArray[i];
-                    if (dtMax == DateTime.MinValue) dtMax = dtCurDefaultEnd;
-                    // �Å‘å“ú‚ª�¡“ú‚æ‚è�¬‚³‚¢�ê�‡
-                    if (dtMax < DateTime.Today.Date)
-                    {
-                        if (numUDConstPro.Value < CommonMotions.SystemMasterData.BusinessPeriod)
-                        {   // ‘OŠúˆÈ‘O‚ÍŠú––
-                            dtMax = dtCurDefaultEnd;
-                        }
-                        else if (dtHireEdDayArray[i] != DateTime.MinValue
-                                && (dtDefaultStart < dtHireEdDayArray[i] && dtHireEdDayArray[i] < dtDefaultEnd))
-                        {   // ‘ÞŽÐ“ú‚ªŠú“à‚È‚ç‚Î�I—¹‚ð‘ÞŽÐ“ú‚É‚·‚é
-                            dtMax = dtCurDefaultEnd;
-                        }
-                        else
-                        {   // ˆÈŠO‚Í�¡“ú
-                            dtMax = DateTime.Today.Date;
-                        }
-                    }
-
                     // ‹‹—^—Ý�ÏŽæ“¾
-                    int workSalary = CalcElapsedSalary(dtStart, dtMax, PersonCDArray[i], SalaryArray[i]);
+                    int workSalary = CalcElapsedSalary(stDate, edDate, PersonCDArray[i], SalaryArray[i]);
                     // —ÝŒv‰ÁŽZ
-                    if (workSalary > 0) TotalSalary += workSalary;
-                    // Debug.WriteLine(string.Format("Code={0} Val={1} Start={2} End={3}", PersonCDArray[i], workSalary.ToString("0,0"), dtStart, dtMax));
+                    TotalSalary += workSalary;
 
-                    // ŒvŽZŠJŽn�I—¹“ú‚ðŽæ“¾‚·‚é
-                    if (dtStart < dtDispStart) dtDispStart = dtStart;
-                    if (dtDispComplate < dtMax) dtDispComplate = dtMax;
+                    if (stDate < dtCurDefaultStart) dtCurDefaultStart = stDate;
+                    if (dtCurDefaultEnd < edDate) dtCurDefaultEnd = edDate;
                 }
 
                 // ----- •\Ž¦�ˆ—�
@@ -1778,26 +1815,30 @@
                 // ‹‹—^�·ŠzŒvŽZ�E•\Ž¦
                 int TotalValue = OnSalary - TotalSalary;
                 lblTotalValue.Text = TotalValue.ToString("#,0");
-                lblTotalValue2.Text = TotalValue.ToString("#,0");
+                lblCalcValue3.Text = TotalValue.ToString("#,0");
 
-                // �ƒ—˜‰v‹àŠz•\Ž¦
-                lblCalcValue2.Text = NetIncome.ToString("#,0");
+                // �U•ª‹àŠz‚ðŽæ“¾‚·‚é
+                int[] CostValue = new int[2];
+                GetPersonAuxiliaryCostValue(DepartmentCode, 0, ref CostValue);
 
-                // “–Šú�ƒ—˜‰vŒvŽZ
-                int CalcTotal1 = NetIncome + TotalValue;
+                // •›’S“–ŽÒŽû‰v‹àŠz•\Ž¦
+                lblCalcValue2.Text = CostValue[0].ToString("#,0");
+
+                // Žw“±ˆõŽû‰v‹àŠz•\Ž¦
+                lblTotalValue2.Text = CostValue[1].ToString("#,0");
+
+                // ’S“–ŠOŽû‰vŒvŽZ
+                int CalcTotal1 = CostValue[0] + CostValue[1];
                 lblTotalCalcValue1.Text = CalcTotal1.ToString("#,0");
                 lblTotalCalcValue2.Text = CalcTotal1.ToString("#,0");
 
-                // ‘e—˜‰v‹àŠzŽæ“¾
-                lblCalcValue3.Text = NonSalary.ToString("#,0");
-
-                // “–Šú�ƒ—˜‰vŒvŽZ
-                int CalcTotal = NonSalary + CalcTotal1;
+                // �lŒ�”ïŒv
+                int CalcTotal = TotalValue + CalcTotal1;
                 lblTotalCalcValue.Text = CalcTotal.ToString("#,0");
 
                 // ‹‹—^ŒvŽZŠJŽn“ú�E�I—¹“ú
-                lblStartDate.Text = dtDispStart.ToShortDateString();
-                lblEndDate.Text = dtDispComplate.ToShortDateString();
+                lblStartDate.Text = dtCurDefaultStart.ToShortDateString();
+                lblEndDate.Text = dtCurDefaultEnd.ToShortDateString();
             }
             catch (Exception ex)
             {
@@ -1818,23 +1859,9 @@
             IOMPersonSalary SalDB = new IOMPersonSalary();
             try
             {
-                //// ‰Ò“­“ú�”‚ðŽæ“¾‚·‚é
-                //int WorkingDay = ClsCalendar.CalcPassedDaysCount(dtStart, dtLast);
-
-                //// ‹‹—^Žæ“¾
-                //int MonthlyPay = CommonMotions.cnvRound(Salary * CommonDefine.s_SalaryCorrection);
-
-                //// “ú“–ŒvŽZ
-                //double daylySalary = CommonMotions.cnvRound(MonthlyPay / CommonDefine.s_ManHourUnitMonth);
-
-                //// Œo‰ß‹‹—^ŒvŽZ
-                //int RetSalary =CommonMotions.cnvRound(WorkingDay * daylySalary);
-
-                //string strSQL = "SELECT * FROM";
                 string strSQL = "SELECT SUM(SALARY) FROM";
                 
                 strSQL += " (SELECT AX.DT,";
-                //strSQL += string.Format(" ROUND((A.MONTHLYSALARY * {0})/ {1}),", CommonDefine.s_SalaryCorrection, CommonDefine.s_ManHourUnitMonth);
                 strSQL += string.Format(" ROUND((A.MONTHLYSALARY * {0})/ {1}) SALARY,", CommonDefine.s_SalaryCorrection, CommonDefine.s_ManHourUnitMonth);
 
                 strSQL += " row_number() OVER(PARTITION BY AX.DT ORDER BY A.STARTDATE DESC) row_num";
Index: trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Proceedings/FrmProceedingsAuxiliary.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Proceedings/FrmProceedingsAuxiliary.cs	(revision 141)
+++ trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Proceedings/FrmProceedingsAuxiliary.cs	(revision 142)
@@ -956,13 +956,34 @@
                 cmbConstructionPerson.Items.Clear();
                 cmbConstructionPerson.Text = "";
 
+                int DepartmentCode = GetDepartmentCode();
                 string strSQL = string.Empty;
-                int DepartmentCode = GetDepartmentCode();
+                // æ¤œç´¢æ�¡ä»¶
+                strSQL = string.Format(" WHERE LEDGERFLG = {0}", (int)CommonDefine.PersonLedgerDivNo.CalcTarget);
+                strSQL += " AND (DEPARTMENTCODE";
+                string strSubSQL = string.Empty;
                 if (DepartmentCode == 0)
-                    strSQL = " WHERE DeleteFlg = 0 Order By EmployeeClassFlg ASC, DisplayOrder ASC";
+                {
+                    // å�‚ç…§éƒ¨ç½²ãƒžã‚¹ã‚¿ã‚ˆã‚Šå�–å¾—ã�™ã‚‹
+                    strSubSQL += string.Format(" IN (SELECT AA.DEPARTMENTCODE FROM PERSONDEPARTMENTMASTER AA WHERE AA.PERSONCODE = {0})"
+                                            , CommonMotions.LoginUserData.PersonCode);
+                }
                 else
-                    strSQL = string.Format(" WHERE DEPARTMENTCODE = {0} AND DeleteFlg = 0 Order By EmployeeClassFlg ASC, DisplayOrder ASC", DepartmentCode);
+                {
+                    strSubSQL += string.Format(" = {0}", DepartmentCode);
+                }
+                strSQL += strSubSQL + ")";
 
+                // å½“æœŸæœŸé¦–æ—¥ãƒ»æœŸæœ«æ—¥ã‚’å�–å¾—
+                DateTime dtDefaultStart = DateTime.MinValue;
+                DateTime dtDefaultEnd = DateTime.MinValue;
+                CreateDefaultStartAndEndDate(ref dtDefaultStart, ref dtDefaultEnd);
+
+                strSQL += string.Format(" AND (STARTDATE <= TO_DATE('{0}','YYYY/MM/DD')", dtDefaultEnd.ToShortDateString());
+                strSQL += string.Format(" AND (TO_DATE('{0}','YYYY/MM/DD') <= ENDDATE", dtDefaultStart.ToShortDateString());
+                strSQL += string.Format(" OR TO_DATE('{0}','YYYY/MM/DD') = ENDDATE))", DateTime.MinValue.ToShortDateString());
+
+                strSQL += " Order By DeleteFlg ASC, EmployeeClassFlg ASC, DisplayOrder ASC";
                 // æ‹…å½“è€…ãƒžã‚¹ã‚¿èª­è¾¼
                 if (!picDB.SelectAction(strSQL, ref workList)) return;
 
@@ -993,6 +1014,37 @@
         }
         #endregion
 
+        #region ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã�®æœŸé¦–æ—¥ãƒ»æœŸæœ«æ—¥ã‚’æ±‚ã‚�ã‚‹
+        /// <summary>
+        /// ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã�®æœŸé¦–æ—¥ãƒ»æœŸæœ«æ—¥ã‚’æ±‚ã‚�ã‚‹
+        /// </summary>
+        /// <param name="dtStart"></param>
+        /// <param name="dtEnd"></param>
+        private void CreateDefaultStartAndEndDate(ref DateTime dtStart, ref DateTime dtEnd)
+        {
+            try
+            {
+                // å½“æœŸæœŸé¦–å¹´æœˆæ—¥ã‚’å�–å¾—
+                int iYear = 0;
+                int month = 0;
+                int day = 0;
+                bool bPeriod = true;
+                if (CommonMotions.SystemMasterData.ConstructionNoBase == (int)CommonDefine.SystemConstructionNoBase.BusinessPeriod)
+                {   // å–¶æ¥­æœŸ
+                    iYear = m_ConstructionBaseInfo.ConstructionPeriod;
+                    bPeriod = true;
+                }
+                CommonMotions.GetBeginningMonthDay(bPeriod, ref month, ref day);
+                dtStart = new DateTime(iYear, month, day);
+                dtEnd = dtStart.AddYears(1).AddDays(-1);     // çµ‚äº†ã�¯ï¼‹1å¹´ï¼�1æ—¥
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("ã‚·ã‚¹ãƒ†ãƒ ã‚¨ãƒ©ãƒ¼ï¼š{0}ï¼š{1}", CommonMotions.GetMethodName(), ex.Message);
+            }
+        }
+        #endregion
+
         #region éƒ¨ç½²ã‚³ãƒ³ãƒœã‚ˆã‚Šæ‹…å½“è€…ã‚³ãƒ¼ãƒ‰ã‚’å�–å¾—ã�™ã‚‹
         /// <summary>
         /// éƒ¨ç½²ã‚³ãƒ³ãƒœã‚ˆã‚Šæ‹…å½“è€…ã‚³ãƒ¼ãƒ‰ã‚’å�–å¾—ã�™ã‚‹
Index: trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/PurchaseOrderStatus/FrmPurchaseOrderStatus.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/PurchaseOrderStatus/FrmPurchaseOrderStatus.cs	(revision 141)
+++ trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/PurchaseOrderStatus/FrmPurchaseOrderStatus.cs	(revision 142)
@@ -227,6 +227,7 @@
         /// <param name="e"></param>
         private void FrmConstructionBaseInfoList_Load(object sender, EventArgs e)
         {
+            SetInitnumUDConstPro();
             // ƒRƒ“ƒ{ƒ{ƒbƒNƒXƒZƒbƒg
             SetcmbDepartment();
             SetcmbPersons();
@@ -317,6 +318,15 @@
         private void numUDConstPro_ValueChanged(object sender, EventArgs e)
         {
             if (m_initDataLoad) return;
+
+            // ƒRƒ“ƒ{ƒ{ƒbƒNƒXƒZƒbƒg
+            int DepCode = CommonMotions.cnvInt(cmbDepartment.SelectedValue);
+            int PerCode = CommonMotions.cnvInt(cmbConstructionPerson.SelectedValue);
+            SetcmbDepartment();
+            SetcmbPersons();
+            cmbDepartment.SelectedValue = DepCode;
+            cmbConstructionPerson.SelectedValue = PerCode;
+
             // ƒf�[ƒ^•\Ž¦
             DataDisplay();
         }
Index: trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/PurchaseOrderStatus/FrmPurchaseOrderStatusAuxiliary.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/PurchaseOrderStatus/FrmPurchaseOrderStatusAuxiliary.cs	(revision 141)
+++ trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/PurchaseOrderStatus/FrmPurchaseOrderStatusAuxiliary.cs	(revision 142)
@@ -912,6 +912,31 @@
         }
         #endregion
 
+        #region ‘Î�Û”N“x�‰ŠúƒZƒbƒg
+        /// <summary>
+        /// ‘Î�Û”N“x�‰ŠúƒZƒbƒg
+        /// </summary>
+        private void SetInitnumUDConstPro()
+        {
+            try
+            {
+                // ŒŸ�õ”N“xƒZƒbƒg
+                // ƒf�[ƒ^‚É‚ ‚éŽ–‹ÆŠú‚ÆŒ»�Ý‚ÌŽ–‹ÆƒZƒbƒg
+                int minval = 0;
+                int maxval = 0;
+                CommonMotions.GetPeriodYear(ref minval, ref maxval);
+                numUDConstPro.Minimum = minval;
+                numUDConstPro.Maximum = maxval;
+                numUDConstPro.Value = CommonMotions.SystemMasterData.BusinessPeriod;
+
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("ƒVƒXƒeƒ€ƒGƒ‰�[�F{0}�F{1}", CommonMotions.GetMethodName(), ex.Message);
+            }
+        }
+        #endregion
+
         #region �‰ŠúŽž‚Éƒ�ƒOƒCƒ“’S“–ŽÒ‚ðƒZƒbƒg‚·‚é
         /// <summary>
         /// �‰ŠúŽž‚Éƒ�ƒOƒCƒ“’S“–ŽÒ‚ðƒZƒbƒg‚·‚é
@@ -949,7 +974,7 @@
                 else
                 {
                     // ‘I‘ð•”��‚ª•¡�”‚ÌŽÒ‚ÍƒZƒbƒg‚µ‚È‚¢
-                    if (cmbDepartment.Items.Count > 1) return;
+                    if (cmbDepartment.Items.Count > 2) return;
                     cmbDepartment.SelectedValue = CommonMotions.LoginUserData.DepartmentCode;
                     SetcmbPersons();
                     cmbConstructionPerson.SelectedValue = CommonMotions.LoginUserData.PersonCode;
@@ -1070,22 +1095,34 @@
                 cmbConstructionPerson.Items.Clear();
                 cmbConstructionPerson.Text = "";
 
+                int DepartmentCode = GetDepartmentCode();
                 string strSQL = string.Empty;
-                int DepartmentCode = GetDepartmentCode();
+                // ŒŸ�õ�ðŒ�
+                strSQL = string.Format(" WHERE LEDGERFLG = {0}", (int)CommonDefine.PersonLedgerDivNo.CalcTarget);
+                strSQL += " AND (DEPARTMENTCODE";
+                string strSubSQL = string.Empty;
                 if (DepartmentCode == 0)
                 {
-                    strSQL = " WHERE DeleteFlg = 0";
-                    strSQL += string.Format(" AND EmployeeClassFlg = {0}", (int)CommonDefine.EmployeeClassFlg.Regular);
                     // ŽQ�Æ•”��ƒ}ƒXƒ^‚æ‚èŽæ“¾‚·‚é
-                    strSQL += " AND DEPARTMENTCODE IN (SELECT AA.DEPARTMENTCODE FROM PERSONDEPARTMENTMASTER AA";
-                    strSQL += string.Format(" WHERE AA.PERSONCODE = {0})", CommonMotions.LoginUserData.PersonCode);
-                    strSQL += " Order By EmployeeClassFlg ASC, DisplayOrder ASC";
+                    strSubSQL += string.Format(" IN (SELECT AA.DEPARTMENTCODE FROM PERSONDEPARTMENTMASTER AA WHERE AA.PERSONCODE = {0})"
+                                            , CommonMotions.LoginUserData.PersonCode);
                 }
                 else
                 {
-                    strSQL = string.Format(" WHERE DEPARTMENTCODE = {0} AND DeleteFlg = 0 Order By EmployeeClassFlg ASC, DisplayOrder ASC", DepartmentCode);
+                    strSubSQL += string.Format(" = {0}", DepartmentCode);
                 }
+                strSQL += strSubSQL + ")";
 
+                // “–ŠúŠúŽñ“ú�EŠú––“ú‚ðŽæ“¾
+                DateTime dtDefaultStart = DateTime.MinValue;
+                DateTime dtDefaultEnd = DateTime.MinValue;
+                CreateDefaultStartAndEndDate(ref dtDefaultStart, ref dtDefaultEnd);
+
+                strSQL += string.Format(" AND (STARTDATE <= TO_DATE('{0}','YYYY/MM/DD')", dtDefaultEnd.ToShortDateString());
+                strSQL += string.Format(" AND (TO_DATE('{0}','YYYY/MM/DD') <= ENDDATE", dtDefaultStart.ToShortDateString());
+                strSQL += string.Format(" OR TO_DATE('{0}','YYYY/MM/DD') = ENDDATE))", DateTime.MinValue.ToShortDateString());
+
+                strSQL += " Order By DeleteFlg ASC, EmployeeClassFlg ASC, DisplayOrder ASC";
                 // ’S“–ŽÒƒ}ƒXƒ^“Ç�ž
                 if (!picDB.SelectAction(strSQL, ref workList)) return;
 
@@ -1126,6 +1163,37 @@
         }
         #endregion
 
+        #region ƒfƒtƒHƒ‹ƒg‚ÌŠúŽñ“ú�EŠú––“ú‚ð‹�‚ß‚é
+        /// <summary>
+        /// ƒfƒtƒHƒ‹ƒg‚ÌŠúŽñ“ú�EŠú––“ú‚ð‹�‚ß‚é
+        /// </summary>
+        /// <param name="dtStart"></param>
+        /// <param name="dtEnd"></param>
+        private void CreateDefaultStartAndEndDate(ref DateTime dtStart, ref DateTime dtEnd)
+        {
+            try
+            {
+                // “–ŠúŠúŽñ”NŒŽ“ú‚ðŽæ“¾
+                int iYear = 0;
+                int month = 0;
+                int day = 0;
+                bool bPeriod = true;
+                if (CommonMotions.SystemMasterData.ConstructionNoBase == (int)CommonDefine.SystemConstructionNoBase.BusinessPeriod)
+                {   // ‰c‹ÆŠú
+                    iYear = CommonMotions.PeriodCountToYear(CommonMotions.cnvInt(numUDConstPro.Value));
+                    bPeriod = true;
+                }
+                CommonMotions.GetBeginningMonthDay(bPeriod, ref month, ref day);
+                dtStart = new DateTime(iYear, month, day);
+                dtEnd = dtStart.AddYears(1).AddDays(-1);     // �I—¹‚Í�{1”N�|1“ú
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("ƒVƒXƒeƒ€ƒGƒ‰�[�F{0}�F{1}", CommonMotions.GetMethodName(), ex.Message);
+            }
+        }
+        #endregion
+
         #region ’S“–ŽÒƒRƒ“ƒ{ƒ{ƒbƒNƒXƒZƒbƒgŽž•”��‚ðƒZƒbƒg‚·‚é
         /// <summary>
         /// ’S“–ŽÒƒRƒ“ƒ{ƒ{ƒbƒNƒXƒZƒbƒgŽž•”��‚ðƒZƒbƒg‚·‚é
Index: trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/SubConstrRegist/FrmSubConstrRegistList.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/SubConstrRegist/FrmSubConstrRegistList.cs	(revision 141)
+++ trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/SubConstrRegist/FrmSubConstrRegistList.cs	(revision 142)
@@ -274,6 +274,15 @@
         private void numUDConstPro_ValueChanged(object sender, EventArgs e)
         {
             if (m_OpeRestrict) return;
+
+            // ƒRƒ“ƒ{ƒ{ƒbƒNƒXƒZƒbƒg
+            int DepCode = CommonMotions.cnvInt(cmbDepartment.SelectedValue);
+            int PerCode = CommonMotions.cnvInt(cmbConstructionPerson.SelectedValue);
+            SetcmbDepartment();
+            SetcmbPersons();
+            cmbDepartment.SelectedValue = DepCode;
+            cmbConstructionPerson.SelectedValue = PerCode;
+
             // ƒf�[ƒ^•\Ž¦
             DataDisplay();
         }
Index: trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/SubConstrRegist/FrmSubConstrRegistListAuxiliary.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/SubConstrRegist/FrmSubConstrRegistListAuxiliary.cs	(revision 141)
+++ trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/SubConstrRegist/FrmSubConstrRegistListAuxiliary.cs	(revision 142)
@@ -66,7 +66,7 @@
         {
             try
             {
-                if (cmbDepartment.Items.Count > 1) return;
+                if (cmbDepartment.Items.Count > 2) return;
                 cmbDepartment.SelectedValue = CommonMotions.LoginUserData.DepartmentCode;
                 SetcmbPersons();
                 cmbConstructionPerson.SelectedValue = CommonMotions.LoginUserData.PersonCode;
@@ -761,22 +761,34 @@
                 cmbConstructionPerson.Items.Clear();
                 cmbConstructionPerson.Text = "";
 
+                int DepartmentCode = GetDepartmentCode();
                 string strSQL = string.Empty;
-                int DepartmentCode = GetDepartmentCode();
+                // ŒŸ�õ�ðŒ�
+                strSQL = string.Format(" WHERE LEDGERFLG = {0}", (int)CommonDefine.PersonLedgerDivNo.CalcTarget);
+                strSQL += " AND (DEPARTMENTCODE";
+                string strSubSQL = string.Empty;
                 if (DepartmentCode == 0)
                 {
-                    strSQL = " WHERE DeleteFlg = 0";
-                    strSQL += string.Format(" AND EmployeeClassFlg = {0}", (int)CommonDefine.EmployeeClassFlg.Regular);
                     // ŽQ�Æ•”��ƒ}ƒXƒ^‚æ‚èŽæ“¾‚·‚é
-                    strSQL += " AND DEPARTMENTCODE IN (SELECT AA.DEPARTMENTCODE FROM PERSONDEPARTMENTMASTER AA";
-                    strSQL += string.Format(" WHERE AA.PERSONCODE = {0})", CommonMotions.LoginUserData.PersonCode);
-                    strSQL += " Order By EmployeeClassFlg ASC, DisplayOrder ASC";
+                    strSubSQL += string.Format(" IN (SELECT AA.DEPARTMENTCODE FROM PERSONDEPARTMENTMASTER AA WHERE AA.PERSONCODE = {0})"
+                                            , CommonMotions.LoginUserData.PersonCode);
                 }
                 else
                 {
-                    strSQL = string.Format(" WHERE DEPARTMENTCODE = {0} AND DeleteFlg = 0 Order By EmployeeClassFlg ASC, DisplayOrder ASC", DepartmentCode);
+                    strSubSQL += string.Format(" = {0}", DepartmentCode);
                 }
+                strSQL += strSubSQL + ")";
 
+                // “–ŠúŠúŽñ“ú�EŠú––“ú‚ðŽæ“¾
+                DateTime dtDefaultStart = DateTime.MinValue;
+                DateTime dtDefaultEnd = DateTime.MinValue;
+                CreateDefaultStartAndEndDate(ref dtDefaultStart, ref dtDefaultEnd);
+
+                strSQL += string.Format(" AND (STARTDATE <= TO_DATE('{0}','YYYY/MM/DD')", dtDefaultEnd.ToShortDateString());
+                strSQL += string.Format(" AND (TO_DATE('{0}','YYYY/MM/DD') <= ENDDATE", dtDefaultStart.ToShortDateString());
+                strSQL += string.Format(" OR TO_DATE('{0}','YYYY/MM/DD') = ENDDATE))", DateTime.MinValue.ToShortDateString());
+
+                strSQL += " Order By DeleteFlg ASC, EmployeeClassFlg ASC, DisplayOrder ASC";
                 // ’S“–ŽÒƒ}ƒXƒ^“Ç�ž
                 if (!picDB.SelectAction(strSQL, ref workList)) return;
 
@@ -807,6 +819,37 @@
         }
         #endregion
 
+        #region ƒfƒtƒHƒ‹ƒg‚ÌŠúŽñ“ú�EŠú––“ú‚ð‹�‚ß‚é
+        /// <summary>
+        /// ƒfƒtƒHƒ‹ƒg‚ÌŠúŽñ“ú�EŠú––“ú‚ð‹�‚ß‚é
+        /// </summary>
+        /// <param name="dtStart"></param>
+        /// <param name="dtEnd"></param>
+        private void CreateDefaultStartAndEndDate(ref DateTime dtStart, ref DateTime dtEnd)
+        {
+            try
+            {
+                // “–ŠúŠúŽñ”NŒŽ“ú‚ðŽæ“¾
+                int iYear = 0;
+                int month = 0;
+                int day = 0;
+                bool bPeriod = true;
+                if (CommonMotions.SystemMasterData.ConstructionNoBase == (int)CommonDefine.SystemConstructionNoBase.BusinessPeriod)
+                {   // ‰c‹ÆŠú
+                    iYear = CommonMotions.PeriodCountToYear(CommonMotions.cnvInt(numUDConstPro.Value));
+                    bPeriod = true;
+                }
+                CommonMotions.GetBeginningMonthDay(bPeriod, ref month, ref day);
+                dtStart = new DateTime(iYear, month, day);
+                dtEnd = dtStart.AddYears(1).AddDays(-1);     // �I—¹‚Í�{1”N�|1“ú
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("ƒVƒXƒeƒ€ƒGƒ‰�[�F{0}�F{1}", CommonMotions.GetMethodName(), ex.Message);
+            }
+        }
+        #endregion
+
         #region ’S“–ŽÒƒRƒ“ƒ{ƒ{ƒbƒNƒXƒZƒbƒgŽž•”��‚ðƒZƒbƒg‚·‚é
         /// <summary>
         /// ’S“–ŽÒƒRƒ“ƒ{ƒ{ƒbƒNƒXƒZƒbƒgŽž•”��‚ðƒZƒbƒg‚·‚é
Index: trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/TAndPCosts/FrmTAndPCostsAuxiliary.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/TAndPCosts/FrmTAndPCostsAuxiliary.cs	(revision 141)
+++ trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/TAndPCosts/FrmTAndPCostsAuxiliary.cs	(revision 142)
@@ -141,7 +141,7 @@
             try
             {
                 // é�¸æŠžéƒ¨ç½²ã�Œè¤‡æ•°ã�®è€…ã�¯ã‚»ãƒƒãƒˆã�—ã�ªã�„
-                if (cmbDepartment.Items.Count > 1) return;
+                if (cmbDepartment.Items.Count > 2) return;
 
                 cmbDepartment.SelectedValue = CommonMotions.LoginUserData.DepartmentCode;
                 SetcombBoxPerson();
Index: trunk/src/ProcessManagement/ProcessManagement/Forms/Master/PersonInCharge/FrmPersonInCharge.designer.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/Forms/Master/PersonInCharge/FrmPersonInCharge.designer.cs	(revision 141)
+++ trunk/src/ProcessManagement/ProcessManagement/Forms/Master/PersonInCharge/FrmPersonInCharge.designer.cs	(revision 142)
@@ -30,16 +30,16 @@
         /// </summary>
         private void InitializeComponent()
         {
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle8 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle9 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle10 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle11 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle12 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle13 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle14 = new System.Windows.Forms.DataGridViewCellStyle();
+            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();
             this.btnDataEntry = new System.Windows.Forms.Button();
             this.btnEnd = new System.Windows.Forms.Button();
             this.label1 = new System.Windows.Forms.Label();
@@ -58,8 +58,13 @@
             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.dgvSalary = new ProcessManagement.Forms.CustomControls.DataGridViewEX();
+            this.SalaryColumn1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.SalaryColumn2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.SalaryColumn3 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.label7 = new System.Windows.Forms.Label();
             this.txtInput6 = new System.Windows.Forms.TextBox();
             this.label10 = new System.Windows.Forms.Label();
@@ -74,13 +79,20 @@
             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();
+            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.btnRefDepAdd = new System.Windows.Forms.Button();
             this.btnRefDepDel = new System.Windows.Forms.Button();
             this.label4 = new System.Windows.Forms.Label();
@@ -93,21 +105,9 @@
             this.panel2 = new System.Windows.Forms.Panel();
             this.label19 = new System.Windows.Forms.Label();
             this.panel3 = new System.Windows.Forms.Panel();
-            this.label20 = new System.Windows.Forms.Label();
             this.btnChrgToEmp = new System.Windows.Forms.Button();
             this.btnEmpToChrg = new System.Windows.Forms.Button();
-            this.txtInput3 = new ProcessManagement.Forms.CustomControls.TextBoxEX();
-            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.cmbDepartment = new ProcessManagement.Forms.CustomControls.ComboBoxEX();
-            this.cmbLedgerFlg = new ProcessManagement.Forms.CustomControls.ComboBoxEX();
-            this.cmbSecManage = new ProcessManagement.Forms.CustomControls.ComboBoxEX();
-            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.label20 = new System.Windows.Forms.Label();
             this.dgvMaster = new ProcessManagement.Forms.CustomControls.DataGridViewEX();
             this.Column1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.Column2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
@@ -118,10 +118,10 @@
             this.Column7 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.panel1.SuspendLayout();
             this.tableLayoutPanel1.SuspendLayout();
+            ((System.ComponentModel.ISupportInitialize)(this.dgvSalary)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.dgvRefDepartment)).BeginInit();
             this.panel2.SuspendLayout();
             this.panel3.SuspendLayout();
-            ((System.ComponentModel.ISupportInitialize)(this.dgvSalary)).BeginInit();
-            ((System.ComponentModel.ISupportInitialize)(this.dgvRefDepartment)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.dgvMaster)).BeginInit();
             this.SuspendLayout();
             // 
@@ -416,6 +416,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;
@@ -440,6 +452,78 @@
             this.label2.Text = "ãƒ‘ã‚¹ãƒ¯ãƒ¼ãƒ‰";
             this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
             // 
+            // dgvSalary
+            // 
+            this.dgvSalary.AllowUserToAddRows = false;
+            this.dgvSalary.AllowUserToDeleteRows = false;
+            this.dgvSalary.AllowUserToResizeColumns = false;
+            this.dgvSalary.AllowUserToResizeRows = false;
+            this.dgvSalary.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
+            | System.Windows.Forms.AnchorStyles.Left)));
+            this.dgvSalary.BackgroundColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224)))));
+            this.dgvSalary.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
+            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.dgvSalary.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle11;
+            this.dgvSalary.ColumnHeadersHeight = 24;
+            this.dgvSalary.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing;
+            this.dgvSalary.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
+            this.SalaryColumn1,
+            this.SalaryColumn2,
+            this.SalaryColumn3});
+            this.tableLayoutPanel1.SetColumnSpan(this.dgvSalary, 4);
+            this.dgvSalary.EditMode = System.Windows.Forms.DataGridViewEditMode.EditOnEnter;
+            this.dgvSalary.Location = new System.Drawing.Point(3, 248);
+            this.dgvSalary.MultiSelect = false;
+            this.dgvSalary.Name = "dgvSalary";
+            this.dgvSalary.RowHeadersVisible = false;
+            this.dgvSalary.RowHeadersWidth = 18;
+            this.dgvSalary.RowHeadersWidthSizeMode = System.Windows.Forms.DataGridViewRowHeadersWidthSizeMode.DisableResizing;
+            this.tableLayoutPanel1.SetRowSpan(this.dgvSalary, 3);
+            this.dgvSalary.RowTemplate.Height = 20;
+            this.dgvSalary.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
+            this.dgvSalary.Size = new System.Drawing.Size(570, 106);
+            this.dgvSalary.TabIndex = 21;
+            this.dgvSalary.TabStop = false;
+            // 
+            // SalaryColumn1
+            // 
+            dataGridViewCellStyle12.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
+            this.SalaryColumn1.DefaultCellStyle = dataGridViewCellStyle12;
+            this.SalaryColumn1.Frozen = true;
+            this.SalaryColumn1.HeaderText = "çµ¦ä¸Žé–‹å§‹å¹´æœˆæ—¥";
+            this.SalaryColumn1.Name = "SalaryColumn1";
+            this.SalaryColumn1.ReadOnly = true;
+            this.SalaryColumn1.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
+            this.SalaryColumn1.Width = 190;
+            // 
+            // SalaryColumn2
+            // 
+            dataGridViewCellStyle13.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
+            this.SalaryColumn2.DefaultCellStyle = dataGridViewCellStyle13;
+            this.SalaryColumn2.Frozen = true;
+            this.SalaryColumn2.HeaderText = "æœˆçµ¦ä¸Žé¡�";
+            this.SalaryColumn2.Name = "SalaryColumn2";
+            this.SalaryColumn2.ReadOnly = true;
+            this.SalaryColumn2.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
+            this.SalaryColumn2.Width = 180;
+            // 
+            // SalaryColumn3
+            // 
+            dataGridViewCellStyle14.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
+            this.SalaryColumn3.DefaultCellStyle = dataGridViewCellStyle14;
+            this.SalaryColumn3.Frozen = true;
+            this.SalaryColumn3.HeaderText = "å¹´çµ¦ä¸Žé¡�";
+            this.SalaryColumn3.Name = "SalaryColumn3";
+            this.SalaryColumn3.ReadOnly = true;
+            this.SalaryColumn3.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
+            this.SalaryColumn3.Width = 180;
+            // 
             // label7
             // 
             this.label7.Anchor = System.Windows.Forms.AnchorStyles.Left;
@@ -628,6 +712,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, 2);
+            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, 364);
+            this.cmbDepartment.Name = "cmbDepartment";
+            this.cmbDepartment.Size = new System.Drawing.Size(284, 24);
+            this.cmbDepartment.TabIndex = 9;
+            this.cmbDepartment.TextChanged += new System.EventHandler(this.valueChange);
+            // 
             // txtInput5
             // 
             this.txtInput5.Anchor = System.Windows.Forms.AnchorStyles.Left;
@@ -663,6 +760,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, 504);
+            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;
@@ -676,6 +785,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, 539);
+            this.cmbSecManage.Name = "cmbSecManage";
+            this.cmbSecManage.Size = new System.Drawing.Size(284, 24);
+            this.cmbSecManage.TabIndex = 8;
+            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;
@@ -712,6 +835,77 @@
             this.lblSecRange.TabIndex = 34;
             this.lblSecRange.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
             // 
+            // 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.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224)))));
+            this.dgvRefDepartment.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.dgvRefDepartment.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle15;
+            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, 4);
+            this.dgvRefDepartment.EditMode = System.Windows.Forms.DataGridViewEditMode.EditOnEnter;
+            this.dgvRefDepartment.Location = new System.Drawing.Point(3, 675);
+            this.dgvRefDepartment.MultiSelect = false;
+            this.dgvRefDepartment.Name = "dgvRefDepartment";
+            this.dgvRefDepartment.RowHeadersWidth = 18;
+            this.dgvRefDepartment.RowHeadersWidthSizeMode = System.Windows.Forms.DataGridViewRowHeadersWidthSizeMode.DisableResizing;
+            this.tableLayoutPanel1.SetRowSpan(this.dgvRefDepartment, 3);
+            this.dgvRefDepartment.RowTemplate.Height = 20;
+            this.dgvRefDepartment.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
+            this.dgvRefDepartment.Size = new System.Drawing.Size(570, 104);
+            this.dgvRefDepartment.TabIndex = 21;
+            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
+            // 
+            dataGridViewCellStyle16.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
+            this.TextBoxColumn1.DefaultCellStyle = dataGridViewCellStyle16;
+            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 = 530;
+            // 
+            // cmbRefDepartment
+            // 
+            this.cmbRefDepartment.Anchor = System.Windows.Forms.AnchorStyles.Left;
+            this.tableLayoutPanel1.SetColumnSpan(this.cmbRefDepartment, 2);
+            this.cmbRefDepartment.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+            this.cmbRefDepartment.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
+            this.cmbRefDepartment.FormattingEnabled = true;
+            this.cmbRefDepartment.Location = new System.Drawing.Point(3, 789);
+            this.cmbRefDepartment.Name = "cmbRefDepartment";
+            this.cmbRefDepartment.Size = new System.Drawing.Size(284, 24);
+            this.cmbRefDepartment.TabIndex = 15;
+            this.cmbRefDepartment.TextChanged += new System.EventHandler(this.valueChange);
+            // 
             // btnRefDepAdd
             // 
             this.btnRefDepAdd.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
@@ -871,18 +1065,6 @@
             this.panel3.Size = new System.Drawing.Size(470, 30);
             this.panel3.TabIndex = 24;
             // 
-            // label20
-            // 
-            this.label20.BackColor = System.Drawing.Color.Transparent;
-            this.label20.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
-            this.label20.ForeColor = System.Drawing.Color.Black;
-            this.label20.Location = new System.Drawing.Point(4, 5);
-            this.label20.Name = "label20";
-            this.label20.Size = new System.Drawing.Size(120, 20);
-            this.label20.TabIndex = 24;
-            this.label20.Text = "ãƒ‡ãƒ¼ã‚¿å¤‰æ›´";
-            this.label20.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
-            // 
             // btnChrgToEmp
             // 
             this.btnChrgToEmp.BackColor = System.Drawing.Color.LimeGreen;
@@ -909,200 +1091,18 @@
             this.btnEmpToChrg.UseVisualStyleBackColor = false;
             this.btnEmpToChrg.Click += new System.EventHandler(this.btnEmpToChrg_Click);
             // 
-            // txtInput3
+            // label20
             // 
-            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);
+            this.label20.BackColor = System.Drawing.Color.Transparent;
+            this.label20.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
+            this.label20.ForeColor = System.Drawing.Color.Black;
+            this.label20.Location = new System.Drawing.Point(4, 5);
+            this.label20.Name = "label20";
+            this.label20.Size = new System.Drawing.Size(120, 20);
+            this.label20.TabIndex = 24;
+            this.label20.Text = "ãƒ‡ãƒ¼ã‚¿å¤‰æ›´";
+            this.label20.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.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224)))));
-            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 = 24;
-            this.dgvSalary.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing;
-            this.dgvSalary.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
-            this.SalaryColumn1,
-            this.SalaryColumn2,
-            this.SalaryColumn3});
-            this.tableLayoutPanel1.SetColumnSpan(this.dgvSalary, 4);
-            this.dgvSalary.EditMode = System.Windows.Forms.DataGridViewEditMode.EditOnEnter;
-            this.dgvSalary.Location = new System.Drawing.Point(3, 248);
-            this.dgvSalary.MultiSelect = false;
-            this.dgvSalary.Name = "dgvSalary";
-            this.dgvSalary.RowHeadersVisible = false;
-            this.dgvSalary.RowHeadersWidth = 18;
-            this.dgvSalary.RowHeadersWidthSizeMode = System.Windows.Forms.DataGridViewRowHeadersWidthSizeMode.DisableResizing;
-            this.tableLayoutPanel1.SetRowSpan(this.dgvSalary, 3);
-            this.dgvSalary.RowTemplate.Height = 20;
-            this.dgvSalary.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
-            this.dgvSalary.Size = new System.Drawing.Size(570, 106);
-            this.dgvSalary.TabIndex = 21;
-            this.dgvSalary.TabStop = false;
-            // 
-            // SalaryColumn1
-            // 
-            dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
-            this.SalaryColumn1.DefaultCellStyle = dataGridViewCellStyle2;
-            this.SalaryColumn1.Frozen = true;
-            this.SalaryColumn1.HeaderText = "çµ¦ä¸Žé–‹å§‹å¹´æœˆæ—¥";
-            this.SalaryColumn1.Name = "SalaryColumn1";
-            this.SalaryColumn1.ReadOnly = true;
-            this.SalaryColumn1.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
-            this.SalaryColumn1.Width = 190;
-            // 
-            // SalaryColumn2
-            // 
-            dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
-            this.SalaryColumn2.DefaultCellStyle = dataGridViewCellStyle3;
-            this.SalaryColumn2.Frozen = true;
-            this.SalaryColumn2.HeaderText = "æœˆçµ¦ä¸Žé¡�";
-            this.SalaryColumn2.Name = "SalaryColumn2";
-            this.SalaryColumn2.ReadOnly = true;
-            this.SalaryColumn2.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
-            this.SalaryColumn2.Width = 180;
-            // 
-            // SalaryColumn3
-            // 
-            dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
-            this.SalaryColumn3.DefaultCellStyle = dataGridViewCellStyle4;
-            this.SalaryColumn3.Frozen = true;
-            this.SalaryColumn3.HeaderText = "å¹´çµ¦ä¸Žé¡�";
-            this.SalaryColumn3.Name = "SalaryColumn3";
-            this.SalaryColumn3.ReadOnly = true;
-            this.SalaryColumn3.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
-            this.SalaryColumn3.Width = 180;
-            // 
-            // cmbDepartment
-            // 
-            this.cmbDepartment.Anchor = System.Windows.Forms.AnchorStyles.Left;
-            this.tableLayoutPanel1.SetColumnSpan(this.cmbDepartment, 2);
-            this.cmbDepartment.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
-            this.cmbDepartment.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
-            this.cmbDepartment.FormattingEnabled = true;
-            this.cmbDepartment.Location = new System.Drawing.Point(148, 362);
-            this.cmbDepartment.Name = "cmbDepartment";
-            this.cmbDepartment.Size = new System.Drawing.Size(284, 24);
-            this.cmbDepartment.TabIndex = 9;
-            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, 502);
-            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, 537);
-            this.cmbSecManage.Name = "cmbSecManage";
-            this.cmbSecManage.Size = new System.Drawing.Size(284, 24);
-            this.cmbSecManage.TabIndex = 8;
-            this.cmbSecManage.SelectedValueChanged += new System.EventHandler(this.cmbSecManage_SelectedValueChanged);
-            this.cmbSecManage.TextChanged += new System.EventHandler(this.valueChange);
-            // 
-            // 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.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224)))));
-            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, 4);
-            this.dgvRefDepartment.EditMode = System.Windows.Forms.DataGridViewEditMode.EditOnEnter;
-            this.dgvRefDepartment.Location = new System.Drawing.Point(3, 675);
-            this.dgvRefDepartment.MultiSelect = false;
-            this.dgvRefDepartment.Name = "dgvRefDepartment";
-            this.dgvRefDepartment.RowHeadersWidth = 18;
-            this.dgvRefDepartment.RowHeadersWidthSizeMode = System.Windows.Forms.DataGridViewRowHeadersWidthSizeMode.DisableResizing;
-            this.tableLayoutPanel1.SetRowSpan(this.dgvRefDepartment, 3);
-            this.dgvRefDepartment.RowTemplate.Height = 20;
-            this.dgvRefDepartment.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
-            this.dgvRefDepartment.Size = new System.Drawing.Size(570, 104);
-            this.dgvRefDepartment.TabIndex = 21;
-            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 = 530;
-            // 
-            // cmbRefDepartment
-            // 
-            this.cmbRefDepartment.Anchor = System.Windows.Forms.AnchorStyles.Left;
-            this.tableLayoutPanel1.SetColumnSpan(this.cmbRefDepartment, 2);
-            this.cmbRefDepartment.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
-            this.cmbRefDepartment.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
-            this.cmbRefDepartment.FormattingEnabled = true;
-            this.cmbRefDepartment.Location = new System.Drawing.Point(3, 787);
-            this.cmbRefDepartment.Name = "cmbRefDepartment";
-            this.cmbRefDepartment.Size = new System.Drawing.Size(284, 24);
-            this.cmbRefDepartment.TabIndex = 15;
-            this.cmbRefDepartment.TextChanged += new System.EventHandler(this.valueChange);
-            // 
             // dgvMaster
             // 
             this.dgvMaster.AllowUserToAddRows = false;
@@ -1111,14 +1111,14 @@
             this.dgvMaster.AllowUserToResizeRows = false;
             this.dgvMaster.BackgroundColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224)))));
             this.dgvMaster.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
-            dataGridViewCellStyle7.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
-            dataGridViewCellStyle7.BackColor = System.Drawing.SystemColors.Control;
-            dataGridViewCellStyle7.Font = new System.Drawing.Font("ï¼­ï¼³ æ˜Žæœ�", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
-            dataGridViewCellStyle7.ForeColor = System.Drawing.SystemColors.WindowText;
-            dataGridViewCellStyle7.SelectionBackColor = System.Drawing.SystemColors.Highlight;
-            dataGridViewCellStyle7.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
-            dataGridViewCellStyle7.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
-            this.dgvMaster.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle7;
+            dataGridViewCellStyle17.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
+            dataGridViewCellStyle17.BackColor = System.Drawing.SystemColors.Control;
+            dataGridViewCellStyle17.Font = new System.Drawing.Font("ï¼­ï¼³ æ˜Žæœ�", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
+            dataGridViewCellStyle17.ForeColor = System.Drawing.SystemColors.WindowText;
+            dataGridViewCellStyle17.SelectionBackColor = System.Drawing.SystemColors.Highlight;
+            dataGridViewCellStyle17.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
+            dataGridViewCellStyle17.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
+            this.dgvMaster.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle17;
             this.dgvMaster.ColumnHeadersHeight = 24;
             this.dgvMaster.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing;
             this.dgvMaster.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
@@ -1143,9 +1143,9 @@
             // 
             // Column1
             // 
-            dataGridViewCellStyle8.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
-            dataGridViewCellStyle8.Font = new System.Drawing.Font("ï¼­ï¼³ æ˜Žæœ�", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
-            this.Column1.DefaultCellStyle = dataGridViewCellStyle8;
+            dataGridViewCellStyle18.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
+            dataGridViewCellStyle18.Font = new System.Drawing.Font("ï¼­ï¼³ æ˜Žæœ�", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
+            this.Column1.DefaultCellStyle = dataGridViewCellStyle18;
             this.Column1.Frozen = true;
             this.Column1.HeaderText = "â„–";
             this.Column1.Name = "Column1";
@@ -1155,8 +1155,8 @@
             // 
             // Column2
             // 
-            dataGridViewCellStyle9.Font = new System.Drawing.Font("ï¼­ï¼³ æ˜Žæœ�", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
-            this.Column2.DefaultCellStyle = dataGridViewCellStyle9;
+            dataGridViewCellStyle19.Font = new System.Drawing.Font("ï¼­ï¼³ æ˜Žæœ�", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
+            this.Column2.DefaultCellStyle = dataGridViewCellStyle19;
             this.Column2.Frozen = true;
             this.Column2.HeaderText = "æ‹…å½“è€…ã‚³ãƒ¼ãƒ‰";
             this.Column2.Name = "Column2";
@@ -1166,9 +1166,9 @@
             // 
             // Column3
             // 
-            dataGridViewCellStyle10.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
-            dataGridViewCellStyle10.Font = new System.Drawing.Font("ï¼­ï¼³ æ˜Žæœ�", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
-            this.Column3.DefaultCellStyle = dataGridViewCellStyle10;
+            dataGridViewCellStyle20.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
+            dataGridViewCellStyle20.Font = new System.Drawing.Font("ï¼­ï¼³ æ˜Žæœ�", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
+            this.Column3.DefaultCellStyle = dataGridViewCellStyle20;
             this.Column3.HeaderText = "æ‹…ã€€å½“ã€€è€…ã€€å��";
             this.Column3.Name = "Column3";
             this.Column3.ReadOnly = true;
@@ -1236,11 +1236,11 @@
             this.panel1.ResumeLayout(false);
             this.tableLayoutPanel1.ResumeLayout(false);
             this.tableLayoutPanel1.PerformLayout();
+            ((System.ComponentModel.ISupportInitialize)(this.dgvSalary)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.dgvRefDepartment)).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.dgvMaster)).EndInit();
             this.ResumeLayout(false);
 
Index: trunk/src/ProcessManagement/ProcessManagement/Forms/SubForms/FrmPriceOfBudget.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/Forms/SubForms/FrmPriceOfBudget.cs	(revision 141)
+++ trunk/src/ProcessManagement/ProcessManagement/Forms/SubForms/FrmPriceOfBudget.cs	(revision 142)
@@ -159,6 +159,15 @@
         private void numUDConstPro_ValueChanged(object sender, EventArgs e)
         {
             if (m_initDataLoad) return;
+
+            // ã‚³ãƒ³ãƒœãƒœãƒƒã‚¯ã‚¹ã‚»ãƒƒãƒˆ
+            int DepCode = CommonMotions.cnvInt(cmbDepartment.SelectedValue);
+            int PerCode = CommonMotions.cnvInt(cmbConstructionPerson.SelectedValue);
+            SetcmbDepartment();
+            SetcmbPersons();
+            cmbDepartment.SelectedValue = DepCode;
+            cmbConstructionPerson.SelectedValue = PerCode;
+
             // ãƒ‡ãƒ¼ã‚¿è¡¨ç¤º
             DispData();
         }
@@ -814,22 +823,34 @@
                 cmbConstructionPerson.Items.Clear();
                 cmbConstructionPerson.Text = "";
 
+                int DepartmentCode = GetDepartmentCode();
                 string strSQL = string.Empty;
-                int DepartmentCode = GetDepartmentCode();
+                // æ¤œç´¢æ�¡ä»¶
+                strSQL = string.Format(" WHERE LEDGERFLG = {0}", (int)CommonDefine.PersonLedgerDivNo.CalcTarget);
+                strSQL += " AND (DEPARTMENTCODE";
+                string strSubSQL = string.Empty;
                 if (DepartmentCode == 0)
                 {
-                    strSQL = " WHERE DeleteFlg = 0";
-                    strSQL += string.Format(" AND EmployeeClassFlg = {0}", (int)CommonDefine.EmployeeClassFlg.Regular);
                     // å�‚ç…§éƒ¨ç½²ãƒžã‚¹ã‚¿ã‚ˆã‚Šå�–å¾—ã�™ã‚‹
-                    strSQL += " AND DEPARTMENTCODE IN (SELECT AA.DEPARTMENTCODE FROM PERSONDEPARTMENTMASTER AA";
-                    strSQL += string.Format(" WHERE AA.PERSONCODE = {0})", CommonMotions.LoginUserData.PersonCode);
-                    strSQL += " Order By EmployeeClassFlg ASC, DisplayOrder ASC";
+                    strSubSQL += string.Format(" IN (SELECT AA.DEPARTMENTCODE FROM PERSONDEPARTMENTMASTER AA WHERE AA.PERSONCODE = {0})"
+                                            , CommonMotions.LoginUserData.PersonCode);
                 }
                 else
                 {
-                    strSQL = string.Format(" WHERE DEPARTMENTCODE = {0} AND DeleteFlg = 0 Order By EmployeeClassFlg ASC, DisplayOrder ASC", DepartmentCode);
+                    strSubSQL += string.Format(" = {0}", DepartmentCode);
                 }
+                strSQL += strSubSQL + ")";
 
+                // å½“æœŸæœŸé¦–æ—¥ãƒ»æœŸæœ«æ—¥ã‚’å�–å¾—
+                DateTime dtDefaultStart = DateTime.MinValue;
+                DateTime dtDefaultEnd = DateTime.MinValue;
+                CreateDefaultStartAndEndDate(ref dtDefaultStart, ref dtDefaultEnd);
+
+                strSQL += string.Format(" AND (STARTDATE <= TO_DATE('{0}','YYYY/MM/DD')", dtDefaultEnd.ToShortDateString());
+                strSQL += string.Format(" AND (TO_DATE('{0}','YYYY/MM/DD') <= ENDDATE", dtDefaultStart.ToShortDateString());
+                strSQL += string.Format(" OR TO_DATE('{0}','YYYY/MM/DD') = ENDDATE))", DateTime.MinValue.ToShortDateString());
+
+                strSQL += " Order By DeleteFlg ASC, EmployeeClassFlg ASC, DisplayOrder ASC";
                 // æ‹…å½“è€…ãƒžã‚¹ã‚¿èª­è¾¼
                 if (!picDB.SelectAction(strSQL, ref workList)) return false;
 
@@ -861,6 +882,37 @@
         }
         #endregion
 
+        #region ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã�®æœŸé¦–æ—¥ãƒ»æœŸæœ«æ—¥ã‚’æ±‚ã‚�ã‚‹
+        /// <summary>
+        /// ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã�®æœŸé¦–æ—¥ãƒ»æœŸæœ«æ—¥ã‚’æ±‚ã‚�ã‚‹
+        /// </summary>
+        /// <param name="dtStart"></param>
+        /// <param name="dtEnd"></param>
+        private void CreateDefaultStartAndEndDate(ref DateTime dtStart, ref DateTime dtEnd)
+        {
+            try
+            {
+                // å½“æœŸæœŸé¦–å¹´æœˆæ—¥ã‚’å�–å¾—
+                int iYear = 0;
+                int month = 0;
+                int day = 0;
+                bool bPeriod = true;
+                if (CommonMotions.SystemMasterData.ConstructionNoBase == (int)CommonDefine.SystemConstructionNoBase.BusinessPeriod)
+                {   // å–¶æ¥­æœŸ
+                    iYear = CommonMotions.PeriodCountToYear(CommonMotions.cnvInt(numUDConstPro.Value));
+                    bPeriod = true;
+                }
+                CommonMotions.GetBeginningMonthDay(bPeriod, ref month, ref day);
+                dtStart = new DateTime(iYear, month, day);
+                dtEnd = dtStart.AddYears(1).AddDays(-1);     // çµ‚äº†ã�¯ï¼‹1å¹´ï¼�1æ—¥
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("ã‚·ã‚¹ãƒ†ãƒ ã‚¨ãƒ©ãƒ¼ï¼š{0}ï¼š{1}", CommonMotions.GetMethodName(), ex.Message);
+            }
+        }
+        #endregion
+
         #region éƒ¨ç½²ã‚³ãƒ³ãƒœã‚ˆã‚Šæ‹…å½“è€…ã‚³ãƒ¼ãƒ‰ã‚’å�–å¾—ã�™ã‚‹
         /// <summary>
         /// éƒ¨ç½²ã‚³ãƒ³ãƒœã‚ˆã‚Šæ‹…å½“è€…ã‚³ãƒ¼ãƒ‰ã‚’å�–å¾—ã�™ã‚‹
Index: trunk/src/ProcessManagement/ProcessManagement/Forms/ZMenu/FrmLogin.designer.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/Forms/ZMenu/FrmLogin.designer.cs	(revision 141)
+++ trunk/src/ProcessManagement/ProcessManagement/Forms/ZMenu/FrmLogin.designer.cs	(revision 142)
@@ -77,12 +77,12 @@
             this.lblTitle.AutoSize = true;
             this.lblTitle.BackColor = System.Drawing.Color.Black;
             this.lblTitle.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
-            this.lblTitle.Font = new System.Drawing.Font("ARä¸¸ã‚´ã‚·ãƒƒã‚¯ä½“E", 14.25F);
+            this.lblTitle.Font = new System.Drawing.Font("ARä¸¸ã‚´ã‚·ãƒƒã‚¯ä½“E", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
             this.lblTitle.ForeColor = System.Drawing.Color.White;
-            this.lblTitle.Location = new System.Drawing.Point(195, 6);
+            this.lblTitle.Location = new System.Drawing.Point(233, 6);
             this.lblTitle.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.lblTitle.Name = "lblTitle";
-            this.lblTitle.Size = new System.Drawing.Size(391, 21);
+            this.lblTitle.Size = new System.Drawing.Size(314, 18);
             this.lblTitle.TabIndex = 7;
             this.lblTitle.Text = "ç�¾ã€€å ´ã€€ç›£ã€€ç�£ã€€ç§˜ã€€æ›¸ã€€ãƒ­ã€€ã‚°ã€€ã‚¤ã€€ãƒ³";
             this.lblTitle.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
