Index: trunk/src/ProcessManagement/ProcessManagement/Common/CommonDefine.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/Common/CommonDefine.cs	(revision 15)
+++ trunk/src/ProcessManagement/ProcessManagement/Common/CommonDefine.cs	(revision 16)
@@ -1066,7 +1066,7 @@
         /// <summary>
         /// å‡ºå‹¤è£œæ­£å€¤ä¿‚æ•°
         /// </summary>
-        public static double s_SalaryExpenses = 1.1;
+        public static double s_SalaryCorrection = 1.1;
         #endregion
 
         #region å·¥äº‹äºˆç®—æ›¸ï¼šæ—¥ä»˜é�¸æŠž
@@ -1317,9 +1317,9 @@
         }
         #endregion
 
-        #region å�°å¸³å…¥åŠ›å®Œäº†ãƒ•ãƒ©ã‚°
+        #region å·¥äº‹è©³ç´°å�°å¸³ï¼šå�°å¸³å…¥åŠ›å®Œäº†ãƒ•ãƒ©ã‚°
         /// <summary>
-        /// å�°å¸³å…¥åŠ›å®Œäº†ãƒ•ãƒ©ã‚°
+        /// å·¥äº‹è©³ç´°å�°å¸³ï¼šå�°å¸³å…¥åŠ›å®Œäº†ãƒ•ãƒ©ã‚°
         /// </summary>
         public enum ComplateTitleNo
         {
@@ -1333,5 +1333,22 @@
             Complated,
         }
         #endregion
+
+        #region å·¥äº‹è©³ç´°å�°å¸³ï¼šå¢—æ¸›å·¥äº‹ãƒ•ãƒ©ã‚°
+        /// <summary>
+        /// å·¥äº‹è©³ç´°å�°å¸³ï¼šå¢—æ¸›å·¥äº‹ãƒ•ãƒ©ã‚°
+        /// </summary>
+        public enum FluctuatesFlg
+        {
+            /// <summary>
+            /// 0:é€šå¸¸ãƒ‡ãƒ¼ã‚¿
+            /// </summary>
+            Normal =0,
+            /// <summary>
+            /// 1:å¢—æ¸›ãƒ‡ãƒ¼ã‚¿
+            /// </summary>
+            Fluctuates,
+        }
+        #endregion
     }
 }
Index: trunk/src/ProcessManagement/ProcessManagement/Common/Process/ClsChangeBaseInfoData.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/Common/Process/ClsChangeBaseInfoData.cs	(nonexistent)
+++ trunk/src/ProcessManagement/ProcessManagement/Common/Process/ClsChangeBaseInfoData.cs	(revision 16)
@@ -0,0 +1,79 @@
+ï»¿using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Windows.Forms;
+using System.Collections;
+using System.Diagnostics;
+
+using log4net;
+using log4net.Appender;
+using log4net.Repository.Hierarchy;
+
+using ProcessManagement.Common;
+using ProcessManagement.DB.IOAccess;
+using ProcessManagement.DataModel;
+using ProcessManagement.Forms.Master;
+using ProcessManagement.Forms.DataEntry;
+using ProcessManagement.Forms.ControlsAction;
+using ProcessManagement.Forms.SubForms;
+
+//*----------------------- å·¥äº‹åŸºæœ¬æƒ…å ±ãƒ‡ãƒ¼ã‚¿å¤‰æ›´ã‚¯ãƒ©ã‚¹ -----------------------*
+//  2016/10/06  Ver1.0.0.0      Create Source           
+//
+//
+//
+//*----------------------------------------------------------------------------*
+namespace ProcessManagement.Common
+{
+    /// <summary>
+    /// å·¥äº‹åŸºæœ¬æƒ…å ±ãƒ‡ãƒ¼ã‚¿å¤‰æ›´ã‚¯ãƒ©ã‚¹
+    /// </summary>
+    public static class ClsChangeBaseInfoData
+    {
+        #region ãƒ­ã‚°å®šç¾©
+        /// <summary>
+        /// log4netãƒ­ã‚°ã‚’ä½¿ç”¨ã�™ã‚‹
+        /// </summary>
+        private static readonly ILog logger = LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
+        #endregion
+
+        #region å®šæ•°
+
+        #endregion
+
+        #region å¤‰æ•°
+        #endregion
+
+        #region å·¥äº‹è©³ç´°å�°å¸³å…¥åŠ›å®Œäº†æ—¥ã‚»ãƒƒãƒˆå‡¦ç�†
+        /// <summary>
+        /// å·¥äº‹è©³ç´°å�°å¸³å…¥åŠ›å®Œäº†æ—¥ã‚»ãƒƒãƒˆå‡¦ç�†
+        /// </summary>
+        /// <param name="SetDate"></param>
+        /// <returns></returns>
+        public static bool SetLedgerComplateDate(int ConstrCode, DateTime SetDate)
+        {
+            IOConstructionBaseInfo BaseDB = new IOConstructionBaseInfo();
+            try
+            {
+                // å·¥äº‹è©³ç´°å�°å¸³å…¥åŠ›å®Œäº†æ—¥ã‚’ã‚»ãƒƒãƒˆã�™ã‚‹
+                if (!BaseDB.UpdateFeild(ConstrCode, (int)IOConstructionBaseInfo.TableColumn.LEDGERCOMPLATEDATE, SetDate)) return false;
+
+                return true;
+            }
+            catch (System.Exception ex)
+            {
+                logger.ErrorFormat("ã‚·ã‚¹ãƒ†ãƒ ã‚¨ãƒ©ãƒ¼ï¼š{0}ï¼š{1}", CommonMotions.GetMethodName(), ex.Message);
+                return false;
+            }
+            finally
+            {
+                BaseDB.close(); BaseDB = null;
+            }
+        }
+        #endregion
+    }
+}
Index: trunk/src/ProcessManagement/ProcessManagement/Common/Process/ClsChangeLedgerData.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/Common/Process/ClsChangeLedgerData.cs	(nonexistent)
+++ trunk/src/ProcessManagement/ProcessManagement/Common/Process/ClsChangeLedgerData.cs	(revision 16)
@@ -0,0 +1,825 @@
+ï»¿using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Windows.Forms;
+using System.Collections;
+using System.Diagnostics;
+
+using log4net;
+using log4net.Appender;
+using log4net.Repository.Hierarchy;
+
+using ProcessManagement.Common;
+using ProcessManagement.DB.IOAccess;
+using ProcessManagement.DataModel;
+using ProcessManagement.Forms.Master;
+using ProcessManagement.Forms.DataEntry;
+using ProcessManagement.Forms.ControlsAction;
+using ProcessManagement.Forms.SubForms;
+
+//*----------------------- å·¥äº‹è©³ç´°å�°å¸³ãƒ‡ãƒ¼ã‚¿å¤‰æ›´ã‚¯ãƒ©ã‚¹ -----------------------*
+//  2016/05/31  Ver1.0.0.0      Create Source           
+//
+//
+//
+//*----------------------------------------------------------------------------*
+namespace ProcessManagement.Common
+{
+    /// <summary>
+    /// å·¥äº‹è©³ç´°å�°å¸³ãƒ‡ãƒ¼ã‚¿å¤‰æ›´ã‚¯ãƒ©ã‚¹
+    /// </summary>
+    public static class ClsChangeLedgerData
+    {
+        #region ãƒ­ã‚°å®šç¾©
+        /// <summary>
+        /// log4netãƒ­ã‚°ã‚’ä½¿ç”¨ã�™ã‚‹
+        /// </summary>
+        private static readonly ILog logger = LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
+        #endregion
+
+        #region å®šæ•°
+
+        #endregion
+
+        #region å¤‰æ•°
+        /// <summary>
+        /// å·¥äº‹æ–½å·¥å�°å¸³æ”¯æ‰•ã�„å®Ÿç¸¾å…ˆé ­ã‚«ãƒ©ãƒ æ•°
+        /// </summary>
+        private static int m_LedgerColumnCount = 0;
+        #endregion
+
+        #region å¯¾è±¡æœˆã�®å·¥äº‹è©³ç´°å�°å¸³å®Ÿè¡Œãƒ‡ãƒ¼ã‚¿ã‚’ä½œæˆ�ã�™ã‚‹ï¼ˆäº¤é€šè²»ãƒ»è³¼å…¥å“�ç­‰ã�®ã�¿ï¼‰
+        /// <summary>
+        /// å¯¾è±¡æœˆã�®å·¥äº‹è©³ç´°å�°å¸³å®Ÿè¡Œãƒ‡ãƒ¼ã‚¿ã‚’ä½œæˆ�ã�™ã‚‹ï¼ˆäº¤é€šè²»ãƒ»è³¼å…¥å“�ç­‰ã�®ã�¿ï¼‰
+        /// </summary>
+        /// <param name="PersonCode">æ‹…å½“è€…ã‚³ãƒ¼ãƒ‰</param>
+        /// <param name="TargetMonth">å¯¾è±¡å¹´æœˆ</param>
+        /// <returns></returns>
+        public static bool MakeLedgerData(int PersonCode, string TargetMonth)
+        {
+            IOCostDataOfPerson CostDB = new IOCostDataOfPerson();
+            IOConstructionLedger LedgerDB = new IOConstructionLedger();
+            IOConstructionLedgerDetail LedgerDetailDB = new IOConstructionLedgerDetail();
+            IOConstructionLedgerExcute LedgerExcuteDB = new IOConstructionLedgerExcute();
+            try
+            {
+                // ä¸€æ‹¬å‡¦ç�†ã�§ç™»éŒ²ã‚’è¡Œã�†
+                CostDB.connect();
+                LedgerDB.connect();
+                LedgerDetailDB.connect();
+                LedgerExcuteDB.connect(); LedgerExcuteDB.beginTran();
+
+                // è©³ç´°å�°å¸³ã‚ˆã‚Šã‚°ãƒªãƒƒãƒ‰ã�®ã‚«ãƒ©ãƒ ã‚’å�–å¾—ã�™ã‚‹
+                GetLedgerColumnCount();
+
+                // å¯¾è±¡ã‚’ã�¾ã�šå‰Šé™¤ã�™ã‚‹(å¯¾è±¡æœˆã�§å‰Šé™¤ã�™ã‚‹)
+                string strDelSQL = "DELETE CONSTRUCTIONLEDGEREXCUTE";
+                strDelSQL += " WHERE CONSTRUCTIONCODE IN";
+                strDelSQL += " (SELECT CONSTRUCTIONCODE FROM CONSTRUCTIONBASEINFO";
+                strDelSQL += string.Format(" WHERE (SALESPERSONCODE = {0} OR CONSTRUCTIONPERSONCODE = {0} OR CONSTRSUBPERSONCODE = {0} OR CONSTRUCTIONINSTRUCTOR = {0}))", PersonCode);
+                strDelSQL += string.Format(" AND GROUPCOUNT IN ({0}, {1}, {2}, {3}, {4})"
+                                                                , GetConstructionLedgerGroupNo((int)CommonDefine.CostDataNo.Transport)
+                                                                , GetConstructionLedgerGroupNo((int)CommonDefine.CostDataNo.Purchase)
+                                                                , GetConstructionLedgerGroupNo((int)CommonDefine.CostDataNo.Lease)
+                                                                , GetConstructionLedgerGroupNo((int)CommonDefine.CostDataNo.StoragePlace)
+                                                                , GetConstructionLedgerGroupNo((int)CommonDefine.CostDataNo.Lodging));
+                strDelSQL += string.Format(" AND TARGETMONTH = TO_DATE('{0}','YYYY/MM/DD')", (TargetMonth + "/01"));
+                LedgerExcuteDB.ExecuteNonQuery(strDelSQL, false);
+
+                for (int i = (int)CommonDefine.CostDataNo.Transport; i <= (int)CommonDefine.CostDataNo.Lodging; i++)
+                {
+                    string strSQL = "SELECT CONSTRUCTIONCODE, DATATYPE, TO_CHAR(ACTIONDATE,'YYYY/MM'), SUM(ENTRYPRICE) FROM COSTDATAOFPERSON";
+                    strSQL += String.Format(" WHERE TO_CHAR(ACTIONDATE,'YYYY/MM') = '{0}'", TargetMonth);
+                    strSQL += String.Format(" AND DATATYPE = {0}", i);
+                    strSQL += " AND CONSTRUCTIONCODE IN (SELECT CONSTRUCTIONCODE FROM CONSTRUCTIONBASEINFO";
+                    strSQL += string.Format(" WHERE (SALESPERSONCODE = {0} OR CONSTRUCTIONPERSONCODE = {0} OR CONSTRSUBPERSONCODE = {0} OR CONSTRUCTIONINSTRUCTOR = {0}))", PersonCode);
+                    strSQL += " GROUP BY CONSTRUCTIONCODE, DATATYPE, TO_CHAR(ACTIONDATE,'YYYY/MM')";
+                    strSQL += " ORDER BY CONSTRUCTIONCODE, DATATYPE";
+                    ArrayList arList = new ArrayList();
+                    if (!CostDB.ExecuteReader(strSQL, ref arList, false)) continue;
+                    if (arList.Count == 0) continue;
+
+                    foreach (object[] wrkrec in arList)
+                    {
+
+                        // æ”¯æ‰•é‡‘é¡�
+                        int PaymentPrice = CommonMotions.cnvInt(wrkrec[3]);
+                        // æ”¯æ‰•é‡‘é¡�ç„¡ã�¯å‡¦ç�†ã�—ã�ªã�„
+                        if (PaymentPrice == 0) continue;
+
+                        // å·¥äº‹ç•ªå�·
+                        int ConstructionCode = CommonMotions.cnvInt(wrkrec[0]);
+
+                        // ã‚°ãƒ«ãƒ¼ãƒ—ç•ªå�·
+                        int DataType = i;
+                        int GroupNo = GetConstructionLedgerGroupNo(DataType);
+
+                        // å·¥äº‹è©³ç´°å�°å¸³ã‚ˆã‚Šãƒ‡ãƒ¼ã‚¿ã�®è¡Œãƒ»åˆ—ã‚’å�–å¾—ã�™ã‚‹
+                        int LineCnt = 0;
+                        int ColCnt = 0;
+                        // å�°å¸³ã�Œç„¡ã�‘ã‚Œã�°å‡¦ç�†ã�—ã�ªã�„
+                        if (!SearchTatgetConstructionLedger(LedgerDB, LedgerDetailDB, ConstructionCode, GroupNo, TargetMonth, ref  LineCnt, ref ColCnt)) continue;
+
+                        ConstructionLedgerExcute excRec = new ConstructionLedgerExcute();
+                        // ãƒ‡ãƒ¼ã‚¿ç·¨é›†
+                        excRec.ConstructionCode = ConstructionCode;
+                        excRec.GroupCount = GroupNo;
+                        excRec.LineCount = LineCnt;
+                        excRec.ColumnCount = ColCnt;
+                        excRec.PaymentAmount = PaymentPrice;
+                        excRec.TargetMonth = CommonMotions.cnvDate(TargetMonth + "/01");
+
+                        if (!LedgerExcuteDB.InsertAction(excRec, false))
+                        {
+                            LedgerExcuteDB.rollback();
+                            return false;
+                        }
+                    }
+                }
+                // DBã‚³ãƒŸãƒƒãƒˆ
+                LedgerExcuteDB.commit();
+
+                return true;
+            }
+            catch (System.Exception ex)
+            {
+                logger.ErrorFormat("ã‚·ã‚¹ãƒ†ãƒ ã‚¨ãƒ©ãƒ¼ï¼š{0}ï¼š{1}", CommonMotions.GetMethodName(), ex.Message);
+                LedgerExcuteDB.rollback();
+                return false;
+            }
+            finally
+            {
+                CostDB.close(); CostDB = null;
+                LedgerDB.close(); LedgerDB = null;
+                LedgerDetailDB.close(); LedgerDetailDB = null;
+                LedgerExcuteDB.close(); LedgerExcuteDB = null;
+            }
+        }
+        #endregion
+
+        #region å·¥äº‹è©³ç´°å�°å¸³ã‚ˆã‚Šå¯¾è±¡ãƒ‡ãƒ¼ã‚¿ã‚’æŽ¢ã�—ã�¦å®Ÿè¡Œãƒ‡ãƒ¼ã‚¿ã�®è¡Œç•ªå�·ãƒ»åˆ—ç•ªå�·ã‚’è¿”ã�™ï¼ˆäº¤é€šè²»ãƒ»è³¼å…¥å“�ç­‰ã�®ã�¿ï¼‰
+        /// <summary>
+        /// å·¥äº‹è©³ç´°å�°å¸³ã‚ˆã‚Šå¯¾è±¡ãƒ‡ãƒ¼ã‚¿ã‚’æŽ¢ã�—ã�¦å®Ÿè¡Œãƒ‡ãƒ¼ã‚¿ã�®è¡Œç•ªå�·ãƒ»åˆ—ç•ªå�·ã‚’è¿”ã�™ï¼ˆäº¤é€šè²»ãƒ»è³¼å…¥å“�ç­‰ã�®ã�¿ï¼‰
+        /// </summary>
+        /// <returns></returns>
+        private static bool SearchTatgetConstructionLedger(IOConstructionLedger LedgerDB, IOConstructionLedgerDetail LedgerDetailDB
+                                                            ,int ConstructionCode, int GroupNo, string TargetMonth, ref int LineCnt, ref int ColCnt)
+        {
+            try
+            {
+                // å�°å¸³ãƒ‡ãƒ¼ã‚¿ã‚ˆã‚Šã‚«ãƒ©ãƒ æ•°ã‚’å�–å¾—ã�™ã‚‹
+                string strLedger = LedgerDB.CreatePrimarykeyString(ConstructionCode);
+                ConstructionLedger LedgerRec = new ConstructionLedger();
+                if (!LedgerDB.SelectAction(strLedger, ref LedgerRec, false)) return false;
+                
+                // ç�¾åœ¨ã�®å‡¦ç�†å¹´æœˆã‚’DateTimeåž‹ã�«å¤‰æ�›ã�™ã‚‹
+                DateTime NowDates = CommonMotions.cnvDate(TargetMonth + "/01");
+
+                // çµŒé�Žæœˆæ•°ã‚’å�–å¾—ã�™ã‚‹
+                //TimeSpan ts = NowDates - LedgerRec.ConstructionStart;
+                //int DiffMonth = ts.GetTimeSpanMonths();
+                int DiffMonth = (LedgerRec.ConstructionStart.Month + (LedgerRec.ConstructionStart.Year - NowDates.Year) * 12) - NowDates.Month;
+
+                // åˆ—ç•ªå�·å�–å¾—
+                ColCnt = m_LedgerColumnCount + DiffMonth;
+
+                // å·¥äº‹è©³ç´°å�°å¸³æ˜Žç´°ãƒ‡ãƒ¼ã‚¿èª­è¾¼ã�¿
+                string strSQL = LedgerDetailDB.CreatePrimarykeyString(ConstructionCode, GroupNo);
+                List<ConstructionLedgerDetail> DetailList = new List<ConstructionLedgerDetail>();
+                if (!LedgerDetailDB.SelectAction(strSQL, ref DetailList, false)) return false;
+                // è¡Œç•ªå�·å�–å¾—
+                LineCnt = DetailList[0].LineCount;
+
+                return true;
+            }
+            catch (System.Exception ex)
+            {
+                logger.ErrorFormat("ã‚·ã‚¹ãƒ†ãƒ ã‚¨ãƒ©ãƒ¼ï¼š{0}ï¼š{1}", CommonMotions.GetMethodName(), ex.Message);
+                return false;
+            }
+        }
+        #endregion
+
+        #region å·¥äº‹è©³ç´°å�°å¸³ã�®ã‚°ãƒ«ãƒ¼ãƒ—ç•ªå�·ã‚’å�–å¾—ã�™ã‚‹
+        /// <summary>
+        /// å·¥äº‹è©³ç´°å�°å¸³ã�®ã‚°ãƒ«ãƒ¼ãƒ—ç•ªå�·ã‚’å�–å¾—ã�™ã‚‹
+        /// </summary>
+        /// <param name="TargetData"></param>
+        /// <returns></returns>
+        public static int GetConstructionLedgerGroupNo(int TargetData)
+        {
+            int GroupNo = 0;
+            // å·¥äº‹å�°å¸³ã�®ã‚°ãƒ«ãƒ¼ãƒ—ç•ªå�·ã‚’å�–å¾—ã�™ã‚‹
+            switch (TargetData)
+            {
+                case (int)CommonDefine.CostDataNo.Transport:
+                    // äº¤é€šè²»ï¼ˆé€šè¡Œæ–™ãƒ»é›»è»Šä»£ï¼‰
+                    GroupNo = (int)FrmConstructionLedger.DataGroup.TransportationCosts;
+                    break;
+                case (int)CommonDefine.CostDataNo.Purchase:
+                    // è³¼å…¥å“�
+                    GroupNo = (int)FrmConstructionLedger.DataGroup.PurchaseCosts;
+                    break;
+                case (int)CommonDefine.CostDataNo.Lease:
+                    // è»Šä¸¡ãƒªãƒ¼ã‚¹ä»£
+                    GroupNo = (int)FrmConstructionLedger.DataGroup.VehicleLeaseFee;
+                    break;
+                case (int)CommonDefine.CostDataNo.StoragePlace:
+                    // é§�è»Šå ´ãƒ»è³‡æ��ç½®ã��å ´
+                    GroupNo = (int)FrmConstructionLedger.DataGroup.ParkingCosts;
+                    break;
+                case (int)CommonDefine.CostDataNo.Lodging:
+                    // å®¿æ³Šè²»
+                    GroupNo = (int)FrmConstructionLedger.DataGroup.RoomChargeCosts;
+                    break;
+            }
+            return GroupNo;
+        }
+        #endregion
+
+        #region å·¥äº‹è©³ç´°å�°å¸³ã‚ˆã‚Šæ”¯æ‰•é‡‘é¡�ã‚°ãƒªãƒƒãƒ‰ã�®å…ˆé ­ã‚«ãƒ©ãƒ æ•°ã‚’å�–å¾—ã�™ã‚‹
+        /// <summary>
+        /// å·¥äº‹è©³ç´°å�°å¸³ã‚ˆã‚Šæ”¯æ‰•é‡‘é¡�ã‚°ãƒªãƒƒãƒ‰ã�®å…ˆé ­ã‚«ãƒ©ãƒ æ•°ã‚’å�–å¾—ã�™ã‚‹
+        /// </summary>
+        private static void GetLedgerColumnCount()
+        {
+            FrmConstructionLedger frm = new FrmConstructionLedger();
+            try
+            {
+                m_LedgerColumnCount = frm.GetGridColumsCount - 1;
+            }
+            catch (System.Exception ex)
+            {
+                logger.ErrorFormat("ã‚·ã‚¹ãƒ†ãƒ ã‚¨ãƒ©ãƒ¼ï¼š{0}ï¼š{1}", CommonMotions.GetMethodName(), ex.Message);
+            }
+            finally
+            {
+                frm.Dispose(); frm = null;
+            }
+        }
+        #endregion
+
+        #region å€‹äººæ¯ŽçµŒè²»ãƒ‡ãƒ¼ã‚¿ã�‹ã‚‰å·¥äº‹è©³ç´°å�°å¸³ã�®å·¥äº‹æ¯Žã�®ãƒ‡ãƒ¼ã‚¿å†�è¨ˆç®—æ›´æ–°å‡¦ç�†
+        /// <summary>
+        /// å€‹äººæ¯ŽçµŒè²»ãƒ‡ãƒ¼ã‚¿ã�‹ã‚‰å·¥äº‹è©³ç´°å�°å¸³ã�®å·¥äº‹æ¯Žã�®ãƒ‡ãƒ¼ã‚¿å†�è¨ˆç®—æ›´æ–°å‡¦ç�†
+        /// </summary>
+        /// <param name="PersonCode"></param>
+        /// <param name="TargetMonth"></param>
+        /// <returns></returns>
+        public static bool UpdateRecalLedgerDataFromTAndPCost(int PersonCode, string TargetMonth)
+        {
+            IOCostDataOfPerson CostDB = new IOCostDataOfPerson();
+            FrmConstructionLedger frm = new FrmConstructionLedger();
+            try
+            {
+                string strSQL = "SELECT PERSONCODE, TO_CHAR(ACTIONDATE,'YYYY/MM'), CONSTRUCTIONCODE FROM COSTDATAOFPERSON";
+                strSQL += String.Format(" WHERE PERSONCODE = {0} AND TO_CHAR(ACTIONDATE,'YYYY/MM') = '{1}'", PersonCode, TargetMonth);
+                strSQL += " GROUP BY PERSONCODE, TO_CHAR(ACTIONDATE,'YYYY/MM'), CONSTRUCTIONCODE";
+                strSQL += " ORDER BY CONSTRUCTIONCODE";
+
+                ArrayList arList = new ArrayList();
+                if (!CostDB.ExecuteReader(strSQL, ref arList)) return false;
+                if (arList.Count == 0) return true;
+
+                bool bInit = true;
+                foreach (object[] wrkobj in arList)
+                {
+                    int ConstructionCode = CommonMotions.cnvInt(wrkobj[2]);
+                    // å·¥äº‹ç•ªå�·ã�Œå­˜åœ¨ã�—ã�ªã�„ãƒ‡ãƒ¼ã‚¿ã�¯æ›´æ–°ã�«ã�—ã�ªã�„
+                    if (ConstructionCode == 0) continue;
+
+                    // å·¥äº‹ã‚³ãƒ¼ãƒ‰ã�®ã‚»ãƒƒãƒˆ
+                    frm.ConstructionCode = ConstructionCode;
+
+                    if (bInit)
+                    {
+                        // è¦‹ã�ˆã�ªã�„ç”»é�¢ã‚’å‡ºã�™
+                        frm.Hide();
+                        // ãƒ•ã‚©ãƒ¼ãƒ é�žè¡¨ç¤º
+                        //frm.Visible = false;
+                        bInit = false;
+                    }
+                    // å†�è¨ˆç®—å‡¦ç�†
+                    bool bret = frm.RecalculateLedger;
+                }
+                
+                // ç”»é�¢ã‚’é–‰ã�˜ã‚‹
+                frm.Close();
+            }
+            catch (System.Exception ex)
+            {
+                logger.ErrorFormat("ã‚·ã‚¹ãƒ†ãƒ ã‚¨ãƒ©ãƒ¼ï¼š{0}ï¼š{1}", CommonMotions.GetMethodName(), ex.Message);
+                return false;
+            }
+            finally
+            {
+                CostDB.close(); CostDB = null;
+                frm.Dispose(); frm = null;
+            }
+            return true;
+        }
+        #endregion
+
+        #region å·¥äº‹è©³ç´°å�°å¸³ãƒ‡ãƒ¼ã‚¿ã‚’æ–°è¦�ä½œæˆ�ã�™ã‚‹
+        /// <summary>
+        /// å·¥äº‹è©³ç´°å�°å¸³ãƒ‡ãƒ¼ã‚¿ã‚’æ–°è¦�ä½œæˆ�ã�™ã‚‹
+        /// </summary>
+        /// <param name="ConstructionCode"></param>
+        /// <returns></returns>
+        public static bool MakingLedgerData(int ConstructionCode)
+        {
+            IOConstructionLedger LedgerDB = new IOConstructionLedger();
+            FrmConstructionLedger frm = new FrmConstructionLedger();
+            try
+            {
+                // å·¥äº‹ç•ªå�·ã�Œå­˜åœ¨ã�—ã�ªã�„ãƒ‡ãƒ¼ã‚¿ã�¯æ›´æ–°ã�—ã�ªã�„
+                if (ConstructionCode == 0) return false;
+
+                // å·¥äº‹è©³ç´°å�°å¸³ãƒ‡ãƒ¼ã‚¿ã�Œæ—¢ã�«ã�‚ã‚Œã�°ä½œæˆ�ã�—ã�ªã�„
+                string strExists = LedgerDB.CreatePrimarykeyString(ConstructionCode);
+                List<ConstructionLedger> LedgerList = new List<ConstructionLedger>();
+                LedgerDB.SelectAction(strExists, ref LedgerList);
+                if (LedgerList.Count > 0) return true;
+
+                // å·¥äº‹ã‚³ãƒ¼ãƒ‰ã�®ã‚»ãƒƒãƒˆ
+                frm.ConstructionCode = ConstructionCode;
+
+                // è¦‹ã�ˆã�ªã�„ç”»é�¢ã‚’å‡ºã�™
+                frm.WindowState = FormWindowState.Minimized;
+                frm.Show();
+                // ãƒ•ã‚©ãƒ¼ãƒ é�žè¡¨ç¤º
+                frm.Visible = false;
+
+                bool bSuccess = true;
+                // ãƒ‡ãƒ¼ã‚¿ä½œæˆ�å‡¦ç�†
+                if (!frm.SaveLedgerData) bSuccess = false;
+
+                // ç”»é�¢ã‚’é–‰ã�˜ã‚‹
+                frm.Close();
+
+                return bSuccess;
+            }
+            catch (System.Exception ex)
+            {
+                logger.ErrorFormat("ã‚·ã‚¹ãƒ†ãƒ ã‚¨ãƒ©ãƒ¼ï¼š{0}ï¼š{1}", CommonMotions.GetMethodName(), ex.Message);
+                return false;
+            }
+            finally
+            {
+                frm.Dispose(); frm = null;
+                LedgerDB.close(); LedgerDB = null;
+            }
+        }
+        #endregion
+
+        #region å·¥äº‹è©³ç´°å�°å¸³ãƒ‡ãƒ¼ã‚¿ã�«å¢—æ¸›ãƒ‡ãƒ¼ã‚¿ã‚’è¿½åŠ ã�™ã‚‹
+        /// <summary>
+        /// å·¥äº‹è©³ç´°å�°å¸³ãƒ‡ãƒ¼ã‚¿ã�«å¢—æ¸›ãƒ‡ãƒ¼ã‚¿ã‚’è¿½åŠ ã�™ã‚‹
+        /// </summary>
+        /// <param name="ConstructionCode"></param>
+        /// <returns></returns>
+        public static bool AddingLedgerData(int ConstructionCode)
+        {
+            IOConstructionLink LinkDB = new IOConstructionLink();
+            IOConstructionLedger LedgerDB = new IOConstructionLedger();
+            FrmConstructionLedger frm = new FrmConstructionLedger();
+            try
+            {
+
+                // å·¥äº‹ç•ªå�·ã�Œå­˜åœ¨ã�—ã�ªã�„ãƒ‡ãƒ¼ã‚¿ã�¯æ›´æ–°ã�—ã�ªã�„
+                if (ConstructionCode == 0) return false;
+
+                // è¦ªã�®å·¥äº‹ã‚’æŽ¢ã�™
+                string strParent = string.Format(" WHERE FluctuationCode = {0}", ConstructionCode);
+                ConstructionLink LinkRec = new ConstructionLink();
+                if (!LinkDB.SelectAction(strParent, ref LinkRec)) return false;
+
+                // å·¥äº‹è©³ç´°å�°å¸³ãƒ‡ãƒ¼ã‚¿ã�Œç„¡ã�„å ´å�ˆã�¯å‡¦ç�†ã�—ã�ªã�„
+                string strExists = LedgerDB.CreatePrimarykeyString(LinkRec.ConstructionCode);
+                ConstructionLedger LedgerList = new ConstructionLedger();
+                if (!LedgerDB.SelectAction(strExists, ref LedgerList)) return false;
+
+                // å·¥äº‹ã‚³ãƒ¼ãƒ‰ã�®ã‚»ãƒƒãƒˆ
+                frm.ConstructionCode = LinkRec.ConstructionCode;
+
+                // è¦‹ã�ˆã�ªã�„ç”»é�¢ã‚’å‡ºã�™
+                frm.WindowState = FormWindowState.Minimized;
+                frm.Hide();
+                
+                // ãƒ‡ãƒ¼ã‚¿ã‚’è¿½åŠ ã�™ã‚‹
+                frm.AddingConstrCode = ConstructionCode;
+                if (!frm.AddDataLedger)
+                {
+                    frm.Close();                    // ç”»é�¢ã‚’é–‰ã�˜ã‚‹
+                    return false;
+                }
+
+                // ãƒ‡ãƒ¼ã‚¿ä½œæˆ�å‡¦ç�†
+                if (!frm.SaveLedgerData)
+                {
+                    frm.Close();                    // ç”»é�¢ã‚’é–‰ã�˜ã‚‹
+                    return false;
+                }
+
+                // ç”»é�¢ã‚’é–‰ã�˜ã‚‹
+                frm.Close();
+
+                return true;
+            }
+            catch (System.Exception ex)
+            {
+                logger.ErrorFormat("ã‚·ã‚¹ãƒ†ãƒ ã‚¨ãƒ©ãƒ¼ï¼š{0}ï¼š{1}", CommonMotions.GetMethodName(), ex.Message);
+                return false;
+            }
+            finally
+            {
+                frm.Dispose(); frm = null;
+                LedgerDB.close(); LedgerDB = null;
+                LinkDB.close(); LinkDB = null;
+            }
+        }
+        #endregion
+
+        #region å·¥äº‹è©³ç´°å�°å¸³ãƒ‡ãƒ¼ã‚¿ã�«å¯¾è±¡è¡Œã�®æ”¯æ‰•ã�„çµ¦ä¸Žã‚’è¨ˆç®—ã�™ã‚‹
+        /// <summary>
+        /// å·¥äº‹è©³ç´°å�°å¸³ãƒ‡ãƒ¼ã‚¿ã�«å¯¾è±¡è¡Œã�®æ”¯æ‰•ã�„çµ¦ä¸Žã‚’è¨ˆç®—ã�™ã‚‹
+        /// </summary>
+        /// <param name="ConstrCode">å·¥äº‹ç•ªå�·</param>
+        /// <param name="TargetDate">å¯¾è±¡æ—¥</param>
+        /// <param name="bSetFlag">æœˆä¸€æ‹¬ã‚»ãƒƒãƒˆãƒ•ãƒ©ã‚°</param>
+        /// <returns></returns>
+        public static bool CalculatePayment(int ConstrCode, DateTime TargetDate, bool bSetFlag = false)
+        {
+            IOConstructionLedger LedgerDB = new IOConstructionLedger();
+            IOConstructionLedgerDetail LedgerDeDB = new IOConstructionLedgerDetail();
+            IOConstructionLedgerExcute LedgerExDB = new IOConstructionLedgerExcute();
+            IOMPersonInCharge PersonDB = new IOMPersonInCharge();
+            FrmConstructionLedger frm = new FrmConstructionLedger();
+            try
+            {
+                // å·¥äº‹è©³ç´°å�°å¸³ãƒ‡ãƒ¼ã‚¿å�–å¾—
+                List<ConstructionLedger> LedgerList = new List<ConstructionLedger>();
+                string LedgerSQL = LedgerDB.CreatePrimarykeyString(ConstrCode);
+                if (!LedgerDB.SelectAction(LedgerSQL, ref LedgerList) || LedgerList.Count == 0) return false;
+
+                // å·¥äº‹è©³ç´°å�°å¸³æ˜Žç´°ãƒ‡ãƒ¼ã‚¿å�–å¾—
+                List<ConstructionLedgerDetail> DetailList = new List<ConstructionLedgerDetail>();
+                string DetailSQL = LedgerDeDB.CreatePrimarykeyString(ConstrCode);
+                DetailSQL += string.Format(" AND OperatingFlg = {0}", (int)CommonDefine.SalaryOperateKind.Oparateing);  // å¯¾å¿œä¸­ãƒ•ãƒ©ã‚°
+                DetailSQL += string.Format(" AND GROUPCOUNT IN ({0},{1},{2})",
+                                                                (int)FrmConstructionLedger.DataGroup.Instructor,   // æŒ‡å°Žå“¡çµ¦æ–™
+                                                                (int)FrmConstructionLedger.DataGroup.Assistant,    // å‰¯æ‹…å½“è€…çµ¦æ–™
+                                                                (int)FrmConstructionLedger.DataGroup.Payroll);     // æ‹…å½“è€…çµ¦æ–™è¡Œ
+
+                if (!LedgerDeDB.SelectAction(DetailSQL, ref DetailList) || DetailList.Count == 0) return false;
+
+                // å¯¾è±¡æœˆã‚ˆã‚Šæ›¸è¾¼ã�¿ã‚«ãƒ©ãƒ ä½�ç½®ã‚’å�–å¾—ã�™ã‚‹
+                int ColPoint = CalcTargetMonthToColumn(LedgerList[0].ConstructionStart, TargetDate);
+
+                // å¯¾è±¡æœˆã�®é–‹å§‹æ—¥ãƒ»çµ‚äº†æ—¥ã‚’å�–å¾—ã�™ã‚‹
+                DateTime dtStart = DateTimeUtil.BeginOfMonth(TargetDate);
+                DateTime dtLast = DateTimeUtil.EndOfMonth(TargetDate);
+                
+                // é–‹å§‹æœˆã�¯é–‹å§‹æœˆã‚’å…¥ã‚Œã‚‹
+                if (LedgerList[0].ConstructionStart.Year == dtStart.Year
+                    && LedgerList[0].ConstructionStart.Month == dtStart.Month) dtStart = LedgerList[0].ConstructionStart;
+                
+                // å½“æœˆã�¯ä»Šæ—¥ã‚ˆã‚Šå¤§ã��ã�„å ´å�ˆã�¯ä»Šæ—¥ã‚’å…¥ã‚Œã‚‹
+                if (DateTime.Now.Year == dtLast.Year
+                    && DateTime.Now.Month == dtLast.Month
+                    && DateTime.Now.Day < dtLast.Day) dtLast = DateTime.Now;
+                
+                // çµ‚äº†æœˆã�¯çµ‚äº†æ—¥ã‚’å…¥ã‚Œã‚‹
+                if (LedgerList[0].ConstructionEnd.Year == dtLast.Year
+                    && LedgerList[0].ConstructionEnd.Month == dtLast.Month
+                    && LedgerList[0].ConstructionEnd.Day < dtLast.Day) dtLast = LedgerList[0].ConstructionEnd;
+
+                //// ç¨¼åƒ�æ—¥æ•°ã‚’å�–å¾—ã�™ã‚‹
+                //int WorkingDay = ClsCalendar.CalcOperatingDaysCount(dtStart, dtLast);
+                // çµŒé�Žæ—¥æ•°ã‚’å�–å¾—ã�™ã‚‹
+                int WorkingDay = ClsCalendar.CalcPassedDaysCount(dtStart, dtLast);
+
+                LedgerExDB.connect(); LedgerExDB.beginTran();
+                PersonDB.connect(); PersonDB.beginTran();
+
+                bool LoopBreak = false;
+                foreach (ConstructionLedgerDetail CurRec in DetailList)
+                {
+                    // ã‚³ãƒ¼ãƒ‰ã�Œæ‹…å½“è€…ã�§ã�¯ã�ªã�„å ´å�ˆã�¯å‡¦ç�†ã�—ã�ªã�„
+                    if (CurRec.CompanyType != (int)CommonDefine.SearchLogDataType.Person) continue;
+                    // ã‚³ãƒ¼ãƒ‰ã�Œã�ªã�„å ´å�ˆã�¯å‡¦ç�†ã�—ã�ªã�„
+                    if (CurRec.CompanyCode == 0) continue;
+                    // æ–½å·¥ç®¡ç�†ä¸­æ‹…å½“è€…ã�§ã�¯ã�ªã�„å ´å�ˆã�¯å‡¦ç�†ã�—ã�ªã�„
+                    if (CurRec.OperatingFlg == (int)CommonDefine.SalaryOperateKind.Complate) continue;
+
+                    // 1æ—¥åˆ†ã�®çµ¦ä¸Žã‚’å�–å¾—ã�™ã‚‹
+                    //double dSaraly = Get1DaysSalaryForOperating(PersonDB, CurRec.CompanyCode);
+                    double dSaraly = Get1DaysSalaryForFixed(PersonDB, CurRec.CompanyCode, CurRec.GroupCount);
+
+                        switch (CurRec.SalaryFlg)
+                        {
+                            case (int)CommonDefine.SalaryDevision.All:          // å…¨æ—¥æŒ¯åˆ†
+                                // æŒ‡å®šæ—¥ã�¾ã�§ã�®ç¨¼åƒ�æ—¥æ•°ã‚’æŽ›ã�‘ã�Ÿå€¤ã‚’ã‚»ãƒƒãƒˆã�™ã‚‹
+                                dSaraly *= WorkingDay;
+                                break;
+                            case (int)CommonDefine.SalaryDevision.Noting:       // æŒ¯åˆ†ç„¡
+                                // çµ¦ä¸ŽæŒ¯åˆ†ç„¡
+                                dSaraly = 0;
+                                LoopBreak = true;
+                                break;
+                            case (int)CommonDefine.SalaryDevision.DaysInput:    // æ—¥æ•°å…¥åŠ›
+                                // æ—¥å½“åŠ ç®—åˆ¤å®šã‚’è¡Œã�†
+                                if (CheckPaymentValue(CurRec))
+                                {
+                                    // æ—¥æ•°åˆ†æŽ›ã�‘ã‚‹
+                                    dSaraly *= CurRec.SalaryDays;
+                                }
+                                else
+                                {
+                                    dSaraly = 0;
+                                }
+                                LoopBreak = true;
+                                break;
+                            default:
+                                break;
+                        }
+
+                    DateTime ParaDate = new DateTime(TargetDate.Year, TargetDate.Month, 1);
+                    // æ”¯æ‰•ã�„ãƒ‡ãƒ¼ã‚¿æ›¸è¾¼ã�¿
+                    if (!AddOrSetSalary(LedgerExDB
+                                    , ConstrCode, CurRec.GroupCount, CurRec.LineCount, ColPoint, (int)dSaraly, ParaDate))
+                    {
+                        LedgerExDB.rollback();
+                        return false;
+                    }
+                }
+                // DB Commit
+                LedgerExDB.commit();
+
+                bool bret = true;
+
+                // å·¥äº‹ã‚³ãƒ¼ãƒ‰ã�®ã‚»ãƒƒãƒˆ
+                frm.ConstructionCode = ConstrCode;
+
+                // è¦‹ã�ˆã�ªã�„ç”»é�¢ã‚’å‡ºã�™
+                frm.Hide();
+                // ãƒ•ã‚©ãƒ¼ãƒ é�žè¡¨ç¤º
+                //frm.Visible = false;
+
+                // å†�è¨ˆç®—å‡¦ç�†
+                bret = frm.RecalculateLedger;
+
+                // ç”»é�¢ã‚’é–‰ã�˜ã‚‹
+                frm.Close();
+
+                // ãƒ‡ãƒ¼ã‚¿åˆ�æœŸã‚»ãƒƒãƒˆæ™‚ã�«æŒ¯åˆ†ç„¡ãƒ»æ—¥æ•°å…¥åŠ›ã�¯æ¬¡ã�®ãƒ«ãƒ¼ãƒ—ã‚’ã�—ã�ªã�„
+                if (bSetFlag && LoopBreak) bret = false;
+
+                return bret;
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("ã‚·ã‚¹ãƒ†ãƒ ã‚¨ãƒ©ãƒ¼ï¼š{0}ï¼š{1}", CommonMotions.GetMethodName(), ex.Message);
+                return false;
+            }
+            finally
+            {
+                LedgerDB.close(); LedgerDB = null;
+                LedgerDeDB.close(); LedgerDeDB = null;
+                LedgerExDB.close(); LedgerExDB = null;
+                PersonDB.close(); PersonDB = null;
+
+                frm.Dispose(); frm = null;
+            }
+        }
+        #endregion
+
+        #region æ—¥æ¬¡å‡¦ç�†ã�§ã�®æ—¥å½“ã�®åŠ ç®—ã‚’åˆ¤å®šã�™ã‚‹
+        /// <summary>
+        /// æ—¥æ¬¡å‡¦ç�†ã�§ã�®æ—¥å½“ã�®åŠ ç®—ã‚’åˆ¤å®šã�™ã‚‹
+        /// </summary>
+        /// <param name="CurRec"></param>
+        /// <returns></returns>
+        private static bool CheckPaymentValue(ConstructionLedgerDetail CurRec)
+        {
+            IOConstructionLedgerExcute ExcuteDB = new IOConstructionLedgerExcute();
+            try
+            {
+                // æ”¯æ‰•ã�„ãƒ‡ãƒ¼ã‚¿ã‚ˆã‚Šå�ˆè¨ˆé‡‘é¡�ã‚’å�–å¾—ã�™ã‚‹
+                ArrayList arList = new ArrayList();
+                string ExcuteSQL = "SELECT SUM(PAYMENTAMOUNT) FROM CONSTRUCTIONLEDGEREXCUTE";
+                ExcuteSQL += string.Format(" WHERE CONSTRUCTIONCODE = {0}", CurRec.ConstructionCode);
+                ExcuteSQL += string.Format(" AND GROUPCOUNT = {0}", CurRec.GroupCount);
+                ExcuteSQL += string.Format(" AND LINECOUNT = {0}", CurRec.LineCount);
+                if (!ExcuteDB.ExecuteReader(ExcuteSQL, ref arList) || arList.Count == 0) return false;
+
+                object[] wrkobj = (object[])arList[0];
+                int TotalVal = CommonMotions.cnvInt(wrkobj[0]);
+
+                bool bRet = false;
+                if (TotalVal < CurRec.ExecutionAmount) bRet = true;
+
+                return bRet;
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("ã‚·ã‚¹ãƒ†ãƒ ã‚¨ãƒ©ãƒ¼ï¼š{0}ï¼š{1}", CommonMotions.GetMethodName(), ex.Message);
+                return false;
+            }
+        }
+        #endregion
+
+        #region å¹³å�‡ç¨¼åƒ�æ•°ã‚ˆã‚Š1æ—¥åˆ†ã�®çµ¦ä¸Žã‚’å�–å¾—ã�™ã‚‹
+        /// <summary>
+        /// å¹³å�‡ç¨¼åƒ�æ•°ã‚ˆã‚Š1æ—¥åˆ†ã�®çµ¦ä¸Žã‚’å�–å¾—ã�™ã‚‹
+        /// </summary>
+        /// <param name="PersonCode"></param>
+        /// <returns></returns>
+        private static double Get1DaysSalaryForOperating(IOMPersonInCharge PersonDB, int PersonCode, int GroupCount)
+        {
+            try
+            {
+                int monthSalary = 0;
+                if (GroupCount == (int)FrmConstructionLedger.DataGroup.Payroll)
+                {   // æ‹…å½“è€…çµ¦ä¸Žã�®å ´å�ˆ
+                    // æ‹…å½“è€…ãƒžã‚¹ã‚¿ã‚ˆã‚Šçµ¦ä¸Žæœˆé¡�ã‚’å�–å¾—ã�™ã‚‹
+                    string strPerson = PersonDB.CreatePrimarykeyString(PersonCode);
+                    PersonInChargeMaster personRec = new PersonInChargeMaster();
+                    PersonDB.SelectAction(strPerson, ref personRec, false);
+
+                    // å‡ºå‹¤è£œæ­£å€¤ä¿‚æ•°ã‚’æŽ›ã�‘ã‚‹
+                    monthSalary = CommonMotions.cnvRound(personRec.MonthlySalary * (double)CommonDefine.s_SalaryCorrection);
+                }
+                else if (GroupCount == (int)FrmConstructionLedger.DataGroup.Instructor)
+                {
+                    // æŒ‡å°Žå“¡æœˆé¡�ã‚’å�–å¾—ã�™ã‚‹
+                    monthSalary = CommonDefine.InstructorMonthryCost;
+                }
+                else if (GroupCount == (int)FrmConstructionLedger.DataGroup.Assistant)
+                {
+                    // å‰¯æ‹…å½“è€…æœˆé¡�ã‚’å�–å¾—ã�™ã‚‹
+                    monthSalary = CommonDefine.AssistantMonthryCost;
+                }
+
+                // è¨ˆç®—å€¤ã‚’æœˆç¨¼åƒ�æ—¥æ•°ã�§å‰²ã‚‹
+                double daylySalary = monthSalary / CommonDefine.s_WorkingDaysOfMonth;
+
+                return daylySalary;
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("ã‚·ã‚¹ãƒ†ãƒ ã‚¨ãƒ©ãƒ¼ï¼š{0}ï¼š{1}", CommonMotions.GetMethodName(), ex.Message);
+                return 0;
+            }
+        }
+        #endregion
+
+        #region æœˆå·¥æ•°ã‚ˆã‚Š1æ—¥åˆ†ã�®çµ¦ä¸Žã‚’å�–å¾—ã�™ã‚‹
+        /// <summary>
+        /// æœˆå·¥æ•°ã‚ˆã‚Š1æ—¥åˆ†ã�®çµ¦ä¸Žã‚’å�–å¾—ã�™ã‚‹
+        /// </summary>
+        /// <param name="PersonCode"></param>
+        /// <returns></returns>
+        private static double Get1DaysSalaryForFixed(IOMPersonInCharge PersonDB, int PersonCode, int GroupCount)
+        {
+            try
+            {
+                int monthSalary = 0;
+                
+                if (GroupCount == (int)FrmConstructionLedger.DataGroup.Payroll)
+                {   // æ‹…å½“è€…çµ¦ä¸Žã�®å ´å�ˆ
+                    // æ‹…å½“è€…ãƒžã‚¹ã‚¿ã‚ˆã‚Šçµ¦ä¸Žæœˆé¡�ã‚’å�–å¾—ã�™ã‚‹
+                    string strPerson = PersonDB.CreatePrimarykeyString(PersonCode);
+                    PersonInChargeMaster personRec = new PersonInChargeMaster();
+                    PersonDB.SelectAction(strPerson, ref personRec, false);
+
+                    // å‡ºå‹¤è£œæ­£å€¤ä¿‚æ•°ã‚’æŽ›ã�‘ã‚‹
+                    monthSalary = CommonMotions.cnvRound(personRec.MonthlySalary * (double)CommonDefine.s_SalaryCorrection);
+
+                }
+                else if (GroupCount == (int)FrmConstructionLedger.DataGroup.Instructor)
+                {
+                    // æŒ‡å°Žå“¡æœˆé¡�ã‚’å�–å¾—ã�™ã‚‹
+                    monthSalary = CommonDefine.InstructorMonthryCost;
+                }
+                else if (GroupCount == (int)FrmConstructionLedger.DataGroup.Assistant)
+                {
+                    // å‰¯æ‹…å½“è€…æœˆé¡�ã‚’å�–å¾—ã�™ã‚‹
+                    monthSalary = CommonDefine.AssistantMonthryCost;
+                }
+
+                // è¨ˆç®—å€¤ã‚’æœˆå·¥æ•°æ—¥æ•°ã�§å‰²ã‚‹
+                double daylySalary = CommonMotions.cnvRound(monthSalary / CommonDefine.s_ManHourUnitMonth);
+
+                return daylySalary;
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("ã‚·ã‚¹ãƒ†ãƒ ã‚¨ãƒ©ãƒ¼ï¼š{0}ï¼š{1}", CommonMotions.GetMethodName(), ex.Message);
+                return 0;
+            }
+        }
+        #endregion
+
+        #region è©³ç´°å�°å¸³ã�«æŒ‡å®šé‡‘é¡�ã‚’è¨­å®šã�™ã‚‹ã�‹è¶³ã�—ã�“ã‚€
+        /// <summary>
+        /// è©³ç´°å�°å¸³ã�«æŒ‡å®šé‡‘é¡�ã‚’è¨­å®šã�™ã‚‹ã�‹è¶³ã�—ã�“ã‚€
+        /// </summary>
+        /// <param name="LedgerExDB">è©³ç´°å�°å¸³æ”¯æ‰•ã�„ãƒ‡ãƒ¼ã‚¿</param>
+        /// <param name="ConstrCode">å·¥äº‹ç•ªå�·</param>
+        /// <param name="GroupCount">ã‚°ãƒ«ãƒ¼ãƒ—ç•ªå�·</param>
+        /// <param name="LineCount">è¡Œç•ªå�·</param>
+        /// <param name="ColumnCount">åˆ—ç•ªå�·</param>
+        /// <param name="DaySalary">çµ¦ä¸Žé‡‘é¡�</param>
+        /// <param name="ColumnDate">å¯¾è±¡æœˆ</param>
+        /// <param name="bSetFlag">ã‚»ãƒƒãƒˆãƒ•ãƒ©ã‚°</param>
+        /// <returns></returns>
+        private static bool AddOrSetSalary(IOConstructionLedgerExcute LedgerExDB
+                                    , int ConstrCode, int GroupCount, int LineCount, int ColumnCount
+                                    , int DaySalary, DateTime ColumnDate)
+        {
+            try
+            {
+                // ã‚­ãƒ¼ä½œæˆ�
+                string strSQL = LedgerExDB.CreatePrimarykeyString(ConstrCode, GroupCount, LineCount, ColumnCount);
+                strSQL += string.Format(" AND TargetMonth = TO_DATE('{0}','YYYY/MM/DD')", ColumnDate.ToShortDateString());
+
+                // ãƒ‡ãƒ¼ã‚¿èª­è¾¼ã�¿
+                List<ConstructionLedgerExcute> LedgerExDBList = new List<ConstructionLedgerExcute>();
+                ConstructionLedgerExcute LedgerExDBRec = new ConstructionLedgerExcute();
+                bool ReadData = LedgerExDB.SelectAction(strSQL, ref LedgerExDBList, false);
+                if (!ReadData || LedgerExDBList.Count == 0)
+                {
+                    LedgerExDBRec.ConstructionCode = ConstrCode;	// å·¥äº‹ã‚³ãƒ¼ãƒ‰
+                    LedgerExDBRec.GroupCount = GroupCount;          // ã‚°ãƒ«ãƒ¼ãƒ—ç•ªå�·
+                    LedgerExDBRec.LineCount = LineCount;            // è¡Œç•ªå�·
+                    LedgerExDBRec.ColumnCount = ColumnCount;        // åˆ—ç•ªå�·
+                    LedgerExDBRec.PaymentAmount = DaySalary;        // æ”¯æ‰•é‡‘é¡�
+                    LedgerExDBRec.TargetMonth = ColumnDate;         // å¯¾è±¡å¹´æœˆ
+                    
+                    // ãƒ‡ãƒ¼ã‚¿ä½œæˆ�
+                    bool bSaccess = LedgerExDB.InsertAction(LedgerExDBRec, false);
+                    
+                    if (bSaccess) return true;
+                    else return false;
+                }
+
+                // ãƒ‡ãƒ¼ã‚¿æ›´æ–°
+                if (!LedgerExDB.UpdateFeild(ConstrCode, GroupCount, LineCount, ColumnCount
+                                            , (int)IOConstructionLedgerExcute.TableColumn.PaymentAmount, DaySalary, false)) return false;
+
+                return true;
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("ã‚·ã‚¹ãƒ†ãƒ ã‚¨ãƒ©ãƒ¼ï¼š{0}ï¼š{1}", CommonMotions.GetMethodName(), ex.Message);
+                return false;
+            }
+        }
+        #endregion
+
+        #region å¯¾è±¡å¹´æœˆã�‹ã‚‰å·¥äº‹è©³ç´°å�°å¸³ã�®ã‚°ãƒªãƒƒãƒ‰ã‚«ãƒ©ãƒ ä½�ç½®ã‚’ç®—å‡ºã�™ã‚‹
+        /// <summary>
+        /// å¯¾è±¡å¹´æœˆã�‹ã‚‰å·¥äº‹è©³ç´°å�°å¸³ã�®ã‚°ãƒªãƒƒãƒ‰ã‚«ãƒ©ãƒ ä½�ç½®ã‚’ç®—å‡ºã�™ã‚‹
+        /// </summary>
+        /// <param name="TargetMonth"></param>
+        /// <returns></returns>
+        private static int CalcTargetMonthToColumn(DateTime StartDate, DateTime TargetMonth)
+        {
+            FrmConstructionLedger frm = new FrmConstructionLedger();
+            int Columncnt = frm.GetGridColumsCount - 1;
+            try
+            {
+                // å‡¦ç�†å¯¾è±¡å¹´æœˆæ—¥ã‚’å¯¾è±¡æœˆæœˆåˆ�æ—¥ã�«å¤‰æ�›ã�™ã‚‹
+                DateTime NowDates = DateTimeUtil.BeginOfMonth(TargetMonth);
+
+                // é–‹å§‹å¹´æœˆæ—¥ã‚’é–‹å§‹å¹´æœˆæœˆåˆ�æ—¥ã�«å¤‰æ�›ã�™ã‚‹
+                DateTime StartMonth = DateTimeUtil.BeginOfMonth(StartDate);
+
+                // çµŒé�Žæœˆæ•°ã‚’å�–å¾—ã�™ã‚‹
+                //TimeSpan ts = NowDates - StartDate;
+                //int DiffMonth = ts.GetTimeSpanMonths();
+                int DiffMonth = (TargetMonth.Month + (TargetMonth.Year - StartDate.Year) * 12) - StartDate.Month;
+
+                // åˆ—ç•ªå�·å�–å¾—
+                Columncnt += DiffMonth;
+
+                return Columncnt;
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("ã‚·ã‚¹ãƒ†ãƒ ã‚¨ãƒ©ãƒ¼ï¼š{0}ï¼š{1}", CommonMotions.GetMethodName(), ex.Message);
+                return Columncnt;
+            }
+            finally
+            {
+                frm.Dispose(); frm = null;
+            }
+        }
+        #endregion
+    }
+}
Index: trunk/src/ProcessManagement/ProcessManagement/DataModel/DepartmentExpenses.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/DataModel/DepartmentExpenses.cs	(nonexistent)
+++ trunk/src/ProcessManagement/ProcessManagement/DataModel/DepartmentExpenses.cs	(revision 16)
@@ -0,0 +1,95 @@
+ï»¿using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace ProcessManagement.DataModel
+{
+    /// <summary>
+    /// éƒ¨ç½²çµŒè²»çŽ‡ãƒžã‚¹ã‚¿
+    /// </summary>
+    public class DepartmentExpenses
+    {
+        #region ãƒ¡ãƒ³ãƒ�å¤‰æ•°
+        private int         m_DepartmentCode = 0;	            // å·¥äº‹ç¨®åˆ¥ã‚³ãƒ¼ãƒ‰
+        private int         m_ExpensesPeriod = 0;               // äº‹æ¥­æœŸ
+        private int         m_NameCode = 0;	                    // çµŒè²»åŒºåˆ†ã‚³ãƒ¼ãƒ‰
+
+        private int         m_DisplayOrder = 0;	                // è¡¨ç¤ºé †
+        private double      m_ExpensesRatio = 0;	            // çµŒè²»çŽ‡
+        private int         m_DeleteFlg = 0;	                // å‰Šé™¤ãƒ•ãƒ©ã‚°
+        private DateTime    m_EntryDate = DateTime.Now;         // ç™»éŒ²æ—¥ä»˜
+        private DateTime    m_UpdateDate = DateTime.Now;        // æ›´æ–°æ—¥ä»˜
+        #endregion
+
+        #region ã‚³ãƒ³ã‚¹ãƒˆãƒ©ã‚¯ã‚¿
+        #endregion
+
+        #region ãƒ—ãƒ­ãƒ‘ãƒ†ã‚£
+        /// <summary>
+        /// åŒºåˆ†ã‚³ãƒ¼ãƒ‰
+        /// </summary>
+        public int DepartmentCode
+        {
+            get { return m_DepartmentCode; }
+            set { m_DepartmentCode = value; }
+        }
+        /// <summary>
+        /// äº‹æ¥­æœŸ
+        /// </summary>
+        public int ExpensesPeriod
+        {
+            get { return m_ExpensesPeriod; }
+            set { m_ExpensesPeriod = value; }
+        }
+        /// <summary>
+        /// å��ç§°ã‚³ãƒ¼ãƒ‰
+        /// </summary>
+        public int NameCode
+        {
+            get { return m_NameCode; }
+            set { m_NameCode = value; }
+        }
+        /// <summary>
+        /// è¡¨ç¤ºé †
+        /// </summary>
+        public int DisplayOrder
+        {
+            get { return m_DisplayOrder; }
+            set { m_DisplayOrder = value; }
+        }
+        /// <summary>
+        /// çµŒè²»çŽ‡
+        /// </summary>
+        public double ExpensesRatio
+        {
+            get { return m_ExpensesRatio; }
+            set { m_ExpensesRatio = value; }
+        }
+        /// <summary>
+        /// å‰Šé™¤ãƒ•ãƒ©ã‚°
+        /// </summary>
+        public int DeleteFlg
+        {
+            get { return m_DeleteFlg; }
+            set { m_DeleteFlg = value; }
+        }
+        /// <summary>
+        /// ç™»éŒ²æ—¥ä»˜
+        /// </summary>
+        public DateTime EntryDate
+        {
+            set { m_EntryDate = value; }
+            get { return m_EntryDate; }
+        }
+        /// <summary>
+        /// æ›´æ–°æ—¥ä»˜
+        /// </summary>
+        public DateTime UpdateDate
+        {
+            set { m_UpdateDate = value; }
+            get { return m_UpdateDate; }
+        }
+        #endregion
+    }
+}
Index: trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstractionList/FrmConstructionListAuxiliary.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstractionList/FrmConstructionListAuxiliary.cs	(revision 15)
+++ trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstractionList/FrmConstructionListAuxiliary.cs	(revision 16)
@@ -38,21 +38,24 @@
         private static string[] s_SQLPart1 = new string[] { "SELECT A.CONSTRUCTIONCODE, A.CONSTRUCTIONPERIOD, B.DETAILSTRING, A.CONSTRUCTIONSTATUSFLG,",
                                                             " C.PERSONCODE, C.PERSONNAME, C.DEPARTMENTCODE, C.DEPARTMENTNAME, C.MANDISPORDER, C.DEPDISPORDER,",
                                                             " D.PERSONCODE, D.PERSONNAME, D.DEPARTMENTCODE, D.DEPARTMENTNAME, D.MANDISPORDER, D.DEPDISPORDER",
-                                                            " FROM CONSTRUCTIONBASEINFO A, CONSTRUCTIONBASEINFODETAIL B" };
+                                                            " FROM CONSTRUCTIONBASEINFO A" };
 
-        private static string[] s_SQLPart2 = new string[] { ", (SELECT CA.CONSTRUCTIONCODE, CA.SALESPERSONCODE PERSONCODE, CB.PERSONNAME PERSONNAME,",
+        private static string[] s_SQLPart2 = new string[] { " LEFT JOIN (SELECT CA.CONSTRUCTIONCODE, CA.SALESPERSONCODE PERSONCODE, CB.PERSONNAME PERSONNAME,",
                                                             " CB.DEPARTMENTCODE DEPARTMENTCODE, CC.DEPARTMENTSTRING DEPARTMENTNAME,",
                                                             " CB.DISPLAYORDER MANDISPORDER, CC.DISPLAYORDER DEPDISPORDER",
-                                                            " FROM CONSTRUCTIONBASEINFO CA, PERSONINCHARGEMASTER CB, DEPARTMENTMASTER CC",
-                                                            " WHERE CA.CONSTRUCTIONPERIOD = {0}",
-                                                            " AND CA.SALESPERSONCODE = CB.PERSONCODE(+) AND CB.DEPARTMENTCODE = CC.DEPARTMENTCODE(+)) C" };
+                                                            " FROM CONSTRUCTIONBASEINFO CA",
+                                                            " LEFT JOIN PERSONINCHARGEMASTER CB ON CA.SALESPERSONCODE = CB.PERSONCODE",
+                                                            " LEFT JOIN DEPARTMENTMASTER CC ON CB.DEPARTMENTCODE = CC.DEPARTMENTCODE",
+                                                            " WHERE CA.CONSTRUCTIONPERIOD = {0}) C ON A.CONSTRUCTIONCODE = C.CONSTRUCTIONCODE" };
 
-        private static string[] s_SQLPart3 = new string[] { ", (SELECT DA.CONSTRUCTIONCODE, DA.CONSTRUCTIONPERSONCODE PERSONCODE, DB.PERSONNAME PERSONNAME,",
+        private static string[] s_SQLPart3 = new string[] { " LEFT JOIN (SELECT DA.CONSTRUCTIONCODE, DA.CONSTRUCTIONPERSONCODE PERSONCODE, DB.PERSONNAME PERSONNAME,",
                                                             " DB.DEPARTMENTCODE DEPARTMENTCODE, DC.DEPARTMENTSTRING DEPARTMENTNAME,",
                                                             " DB.DISPLAYORDER MANDISPORDER, DC.DISPLAYORDER DEPDISPORDER",
-                                                            " FROM CONSTRUCTIONBASEINFO DA, PERSONINCHARGEMASTER DB, DEPARTMENTMASTER DC",
-                                                            " WHERE DA.CONSTRUCTIONPERIOD = {0}",
-                                                            " AND DA.CONSTRUCTIONPERSONCODE = DB.PERSONCODE(+) AND DB.DEPARTMENTCODE = DC.DEPARTMENTCODE(+)) D" };
+                                                            " FROM CONSTRUCTIONBASEINFO DA",
+                                                            " LEFT JOIN PERSONINCHARGEMASTER DB ON DA.CONSTRUCTIONPERSONCODE = DB.PERSONCODE",
+                                                            " LEFT JOIN DEPARTMENTMASTER DC ON DB.DEPARTMENTCODE = DC.DEPARTMENTCODE",
+                                                            " WHERE DA.CONSTRUCTIONPERIOD = {0}) D ON A.CONSTRUCTIONCODE = D.CONSTRUCTIONCODE",
+                                                            ", CONSTRUCTIONBASEINFODETAIL B" };
 
         private static string[] s_SQLPart4 = new string[] { " WHERE A.CONSTRUCTIONPERIOD = {0}",
                                                             " AND A.CONSTRUCTIONCODE = B.CONSTRUCTIONCODE",
@@ -63,10 +66,7 @@
                                                             " AND A.CONSTRUCTIONCODE = B.CONSTRUCTIONCODE",
                                                             " AND B.DETAILNO = {1}" };
 
-        private static string[] s_SQLPart5 = new string[] { " AND A.CONSTRUCTIONCODE = C.CONSTRUCTIONCODE(+)",
-                                                            " AND A.CONSTRUCTIONCODE = D.CONSTRUCTIONCODE(+)" };
-
-        private static string[] s_SQLPart6 = new string[] { " ORDER BY A.CONSTRUCTIONSTATUSFLG ASC, C.DEPDISPORDER ASC, C.MANDISPORDER ASC,",
+        private static string[] s_SQLPart5 = new string[] { " ORDER BY A.CONSTRUCTIONSTATUSFLG ASC, C.DEPDISPORDER ASC, C.MANDISPORDER ASC,",
                                                             " D.DEPDISPORDER ASC, D.MANDISPORDER ASC, A.CONSTRUCTIONCODE DESC" };
         #endregion
 
@@ -286,9 +286,7 @@
             for (int i = 0; i < s_SQLPart1.Length; i++) wrkFormat += s_SQLPart1[i];
             for (int i = 0; i < s_SQLPart2.Length; i++) wrkFormat += s_SQLPart2[i];
             for (int i = 0; i < s_SQLPart3.Length; i++) wrkFormat += s_SQLPart3[i];
-            //for (int i = 0; i < s_SQLPart4.Length; i++) wrkFormat += s_SQLPart4[i];
             for (int i = 0; i < s_SQLPart4Tying.Length; i++) wrkFormat += s_SQLPart4Tying[i];
-            for (int i = 0; i < s_SQLPart5.Length; i++) wrkFormat += s_SQLPart5[i];
 
             strSQL = string.Format(wrkFormat, numUDConstPro.Value, (int)ConstructionBaseInfoDetail.DetailDataNo.ConstructionName);
 
@@ -304,7 +302,7 @@
             strSQL += wrkBuff;
 
             // ORDER BY ’Ç‰Á
-            for (int i = 0; i < s_SQLPart6.Length; i++) strSQL += s_SQLPart6[i];
+            for (int i = 0; i < s_SQLPart5.Length; i++) strSQL += s_SQLPart5[i];
 
         }
         #endregion
@@ -328,7 +326,6 @@
             for (int i = 0; i < s_SQLPart2.Length; i++) wrkFormat += s_SQLPart2[i];
             for (int i = 0; i < s_SQLPart3.Length; i++) wrkFormat += s_SQLPart3[i];
             for (int i = 0; i < s_SQLPart4.Length; i++) wrkFormat += s_SQLPart4[i];
-            for (int i = 0; i < s_SQLPart5.Length; i++) wrkFormat += s_SQLPart5[i];
 
             strSQL = string.Format(wrkFormat, numUDConstPro.Value, (int)ConstructionBaseInfoDetail.DetailDataNo.ConstructionName);
             strSQL += string.Format(" AND A.ConstructionStatusFlg < {0}", ProgressComplete);
@@ -382,7 +379,6 @@
             for (int i = 0; i < s_SQLPart3.Length; i++) wrkFormat += s_SQLPart3[i];
             wrkFormat += ", PROCESSAPPROVAL A1";
             for (int i = 0; i < s_SQLPart4.Length; i++) wrkFormat += s_SQLPart4[i];
-            for (int i = 0; i < s_SQLPart5.Length; i++) wrkFormat += s_SQLPart5[i];
 
             strSQL = string.Format(wrkFormat, numUDConstPro.Value, (int)ConstructionBaseInfoDetail.DetailDataNo.ConstructionName);
             strSQL += string.Format(" AND (A.CONSTRUCTIONCODE = A1.CONSTRUCTIONCODE And A1.ApprovalCode = {0} And A1.SeqNo = 1", ApprovalCode);
@@ -400,7 +396,7 @@
             strSQL += wrkBuff;
 
             // ORDER BY ’Ç‰Á
-            for (int i = 0; i < s_SQLPart6.Length; i++) strSQL += s_SQLPart6[i];
+            for (int i = 0; i < s_SQLPart5.Length; i++) strSQL += s_SQLPart5[i];
         }
         #endregion
 
@@ -423,7 +419,6 @@
             for (int i = 0; i < s_SQLPart2.Length; i++) wrkFormat += s_SQLPart2[i];
             for (int i = 0; i < s_SQLPart3.Length; i++) wrkFormat += s_SQLPart3[i];
             for (int i = 0; i < s_SQLPart4.Length; i++) wrkFormat += s_SQLPart4[i];
-            for (int i = 0; i < s_SQLPart5.Length; i++) wrkFormat += s_SQLPart5[i];
             
             strSQL = string.Format(wrkFormat, numUDConstPro.Value, (int)ConstructionBaseInfoDetail.DetailDataNo.ConstructionName);
             strSQL += " AND EXISTS (SELECT * FROM ESTIMATEDATA C WHERE C.CONSTRUCTIONCODE = A.CONSTRUCTIONCODE)";
@@ -487,7 +482,6 @@
             wrkFormat += ", PROCESSAPPROVAL A1";
             for (int i = 0; i < s_SQLPart4.Length; i++) wrkFormat += s_SQLPart4[i];
             wrkFormat += " AND A.CONSTRUCTIONPERSONCODE != 0";
-            for (int i = 0; i < s_SQLPart5.Length; i++) wrkFormat += s_SQLPart5[i];
 
             strSQL = string.Format(wrkFormat, numUDConstPro.Value, (int)ConstructionBaseInfoDetail.DetailDataNo.ConstructionName);
             strSQL += " AND EXISTS (SELECT * FROM ESTIMATEDATA B1 WHERE B1.CONSTRUCTIONCODE = A.CONSTRUCTIONCODE)";
@@ -554,7 +548,7 @@
             for (int i = 0; i < s_SQLPart3.Length; i++) wrkFormat += s_SQLPart3[i];
             wrkFormat += ", PROCESSAPPROVAL A1";
             for (int i = 0; i < s_SQLPart4.Length; i++) wrkFormat += s_SQLPart4[i];
-            for (int i = 0; i < s_SQLPart5.Length; i++) wrkFormat += s_SQLPart5[i];
+            //for (int i = 0; i < s_SQLPart5.Length; i++) wrkFormat += s_SQLPart5[i];
 
             strSQL = string.Format(wrkFormat, numUDConstPro.Value, (int)ConstructionBaseInfoDetail.DetailDataNo.ConstructionName);
             strSQL += " AND NOT EXISTS (SELECT * FROM PURCHASEORDER B1 WHERE B1.CONSTRUCTIONCODE = A.CONSTRUCTIONCODE)";
@@ -584,7 +578,6 @@
             for (int i = 0; i < s_SQLPart3.Length; i++) wrkFormat += s_SQLPart3[i];
             wrkFormat += ", PURCHASEORDER A1";
             for (int i = 0; i < s_SQLPart4.Length; i++) wrkFormat += s_SQLPart4[i];
-            for (int i = 0; i < s_SQLPart5.Length; i++) wrkFormat += s_SQLPart5[i];
 
             strSQL += " UNION ";
             strSQL += string.Format(wrkFormat, numUDConstPro.Value, (int)ConstructionBaseInfoDetail.DetailDataNo.ConstructionName);
@@ -634,7 +627,6 @@
             for (int i = 0; i < s_SQLPart3.Length; i++) wrkFormat += s_SQLPart3[i];
             wrkFormat += ", PROCESSAPPROVAL A1, PURCHASEORDER A2";
             for (int i = 0; i < s_SQLPart4.Length; i++) wrkFormat += s_SQLPart4[i];
-            for (int i = 0; i < s_SQLPart5.Length; i++) wrkFormat += s_SQLPart5[i];
 
             strSQL = string.Format(wrkFormat, numUDConstPro.Value, (int)ConstructionBaseInfoDetail.DetailDataNo.ConstructionName);
             strSQL += " AND EXISTS (SELECT * FROM ESTIMATEDATA B1 WHERE B1.CONSTRUCTIONCODE = A.CONSTRUCTIONCODE)";
Index: trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionBaseInfo/DataChange.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionBaseInfo/DataChange.cs	(revision 15)
+++ trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionBaseInfo/DataChange.cs	(revision 16)
@@ -33,6 +33,75 @@
     /// </summary>
     partial class FrmConstructionBaseInfo
     {
+        #region “¯‚¶�HŽ–“à‚ÌŽó’�‹àŠz�‡Œv‚ðŽæ“¾‚·‚é
+        /// <summary>
+        /// “¯‚¶�HŽ–“à‚ÌŽó’�‹àŠz�‡Œv‚ðŽæ“¾‚·‚é
+        /// </summary>
+        /// <param name="cbiDB"></param>
+        /// <param name="work"></param>
+        private int FluctuationDataOrdersPrice(IOConstructionBaseInfo cbiDB)
+        {
+            try
+            {
+                int iCode1 = CommonDefine.ProjectsStatus.First(x => x.Value.Equals("”ñ Žó ’�")).Key;
+
+                string strSQL = "SELECT SUM(ORDERSDECISIONPRICE) FROM CONSTRUCTIONBASEINFO";
+                strSQL += string.Format(" WHERE (TRUNC(CONSTRUCTIONCODE / 100) = {0})", (int)(m_ConstructionCode / 100));
+                strSQL += string.Format(" AND CONSTRUCTIONSTATUSFLG != {0})", iCode1);
+                strSQL += " GROUP BY TRUNC(CONSTRUCTIONCODE / 100)";
+
+                ArrayList Arlist = new ArrayList();
+                if (!cbiDB.ExecuteReader(strSQL, ref Arlist, false)) return 0;
+                if (Arlist.Count == 0) return 0;
+
+                object[] objCur = (object[])Arlist[0];
+
+                return CommonMotions.cnvInt(objCur[0]);
+            }
+            catch (System.Exception ex)
+            {
+                logger.ErrorFormat("ƒVƒXƒeƒ€ƒGƒ‰�[�F{0}�F{1}", CommonMotions.GetMethodName(), ex.Message);
+                return 0;
+            }
+        }
+        #endregion
+
+        #region ‹‹—^‹àŠzŒvŽZ�ˆ—�
+        /// <summary>
+        /// ‹‹—^‹àŠzŒvŽZ�ˆ—�
+        /// </summary>
+        /// <param name="MonthryCost"></param>
+        /// <param name="OrdersDecisionPrice"></param>
+        /// <param name="ConstructionStart"></param>
+        /// <param name="ConstructionEnd"></param>
+        /// <param name="ExecutionAmount"></param>
+        /// <param name="AmountConfigRate"></param>
+        private void CalcPayValueData(double MonthryCost, double OrdersDecisionPrice, DateTime ConstructionStart, DateTime ConstructionEnd,
+                                        ref double ExecutionAmount, ref double AmountConfigRate)
+        {
+            try
+            {
+                if (OrdersDecisionPrice == 0) return;
+
+                // “ú“–ŒvŽZ
+                double DairySalary = (MonthryCost * CommonDefine.s_SalaryCorrection) / CommonDefine.s_ManHourUnitMonth;
+                // ‰Ò“­“úŒvŽZ
+                int workingCount = ClsCalendar.CalcPassedDaysCount(ConstructionStart, ConstructionEnd);
+
+                int iInput = CommonMotions.cnvRound(DairySalary * workingCount);                        // ‹‹—^Žx•¥‘�Šz
+
+                ExecutionAmount = iInput;                                                     // ŽÀ�s‹àŠz
+
+                AmountConfigRate = (iInput / OrdersDecisionPrice) * 100.0;          // ‹àŠz�\�¬—¦
+
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("ƒVƒXƒeƒ€ƒGƒ‰�[�F{0}�F{1}", CommonMotions.GetMethodName(), ex.Message);
+            }
+        }
+        #endregion
+
         // ---------- ‘�Œ¸�HŽ–�ˆ—�
         #region �HŽ–‘ä’ ƒf�[ƒ^�ì�¬
         /// <summary>
@@ -162,7 +231,7 @@
                 // ˆÄŒ��i’»“ú•tƒf�[ƒ^“o˜^
                 if (!frm.ProgressDate(PDateDB, NewCode))
                 {
-                    MessageBox.Show("‘�ˆÄŒ��i’»“ú•tƒf�[ƒ^“o˜^‚ÉŽ¸”s‚µ‚Ü‚µ‚½�B", "ƒf�[ƒ^�ì�¬ƒGƒ‰�[", MessageBoxButtons.OK, MessageBoxIcon.Error);
+                    MessageBox.Show("ˆÄŒ��i’»“ú•tƒf�[ƒ^“o˜^‚ÉŽ¸”s‚µ‚Ü‚µ‚½�B", "ƒf�[ƒ^�ì�¬ƒGƒ‰�[", MessageBoxButtons.OK, MessageBoxIcon.Error);
                     PDateDB.rollback();
                     LinkDB.rollback();
                     BaseDB.rollback();
@@ -399,7 +468,11 @@
         /// �HŽ–—\ŽZ�‘�Fƒf�[ƒ^•Ï�X
         /// </summary>
         /// <returns></returns>
-        private bool BudgetDataChange(IOProcessApproval ApprovalDB, IOConstructionBudget BudgetDB, IOConstructionBudgetDetail BudgetDDB, IOMPersonInCharge PersonDB)
+        private bool BudgetDataChange(IOProcessApproval ApprovalDB,
+                                        IOConstructionBudget BudgetDB,
+                                        IOConstructionBudgetDetail BudgetDDB,
+                                        IOMPersonInCharge PersonDB,
+                                        int TotalOrdersPrice)
         {
             FrmConstructionBudget frm = new FrmConstructionBudget();
             try
@@ -454,14 +527,19 @@
                 }
                 // ----- �HŽ–—\ŽZ�‘–¾�×ƒf�[ƒ^�ˆ—�
                 // �HŽ–’S“–ŽÒ
-                if (!BudgetDetailDataConstructorSet(BudgetDDB, frm, ConstrPersonCode, ConstrPersonName, BudgetRec,
-                                                    personRec.MonthlySalary, ExpensesList)) return false;
+                if (!BudgetDetailDataSalarySet(frm, BudgetDDB, BudgetRec, TotalOrdersPrice
+                                                    , (int)FrmConstructionBudget.DataGroup.PayrollExpenses, ConstrPersonCode, ConstrPersonName
+                                                    , personRec.MonthlySalary, ExpensesList)) return false;
 
                 // �HŽ–•›’S“–ŽÒ
-                if (!BudgetDetailDataAssistantSet(BudgetDDB, frm, AssistantCode, AssistantName, BudgetRec)) return false;
+                if (!BudgetDetailDataSalarySet(frm, BudgetDDB, BudgetRec, TotalOrdersPrice
+                                                    , (int)FrmConstructionBudget.DataGroup.AssistantCosts, AssistantCode, AssistantName
+                                                    , CommonDefine.AssistantMonthryCost, ExpensesList)) return false;
 
                 // �HŽ–Žw“±ˆõ
-                if (!BudgetDetailDataInstructorSet(BudgetDDB, frm, InstructorCode, InstructorName, BudgetRec)) return false;
+                if (!BudgetDetailDataSalarySet(frm, BudgetDDB, BudgetRec, TotalOrdersPrice
+                                                    , (int)FrmConstructionBudget.DataGroup.InstructorCosts, InstructorCode, InstructorName
+                                                    , CommonDefine.InstructorMonthryCost, ExpensesList)) return false;
 
                 return true;
             }
@@ -491,6 +569,10 @@
             /// Œo”ï—¦
             /// </summary>
             ExpensesRate,
+            /// <summary>
+            /// Œo”ï–¼�ÌƒR�[ƒh
+            /// </summary>
+            NameCode,
         }
         #endregion
 
@@ -505,7 +587,7 @@
             try
             {
                 // •”��Œo”ï—¦ƒ}ƒXƒ^Žæ“¾
-                string strSQL = "SELECT A.NAMESTRING, NVL(B.EXPENSESRATIO, 0)";
+                string strSQL = "SELECT A.NAMESTRING, NVL(B.EXPENSESRATIO, 0), B.NAMECODE";
                 strSQL += " FROM DIVISIONMASTER A";
                 strSQL += " LEFT OUTER JOIN";
                 strSQL += string.Format(" (SELECT NAMECODE, DEPARTMENTCODE, EXPENSESRATIO FROM DEPARTMENTEXPENSESMASTER WHERE DEPARTMENTCODE = {0}) B", DepartmentCode);
@@ -547,7 +629,7 @@
                 if (BudgetRec.CreatorCode == ConstrPersonCode) goto SecondProc;
 
                 // �o‹Î•â�³’lŒW�”‚ðŠ|‚¯‚ÄŒŽŽû‚ð‹�‚ß‚é
-                MonthlySalary = CommonMotions.cnvRound(MonthlySalary * (double)CommonDefine.s_SalaryExpenses);
+                MonthlySalary = CommonMotions.cnvRound(MonthlySalary * (double)CommonDefine.s_SalaryCorrection);
 
                 if (ConstrPersonCode == 0)
                 {
@@ -692,6 +774,8 @@
                     work.GroupCount = (int)FrmConstructionBudget.DataGroup.Expenses;
                     // �s”Ô�†
                     work.LineCount = icnt++;
+                    // Œo”ï–¼�ÌƒR�[ƒh
+                    work.ComponentCode = CommonMotions.cnvInt(wrkExpense[(int)ExpensesArray.NameCode]);
                     // �€–Ú–¼�Ì
                     string strVallue = CommonMotions.cnvString(wrkExpense[(int)ExpensesArray.ExpensesName]);
                     work.FirstString = string.Format("{0}({1}%)", strVallue, dExpenses.ToString("0.00"));
@@ -716,20 +800,27 @@
         }
         #endregion
 
-        #region �HŽ–—\ŽZ�‘�F’S“–ŽÒƒZƒbƒg
+        #region �HŽ–—\ŽZ�‘�F’S“–ŽÒ�E•›’S“–ŽÒ�EŽw“±ˆõƒZƒbƒg
         /// <summary>
-        /// �HŽ–—\ŽZ�‘�F’S“–ŽÒƒZƒbƒg
+        /// �HŽ–—\ŽZ�‘�F’S“–ŽÒ�E•›’S“–ŽÒ�EŽw“±ˆõƒZƒbƒg
         /// </summary>
-        /// <param name="ApprovalNo"></param>
+        /// <param name="frm"></param>
+        /// <param name="BudgetDDB"></param>
+        /// <param name="BudgetRec"></param>
+        /// <param name="TotalOrdersPrice"></param>
+        /// <param name="GroupNo"></param>
+        /// <param name="ConstructorCode"></param>
+        /// <param name="ConstructorName"></param>
+        /// <param name="MonthryCost"></param>
+        /// <param name="ExpensesList"></param>
         /// <returns></returns>
-        private bool BudgetDetailDataConstructorSet(IOConstructionBudgetDetail BudgetDDB, FrmConstructionBudget frm
-                                                    , int ConstructorCode, string ConstructorName
-                                                    , ConstructionBudget BudgetRec, double MonthryCost
-                                                    , ArrayList ExpensesList)
+        private bool BudgetDetailDataSalarySet(FrmConstructionBudget frm, IOConstructionBudgetDetail BudgetDDB, ConstructionBudget BudgetRec, int TotalOrdersPrice
+                                                    , int GroupNo, int ConstructorCode, string ConstructorName
+                                                    , double MonthryCost, ArrayList ExpensesList)
         {
             try
             {
-                string strSQL = BudgetDDB.CreatePrimarykeyString(m_ConstructionCode, (int)FrmConstructionBudget.DataGroup.PayrollExpenses);
+                string strSQL = BudgetDDB.CreatePrimarykeyString(m_ConstructionCode, GroupNo);
                 ConstructionBudgetDetail DetailRec = new ConstructionBudgetDetail();
                 // �HŽ–—\ŽZ�‘–¾�×ƒf�[ƒ^‚ª–³‚¢�ê�‡‚Í�ì�¬‚ð‘O’ñ‚É�ˆ—�‘±�s
                 bool UpdateFlg = BudgetDDB.SelectAction(strSQL, ref DetailRec, false);
@@ -737,12 +828,13 @@
                 // ’S“–ŽÒ‚ª“¯‚¶‚È‚ç‚Î�ˆ—�‚µ‚È‚¢
                 if (DetailRec.CompanyCode == ConstructorCode) return true;
 
-                // Žó’�‹àŠzŽæ“¾
-                double dBase = (int)CommonMotions.cnvUndecidedStringToDouble(m_DspCtrl[(int)DspCnt.OrdersDecisionPrice].Text);
+                // ‹‹—^‹àŠzƒZƒbƒg
+                double ExecutionAmount = 0;
+                double AmountConfigRate = 0;
+                CalcPayValueData(MonthryCost, TotalOrdersPrice,
+                                BudgetRec.ConstructionStart, BudgetRec.ConstructionEnd,
+                                ref ExecutionAmount, ref AmountConfigRate);
 
-                // �o‹Î•â�³’lŒW�”‚ðŠ|‚¯‚ÄŒŽŽû‚ð‹�‚ß‚é
-                MonthryCost = CommonMotions.cnvRound(CommonMotions.cnvRound(MonthryCost * (double)CommonDefine.s_SalaryExpenses));
-
                 // –³‚µ‚ÍƒNƒŠƒA‚µ‚Ä‹ó‚É‚È‚Á‚½ƒf�[ƒ^‚ðƒZƒbƒg
                 if (ConstructorCode == 0)
                 {
@@ -751,9 +843,9 @@
                 else
                 {
                     DetailRec.CompanyType = (int)CommonDefine.SearchLogDataType.Person;
-                    DetailRec.OrderDesiredAmount = CommonDefine.AssistantMonthryCost * BudgetRec.ConstructionTimes;
-                    DetailRec.ExecutionAmount = DetailRec.OrderDesiredAmount;
-                    DetailRec.AmountConfigRate = CommonMotions.cnvRound(DetailRec.ExecutionAmount / dBase * 100.0);
+                    DetailRec.OrderDesiredAmount = ExecutionAmount;
+                    DetailRec.ExecutionAmount = ExecutionAmount;
+                    DetailRec.AmountConfigRate = AmountConfigRate;
                 }
                 DetailRec.CompanyCode = ConstructorCode;
                 DetailRec.CompanyName = ConstructorName;
@@ -767,135 +859,21 @@
                 {
                     // ƒL�[•”ƒZƒbƒg
                     DetailRec.ConstructionCode = m_ConstructionCode;
-                    DetailRec.GroupCount = (int)FrmConstructionBudget.DataGroup.PayrollExpenses;
+                    DetailRec.GroupCount = GroupNo;
                     DetailRec.CompanyType = (int)CommonDefine.SearchLogDataType.Person;
-                    DetailRec.FirstString = frm.GetTitleConstructor;
-                    if (!BudgetDDB.InsertAction(DetailRec, false)) return false;
-                }
 
-                // Œo”ï‚Ì�X�V
-                if (!BudgetSetExpenses(BudgetDDB, dBase, ExpensesList)) return false;
-
-                return true;
-            }
-            catch (Exception ex)
-            {
-                logger.ErrorFormat("ƒVƒXƒeƒ€ƒGƒ‰�[�F{0}�F{1}", CommonMotions.GetMethodName(), ex.Message);
-                return false;
-            }
-        }
-        #endregion
-
-        #region �HŽ–—\ŽZ�‘�Fƒf�[ƒ^•›’S“–ŽÒƒZƒbƒg
-        /// <summary>
-        /// �HŽ–—\ŽZ�‘�Fƒf�[ƒ^•›’S“–ŽÒƒZƒbƒg
-        /// </summary>
-        /// <param name="ApprovalNo"></param>
-        /// <returns></returns>
-        private bool BudgetDetailDataAssistantSet(IOConstructionBudgetDetail BudgetDDB, FrmConstructionBudget frm
-                                                    , int AssistantCode, string AssistantName, ConstructionBudget BudgetRec)
-        {
-            try
-            {
-                string strSQL = BudgetDDB.CreatePrimarykeyString(m_ConstructionCode, (int)FrmConstructionBudget.DataGroup.AssistantCosts);
-                ConstructionBudgetDetail DetailRec = new ConstructionBudgetDetail();
-                // �HŽ–—\ŽZ�‘–¾�×ƒf�[ƒ^‚ª–³‚¢�ê�‡‚Í�ì�¬‚ð‘O’ñ‚É�ˆ—�‘±�s
-                bool UpdateFlg = BudgetDDB.SelectAction(strSQL, ref DetailRec, false);
-
-                // •›’S“–ŽÒ‚ª“¯‚¶‚È‚ç‚Î�ˆ—�‚µ‚È‚¢
-                if (DetailRec.CompanyCode == AssistantCode) return true;
-
-                if (AssistantCode == 0)
-                {
-                    ClearConstructionBudgetDetailRec(ref DetailRec);
-                }
-                else
-                {
-                    double dBase = (int)CommonMotions.cnvUndecidedStringToDouble(m_DspCtrl[(int)DspCnt.OrdersDecisionPrice].Text);
-                    // •›’S“–ŽÒ‹‹—^
-                    DetailRec.CompanyType = (int)CommonDefine.SearchLogDataType.Person;
-                    DetailRec.OrderDesiredAmount = CommonDefine.AssistantMonthryCost * BudgetRec.ConstructionTimes;
-                    DetailRec.ExecutionAmount = DetailRec.OrderDesiredAmount;
-                    DetailRec.AmountConfigRate = CommonMotions.cnvRound(DetailRec.ExecutionAmount / dBase * 100.0);
-                }
-                DetailRec.CompanyCode = AssistantCode;
-                DetailRec.CompanyName = AssistantName;
-
-                // ----- �HŽ–—\ŽZ�‘–¾�×ƒf�[ƒ^�X�V
-                if (UpdateFlg)
-                {
-                    if (!BudgetDDB.UpdateAction(strSQL, DetailRec, false)) return false;
-                }
-                else
-                {
-                    // ƒL�[•”ƒZƒbƒg
-                    DetailRec.ConstructionCode = m_ConstructionCode;
-                    DetailRec.GroupCount = (int)FrmConstructionBudget.DataGroup.AssistantCosts;
-                    DetailRec.CompanyType = (int)CommonDefine.SearchLogDataType.Person;
-                    DetailRec.FirstString = frm.GetTitleAssistant;
+                    frm.GetTitileParametar = GroupNo;
+                    DetailRec.FirstString = frm.GetTitleString;
                     if (!BudgetDDB.InsertAction(DetailRec, false)) return false;
                 }
 
-                return true;
-            }
-            catch (Exception ex)
-            {
-                logger.ErrorFormat("ƒVƒXƒeƒ€ƒGƒ‰�[�F{0}�F{1}", CommonMotions.GetMethodName(), ex.Message);
-                return false;
-            }
-        }
-        #endregion
-
-        #region �HŽ–—\ŽZ�‘�F–¾�×ƒf�[ƒ^Žw“±ˆõƒZƒbƒg
-        /// <summary>
-        /// �HŽ–—\ŽZ�‘�Fƒf�[ƒ^Žw“±ˆõƒZƒbƒg
-        /// </summary>
-        /// <param name="ApprovalNo"></param>
-        /// <returns></returns>
-        private bool BudgetDetailDataInstructorSet(IOConstructionBudgetDetail BudgetDDB, FrmConstructionBudget frm,
-                                                    int InstructorCode, string InstructorName, ConstructionBudget BudgetRec)
-        {
-            try
-            {
-                string strSQL = BudgetDDB.CreatePrimarykeyString(m_ConstructionCode, (int)FrmConstructionBudget.DataGroup.InstructorCosts);
-                ConstructionBudgetDetail DetailRec = new ConstructionBudgetDetail();
-                // �HŽ–—\ŽZ�‘–¾�×ƒf�[ƒ^‚ª–³‚¢�ê�‡‚Í�ì�¬‚ð‘O’ñ‚É�ˆ—�‘±�s
-                bool UpdateFlg = BudgetDDB.SelectAction(strSQL, ref DetailRec, false);
-
-                // Žw“±ˆõ‚ª“¯‚¶‚È‚ç‚Î�ˆ—�‚µ‚È‚¢
-                if (DetailRec.CompanyCode == InstructorCode) return true;
-
-                if (InstructorCode == 0)
+                // ’S“–ŽÒ‚Ì�ê�‡‚Ì‚Ý
+                if (GroupNo == (int)FrmConstructionBudget.DataGroup.PayrollExpenses)
                 {
-                    ClearConstructionBudgetDetailRec(ref DetailRec);
+                    // Œo”ïƒf�[ƒ^�X�V�i’S“–ŽÒ‚ª•Ï‚í‚Á‚½�ê�‡‚Í•”��•Ï‚í‚Á‚Ä‚¢‚È‚­‚Ä‚àŒvŽZ�j
+                    if (!BudgetSetExpenses(BudgetDDB, TotalOrdersPrice, ExpensesList)) return false;
                 }
-                else
-                {
-                    double dBase = (int)CommonMotions.cnvUndecidedStringToDouble(m_DspCtrl[(int)DspCnt.OrdersDecisionPrice].Text);
-                    // Žw“±ˆõ‹‹—^
-                    DetailRec.CompanyType = (int)CommonDefine.SearchLogDataType.Person;
-                    DetailRec.OrderDesiredAmount = CommonDefine.InstructorMonthryCost * BudgetRec.ConstructionTimes;
-                    DetailRec.ExecutionAmount = DetailRec.OrderDesiredAmount;
-                    DetailRec.AmountConfigRate = CommonMotions.cnvRound(DetailRec.ExecutionAmount / dBase * 100.0);
-                }
-                DetailRec.CompanyCode = InstructorCode;
-                DetailRec.CompanyName = InstructorName;
 
-                // ----- �HŽ–—\ŽZ�‘–¾�×ƒf�[ƒ^�X�V
-                if (UpdateFlg)
-                {
-                    if (!BudgetDDB.UpdateAction(strSQL, DetailRec, false)) return false;
-                }
-                else
-                {
-                    // ƒL�[•”ƒZƒbƒg
-                    DetailRec.ConstructionCode = m_ConstructionCode;
-                    DetailRec.GroupCount = (int)FrmConstructionBudget.DataGroup.InstructorCosts;
-                    DetailRec.CompanyType = (int)CommonDefine.SearchLogDataType.Person;
-                    DetailRec.FirstString = frm.GetTitleInstructor;
-                    if (!BudgetDDB.InsertAction(DetailRec, false)) return false;
-                }
-
                 return true;
             }
             catch (Exception ex)
@@ -911,20 +889,52 @@
         /// <summary>
         /// �HŽ–�Ú�×‘ä’ ƒf�[ƒ^•Ï�X
         /// </summary>
+        /// <param name="cbiDB"></param>
         /// <param name="LedgerDB"></param>
         /// <param name="LedgerDDB"></param>
         /// <param name="LedgerEDB"></param>
+        /// <param name="PersonDB"></param>
+        /// <param name="cbLinkDB"></param>
+        /// <param name="TotalOrdersPrice"></param>
+        /// <param name="TyingDataFlag"></param>
         /// <returns></returns>
-        private bool LedgerDataChange(IOConstructionLedger LedgerDB,
+        private bool LedgerDataChange(IOConstructionBaseInfo cbiDB,
+                                        IOConstructionLedger LedgerDB,
                                         IOConstructionLedgerDetail LedgerDDB,
                                         IOConstructionLedgerExcute LedgerEDB,
-                                        IOMPersonInCharge PersonDB)
+                                        IOMPersonInCharge PersonDB,
+                                        IOConstructionLink cbLinkDB,
+                                        int TotalOrdersPrice,
+                                        bool TyingDataFlag)
         {
             FrmConstructionLedger frm = new FrmConstructionLedger();
             try
             {
+                // ----- “–�ˆ—�“à‚Å‚Ì�HŽ–”Ô�†Ši”[ƒGƒŠƒA
+                int ProcConstrCode = 0;
+
                 // ----- �HŽ–�Ú�×‘ä’ ƒf�[ƒ^Žæ“¾
-                string strLedger = LedgerDB.CreatePrimarykeyString(m_ConstructionCode);
+                if (TyingDataFlag)
+                {
+                    string strLink = cbLinkDB.CreatePrimarykeyString(m_ConstructionCode);
+                    ConstructionLink LinkRec = new ConstructionLink();
+                    if (cbLinkDB.SelectAction(strLink, ref LinkRec, false))
+                    {
+                        ProcConstrCode = m_ConstructionCode;
+                    }
+                    else
+                    {
+                        strLink = string.Format(" WHERE FLUCTUATIONCODE = {0}", m_ConstructionCode);
+                        if (!cbLinkDB.SelectAction(strLink, ref LinkRec, false)) return false;
+                        ProcConstrCode = LinkRec.ConstructionCode;
+                    }
+                }
+                else
+                {
+                    ProcConstrCode = m_ConstructionCode;
+                }
+
+                string strLedger = LedgerDB.CreatePrimarykeyString(ProcConstrCode);
                 ConstructionLedger LedgerRec = new ConstructionLedger();
                 // ƒf�[ƒ^‚ª–³‚¢�ê�‡‚Í�ˆ—�‚µ‚È‚¢
                 if (!LedgerDB.SelectAction(strLedger, ref LedgerRec, false)) return true;
@@ -962,17 +972,50 @@
 
                 // ----- �HŽ–�Ú�×‘ä’ –¾�×ƒf�[ƒ^�ˆ—�
                 // �HŽ–’S“–ŽÒ
-                if (!LedgerDetailDataConstructorSet(LedgerDDB, LedgerEDB, ConstrPersonCode, ConstrPersonName, personRec.MonthlySalary, ExpensesList, ref bChangeCode)) return false;
+                if (!LedgerDetailDataSalarySet(LedgerDDB, ProcConstrCode, frm, TotalOrdersPrice, (int)FrmConstructionLedger.DataGroup.Payroll,
+                                                    ConstrPersonCode, ConstrPersonName, personRec.MonthlySalary,
+                                                    ExpensesList, LedgerRec,
+                                                    ref bChangeCode)) return false;
 
                 // �HŽ–•›’S“–ŽÒ
-                //if (!BudgetDetailDataAssistantSet(LedgerDDB, frm, AssistantCode, AssistantName, BudgetRec)) return false;
+                if (!LedgerDetailDataSalarySet(LedgerDDB, ProcConstrCode, frm, TotalOrdersPrice, (int)FrmConstructionLedger.DataGroup.Assistant,
+                                                    AssistantCode, AssistantName, (double)CommonDefine.AssistantMonthryCost,
+                                                    ExpensesList, LedgerRec,
+                                                    ref bChangeCode)) return false;
 
-                //// �HŽ–Žw“±ˆõ
-                //if (!BudgetDetailDataInstructorSet(LedgerDDB, frm, InstructorCode, InstructorName, BudgetRec)) return false;
+                // �HŽ–Žw“±ˆõ
+                if (!LedgerDetailDataSalarySet(LedgerDDB, ProcConstrCode, frm, TotalOrdersPrice, (int)FrmConstructionLedger.DataGroup.Instructor,
+                                                    InstructorCode, InstructorName, (double)CommonDefine.InstructorMonthryCost,
+                                                    ExpensesList, LedgerRec,
+                                                    ref bChangeCode)) return false;
 
+                // �HŽ–�î•ñ‚ðŽæ“¾‚·‚é
+                ConstructionBaseInfo BaseRec = new ConstructionBaseInfo();
+                string strBase = cbiDB.CreatePrimarykeyString(ProcConstrCode);
+                if (!cbiDB.SelectAction(strBase, ref BaseRec)) return false;
+                // �HŠú‚Ìƒ`ƒFƒbƒN
+                DateTime StDate = BaseRec.ConstructionPeriodStart;
+                DateTime EdDate = BaseRec.ConstructionPeriodEnd;
+                // ‰„’·‚ª‚ ‚é�ê�‡‚Í‰„’·‚ð“ü‚ê‚é
+                if (BaseRec.ConstructionPeriodEnd2 != DateTime.MinValue) EdDate = BaseRec.ConstructionPeriodEnd2;
+                if (StDate != LedgerRec.ConstructionStart) bChangeCode = false;
+                if (EdDate != LedgerRec.ConstructionEnd) bChangeCode = false;
+
                 // ˆá‚¢‚ª–³‚¯‚ê‚Î�ˆ—�‚µ‚È‚¢
                 if (!bChangeCode) return true;
 
+                // �HŽ–ƒR�[ƒh‚ÌƒZƒbƒg
+                frm.ConstructionCode = ProcConstrCode;
+
+                // Œ©‚¦‚È‚¢‰æ–Ê‚ð�o‚·
+                frm.Hide();
+
+                // �ÄŒvŽZ�ˆ—�
+                bool bret = frm.RecalculateLedger;
+
+                // ‰æ–Ê‚ð•Â‚¶‚é
+                frm.Close();
+
                 return true;
             }
             catch (Exception ex)
@@ -1011,66 +1054,156 @@
         }
         #endregion
 
-        #region �HŽ–�Ú�×‘ä’ –¾�×�F’S“–ŽÒƒZƒbƒg
+        #region �HŽ–�Ú�×‘ä’ –¾�×�F’S“–ŽÒ�E•›’S“–ŽÒ�EŽw“±ˆõƒZƒbƒg
         /// <summary>
-        /// �HŽ–�Ú�×‘ä’ –¾�×�F’S“–ŽÒƒZƒbƒg
+        /// �HŽ–�Ú�×‘ä’ –¾�×�F’S“–ŽÒ�E•›’S“–ŽÒ�EŽw“±ˆõƒZƒbƒg
         /// </summary>
-        /// <param name="ApprovalNo"></param>
+        /// <param name="LedgerDDB"></param>
+        /// <param name="frm"></param>
+        /// <param name="TotalOrdersPrice"></param>
+        /// <param name="GroupCode"></param>
+        /// <param name="ConstructorCode"></param>
+        /// <param name="ConstructorName"></param>
+        /// <param name="MonthryCost"></param>
+        /// <param name="ExpensesList"></param>
+        /// <param name="LedgerRec"></param>
+        /// <param name="bChangeCode"></param>
         /// <returns></returns>
-        private bool LedgerDetailDataConstructorSet(IOConstructionLedgerDetail LedgerDDB, IOConstructionLedgerExcute LedgerEDB
-                                                    , int ConstructorCode, string ConstructorName, double MonthryCost, ArrayList ExpensesList
+        private bool LedgerDetailDataSalarySet(IOConstructionLedgerDetail LedgerDDB, int ProcConstrCode, FrmConstructionLedger frm
+                                                    , int TotalOrdersPrice, int GroupCode
+                                                    , int ConstructorCode, string ConstructorName, double MonthryCost
+                                                    , ArrayList ExpensesList, ConstructionLedger LedgerRec
                                                     , ref bool bChangeCode)
         {
             try
             {
-                string strSQL = LedgerDDB.CreatePrimarykeyString(m_ConstructionCode, (int)FrmConstructionLedger.DataGroup.Payroll);
+                string strSQL = LedgerDDB.CreatePrimarykeyString(ProcConstrCode, GroupCode);
+                strSQL += string.Format(" AND OperatingFlg = {0}", (int)CommonDefine.SalaryOperateKind.Oparateing);
                 ConstructionLedgerDetail DetailRec = new ConstructionLedgerDetail();
                 // �HŽ–�Ú�×‘ä’ –¾�×ƒf�[ƒ^‚ª–³‚¢�ê�‡‚Í�ì�¬‚ð‘O’ñ‚É�ˆ—�‘±�s
-                bool UpdateFlg = LedgerDDB.SelectAction(strSQL, ref DetailRec, false);
+                bool bExists = LedgerDDB.SelectAction(strSQL, ref DetailRec, false);
 
                 // ’S“–ŽÒ‚ª“¯‚¶‚È‚ç‚Î�ˆ—�‚µ‚È‚¢
                 if (DetailRec.CompanyCode == ConstructorCode) return true;
 
-                // Žó’�‹àŠzŽæ“¾
-                double dBase = (int)CommonMotions.cnvUndecidedStringToDouble(m_DspCtrl[(int)DspCnt.OrdersDecisionPrice].Text);
-
-                // �o‹Î•â�³’lŒW�”‚ðŠ|‚¯‚ÄŒŽŽû‚ð‹�‚ß‚é
-                MonthryCost = CommonMotions.cnvRound(CommonMotions.cnvRound(MonthryCost * (double)CommonDefine.s_SalaryExpenses));
-
                 // –³‚µ‚ÍƒNƒŠƒA‚µ‚Ä‹ó‚É‚È‚Á‚½ƒf�[ƒ^‚ðƒZƒbƒg
                 if (ConstructorCode == 0)
                 {
                     ClearConstructionLedgerDetailRec(ref DetailRec);
+                    if (bExists)
+                    {
+                        if (!LedgerDDB.UpdateAction(strSQL, DetailRec, false)) return false;
+                    }
+                    return true;
                 }
-                else
+
+                // Œ»’S“–ŽÒ‚ÍŽg—p�I—¹
+                if (bExists)
                 {
-                    DetailRec.CompanyType = (int)CommonDefine.SearchLogDataType.Person;
-                    DetailRec.ExecutionAmount = 0;
-                    DetailRec.AmountConfigRate = CommonMotions.cnvRound(DetailRec.ExecutionAmount / dBase * 100.0);
+                    if (!LedgerDDB.UpdateFeild(DetailRec.ConstructionCode,
+                                            (int)IOConstructionLedgerDetail.DataColumn.OperatingFlg,
+                                            (int)CommonDefine.SalaryOperateKind.Complate,
+                                            DetailRec.GroupCount,
+                                            DetailRec.LineCount,
+                                            false)) return false;
                 }
-                DetailRec.CompanyCode = ConstructorCode;
-                DetailRec.CompanyName = ConstructorName;
 
-                // ----- �HŽ–—\ŽZ�‘–¾�×ƒf�[ƒ^�X�V
-                if (UpdateFlg)
+                // ‹‹—^‹àŠzƒZƒbƒg
+                double ExecutionAmount = 0;
+                double AmountConfigRate = 0;
+                CalcPayValueData(MonthryCost, TotalOrdersPrice,
+                                LedgerRec.ConstructionStart, LedgerRec.ConstructionEnd,
+                                ref ExecutionAmount, ref AmountConfigRate);
+
+                // ----- �V’S“–ŽÒ‚Ì�HŽ–—\ŽZ�‘–¾�×ƒf�[ƒ^�ì�¬
+                DetailRec.ConstructionCode = ProcConstrCode;                                // �HŽ–”Ô�†
+                DetailRec.GroupCount = GroupCode;                                           // ƒOƒ‹�[ƒv”Ô�†
+                DetailRec.LineCount++;                                                      // �s”Ô�†
+                frm.GetTitileParametar = GroupCode;
+                DetailRec.FirstString = frm.GetTitleString;                                 // �€–Ú–¼�Ì
+                DetailRec.SecondString = string.Empty;                                      // �HŽ–“à—e
+                DetailRec.CompanyType = (int)CommonDefine.SearchLogDataType.Person;         // ‹¦—Í‰ïŽÐƒR�[ƒhƒ^ƒCƒv
+                DetailRec.CompanyCode = ConstructorCode;                                    // ‹¦—Í‰ïŽÐƒR�[ƒh
+                DetailRec.CompanyName = ConstructorName;                                    // ‹¦—Í‰ïŽÐ–¼�Ì
+                DetailRec.ExecutionAmount = ExecutionAmount;                                // ŽÀ�s‹àŠz
+                DetailRec.AmountConfigRate = AmountConfigRate;                              // ‹àŠz�\�¬—¦
+
+                DetailRec.SalaryFlg = (int)CommonDefine.SalaryDevision.All;                 // ‹‹—^�U•ª‹æ•ª
+                DetailRec.SalaryDays = 0;                                                   // ‹‹—^�U•ª“ú�”
+                DetailRec.OperatingFlg = (int)CommonDefine.SalaryOperateKind.Oparateing;    // ’S“–’†ƒtƒ‰ƒO
+
+                // ƒf�[ƒ^’Ç‰Á
+                if (!LedgerDDB.InsertAction(DetailRec, false)) return false;
+
+
+                // ’S“–ŽÒ‚Ì�ê�‡‚Ì‚Ý
+                if (GroupCode == (int)FrmConstructionLedger.DataGroup.Payroll)
                 {
-                    if (!LedgerDDB.UpdateAction(strSQL, DetailRec, false)) return false;
+                    // Œo”ïƒf�[ƒ^�X�V�i’S“–ŽÒ‚ª•Ï‚í‚Á‚½�ê�‡‚Í•”��•Ï‚í‚Á‚Ä‚¢‚È‚­‚Ä‚àŒvŽZ�j
+                    if (!LedgerSetExpenses(LedgerDDB, ProcConstrCode, TotalOrdersPrice, ExpensesList)) return false;
                 }
-                else
+
+                // ƒf�[ƒ^•Ï�X—L
+                bChangeCode = true;
+                
+                return true;
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("ƒVƒXƒeƒ€ƒGƒ‰�[�F{0}�F{1}", CommonMotions.GetMethodName(), ex.Message);
+                return false;
+            }
+        }
+        #endregion
+
+        #region �HŽ–�Ú�×‘ä’ –¾�×�FŒo”ï‚ÌƒZƒbƒg
+        /// <summary>
+        /// �HŽ–�Ú�×‘ä’ –¾�×�FŒo”ï‚ÌƒZƒbƒg
+        /// </summary>
+        /// <param name="LedgerDDB"></param>
+        /// <param name="OrdersPrice"></param>
+        /// <param name="ExpensesList"></param>
+        /// <returns></returns>
+        private bool LedgerSetExpenses(IOConstructionLedgerDetail LedgerDDB, int ProcConstrCode, double OrdersPrice, ArrayList ExpensesList)
+        {
+            try
+            {
+                // ‚Ü‚¸�í�œ
+                string strDelete = LedgerDDB.CreatePrimarykeyString(ProcConstrCode, (int)FrmConstructionLedger.DataGroup.Expenses);
+                LedgerDDB.DeleteAction(strDelete, false);
+
+                int icnt = 1;
+                foreach (object[] wrkExpense in ExpensesList)
                 {
-                    // ƒL�[•”ƒZƒbƒg
-                    DetailRec.ConstructionCode = m_ConstructionCode;
-                    DetailRec.GroupCount = (int)FrmConstructionBudget.DataGroup.PayrollExpenses;
-                    DetailRec.CompanyType = (int)CommonDefine.SearchLogDataType.Person;
-                    if (!LedgerDDB.InsertAction(DetailRec, false)) return false;
+                    // Œo”ï—¦Žæ“¾
+                    double dExpenses = CommonMotions.cnvDouble(wrkExpense[(int)ExpensesArray.ExpensesRate]);
+
+                    ConstructionLedgerDetail work = new ConstructionLedgerDetail();
+                    // �HŽ–”Ô�†
+                    work.ConstructionCode = ProcConstrCode;
+                    // ƒOƒ‹�[ƒv”Ô�†
+                    work.GroupCount = (int)FrmConstructionBudget.DataGroup.Expenses;
+                    // �s”Ô�†
+                    work.LineCount = icnt++;
+                    // Œo”ï–¼�ÌƒR�[ƒh
+                    work.ComponentCode = CommonMotions.cnvInt(wrkExpense[(int)ExpensesArray.NameCode]);
+                    // �€–Ú–¼�Ì
+                    string strVallue = CommonMotions.cnvString(wrkExpense[(int)ExpensesArray.ExpensesName]);
+                    work.FirstString = string.Format("{0}({1}%)", strVallue, dExpenses.ToString("0.00"));
+                    // —\ŽZ‹àŠz
+                    work.EstimatePrice = (int)(OrdersPrice * (dExpenses / 100.0));
+                    // ŽÀ�s‹àŠz                    
+                    work.ExecutionAmount = work.EstimatePrice;
+                    // ‹àŠz�\�¬—¦
+                    work.AmountConfigRate = dExpenses;
+
+                    // ƒf�[ƒ^“o˜^
+                    if (!LedgerDDB.InsertAction(work, false)) return false;
                 }
 
-                // Œo”ï‚Ì�X�V
-                //if (!BudgetSetExpenses(BudgetDDB, dBase, ExpensesList)) return false;
-
                 return true;
             }
-            catch (Exception ex)
+            catch (System.Exception ex)
             {
                 logger.ErrorFormat("ƒVƒXƒeƒ€ƒGƒ‰�[�F{0}�F{1}", CommonMotions.GetMethodName(), ex.Message);
                 return false;
@@ -1077,6 +1210,5 @@
             }
         }
         #endregion
-
     }
 }
\ No newline at end of file
Index: trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionBaseInfo/FrmConstructionBaseInfoAuxiliary.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionBaseInfo/FrmConstructionBaseInfoAuxiliary.cs	(revision 15)
+++ trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionBaseInfo/FrmConstructionBaseInfoAuxiliary.cs	(revision 16)
@@ -2463,6 +2463,7 @@
             IOConstructionBaseInfo cbiDB = new IOConstructionBaseInfo();                // �HŽ–Šî–{�î•ñ
             IOConstructionBaseInfoDetail cbidDB = new IOConstructionBaseInfoDetail();   // �HŽ–Šî–{�î•ñ–¾�×
             IOConstructionProgressDate cpdDB = new IOConstructionProgressDate();        // ˆÄŒ��i’»“ú•tƒf�[ƒ^
+            IOConstructionLink cbLinkDB = new IOConstructionLink();                     // �HŽ–‘�Œ¸�î•ñ
 
             IOProcessApproval ApprovalDB = new IOProcessApproval();                     // �³”Fƒf�[ƒ^
             IOMPersonInCharge PersonDB = new IOMPersonInCharge();                       // ’S“–ŽÒƒ}ƒXƒ^
@@ -2505,7 +2506,7 @@
                     m_DspCtrl[(int)DspCnt.ConstructionCode].Text = cbiDB.CreateNewCounstructionCode(PeriodValue).ToString();
                 }
 
-                bool LastDateUpDate = false;
+                bool TyingDataFlag = false;
                 DateTime LastConstrDate = DateTime.MinValue;
 
                 // ‘�Œ¸�HŽ–‚Ì�e‚à‚µ‚­‚ÍŽq‚Ì”»’è
@@ -2513,16 +2514,17 @@
                 string strTyCheck = cbiDB.CreatePrimarykeyString(ConstructionCode);
                 ConstructionBaseInfo BaseRec = new ConstructionBaseInfo();
                 cbiDB.SelectAction(strTyCheck, ref BaseRec);
-                if (BaseRec.TyingFlg != (int)CommonDefine.BaseInfoTyingFlg.Standard) LastDateUpDate = true;
+                if (BaseRec.TyingFlg != (int)CommonDefine.BaseInfoTyingFlg.Standard) TyingDataFlag = true;
                 //if ((pnlFluctuation.Visible == true && rdbExistsFluctuation.Checked == true) || (pnlFluctuation.Visible == false)) LastDateUpDate = true;
 
                 // ‘�Œ¸�HŽ–‚Ì�e‚à‚µ‚­‚ÍŽq‚Ì�ê�‡‚Íˆê”Ô�ÅŒã‚Ì�HŠú�I—¹‚ðŽæ“¾‚·‚é
-                if (LastDateUpDate) LastConstrDate = FluctuationDataPeriodEnd();
+                if (TyingDataFlag) LastConstrDate = FluctuationDataPeriodEnd();
 
                 // ˆêŠ‡�ˆ—�‚È‚Ì‚Å�Ú‘±‚ð�s‚¤
                 cbiDB.connect(); cbiDB.beginTran();
                 cbidDB.connect(); cbidDB.beginTran();
                 cpdDB.connect(); cpdDB.beginTran();
+                cbLinkDB.connect(); cbLinkDB.beginTran();
 
                 ApprovalDB.connect(); ApprovalDB.beginTran();
                 PersonDB.connect(); PersonDB.beginTran();
@@ -2551,8 +2553,9 @@
                     return false;
                 }
 
+                int TotalOrdersPrice = 0;
                 // ‘�Œ¸�HŽ–‚Ì�e‚à‚µ‚­‚ÍŽq‚Ì�ê�‡‚ÍŒ_–ñ�HŠú�I—¹�i‰„’·�j‚ð�X�V‚·‚é
-                if (LastDateUpDate)
+                if (TyingDataFlag)
                 {
                     if (!UpdateConstrEndDate(cbiDB, LastConstrDate))
                     {
@@ -2564,8 +2567,11 @@
                     }
                 }
 
+                // “¯ˆê�HŽ–“à‚ÌŽó’�‹àŠz‚ð�WŒv‚·‚é
+                TotalOrdersPrice = FluctuationDataOrdersPrice(cbiDB);
+
                 // �HŽ–—\ŽZ�‘ƒf�[ƒ^�X�V
-                if (!BudgetDataChange(ApprovalDB, BudgetDB, BudgetDDB, PersonDB))
+                if (!BudgetDataChange(ApprovalDB, BudgetDB, BudgetDDB, PersonDB, TotalOrdersPrice))
                 {
                     MessageBox.Show("�HŽ–—\ŽZ�‘ƒf�[ƒ^�X�VƒGƒ‰�[‚Å‚·�B", "�X�VƒGƒ‰�[", MessageBoxButtons.OK, MessageBoxIcon.Error);
                     cbiDB.rollback();
@@ -2580,7 +2586,7 @@
                 }
 
                 // �HŽ–�Ú�×‘ä’ ƒf�[ƒ^�X�V
-                if (!LedgerDataChange(LedgerDB, LedgerDDB, LedgerEDB, PersonDB))
+                if (!LedgerDataChange(cbiDB, LedgerDB, LedgerDDB, LedgerEDB, PersonDB, cbLinkDB, TotalOrdersPrice, TyingDataFlag))
                 {
                     MessageBox.Show("�HŽ–�Ú�×‘ä’ ƒf�[ƒ^�X�VƒGƒ‰�[‚Å‚·�B", "�X�VƒGƒ‰�[", MessageBoxButtons.OK, MessageBoxIcon.Error);
                     cbiDB.rollback();
@@ -2604,6 +2610,7 @@
                 cbiDB.commit();
                 cbidDB.commit();
                 cpdDB.commit();
+                cbLinkDB.commit();
 
                 ApprovalDB.commit();
                 PersonDB.commit();
@@ -2630,6 +2637,7 @@
                 cbiDB.close(); cbiDB = null;
                 cbidDB.close(); cbidDB = null;
                 cpdDB.close(); cpdDB = null;
+                cbLinkDB.close(); cbLinkDB = null;
 
                 ApprovalDB.close(); ApprovalDB = null;
                 PersonDB.close(); PersonDB = null;
Index: trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionBudget/FrmConstructionBudget.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionBudget/FrmConstructionBudget.cs	(revision 15)
+++ trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionBudget/FrmConstructionBudget.cs	(revision 16)
@@ -256,7 +256,7 @@
         /// <summary>
         /// ƒOƒŠƒbƒh�€–Ú�sƒ^ƒCƒgƒ‹
         /// </summary>
-        private static string[] GroupTitle = new string[] { ""
+        private static string[] s_GroupTitle = new string[] { ""
                                                             , "Œo�@�@”ï�@�@"
                                                             , "‹¤ ’Ê ‰¼ �Ý ”ï"
                                                             , "ŠO�@�@’��@�@”ï"
@@ -514,8 +514,15 @@
         private int m_CreatorMonthryCost = 0;
         #endregion
 
+        #region ƒ^ƒCƒgƒ‹Žæ“¾Žžƒpƒ‰ƒ�ƒ^•Ï�”
+        /// <summary>
+        /// ƒ^ƒCƒgƒ‹Žæ“¾Žžƒpƒ‰ƒ�ƒ^•Ï�”
+        /// </summary>
+        private int m_GetTitileParametar = 0;
         #endregion
 
+        #endregion
+
         #region ƒvƒ�ƒpƒeƒB
         /// <summary>
         /// �HŽ–”Ô�†
@@ -555,26 +562,19 @@
         // *-----* ‹¤’Ê�ˆ—��Ý’è *-----*
 
         /// <summary>
-        /// ’S“–ŽÒƒ^ƒCƒgƒ‹Žæ“¾
+        /// ƒ^ƒCƒgƒ‹Žæ“¾Žžƒpƒ‰ƒ�ƒ^•Ï�”
         /// </summary>
-        public string GetTitleConstructor
+        public int GetTitileParametar
         {
-            get { return GroupTitle[(int)FrmConstructionBudget.DataGroup.PayrollExpenses]; }
+            set { m_GetTitileParametar = value; }
         }
         /// <summary>
-        /// •›’S“–ƒ^ƒCƒgƒ‹Žæ“¾
+        /// ƒOƒŠƒbƒh�€–Úƒ^ƒCƒgƒ‹Žæ“¾
         /// </summary>
-        public string GetTitleAssistant
+        public string GetTitleString
         {
-            get { return GroupTitle[(int)FrmConstructionBudget.DataGroup.AssistantCosts]; }
+            get { return s_GroupTitle[m_GetTitileParametar]; }
         }
-        /// <summary>
-        /// Žw“±ˆõƒ^ƒCƒgƒ‹Žæ“¾
-        /// </summary>
-        public string GetTitleInstructor
-        {
-            get { return GroupTitle[(int)FrmConstructionBudget.DataGroup.InstructorCosts]; }
-        }
         #endregion
 
         #region ƒRƒ“ƒXƒgƒ‰ƒNƒ^
@@ -1633,9 +1633,17 @@
         }
         #endregion
 
+        #region ƒfƒoƒbƒNƒRƒ“ƒo�[ƒg�ˆ—�
         private void button1_Click(object sender, EventArgs e)
         {
             CalcPayroll();
         }
+
+        private void button2_Click(object sender, EventArgs e)
+        {
+            CalcExpenese();
+        }
+        #endregion
+
     }
 }
\ No newline at end of file
Index: trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionBudget/FrmConstructionBudget.designer.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionBudget/FrmConstructionBudget.designer.cs	(revision 15)
+++ trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionBudget/FrmConstructionBudget.designer.cs	(revision 16)
@@ -125,6 +125,7 @@
             this.btnDispUp = new System.Windows.Forms.Button();
             this.btnOtherProc = new System.Windows.Forms.Button();
             this.button1 = new System.Windows.Forms.Button();
+            this.button2 = new System.Windows.Forms.Button();
             this.panel1.SuspendLayout();
             this.pnlGroup3.SuspendLayout();
             this.pnlGroup2.SuspendLayout();
@@ -1214,7 +1215,7 @@
             // button1
             // 
             this.button1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
-            this.button1.Location = new System.Drawing.Point(1303, 591);
+            this.button1.Location = new System.Drawing.Point(1300, 555);
             this.button1.Name = "button1";
             this.button1.Size = new System.Drawing.Size(37, 35);
             this.button1.TabIndex = 101;
@@ -1223,6 +1224,18 @@
             this.button1.Visible = false;
             this.button1.Click += new System.EventHandler(this.button1_Click);
             // 
+            // button2
+            // 
+            this.button2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
+            this.button2.Location = new System.Drawing.Point(1300, 591);
+            this.button2.Name = "button2";
+            this.button2.Size = new System.Drawing.Size(37, 35);
+            this.button2.TabIndex = 101;
+            this.button2.Text = "ï¼‘";
+            this.button2.UseVisualStyleBackColor = true;
+            this.button2.Visible = false;
+            this.button2.Click += new System.EventHandler(this.button2_Click);
+            // 
             // FrmConstructionBudget
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
@@ -1229,6 +1242,7 @@
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
             this.BackColor = System.Drawing.Color.Black;
             this.ClientSize = new System.Drawing.Size(1344, 692);
+            this.Controls.Add(this.button2);
             this.Controls.Add(this.button1);
             this.Controls.Add(this.btnOtherProc);
             this.Controls.Add(this.btnDispDown);
@@ -1359,5 +1373,6 @@
         private System.Windows.Forms.Label lblLabel06;
         private System.Windows.Forms.Label label23;
         private System.Windows.Forms.Button button1;
+        private System.Windows.Forms.Button button2;
     }
 }
\ No newline at end of file
Index: trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionBudget/FrmConstructionBudgetAuxiliary.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionBudget/FrmConstructionBudgetAuxiliary.cs	(revision 15)
+++ trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionBudget/FrmConstructionBudgetAuxiliary.cs	(revision 16)
@@ -13,6 +13,7 @@
 using ProcessManagement.DataModel;
 using ProcessManagement.Common;
 using ProcessManagement.DB.IOAccess;
+using System.Diagnostics;
 
 namespace ProcessManagement.Forms.DataEntry
 {
@@ -172,6 +173,10 @@
             /// çµŒè²»çŽ‡
             /// </summary>
             ExpensesRate,
+            /// <summary>
+            /// çµŒè²»å��ç§°ã‚³ãƒ¼ãƒ‰
+            /// </summary>
+            NameCode,
         }
         #endregion
 
@@ -192,7 +197,7 @@
                 if(!picDB.SelectAction(strPerson,ref picRec)) return false;
 
                 // éƒ¨ç½²çµŒè²»çŽ‡ãƒžã‚¹ã‚¿å�–å¾—
-                string strSQL = "SELECT A.NAMESTRING, NVL(B.EXPENSESRATIO, 0)";
+                string strSQL = "SELECT A.NAMESTRING, NVL(B.EXPENSESRATIO, 0), B.NAMECODE";
                 strSQL += " FROM DIVISIONMASTER A";
                 strSQL += " LEFT OUTER JOIN";
                 strSQL += " (SELECT NAMECODE, DEPARTMENTCODE, EXPENSESRATIO, EXPENSESPERIOD";
@@ -328,7 +333,7 @@
                 picDB.SelectAction(strSQL, ref personRec);
 
                 // æ‹…å½“è€…çµ¦ä¸Žå�˜ä¾¡ã‚»ãƒƒãƒˆ
-                m_CreatorMonthryCost = (int)(personRec.MonthlySalary * CommonDefine.s_SalaryExpenses);
+                m_CreatorMonthryCost = (int)(personRec.MonthlySalary * CommonDefine.s_SalaryCorrection);
                 if (m_ApprovalFlg) m_CreatorMonthryCost = (int)cbRec.CreatorCosts;
 
                 // ----- å‰¯å·¥äº‹æ‹…å½“è€…æƒ…å ±
@@ -916,7 +921,7 @@
                 double OrdersPrice = CommonMotions.cnvDouble(m_DspLabelCtrl[(int)DspLblCtrlName.OrdersPrice].Text.Replace("\\", ""));
 
                 // ã‚°ãƒ«ãƒ¼ãƒ—å��è¡¨ç¤º
-                CreateTitleRow((int)FrmConstructionBudget.DataGroup.Expenses, GroupTitle[(int)FrmConstructionBudget.DataGroup.Expenses]);
+                CreateTitleRow((int)FrmConstructionBudget.DataGroup.Expenses, s_GroupTitle[(int)FrmConstructionBudget.DataGroup.Expenses]);
 
                 int icnt = 1;
                 foreach (object[] wrkExpense in m_ExpensesList)
@@ -934,6 +939,7 @@
                     string strVallue = CommonMotions.cnvString(wrkExpense[(int)ExpensesArray.ExpensesName]);
                     RowData[(int)GridColumn.No] = string.Format("{0}-{1}", (int)FrmConstructionBudget.DataGroup.Expenses, icnt);
                     RowData[(int)GridColumn.FixFlg] = "*";
+                    RowData[(int)GridColumn.ComponentCode] = CommonMotions.cnvInt(wrkExpense[(int)ExpensesArray.NameCode]);
                     RowData[(int)GridColumn.ItemName] = string.Format("{0}({1}%)", strVallue, dExpenses.ToString("0.00"));
                     RowData[(int)GridColumn.HopePrice] = ExpenssValue.ToString("#,#");
                     RowData[(int)GridColumn.ExecPrice] = ExpenssValue.ToString("#,#");
@@ -967,7 +973,7 @@
             double dBase = CommonMotions.cnvDouble(m_DspLabelCtrl[(int)DspLblCtrlName.OrdersPrice].Text.Replace("\\", ""));
             if (dBase == 0) return dwork;
 
-            dwork = dInput / dBase * 100.0;
+            dwork = (dInput / dBase) * 100.0;
 
             return dwork;
         }
@@ -1199,7 +1205,7 @@
                 // ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆ
                 RowData[(int)GridColumn.FixFlg] = "*";
                 RowData[(int)GridColumn.GroupCount] = (int)FrmConstructionBudget.DataGroup.AllTotal;
-                RowData[(int)GridColumn.ItemName] = GroupTitle[(int)FrmConstructionBudget.DataGroup.AllTotal];
+                RowData[(int)GridColumn.ItemName] = s_GroupTitle[(int)FrmConstructionBudget.DataGroup.AllTotal];
                 RowData[(int)GridColumn.EstimatePrice] = EstimatePriceValue.ToString("#,0");
                 RowData[(int)GridColumn.NegotiationPrice] = NegotiationPriceValue.ToString("#,0");
                 RowData[(int)GridColumn.HopePrice] = HopePriceValue.ToString("#,0");
@@ -1397,7 +1403,7 @@
             if (bReturnFlg) return;
 
             // ã‚°ãƒ«ãƒ¼ãƒ—å��è¡¨ç¤º
-            CreateTitleRow(DetailRec.GroupCount, GroupTitle[DetailRec.GroupCount]);
+            CreateTitleRow(DetailRec.GroupCount, s_GroupTitle[DetailRec.GroupCount]);
 
             // ã‚«ã‚¦ãƒ³ã‚¿ç­‰ã‚¯ãƒªã‚¢
             GroupNo = DetailRec.GroupCount;
@@ -1430,7 +1436,7 @@
                 int GroupNo = (int)FrmConstructionBudget.DataGroup.Expenses;
                 int icnt = 1;
                 // ã‚°ãƒ«ãƒ¼ãƒ—å��è¡¨ç¤º
-                CreateTitleRow(GroupNo, GroupTitle[GroupNo]);
+                CreateTitleRow(GroupNo, s_GroupTitle[GroupNo]);
                 foreach (ConstructionBudgetDetail DetailRec in DetailList)
                 {
                     // ã‚°ãƒ«ãƒ¼ãƒ—ç•ªå�·ã�Œé�•ã�ˆã�°ã‚¿ã‚¤ãƒˆãƒ«è¡Œè¡¨ç¤º
@@ -1615,7 +1621,7 @@
             try
             {
                 // ã‚°ãƒ«ãƒ¼ãƒ—å��è¡¨ç¤º
-                CreateTitleRow((int)FrmConstructionBudget.DataGroup.CommonTempCosts, GroupTitle[(int)FrmConstructionBudget.DataGroup.CommonTempCosts]);
+                CreateTitleRow((int)FrmConstructionBudget.DataGroup.CommonTempCosts, s_GroupTitle[(int)FrmConstructionBudget.DataGroup.CommonTempCosts]);
 
                 // ãƒ‡ãƒ¼ã‚¿èª­è¾¼
                 List<EstimateBudgetDetail> DetailList = new List<EstimateBudgetDetail>();
@@ -1674,7 +1680,7 @@
             try
             {
                 // ã‚°ãƒ«ãƒ¼ãƒ—å��è¡¨ç¤º
-                CreateTitleRow((int)FrmConstructionBudget.DataGroup.CommonTempCosts, GroupTitle[(int)FrmConstructionBudget.DataGroup.CommonTempCosts]);
+                CreateTitleRow((int)FrmConstructionBudget.DataGroup.CommonTempCosts, s_GroupTitle[(int)FrmConstructionBudget.DataGroup.CommonTempCosts]);
 
                 // ãƒ‡ãƒ¼ã‚¿èª­è¾¼
                 string strSQL = string.Format(" WHERE CONSTRUCTIONCODE = {0}", m_ConstructionCode);
@@ -1737,7 +1743,7 @@
             try
             {
                 // ã‚°ãƒ«ãƒ¼ãƒ—å��è¡¨ç¤º
-                CreateTitleRow((int)FrmConstructionBudget.DataGroup.OutSourceCosts, GroupTitle[(int)FrmConstructionBudget.DataGroup.OutSourceCosts]);
+                CreateTitleRow((int)FrmConstructionBudget.DataGroup.OutSourceCosts, s_GroupTitle[(int)FrmConstructionBudget.DataGroup.OutSourceCosts]);
 
                 // å¤–æ³¨è²»ã�®è¡Œã‚«ã‚¦ãƒ³ãƒˆã‚’å�–å¾—ã�™ã‚‹
                 m_CostsRowCount[(int)CostsRowLine.OutSourceCostsLine] = dgvAllDisplay.RowCount - 1;
@@ -1800,7 +1806,7 @@
             try
             {
                 // ã‚°ãƒ«ãƒ¼ãƒ—å��è¡¨ç¤º
-                CreateTitleRow((int)FrmConstructionBudget.DataGroup.OutSourceCosts, GroupTitle[(int)FrmConstructionBudget.DataGroup.OutSourceCosts]);
+                CreateTitleRow((int)FrmConstructionBudget.DataGroup.OutSourceCosts, s_GroupTitle[(int)FrmConstructionBudget.DataGroup.OutSourceCosts]);
 
                 // å¤–æ³¨è²»ã�®è¡Œã‚«ã‚¦ãƒ³ãƒˆã‚’å�–å¾—ã�™ã‚‹
                 m_CostsRowCount[(int)CostsRowLine.OutSourceCostsLine] = dgvAllDisplay.RowCount - 1;
@@ -1965,7 +1971,7 @@
             try
             {
                 // ã‚°ãƒ«ãƒ¼ãƒ—å��è¡¨ç¤º
-                CreateTitleRow((int)FrmConstructionBudget.DataGroup.MyConstruction, GroupTitle[(int)FrmConstructionBudget.DataGroup.MyConstruction]);
+                CreateTitleRow((int)FrmConstructionBudget.DataGroup.MyConstruction, s_GroupTitle[(int)FrmConstructionBudget.DataGroup.MyConstruction]);
 
                 // è‡ªç¤¾æ–½å·¥ã�®è¡Œã‚«ã‚¦ãƒ³ãƒˆã‚’å�–å¾—ã�™ã‚‹
                 m_CostsRowCount[(int)CostsRowLine.MyConstructionLine] = dgvAllDisplay.RowCount - 1;
@@ -2026,7 +2032,7 @@
             try
             {
                 // ã‚°ãƒ«ãƒ¼ãƒ—å��è¡¨ç¤º
-                CreateTitleRow((int)FrmConstructionBudget.DataGroup.MyConstruction, GroupTitle[(int)FrmConstructionBudget.DataGroup.MyConstruction]);
+                CreateTitleRow((int)FrmConstructionBudget.DataGroup.MyConstruction, s_GroupTitle[(int)FrmConstructionBudget.DataGroup.MyConstruction]);
 
                 // è‡ªç¤¾æ–½å·¥ã�®è¡Œã‚«ã‚¦ãƒ³ãƒˆã‚’å�–å¾—ã�™ã‚‹
                 m_CostsRowCount[(int)CostsRowLine.MyConstructionLine] = dgvAllDisplay.RowCount - 1;
@@ -2126,7 +2132,7 @@
                 RowData[(int)GridColumn.GroupCount] = (int)FrmConstructionBudget.DataGroup.DisposeCosts;
 
                 RowData[(int)GridColumn.ComponentCode] = CompomentCode;
-                RowData[(int)GridColumn.ItemName] = GroupTitle[(int)FrmConstructionBudget.DataGroup.DisposeCosts];
+                RowData[(int)GridColumn.ItemName] = s_GroupTitle[(int)FrmConstructionBudget.DataGroup.DisposeCosts];
                 RowData[(int)GridColumn.EstimatePrice] = EstimatePrice.ToString("#,0");
                 RowData[(int)GridColumn.NegotiationPrice] = NegoPrice.ToString("#,0");
                 RowData[(int)GridColumn.HopePrice] = NegoPrice.ToString("#,0");
@@ -2193,7 +2199,7 @@
                 RowData[(int)GridColumn.ComponentCode] = CompomentCode;
                 RowData[(int)GridColumn.ItemCode] = string.Empty;
 
-                RowData[(int)GridColumn.ItemName] = GroupTitle[(int)FrmConstructionBudget.DataGroup.DisposeCosts];
+                RowData[(int)GridColumn.ItemName] = s_GroupTitle[(int)FrmConstructionBudget.DataGroup.DisposeCosts];
                 RowData[(int)GridColumn.EstimatePrice] = EstimatePrice.ToString("#,0");
                 RowData[(int)GridColumn.NegotiationPrice] = EstimatePrice.ToString("#,0");
                 RowData[(int)GridColumn.HopePrice] = EstimatePrice.ToString("#,0");
@@ -2259,7 +2265,7 @@
             IOEstimateBudgetDetail DetailDB = new IOEstimateBudgetDetail();
             try
             {
-                CreateTitleRow((int)FrmConstructionBudget.DataGroup.PurchaseCosts, GroupTitle[(int)FrmConstructionBudget.DataGroup.PurchaseCosts]);
+                CreateTitleRow((int)FrmConstructionBudget.DataGroup.PurchaseCosts, s_GroupTitle[(int)FrmConstructionBudget.DataGroup.PurchaseCosts]);
 
                 string strSQL = DetailDB.CreatePrimarykeyString(m_ConstructionCode);
                 strSQL += string.Format(" AND GROUPCOUNT = {0}", (int)GroupName_EstimateBudget.PurchasePrice);
@@ -2303,7 +2309,7 @@
         {
             try
             {
-                CreateTitleRow((int)FrmConstructionBudget.DataGroup.PurchaseCosts, GroupTitle[(int)FrmConstructionBudget.DataGroup.PurchaseCosts]);
+                CreateTitleRow((int)FrmConstructionBudget.DataGroup.PurchaseCosts, s_GroupTitle[(int)FrmConstructionBudget.DataGroup.PurchaseCosts]);
 
                 object[] RowData = new object[Enum.GetNames(typeof(GridColumn)).Length];
                 // ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆ
@@ -2341,7 +2347,7 @@
                 RowData[(int)GridColumn.FixFlg] = "*";
                 RowData[(int)GridColumn.No] = i;
                 RowData[(int)GridColumn.GroupCount] = i;
-                RowData[(int)GridColumn.ItemName] = GroupTitle[i];
+                RowData[(int)GridColumn.ItemName] = s_GroupTitle[i];
                 RowData[(int)GridColumn.EstimatePrice] = "";
                 RowData[(int)GridColumn.NegotiationPrice] = "";
                 RowData[(int)GridColumn.HopePrice] = "0";
@@ -2366,7 +2372,7 @@
                 // å·¥æœŸå�–å¾—
                 double BetweenTimes = 0;
                 // ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆé …ç›®
-                string ItemString = GroupTitle[(int)FrmConstructionBudget.DataGroup.AssistantCosts];
+                string ItemString = s_GroupTitle[(int)FrmConstructionBudget.DataGroup.AssistantCosts];
                 // çµ¦ä¸Žè¨ˆç®—
                 double CostsValue = 0;
                 // å·¥äº‹å†…å®¹
@@ -2493,7 +2499,7 @@
                 // å·¥æœŸå�–å¾—
                 double BetweenTimes = 0;
                 // ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆé …ç›®
-                string ItemString = GroupTitle[(int)FrmConstructionBudget.DataGroup.InstructorCosts];
+                string ItemString = s_GroupTitle[(int)FrmConstructionBudget.DataGroup.InstructorCosts];
                 // çµ¦ä¸Žè¨ˆç®—
                 double CostsValue = 0;
                 // å·¥äº‹å†…å®¹
@@ -2642,7 +2648,7 @@
                     // ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆ
                     RowData[(int)GridColumn.FixFlg] = "*";
                     RowData[(int)GridColumn.GroupCount] = (int)FrmConstructionBudget.DataGroup.GrossProfit;
-                    RowData[(int)GridColumn.ItemName] = GroupTitle[(int)FrmConstructionBudget.DataGroup.GrossProfit];
+                    RowData[(int)GridColumn.ItemName] = s_GroupTitle[(int)FrmConstructionBudget.DataGroup.GrossProfit];
                     RowData[(int)GridColumn.EstimatePrice] = "";
                     RowData[(int)GridColumn.NegotiationPrice] = "";
                     RowData[(int)GridColumn.HopePrice] = HopeValue.ToString("#,0");
@@ -2801,7 +2807,7 @@
                     // ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆ
                     RowData[(int)GridColumn.FixFlg] = "*";
                     RowData[(int)GridColumn.GroupCount] = (int)FrmConstructionBudget.DataGroup.PayrollExpenses;
-                    RowData[(int)GridColumn.ItemName] = GroupTitle[(int)FrmConstructionBudget.DataGroup.PayrollExpenses];
+                    RowData[(int)GridColumn.ItemName] = s_GroupTitle[(int)FrmConstructionBudget.DataGroup.PayrollExpenses];
                     RowData[(int)GridColumn.TextName] = Content;
                     RowData[(int)GridColumn.CompanyType] = CodeType;
                     RowData[(int)GridColumn.CompanyCode] = PersonCode;
@@ -2918,7 +2924,7 @@
                     // ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆ
                     RowData[(int)GridColumn.FixFlg] = "*";
                     RowData[(int)GridColumn.GroupCount] = (int)FrmConstructionBudget.DataGroup.NetIncome;
-                    RowData[(int)GridColumn.ItemName] = GroupTitle[(int)FrmConstructionBudget.DataGroup.NetIncome];
+                    RowData[(int)GridColumn.ItemName] = s_GroupTitle[(int)FrmConstructionBudget.DataGroup.NetIncome];
                     RowData[(int)GridColumn.EstimatePrice] = "";
                     RowData[(int)GridColumn.NegotiationPrice] = "";
                     RowData[(int)GridColumn.HopePrice] = HopeValue.ToString("#,0");
@@ -4358,6 +4364,180 @@
         }
         #endregion
 
+        #region çµŒè²»å†�è¨ˆç®—ç”¨ãƒ‡ãƒ¼ã‚¿èª­è¾¼é †åº�
+        /// <summary>
+        /// çµŒè²»å†�è¨ˆç®—ç”¨ãƒ‡ãƒ¼ã‚¿èª­è¾¼é †åº�
+        /// </summary>
+        private enum Read1Enum
+        {
+            CONSTRUCTIONCODE = 0,
+            DETAILSTRING,
+            DEPARTMENTSTRING,
+            LINECOUNT,
+            FIRSTSTRING,
+            EXECUTIONAMOUNT,
+            AMOUNTCONFIGRATE,
+            CONSTRUCTIONPERIOD,
+            DEPARTMENTCODE,
+            NAMECODE,
+            EXPENSESRATIO,
+            EXPENESE,
+            EXPENESENAME,
+        }
+        #endregion
+
+        #region çµŒè²»å†�è¨ˆç®—
+        /// <summary>
+        /// çµŒè²»å†�è¨ˆç®—
+        /// </summary>
+        private void CalcExpenese()
+        {
+            IOConstructionLedger LedgerDB = new IOConstructionLedger();
+            IOConstructionLedgerDetail LedgerDDB = new IOConstructionLedgerDetail();
+            IOConstructionLedgerExcute LedgerEDB = new IOConstructionLedgerExcute();
+            FrmConstructionLedger frm = new FrmConstructionLedger();
+
+            try
+            {
+                LedgerDB.connect(); LedgerDB.beginTran();
+                LedgerDDB.connect();LedgerDDB.beginTran();
+                LedgerEDB.connect(); LedgerEDB.beginTran();
+                
+                // çµŒè²»çŽ‡ã�®ã‚»ãƒƒãƒˆ
+                string strSQL1 = "SELECT A.CONSTRUCTIONCODE, E.DETAILSTRING, F.DEPARTMENTSTRING, A.LINECOUNT, A.FIRSTSTRING";
+                strSQL1 += ", A.EXECUTIONAMOUNT, A.AMOUNTCONFIGRATE, B.CONSTRUCTIONPERIOD, C.DEPARTMENTCODE, D.NAMECODE";
+                strSQL1 += ", D.EXPENSESRATIO, ROUND(B.ORDERSDECISIONPRICE * (A.AMOUNTCONFIGRATE / 100.0)), G.NAMESTRING";
+                strSQL1 += " FROM CONSTRUCTIONLEDGERDETAIL A, CONSTRUCTIONBASEINFO B, PERSONINCHARGEMASTER C, DEPARTMENTEXPENSESMASTER D, CONSTRUCTIONBASEINFODETAIL E, DEPARTMENTMASTER F, DIVISIONMASTER G";
+                strSQL1 += " WHERE A.CONSTRUCTIONCODE <> 2015043401";
+                strSQL1 += " AND A.GROUPCOUNT = 1";
+                strSQL1 += " AND A.CONSTRUCTIONCODE = B.CONSTRUCTIONCODE";
+                strSQL1 += " AND B.CONSTRUCTIONPERIOD = 16";
+                strSQL1 += " AND B.CONSTRUCTIONPERSONCODE = C.PERSONCODE";
+                strSQL1 += " AND (C.DEPARTMENTCODE = D.DEPARTMENTCODE AND B.CONSTRUCTIONPERIOD = D.EXPENSESPERIOD AND D.DISPLAYORDER = (A.LINECOUNT - 1))";
+                strSQL1 += " AND E.CONSTRUCTIONCODE = A.CONSTRUCTIONCODE AND E.DETAILNO = 2";
+                strSQL1 += " AND F.DEPARTMENTCODE = C.DEPARTMENTCODE";
+                strSQL1 += " AND G.DIVISIONCODE = 3";
+                strSQL1 += " AND G.NAMECODE = D.NAMECODE";
+                strSQL1 += " ORDER BY A.CONSTRUCTIONCODE, A.LINECOUNT";
+                ArrayList arList = new ArrayList();
+                if (!LedgerDB.ExecuteReader(strSQL1, ref arList, false)) return;
+                foreach (object[] CurRec in arList)
+                {
+                    int CurConstrCode = CommonMotions.cnvInt(CurRec[(int)Read1Enum.CONSTRUCTIONCODE]);
+                    int CurLineCnt = CommonMotions.cnvInt(CurRec[(int)Read1Enum.LINECOUNT]);
+                    int CurCompnentCode = CommonMotions.cnvInt(CurRec[(int)Read1Enum.NAMECODE]);
+                    double CurParcent = CommonMotions.cnvDouble(CurRec[(int)Read1Enum.EXPENSESRATIO]);
+                    int CurValue = CommonMotions.cnvInt(CurRec[(int)Read1Enum.EXPENESE]);
+                    string strValue = CommonMotions.cnvString(CurRec[(int)Read1Enum.EXPENESENAME]) + string.Format("({0}%)", CurParcent.ToString("0.00"));
+                    // é …ç›®å��
+                    if (!LedgerDDB.UpdateFeild(CurConstrCode, (int)IOConstructionLedgerDetail.DataColumn.FirstString, strValue, 1, CurLineCnt, false))
+                    {
+                        LedgerDDB.rollback();
+                        return;
+                    }
+                    // å®Ÿè¡Œé‡‘é¡�
+                    if (!LedgerDDB.UpdateFeild(CurConstrCode, (int)IOConstructionLedgerDetail.DataColumn.ExecutionAmount, CurValue, 1, CurLineCnt, false))
+                    {
+                        LedgerDDB.rollback();
+                        return;
+                    }
+                    // çµŒè²»çŽ‡ã‚»ãƒƒãƒˆ
+                    if (!LedgerDDB.UpdateFeild(CurConstrCode, (int)IOConstructionLedgerDetail.DataColumn.AmountConfigRate, CurParcent, 1, CurLineCnt, false))
+                    {
+                        LedgerDDB.rollback();
+                        return;
+                    }
+                    // çµŒè²»ã‚³ãƒ¼ãƒ‰
+                    if (!LedgerDDB.UpdateFeild(CurConstrCode, (int)IOConstructionLedgerDetail.DataColumn.ComponentCode, CurCompnentCode, 1, CurLineCnt, false))
+                    {
+                        LedgerDDB.rollback();
+                        return;
+                    }
+                }
+
+                string strSQL2 = "SELECT A.CONSTRUCTIONCODE, A.TYINGFLG, B.CONSTRUCTIONCODE, B.LINECOUNT, B.DataCnt,";
+                strSQL2 += " C.CONSTRUCTIONCODE, C.GROUPCOUNT, C.LINECOUNT, C.COLUMNCOUNT,";
+                strSQL2 += " ROUND(A.ORDERSDECISIONPRICE * (D.AMOUNTCONFIGRATE / 100.0))";
+                strSQL2 += " FROM CONSTRUCTIONBASEINFO A,";
+                strSQL2 += " (SELECT CONSTRUCTIONCODE, LINECOUNT, COUNT(*) DataCnt FROM CONSTRUCTIONLEDGEREXCUTE WHERE GROUPCOUNT = 1 GROUP BY CONSTRUCTIONCODE, LINECOUNT) B,";
+                strSQL2 += " CONSTRUCTIONLEDGEREXCUTE C,";
+                strSQL2 += " CONSTRUCTIONLEDGERDETAIL D";
+                strSQL2 += " WHERE A.CONSTRUCTIONCODE = B.CONSTRUCTIONCODE";
+                strSQL2 += " AND A.CONSTRUCTIONCODE <> 2015043401";
+                strSQL2 += " AND B.DataCnt = 1";
+                strSQL2 += " AND C.CONSTRUCTIONCODE = A.CONSTRUCTIONCODE";
+                strSQL2 += " AND C.GROUPCOUNT = 1";
+                strSQL2 += " AND C.LINECOUNT = B.LINECOUNT";
+                strSQL2 += " AND D.CONSTRUCTIONCODE = C.CONSTRUCTIONCODE";
+                strSQL2 += " AND D.GROUPCOUNT = C.GROUPCOUNT";
+                strSQL2 += " AND D.LINECOUNT = C.LINECOUNT";
+                strSQL2 += " ORDER BY C.CONSTRUCTIONCODE, C.GROUPCOUNT, C.LINECOUNT, C.COLUMNCOUNT";
+                ArrayList arList2 = new ArrayList();
+                if (!LedgerEDB.ExecuteReader(strSQL2, ref arList2, false))
+                {
+                    LedgerDDB.rollback();
+                    return;
+                }
+                foreach (object[] CurRec in arList2)
+                {
+                    int CONSTRUCTIONCODE = CommonMotions.cnvInt(CurRec[0]);
+                    int TYINGFLG = CommonMotions.cnvInt(CurRec[1]);
+                    int CONSTRUCTIONCODE2 = CommonMotions.cnvInt(CurRec[2]);
+                    int LINECOUNT = CommonMotions.cnvInt(CurRec[3]);
+                    int DataCnt = CommonMotions.cnvInt(CurRec[4]);
+                    int CONSTRUCTIONCODE3 = CommonMotions.cnvInt(CurRec[5]);
+                    int GROUPCOUNT = CommonMotions.cnvInt(CurRec[6]);
+                    int LINECOUNT2 = CommonMotions.cnvInt(CurRec[7]);
+                    int COLUMNCOUNT = CommonMotions.cnvInt(CurRec[8]);
+                    int iValue =CommonMotions.cnvInt(CurRec[9]);
+
+                    if (!LedgerEDB.UpdateFeild(CONSTRUCTIONCODE3, GROUPCOUNT, LINECOUNT2, COLUMNCOUNT, (int)IOConstructionLedgerExcute.TableColumn.PaymentAmount, iValue, false))
+                    {
+                        LedgerDDB.rollback();
+                        return;
+                    }
+                }
+
+                LedgerDB.commit();
+                LedgerDDB.commit();
+                LedgerEDB.commit();
+
+                string strSQL3 = "SELECT A.CONSTRUCTIONCODE FROM CONSTRUCTIONLEDGER A, CONSTRUCTIONBASEINFO B";
+                strSQL3 += " WHERE A.CONSTRUCTIONCODE = B.CONSTRUCTIONCODE";
+                strSQL3 += " AND B.CONSTRUCTIONPERIOD = 16";
+                strSQL3 += " ORDER BY A.CONSTRUCTIONCODE";
+                ArrayList arList3 = new ArrayList();
+                if (!LedgerDB.ExecuteReader(strSQL3, ref arList3)) return;
+                foreach (object[] CurRec in arList3)
+                {
+                    // å·¥äº‹ã‚³ãƒ¼ãƒ‰ã�®ã‚»ãƒƒãƒˆ
+                    frm.ConstructionCode = CommonMotions.cnvInt(CurRec[0]);
+
+                    // è¦‹ã�ˆã�ªã�„ç”»é�¢ã‚’å‡ºã�™
+                    frm.Hide();
+                    // ãƒ•ã‚©ãƒ¼ãƒ é�žè¡¨ç¤º
+                    //frm.Visible = false;
+
+                    // å†�è¨ˆç®—å‡¦ç�†
+                    if (!frm.RecalculateLedger) break;
+                }
+                // ç”»é�¢ã‚’é–‰ã�˜ã‚‹
+                frm.Close();
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("ã‚·ã‚¹ãƒ†ãƒ ã‚¨ãƒ©ãƒ¼ï¼š{0}ï¼š{1}", CommonMotions.GetMethodName(), ex.Message);
+            }
+            finally
+            {
+                LedgerDB.close(); LedgerDB = null;
+                LedgerDDB.close(); LedgerDDB = null;
+                LedgerEDB.close(); LedgerEDB = null;
+
+                frm.Dispose(); frm = null;
+            }
+        }
+        #endregion
         // ---------- ãƒ‡ãƒ¼ã‚¿ã‚³ãƒ³ãƒ�ãƒ¼ãƒˆãƒ­ã‚¸ãƒƒã‚¯
     }
 }
Index: trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionLedger/FrmConstructionLedger.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionLedger/FrmConstructionLedger.cs	(revision 15)
+++ trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionLedger/FrmConstructionLedger.cs	(revision 16)
@@ -634,8 +634,16 @@
         /// Œo”ïƒŠƒXƒg
         /// </summary>
         private ArrayList m_ExpensesList = new ArrayList();
+
+        #region ƒ^ƒCƒgƒ‹Žæ“¾Žžƒpƒ‰ƒ�ƒ^•Ï�”
+        /// <summary>
+        /// ƒ^ƒCƒgƒ‹Žæ“¾Žžƒpƒ‰ƒ�ƒ^•Ï�”
+        /// </summary>
+        private int m_GetTitileParametar = 0;
         #endregion
 
+        #endregion
+
         #region ’S“–ŽÒ�E•›’S“–ŽÒ�EŽw“±ˆõ•ÛŽ�ƒNƒ‰ƒXƒŠƒXƒg
         /// <summary>
         /// ’S“–ŽÒ�E•›’S“–ŽÒ�EŽw“±ˆõ•ÛŽ�ƒNƒ‰ƒXƒŠƒXƒg
@@ -734,26 +742,19 @@
         // *-----* ‹¤’Ê�ˆ—��Ý’è *-----*
 
         /// <summary>
-        /// ’S“–ŽÒƒ^ƒCƒgƒ‹Žæ“¾
+        /// ƒ^ƒCƒgƒ‹Žæ“¾Žžƒpƒ‰ƒ�ƒ^•Ï�”
         /// </summary>
-        public string GetTitleConstructor
+        public int GetTitileParametar
         {
-            get { return s_GroupTitle[(int)DataGroup.Payroll]; }
+            set { m_GetTitileParametar = value; }
         }
         /// <summary>
-        /// •›’S“–ƒ^ƒCƒgƒ‹Žæ“¾
+        /// ƒOƒŠƒbƒh�€–Úƒ^ƒCƒgƒ‹Žæ“¾
         /// </summary>
-        public string GetTitleAssistant
+        public string GetTitleString
         {
-            get { return s_GroupTitle[(int)DataGroup.Assistant]; }
+            get { return s_GroupTitle[m_GetTitileParametar]; }
         }
-        /// <summary>
-        /// Žw“±ˆõƒ^ƒCƒgƒ‹Žæ“¾
-        /// </summary>
-        public string GetTitleInstructor
-        {
-            get { return s_GroupTitle[(int)DataGroup.Instructor]; }
-        }
 
         #endregion
 
Index: trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionLedger/FrmConstructionLedgerAuxiliary.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionLedger/FrmConstructionLedgerAuxiliary.cs	(revision 15)
+++ trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionLedger/FrmConstructionLedgerAuxiliary.cs	(revision 16)
@@ -124,6 +124,10 @@
             /// çµŒè²»çŽ‡
             /// </summary>
             ExpensesRate,
+            /// <summary>
+            /// çµŒè²»å��ç§°ã‚³ãƒ¼ãƒ‰
+            /// </summary>
+            NameCode,
         }
         #endregion
 
@@ -144,7 +148,7 @@
                 if (!picDB.SelectAction(strPerson, ref picRec)) return false;
 
                 // éƒ¨ç½²çµŒè²»çŽ‡ãƒžã‚¹ã‚¿å�–å¾—
-                string strSQL = "SELECT A.NAMESTRING, NVL(B.EXPENSESRATIO, 0)";
+                string strSQL = "SELECT A.NAMESTRING, NVL(B.EXPENSESRATIO, 0), B.NAMECODE";
                 strSQL += " FROM DIVISIONMASTER A";
                 strSQL += " LEFT OUTER JOIN";
                 strSQL += " (SELECT NAMECODE, DEPARTMENTCODE, EXPENSESRATIO, EXPENSESPERIOD";
@@ -1259,6 +1263,7 @@
                     RowData[(int)GridColumn.No] = string.Format("{0}-{1}", GroupNo, ++icnt);
                     RowData[(int)GridColumn.FixFlg] = "*";
                     RowData[(int)GridColumn.GroupCount] = GroupNo;
+                    RowData[(int)GridColumn.ComponentCode] = CommonMotions.cnvDouble(wrkExpense[(int)ExpensesArray.NameCode]);
                     RowData[(int)GridColumn.ItemName] = string.Format("{0}({1}%)", strVallue, dExpenses.ToString("0.00"));
                     RowData[(int)GridColumn.CompanyType] = 0;
                     RowData[(int)GridColumn.CompanyCode] = 0;
@@ -2555,11 +2560,9 @@
                 {
                     ExecTotal += CommonMotions.cnvInt(RowData[i]);
                 }
-
-                // æ”¯æ‰•ã�„é‡‘é¡�
+                // å®Ÿè¡Œé‡‘é¡�
                 int ExcePoint = (int)GridColumn.ExecPrice;
-                //RowData[ExcePoint] = dExpenss.ToString("#,0");
-                RowData[ExcePoint] = ExecTotal.ToString("#,0");
+                RowData[ExcePoint] = DetailRec.ExecutionAmount.ToString("#,0");
 
                 // å�ˆè¨ˆé‡‘é¡�ã‚»ãƒƒãƒˆ
                 RowData[TotalPoint] = ExecTotal.ToString("#,0");
@@ -2599,7 +2602,7 @@
                 string strPerson = PersonDB.CreatePrimarykeyString(DetailRec.CompanyCode);
                 if (!PersonDB.SelectAction(strPerson, ref PersonRec)) return false;
 
-                double Salary = PersonRec.MonthlySalary * CommonDefine.s_SalaryExpenses;                                        // æœˆé¡�çµ¦ä¸Žè¨ˆç®—
+                double Salary = PersonRec.MonthlySalary * CommonDefine.s_SalaryCorrection;                                        // æœˆé¡�çµ¦ä¸Žè¨ˆç®—
                 double daylySalary = CommonMotions.cnvRound(Salary / CommonDefine.s_ManHourUnitMonth);                          // æ—¥å½“è¨ˆç®—
                 string ItemText = s_GroupTitle[DetailRec.GroupCount] + string.Format("ã€�{0}æ°�ã€‘", PersonRec.SealPrintName);    // é …ç›®å��ç§°ã‚»ãƒƒãƒˆ
                 string Content = string.Empty;
@@ -3677,15 +3680,18 @@
                 // ç¨ŽæŠœå�—æ³¨æ±ºå®šé‡‘é¡�
                 string strwork = m_DspLabelCtrl[(int)DspLblCtrlName.OrdersPrice].Text;
                 work.OrdersDecisionPrice = CommonMotions.cnvDouble(strwork);
-                // ä¼šç¤¾çµŒè²»å�ˆè¨ˆ
-                int Rowcnt = GetExpenss("ä¼šç¤¾");
-                work.CompanyExpenses = CommonMotions.cnvDouble(dgv.Rows[Rowcnt].Cells[(int)GridColumn.ExecPrice].Value);
-                // éƒ¨ç½²çµŒè²»å�ˆè¨ˆ
-                Rowcnt = GetExpenss("éƒ¨ç½²");
-                work.DepartmentExpenses = CommonMotions.cnvDouble(dgv.Rows[Rowcnt].Cells[(int)GridColumn.ExecPrice].Value);
-                // å–¶æ¥­çµŒè²»å�ˆè¨ˆ
-                Rowcnt = GetExpenss("å–¶æ¥­");
-                work.SalesExpenses = CommonMotions.cnvDouble(dgv.Rows[Rowcnt].Cells[(int)GridColumn.ExecPrice].Value);
+                int Rowcnt1 = GetExpenss("ä¼šç¤¾");
+                int Rowcnt2 = GetExpenss("éƒ¨ç½²");
+                int Rowcnt3 = GetExpenss("å–¶æ¥­");
+                for (int i = (int)GridColumn.payment; i < TotalPoint; i++)
+                {
+                    // ä¼šç¤¾çµŒè²»å�ˆè¨ˆ
+                    work.CompanyExpenses += CommonMotions.cnvDouble(dgv.Rows[Rowcnt1].Cells[i].Value);
+                    // éƒ¨ç½²çµŒè²»å�ˆè¨ˆ
+                    work.DepartmentExpenses += CommonMotions.cnvDouble(dgv.Rows[Rowcnt2].Cells[i].Value);
+                    // å–¶æ¥­çµŒè²»å�ˆè¨ˆ
+                    work.SalesExpenses += CommonMotions.cnvDouble(dgv.Rows[Rowcnt3].Cells[i].Value);
+                }
 
                 // å�—æ³¨é‡‘é¡�ç©�ç®—ãƒ•ãƒ©ã‚°
                 if (CommonMotions.CheckCreateLedgerData(m_ConstructionBaseInfo.ConstructionStatusFlg, m_ConstructionBaseInfo.ConstructionType))
@@ -4960,6 +4966,7 @@
                         PersonCode = 0;
                         SecondString = string.Empty;
                         break;
+
                     case (int)CommonDefine.SalaryDevision.DaysInput: // æ—¥æ•°å…¥åŠ›
                         // æ—¥é¡�çµ¦ä¸Žå�–å¾—
                         double daylySalary = CommonMotions.cnvRound(CommonDefine.AssistantMonthryCost / CommonDefine.s_ManHourUnitMonth);
@@ -5290,6 +5297,26 @@
         {
             try
             {
+                // åˆ�æœŸè¨­å®š
+                InitSettingLoad();
+
+                //ã‚³ãƒ³ãƒˆãƒ­ãƒ¼ãƒ«ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆå�–å¾—
+                SetDisplayObject();
+
+                // è¡¨ç¤ºã‚¯ãƒªã‚¢
+                ClearDisplay();
+
+                if (!GetBaseInfoData()) return false;
+
+                // ãƒ˜ãƒƒãƒ€ãƒ¼è¡¨ç¤º
+                if (!DispHeader()) return false;
+
+                // ã‚°ãƒªãƒƒãƒ‰è¡Œå‰Šé™¤
+                dgvAllDisplay.Rows.Clear();
+
+                // ãƒ‡ãƒ¼ã‚¿è¡¨ç¤ºã‚’è¡Œã�†
+                if (!InitDispData()) return false;
+
                 // å�—æ³¨é‡‘é¡�ã‚’å¤‰æ›´ã�™ã‚‹
                 if (!SetAddData_OrderPrice()) return false;
 
@@ -5506,7 +5533,7 @@
                 }
 
                 // ãƒ‡ãƒ¼ã‚¿å�·ç�¾ç•ªå�·å�–å¾—
-                int FluctuationNo = m_AddingConstrCode % 100;
+                int FluctuationNo = (int)CommonDefine.FluctuatesFlg.Fluctuates;
                 // æ¬¡ã�®è¡Œã�‹ã‚‰è¿½åŠ 
                 TargetLine++;
                 // ãƒ‡ãƒ¼ã‚¿è¿½åŠ 
@@ -5765,74 +5792,83 @@
             try
             {
                 // å·¥äº‹äºˆç®—æ›¸æ˜Žç´°ãƒ‡ãƒ¼ã‚¿ã‚’èª­ã�¿è¾¼ã‚€
-                string strSQL = DetailDB.CreatePrimarykeyString(AddingConstrCode);
+                string strSQL = DetailDB.CreatePrimarykeyString(m_AddingConstrCode);
                 strSQL += string.Format(" AND GROUPCOUNT = {0}", GroupNo);
                 strSQL += " ORDER BY LineCount ASC";
 
-                List<ConstructionBudgetDetail> DetailList = new List<ConstructionBudgetDetail>();
-                if (!DetailDB.SelectAction(strSQL, ref DetailList)) return false;
-                if (DetailList.Count == 0) return true;
+                ConstructionBudgetDetail DetailRec = new ConstructionBudgetDetail();
+                if (!DetailDB.SelectAction(strSQL, ref DetailRec)) return false;
 
-                DataGridView dgv = dgvAllDisplay;
-
-                ConstructionBudgetDetail DetailRec = DetailList[0];
-
+                // å¯¾è±¡è¡Œæ•°å�–å¾—
                 int TargetLine = -1;
-                // ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆ
                 switch (GroupNo)
                 {
                     // æŒ‡å°Žå“¡è²»ç”¨
                     case (int)FrmConstructionBudget.DataGroup.InstructorCosts:
-
                         TargetLine = m_CostsRowCount[(int)CostsRowLine.InstructorRowLine];
                         GroupNo = (int)DataGroup.Instructor;
+
                         // æŒ‡å°Žå“¡è¡Œã�«å��å‰�ã‚’å…¥ã‚Œã‚‹
                         SetFirstStringName(ref DetailRec);
                         // ä¸€èˆ¬ãƒ¦ãƒ¼ã‚¶ãƒ¼ã�¯æŒ‡å°Žå“¡ã�®çµ¦ä¸Žã‚’è¦‹ã�ˆã�ªã�„ã‚ˆã�†ã�«ã�™ã‚‹
                         if (!CheckLeaderOrUser()) DetailRec.SecondString = string.Empty;
                         break;
+
                     // å‰¯æ‹…å½“è€…çµ¦ä¸Žè²»ç”¨
                     case (int)FrmConstructionBudget.DataGroup.AssistantCosts:
-
                         TargetLine = m_CostsRowCount[(int)CostsRowLine.AssistantRowLine];
                         GroupNo = (int)DataGroup.Assistant;
+
                         // å‰¯æ‹…å½“è¡Œã�«å��å‰�ã‚’å…¥ã‚Œã‚‹
                         SetFirstStringName(ref DetailRec);
                         // ä¸€èˆ¬ãƒ¦ãƒ¼ã‚¶ãƒ¼ã�¯å‰¯æ‹…å½“è€…ã�®çµ¦ä¸Žã‚’è¦‹ã�ˆã�ªã�„ã‚ˆã�†ã�«ã�™ã‚‹
                         if (!CheckLeaderOrUser()) DetailRec.SecondString = string.Empty;
                         break;
+
                     // æ‹…å½“è€…çµ¦ä¸Žè²»ç”¨
                     case (int)FrmConstructionBudget.DataGroup.PayrollExpenses:
-
                         TargetLine = m_CostsRowCount[(int)CostsRowLine.PayrollRowLine];
                         GroupNo = (int)DataGroup.Payroll;
+
                         // ä¸€èˆ¬ãƒ¦ãƒ¼ã‚¶ãƒ¼ã�¯æ‹…å½“è€…ã�®çµ¦ä¸Žã‚’è¦‹ã�ˆã�ªã�„ã‚ˆã�†ã�«ã�™ã‚‹
                         if (!CheckLeaderOrUser()) DetailRec.SecondString = string.Empty;
                         break;
                     default:
-                        // ã��ã�®ä»–ã�®é …ç›®
+                        // ã��ã�®ä»–ã�®é …ç›®ï¼ˆã�“ã�“ã�«ã�¯æ�¥ã�ªã�„ã�Œå¿µã�®ã�Ÿã‚�ï¼‰
                         GroupNo = 0;
                         break;
                 }
 
-                // ãƒ‡ãƒ¼ã‚¿è¡Œç�¾ç•ªå�·å�–å¾—
-                int FluctuationNo = m_AddingConstrCode % 100;
-                // æ‹…å½“è€…ç­‰ã�Œå�Œã�˜ã�‹ã‚’ãƒ�ã‚§ãƒƒã‚¯ã�™ã‚‹
+                // æ‹…å½“è€…ã�Œå�Œã�˜ã�ªã‚‰ã�°é‡‘é¡�ã‚’å¤‰æ›´ã�™ã‚‹ã€�æ‹…å½“è€…ã�Œã�„ã�ªã�‘ã‚Œã�°è¡Œã‚’å¢—ã‚„ã�™
                 bool bExist = false;
-                for (int i = TargetLine; i < dgv.RowCount; i++)
+                DataGridView dgv = dgvAllDisplay;
+                for (int i = TargetLine; i < dgv.RowCount; i++, TargetLine++)
                 {
                     DataGridViewRow wrkRow = dgv.Rows[i];
+                    // å¯¾è±¡ã‚°ãƒ«ãƒ¼ãƒ—ä»¥å¤–ã�¯æŠœã�‘ã‚‹
                     if (CommonMotions.cnvInt(wrkRow.Cells[(int)GridColumn.GroupCount].Value) != GroupNo) break;
+                    // å�Œã�˜æ‹…å½“è€…ã�Œã�„ã‚Œã�°æŠœã�‘ã‚‹
                     if (CommonMotions.cnvInt(wrkRow.Cells[(int)GridColumn.CompanyCode].Value) == DetailRec.CompanyCode)
                     {
                         bExist = true;
                         break;
                     }
-                    TargetLine++;
                 }
 
-                if (!bExist)
+                // ãƒ‡ãƒ¼ã‚¿è¡Œç�¾ç•ªå�·å�–å¾—
+                int FluctuationNo = (int)CommonDefine.FluctuatesFlg.Fluctuates;
+
+                if (bExist)
                 {
+                    DataGridViewRow RowData = dgv.Rows[TargetLine];
+                    int EstimatePrice = CommonMotions.cnvInt(RowData.Cells[(int)GridColumn.EstimatePrice].Value) + (int)DetailRec.EstimatePrice;
+                    int ExecutionAmount = CommonMotions.cnvInt(RowData.Cells[(int)GridColumn.ExecPrice].Value) + (int)DetailRec.ExecutionAmount;
+
+                    RowData.Cells[(int)GridColumn.EstimatePrice].Value = EstimatePrice.ToString("#,0");
+                    RowData.Cells[(int)GridColumn.ExecPrice].Value = ExecutionAmount.ToString("#,0");
+                }
+                else
+                {
                     object[] RowData = new object[dgv.Columns.Count];
 
                     RowData[(int)GridColumn.No] = string.Format("{0}-{1}", BlockNo, DataNo);        // ã�“ã�“ã�§ã�®ç•ªå�·ã�¯è¦‹ã�ˆã�ªã�„ã�®ã�§ã�Šã�‹ã�—ã��ã�¦ã‚‚ã‚ˆã�„
@@ -5844,7 +5880,7 @@
                     RowData[(int)GridColumn.CompanyType] = DetailRec.CompanyType;
                     RowData[(int)GridColumn.CompanyCode] = DetailRec.CompanyCode;
                     RowData[(int)GridColumn.CompanyName] = DetailRec.CompanyName;
-                    RowData[(int)GridColumn.EstimatePrice] = DetailRec.EstimatePrice.ToString("#,0");
+                    RowData[(int)GridColumn.EstimatePrice] = DetailRec.ExecutionAmount.ToString("#,0");
                     RowData[(int)GridColumn.ExecPrice] = DetailRec.ExecutionAmount.ToString("#,0");
                     RowData[(int)GridColumn.Percent] = DetailRec.AmountConfigRate.ToString("0.00");
                     RowData[(int)GridColumn.IndependentFlg] = "1";
@@ -5863,16 +5899,7 @@
 
                     dgv.Rows.Insert(TargetLine, RowData);
                 }
-                else
-                {
-                    DataGridViewRow RowData = dgv.Rows[TargetLine];
-                    int EstimatePrice = CommonMotions.cnvInt(RowData.Cells[(int)GridColumn.EstimatePrice].Value) + (int)DetailRec.EstimatePrice;
-                    int ExecutionAmount = CommonMotions.cnvInt(RowData.Cells[(int)GridColumn.ExecPrice].Value) + (int)DetailRec.ExecutionAmount;
 
-                    RowData.Cells[(int)GridColumn.EstimatePrice].Value = EstimatePrice.ToString("#,0");
-                    RowData.Cells[(int)GridColumn.ExecPrice].Value = ExecutionAmount.ToString("#,0");
-                }
-
                 // è¡Œæ•°ä¿�æŒ�ã�®ã‚¨ãƒªã‚¢ã‚’æ›´æ–°ã�™ã‚‹
                 SetCostsRowCount();
 
@@ -5889,7 +5916,6 @@
             }
         }
         #endregion
-        // ---------- å¢—æ¸›ãƒ‡ãƒ¼ã‚¿ã‚’å�°å¸³ãƒ‡ãƒ¼ã‚¿ã�¸è¿½åŠ ã�™ã‚‹
 
         // ---------- ãƒ‡ãƒ¼ã‚¿ã‚³ãƒ³ãƒ�ãƒ¼ãƒˆãƒ­ã‚¸ãƒƒã‚¯
         #region ãƒ•ãƒ©ã‚°ã‚³ãƒ³ãƒ�ãƒ¼ãƒˆ
Index: trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/CopyTargetList/FrmCopyTargetListAuxiliary.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/CopyTargetList/FrmCopyTargetListAuxiliary.cs	(revision 15)
+++ trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/CopyTargetList/FrmCopyTargetListAuxiliary.cs	(revision 16)
@@ -121,7 +121,7 @@
                     for (int i = 0; i < Status.Count; i++)
                     {
                         if (i != 0) strSQL += " Or";
-                        strSQL += string.Format(" ConstructionStatusFlg = {0}", Status[i].ToString());
+                        strSQL += string.Format(" A.ConstructionStatusFlg = {0}", Status[i].ToString());
                     }
                     strSQL += ")";
                 }
@@ -265,6 +265,23 @@
         }
         #endregion
 
+        #region •\Ž¦ƒf�[ƒ^“Ç�ž‚Ý�‡
+        /// <summary>
+        /// •\Ž¦ƒf�[ƒ^“Ç�ž‚Ý�‡
+        /// </summary>
+        private enum DataOrder
+        {
+            ConstrCode = 0,
+            ConstrPeriod,
+            ConstrName,
+            SalesPersonCode,
+            ConstrPersonCode,
+            StatusFlg,
+            SalesPersonName,
+            ConstrPersonName,
+        }
+        #endregion
+
         #region •\Ž¦—pƒf�[ƒ^Žæ“¾SQL�ì�¬
         /// <summary>
         /// •\Ž¦—pƒf�[ƒ^Žæ“¾SQL�ì�¬
@@ -279,15 +296,20 @@
                 strSQL += ", A.SalesPersonCode";
                 strSQL += ", A.ConstructionPersonCode";
                 strSQL += ", A.ConstructionStatusFlg";
-                strSQL += " FROM ConstructionBaseInfo A, ConstructionBaseInfoDetail B, EstimateData C, PERSONINCHARGEMASTER D";
-                strSQL += string.Format(" WHERE (A.ConstructionCode = B.ConstructionCode And B.DETAILNO = {0})",
-                                        (int)ConstructionBaseInfoDetail.DetailDataNo.ConstructionName);
-                strSQL += " AND (A.SalesPersonCode = D.PersonCode";
-                strSQL += " OR A.ConstructionPersonCode = D.PersonCode";
-                strSQL += " OR A.ConstrSubPersonCode = D.PersonCode";
-                strSQL += " OR A.ConstructionInstructor = D.PersonCode)";
+                strSQL += ", E.PERSONNAME";
+                strSQL += ", F.PERSONNAME";
+                strSQL += " FROM ConstructionBaseInfo A";
+                strSQL += " , ConstructionBaseInfoDetail B";
+                strSQL += " , PERSONINCHARGEMASTER D";
+                strSQL += " , PERSONINCHARGEMASTER E";
+                strSQL += " , PERSONINCHARGEMASTER F";
+                strSQL += " WHERE (A.ConstructionCode = B.ConstructionCode";
+                strSQL += string.Format(" AND B.DETAILNO = {0})", (int)ConstructionBaseInfoDetail.DetailDataNo.ConstructionName);
+                strSQL += " AND (A.SalesPersonCode = D.PersonCode OR A.ConstructionPersonCode = D.PersonCode";
+                strSQL += " OR A.ConstrSubPersonCode = D.PersonCode OR A.ConstructionInstructor = D.PersonCode)";
+                strSQL += " AND A.SalesPersonCode = E.PersonCode";
+                strSQL += " AND A.ConstructionPersonCode = F.PersonCode";
 
-
                 List<int> paraList = new List<int>();
                 bool paraSw = false;
                 bool allSW = false;
@@ -343,7 +365,6 @@
                 // SQLŽæ“¾
                 strSQL += CreateSerchSQL();
                 if (!allSW) strSQL += CreateListSQL(paraList, paraSw);
-                strSQL += " And A.ConstructionCode = C.ConstructionCode(+)";
 
                 strSQL += " Order By A.ConstructionCode Desc";
             }
@@ -432,24 +453,13 @@
                     int ino = 1;
                     foreach (object[] objwrk in arData)
                     {
-                        // ‰c‹Æ’S“––¼Žæ“¾
-                        string strSales = picDB.CreatePrimarykeyString(CommonMotions.cnvInt(objwrk[3]));
-                        PersonInChargeMaster salesData = new PersonInChargeMaster();
-                        picDB.SelectAction(strSales, ref salesData);
-                        string salesname = salesData.PersonName;
-                        // �HŽ–’S“––¼Žæ“¾
-                        string strConstructor = picDB.CreatePrimarykeyString(CommonMotions.cnvInt(objwrk[4]));
-                        PersonInChargeMaster constructorData = new PersonInChargeMaster();
-                        string constructorname = CommonDefine.s_UndecidedString;
-                        if (picDB.SelectAction(strConstructor, ref constructorData)) constructorname = constructorData.PersonName;
-
                         dgvMaster.Rows.Add((ino++)
-                                            , CommonMotions.cnvStringCodeFromInt(CommonMotions.cnvInt(objwrk[0]), "-", 8)
-                                            , CommonMotions.cnvInt(objwrk[1])
-                                            , objwrk[2].ToString()
-                                            , salesname
-                                            , constructorname
-                                            , CommonDefine.ProjectsStatus[CommonMotions.cnvInt(objwrk[5])]
+                                            , CommonMotions.cnvStringCodeFromInt(CommonMotions.cnvInt(objwrk[(int)DataOrder.ConstrCode]), "-", 8)
+                                            , CommonMotions.cnvInt(objwrk[(int)DataOrder.ConstrPeriod])
+                                            , CommonMotions.cnvString(objwrk[(int)DataOrder.ConstrName])
+                                            , CommonMotions.cnvString(objwrk[(int)DataOrder.SalesPersonName])
+                                            , CommonMotions.cnvString(objwrk[(int)DataOrder.ConstrPersonName])
+                                            , CommonDefine.ProjectsStatus[CommonMotions.cnvInt(objwrk[(int)DataOrder.StatusFlg])]
                                             );
 
                     }
Index: trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/DRConstruction/FrmDRConstructionAuxiliary.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/DRConstruction/FrmDRConstructionAuxiliary.cs	(revision 15)
+++ trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/DRConstruction/FrmDRConstructionAuxiliary.cs	(revision 16)
@@ -873,10 +873,10 @@
                 strSQL += ", A.TODAYWORK";
                 strSQL += ", A.NEXTDAYWORK";
                 strSQL += ", A.NEXTDAYHEADCOUNT";
-                strSQL += " FROM DAILYDATADETAIL A, SUBCONTRACTORJOBCATEGORY B, SUBCONTRACTORMASTER C";
+                strSQL += " FROM DAILYDATADETAIL A";
+                strSQL += " LEFT JOIN SUBCONTRACTORJOBCATEGORY B ON A.JOBCATEGORYCODE = B.JOBCATEGORYCODE";
+                strSQL += " LEFT JOIN SUBCONTRACTORMASTER C ON A.COMPANYCODE = C.COMPANYCODE";
                 strSQL += DetailDB.CreatePrimarykeyString(m_PersonCode, GetTargetToday(), m_ConstructionCode, 0);
-                strSQL += " AND A.JOBCATEGORYCODE = B.JOBCATEGORYCODE(+)";
-                strSQL += " AND A.COMPANYCODE = C.COMPANYCODE(+)";
                 strSQL += " ORDER BY A.SEQNO";
                 ArrayList arList = new ArrayList();
                 if (!DetailDB.ExecuteReader(strSQL, ref arList) || arList.Count == 0)
Index: trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/DepExpenssList/FrmDepExpenssList.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/DepExpenssList/FrmDepExpenssList.cs	(nonexistent)
+++ trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/DepExpenssList/FrmDepExpenssList.cs	(revision 16)
@@ -0,0 +1,514 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Text;
+using System.Windows.Forms;
+using System.Collections;
+
+using log4net;
+using log4net.Appender;
+using log4net.Repository.Hierarchy;
+
+using ProcessManagement.Common;
+using ProcessManagement.DB.IOAccess;
+using ProcessManagement.DataModel;
+using ProcessManagement.DB.Core;
+using ProcessManagement.Forms.CustomControls;
+using ProcessManagement.Forms.ControlsAction;
+//*---------------------------- •”��•ÊŒo”ïˆê——‰æ–Ê ----------------------------*
+//  2016/09/23  Ver1.0.0.0      Create Source           
+//
+//
+//
+//*----------------------------------------------------------------------------*
+namespace ProcessManagement.Forms.DataEntry
+{
+    public partial class FrmDepExpenssList : Form
+    {
+        #region Žg—p’è‹`
+        //log4netƒ�ƒO‚ðŽg—p‚·‚é
+        private static readonly log4net.ILog logger = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
+        #endregion
+
+        #region ’è�”
+        #region •\Ž¦ƒJƒ‰ƒ€
+        /// <summary>
+        /// •\Ž¦ƒJƒ‰ƒ€
+        /// </summary>
+        private enum DispColumn
+        {
+            /// <summary>
+            /// •”��ƒR�[ƒh
+            /// </summary>
+            DepartmentCode = 0,
+            /// <summary>
+            /// ‡‚
+            /// </summary>
+            No,
+            /// <summary>
+            /// •”��–¼
+            /// </summary>
+            DepartmentName,
+            /// <summary>
+            /// Žó’�‹àŠz
+            /// </summary>
+            OrdersDecisionPrice,
+            /// <summary>
+            /// ‰ïŽÐŒo”ï
+            /// </summary>
+            CompanyExpenses,
+            /// <summary>
+            /// •”��Œo”ï
+            /// </summary>
+            DepartmentExpenses,
+            /// <summary>
+            /// ‰c‹ÆŒo”ï
+            /// </summary>
+            SalesExpenses,
+            /// <summary>
+            /// ‘�Žx•¥Šz
+            /// </summary>
+            TotalPayment,
+            /// <summary>
+            /// ‘e—˜
+            /// </summary>
+            GrossProfit,
+            /// <summary>
+            /// ‹‹—^
+            /// </summary>
+            Allowance,
+            /// <summary>
+            /// �ƒ—˜‰v
+            /// </summary>
+            NetProfit,
+        }
+        #endregion
+
+        #region �s‘I‘ð�F
+        /// <summary>
+        /// �s‘I‘ð�F
+        /// </summary>
+        private static Color s_RowSelectBackColor = Color.Blue;
+        private static Color s_RowSelectForeColor = Color.White;
+        #endregion
+
+        #region �‡Œv�s�F
+        /// <summary>
+        /// �‡Œv�s�F
+        /// </summary>
+        private static Color s_RowTotalBackColor = Color.Black;
+        private static Color s_RowTotalForeColor = Color.White;
+        #endregion
+
+        #region �sƒ^ƒCƒgƒ‹
+        /// <summary>
+        /// �sƒ^ƒCƒgƒ‹•À‚Ñ�‡
+        /// </summary>
+        private enum RowTitleNum
+        {
+            /// <summary>
+            /// Ž{�H’†�‡Œv�s
+            /// </summary>
+            Execution = 0,
+            /// <summary>
+            /// Š®—¹�Ï‚Ý
+            /// </summary>
+            Completed,
+            /// <summary>
+            /// Œo”ïŒv�s
+            /// </summary>
+            Expenses,
+            /// <summary>
+            /// •â�•�U•ª
+            /// </summary>
+            Auxiliary,
+            /// <summary>
+            /// ‘��‡Œv�s
+            /// </summary>
+            AllTotal,
+        }
+
+        /// <summary>
+        /// �‡Œv�sƒ^ƒCƒgƒ‹
+        /// </summary>
+        private static string[] s_TotalTitleArray = new string[] {  "�–Ž{�@�H�@’†�@�‡�@Œv�–",
+                                                                    "�–Š®�@—¹�@�Ï�@�‡�@Œv�–",
+                                                                    "�–�@Œo�@�@”ï�@�@Œv�@�–",
+                                                                    "�–�U�@•ª�@•â�@�•�@Œv�–",
+                                                                    "�–�–�@‘��@�‡�@Œv�@�–�–",
+                                                                };
+        #endregion
+
+        #region ƒOƒŠƒbƒh�€–Ú�sƒ^ƒCƒgƒ‹
+        /// <summary>
+        /// ƒOƒŠƒbƒh�€–Ú�sƒ^ƒCƒgƒ‹
+        /// </summary>
+        private static string[] s_GroupTitle = new string[] {"•› ’S “– ŽÒ ‹‹ —^"
+                                                            ,"Žw “± ˆõ ‹‹ —^"};
+        #endregion
+        #endregion
+
+        #region •Ï�”
+        /// <summary>
+        /// �‰ŠúŽžƒtƒ‰ƒO
+        /// </summary>
+        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;
+
+        /// <summary>
+        /// ƒf�[ƒ^’Ç‰Áƒ{ƒ^ƒ“•\Ž¦ƒtƒ‰ƒO
+        /// </summary>
+        private bool m_DataAddtionButton = false;
+        /// <summary>
+        /// �I—¹ƒ{ƒ^ƒ“‰Ÿ‰ºƒtƒ‰ƒO
+        /// </summary>
+        private bool m_CloseingProcessOff = false;
+
+        #region ƒOƒŠƒbƒhƒJƒ‰ƒ€ƒTƒCƒY
+        /// <summary>
+        /// ƒOƒŠƒbƒhƒJƒ‰ƒ€ƒTƒCƒY
+        /// </summary>
+        int[] m_CellSize = null;
+        #endregion
+
+        #region ƒtƒH�[ƒ€•�
+        /// <summary>
+        /// ƒtƒH�[ƒ€•�
+        /// </summary>
+        private int m_FormWidthSize = 0;
+        #endregion
+
+        #region ‘�ŒvƒOƒŠƒbƒh•�ƒTƒCƒY
+        /// <summary>
+        /// ‘�ŒvƒOƒŠƒbƒh•�ƒTƒCƒY
+        /// </summary>
+        private int m_GridWidthSize = 0;
+        #endregion
+        #endregion
+
+        #region ƒvƒ�ƒpƒeƒB
+        public int ExecuteFlg
+        {
+            get { return m_ExecuteFlg; }
+            set { m_ExecuteFlg = value; }
+        }
+        /// <summary>
+        /// ƒf�[ƒ^’Ç‰Áƒ{ƒ^ƒ“•\Ž¦
+        /// </summary>
+        public bool DataAddtionButton
+        {
+            get { return m_DataAddtionButton; }
+            set { m_DataAddtionButton = value; }
+        }
+        #endregion
+
+        #region ƒRƒ“ƒXƒgƒ‰ƒNƒ^
+        public FrmDepExpenssList()
+        {
+            InitializeComponent();
+        }
+        #endregion
+        #region ƒfƒXƒgƒ‰ƒNƒ^
+        ~FrmDepExpenssList()
+        {
+            try
+            {
+                GC.Collect();
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("ƒVƒXƒeƒ€ƒGƒ‰�[�F{0}�F{1}", CommonMotions.GetMethodName(), ex.Message);
+            }
+        }
+        #endregion
+
+        #region �~ƒ{ƒ^ƒ“
+        /// <summary>
+        /// �~ƒ{ƒ^ƒ“‰Ÿ‰º�ˆ—�
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        private void FrmDepExpenssList_FormClosing(object sender, FormClosingEventArgs e)
+        {
+            if (m_CloseingProcessOff) return;
+
+            // ‘Oƒvƒ�ƒZƒX‚É–ß‚é
+            ClsExcute.BackProcess();
+        }
+        #endregion
+
+        #region �I—¹ƒ{ƒ^ƒ“
+        /// <summary>
+        /// �I—¹ƒ{ƒ^ƒ“ƒNƒŠƒbƒN
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        private void btnEnd_Click(object sender, EventArgs e)
+        {
+            // ‘Oƒvƒ�ƒZƒX‚É–ß‚é
+            ClsExcute.BackProcess();
+
+            m_CloseingProcessOff = true;
+            
+            this.Close();
+        }
+        #endregion
+
+        #region ‘I‘ðƒ{ƒ^ƒ“
+        /// <summary>
+        /// �HŽ–‘I‘ðƒ{ƒ^ƒ“‰Ÿ‰º
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        private void btnDataSelect_Click(object sender, EventArgs e)
+        {
+            // ƒf�[ƒ^‚ª‚È‚¢�ê�‡‚Í”²‚¯‚é
+            if (dgvMaster.RowCount == 0) return;
+            if (CommonMotions.chkCellBlank(dgvMaster.CurrentRow.Cells[(int)DispColumn.DepartmentName].Value)) return;
+
+            // Še�ˆ—�‹N“®
+            SubProcessExecute(CommonMotions.cnvIntFromStringCode(dgvMaster.CurrentRow.Cells[(int)DispColumn.DepartmentCode].Value.ToString(), "-"));
+        }
+        #endregion
+
+        #region ƒtƒH�[ƒ€ƒ��[ƒh
+        /// <summary>
+        /// �‰ŠúƒtƒH�[ƒ€ƒ��[ƒh
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        private void FrmConstructionBaseInfoList_Load(object sender, EventArgs e)
+        {
+
+            // ƒRƒ“ƒ{ƒ{ƒbƒNƒX�‰Šú•\Ž¦
+            SetInitPeriod();
+
+            // ƒOƒŠƒbƒh�‰Šú�Ý’è
+            SetDisplayObject();
+
+            // �‰Šú•\Ž¦
+            InitDataLoad();
+
+            m_initDataLoad = false;
+        }
+        #endregion
+
+        #region ƒZƒ‹ƒ_ƒuƒ‹ƒNƒŠƒbƒN
+        /// <summary>
+        /// ƒZƒ‹ƒ_ƒuƒ‹ƒNƒŠƒbƒN
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        private void dgvMaster_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
+        {
+            if (e.RowIndex < 0) return;
+
+            DataGridView dgv = dgvMaster;
+            DataGridViewRow CurRow = dgv.CurrentRow;
+
+            // ƒf�[ƒ^‚ª‚È‚¢�ê�‡‚Í”²‚¯‚é
+            if (dgv.RowCount == 0) return;
+            if (CommonMotions.chkCellBlank(CurRow.Cells[(int)DispColumn.DepartmentCode].Value)) return;
+            if (CommonMotions.chkCellBlank(CurRow.Cells[(int)DispColumn.DepartmentName].Value)) return;
+
+            // Še�ˆ—�‹N“®
+            SubProcessExecute(CommonMotions.cnvIntFromStringCode(CurRow.Cells[(int)DispColumn.DepartmentCode].Value.ToString(), "-"));
+        }
+        #endregion
+
+        #region EntryƒL�[‚Å‚ÌˆÚ“®�ˆ—�
+        /// <summary>
+        /// EntryƒL�[‚Å‚ÌˆÚ“®�ˆ—�
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        private void FrmDepExpenssList_KeyDown(object sender, KeyEventArgs e)
+        {
+            //EnterƒL�[‚ª‰Ÿ‚³‚ê‚Ä‚¢‚é‚©Šm”F
+            //Alt‚©CtrlƒL�[‚ª‰Ÿ‚³‚ê‚Ä‚¢‚éŽž‚Í–³Ž‹‚·‚é
+            if ((e.KeyCode == Keys.Enter) && !e.Alt && !e.Control)
+            {
+                //‚ ‚½‚©‚àTabƒL�[‚ª‰Ÿ‚³‚ê‚½‚©‚Ì‚æ‚¤‚É‚·‚é
+                //Shift‚ª‰Ÿ‚³‚ê‚Ä‚¢‚éŽž‚Í‘O‚ÌƒRƒ“ƒgƒ��[ƒ‹‚ÌƒtƒH�[ƒJƒX‚ðˆÚ“®
+                this.ProcessTabKey(!e.Shift);
+
+                e.Handled = true;
+                //.NET Framework 2.0ˆÈ�~
+                e.SuppressKeyPress = true;
+            }
+        }
+        #endregion
+
+        #region ƒf�[ƒ^ƒRƒs�[
+        /// <summary>
+        /// ƒf�[ƒ^ƒRƒs�[‹@”\
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        private void btnDataCopy_Click(object sender, EventArgs e)
+        {
+            // ŽŸ‹N“®ƒvƒ�ƒZƒXƒZƒbƒg
+            int NowPoint = ClsExcute.NextProcess((int)ClsExcute.ProcessExecuteNo.ConstructionCopyList);
+            // Š®—¹�HŽ–ˆê——
+            ClsExcute.ProcControlPara[NowPoint].IntExecParameter.Add(0);
+
+            // ƒNƒ��[ƒY�ˆ—�‚ðOFF‚É‚·‚é�B
+            m_CloseingProcessOff = true;
+            // ‰æ–ÊƒNƒ��[ƒY
+            this.Close();
+        }
+        #endregion
+
+        #region ƒtƒH�[ƒ€ƒTƒCƒY•Ï�X
+        /// <summary>
+        /// ƒtƒH�[ƒ€ƒTƒCƒY•Ï�X
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        private void FrmDepExpenssList_SizeChanged(object sender, EventArgs e)
+        {
+            if (this.WindowState == FormWindowState.Minimized)
+            {
+                // �Å�¬‰»
+            }
+            else if (this.WindowState == FormWindowState.Maximized)
+            {
+                // �Å‘å‰»
+                CellSizeChangesWhenChangingScreenSize(false);
+            }
+            else if (this.WindowState == FormWindowState.Normal)
+            {
+                // •W�€‰»
+                CellSizeChangesWhenChangingScreenSize(true);
+            }
+        }
+        #endregion
+
+        #region ƒOƒŠƒbƒhƒ}ƒEƒXƒAƒbƒv
+        /// <summary>
+        /// ƒOƒŠƒbƒhƒ}ƒEƒXƒAƒbƒv
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        private void dgvMaster_MouseUp(object sender, MouseEventArgs e)
+        {
+            try
+            {
+                DataGridView dgv = (DataGridView)sender;
+
+                lblCellTotal.Text = string.Empty;
+
+                double dTotal = 0;
+                int DataCnt = 0;
+                int NumericCnt = 0;
+                foreach (DataGridViewCell c in dgv.SelectedCells)
+                {
+                    if (CommonMotions.chkObjectIsNull(dgv.Rows[c.RowIndex].Cells[c.ColumnIndex])) continue;
+                    if (CommonMotions.chkCellBlank(dgv.Rows[c.RowIndex].Cells[c.ColumnIndex].Value)) continue;
+
+                    Console.WriteLine("{0}, {1}", c.ColumnIndex, c.RowIndex);
+                    DataCnt++;
+                    dTotal += CommonMotions.cnvDouble(dgv.Rows[c.RowIndex].Cells[c.ColumnIndex].Value);
+                    if (CommonMotions.chkNumeric(dgv.Rows[c.RowIndex].Cells[c.ColumnIndex].Value)) NumericCnt++;
+                }
+                if (DataCnt == 0 || dTotal == 0 || NumericCnt == 0) return;
+                string strTotal = CommonMotions.cnvTruncate(dTotal).ToString("#,#");
+                if (dTotal - System.Math.Floor(dTotal) != 0) strTotal = dTotal.ToString("#,#.00");
+
+                string strwrkData = string.Format(CommonDefine.s_CalculateCellFormat,
+                                                    CommonMotions.cnvTruncate(dTotal / (double)NumericCnt).ToString("#,#"),
+                                                    DataCnt.ToString("#,#"),
+                                                    strTotal);
+                lblCellTotal.Text = strwrkData;
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("ƒVƒXƒeƒ€ƒGƒ‰�[�F{0}�F{1}", CommonMotions.GetMethodName(), ex.Message);
+            }
+        }
+        #endregion
+
+        // ƒZƒ‹‘I‘ð�s
+        int m_BeforeGridRow = -1;
+        #region ƒZƒ‹‘I‘ð•Ï�X
+        /// <summary>
+        /// ƒZƒ‹•Ï�XŽž�s‚Ì�F‚ð•Ï‚¦‚é
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        private void dgvMaster_SelectionChanged(object sender, EventArgs e)
+        {
+            DataGridView dgv = dgvMaster;
+            DataGridViewRow CurRow = dgv.CurrentRow;
+
+            // ƒf�[ƒ^‚ª‚È‚¢�ê�‡‚Í”²‚¯‚é
+            if (dgv.RowCount == 0) return;
+            if (CommonMotions.chkCellBlank(CurRow.Cells[(int)DispColumn.DepartmentCode].Value) &&
+                CommonMotions.chkCellBlank(CurRow.Cells[(int)DispColumn.DepartmentName].Value))
+            {
+                return;
+            }
+            else
+            {
+                // �‡Œv�s‚Í�ˆ—�‚µ‚È‚¢
+                string strWork = CommonMotions.cnvString(CurRow.Cells[(int)DispColumn.DepartmentName].Value);
+                bool bTitle = false;
+                foreach (string strTitle in s_TotalTitleArray)
+                {
+                    if (strWork.Equals(strTitle))
+                    {
+                        bTitle = true;
+                        break;
+                    }
+                }
+                if (bTitle) return;
+            }
+            // �s‘I‘ð�F‚ðŒ³‚É–ß‚·
+            if (m_BeforeGridRow >= 0) DefaultRowChangeColor(m_BeforeGridRow);
+
+            // ‘I‘ð�s�”‚ð‘Þ”ð
+            m_BeforeGridRow = dgv.CurrentRow.Index;
+            // �s‘I‘ð�F‚ð�Ý’è
+            SelectRowChangeColor(m_BeforeGridRow);
+        }
+        #endregion
+
+        #region ƒOƒŠƒbƒh‚©‚çƒtƒH�[ƒJƒX‚ªŠO‚ê‚½�ê�‡
+        /// <summary>
+        /// ƒOƒŠƒbƒh‚©‚çƒtƒH�[ƒJƒX‚ªŠO‚ê‚½�ê�‡
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        private void dgvMaster_Leave(object sender, EventArgs e)
+        {
+            lblCellTotal.Text = string.Empty;
+        }
+        #endregion
+
+        #region ‰c‹ÆŠúƒRƒ“ƒ{ƒ{ƒbƒNƒX•Ï�X
+        /// <summary>
+        /// ‰c‹ÆŠú•Ï�X
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        private void numUDConstPro_ValueChanged(object sender, EventArgs e)
+        {
+            if (m_initDataLoad) return;
+            // ƒf�[ƒ^•\Ž¦
+            DataDisplay();
+        }
+        #endregion
+
+    }
+}
\ No newline at end of file
Index: trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/DepExpenssList/FrmDepExpenssList.designer.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/DepExpenssList/FrmDepExpenssList.designer.cs	(nonexistent)
+++ trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/DepExpenssList/FrmDepExpenssList.designer.cs	(revision 16)
@@ -0,0 +1,436 @@
+ï»¿namespace ProcessManagement.Forms.DataEntry
+{
+    partial class FrmDepExpenssList
+    {
+        /// <summary>
+        /// å¿…è¦�ã�ªãƒ‡ã‚¶ã‚¤ãƒŠå¤‰æ•°ã�§ã�™ã€‚
+        /// </summary>
+        private System.ComponentModel.IContainer components = null;
+
+        /// <summary>
+        /// ä½¿ç”¨ä¸­ã�®ãƒªã‚½ãƒ¼ã‚¹ã‚’ã�™ã�¹ã�¦ã‚¯ãƒªãƒ¼ãƒ³ã‚¢ãƒƒãƒ—ã�—ã�¾ã�™ã€‚
+        /// </summary>
+        /// <param name="disposing">ãƒžãƒ�ãƒ¼ã‚¸ ãƒªã‚½ãƒ¼ã‚¹ã�Œç ´æ£„ã�•ã‚Œã‚‹å ´å�ˆ trueã€�ç ´æ£„ã�•ã‚Œã�ªã�„å ´å�ˆã�¯ false ã�§ã�™ã€‚</param>
+        protected override void Dispose(bool disposing)
+        {
+            if (disposing && (components != null))
+            {
+                components.Dispose();
+            }
+            base.Dispose(disposing);
+        }
+
+        #region Windows ãƒ•ã‚©ãƒ¼ãƒ  ãƒ‡ã‚¶ã‚¤ãƒŠã�§ç”Ÿæˆ�ã�•ã‚Œã�Ÿã‚³ãƒ¼ãƒ‰
+
+        /// <summary>
+        /// ãƒ‡ã‚¶ã‚¤ãƒŠ ã‚µãƒ�ãƒ¼ãƒˆã�«å¿…è¦�ã�ªãƒ¡ã‚½ãƒƒãƒ‰ã�§ã�™ã€‚ã�“ã�®ãƒ¡ã‚½ãƒƒãƒ‰ã�®å†…å®¹ã‚’
+        /// ã‚³ãƒ¼ãƒ‰ ã‚¨ãƒ‡ã‚£ã‚¿ã�§å¤‰æ›´ã�—ã�ªã�„ã�§ã��ã� ã�•ã�„ã€‚
+        /// </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 dataGridViewCellStyle14 = 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();
+            this.btnEnd = new System.Windows.Forms.Button();
+            this.label1 = new System.Windows.Forms.Label();
+            this.groupBox1 = new System.Windows.Forms.GroupBox();
+            this.label2 = new System.Windows.Forms.Label();
+            this.numUDConstPro = new System.Windows.Forms.NumericUpDown();
+            this.label4 = new System.Windows.Forms.Label();
+            this.label7 = new System.Windows.Forms.Label();
+            this.lblCellTotal = new System.Windows.Forms.Label();
+            this.ProgressBar = new System.Windows.Forms.ProgressBar();
+            this.dgvMaster = new ProcessManagement.Forms.CustomControls.DataGridViewEX();
+            this.Column3 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.Column1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.Column14 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.Column5 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.Column6 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.Column7 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.Column8 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.Column9 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.Column10 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.Column2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.Column12 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.groupBox1.SuspendLayout();
+            ((System.ComponentModel.ISupportInitialize)(this.numUDConstPro)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.dgvMaster)).BeginInit();
+            this.SuspendLayout();
+            // 
+            // btnEnd
+            // 
+            this.btnEnd.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
+            this.btnEnd.BackColor = System.Drawing.Color.Blue;
+            this.btnEnd.ForeColor = System.Drawing.Color.White;
+            this.btnEnd.Location = new System.Drawing.Point(1210, 619);
+            this.btnEnd.Name = "btnEnd";
+            this.btnEnd.Size = new System.Drawing.Size(120, 30);
+            this.btnEnd.TabIndex = 8;
+            this.btnEnd.Text = "çµ‚ã€€äº†";
+            this.btnEnd.UseVisualStyleBackColor = false;
+            this.btnEnd.Click += new System.EventHandler(this.btnEnd_Click);
+            // 
+            // label1
+            // 
+            this.label1.Anchor = System.Windows.Forms.AnchorStyles.Top;
+            this.label1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(128)))), ((int)(((byte)(255)))));
+            this.label1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
+            this.label1.Font = new System.Drawing.Font("ï¼­ï¼³ æ˜Žæœ�", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
+            this.label1.ForeColor = System.Drawing.Color.Black;
+            this.label1.Location = new System.Drawing.Point(420, 10);
+            this.label1.Name = "label1";
+            this.label1.Size = new System.Drawing.Size(500, 20);
+            this.label1.TabIndex = 6;
+            this.label1.Text = "éƒ¨ã€€ç½²ã€€åˆ¥ã€€å�°ã€€å¸³ã€€ä¸€ã€€è¦§";
+            this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
+            // 
+            // groupBox1
+            // 
+            this.groupBox1.Anchor = System.Windows.Forms.AnchorStyles.Top;
+            this.groupBox1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(128)))), ((int)(((byte)(255)))));
+            this.groupBox1.Controls.Add(this.label2);
+            this.groupBox1.Controls.Add(this.numUDConstPro);
+            this.groupBox1.Controls.Add(this.label4);
+            this.groupBox1.Controls.Add(this.label7);
+            this.groupBox1.ForeColor = System.Drawing.Color.White;
+            this.groupBox1.Location = new System.Drawing.Point(5, 40);
+            this.groupBox1.Name = "groupBox1";
+            this.groupBox1.Size = new System.Drawing.Size(1330, 45);
+            this.groupBox1.TabIndex = 0;
+            this.groupBox1.TabStop = false;
+            // 
+            // label2
+            // 
+            this.label2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(192)))));
+            this.label2.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
+            this.label2.Font = new System.Drawing.Font("ï¼­ï¼³ æ˜Žæœ�", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
+            this.label2.ForeColor = System.Drawing.Color.Black;
+            this.label2.Location = new System.Drawing.Point(6, 14);
+            this.label2.Name = "label2";
+            this.label2.Size = new System.Drawing.Size(120, 25);
+            this.label2.TabIndex = 38;
+            this.label2.Text = "å–¶æ¥­æœŸ";
+            this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
+            // 
+            // numUDConstPro
+            // 
+            this.numUDConstPro.BackColor = System.Drawing.Color.White;
+            this.numUDConstPro.Font = new System.Drawing.Font("ï¼­ï¼³ æ˜Žæœ�", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
+            this.numUDConstPro.ForeColor = System.Drawing.Color.Black;
+            this.numUDConstPro.Location = new System.Drawing.Point(159, 15);
+            this.numUDConstPro.Name = "numUDConstPro";
+            this.numUDConstPro.ReadOnly = true;
+            this.numUDConstPro.Size = new System.Drawing.Size(80, 23);
+            this.numUDConstPro.TabIndex = 0;
+            this.numUDConstPro.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
+            this.numUDConstPro.ValueChanged += new System.EventHandler(this.numUDConstPro_ValueChanged);
+            // 
+            // label4
+            // 
+            this.label4.Font = new System.Drawing.Font("ï¼­ï¼³ æ˜Žæœ�", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
+            this.label4.ForeColor = System.Drawing.Color.Black;
+            this.label4.Location = new System.Drawing.Point(239, 18);
+            this.label4.Name = "label4";
+            this.label4.Size = new System.Drawing.Size(25, 16);
+            this.label4.TabIndex = 0;
+            this.label4.Text = "æœŸ";
+            this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
+            // 
+            // label7
+            // 
+            this.label7.Font = new System.Drawing.Font("ï¼­ï¼³ æ˜Žæœ�", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
+            this.label7.ForeColor = System.Drawing.Color.Black;
+            this.label7.Location = new System.Drawing.Point(134, 18);
+            this.label7.Name = "label7";
+            this.label7.Size = new System.Drawing.Size(25, 16);
+            this.label7.TabIndex = 0;
+            this.label7.Text = "ç¬¬";
+            this.label7.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
+            // 
+            // lblCellTotal
+            // 
+            this.lblCellTotal.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
+            this.lblCellTotal.AutoSize = true;
+            this.lblCellTotal.BackColor = System.Drawing.Color.Black;
+            this.lblCellTotal.Font = new System.Drawing.Font("ï¼­ï¼³ æ˜Žæœ�", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
+            this.lblCellTotal.ForeColor = System.Drawing.Color.White;
+            this.lblCellTotal.Location = new System.Drawing.Point(200, 628);
+            this.lblCellTotal.Name = "lblCellTotal";
+            this.lblCellTotal.Size = new System.Drawing.Size(0, 13);
+            this.lblCellTotal.TabIndex = 29;
+            // 
+            // ProgressBar
+            // 
+            this.ProgressBar.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
+            this.ProgressBar.Location = new System.Drawing.Point(5, 619);
+            this.ProgressBar.Name = "ProgressBar";
+            this.ProgressBar.Size = new System.Drawing.Size(388, 30);
+            this.ProgressBar.TabIndex = 30;
+            this.ProgressBar.Visible = false;
+            // 
+            // dgvMaster
+            // 
+            this.dgvMaster.AllowUserToAddRows = false;
+            this.dgvMaster.AllowUserToDeleteRows = false;
+            this.dgvMaster.AllowUserToResizeColumns = false;
+            this.dgvMaster.AllowUserToResizeRows = false;
+            dataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(255)))), ((int)(((byte)(192)))));
+            this.dgvMaster.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1;
+            this.dgvMaster.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
+            | System.Windows.Forms.AnchorStyles.Left) 
+            | System.Windows.Forms.AnchorStyles.Right)));
+            this.dgvMaster.BackgroundColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224)))));
+            this.dgvMaster.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
+            dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
+            dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Control;
+            dataGridViewCellStyle2.Font = new System.Drawing.Font("ï¼­ï¼³ æ˜Žæœ�", 11.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
+            dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.WindowText;
+            dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight;
+            dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
+            dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
+            this.dgvMaster.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2;
+            this.dgvMaster.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing;
+            this.dgvMaster.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
+            this.Column3,
+            this.Column1,
+            this.Column14,
+            this.Column5,
+            this.Column6,
+            this.Column7,
+            this.Column8,
+            this.Column9,
+            this.Column10,
+            this.Column2,
+            this.Column12});
+            dataGridViewCellStyle14.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
+            dataGridViewCellStyle14.BackColor = System.Drawing.SystemColors.Window;
+            dataGridViewCellStyle14.Font = new System.Drawing.Font("ï¼­ï¼³ æ˜Žæœ�", 11.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
+            dataGridViewCellStyle14.ForeColor = System.Drawing.SystemColors.ControlText;
+            dataGridViewCellStyle14.SelectionBackColor = System.Drawing.Color.LightSeaGreen;
+            dataGridViewCellStyle14.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
+            dataGridViewCellStyle14.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
+            this.dgvMaster.DefaultCellStyle = dataGridViewCellStyle14;
+            this.dgvMaster.EditMode = System.Windows.Forms.DataGridViewEditMode.EditOnEnter;
+            this.dgvMaster.Location = new System.Drawing.Point(5, 93);
+            this.dgvMaster.Name = "dgvMaster";
+            this.dgvMaster.RowHeadersVisible = false;
+            this.dgvMaster.RowHeadersWidth = 20;
+            this.dgvMaster.RowHeadersWidthSizeMode = System.Windows.Forms.DataGridViewRowHeadersWidthSizeMode.DisableResizing;
+            this.dgvMaster.RowTemplate.Height = 21;
+            this.dgvMaster.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.CellSelect;
+            this.dgvMaster.Size = new System.Drawing.Size(1330, 520);
+            this.dgvMaster.TabIndex = 5;
+            this.dgvMaster.CellDoubleClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvMaster_CellDoubleClick);
+            this.dgvMaster.SelectionChanged += new System.EventHandler(this.dgvMaster_SelectionChanged);
+            this.dgvMaster.Leave += new System.EventHandler(this.dgvMaster_Leave);
+            this.dgvMaster.MouseUp += new System.Windows.Forms.MouseEventHandler(this.dgvMaster_MouseUp);
+            // 
+            // Column3
+            // 
+            dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
+            this.Column3.DefaultCellStyle = dataGridViewCellStyle3;
+            this.Column3.Frozen = true;
+            this.Column3.HeaderText = "éƒ¨ç½²ã‚³ãƒ¼ãƒ‰";
+            this.Column3.Name = "Column3";
+            this.Column3.ReadOnly = true;
+            this.Column3.Resizable = System.Windows.Forms.DataGridViewTriState.False;
+            this.Column3.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
+            this.Column3.Visible = false;
+            this.Column3.Width = 5;
+            // 
+            // Column1
+            // 
+            dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
+            this.Column1.DefaultCellStyle = dataGridViewCellStyle4;
+            this.Column1.Frozen = true;
+            this.Column1.HeaderText = "â„–";
+            this.Column1.Name = "Column1";
+            this.Column1.ReadOnly = true;
+            this.Column1.Resizable = System.Windows.Forms.DataGridViewTriState.False;
+            this.Column1.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
+            this.Column1.Width = 50;
+            // 
+            // Column14
+            // 
+            dataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
+            this.Column14.DefaultCellStyle = dataGridViewCellStyle5;
+            this.Column14.Frozen = true;
+            this.Column14.HeaderText = "éƒ¨ã€€ç½²";
+            this.Column14.Name = "Column14";
+            this.Column14.ReadOnly = true;
+            this.Column14.Resizable = System.Windows.Forms.DataGridViewTriState.False;
+            this.Column14.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
+            this.Column14.Width = 280;
+            // 
+            // Column5
+            // 
+            dataGridViewCellStyle6.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
+            dataGridViewCellStyle6.Font = new System.Drawing.Font("ï¼­ï¼³ ï¼°æ˜Žæœ�", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
+            this.Column5.DefaultCellStyle = dataGridViewCellStyle6;
+            this.Column5.Frozen = true;
+            this.Column5.HeaderText = "å�—æ³¨é‡‘é¡�";
+            this.Column5.Name = "Column5";
+            this.Column5.ReadOnly = true;
+            this.Column5.Resizable = System.Windows.Forms.DataGridViewTriState.False;
+            this.Column5.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
+            this.Column5.Width = 140;
+            // 
+            // Column6
+            // 
+            dataGridViewCellStyle7.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
+            dataGridViewCellStyle7.Font = new System.Drawing.Font("ï¼­ï¼³ ï¼°æ˜Žæœ�", 9F, System.Drawing.FontStyle.Bold);
+            this.Column6.DefaultCellStyle = dataGridViewCellStyle7;
+            this.Column6.Frozen = true;
+            this.Column6.HeaderText = "ä¼šç¤¾çµŒè²»";
+            this.Column6.Name = "Column6";
+            this.Column6.ReadOnly = true;
+            this.Column6.Resizable = System.Windows.Forms.DataGridViewTriState.False;
+            this.Column6.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
+            this.Column6.Width = 120;
+            // 
+            // Column7
+            // 
+            dataGridViewCellStyle8.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
+            dataGridViewCellStyle8.Font = new System.Drawing.Font("ï¼­ï¼³ ï¼°æ˜Žæœ�", 9F, System.Drawing.FontStyle.Bold);
+            this.Column7.DefaultCellStyle = dataGridViewCellStyle8;
+            this.Column7.Frozen = true;
+            this.Column7.HeaderText = "éƒ¨ç½²çµŒè²»";
+            this.Column7.Name = "Column7";
+            this.Column7.ReadOnly = true;
+            this.Column7.Resizable = System.Windows.Forms.DataGridViewTriState.False;
+            this.Column7.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
+            this.Column7.Width = 120;
+            // 
+            // Column8
+            // 
+            dataGridViewCellStyle9.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
+            dataGridViewCellStyle9.Font = new System.Drawing.Font("ï¼­ï¼³ ï¼°æ˜Žæœ�", 9F, System.Drawing.FontStyle.Bold);
+            this.Column8.DefaultCellStyle = dataGridViewCellStyle9;
+            this.Column8.Frozen = true;
+            this.Column8.HeaderText = "å–¶æ¥­çµŒè²»";
+            this.Column8.Name = "Column8";
+            this.Column8.ReadOnly = true;
+            this.Column8.Resizable = System.Windows.Forms.DataGridViewTriState.False;
+            this.Column8.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
+            this.Column8.Width = 120;
+            // 
+            // Column9
+            // 
+            dataGridViewCellStyle10.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
+            dataGridViewCellStyle10.Font = new System.Drawing.Font("ï¼­ï¼³ ï¼°æ˜Žæœ�", 9F, System.Drawing.FontStyle.Bold);
+            this.Column9.DefaultCellStyle = dataGridViewCellStyle10;
+            this.Column9.Frozen = true;
+            this.Column9.HeaderText = "ç·�æ”¯æ‰•é¡�";
+            this.Column9.Name = "Column9";
+            this.Column9.ReadOnly = true;
+            this.Column9.Resizable = System.Windows.Forms.DataGridViewTriState.False;
+            this.Column9.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
+            this.Column9.Width = 120;
+            // 
+            // Column10
+            // 
+            dataGridViewCellStyle11.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
+            dataGridViewCellStyle11.Font = new System.Drawing.Font("ï¼­ï¼³ ï¼°æ˜Žæœ�", 9F, System.Drawing.FontStyle.Bold);
+            this.Column10.DefaultCellStyle = dataGridViewCellStyle11;
+            this.Column10.Frozen = true;
+            this.Column10.HeaderText = "ç²—ã€€åˆ©";
+            this.Column10.Name = "Column10";
+            this.Column10.ReadOnly = true;
+            this.Column10.Resizable = System.Windows.Forms.DataGridViewTriState.False;
+            this.Column10.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
+            this.Column10.Width = 120;
+            // 
+            // Column2
+            // 
+            dataGridViewCellStyle12.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
+            dataGridViewCellStyle12.Font = new System.Drawing.Font("ï¼­ï¼³ ï¼°æ˜Žæœ�", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
+            this.Column2.DefaultCellStyle = dataGridViewCellStyle12;
+            this.Column2.Frozen = true;
+            this.Column2.HeaderText = "çµ¦ä¸Žé¡�";
+            this.Column2.Name = "Column2";
+            this.Column2.ReadOnly = true;
+            this.Column2.Resizable = System.Windows.Forms.DataGridViewTriState.False;
+            this.Column2.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
+            this.Column2.Width = 120;
+            // 
+            // Column12
+            // 
+            dataGridViewCellStyle13.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
+            dataGridViewCellStyle13.Font = new System.Drawing.Font("ï¼­ï¼³ ï¼°æ˜Žæœ�", 9F, System.Drawing.FontStyle.Bold);
+            this.Column12.DefaultCellStyle = dataGridViewCellStyle13;
+            this.Column12.Frozen = true;
+            this.Column12.HeaderText = "ç´”åˆ©ç›Š";
+            this.Column12.Name = "Column12";
+            this.Column12.ReadOnly = true;
+            this.Column12.Resizable = System.Windows.Forms.DataGridViewTriState.False;
+            this.Column12.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
+            this.Column12.Width = 120;
+            // 
+            // FrmDepExpenssList
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
+            this.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
+            this.BackColor = System.Drawing.Color.Black;
+            this.ClientSize = new System.Drawing.Size(1340, 657);
+            this.Controls.Add(this.ProgressBar);
+            this.Controls.Add(this.lblCellTotal);
+            this.Controls.Add(this.dgvMaster);
+            this.Controls.Add(this.groupBox1);
+            this.Controls.Add(this.label1);
+            this.Controls.Add(this.btnEnd);
+            this.Font = new System.Drawing.Font("ï¼­ï¼³ æ˜Žæœ�", 11.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
+            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Fixed3D;
+            this.KeyPreview = true;
+            this.MinimizeBox = false;
+            this.Name = "FrmDepExpenssList";
+            this.ShowIcon = false;
+            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
+            this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.FrmDepExpenssList_FormClosing);
+            this.Load += new System.EventHandler(this.FrmConstructionBaseInfoList_Load);
+            this.SizeChanged += new System.EventHandler(this.FrmDepExpenssList_SizeChanged);
+            this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.FrmDepExpenssList_KeyDown);
+            this.groupBox1.ResumeLayout(false);
+            ((System.ComponentModel.ISupportInitialize)(this.numUDConstPro)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.dgvMaster)).EndInit();
+            this.ResumeLayout(false);
+            this.PerformLayout();
+
+        }
+
+        #endregion
+
+        private System.Windows.Forms.Button btnEnd;
+        private System.Windows.Forms.Label label1;
+        private System.Windows.Forms.GroupBox groupBox1;
+        private System.Windows.Forms.Label label7;
+        private CustomControls.DataGridViewEX dgvMaster;
+        private System.Windows.Forms.NumericUpDown numUDConstPro;
+        private System.Windows.Forms.Label label4;
+        private System.Windows.Forms.Label label2;
+        private System.Windows.Forms.Label lblCellTotal;
+        private System.Windows.Forms.ProgressBar ProgressBar;
+        private System.Windows.Forms.DataGridViewTextBoxColumn Column3;
+        private System.Windows.Forms.DataGridViewTextBoxColumn Column1;
+        private System.Windows.Forms.DataGridViewTextBoxColumn Column14;
+        private System.Windows.Forms.DataGridViewTextBoxColumn Column5;
+        private System.Windows.Forms.DataGridViewTextBoxColumn Column6;
+        private System.Windows.Forms.DataGridViewTextBoxColumn Column7;
+        private System.Windows.Forms.DataGridViewTextBoxColumn Column8;
+        private System.Windows.Forms.DataGridViewTextBoxColumn Column9;
+        private System.Windows.Forms.DataGridViewTextBoxColumn Column10;
+        private System.Windows.Forms.DataGridViewTextBoxColumn Column2;
+        private System.Windows.Forms.DataGridViewTextBoxColumn Column12;
+    }
+}
\ No newline at end of file
Index: trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/DepExpenssList/FrmDepExpenssList.resx
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/DepExpenssList/FrmDepExpenssList.resx	(nonexistent)
+++ trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/DepExpenssList/FrmDepExpenssList.resx	(revision 16)
@@ -0,0 +1,153 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <metadata name="Column3.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="Column1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="Column14.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="Column5.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="Column6.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="Column7.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="Column8.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="Column9.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="Column10.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="Column2.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="Column12.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+</root>
\ No newline at end of file
Index: trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/DepExpenssList/FrmDepExpenssListAuxiliary.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/DepExpenssList/FrmDepExpenssListAuxiliary.cs	(nonexistent)
+++ trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/DepExpenssList/FrmDepExpenssListAuxiliary.cs	(revision 16)
@@ -0,0 +1,1178 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Windows.Forms;
+using System.Collections;
+using System.Diagnostics;
+using System.Threading;
+
+using log4net;
+using log4net.Appender;
+using log4net.Repository.Hierarchy;
+
+using ProcessManagement.Common;
+using ProcessManagement.DB.IOAccess;
+using ProcessManagement.DataModel;
+using ProcessManagement.DB.Core;
+using ProcessManagement.Forms.CustomControls;
+using ProcessManagement.Forms.ControlsAction;
+//*---------------------------- •”��•ÊŒo”ïˆê——‰æ–Ê --------------------------*
+//  2016/09/23  Ver1.0.0.0      Create Source           
+//
+//
+//
+//*----------------------------------------------------------------------------*
+namespace ProcessManagement.Forms.DataEntry
+{
+    partial class FrmDepExpenssList
+    {
+        #region ’è�”
+        private const string StaticSQL1 = "SELECT A.ConstructionCode, A.ConstructionPeriod, B.DetailString, A.SalesPersonCode, A.ConstructionPersonCode, A.ConstructionStatusFlg ";
+        private const string StaticSQL2 = "From ConstructionBaseInfo A, ConstructionBaseInfoDetail B";
+        #endregion
+
+        #region •Ï�”
+        #endregion
+
+        #region ƒvƒ�ƒpƒeƒB
+        #endregion
+
+        #region •\Ž¦ƒIƒuƒWƒFƒNƒg‚ÌŽæ“¾
+        /// <summary>
+        /// •\Ž¦ƒIƒuƒWƒFƒNƒg‚ÌŽæ“¾
+        /// </summary>
+        private void SetDisplayObject()
+        {
+            // ƒtƒH�[ƒ€ƒTƒCƒYŽæ“¾
+            m_FormWidthSize = this.Width;
+
+            DataGridView dgv = dgvMaster;
+            // ƒOƒŠƒbƒh‚Ì�î•ñ‚ðŽæ“¾‚·‚é
+            m_GridWidthSize = dgv.Width;
+
+            // ƒOƒŠƒbƒhƒJƒ‰ƒ€•�Žæ“¾
+            int ColCount = Enum.GetNames(typeof(DispColumn)).Length;
+            m_CellSize = new int[ColCount];
+            foreach (DataGridViewColumn wrkCell in dgvMaster.Columns)
+            {
+                m_CellSize[wrkCell.Index] = wrkCell.Width;
+            }
+        }
+        #endregion
+
+        #region ŽŸƒvƒ�ƒZƒX‹N“®
+        /// <summary>
+        /// �HŽ–ˆê——‚æ‚è‹N“®‚·‚éƒvƒ�ƒZƒX‘I‘ð�ˆ—�
+        /// </summary>
+        /// <param name="para_ConstructionCode"></param>
+        private void SubProcessExecute(int para_ConstructionCode = 0)
+        {
+            try
+            {
+                int NowPoint = ClsExcute.GetNowProcessPoint();
+                // Œ»�Ý�Ý’è’lƒNƒŠƒA
+                ClsExcute.ClearSaveParameter(NowPoint);
+                // ----- ‰æ–Ê�î•ñ‘Þ”ð
+                // ŒŸ�õ”N
+                ClsExcute.ProcControlPara[NowPoint].StringSaveParameter.Add(numUDConstPro.Value.ToString());
+                // ƒ\�[ƒg�ó‘Ô
+                if (dgvMaster.SortedColumn != null)
+                {
+                    ClsExcute.ProcControlPara[NowPoint].IntSaveParameter.Add((int)dgvMaster.SortedColumn.Index);
+                    ClsExcute.ProcControlPara[NowPoint].IntSaveParameter.Add((int)dgvMaster.SortOrder);
+                }
+
+                // ŽŸ‹N“®ƒvƒ�ƒZƒXƒZƒbƒg
+                NowPoint = ClsExcute.NextProcess((int)(int)ClsExcute.ProcessExecuteNo.ConstructionLedger);
+                // ‘I‘ð�HŽ–”Ô�†ƒZƒbƒg
+                ClsExcute.ProcControlPara[NowPoint].IntExecParameter.Add(para_ConstructionCode);
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("ƒVƒXƒeƒ€ƒGƒ‰�[�F{0}�F{1}", CommonMotions.GetMethodName(), ex.Message);
+            }
+            finally
+            {
+                // ƒNƒ��[ƒY�ˆ—�‚ðOFF‚É‚·‚é�B
+                m_CloseingProcessOff = true;
+                // ‰æ–ÊƒNƒ��[ƒY
+                this.Close();
+            }
+        }
+        #endregion
+
+        #region ŒŸ�õSQL‚ÌƒZƒLƒ…ƒŠƒeƒB”»’è•”•ª‚ð�ì�¬‚·‚é
+        /// <summary>
+        /// ŒŸ�õSQL‚ÌƒZƒLƒ…ƒŠƒeƒB”»’è•”•ª‚ð�ì�¬‚·‚é
+        /// </summary>
+        /// <param name="strSQL"></param>
+        private void CreateSecuritySQL(ref List<string> strSecurity)
+        {
+            string strSQL1 = string.Empty;
+            string strSQL2 = string.Empty;
+            try
+            {
+                // ‘�–±•”�Š‘®ŽÒ‚Íƒf�[ƒ^ŽQ�Æ�o—ˆ‚é�ˆ—�‚ª‚ ‚é
+                if (ClsSecurityPermission.PermitGeneralAffairsDevision(m_ExecuteFlg)) return;
+
+                // ƒVƒXƒeƒ€Œ ŒÀ‚É‚æ‚Á‚Äƒf�[ƒ^ƒAƒNƒZƒX‚É�§ŒÀ‚ª‚ ‚é
+                if (CommonMotions.LoginUserData.SecurityManagement == CommonDefine.AdminSecurityManagement)
+                {
+                    // ƒVƒXƒeƒ€ŠÇ—�ŽÒ�i‚·‚×‚Ä‘Î�Û�j
+                }
+                else if (CommonMotions.LoginUserData.SecurityManagement == CommonDefine.SystemManageDiv[(int)CommonDefine.SysManaDivNo.PresidentAuthority].Key)
+                {
+                    // �Å�‚‹@–§ŠÇ—�ŽÒ�i‚·‚×‚Ä‘Î�Û�j
+                }
+                else if (CommonMotions.LoginUserData.SecurityManagement == CommonDefine.SystemManageDiv[(int)CommonDefine.SysManaDivNo.SupervisorAuthority].Key)
+                {
+                    // “�Š‡‹@–§ŠÇ—�ŽÒ�i‹@”\�§ŒÀ�j
+                }
+                else if (CommonMotions.LoginUserData.SecurityManagement == CommonDefine.SystemManageDiv[(int)CommonDefine.SysManaDivNo.SuperiorAuthority].Key)
+                {
+                    // ‹@–§ŠÇ—�ŽÒ�iŽ©•”��‚Ì‚Ý�j
+                    strSQL1 = string.Format(" AND C.DepartmentCode = {0}", CommonMotions.LoginUserData.DepartmentCode);
+                    strSQL2 = string.Format(" AND (A.CREATORCODE = C.PERSONCODE AND C.DEPARTMENTCODE = {0})", CommonMotions.LoginUserData.DepartmentCode);
+                    strSecurity.Add(strSQL1);
+                    strSecurity.Add(strSQL2);
+                }
+                else if (CommonMotions.LoginUserData.SecurityManagement == CommonDefine.SystemManageDiv[(int)CommonDefine.SysManaDivNo.UserAuthority].Key)
+                {
+                    // ˆê”ÊŽg—pŽÒ�iŽ©ƒf�[ƒ^‚Ì‚Ý�j
+                    //strSQL1 = string.Format(" AND C.PERSONCODE = {0}", CommonMotions.LoginUserData.PersonCode);
+                    strSQL1 = string.Format(" AND (A.CONSTRUCTIONPERSONCODE = {0} OR A.CONSTRUCTIONINSTRUCTOR = {0})"
+                                                                        , CommonMotions.LoginUserData.PersonCode);
+                    //strSQL2 = string.Format(" AND (A.CREATORCODE = C.PERSONCODE AND C.DEPARTMENTCODE = {0})", CommonMotions.LoginUserData.DepartmentCode);
+                    strSQL2 = " AND A.CONSTRUCTIONCODE = D.CONSTRUCTIONCODE";
+                    strSQL2 += string.Format(" AND (D.CONSTRUCTIONPERSONCODE = {0} OR D.CONSTRUCTIONINSTRUCTOR = {0} OR D.CONSTRSUBPERSONCODE = {0})"
+                                                                        , CommonMotions.LoginUserData.PersonCode);
+                    strSecurity.Add(strSQL1);
+                    strSecurity.Add(strSQL2);
+                }
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("ƒVƒXƒeƒ€ƒGƒ‰�[�F{0}�F{1}�F{2}", ex.Message, strSQL1, strSQL2);
+            }
+        }
+        #endregion
+
+        #region ‚c‚aŽæ“¾�‡”Ô
+        /// <summary>
+        /// ‚c‚aŽæ“¾�‡”Ô
+        /// </summary>
+        private enum DBGetData
+        {
+            DepartmentCode = 0,
+            DepartmentString,
+            DisplayOrder,
+            OrdersDecisionprice,
+            CompanyExpenses,
+            DepartmentExpenses,
+            SalesExpenses,
+            TotalPayment,
+            GrossProfit,
+            Allowance,
+            NetProfit,
+        }
+        #endregion
+
+        #region ƒf�[ƒ^Žæ“¾SQL�ì�¬
+        /// <summary>
+        /// •\Ž¦—pƒf�[ƒ^Žæ“¾SQL�ì�¬
+        /// </summary>
+        private void CreateInitSQL(ref string strSQL)
+        {
+            try
+            {
+                // SQL‚ÉƒAƒNƒZƒX�§ŒÀ‚ð‚©‚¯‚é
+                List<string> strSecurity = new List<string>();
+                CreateSecuritySQL(ref strSecurity);
+
+                int NotOrder = CommonDefine.ProjectsStatus.First(x => x.Value.Equals("”ñ Žó ’�")).Key;
+                // ----- ‚r‚p‚k�ì�¬
+                // ‘¶�Ý�Ú�×‘ä’ ƒf�[ƒ^ŒŸ�õ
+                strSQL = "(SELECT C.DEPARTMENTCODE, D.DEPARTMENTSTRING, D.DISPLAYORDER,";
+                strSQL += " SUM(A.ORDERSDECISIONPRICE), SUM(A.COMPANYEXPENSES), SUM(A.DEPARTMENTEXPENSES), SUM(A.SALESEXPENSES),";
+                strSQL += " SUM(A.TOTALPAYMENT), SUM(A.GROSSPROFIT), SUM(A.ALLOWANCE), SUM(A.NETPROFIT)";
+                strSQL += " FROM CONSTRUCTIONLEDGER A, CONSTRUCTIONBASEINFO B, PERSONINCHARGEMASTER C, DEPARTMENTMASTER D";
+                strSQL += " WHERE A.CONSTRUCTIONCODE = B.CONSTRUCTIONCODE";
+                strSQL += string.Format(" AND A.CONSTRUCTIONPERIOD = {0}", numUDConstPro.Value);
+                strSQL += " AND B.CONSTRUCTIONPERSONCODE = C.PERSONCODE";
+                strSQL += string.Format(" AND B.CONSTRUCTIONSTATUSFLG != {0}", NotOrder);
+                strSQL += string.Format(" AND B.TyingFlg != {0}", (int)CommonDefine.BaseInfoTyingFlg.Tying);
+                strSQL += " AND C.DEPARTMENTCODE = D.DEPARTMENTCODE";
+                strSQL += " GROUP BY C.DEPARTMENTCODE, D.DEPARTMENTSTRING, D.DISPLAYORDER)";
+                strSQL += " ORDER BY 3 ASC";
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("ƒVƒXƒeƒ€ƒGƒ‰�[�F{0}�F{1}", ex.Message, strSQL);
+            }
+        }
+        #endregion
+
+        #region ƒOƒŠƒbƒh�sƒf�[ƒ^ƒZƒbƒg
+        /// <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)
+        {
+            try
+            {
+                DataGridView dgv = dgvMaster;
+
+                int TotalColCnt = Enum.GetNames(typeof(DBGetData)).Length;
+                int[] wrkArray = new int[TotalColCnt];
+                Array.Clear(wrkArray, 0, wrkArray.Length);
+
+                for (int i = (int)DBGetData.OrdersDecisionprice; i <= (int)DBGetData.NetProfit; i++)
+                {
+                    wrkArray[i] = CommonMotions.cnvInt(objwrk[i]);
+                }
+
+
+                dgv.Rows.Add(objwrk[(int)DBGetData.DepartmentCode],
+                                    ino++,
+                                    CommonMotions.cnvString(objwrk[(int)DBGetData.DepartmentString]),
+                                    wrkArray[(int)DBGetData.OrdersDecisionprice].ToString("#,0"),
+                                    wrkArray[(int)DBGetData.CompanyExpenses].ToString("#,0"),
+                                    wrkArray[(int)DBGetData.DepartmentExpenses].ToString("#,0"),
+                                    wrkArray[(int)DBGetData.SalesExpenses].ToString("#,0"),
+                                    wrkArray[(int)DBGetData.TotalPayment].ToString("#,0"),
+                                    wrkArray[(int)DBGetData.GrossProfit].ToString("#,0"),
+                                    wrkArray[(int)DBGetData.Allowance].ToString("#,0"),
+                                    wrkArray[(int)DBGetData.NetProfit].ToString("#,0")
+                            );
+
+                TotalArea[(int)DispColumn.OrdersDecisionPrice] += wrkArray[(int)DBGetData.OrdersDecisionprice];
+                TotalArea[(int)DispColumn.CompanyExpenses] += wrkArray[(int)DBGetData.CompanyExpenses];
+                TotalArea[(int)DispColumn.DepartmentExpenses] += wrkArray[(int)DBGetData.DepartmentExpenses];
+                TotalArea[(int)DispColumn.SalesExpenses] += wrkArray[(int)DBGetData.SalesExpenses];
+                TotalArea[(int)DispColumn.TotalPayment] += wrkArray[(int)DBGetData.TotalPayment];
+                TotalArea[(int)DispColumn.GrossProfit] += wrkArray[(int)DBGetData.GrossProfit];
+                TotalArea[(int)DispColumn.Allowance] += wrkArray[(int)DBGetData.Allowance];
+                TotalArea[(int)DispColumn.NetProfit] += wrkArray[(int)DBGetData.NetProfit];
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("ƒVƒXƒeƒ€ƒGƒ‰�[�F{0}", ex.Message);
+            }
+        }
+        #endregion
+
+        #region ƒf�[ƒ^•\Ž¦�ˆ—�
+        /// <summary>
+        /// ˆê——ƒf�[ƒ^•\Ž¦�ˆ—�
+        /// </summary>
+        private void DataDisplay()
+        {
+            IOConstructionLedger LedgerDB = new IOConstructionLedger();
+            DataGridView dgv = dgvMaster;
+            ProgressBar prgber = ProgressBar;
+            try
+            {
+                dgv.SuspendLayout();
+
+                dgv.Rows.Clear();
+                // ƒvƒ�ƒOƒŒƒXƒo�[‚Ì�‰Šú‰»
+                prgber.Visible = true;
+                prgber.Minimum = 0;
+                prgber.Maximum = 10;
+                prgber.Value = 0;
+
+                string strSQL = "";
+                // SQL�ì�¬
+                CreateInitSQL(ref strSQL);
+
+                ArrayList arData = new ArrayList();
+                string FlgString = string.Empty;
+                // �HŽ–�Ú�×‘ä’ Žæ“¾
+                if (!LedgerDB.ExecuteReader(strSQL, ref arData)) return;
+
+                // “Ç�žŽžƒf�[ƒ^ƒJƒEƒ“ƒgŽæ“¾
+                m_initDataCount = arData.Count;
+                if (arData.Count == 0) return;
+
+                // ProgressBar‚Ì’l‚ð•Ï�X‚·‚é
+                prgber.Maximum = arData.Count + 2;
+                prgber.Value++;
+                prgber.Update();
+
+                // �‡ŒvƒGƒŠƒA
+                int TotalColCnt = Enum.GetNames(typeof(DispColumn)).Length;
+                int[] TotalArea = new int[TotalColCnt];
+                Array.Clear(TotalArea, 0, TotalArea.Length);
+
+                // ƒf�[ƒ^•\Ž¦
+                int ino = 1;
+                int StatusFlg = -1;
+                bool initFlg = true;
+                string strStatus = string.Empty;
+                // ----- Ž{�H’†ƒf�[ƒ^•\Ž¦
+                foreach (object[] objwrk in arData)
+                {
+                    // ƒOƒŠƒbƒh‚Öƒf�[ƒ^•\Ž¦
+                    GridDataSet(objwrk, ref ino, ref TotalArea, ref initFlg, ref StatusFlg);
+
+                    // ProgressBar‚Ì’l‚ð•Ï�X‚·‚é
+                    prgber.Value++;
+                    prgber.Update();
+                }
+
+                // ----- �‡Œv•\Ž¦
+                if (arData.Count != 0)
+                {
+                    dgv.Rows.Add();       // ‹ó�s
+
+                    // �‡Œv�s•\Ž¦
+                    int TotalRow = dgv.Rows.Add(1);
+                    dgv.Rows[TotalRow].Cells[(int)DispColumn.DepartmentName].Value = s_TotalTitleArray[(int)RowTitleNum.AllTotal];
+                    // �s‚Ì�F‚ð•Ï‚¦‚é
+                    SetRowColor(dgv.Rows[TotalRow], s_RowTotalBackColor, s_RowTotalForeColor);
+
+                    // �”’l•\Ž¦
+                    for (int i = (int)DispColumn.OrdersDecisionPrice; i <= TotalColCnt; 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);
+            }
+            finally
+            {
+                // ƒf�[ƒ^‚ª‘½‚­‚È‚ê‚Îƒ\�[ƒg‚Å‚«‚é
+                if (CommonDefine.s_MaxInitLineCount < dgv.RowCount)
+                {
+                    foreach (DataGridViewColumn wrkCol in dgv.Columns)
+                        wrkCol.SortMode = DataGridViewColumnSortMode.Automatic;
+                }
+                else
+                {
+                    dgv.RowCount += (CommonDefine.s_MaxInitLineCount - m_initDataCount);
+                }
+
+                LedgerDB.close(); LedgerDB = null;
+                dgv.ResumeLayout();
+
+                // ProgressBar‚Ì’l‚ð•Ï�X‚·‚é
+                prgber.Value = prgber.Maximum;
+                prgber.Update();
+                prgber.Visible = false;
+            }
+        }
+        #endregion
+
+        #region �‰ŠúŽžƒf�[ƒ^Žæ“¾
+        /// <summary>
+        /// �‰ŠúŽžƒf�[ƒ^Žæ“¾
+        /// </summary>
+        private void InitDataLoad()
+        {
+            try
+            {
+                m_initDataLoad = true;
+
+                // ----- ‘Þ”ðŒŸ�õƒf�[ƒ^‚ª‚ ‚Á‚½�ê�‡‚ÍƒZƒbƒg‚·‚é
+                int NowPoint = ClsExcute.GetNowProcessPoint();
+                if (ClsExcute.ProcControlPara[NowPoint].StringSaveParameter.Count > 0)
+                {
+                    // ”N“x
+                    numUDConstPro.Value = CommonMotions.cnvInt(ClsExcute.ProcControlPara[NowPoint].StringSaveParameter[0]);
+                }
+
+                // ƒf�[ƒ^•\Ž¦
+                DataDisplay();
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("ƒVƒXƒeƒ€ƒGƒ‰�[�F{0}�F{1}", CommonMotions.GetMethodName(), ex.Message);
+            }
+        }
+        #endregion
+
+        #region Ž–‹ÆŠú�‰ŠúƒZƒbƒg
+        /// <summary>
+        /// Ž–‹ÆŠú�‰ŠúƒZƒbƒg
+        /// </summary>
+        private void SetInitPeriod()
+        {
+            try
+            {
+                m_initDataLoad = true;
+                // ƒ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;
+                m_initDataLoad = false;
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("ƒVƒXƒeƒ€ƒGƒ‰�[�F{0}�F{1}", CommonMotions.GetMethodName(), ex.Message);
+            }
+            finally
+            {
+                m_initDataLoad = false;
+            }
+        }
+        #endregion
+
+        #region ‰æ–ÊƒTƒCƒY•Ï�XŽž‚ÌƒZƒ‹ƒTƒCƒY•Ï�X
+        /// <summary>
+        /// ‰æ–ÊƒTƒCƒY•Ï�XŽž‚ÌƒZƒ‹ƒTƒCƒY•Ï�X
+        /// </summary>
+        private void CellSizeChangesWhenChangingScreenSize(bool bNormal)
+        {
+            try
+            {
+                DataGridView dgv = dgvMaster;
+                int idifference = 0;
+                // �Å‘å‰»‚Ì�ê�‡
+                if (!bNormal)
+                {
+                    // ƒJƒ‰ƒ€‚ÌƒTƒCƒY‚ð‹�‚ß‚é
+                    int ColumnCount = 0;
+                    int TotalWidth = 0;
+                    int NotVisibleSize = 0;
+                    for (int i = 0; i < m_CellSize.Length; i++)
+                    {
+                        TotalWidth += m_CellSize[i];
+                        if (dgv.Columns[i].Visible)
+                        {
+                            ColumnCount++;
+                        }
+                        else
+                        {
+                            NotVisibleSize += m_CellSize[i];
+                        }
+                    }
+
+                    // ‘å‚«‚­‚È‚Á‚½ƒTƒCƒY
+                    //int formdiff = (dgv.Width - (m_GridWidthSize - NotVisibleSize));
+                    int formdiff = (dgv.Width - m_GridWidthSize);
+
+                    idifference = formdiff / ColumnCount;
+                }
+
+                for (int i = 0; i < dgv.ColumnCount; i++)
+                {
+                    DataGridViewColumn wrkCol = dgv.Columns[i];
+                    wrkCol.Width = m_CellSize[i] + idifference;
+                }
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("ƒVƒXƒeƒ€ƒGƒ‰�[�F{0}�F{1}", CommonMotions.GetMethodName(), ex.Message);
+            }
+        }
+        #endregion
+
+        #region �s�F�Ý’è
+        /// <summary>
+        /// �s‚ð‘I‘ð�F‚É‚·‚é
+        /// </summary>
+        /// <param name="CurrentRow"></param>
+        private void SetRowColor(DataGridViewRow CurRow, Color BackColor, Color ForeColor)
+        {
+            try
+            {
+                DataGridView dgv = dgvMaster;
+
+                // �s‚Ì�F‚ð•Ï‚¦‚é
+                for (int i = 0; i < dgv.ColumnCount; i++)
+                {
+                    CurRow.Cells[i].Style.BackColor = BackColor;
+                    CurRow.Cells[i].Style.ForeColor = ForeColor;
+                }
+            }
+            catch (System.Exception ex)
+            {
+                logger.ErrorFormat("ƒVƒXƒeƒ€ƒGƒ‰�[�F{0}�F{1}", CommonMotions.GetMethodName(), ex.Message);
+            }
+
+        }
+        #endregion
+
+        #region �s‘I‘ð�F
+        /// <summary>
+        /// �s‚ð‘I‘ð�F‚É‚·‚é
+        /// </summary>
+        /// <param name="CurrentRow"></param>
+        private void SelectRowChangeColor(int CurrentRow)
+        {
+            try
+            {
+                DataGridView dgv = dgvMaster;
+                DataGridViewRow CurRow = dgv.Rows[CurrentRow];
+
+                // �s‚Ì�F‚ð•Ï‚¦‚é
+                SetRowColor(CurRow, s_RowSelectBackColor, s_RowSelectForeColor);
+            }
+            catch (System.Exception ex)
+            {
+                logger.ErrorFormat("ƒVƒXƒeƒ€ƒGƒ‰�[�F{0}�F{1}", CommonMotions.GetMethodName(), ex.Message);
+            }
+
+        }
+        #endregion
+
+        #region �sƒfƒtƒHƒ‹ƒg�F
+        /// <summary>
+        /// �s‚ðƒfƒtƒHƒ‹ƒg�F‚É‚·‚é
+        /// </summary>
+        /// <param name="BeforeGridRow"></param>
+        private void DefaultRowChangeColor(int CurrentRow)
+        {
+            try
+            {
+                DataGridView dgv = dgvMaster;
+                DataGridViewRow CurRow = dgv.Rows[CurrentRow];
+
+                Color SetBackColor = Color.White;
+                Color SetForeColor = Color.Black;
+
+                if ((CurrentRow % 2) != 0)
+                {
+                    SetBackColor = dgv.AlternatingRowsDefaultCellStyle.BackColor;
+                    SetForeColor = dgv.AlternatingRowsDefaultCellStyle.ForeColor;
+                }
+                else
+                {
+                    SetBackColor = dgv.RowsDefaultCellStyle.BackColor;
+                    SetForeColor = dgv.RowsDefaultCellStyle.ForeColor;
+                }
+                // �s‚Ì�F‚ð•Ï‚¦‚é
+                // �s‚Ì�F‚ð•Ï‚¦‚é
+                SetRowColor(CurRow, SetBackColor, SetForeColor);
+            }
+            catch (System.Exception ex)
+            {
+                logger.ErrorFormat("ƒVƒXƒeƒ€ƒGƒ‰�[�F{0}�F{1}", CommonMotions.GetMethodName(), ex.Message);
+            }
+        }
+        #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 �HŽ–�î•ñ‚æ‚è‚ÌŠúŽñ“ú�EŠú––“ú‚ð‹�‚ß‚é
+        /// <summary>
+        /// �HŽ–�î•ñ‚æ‚è‚ÌŠúŽñ“ú�EŠú––“ú‚ð‹�‚ß‚é
+        /// </summary>
+        /// <param name="dtStart"></param>
+        /// <param name="dtEnd"></param>
+        private void CreateConstStartAndEndDate(ref DateTime dtStart, ref DateTime dtEnd, int PersonCode = 0)
+        {
+            IOConstructionBaseInfo BaseDB = new IOConstructionBaseInfo();
+            try
+            {
+                string strSQL = "SELECT MIN(B.CONSTRUCTIONPERIODSTART) ,MAX(B.CONSTRUCTIONPERIODEND)";
+                strSQL += " FROM CONSTRUCTIONLEDGER A, CONSTRUCTIONBASEINFO B";
+                strSQL += " WHERE A.CONSTRUCTIONCODE = B.CONSTRUCTIONCODE";
+                strSQL += string.Format(" AND A.CONSTRUCTIONPERIOD = {0}", numUDConstPro.Value);
+                if (PersonCode != 0) strSQL += string.Format(" AND B.CONSTRSUBPERSONCODE = {0}", PersonCode);
+                strSQL += " AND TO_CHAR(B.CONSTRUCTIONPERIODSTART,'YYYY/MM/DD') != '0001/01/01'";
+                strSQL += " AND TO_CHAR(B.CONSTRUCTIONPERIODEND,'YYYY/MM/DD') != '0001/01/01'";
+                ArrayList arList = new ArrayList();
+                if (!BaseDB.ExecuteReader(strSQL, ref arList)) return;
+
+                object[] objList = (object[])arList[0];
+
+                dtStart = CommonMotions.cnvDate(objList[0]);
+                dtEnd = CommonMotions.cnvDate(objList[2]);
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("ƒVƒXƒeƒ€ƒGƒ‰�[�F{0}�F{1}", CommonMotions.GetMethodName(), ex.Message);
+            }
+            finally
+            {
+                BaseDB.close(); BaseDB = null;
+            }
+        }
+        #endregion
+
+        #region �HŽ–‚É‘®‚µ‚Ä‚¢‚È‚¢Œo”ï‚ð•\Ž¦‚·‚é
+        /// <summary>
+        /// �HŽ–‚É‘®‚µ‚Ä‚¢‚È‚¢Œo”ï‚ð•\Ž¦‚·‚é
+        /// </summary>
+        private int SetOtherCost()
+        {
+            try
+            {
+                //// •”��ƒR�[ƒhŽæ“¾
+                //int DepartmentCode = GetDepartmentCode();
+                //// ’S“–ŽÒƒR�[ƒhŽæ“¾
+                //int PersonCode = GetConstructionPersonCode();
+
+                //// “–ŠúŠúŽñ“ú�EŠú––“ú‚ðŽæ“¾
+                //DateTime dtDefaultStart = DateTime.MinValue;
+                //DateTime dtDefaultEnd = DateTime.MinValue;
+                //CreateDefaultStartAndEndDate(ref dtDefaultStart, ref dtDefaultEnd);
+
+                //int ArrayCount = Common.CommonDefine.CostDataNoString.Length;
+                //int[] CostValue = new int[ArrayCount];
+                //// •\Ž¦ƒGƒŠƒAƒNƒŠƒA
+                //Array.Clear(CostValue, 0, CostValue.Length);
+
+                //// ’S“–ŽÒ‚ªƒZƒbƒg‚³‚ê‚Ä‚¢‚ê‚Î’S“–ŽÒ�AˆÈŠO‚Í‘Î�Û‘S‚Ä‚ð�WŒv‚·‚é
+                //if (PersonCode != 0)
+                //{
+                //    // ’S“–ŽÒ‚ª‘I‘ð‚³‚ê‚Ä‚¢‚ê‚Î‚»‚ÌŒo”ï‚ðŽæ“¾‚·‚é
+                //    GetPersonExpensesCostValue(PersonCode, dtDefaultStart, dtDefaultEnd, ref CostValue);
+                //}
+                //else
+                //{
+                //    // ’S“–‚ª‘I‘ð‚³‚ê‚Ä‚¢‚È‚¯‚ê‚Î�‡Œv‚ð�WŒv‚·‚é
+                //    List<int> PersonArrsy = new List<int>(); ;
+                //    if (GetPersonInDepartment(DepartmentCode, ref PersonArrsy) == 0) return 0;
+                //    int[] OneCost = new int[ArrayCount];
+                //    for (int ii = 0; ii < PersonArrsy.Count; ii++)
+                //    {
+                //        // �WŒvƒGƒŠƒAƒNƒŠƒA
+                //        Array.Clear(OneCost, 0, OneCost.Length);
+
+                //        // Œo”ïŽæ“¾
+                //        GetPersonExpensesCostValue(PersonArrsy[ii], dtDefaultStart, dtDefaultEnd, ref OneCost);
+                //        // �WŒv
+                //        for (int iii = 0; iii < CostValue.Length; iii++)
+                //        {
+                //            CostValue[iii] += OneCost[iii];
+                //        }
+                //    }
+                //}
+
+                //// ----- Œo”ï‚Ì�WŒv
+                //DataGridView dgv = dgvMaster;
+                //int SumData = 0;
+                //for (int i = 1; i < CommonDefine.CostDataNoString.Length; i++)
+                //{
+                //    // �s�ì�¬
+                //    int RowCnt = dgv.Rows.Add(1);
+                //    // Œo”ï–¼�Ì
+                //    dgv.Rows[RowCnt].Cells[(int)DispColumn.ConstructionName].Value = CommonDefine.CostDataNoString[i];
+                //    // ‹àŠzƒZƒbƒg
+                //    dgv.Rows[RowCnt].Cells[(int)DispColumn.OrdersDecisionPrice].Value = CostValue[i].ToString("#,0");
+                //    SumData += CostValue[i];
+                //}
+
+                //dgv.Rows.Add();       // ‹ó�s
+                //// ----- Œo”ï‚ÌŒv‚ð•\Ž¦‚·‚é
+                //// �s�ì�¬
+                //int ExpensesCnt = dgv.Rows.Add(1);
+                //// Œo”ï–¼�Ì
+                //dgv.Rows[ExpensesCnt].Cells[(int)DispColumn.ConstructionName].Value = s_TotalTitleArray[(int)RowTitleNum.Expenses];
+                //// ‹àŠzƒZƒbƒg
+                //dgv.Rows[ExpensesCnt].Cells[(int)DispColumn.OrdersDecisionPrice].Value = SumData.ToString("#,0");
+                //// �s‚Ì�F‚ð•Ï‚¦‚é
+                //SetRowColor(dgv.Rows[ExpensesCnt], s_RowTotalBackColor, s_RowTotalForeColor);
+
+                return 0;
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("ƒVƒXƒeƒ€ƒGƒ‰�[�F{0}�F{1}", CommonMotions.GetMethodName(), ex.Message);
+                return 0;
+            }
+        }
+        #endregion
+
+        #region •›’S“–ŽÒ�^Žw“±ˆõ‚Ì‹‹—^‚ðŽæ“¾‚·‚é
+        /// <summary>
+        /// •›’S“–ŽÒ�^Žw“±ˆõ‚Ì‹‹—^‚ðŽæ“¾‚·‚é
+        /// </summary>
+        private int SetAuxiliaryCost()
+        {
+            try
+            {
+                //// •”��ƒR�[ƒhŽæ“¾
+                //int DepartmentCode = GetDepartmentCode();
+                //// ’S“–ŽÒƒR�[ƒhŽæ“¾
+                //int PersonCode = GetConstructionPersonCode();
+
+                //int[] CostValue = new int[2];
+                //// •\Ž¦ƒGƒŠƒAƒNƒŠƒA
+                //Array.Clear(CostValue, 0, CostValue.Length);
+
+                //DateTime dtStart = DateTime.MinValue;
+                //DateTime dtEnd = DateTime.MinValue;
+                //// ’S“–ŽÒ‚ªƒZƒbƒg‚³‚ê‚Ä‚¢‚ê‚Î’S“–ŽÒ�AˆÈŠO‚Í‘Î�Û‘S‚Ä‚ð�WŒv‚·‚é
+                //if (PersonCode != 0)
+                //{
+                //    // ’S“–ŽÒ‚ª‘I‘ð‚³‚ê‚Ä‚¢‚ê‚Î‚»‚ÌŒo”ï‚ðŽæ“¾‚·‚é
+                //    GetPersonAuxiliaryCostValue(PersonCode, ref CostValue);
+                //}
+                //else
+                //{
+                //    // ’S“–‚ª‘I‘ð‚³‚ê‚Ä‚¢‚È‚¯‚ê‚Î�‡Œv‚ð�WŒv‚·‚é
+                //    List<int> PersonArrsy = new List<int>(); ;
+                //    if (GetPersonInDepartment(DepartmentCode, ref PersonArrsy) == 0) return 0;
+                //    int[] OneCost = new int[2];
+                //    for (int i = 0; i < PersonArrsy.Count; i++)
+                //    {
+                //        // �WŒvƒGƒŠƒAƒNƒŠƒA
+                //        Array.Clear(OneCost, 0, OneCost.Length);
+
+                //        // Œo”ïŽæ“¾
+                //        GetPersonAuxiliaryCostValue(PersonArrsy[i], ref OneCost);
+                //        // �WŒv
+                //        for (int ix = 0; ix < CostValue.Length; ix++)
+                //        {
+                //            CostValue[ix] += OneCost[ix];
+                //        }
+                //    }
+                //}
+
+                //// ----- •â�•�U•ª‚Ì�WŒv
+                //DataGridView dgv = dgvMaster;
+
+                //int SumData = 0;
+                //for (int i = 0; i < CostValue.Length; i++)
+                //{
+                //    // �s�ì�¬
+                //    int RowCnt = dgv.Rows.Add(1);
+                //    // Œo”ï–¼�Ì
+                //    dgv.Rows[RowCnt].Cells[(int)DispColumn.ConstructionName].Value = s_GroupTitle[i];
+                //    // ‹àŠzƒZƒbƒg
+                //    dgv.Rows[RowCnt].Cells[(int)DispColumn.OrdersDecisionPrice].Value = CostValue[i].ToString("#,0");
+                //    SumData += CostValue[i];
+                //}
+
+
+                //dgv.Rows.Add();       // ‹ó�s
+                //// ----- •â�•�U•ª‚ÌŒv‚ð•\Ž¦‚·‚é
+                //// �s�ì�¬
+                //int AuxiliaryCnt = dgv.Rows.Add(1);
+                //// Œo”ï–¼�Ì
+                //dgv.Rows[AuxiliaryCnt].Cells[(int)DispColumn.ConstructionName].Value = s_TotalTitleArray[(int)RowTitleNum.Auxiliary];
+                //// ‹àŠzƒZƒbƒg
+                //dgv.Rows[AuxiliaryCnt].Cells[(int)DispColumn.OrdersDecisionPrice].Value = SumData.ToString("#,0");
+                //// �s‚Ì�F‚ð•Ï‚¦‚é
+                //SetRowColor(dgv.Rows[AuxiliaryCnt], s_RowTotalBackColor, s_RowTotalForeColor);
+
+                return 0;
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("ƒVƒXƒeƒ€ƒGƒ‰�[�F{0}�F{1}", CommonMotions.GetMethodName(), ex.Message);
+                return 0;
+            }
+        }
+        #endregion
+
+        #region ’S“–ŽÒ–ˆ‚ÌŽw’èŠú‚Ì�HŽ–ŠJŽn“ú‚ðŽæ“¾‚·‚é
+        /// <summary>
+        /// ’S“–ŽÒ–ˆ‚ÌŽw’èŠú‚Ì�HŽ–ŠJŽn“ú‚ðŽæ“¾‚·‚é
+        /// </summary>
+        /// <returns></returns>
+        private DateTime GetConstructionDate(int PersonCode, bool bStart = true)
+        {
+            IOConstructionBaseInfo BaseDB = new IOConstructionBaseInfo();
+            try
+            {
+                // ‹ó‚Ì�ê�‡‚Íƒ�ƒOƒCƒ“ƒ†�[ƒU�[
+                if (PersonCode == 0) PersonCode = CommonMotions.LoginUserData.PersonCode;
+
+                // ŠJŽn“úŽæ“¾
+                string strSQL = string.Empty;
+                strSQL = "SELECT A.CONSTRUCTIONPERSONCODE, MIN(B.CONSTRUCTIONSTART) FROM CONSTRUCTIONBASEINFO A, CONSTRUCTIONBUDGET B";
+                // �I—¹Žw’è‚Í�I—¹‚ÌMAX‚É•Ï�X
+                if (!bStart) strSQL = strSQL.Replace("MIN(B.CONSTRUCTIONSTART)", "MAX(B.CONSTRUCTIONEND)");
+
+                strSQL += string.Format(" WHERE A.CONSTRUCTIONPERSONCODE = {0}", PersonCode);
+                strSQL += string.Format("  AND A.CONSTRUCTIONPERIOD = {0}", numUDConstPro.Value);
+                strSQL += " AND A.CONSTRUCTIONCODE = B.CONSTRUCTIONCODE GROUP BY A.CONSTRUCTIONPERSONCODE";
+                ArrayList ArrayList = new ArrayList();
+                if (!BaseDB.ExecuteReader(strSQL, ref ArrayList)) return DateTime.MinValue;
+                if (ArrayList.Count == 0) return DateTime.MinValue;
+
+                object[] objRec = (object[])ArrayList[0];
+
+                return CommonMotions.cnvDate(objRec[1]);
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("ƒVƒXƒeƒ€ƒGƒ‰�[�F{0}�F{1}", CommonMotions.GetMethodName(), ex.Message);
+                return DateTime.MinValue;
+            }
+            finally
+            {
+                BaseDB.close(); BaseDB = null;
+            }
+        }
+        #endregion
+
+        #region •”��“à‚Ì’S“–ŽÒƒR�[ƒh‚ðˆê——‚Å•Ô‚·
+        /// <summary>
+        /// •”��“à‚Ì’S“–ŽÒƒR�[ƒh‚ðˆê——‚Å•Ô‚·
+        /// </summary>
+        /// <param name="DepartmentCode">•”��ƒR�[ƒh</param>
+        /// <param name="PersonCode">’S“–ŽÒƒR�[ƒhˆê——</param>
+        /// <returns>ƒf�[ƒ^Œ��”</returns>
+        private int GetPersonInDepartment(int DepartmentCode,ref List<int> PersonCode)
+        {
+            IOMPersonInCharge PersonDB = new IOMPersonInCharge();
+            try
+            {
+                string strSQL = string.Format(" WHERE (PERSONCODE IN (SELECT SALESPERSONCODE FROM CONSTRUCTIONBASEINFO WHERE CONSTRUCTIONPERIOD = {0})", numUDConstPro.Value);
+                strSQL += string.Format(" OR PERSONCODE IN (SELECT CONSTRUCTIONPERSONCODE FROM CONSTRUCTIONBASEINFO WHERE CONSTRUCTIONPERIOD = {0})", numUDConstPro.Value);
+                strSQL += string.Format(" OR PERSONCODE IN (SELECT CONSTRSUBPERSONCODE FROM CONSTRUCTIONBASEINFO WHERE CONSTRUCTIONPERIOD = {0})", numUDConstPro.Value);
+                strSQL += string.Format(" OR PERSONCODE IN (SELECT CONSTRUCTIONINSTRUCTOR FROM CONSTRUCTIONBASEINFO WHERE CONSTRUCTIONPERIOD = {0}))", numUDConstPro.Value);
+                strSQL += " AND EMPLOYEECLASSFLG = 1";
+                if (DepartmentCode != 0)
+                    strSQL += string.Format(" AND DEPARTMENTCODE = {0}", DepartmentCode);
+                strSQL += " ORDER BY DISPLAYORDER ";
+                List<PersonInChargeMaster> PersonList = new List<PersonInChargeMaster>();
+                if (!PersonDB.SelectAction(strSQL, ref PersonList)) return 0;
+
+                foreach (PersonInChargeMaster wrkRec in PersonList)
+                {
+                    PersonCode.Add(wrkRec.PersonCode);
+                }
+                return PersonCode.Count;
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("ƒVƒXƒeƒ€ƒGƒ‰�[�F{0}�F{1}", CommonMotions.GetMethodName(), ex.Message);
+                return 0;
+            }
+            finally
+            {
+                PersonDB.close(); PersonDB = null;
+            }
+        }
+        #endregion
+
+        #region ’S“–ŽÒ–ˆ”ï–Ú–ˆ‚ÌŒo”ï‚ðŽæ“¾‚·‚é
+        /// <summary>
+        /// ’S“–ŽÒ–ˆ”ï–Ú–ˆ‚ÌŒo”ï‚ðŽæ“¾‚·‚é
+        /// </summary>
+        /// <param name="PersonCode">’S“–ŽÒƒR�[ƒh</param>
+        /// <param name="dtStart">ŠJŽn“ú•t</param>
+        /// <param name="dtEnd">�I—¹“ú•t</param>
+        /// <param name="CostValue">”ï–Ú–ˆŒo”ï</param>
+        private void GetPersonExpensesCostValue(int PersonCode, DateTime dtStart, DateTime dtEnd, ref int[] CostValue)
+        {
+            IOCostDataOfPerson CostDB = new IOCostDataOfPerson();
+            try
+            {
+                // ’S“–ŽÒ–ˆŒo”ïƒf�[ƒ^‚æ‚è‚Ç‚±‚Ì�HŽ–‚É‚à�Š‘®‚µ‚Ä‚¢‚È‚¢Œo”ï‚ðŽæ“¾‚·‚é
+                string strSQL = "SELECT PERSONCODE, DATATYPE, SUM(ENTRYPRICE) FROM COSTDATAOFPERSON";
+                strSQL += string.Format(" WHERE PERSONCODE = {0}", PersonCode);
+                strSQL += string.Format(" AND ('{0}' <= TO_CHAR(ACTIONDATE,'YYYY/MM/DD')", dtStart.ToShortDateString());
+                strSQL += string.Format(" AND TO_CHAR(ACTIONDATE,'YYYY/MM/DD') <= '{0}')", dtEnd.ToShortDateString());
+                strSQL += " AND CONSTRUCTIONCODE = 0";
+                strSQL += " GROUP BY PERSONCODE, DATATYPE";
+                strSQL += " ORDER BY PERSONCODE, DATATYPE";
+                ArrayList arList = new ArrayList();
+                if (!CostDB.ExecuteReader(strSQL, ref arList)) return;
+
+                // Žæ“¾Œ‹‰Ê‚ð�U‚è•ª‚¯‚é
+                foreach (object[] wrkobj in arList)
+                {
+                    for (int i = 1; i < CommonDefine.CostDataNoString.Length; i++)
+                    {
+                        if (CommonMotions.cnvInt(wrkobj[1]) == i)
+                        {
+                            CostValue[i] = CommonMotions.cnvInt(wrkobj[2]);
+                            break;
+                        }
+                    }
+                }
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("ƒVƒXƒeƒ€ƒGƒ‰�[�F{0}�F{1}", CommonMotions.GetMethodName(), ex.Message);
+            }
+            finally
+            {
+                CostDB.close(); CostDB = null;
+            }
+        }
+        #endregion
+
+        #region ’S“–ŽÒ–ˆ‚Ì•â�•�U•ª‚ðŽæ“¾‚·‚é
+        /// <summary>
+        /// ’S“–ŽÒ–ˆ‚Ì•â�•�U•ª‚ðŽæ“¾‚·‚é
+        /// </summary>
+        /// <param name="PersonCode"></param>
+        /// <param name="CostValue"></param>
+        private void GetPersonAuxiliaryCostValue(int PersonCode, ref int[] CostValue)
+        {
+            IOConstructionLedgerDetail DetailDB = new IOConstructionLedgerDetail();
+            try
+            {
+                // �HŽ–�Ú�×‘ä’ ƒf�[ƒ^‚æ‚è•â�•�U•ª‚ðŽæ“¾‚·‚é
+                string strSQL = "SELECT A.COMPANYCODE, A.GROUPCOUNT, SUM(A.EXECUTIONAMOUNT)";
+                strSQL += " FROM CONSTRUCTIONLEDGERDETAIL A, CONSTRUCTIONBASEINFO B";
+                strSQL += string.Format(" WHERE (A.GROUPCOUNT = {0} OR A.GROUPCOUNT = {1})"
+                                        , (int)FrmConstructionLedger.DataGroup.Assistant, (int)FrmConstructionLedger.DataGroup.Instructor);
+                strSQL += string.Format(" AND A.COMPANYCODE = {0}", PersonCode);
+                strSQL += " AND A.CONSTRUCTIONCODE = B.CONSTRUCTIONCODE";
+                strSQL += string.Format(" AND B.CONSTRUCTIONPERIOD = {0}", numUDConstPro.Value);
+                strSQL += " GROUP BY A.COMPANYCODE, A.GROUPCOUNT";
+                strSQL += " ORDER BY A.COMPANYCODE, A.GROUPCOUNT";
+                ArrayList arList = new ArrayList();
+                if (!DetailDB.ExecuteReader(strSQL, ref arList)) return;
+
+                // Žæ“¾Œ‹‰Ê‚ð�U‚è•ª‚¯‚é
+                foreach (object[] wrkobj in arList)
+                {
+                    if (CommonMotions.cnvInt(wrkobj[1]) == (int)FrmConstructionLedger.DataGroup.Assistant)
+                    {
+                        CostValue[0] = CommonMotions.cnvInt(wrkobj[2]);
+                    }
+                    else
+                    {
+                        CostValue[1] = CommonMotions.cnvInt(wrkobj[2]);
+                    }
+                }
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("ƒVƒXƒeƒ€ƒGƒ‰�[�F{0}�F{1}", CommonMotions.GetMethodName(), ex.Message);
+            }
+            finally
+            {
+                DetailDB.close(); DetailDB = null;
+            }
+        }
+        #endregion
+
+        #region ‹‹—^ƒf�[ƒ^•\Ž¦”»’è
+        /// <summary>
+        /// ‹‹—^ƒf�[ƒ^•\Ž¦”»’è
+        /// </summary>
+        /// <returns></returns>
+        private bool SalaryDisplay()
+        {
+            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;
+
+                //// ƒ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;
+                //}
+                //// ƒf�[ƒ^•\Ž¦
+                //pnlPayroll.Visible = bRet;
+
+                //// —ÌˆæƒNƒŠƒA
+                //ClearSalary();
+
+                return true;
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("ƒVƒXƒeƒ€ƒGƒ‰�[�F{0}�F{1}", CommonMotions.GetMethodName(), ex.Message);
+                return false;
+            }
+            finally
+            {
+                personDB.close(); personDB = null;
+            }
+        }
+        #endregion
+
+        #region Œo‰ß‹‹—^‚ðŒvŽZ‚·‚é
+        /// <summary>
+        /// Œo‰ß‹‹—^‚ðŒvŽZ‚·‚é
+        /// </summary>
+        /// <param name="dtStart"></param>
+        /// <param name="PersonCode"></param>
+        /// <returns></returns>
+        private int CalcElapsedSalary(DateTime dtStart, int PersonCode)
+        {
+            try
+            {
+                // ‰Ò“­“ú�”‚ðŽæ“¾‚·‚é
+                int WorkingDay = ClsCalendar.CalcOperatingDaysCount(dtStart, DateTime.Now);
+
+                // Œo‰ßŒŽ�”Žæ“¾
+                double dmounth = CommonMotions.DiffMounthTimes(dtStart, DateTime.Now);
+
+                // ‹‹—^—Ý�ÏŽæ“¾
+                int MonthlyPay = GetPersonMonthlySalary(PersonCode);
+                double DayPay = CommonMotions.cnvRound((double)MonthlyPay / CommonDefine.s_ManHourUnitMonth);
+                
+                return CommonMotions.cnvRound(WorkingDay * DayPay);
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("ƒVƒXƒeƒ€ƒGƒ‰�[�F{0}�F{1}", CommonMotions.GetMethodName(), ex.Message);
+                return 0;
+            }
+        }
+        #endregion
+
+        #region ’S“–ŽÒƒ}ƒXƒ^‚æ‚èŒŽŠz‹‹—^Žæ“¾
+        /// <summary>
+        /// ’S“–ŽÒƒ}ƒXƒ^‚æ‚èŒŽŠz‹‹—^Žæ“¾
+        /// </summary>
+        /// <param name="PersonCode"></param>
+        /// <returns></returns>
+        private int GetPersonMonthlySalary(int PersonCode)
+        {
+            IOMPersonInCharge PersonDB = new IOMPersonInCharge();
+            try
+            {
+                if (PersonCode == 0) PersonCode = CommonMotions.LoginUserData.PersonCode;
+                string strSQL = PersonDB.CreatePrimarykeyString(PersonCode);
+                PersonInChargeMaster PersonRec = new PersonInChargeMaster();
+                PersonDB.SelectAction(strSQL, ref PersonRec);
+                
+                return CommonMotions.cnvRound(PersonRec.MonthlySalary);
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("ƒVƒXƒeƒ€ƒGƒ‰�[�F{0}�F{1}", CommonMotions.GetMethodName(), ex.Message);
+                return 0;
+            }
+            finally
+            {
+                PersonDB.close(); PersonDB = null;
+            }
+        }
+        #endregion
+
+        #region �HŽ–—\ŽZ�‘‚æ‚è�U•ª‹‹—^‹àŠz�E‘e—˜‰v‚ðŽæ“¾‚·‚é
+        /// <summary>
+        /// �HŽ–—\ŽZ�‘‚æ‚è�U•ª‹‹—^‹àŠz�E‘e—˜‰v‚ðŽæ“¾‚·‚é
+        /// </summary>
+        /// <returns></returns>
+        private int GetPersonBudgetDetail(int PersonCode, int GroupNo)
+        {
+            IOConstructionBudgetDetail DetailDB = new IOConstructionBudgetDetail();
+            try
+            {
+                if (PersonCode == 0) PersonCode = CommonMotions.LoginUserData.PersonCode;
+
+                string strSQL = "SELECT A.CONSTRUCTIONPERSONCODE, SUM(C.EXECUTIONAMOUNT)";
+                strSQL += " FROM CONSTRUCTIONBASEINFO A, CONSTRUCTIONBUDGET B, CONSTRUCTIONBUDGETDETAIL C ";
+                strSQL += string.Format(" WHERE A.CONSTRUCTIONPERSONCODE = {0}", PersonCode);
+                strSQL += string.Format(" AND A.CONSTRUCTIONPERIOD = {0}", numUDConstPro.Value);
+                strSQL += " AND A.CONSTRUCTIONCODE = B.CONSTRUCTIONCODE";
+                
+                switch(GroupNo)
+                {
+                    case (int)FrmConstructionBudget.DataGroup.PayrollExpenses:     // ‹‹—^Œo”ï
+                    case (int)FrmConstructionBudget.DataGroup.NetIncome:           // �ƒ—˜‰v
+                    strSQL += string.Format(" AND B.SALARYFLG != {0}", (int)CommonDefine.SalaryDevision.Noting);
+                        break;
+                    case (int)FrmConstructionBudget.DataGroup.GrossProfit:         // ‘e—˜‰v
+                        strSQL += string.Format(" AND B.SALARYFLG = {0}", (int)CommonDefine.SalaryDevision.Noting);
+                        break;
+                }
+                    
+                strSQL += " AND B.CONSTRUCTIONCODE = C.CONSTRUCTIONCODE";
+
+                strSQL += string.Format(" AND C.GROUPCOUNT = {0}", GroupNo);
+
+                strSQL += " GROUP BY A.CONSTRUCTIONPERSONCODE";
+
+                ArrayList ArrayList = new ArrayList();
+                if (!DetailDB.ExecuteReader(strSQL, ref ArrayList) || ArrayList.Count == 0) return 0;
+                object[] objRec = (object[])ArrayList[0];
+
+                return CommonMotions.cnvInt(objRec[1]);
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("ƒVƒXƒeƒ€ƒGƒ‰�[�F{0}�F{1}", CommonMotions.GetMethodName(), ex.Message);
+                return 0;
+            }
+            finally
+            {
+                DetailDB.close(); DetailDB = null;
+            }
+        }
+        #endregion
+
+    }
+}
\ No newline at end of file
Index: trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/EstimateBudget/FrmEstimateBudgetAuxiliary.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/EstimateBudget/FrmEstimateBudgetAuxiliary.cs	(revision 15)
+++ trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/EstimateBudget/FrmEstimateBudgetAuxiliary.cs	(revision 16)
@@ -976,15 +976,15 @@
             try
             {
                 string strSQL = "SELECT B.COMPANYNAME, C.COMPONENTNAME, SUM(A.LINETOTAL), A.COMPANYCODE, A.COMPONENTCODE, D.ITEMCODE, D.ITEMNAME";
-                strSQL += " FROM ESTIMATEDATADETAIL A, SUBCONTRACTORMASTER B, COMPONENTMASTER C, CONSTRUCTIONITEMMASTER D";
+                strSQL += " FROM ESTIMATEDATADETAIL A";
+                strSQL += " LEFT JOIN SUBCONTRACTORMASTER B ON A.COMPANYCODE = B.COMPANYCODE";
+                strSQL += " LEFT JOIN  COMPONENTMASTER C ON A.COMPONENTCODE = C.COMPONENTCODE";
+                strSQL += " LEFT JOIN  CONSTRUCTIONITEMMASTER D ON A.ITEMCODE = D.ITEMCODE";
                 strSQL += string.Format(" WHERE A.CONSTRUCTIONCODE = {0}", m_ConstructionCode);                                     // å¯¾è±¡å·¥äº‹ã�®ã�¿
                 strSQL += string.Format(" And A.COMPONENTCODE != {0}", ClsCommonCosts.s_CommunityCompCode);                         // å…±é€šä»®è¨­è²»ä»¥å¤–ã‚’å¯¾è±¡ã�«ã�™ã‚‹
                 strSQL += " And A.MYEXPENSESFLG = 0";                                                                               // çµŒè²»ã‚’é™¤å¤–ã�™ã‚‹
-                strSQL += string.Format(" And (A.COMPANYCODE != 0 And A.COMPANYCODE != {0})",
-                                                        CommonDefine.s_AmountMoney[(int)CommonDefine.AmountMoneyNo.MyCosts].Key);   // è‡ªç¤¾æ–½å·¥ãƒ»ä¼šç¤¾å‰²å½“ç„¡ã‚’é™¤å¤–ã�™ã‚‹
-                strSQL += " And A.COMPONENTCODE = C.COMPONENTCODE(+)";
-                strSQL += " And A.COMPANYCODE = B.COMPANYCODE(+)";
-                strSQL += " AND A.ITEMCODE = D.ITEMCODE(+)";
+                strSQL += " And (A.COMPANYCODE != 0";
+                strSQL += string.Format(" And A.COMPANYCODE != {0})", CommonDefine.s_AmountMoney[(int)CommonDefine.AmountMoneyNo.MyCosts].Key);   // è‡ªç¤¾æ–½å·¥ãƒ»ä¼šç¤¾å‰²å½“ç„¡ã‚’é™¤å¤–ã�™ã‚‹
                 strSQL += " GROUP BY B.COMPANYNAME, C.COMPONENTNAME, D.ITEMNAME, A.COMPANYCODE, A.COMPONENTCODE, D.ITEMCODE";
                 strSQL += " ORDER BY B.COMPANYNAME, C.COMPONENTNAME, D.ITEMNAME";
                 ArrayList arList = new ArrayList();
@@ -1380,17 +1380,18 @@
 
                 // ----- æ˜Žç´°é …ç›®ã‚’ã‚»ãƒƒãƒˆã�™ã‚‹
                 string strSQL = "SELECT A.LARGECODE, A.MIDDLECODE, B.LARGENAME, C.MIDDLENAME, C.COMMENTTEXT, C.DISPLAYORDER, NVL(D.TOTAL, 0)";
-                strSQL += " FROM COMMONCOSTLINKMS A, COMMONCOSTLARGE B, COMMONCOSTMIDDLE C,";
-                strSQL += " (SELECT D.COMPONENTCODE, D.ITEMCODE, SUM(D.LINETOTAL) TOTAL";
-                strSQL += " FROM ESTIMATEDATADETAIL D";
-                strSQL += string.Format(" WHERE D.CONSTRUCTIONCODE = {0}", m_ConstructionCode);
-                strSQL += " GROUP BY D.COMPONENTCODE, D.ITEMCODE) D";
+                strSQL += " FROM COMMONCOSTLINKMS A";
+                
+                strSQL += " LEFT JOIN (SELECT E.COMPONENTCODE, E.ITEMCODE, SUM(E.LINETOTAL) TOTAL FROM ESTIMATEDATADETAIL E";
+                strSQL += string.Format(" WHERE E.CONSTRUCTIONCODE = {0} GROUP BY E.COMPONENTCODE, E.ITEMCODE) D ON A.ITEMCODE = D.ITEMCODE", m_ConstructionCode);
+
+                strSQL += " , COMMONCOSTLARGE B, COMMONCOSTMIDDLE C";
+                
                 strSQL += string.Format(" WHERE A.LARGECODE = {0}", ClsCommonCosts.s_CommunityCompCode);
                 strSQL += " AND A.LARGECODE = B.LARGECODE";
                 strSQL += " AND A.LARGECODE = C.LARGECODE";
                 strSQL += " AND A.MIDDLECODE = C.MIDDLECODE";
-                strSQL += " AND A.ITEMCODE = D.ITEMCODE (+)";
-                strSQL += " GROUP BY A.LARGECODE, A.MIDDLECODE, B.LARGENAME, C.MIDDLENAME, C.COMMENTTEXT, C.DISPLAYORDER, D.TOTAL";
+                strSQL += " GROUP BY A.LARGECODE, A.MIDDLECODE, B.LARGENAME, C.MIDDLENAME, C.COMMENTTEXT, C.DISPLAYORDER, NVL(D.TOTAL, 0)";
                 strSQL += " ORDER BY C.DISPLAYORDER";
 
                 ArrayList LinkList = new ArrayList();
Index: trunk/src/ProcessManagement/ProcessManagement/Forms/Master/Component/FrmComponent.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/Forms/Master/Component/FrmComponent.cs	(revision 15)
+++ trunk/src/ProcessManagement/ProcessManagement/Forms/Master/Component/FrmComponent.cs	(revision 16)
@@ -966,13 +966,6 @@
                     m_dispControl[(int)DispControl.BeforeComponentName].Text = wrklist[0].ComponentName.ToString();     // å·¥ç¨®å��ç§°
                 }
 
-                // å·¥äº‹ç¨®åˆ¥ã‚°ãƒªãƒƒãƒ‰è¡¨ç¤º
-                strSQL = "SELECT A.TYPECODE, A.NAMESTRING, B.DUMMY FROM CONSTRUCTIONTYPEMASTER A, COMPONENTTOTYPEMASTER B";
-                strSQL += " WHERE A.DELETEFLG = 0 AND A.TYPECODE = B.TYPECODE(+)";
-                strSQL = string.Format(" AND {0} = B.COMPONENTCODE(+) ORDER BY A.DISPLAYORDER", m_ComponentCode);
-                ArrayList arList = new ArrayList();
-
-
                 m_bChengeAns = false;
             }
             catch (Exception ex)
Index: trunk/src/ProcessManagement/ProcessManagement/Forms/SubForms/FrmNumberOfWorkers.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/Forms/SubForms/FrmNumberOfWorkers.cs	(revision 15)
+++ trunk/src/ProcessManagement/ProcessManagement/Forms/SubForms/FrmNumberOfWorkers.cs	(revision 16)
@@ -278,11 +278,11 @@
                 // å¹´æœˆã‚«ãƒ©ãƒ æ•°ã‚’å�–å¾—ã�™ã‚‹
                 string strSQL = "SELECT";
                 strSQL += " TO_CHAR(A.DAILYDATADATE, 'YYYY/MM')";
-                strSQL += " FROM DAILYDATADETAIL A, SUBCONTRACTORJOBCATEGORY B, SUBCONTRACTORMASTER C";
+                strSQL += " FROM DAILYDATADETAIL A";
+                strSQL += " LEFT JOIN SUBCONTRACTORJOBCATEGORY B ON A.JOBCATEGORYCODE = B.JOBCATEGORYCODE";
+                strSQL += " LEFT JOIN  SUBCONTRACTORMASTER C ON A.COMPANYCODE = C.COMPANYCODE";
                 strSQL += string.Format(" WHERE PersonCode = {0}", m_PersonCode);
                 strSQL += string.Format(" AND ConstructionCode = {0}", m_ConstructionCode);
-                strSQL += " AND A.JOBCATEGORYCODE = B.JOBCATEGORYCODE(+)";
-                strSQL += " AND A.COMPANYCODE = C.COMPANYCODE(+)";
                 strSQL += " group By TO_CHAR(A.DAILYDATADATE, 'YYYY/MM')";
                 strSQL += " ORDER BY 1";
                 ArrayList arList = new ArrayList();
@@ -408,11 +408,11 @@
                 string strSQL = "SELECT";
                 strSQL += " A.JOBCATEGORYCODE, B.JOBCATEGORYNAME, A.COMPANYCODE,";
                 strSQL += " C.COMPANYNAME, TO_CHAR(A.DAILYDATADATE, 'YYYY/MM'), SUM(A.TODAYHEADCOUNT)";
-                strSQL += " FROM DAILYDATADETAIL A, SUBCONTRACTORJOBCATEGORY B, SUBCONTRACTORMASTER C";
+                strSQL += " FROM DAILYDATADETAIL A";
+                strSQL += " LEFT JOIN SUBCONTRACTORJOBCATEGORY B ON A.JOBCATEGORYCODE = B.JOBCATEGORYCODE";
+                strSQL += " LEFT JOIN SUBCONTRACTORMASTER C ON A.COMPANYCODE = C.COMPANYCODE";
                 strSQL += string.Format(" WHERE PersonCode = {0}", m_PersonCode);
                 strSQL += string.Format(" AND ConstructionCode = {0}", m_ConstructionCode);
-                strSQL += " AND A.JOBCATEGORYCODE = B.JOBCATEGORYCODE(+)";
-                strSQL += " AND A.COMPANYCODE = C.COMPANYCODE(+)";
                 strSQL += " GROUP BY A.JOBCATEGORYCODE, B.JOBCATEGORYNAME, A.COMPANYCODE, C.COMPANYNAME, TO_CHAR(A.DAILYDATADATE, 'YYYY/MM')";
                 strSQL += " ORDER BY 3, 1, 4";
 
Index: trunk/src/ProcessManagement/ProcessManagement/ProcessManagement.csproj
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/ProcessManagement.csproj	(revision 15)
+++ trunk/src/ProcessManagement/ProcessManagement/ProcessManagement.csproj	(revision 16)
@@ -499,7 +499,6 @@
     <Compile Include="Forms\DataEntry\CostCalculation\FrmCostCalculationAuxiliary.cs">
       <SubType>Form</SubType>
     </Compile>
-    <Compile Include="Forms\DataEntry\CreateConstructionList\CreateConstructionList.cs" />
     <Compile Include="Forms\DataEntry\EstimateBudget\FrmEstimateBudget.cs">
       <SubType>Form</SubType>
     </Compile>
Index: trunk/src/ProcessManagement/ProcessManagement.v12.suo
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
