Index: branches/src/ProcessManagement/ProcessManagement/Common/CommonVersion.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Common/CommonVersion.cs	(revision 282)
+++ branches/src/ProcessManagement/ProcessManagement/Common/CommonVersion.cs	(revision 283)
@@ -14,7 +14,7 @@
         /// <summary>
         /// æœ¬ä½“ãƒ�ãƒ¼ã‚¸ãƒ§ãƒ³
         /// </summary>
-        public static int s_SystemVersion = 91;
+        public static int s_SystemVersion = 94;
 
         /// <summary>
         /// ã‚³ãƒ”ãƒ¼ãƒ»ç’°å¢ƒãƒ�ãƒ¼ã‚¸ãƒ§ãƒ³
Index: branches/src/ProcessManagement/ProcessManagement/Common/Process/ClsExcute.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Common/Process/ClsExcute.cs	(revision 282)
+++ branches/src/ProcessManagement/ProcessManagement/Common/Process/ClsExcute.cs	(revision 283)
@@ -72,7 +72,7 @@
             MaterialCountEntry = 25,            // 25:è³‡æ��æ•°å¤‰æ›´ç”»é�¢
             MaterialReserveEntry = 26,          // 26:è³‡æ��è²¸å‡º
             MaterialReturnEntry = 27,           // 27:è³‡æ��è¿”å�´
-            MaterialSelect = 28,                // 28;è³‡æ��é�¸æŠž
+            MaterialSelect = 28,                // 28:è³‡æ��é�¸æŠž
             RequestSummaryList = 29,            // 29:è«‹æ±‚ã�¾ã�¨ã‚� 
             PaymentConfirmation = 30,           // 30:å…¥é‡‘ç¢ºèª�
             RequestInput = 31,                  // 31:è«‹æ±‚å…¥åŠ›
@@ -1174,14 +1174,14 @@
         }
         #endregion
         
-        #region ç™ºæ³¨æ›¸å…¥åŠ›
+        #region æ³¨æ–‡æ›¸å…¥åŠ›
         /// <summary>
-        /// ç™ºæ³¨æ›¸å…¥åŠ›
+        /// æ³¨æ–‡æ›¸å…¥åŠ›
         /// </summary>
         /// <returns></returns>
         public static void ProcessExecuteNo_PurchaseOrderEntry(ProcessParameter CurrentPara)
         {
-            // ç™ºæ³¨æ›¸å…¥åŠ›
+            // æ³¨æ–‡æ›¸å…¥åŠ›
             FrmPurchaseOrderEntry frm = new FrmPurchaseOrderEntry();
             try
             {
@@ -1230,14 +1230,14 @@
         }
         #endregion
 
-        #region ç™ºæ³¨æ›¸å�°åˆ·
+        #region æ³¨æ–‡æ›¸å�°åˆ·
         /// <summary>
-        /// ç™ºæ³¨æ›¸å…¥åŠ›
+        /// æ³¨æ–‡æ›¸å…¥åŠ›
         /// </summary>
         /// <returns></returns>
         public static void ProcessExecuteNo_PurchaseOrderPrint(ProcessParameter CurrentPara)
         {
-            // ç™ºæ³¨æ›¸å…¥åŠ›
+            // æ³¨æ–‡æ›¸å…¥åŠ›
             FrmPurchaseOrderPrint frm = new FrmPurchaseOrderPrint();
             try
             {
Index: branches/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOPaymentDataDetail.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOPaymentDataDetail.cs	(revision 282)
+++ branches/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOPaymentDataDetail.cs	(revision 283)
@@ -313,9 +313,8 @@
             int iReturn = -1;
             try
             {
-                // SQLä½œæˆ�ï¼ˆDateTimeåž‹ã�Œå¤‰æ�›ã�§ã��ã�ªã�„ã�®ã�§Charã�«å¤‰æ�›ã�—ã�¦ã�Šã��ï¼‰
-                strcmd.Append("SELECT count(CompanyCode)");
-                strcmd.Append(" FROM PaymentDataDetail ");
+                // SQLä½œæˆ�
+                strcmd.Append("SELECT count(*) FROM PaymentDataDetail ");
                 strcmd.Append(AddSQLString);
 
                 // SQLå®Ÿè¡Œ
@@ -322,13 +321,10 @@
                 if (!ExecuteReader(strcmd.ToString(), ref arData, bConnect)) return -1;
 
                 // ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆ
-                foreach (object[] objwrk in arData)
-                {
-                    iReturn = CommonMotions.cnvInt(objwrk[0]);
-                }
-                // ä»¶æ•°ã�Œã�‚ã‚Œã�°ã‚»ãƒƒãƒˆã�™ã‚‹
-                if (arData.Count > 0) iReturn = arData.Count;
+                object[] objwrk = (object[])arData[0];
 
+                iReturn = CommonMotions.cnvInt(objwrk[0]);
+
                 return iReturn;
             }
             catch (Exception ex)
Index: branches/src/ProcessManagement/ProcessManagement/DataModel/ConstructionBudgetDetail.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/DataModel/ConstructionBudgetDetail.cs	(revision 282)
+++ branches/src/ProcessManagement/ProcessManagement/DataModel/ConstructionBudgetDetail.cs	(revision 283)
@@ -5,11 +5,11 @@
 
 namespace ProcessManagement.DataModel
 {
+    /// <summary>
+    /// å·¥äº‹äºˆç®—æ›¸æ˜Žç´°ãƒ‡ãƒ¼ã‚¿
+    /// </summary>
     public class ConstructionBudgetDetail
     {
-        /// <summary>
-        /// å·¥äº‹äºˆç®—æ›¸æ˜Žç´°ãƒ‡ãƒ¼ã‚¿
-        /// </summary>
         #region ãƒ¡ãƒ³ãƒ�å¤‰æ•°
 
         private int     m_ConstructionCode = 0;	            // å·¥äº‹ã‚³ãƒ¼ãƒ‰
Index: branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstractionList/FrmConstructionListAuxiliary.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstractionList/FrmConstructionListAuxiliary.cs	(revision 282)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstractionList/FrmConstructionListAuxiliary.cs	(revision 283)
@@ -1093,12 +1093,12 @@
                             FlgString = "ˆó�ü�Ï";
                         }
                         break;
-                    case (int)ClsExcute.ProcessExecuteNo.PurchaseOrderEntry:    // ’�•¶�‘“ü—Í
-                    case (int)ClsExcute.ProcessExecuteNo.PurchaseOrderPrint:    // ’�•¶�‘ˆó�ü
+                    case (int)ClsExcute.ProcessExecuteNo.PurchaseOrderEntry:                // ’�•¶�‘“ü—Í
+                    case (int)ClsExcute.ProcessExecuteNo.PurchaseOrderPrint:                // ’�•¶�‘ˆó�ü
                         int ParentCode = ClsProcessExist.GetParentConstrCode(nConstrCode);
                         if (GetPrintCount(OrderDB, ParentCode, nConstrCode))
                         {
-                            FlgString = "�Ï";
+                            FlgString = "ˆó�ü�Ï";
                         }
 
                         if (m_ExecuteFlg == (int)ClsExcute.ProcessExecuteNo.PurchaseOrderPrint)
Index: branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionBaseInfo/DataChange.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionBaseInfo/DataChange.cs	(revision 282)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionBaseInfo/DataChange.cs	(revision 283)
@@ -386,8 +386,10 @@
                 int ConstrPeriod = CommonMotions.cnvInt(m_DspCtrl[(int)DspCnt.ConstructionPeriod].Text);
 
                 strSQL.Append("SELECT A.CONSTRUCTIONCODE,");
-                strSQL.Append(" CASE DATE(A.ConstructionPeriodStart2) WHEN DATE('0001/01/01') THEN A.ConstructionPeriodStart ELSE A.ConstructionPeriodStart2 END StDate,");
-                strSQL.Append(" CASE DATE(A.ConstructionPeriodEnd2) WHEN DATE('0001/01/01') THEN A.ConstructionPeriodEnd ELSE A.ConstructionPeriodEnd2 END EdDate,");
+                strSQL.AppendFormat(" CASE DATE(A.ConstructionPeriodStart2) WHEN DATE('{0}')", DateTime.MinValue.ToShortDateString());
+                strSQL.Append("  THEN A.ConstructionPeriodStart ELSE A.ConstructionPeriodStart2 END StDate,");
+                strSQL.AppendFormat(" CASE DATE(A.ConstructionPeriodEnd2) WHEN DATE('{0}')", DateTime.MinValue.ToShortDateString());
+                strSQL.Append("  THEN A.ConstructionPeriodEnd ELSE A.ConstructionPeriodEnd2 END EdDate,");
                 strSQL.Append(" B.PERSONCODE B1, B.SEALPRINTNAME B2, B.MONTHLYSALARY B3,");
                 strSQL.Append(" C.PERSONCODE C1, C.SEALPRINTNAME C2, C.MONTHLYSALARY C3,");
                 strSQL.Append(" D.PERSONCODE D1, D.SEALPRINTNAME D2, D.MONTHLYSALARY D3,");
@@ -998,6 +1000,7 @@
         /// <returns></returns>
         private bool LedgerDataChange(IOConstructionLedger LedgerDB,
                                         IOConstructionLedgerDetail LedgerDDB,
+                                        IOConstructionLedgerExcute LedgerEDB,
                                         int TotalOrdersPrice,
                                         bool TyingDataFlag,
                                         ArrayList ParentData,
@@ -1023,19 +1026,19 @@
                 // ----- �HŽ–�Ú�×‘ä’ –¾�×ƒf�[ƒ^�ˆ—�
                 // �HŽ–’S“–ŽÒ
                 bool bChgParson1 = false;
-                if (!LedgerDetailDataSalarySet(LedgerDDB, ProcConstrCode, frm, TotalOrdersPrice,
+                if (!LedgerDetailDataSalarySet(LedgerDDB, LedgerEDB,ProcConstrCode, frm, TotalOrdersPrice,
                                                     (int)FrmConstructionLedger.DataGroup.Payroll,
                                                     objRec, LedgerRec, ref bChgParson1)) return false;
 
                 // �HŽ–•›’S“–ŽÒ
                 bool bChgParson2 = false;
-                if (!LedgerDetailDataSalarySet(LedgerDDB, ProcConstrCode, frm, TotalOrdersPrice,
+                if (!LedgerDetailDataSalarySet(LedgerDDB, LedgerEDB, ProcConstrCode, frm, TotalOrdersPrice,
                                                     (int)FrmConstructionLedger.DataGroup.Assistant,
                                                     objRec, LedgerRec, ref bChgParson2)) return false;
 
                 // �HŽ–Žw“±ˆõ
                 bool bChgParson3 = false;
-                if (!LedgerDetailDataSalarySet(LedgerDDB, ProcConstrCode, frm, TotalOrdersPrice,
+                if (!LedgerDetailDataSalarySet(LedgerDDB, LedgerEDB, ProcConstrCode, frm, TotalOrdersPrice,
                                                     (int)FrmConstructionLedger.DataGroup.Instructor,
                                                     objRec, LedgerRec, ref bChgParson3)) return false;
 
@@ -1107,7 +1110,9 @@
         /// �HŽ–�Ú�×‘ä’ –¾�×�F’S“–ŽÒ�E•›’S“–ŽÒ�EŽw“±ˆõƒZƒbƒg
         /// </summary>
         /// <returns></returns>
-        private bool LedgerDetailDataSalarySet(IOConstructionLedgerDetail LedgerDDB, int ProcConstrCode, FrmConstructionLedger frm
+        private bool LedgerDetailDataSalarySet(IOConstructionLedgerDetail LedgerDDB
+                                                    , IOConstructionLedgerExcute LedgerEDB
+                                                    , int ProcConstrCode, FrmConstructionLedger frm
                                                     , int TotalOrdersPrice, int GroupCode
                                                     , object[] objRec, ConstructionLedger LedgerRec, ref bool bChangeCode)
         {
@@ -1114,9 +1119,9 @@
             try
             {
                 // •Ò�Wƒf�[ƒ^Žæ“¾
-                int TargetParson1 = CommonMotions.cnvInt(((ComboBox)m_DspCtrl[(int)DspCnt.ConstructionPersonCode]).SelectedValue);
-                int TargetParson2 = CommonMotions.cnvInt(((ComboBox)m_DspCtrl[(int)DspCnt.ConstrSubPersonCode]).SelectedValue);
-                int TargetParson3 = CommonMotions.cnvInt(((ComboBox)m_DspCtrl[(int)DspCnt.ConstructionInstructor]).SelectedValue);
+                int TargetParson1 = CommonMotions.cnvInt(((ComboBox)m_DspCtrl[(int)DspCnt.ConstructionPersonCode]).SelectedValue);  // ’S“–ŽÒ
+                int TargetParson2 = CommonMotions.cnvInt(((ComboBox)m_DspCtrl[(int)DspCnt.ConstrSubPersonCode]).SelectedValue);     // •›’S“–ŽÒ
+                int TargetParson3 = CommonMotions.cnvInt(((ComboBox)m_DspCtrl[(int)DspCnt.ConstructionInstructor]).SelectedValue);  // Žw“±ˆõ
                 DateTime StartDate = CommonMotions.cnvUndecidedStringToDate(m_DspCtrl[(int)DspCnt.ConstructionPeriodStart2].Text);
                 if (StartDate == DateTime.MinValue)
                     StartDate = CommonMotions.cnvUndecidedStringToDate(m_DspCtrl[(int)DspCnt.ConstructionPeriodStart].Text);
@@ -1134,7 +1139,6 @@
 
                 int ConstructorCode = 0;
                 double MonthryCost = 0;
-                bool bSalaryCorrection = true;
                 switch (GroupCode)
                 {
                     // �HŽ–’S“–ŽÒ
@@ -1146,7 +1150,6 @@
                     case (int)FrmConstructionLedger.DataGroup.Assistant:
                         ConstructorCode = TargetParson2;
                         MonthryCost = CommonDefine.AssistantMonthryCost;
-                        bSalaryCorrection = false;
                         break;
 
                     // �HŽ–Žw“±ˆõ
@@ -1153,7 +1156,6 @@
                     case (int)FrmConstructionLedger.DataGroup.Instructor:
                         ConstructorCode = TargetParson3;
                         MonthryCost = CommonDefine.InstructorMonthryCost;
-                        bSalaryCorrection = false;
                         break;
                 }
                 // ƒf�[ƒ^‚ª‘¶�Ý‚µ‚È‚¢�AAnd�@’S“–ŽÒ‚Ì�Ý’è‚ª–³‚¢�ê�‡‚Í�ˆ—�‚µ‚È‚¢
@@ -1171,6 +1173,16 @@
                                             DetailRec.GroupCount,
                                             DetailRec.LineCount,
                                             false)) return false;
+                
+                    // ‹‹—^‹æ•ª‚ª“ú�”Žw’è‚È‚ç‚Î‘O’S“–‚ÌŽx•¥Šz‚ð�í�œ‚·‚é
+                    if (DetailRec.SalaryFlg == (int)CommonDefine.SalaryDevision.DaysInput)
+                    {
+                        strSQL.Clear();
+                        strSQL.Append(LedgerEDB.CreatePrimarykeyString(DetailRec.ConstructionCode
+                                                                        , DetailRec.GroupCount
+                                                                        , DetailRec.LineCount));
+                        LedgerEDB.DeleteAction(strSQL.ToString(), false);
+                    }
                 }
 
                 // ’S“–ŽÒ‚ª�Ý’è‚³‚ê‚Ä‚¢‚È‚¢Œ»ƒf�[ƒ^‚ª‚ ‚ê‚Î�í�œ‚·‚é
@@ -1191,47 +1203,56 @@
                     && LedgerRec.ConstructionStart == StartDate
                     && LedgerRec.ConstructionEnd == EndDate) return true;
 
-                // ŠJŽn“ú‚ª�¡“ú‚æ‚è‘O‚Ì�ê�‡‚Í�¡“ú‚ðƒZƒbƒg‚·‚é
-                if (StartDate < DateTime.Today) StartDate = DateTime.Today;
-                // ‹‹—^‹àŠzŽæ“¾
-                double ExecutionAmount = 0;
-                double AmountConfigRate = 0;
-                // ‰Ò“­“ú�”Žæ“¾
-                int workingCount = ClsCalendar.CalcPassedDaysCount(StartDate, EndDate);
-                // Žx•¥‚¢‹‹—^ŒvŽZ
-                CommonMotions.CalcPayValueData(MonthryCost,
-                                                TotalOrdersPrice,
-                                                workingCount,
-                                                ref ExecutionAmount,
-                                                ref AmountConfigRate,
-                                                bSalaryCorrection);
-
                 // ----- �V’S“–ŽÒ‚Ì�HŽ–—\ŽZ�‘–¾�×ƒf�[ƒ^�ì�¬
-                ClearConstructionLedgerDetailRec(ref DetailRec);
-                DetailRec.ConstructionCode = ProcConstrCode;                                // �HŽ–”Ô�†
-                DetailRec.GroupCount = GroupCode;                                           // ƒOƒ‹�[ƒv”Ô�†
-                DetailRec.LineCount = 0;                                                    // �s”Ô�†
+                ConstructionLedgerDetail NewDetailRec = new ConstructionLedgerDetail();
+                NewDetailRec.ConstructionCode = ProcConstrCode;                                     // �HŽ–”Ô�†
+                NewDetailRec.GroupCount = GroupCode;                                                // ƒOƒ‹�[ƒv”Ô�†
+                NewDetailRec.LineCount = 99;                                                        // �s”Ô�†
                 
                 frm.GetTitileParametar = GroupCode;
-                DetailRec.FirstString = frm.GetTitleString;                                 // �€–Ú–¼�Ì
+                NewDetailRec.FirstString = frm.GetTitleString;                                      // �€–Ú–¼�Ì
 
-                DetailRec.SecondString = string.Empty;                                      // �HŽ–“à—e
-                DetailRec.CompanyType = (int)CommonDefine.CodeDataType.Person;              // ‹¦—Í‰ïŽÐƒR�[ƒhƒ^ƒCƒv
-                DetailRec.CompanyCode = ConstructorCode;                                    // ‹¦—Í‰ïŽÐƒR�[ƒh
-                //DetailRec.ExecutionAmount = ExecutionAmount;                              // ŽÀ�s‹àŠz
-                //DetailRec.AmountConfigRate = AmountConfigRate;                              // ‹àŠz�\�¬—¦
-                DetailRec.ExecutionAmount = 0;                                              // ŽÀ�s‹àŠz
-                DetailRec.AmountConfigRate = 0;                                             // ‹àŠz�\�¬—¦
+                NewDetailRec.SecondString = string.Empty;                                           // �HŽ–“à—e
+                NewDetailRec.CompanyType = (int)CommonDefine.CodeDataType.Person;                   // ‹¦—Í‰ïŽÐƒR�[ƒhƒ^ƒCƒv
+                NewDetailRec.CompanyCode = ConstructorCode;                                         // ‹¦—Í‰ïŽÐƒR�[ƒh
+                NewDetailRec.ExecutionAmount = 0;                                                   // ŽÀ�s‹àŠz
+                NewDetailRec.AmountConfigRate = 0;                                                  // ‹àŠz�\�¬—¦
 
-                DetailRec.SalaryFlg = (int)CommonDefine.SalaryDevision.All;                 // ‹‹—^�U•ª‹æ•ª
-                DetailRec.SalaryDays = workingCount;                                        // ‹‹—^�U•ª“ú�”
-                DetailRec.OperatingFlg = (int)ConstructionLedgerDetail.SalOpeKindDef.Oparateing;    // ’S“–’†ƒtƒ‰ƒO
+                // 2017/10/19 ‹‹—^�U•ª‹æ•ª�E‹‹—^�U•ª“ú�”‚Íˆø‚«Œp‚®
+                NewDetailRec.SalaryFlg = DetailRec.SalaryFlg;                                       // ‹‹—^�U•ª‹æ•ª
+                NewDetailRec.SalaryDays = DetailRec.SalaryDays;                                     // ‹‹—^�U•ª“ú�”
+                NewDetailRec.OperatingFlg = (int)ConstructionLedgerDetail.SalOpeKindDef.Oparateing; // ’S“–’†ƒtƒ‰ƒO
 
-                DetailRec.SalaryOnRegist = MonthryCost;                                     // “o˜^ŽžŒŽŠz‹‹—^
+                NewDetailRec.SalaryOnRegist = MonthryCost;                                          // “o˜^ŽžŒŽŠz‹‹—^
 
                 // ƒf�[ƒ^’Ç‰Á
-                if (!LedgerDDB.InsertAction(DetailRec, false)) return false;
+                if (!LedgerDDB.InsertAction(NewDetailRec, false)) return false;
 
+                // ‹‹—^‹æ•ª‚ª“ú�”Žw’è‚È‚ç‚ÎˆøŒpŒŽ‚É‹àŠzŒv�ã
+                if (NewDetailRec.SalaryFlg == (int)CommonDefine.SalaryDevision.DaysInput)
+                {
+                    // �HŽ–’S“–ŽÒ‚Ì‚Ýƒf�[ƒ^�ì�¬
+                    if (GroupCode == (int)FrmConstructionLedger.DataGroup.Payroll)
+                    {
+                        ConstructionLedgerExcute ExecRec = new ConstructionLedgerExcute();
+
+                        ExecRec.ConstructionCode = NewDetailRec.ConstructionCode;	// �HŽ–ƒR�[ƒh
+                        ExecRec.GroupCount = NewDetailRec.GroupCount;               // ƒOƒ‹�[ƒv”Ô�†
+                        ExecRec.LineCount = NewDetailRec.LineCount;                 // �s”Ô�†
+
+                        DateTime dtStart = CommonMotions.cnvDate(objRec[(int)ReadParentOrder.StartDate]);
+                        int ColCnt = ClsChangeLedgerData.CalcTargetMonthToColumn(dtStart, DateTime.Now);
+                        ExecRec.ColumnCount = ColCnt;                               // —ñ”Ô�†
+
+                        int ExecAmount = CommonMotions.cnvRound(
+                                            ((MonthryCost * CommonDefine.s_SalaryCorrection) / CommonDefine.s_ManHourUnitMonth) * DetailRec.SalaryDays);
+                        ExecRec.PaymentAmount = ExecAmount;                         // Žx•¥‹àŠz
+                        ExecRec.TargetMonth = DateTime.Now;                         // ‘Î�Û”NŒŽ
+
+                        LedgerEDB.InsertAction(ExecRec, false);
+                    }
+                }
+
                 // ƒf�[ƒ^•Ï�X—L
                 bChangeCode = true;
                 
Index: branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionBaseInfo/FrmConstructionBaseInfo.designer.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionBaseInfo/FrmConstructionBaseInfo.designer.cs	(revision 282)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionBaseInfo/FrmConstructionBaseInfo.designer.cs	(revision 283)
@@ -2845,7 +2845,7 @@
             this.dgvPurchaseOrder.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
             dataGridViewCellStyle6.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
             dataGridViewCellStyle6.BackColor = System.Drawing.SystemColors.Control;
-            dataGridViewCellStyle6.Font = new System.Drawing.Font("ï¼­ï¼³ ï¼°ã‚´ã‚·ãƒƒã‚¯", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
+            dataGridViewCellStyle6.Font = new System.Drawing.Font("ï¼­ï¼³ æ˜Žæœ�", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
             dataGridViewCellStyle6.ForeColor = System.Drawing.SystemColors.WindowText;
             dataGridViewCellStyle6.SelectionBackColor = System.Drawing.SystemColors.Highlight;
             dataGridViewCellStyle6.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
@@ -2926,7 +2926,7 @@
             this.dgvLink.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
             dataGridViewCellStyle11.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
             dataGridViewCellStyle11.BackColor = System.Drawing.SystemColors.Control;
-            dataGridViewCellStyle11.Font = new System.Drawing.Font("ï¼­ï¼³ ï¼°ã‚´ã‚·ãƒƒã‚¯", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
+            dataGridViewCellStyle11.Font = new System.Drawing.Font("ï¼­ï¼³ æ˜Žæœ�", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
             dataGridViewCellStyle11.ForeColor = System.Drawing.SystemColors.WindowText;
             dataGridViewCellStyle11.SelectionBackColor = System.Drawing.SystemColors.Highlight;
             dataGridViewCellStyle11.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
@@ -3947,6 +3947,7 @@
             // 
             this.btnOtherProc.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
             this.btnOtherProc.BackColor = System.Drawing.Color.SpringGreen;
+            this.btnOtherProc.Font = new System.Drawing.Font("ï¼­ï¼³ æ˜Žæœ�", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
             this.btnOtherProc.Location = new System.Drawing.Point(1, 657);
             this.btnOtherProc.Name = "btnOtherProc";
             this.btnOtherProc.Size = new System.Drawing.Size(160, 30);
@@ -4009,7 +4010,7 @@
             this.Controls.Add(this.btnDataEntry);
             this.Controls.Add(this.btnEnd);
             this.Controls.Add(this.label1);
-            this.Font = new System.Drawing.Font("ï¼­ï¼³ ï¼°ã‚´ã‚·ãƒƒã‚¯", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
+            this.Font = new System.Drawing.Font("ï¼­ï¼³ æ˜Žæœ�", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
             this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Fixed3D;
             this.KeyPreview = true;
             this.Name = "FrmConstructionBaseInfo";
Index: branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionBaseInfo/FrmConstructionBaseInfoAuxiliary.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionBaseInfo/FrmConstructionBaseInfoAuxiliary.cs	(revision 282)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionBaseInfo/FrmConstructionBaseInfoAuxiliary.cs	(revision 283)
@@ -720,9 +720,9 @@
                 strSQL.Append(", DATE_FORMAT(A.EntryDate, '%Y/%m/%d') AS PetitionDate");
                 strSQL.Append(", DATE_FORMAT(A.PetitionApprovalDate, '%Y/%m/%d') AS ApprovalDate");
                 strSQL.Append(", B.INVOICENO");
-                strSQL.Append(", ifnull(DATE_FORMAT(C.CRETATEDATE, '%Y/%m/%d'), '0001/01/01') AS PrintoutDate");
-                strSQL.Append(", ifnull(DATE_FORMAT(C.REQUESTDATE, '%Y/%m/%d'), '0001/01/01') AS RequestDate");
-                strSQL.Append(", ifnull(DATE_FORMAT(D.SendDate, '%Y/%m/%d'), '0001/01/01') AS SendDate");
+                strSQL.AppendFormat(", ifnull(DATE_FORMAT(C.CRETATEDATE, '%Y/%m/%d'), '{0}') AS PrintoutDate", DateTime.MinValue.ToShortDateString());
+                strSQL.AppendFormat(", ifnull(DATE_FORMAT(C.REQUESTDATE, '%Y/%m/%d'), '{0}') AS RequestDate", DateTime.MinValue.ToShortDateString());
+                strSQL.AppendFormat(", ifnull(DATE_FORMAT(D.SendDate, '%Y/%m/%d'), '{0}') AS SendDate", DateTime.MinValue.ToShortDateString());
                 strSQL.Append(" FROM");
                 strSQL.Append(" processapproval AS A");
                 strSQL.Append(" LEFT JOIN requesthead AS B");
@@ -3280,16 +3280,23 @@
                 if (!ConstructionBaseInfoDataEntry(cbiDB, cpdDB))
                 {
                     MessageBox.Show("�HŽ–Šî–{�î•ñƒf�[ƒ^“o˜^ƒGƒ‰�[‚Å‚·�B", "“o˜^ƒGƒ‰�[", MessageBoxButtons.OK, MessageBoxIcon.Error);
-                    cbiDB.rollback();
-                    cpdDB.rollback();
+                    RollBackCommitProc(true,
+                                        cbiDB, cbidDB, cpdDB, cbLinkDB,
+                                        ApprovalDB, PersonDB,
+                                        BudgetDB, BudgetDDB,
+                                        LedgerDB, LedgerDDB, LedgerEDB);
+
                     return false;
                 }
                 if (!ConstructionBaseInfoDetailDataEntry(cbidDB))
                 {
                     MessageBox.Show("�HŽ–Šî–{�î•ñ–¾�×ƒf�[ƒ^“o˜^ƒGƒ‰�[‚Å‚·�B", "“o˜^ƒGƒ‰�[", MessageBoxButtons.OK, MessageBoxIcon.Error);
-                    cbiDB.rollback();
-                    cbidDB.rollback();
-                    cpdDB.rollback();
+                    RollBackCommitProc(true,
+                                        cbiDB, cbidDB, cpdDB, cbLinkDB,
+                                        ApprovalDB, PersonDB,
+                                        BudgetDB, BudgetDDB,
+                                        LedgerDB, LedgerDDB, LedgerEDB);
+
                     return false;
                 }
 
@@ -3299,10 +3306,12 @@
                 if (!GetFluctuationParent(cbiDB, cbLinkDB, TyingDataFlag, ref ParentData, ref ProcConstrCode))
                 {
                     MessageBox.Show("—\ŽZ�‘�E‘ä’ •Ï�X—pƒf�[ƒ^Žæ“¾ƒGƒ‰�[‚Å‚·�B", "Žæ“¾ƒGƒ‰�[", MessageBoxButtons.OK, MessageBoxIcon.Error);
-                    cbiDB.rollback();
-                    cbidDB.rollback();
-                    cpdDB.rollback();
-                    cbLinkDB.rollback();
+                    RollBackCommitProc(true,
+                                        cbiDB, cbidDB, cpdDB, cbLinkDB,
+                                        ApprovalDB, PersonDB,
+                                        BudgetDB, BudgetDDB,
+                                        LedgerDB, LedgerDDB, LedgerEDB);
+
                     return false;
                 }
 
@@ -3314,15 +3323,12 @@
                 if (!BudgetDataChange(ApprovalDB, BudgetDB, BudgetDDB, PersonDB, ParentData, ProcConstrCode, TyingDataFlag))
                 {
                     MessageBox.Show("�HŽ–—\ŽZ�‘ƒf�[ƒ^�X�VƒGƒ‰�[‚Å‚·�B", "�X�VƒGƒ‰�[", MessageBoxButtons.OK, MessageBoxIcon.Error);
-                    cbiDB.rollback();
-                    cbidDB.rollback();
-                    cpdDB.rollback();
-                    cbLinkDB.rollback();
+                    RollBackCommitProc(true,
+                                        cbiDB, cbidDB, cpdDB, cbLinkDB,
+                                        ApprovalDB, PersonDB,
+                                        BudgetDB, BudgetDDB,
+                                        LedgerDB, LedgerDDB, LedgerEDB);
 
-                    ApprovalDB.rollback();
-                    BudgetDB.rollback();
-                    BudgetDDB.rollback();
-                    PersonDB.rollback();
                     return false;
                 }
 
@@ -3332,34 +3338,27 @@
                     if (!UpdateConstrEndDate(cbiDB))
                     {
                         MessageBox.Show("�HŽ–�î•ñ‚Ì‰„’·�HŠú“o˜^ƒGƒ‰�[‚Å‚·�B", "“o˜^ƒGƒ‰�[", MessageBoxButtons.OK, MessageBoxIcon.Error);
-                        cbiDB.rollback();
-                        cbidDB.rollback();
-                        cpdDB.rollback();
-                        cbLinkDB.rollback();
+                        RollBackCommitProc(true,
+                                            cbiDB, cbidDB, cpdDB, cbLinkDB,
+                                            ApprovalDB, PersonDB,
+                                            BudgetDB, BudgetDDB,
+                                            LedgerDB, LedgerDDB, LedgerEDB);
+
                         return false;
                     }
                 }
 
                 // �HŽ–�Ú�×‘ä’ ƒf�[ƒ^�X�V
-                if (!LedgerDataChange(LedgerDB, LedgerDDB,
+                if (!LedgerDataChange(LedgerDB, LedgerDDB, LedgerEDB,
                                         TotalOrdersPrice, TyingDataFlag, ParentData, ProcConstrCode, frm, ref ProcConstrCode))
                 {
                     MessageBox.Show("�HŽ–�Ú�×‘ä’ ƒf�[ƒ^�X�VƒGƒ‰�[‚Å‚·�B", "�X�VƒGƒ‰�[", MessageBoxButtons.OK, MessageBoxIcon.Error);
-                    cbiDB.rollback();
-                    cbidDB.rollback();
-                    cpdDB.rollback();
-                    cbLinkDB.rollback();
+                    RollBackCommitProc(true,
+                                        cbiDB, cbidDB, cpdDB, cbLinkDB,
+                                        ApprovalDB, PersonDB,
+                                        BudgetDB, BudgetDDB,
+                                        LedgerDB, LedgerDDB, LedgerEDB);
 
-                    ApprovalDB.rollback();
-                    PersonDB.rollback();
-
-                    BudgetDB.rollback();
-                    BudgetDDB.rollback();
-
-                    LedgerDB.rollback();
-                    LedgerDDB.rollback();
-                    LedgerEDB.rollback();
-
                     return false;
                 }
 
@@ -3367,38 +3366,22 @@
                 if (!ClsChangeBaseInfoData.SetParentConstrStatus(cbiDB, m_ConstructionCode))
                 {
                     MessageBox.Show("Œ‹�‡�HŽ–�i’»�X�VƒGƒ‰�[‚Å‚·�B", "�X�VƒGƒ‰�[", MessageBoxButtons.OK, MessageBoxIcon.Error);
-                    cbiDB.rollback();
-                    cbidDB.rollback();
-                    cpdDB.rollback();
-                    cbLinkDB.rollback();
+                    RollBackCommitProc(true,
+                                        cbiDB, cbidDB, cpdDB, cbLinkDB,
+                                        ApprovalDB, PersonDB,
+                                        BudgetDB, BudgetDDB,
+                                        LedgerDB, LedgerDDB, LedgerEDB);
 
-                    ApprovalDB.rollback();
-                    PersonDB.rollback();
-
-                    BudgetDB.rollback();
-                    BudgetDDB.rollback();
-
-                    LedgerDB.rollback();
-                    LedgerDDB.rollback();
-                    LedgerEDB.rollback();
+                    return false;
                 }
 
-                // DB“o˜^
-                cbiDB.commit();
-                cbidDB.commit();
-                cpdDB.commit();
-                cbLinkDB.commit();
+                // DBCommit
+                RollBackCommitProc(false,
+                                    cbiDB, cbidDB, cpdDB, cbLinkDB,
+                                    ApprovalDB, PersonDB,
+                                    BudgetDB, BudgetDDB,
+                                    LedgerDB, LedgerDDB, LedgerEDB);
 
-                ApprovalDB.commit();
-                PersonDB.commit();
-
-                BudgetDB.commit();
-                BudgetDDB.commit();
-
-                LedgerDB.commit();
-                LedgerDDB.commit();
-                LedgerEDB.commit();
-
                 // �HŽ–ƒR�[ƒh‚ÌƒZƒbƒg
                 frm.ConstructionCode = ProcConstrCode;
 
@@ -3443,6 +3426,61 @@
         }
         #endregion
 
+        #region “o˜^ŽžˆêŠ‡RollBack�ECommit�ˆ—�
+        /// <summary>
+        /// “o˜^ŽžˆêŠ‡RollBack�ECommit�ˆ—�
+        /// </summary>
+        private void RollBackCommitProc(bool bRollBack,
+                                        IOConstructionBaseInfo cbiDB,           // �HŽ–Šî–{�î•ñ
+                                        IOConstructionBaseInfoDetail cbidDB,    // �HŽ–Šî–{�î•ñ–¾�×
+                                        IOConstructionProgressDate cpdDB,       // ˆÄŒ��i’»“ú•tƒf�[ƒ^
+                                        IOConstructionLink cbLinkDB,            // �HŽ–‘�Œ¸�î•ñ
+                                        IOProcessApproval ApprovalDB,           // �³”Fƒf�[ƒ^
+                                        IOMPersonInCharge PersonDB,             // ’S“–ŽÒƒ}ƒXƒ^
+                                        IOConstructionBudget BudgetDB,          // �HŽ–—\ŽZ�‘ƒf�[ƒ^
+                                        IOConstructionBudgetDetail BudgetDDB,   // �HŽ–—\ŽZ�‘–¾�×ƒf�[ƒ^
+                                        IOConstructionLedger LedgerDB,          // �HŽ–�Ú�×‘ä’ ƒf�[ƒ^
+                                        IOConstructionLedgerDetail LedgerDDB,   // �HŽ–�Ú�×‘ä’ –¾�×ƒf�[ƒ^
+                                        IOConstructionLedgerExcute LedgerEDB    // �HŽ–�Ú�×‘ä’ Žx•¥‚¢ƒf�[ƒ^
+                                        )
+        {
+            try
+            {
+                if (bRollBack)
+                {
+                    cbiDB.rollback();
+                    cbidDB.rollback();
+                    cpdDB.rollback();
+                    cbLinkDB.rollback();
+                    ApprovalDB.rollback();
+                    PersonDB.rollback();
+                    BudgetDB.rollback();
+                    BudgetDDB.rollback();
+                    LedgerDB.rollback();
+                    LedgerDDB.rollback();
+                    LedgerEDB.rollback();
+                }
+
+                // DB“o˜^
+                cbiDB.commit();
+                cbidDB.commit();
+                cpdDB.commit();
+                cbLinkDB.commit();
+                ApprovalDB.commit();
+                PersonDB.commit();
+                BudgetDB.commit();
+                BudgetDDB.commit();
+                LedgerDB.commit();
+                LedgerDDB.commit();
+                LedgerEDB.commit();
+            }
+            catch (System.Exception ex)
+            {
+                logger.ErrorFormat("ƒVƒXƒeƒ€ƒGƒ‰�[�F{0}�F{1}", CommonMotions.GetMethodName(), ex.Message);
+            }
+        }
+        #endregion
+
         #region ƒf�[ƒ^�í�œ�ˆ—�
         /// <summary>
         /// �í�œƒ{ƒ^ƒ“‰Ÿ‰ºŒã‚Ì�í�œ�ˆ—�
Index: branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionBudget/FrmConstructionBudgetAuxiliary.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionBudget/FrmConstructionBudgetAuxiliary.cs	(revision 282)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionBudget/FrmConstructionBudgetAuxiliary.cs	(revision 283)
@@ -4405,13 +4405,12 @@
                 frm.StartupSource = (int)ClsExcute.ProcessExecuteNo.ConstructionBudget;
                 //frm.ShowInTaskbar = false;
                 frm.ShowDialog();
-                if (frm.EndButton == System.Windows.Forms.DialogResult.OK)
-                {
-                    SubContractorMaster selRec = frm.SelectData;
-                    dgv.CurrentRow.Cells[(int)GridColumn.CompanyType].Value = frm.DataType;
-                    dgv.CurrentRow.Cells[(int)GridColumn.CompanyCode].Value = selRec.CompanyCode;
-                    dgv.CurrentRow.Cells[(int)GridColumn.CompanyName].Value = selRec.CompanyName;
-                }
+                if (frm.EndButton != System.Windows.Forms.DialogResult.OK) return;
+
+                SubContractorMaster selRec = frm.SelectData;
+                dgv.CurrentRow.Cells[(int)GridColumn.CompanyType].Value = frm.DataType;
+                dgv.CurrentRow.Cells[(int)GridColumn.CompanyCode].Value = selRec.CompanyCode;
+                dgv.CurrentRow.Cells[(int)GridColumn.CompanyName].Value = selRec.CompanyName;
             }
             catch (System.Exception ex)
             {
Index: branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionJoin/FrmConstructionJoinAuxiliary.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionJoin/FrmConstructionJoinAuxiliary.cs	(revision 282)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionJoin/FrmConstructionJoinAuxiliary.cs	(revision 283)
@@ -661,7 +661,7 @@
 
                 frm.ShowDialog();
                 // çµ‚äº†ã‚³ãƒ¼ãƒ‰ç¢ºèª�
-                if (frm.EndButton == DialogResult.No) return;
+                if (DialogResult.Cancel.Equals(frm.EndButton)) return;
 
                 bool bCheck = true;
                 if (m_OrderersDivision != 0 && m_OrderersDivision != frm.OrderCotegory) bCheck = false;
Index: branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionLedger/FrmConstructionLedgerAuxiliary.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionLedger/FrmConstructionLedgerAuxiliary.cs	(revision 282)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionLedger/FrmConstructionLedgerAuxiliary.cs	(revision 283)
@@ -4292,8 +4292,9 @@
                 int PaymentBurdenCol = dgv.ColumnCount + (int)ColPayTotal.PaymentBurdens;
                 int RowLineCnt = 0;
                 int nOldLineCnt = 0;
+                int nWrkCompanyCode = 0;
                 List<ConstructionLedgerDetail> NewList = new List<ConstructionLedgerDetail>();
-                List<KeyValuePair<int, int>> PDetailList = new List<KeyValuePair<int, int>>();
+                ArrayList PDetailList = new ArrayList();
 
                 foreach (DataGridViewRow wrkRow in dgv.Rows)
                 {
@@ -4341,13 +4342,16 @@
                     CreateInsertRowData(wrkRow, RowLineCnt, ref NewList);
 
                     // æ˜Žç´°è¡Œã�®ä½�ç½®ã�Œå¤‰ã‚�ã�£ã�¦ã�„ã‚‹ã�‹ã�®åˆ¤å®š
-                    if (CommonMotions.chkObjectIsNull(wrkRow.Cells[(int)GridColumn.DataLineCount].Value)) continue;
                     nOldLineCnt = CommonMotions.cnvInt(wrkRow.Cells[(int)GridColumn.DataLineCount].Value);
                     if (nOldLineCnt == 0) continue;
                     if (nOldLineCnt == RowLineCnt) continue;
 
+                    // å�”åŠ›ä¼šç¤¾å®šç¾©ã�ªã�—ã�¯å‡¦ç�†ã�—ã�ªã�„
+                    nWrkCompanyCode = CommonMotions.cnvInt(wrkRow.Cells[(int)GridColumn.CompanyCode].Value);
+                    if (nWrkCompanyCode < 1) continue;
+
                     // æ˜Žç´°è¡Œã�®ä½�ç½®ã�Œå¤‰ã‚�ã�£ã�¦ã�„ã�Ÿæ™‚ã�¯ãƒªã‚¹ãƒˆã�«è¿½åŠ ã�™ã‚‹
-                    PDetailList.Add(new KeyValuePair<int, int>(nOldLineCnt, RowLineCnt));
+                    PDetailList.Add(new object[] { nWrkCompanyCode, nOldLineCnt, RowLineCnt });
 
                 } // iRows
 
@@ -4592,32 +4596,54 @@
         /// <summary>
         /// æ³¨æ–‡æ›¸æ˜Žç´°å�°å¸³è¡Œç•ªå�·æ›´æ–°
         /// </summary>
-        private bool SetPurchaseOrderDetailLineCount(IOPurchaseOrderDetail PDetailDB, List<KeyValuePair<int, int>> PDetailList)
+        private bool SetPurchaseOrderDetailLineCount(IOPurchaseOrderDetail PDetailDB, ArrayList PDetailList)
         {
             try
             {
                 StringBuilder strSQL = new StringBuilder();
-                List<PurchaseOrderDetail> DataList = new List<PurchaseOrderDetail>();
-                foreach (KeyValuePair<int, int> CurCount in PDetailList)
+                ArrayList DataList = new ArrayList();
+                // è¡Œç•ªå�·ã‚’å¾Œã‚�ã�‹ã‚‰ã�«ã�™ã‚‹
+                PDetailList.Reverse();
+                foreach (object[] CurCount in PDetailList)
                 {
                     // è¡Œç•ªå�·å¤‰åŒ–ãƒªã‚¹ãƒˆã‚ˆã‚Šæ›´æ–°ã‚’è¡Œã�†
                     strSQL.Clear();
-                    strSQL.AppendFormat(" Where SourceCode = {0}", m_ConstructionCode);
-                    strSQL.AppendFormat(" And SourceLineCnt = {0}", CurCount.Key);
+
+                    strSQL.Append("Select");
+                    strSQL.Append(" A.ConstructionCode,");
+                    strSQL.Append(" A.SeqNo,");
+                    strSQL.Append(" A.GroupCount,");
+                    strSQL.Append(" A.LineCount,");
+                    strSQL.Append(" A.SourceCode,");
+                    strSQL.Append(" A.SourceLineCnt,");
+                    strSQL.Append(" A.ConstructionCode");
+                    strSQL.Append(" From purchaseorderdetail as A");
+                    strSQL.Append(", purchaseorder as B");
+                    strSQL.AppendFormat(" Where A.ConstructionCode = {0}", m_ConstructionCode);
+                    strSQL.AppendFormat(" And A.SourceCode = {0}", m_ConstructionCode);
+                    strSQL.AppendFormat(" And A.SourceLineCnt = {0}", CommonMotions.cnvInt(CurCount[1]));
+                    strSQL.Append(" And B.ConstructionCode = A.ConstructionCode");
+                    strSQL.Append(" And B.SeqNo = A.SeqNo");
+                    strSQL.AppendFormat(" And B.CompanyCode = {0}", CommonMotions.cnvInt(CurCount[0]));
+                    strSQL.Append(" Order by A.SeqNo");
+
                     DataList.Clear();
-                    if (!PDetailDB.SelectAction(strSQL.ToString(), ref DataList, false)) return false;
+                    if (!PDetailDB.ExecuteReader(strSQL.ToString(), ref DataList, false)) return false;
                     // æ³¨æ–‡æ›¸ã�Œç„¡ã�„å ´å�ˆã�¯å‡¦ç�†ã�—ã�ªã�„
                     if (DataList.Count == 0) continue;
+                    // æ³¨æ–‡æ›¸ã�Œ2è¡Œä»¥ä¸Šã�‚ã‚‹å ´å�ˆã�¯å¤‰æ›´å¾Œã�®å ´å�ˆã�Œã�‚ã‚‹ã�®ã�§å‡¦ç�†ã�—ã�ªã�„
+                    if (DataList.Count > 1) continue;
 
+                    object[] RefRec = (object[])DataList[0];
                     // æ³¨æ–‡æ›¸ã�Œã�‚ã‚Œã�°è¡Œç•ªå�·ã‚’æ›´æ–°ã�™ã‚‹
                     strSQL.Clear();
                     strSQL.Append("UPDATE PurchaseOrderDetail");
                     strSQL.Append(" SET");
-                    strSQL.AppendFormat(" SourceLineCnt = {0}", CurCount.Value);
-                    strSQL.Append(PDetailDB.CreatePrimarykeyString(DataList[0].ConstructionCode,
-                                                                    DataList[0].SeqNo,
-                                                                    DataList[0].GroupCount,
-                                                                    DataList[0].LineCount));
+                    strSQL.AppendFormat(" SourceLineCnt = {0}", CommonMotions.cnvInt(CurCount[2]));
+                    strSQL.Append(PDetailDB.CreatePrimarykeyString(CommonMotions.cnvInt(RefRec[0]),
+                                                                    CommonMotions.cnvInt(RefRec[1]),
+                                                                    CommonMotions.cnvInt(RefRec[2]),
+                                                                    CommonMotions.cnvInt(RefRec[3])));
                     if (!PDetailDB.ExecuteNonQuery(strSQL.ToString(), false)) return false;
                 }
                 return true;
@@ -4634,18 +4660,19 @@
         /// <summary>
         /// æ¥­è€…è«‹æ±‚æ˜Žç´°å�°å¸³è¡Œç•ªå�·æ›´æ–°
         /// </summary>
-        private bool SetBillingDataDetailLineCount(IOBillingDataDetail BDetailDB, List<KeyValuePair<int, int>> PDetailList)
+        private bool SetBillingDataDetailLineCount(IOBillingDataDetail BDetailDB, ArrayList PDetailList)
         {
             try
             {
                 StringBuilder strSQL = new StringBuilder();
                 List<BillingDataDetail> DataList = new List<BillingDataDetail>();
-                foreach (KeyValuePair<int, int> CurCount in PDetailList)
+                foreach (object[] CurCount in PDetailList)
                 {
                     // è¡Œç•ªå�·å¤‰åŒ–ãƒªã‚¹ãƒˆã‚ˆã‚Šæ›´æ–°ã‚’è¡Œã�†
                     strSQL.Clear();
-                    strSQL.AppendFormat(" Where CONSTRUCTIONCODE = {0}", m_ConstructionCode);
-                    strSQL.AppendFormat(" And CONSTRUCTIONROWCNT = {0}", CurCount.Key);
+                    strSQL.AppendFormat(" Where COMPANYCODE = {0}", CommonMotions.cnvInt(CurCount[0]));
+                    strSQL.AppendFormat(" And CONSTRUCTIONCODE = {0}", m_ConstructionCode);
+                    strSQL.AppendFormat(" And CONSTRUCTIONROWCNT = {0}", CommonMotions.cnvInt(CurCount[1]));
                     DataList.Clear();
                     if (!BDetailDB.SelectAction(strSQL.ToString(), ref DataList, false)) return false;
                     // æ³¨æ–‡æ›¸ã�Œç„¡ã�„å ´å�ˆã�¯å‡¦ç�†ã�—ã�ªã�„
@@ -4655,7 +4682,7 @@
                     strSQL.Clear();
                     strSQL.Append("UPDATE billingdatadetail");
                     strSQL.Append(" SET");
-                    strSQL.AppendFormat(" CONSTRUCTIONROWCNT = {0}", CurCount.Value);
+                    strSQL.AppendFormat(" CONSTRUCTIONROWCNT = {0}", CommonMotions.cnvInt(CurCount[2]));
                     strSQL.Append(BDetailDB.CreatePrimarykeyString(DataList[0].CompanyCode,
                                                                     DataList[0].TargetDate,
                                                                     DataList[0].SeqNo,
@@ -5032,14 +5059,13 @@
                 frm.StartupSource = (int)ClsExcute.ProcessExecuteNo.ConstructionLedger;
                 //frm.ShowInTaskbar = false;
                 frm.ShowDialog();
-                if (frm.EndButton == System.Windows.Forms.DialogResult.OK)
-                {
-                    SubContractorMaster selRec = frm.SelectData;
-                    dgv.CurrentRow.Cells[(int)GridColumn.CompanyType].Value = frm.DataType;
-                    dgv.CurrentRow.Cells[(int)GridColumn.CompanyCode].Value = selRec.CompanyCode;
-                    dgv.CurrentRow.Cells[(int)GridColumn.CompanyName].Value = selRec.CompanyName;
-                    m_bChengeAns = true;
-                }
+                if (frm.EndButton != System.Windows.Forms.DialogResult.OK) return;
+
+                SubContractorMaster selRec = frm.SelectData;
+                dgv.CurrentRow.Cells[(int)GridColumn.CompanyType].Value = frm.DataType;
+                dgv.CurrentRow.Cells[(int)GridColumn.CompanyCode].Value = selRec.CompanyCode;
+                dgv.CurrentRow.Cells[(int)GridColumn.CompanyName].Value = selRec.CompanyName;
+                m_bChengeAns = true;
             }
             catch (System.Exception ex)
             {
Index: branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionLedgerList/FrmConstructionLedgerList.designer.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionLedgerList/FrmConstructionLedgerList.designer.cs	(revision 282)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionLedgerList/FrmConstructionLedgerList.designer.cs	(revision 283)
@@ -571,7 +571,7 @@
             // 
             this.label11.AutoSize = true;
             this.label11.BackColor = System.Drawing.Color.PaleGoldenrod;
-            this.label11.Font = new System.Drawing.Font("ï¼­ï¼³ ï¼°ã‚´ã‚·ãƒƒã‚¯", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
+            this.label11.Font = new System.Drawing.Font("ï¼­ï¼³ æ˜Žæœ�", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
             this.label11.ForeColor = System.Drawing.Color.Black;
             this.label11.Location = new System.Drawing.Point(645, 34);
             this.label11.Name = "label11";
@@ -609,7 +609,7 @@
             // 
             this.lblPlusorMinus2.AutoSize = true;
             this.lblPlusorMinus2.BackColor = System.Drawing.Color.PaleGoldenrod;
-            this.lblPlusorMinus2.Font = new System.Drawing.Font("ï¼­ï¼³ ï¼°ã‚´ã‚·ãƒƒã‚¯", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
+            this.lblPlusorMinus2.Font = new System.Drawing.Font("ï¼­ï¼³ æ˜Žæœ�", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
             this.lblPlusorMinus2.ForeColor = System.Drawing.Color.Black;
             this.lblPlusorMinus2.Location = new System.Drawing.Point(338, 59);
             this.lblPlusorMinus2.Name = "lblPlusorMinus2";
@@ -622,7 +622,7 @@
             // 
             this.label16.AutoSize = true;
             this.label16.BackColor = System.Drawing.Color.PaleGoldenrod;
-            this.label16.Font = new System.Drawing.Font("ï¼­ï¼³ ï¼°ã‚´ã‚·ãƒƒã‚¯", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
+            this.label16.Font = new System.Drawing.Font("ï¼­ï¼³ æ˜Žæœ�", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
             this.label16.ForeColor = System.Drawing.Color.Black;
             this.label16.Location = new System.Drawing.Point(645, 59);
             this.label16.Name = "label16";
@@ -635,7 +635,7 @@
             // 
             this.lblPlusorMinus1.AutoSize = true;
             this.lblPlusorMinus1.BackColor = System.Drawing.Color.PaleGoldenrod;
-            this.lblPlusorMinus1.Font = new System.Drawing.Font("ï¼­ï¼³ ï¼°ã‚´ã‚·ãƒƒã‚¯", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
+            this.lblPlusorMinus1.Font = new System.Drawing.Font("ï¼­ï¼³ æ˜Žæœ�", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
             this.lblPlusorMinus1.ForeColor = System.Drawing.Color.Black;
             this.lblPlusorMinus1.Location = new System.Drawing.Point(338, 34);
             this.lblPlusorMinus1.Name = "lblPlusorMinus1";
@@ -660,7 +660,7 @@
             // 
             this.label12.AutoSize = true;
             this.label12.BackColor = System.Drawing.Color.PaleGoldenrod;
-            this.label12.Font = new System.Drawing.Font("ï¼­ï¼³ ï¼°ã‚´ã‚·ãƒƒã‚¯", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
+            this.label12.Font = new System.Drawing.Font("ï¼­ï¼³ æ˜Žæœ�", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
             this.label12.ForeColor = System.Drawing.Color.Black;
             this.label12.Location = new System.Drawing.Point(338, 7);
             this.label12.Name = "label12";
@@ -736,7 +736,7 @@
             // 
             this.label13.AutoSize = true;
             this.label13.BackColor = System.Drawing.Color.PaleGoldenrod;
-            this.label13.Font = new System.Drawing.Font("ï¼­ï¼³ ï¼°ã‚´ã‚·ãƒƒã‚¯", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
+            this.label13.Font = new System.Drawing.Font("ï¼­ï¼³ æ˜Žæœ�", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
             this.label13.ForeColor = System.Drawing.Color.Black;
             this.label13.Location = new System.Drawing.Point(645, 7);
             this.label13.Name = "label13";
Index: branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionLedgerList/FrmConstructionLedgerListAuxiliary.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionLedgerList/FrmConstructionLedgerListAuxiliary.cs	(revision 282)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionLedgerList/FrmConstructionLedgerListAuxiliary.cs	(revision 283)
@@ -586,8 +586,8 @@
                 strSQL.Append(" WHERE A.CONSTRUCTIONCODE = B.CONSTRUCTIONCODE");
                 strSQL.AppendFormat(" AND A.CONSTRUCTIONPERIOD = {0}", numUDConstPro.Value);
                 if (PersonCode != 0) strSQL.AppendFormat(" AND B.CONSTRSUBPERSONCODE = {0}", PersonCode);
-                strSQL.Append(" AND DATE_FORMAT(B.CONSTRUCTIONPERIODSTART,'%Y/%m/%d') != '0001/01/01'");
-                strSQL.Append(" AND DATE_FORMAT(B.CONSTRUCTIONPERIODEND,'%Y/%m/%d') != '0001/01/01'");
+                strSQL.AppendFormat(" AND DATE_FORMAT(B.CONSTRUCTIONPERIODSTART,'%Y/%m/%d') != '{0}'", DateTime.MinValue.ToShortDateString());
+                strSQL.AppendFormat(" AND DATE_FORMAT(B.CONSTRUCTIONPERIODEND,'%Y/%m/%d') != '{0}'", DateTime.MinValue.ToShortDateString());
                 ArrayList arList = new ArrayList();
                 if (!BaseDB.ExecuteReader(strSQL.ToString(), ref arList)) return;
 
Index: branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/DRWork/FrmDRWorkAuxiliary.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/DRWork/FrmDRWorkAuxiliary.cs	(revision 282)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/DRWork/FrmDRWorkAuxiliary.cs	(revision 283)
@@ -2220,11 +2220,11 @@
                 frm.PersonCharge = (int)FrmConstructionDiag.PersonChargePoint.Construction;
                 frm.PersonCode = PersonCode;
                 frm.ProcessNo = (int)ClsExcute.ProcessExecuteNo.TAndPCosts;
-                frm.SelectType = (int)FrmConstructionDiag.SelectConstructionType.Ongoing;
+                frm.SelectType = (int)FrmConstructionDiag.SelectConstructionType.OwnOngoing;
 
                 frm.ShowDialog();
                 // çµ‚äº†ã‚³ãƒ¼ãƒ‰ç¢ºèª�
-                if (frm.EndButton == DialogResult.No) return;
+                if (DialogResult.Cancel.Equals(frm.EndButton)) return;
 
                 // å·¥äº‹ã‚³ãƒ¼ãƒ‰ã‚»ãƒƒãƒˆ
                 dgvRow.Cells[(int)GridColumn01.ConstractionCode].Value = frm.ConstructionCode;
Index: branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/DepExpenssList/FrmDepExpenssList.designer.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/DepExpenssList/FrmDepExpenssList.designer.cs	(revision 282)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/DepExpenssList/FrmDepExpenssList.designer.cs	(revision 283)
@@ -275,7 +275,7 @@
             // 
             this.label11.AutoSize = true;
             this.label11.BackColor = System.Drawing.Color.LightSteelBlue;
-            this.label11.Font = new System.Drawing.Font("ï¼­ï¼³ ï¼°ã‚´ã‚·ãƒƒã‚¯", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
+            this.label11.Font = new System.Drawing.Font("ï¼­ï¼³ æ˜Žæœ�", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
             this.label11.ForeColor = System.Drawing.Color.Black;
             this.label11.Location = new System.Drawing.Point(645, 34);
             this.label11.Name = "label11";
@@ -313,7 +313,7 @@
             // 
             this.lblPlusorMinus2.AutoSize = true;
             this.lblPlusorMinus2.BackColor = System.Drawing.Color.LightSteelBlue;
-            this.lblPlusorMinus2.Font = new System.Drawing.Font("ï¼­ï¼³ ï¼°ã‚´ã‚·ãƒƒã‚¯", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
+            this.lblPlusorMinus2.Font = new System.Drawing.Font("ï¼­ï¼³ æ˜Žæœ�", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
             this.lblPlusorMinus2.ForeColor = System.Drawing.Color.Black;
             this.lblPlusorMinus2.Location = new System.Drawing.Point(338, 59);
             this.lblPlusorMinus2.Name = "lblPlusorMinus2";
@@ -326,7 +326,7 @@
             // 
             this.label16.AutoSize = true;
             this.label16.BackColor = System.Drawing.Color.LightSteelBlue;
-            this.label16.Font = new System.Drawing.Font("ï¼­ï¼³ ï¼°ã‚´ã‚·ãƒƒã‚¯", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
+            this.label16.Font = new System.Drawing.Font("ï¼­ï¼³ æ˜Žæœ�", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
             this.label16.ForeColor = System.Drawing.Color.Black;
             this.label16.Location = new System.Drawing.Point(645, 59);
             this.label16.Name = "label16";
@@ -339,7 +339,7 @@
             // 
             this.lblPlusorMinus1.AutoSize = true;
             this.lblPlusorMinus1.BackColor = System.Drawing.Color.LightSteelBlue;
-            this.lblPlusorMinus1.Font = new System.Drawing.Font("ï¼­ï¼³ ï¼°ã‚´ã‚·ãƒƒã‚¯", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
+            this.lblPlusorMinus1.Font = new System.Drawing.Font("ï¼­ï¼³ æ˜Žæœ�", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
             this.lblPlusorMinus1.ForeColor = System.Drawing.Color.Black;
             this.lblPlusorMinus1.Location = new System.Drawing.Point(338, 34);
             this.lblPlusorMinus1.Name = "lblPlusorMinus1";
@@ -364,7 +364,7 @@
             // 
             this.label12.AutoSize = true;
             this.label12.BackColor = System.Drawing.Color.LightSteelBlue;
-            this.label12.Font = new System.Drawing.Font("ï¼­ï¼³ ï¼°ã‚´ã‚·ãƒƒã‚¯", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
+            this.label12.Font = new System.Drawing.Font("ï¼­ï¼³ æ˜Žæœ�", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
             this.label12.ForeColor = System.Drawing.Color.Black;
             this.label12.Location = new System.Drawing.Point(338, 7);
             this.label12.Name = "label12";
@@ -440,7 +440,7 @@
             // 
             this.label13.AutoSize = true;
             this.label13.BackColor = System.Drawing.Color.LightSteelBlue;
-            this.label13.Font = new System.Drawing.Font("ï¼­ï¼³ ï¼°ã‚´ã‚·ãƒƒã‚¯", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
+            this.label13.Font = new System.Drawing.Font("ï¼­ï¼³ æ˜Žæœ�", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
             this.label13.ForeColor = System.Drawing.Color.Black;
             this.label13.Location = new System.Drawing.Point(645, 7);
             this.label13.Name = "label13";
Index: branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/PurchaseOrderEntry/FrmOrderEntryListAuxiliary.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/PurchaseOrderEntry/FrmOrderEntryListAuxiliary.cs	(revision 282)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/PurchaseOrderEntry/FrmOrderEntryListAuxiliary.cs	(revision 283)
@@ -192,7 +192,7 @@
                 strSQL.Append(", 0 AS SEQNO");
                 strSQL.Append(", A.LINECOUNT AS LINECOUNT");
                 strSQL.Append(", 0 AS ORDERNO");
-                strSQL.Append(", DATE ('0001/01/01') AS PRINTOUTDATE");
+                strSQL.AppendFormat(", DATE ('{0}') AS PRINTOUTDATE", DateTime.MinValue.ToShortDateString());
                 strSQL.Append(" FROM CONSTRUCTIONLEDGERDETAIL A");
 
                 strSQL.Append(" LEFT JOIN CONSTRUCTIONBASEINFODETAIL B ON B.CONSTRUCTIONCODE = A.SOURCECODE");
@@ -269,7 +269,7 @@
                 strSQL.AppendFormat(" AND A.COMPANYTYPE <> {0}", (int)CommonDefine.CodeDataType.Person);
                 strSQL.Append(" AND F.COMPANYCODE = A.COMPANYCODE)");
 
-                strSQL.Append(" ORDER BY PURCHASEORDERFLG ASC, SOURCECODE ASC, COMPANYCODE ASC, APPVAL ASC");
+                strSQL.Append(" ORDER BY ORDERNO DESC, PURCHASEORDERFLG ASC, SOURCECODE ASC, COMPANYCODE ASC, APPVAL ASC");
             }
             catch (Exception ex)
             {
Index: branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/PurchaseOrderStatus/FrmPurchaseOrderStatusAuxiliary.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/PurchaseOrderStatus/FrmPurchaseOrderStatusAuxiliary.cs	(revision 282)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/PurchaseOrderStatus/FrmPurchaseOrderStatusAuxiliary.cs	(revision 283)
@@ -368,12 +368,13 @@
             IOPurchaseOrder OrderDB = new IOPurchaseOrder();
             try
             {
-                string strSQL = "SELECT * FROM";
-                strSQL += string.Format(" (SELECT COUNT(*) FROM PURCHASEORDER A1 WHERE CONSTRUCTIONCODE = {0}) A,", TargetCode);
-                //strSQL += string.Format(" (SELECT COUNT(*) FROM PURCHASEORDER B1 WHERE CONSTRUCTIONCODE = {0} AND PRINTOUTDATE != TO_DATE('0001/01/01')) B", TargetCode);
-                strSQL += string.Format(" (SELECT COUNT(*) FROM PURCHASEORDER B1 WHERE CONSTRUCTIONCODE = {0} AND DATE(PRINTOUTDATE) != STR_TO_DATE('0001/01/01', '%Y/%m/%d')) B", TargetCode);
+                StringBuilder strSQL = new StringBuilder();
+                strSQL.Append("SELECT * FROM");
+                strSQL.AppendFormat(" (SELECT COUNT(*) FROM PURCHASEORDER A1 WHERE CONSTRUCTIONCODE = {0}) A,", TargetCode);
+                strSQL.AppendFormat(" (SELECT COUNT(*) FROM PURCHASEORDER B1 WHERE CONSTRUCTIONCODE = {0}", TargetCode);
+                strSQL.AppendFormat(" AND DATE(PRINTOUTDATE) != STR_TO_DATE('{0}', '%Y/%m/%d')) B", DateTime.MinValue.ToShortDateString());
                 ArrayList arList = new ArrayList();
-                if (!OrderDB.ExecuteReader(strSQL, ref arList)) return;
+                if (!OrderDB.ExecuteReader(strSQL.ToString(), ref arList)) return;
 
                 object[] objRec = (object[])arList[0];
                 AllCount = CommonMotions.cnvInt(objRec[0]);
Index: branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/FrmRegField.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/FrmRegField.cs	(revision 282)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/FrmRegField.cs	(revision 283)
@@ -188,45 +188,48 @@
                 frmConstructionDiag.PersonCode = CommonMotions.LoginUserData.PersonCode;
                 //frmConstructionDiag.PersonCharge = (int)FrmConstructionDiag.PersonChargePoint.Construction; //é–¢é€£å·¥äº‹ã�®ã�¿è¡¨ç¤ºã�™ã‚‹
                 frmConstructionDiag.PersonCharge = m_ConstructionFieldNameHeader.PersonCharge;
-                frmConstructionDiag.SelectType = (int)FrmConstructionDiag.SelectConstructionType.Ongoing;
+                frmConstructionDiag.SelectType = (int)FrmConstructionDiag.SelectConstructionType.OwnOngoing;
 
                 // ç�¾å ´é�¸æŠžç”»é�¢è¡¨ç¤º
                 frmConstructionDiag.ShowDialog();
 
-                // é�¸æŠžçµ�æžœåˆ¤å®š OKã�ªã‚‰ä»¥ä¸‹ã�®å‡¦ç�†ã‚’å®Ÿè¡Œã�™ã‚‹
-                if (frmConstructionDiag.EndButton == DialogResult.OK)
+                // çµ‚äº†ã‚³ãƒ¼ãƒ‰ç¢ºèª�
+                if (DialogResult.Cancel.Equals(frmConstructionDiag.EndButton)) return;
+
+                if (isExistConstructionRow(frmConstructionDiag.ConstructionCode) == true)
                 {
-                    if (isExistConstructionRow(frmConstructionDiag.ConstructionCode) == true)
+                    if (MessageBox.Show("æ—¢ã�«å�Œä¸€å·¥äº‹ã�Œå­˜åœ¨ã�—ã�¾ã�™ã�Œè¿½åŠ ã�—ã�¦ã‚ˆã‚�ã�—ã�„ã�§ã�™ã�‹ï¼Ÿ",
+                                        "ç�¾å ´è¿½åŠ ",
+                                        MessageBoxButtons.YesNo,
+                                        MessageBoxIcon.Question) == DialogResult.No)
                     {
-                        if (MessageBox.Show("æ—¢ã�«å�Œä¸€å·¥äº‹ã�Œå­˜åœ¨ã�—ã�¾ã�™ã�Œè¿½åŠ ã�—ã�¦ã‚ˆã‚�ã�—ã�„ã�§ã�™ã�‹ï¼Ÿ", "ç�¾å ´è¿½åŠ ", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No)
-                        {
-                            return;
-                        }
+                        return;
                     }
+                }
 
-                    // è¡Œç•ªå�·ä»˜ç•ª
-                    int rowCount = dgv1.RowCount - 1;
+                // è¡Œç•ªå�·ä»˜ç•ª
+                int rowCount = dgv1.RowCount - 1;
 
-                    // ç�¾å ´ã�®è¿½åŠ 
-                    dgv1.Rows.Add(frmConstructionDiag.ConstructionCode, rowCount, frmConstructionDiag.ConstructionName, 0, false, -1);
-                    dgv1.Rows[dgv1.RowCount - 1].Resizable = DataGridViewTriState.False;
-                    dgv1[(int)ColumnIndex.BillPrice, dgv1.RowCount - 1].ReadOnly = false;
-                    //dgv1[(int)ColumnIndex.BillPrice, dgv1.RowCount - 1].Style.Format = "#,0";
+                // ç�¾å ´ã�®è¿½åŠ 
+                dgv1.Rows.Add(frmConstructionDiag.ConstructionCode, rowCount, frmConstructionDiag.ConstructionName, 0, false, -1);
+                dgv1.Rows[dgv1.RowCount - 1].Resizable = DataGridViewTriState.False;
+                dgv1[(int)ColumnIndex.BillPrice, dgv1.RowCount - 1].ReadOnly = false;
+                //dgv1[(int)ColumnIndex.BillPrice, dgv1.RowCount - 1].Style.Format = "#,0";
 
-                    // ãƒ�ãƒƒã‚·ãƒ¥ãƒ†ãƒ¼ãƒ–ãƒ«ã�«è¿½åŠ 
-                    m_HtGridRowConstructionCode.Add(rowCount, dgv1.Rows[dgv1.RowCount - 1]);
+                // ãƒ�ãƒƒã‚·ãƒ¥ãƒ†ãƒ¼ãƒ–ãƒ«ã�«è¿½åŠ 
+                m_HtGridRowConstructionCode.Add(rowCount, dgv1.Rows[dgv1.RowCount - 1]);
 
-                }
-
-                // ã‚¤ãƒ™ãƒ³ãƒˆãƒ�ãƒ³ãƒ‰ãƒ©å†�ç™»éŒ²
-                dgv1.CellValueChanged += dgv1_CellValueChanged;
-                dgv1.SelectionChanged += dgv1_SelectionChanged;
-
             }
             catch (Exception ex)
             {
                 logger.ErrorFormat("ã‚·ã‚¹ãƒ†ãƒ ã‚¨ãƒ©ãƒ¼ï¼š{0}ï¼š{1}", CommonMotions.GetMethodName(), ex.Message);
             }
+            finally
+            {
+                // ã‚¤ãƒ™ãƒ³ãƒˆãƒ�ãƒ³ãƒ‰ãƒ©å†�ç™»éŒ²
+                dgv1.CellValueChanged += dgv1_CellValueChanged;
+                dgv1.SelectionChanged += dgv1_SelectionChanged;
+            }
         }
         #endregion
 
Index: branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/FrmRowDetail.Designer.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/FrmRowDetail.Designer.cs	(nonexistent)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/FrmRowDetail.Designer.cs	(revision 283)
@@ -0,0 +1,204 @@
+ï»¿namespace ProcessManagement.Forms.DataEntry
+{
+    partial class FrmRowDetail
+    {
+        /// <summary>
+        /// Required designer variable.
+        /// </summary>
+        private System.ComponentModel.IContainer components = null;
+
+        /// <summary>
+        /// Clean up any resources being used.
+        /// </summary>
+        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+        protected override void Dispose(bool disposing)
+        {
+            if (disposing && (components != null))
+            {
+                components.Dispose();
+            }
+            base.Dispose(disposing);
+        }
+
+        #region Windows Form Designer generated code
+
+        /// <summary>
+        /// Required method for Designer support - do not modify
+        /// the contents of this method with the code editor.
+        /// </summary>
+        private void InitializeComponent()
+        {
+            this.groupBoxEx1 = new ProcessManagement.Forms.CustomControls.GroupBoxEx();
+            this.label4 = new System.Windows.Forms.Label();
+            this.label2 = new System.Windows.Forms.Label();
+            this.label3 = new System.Windows.Forms.Label();
+            this.label1 = new System.Windows.Forms.Label();
+            this.groupBoxEx2 = new ProcessManagement.Forms.CustomControls.GroupBoxEx();
+            this.textBox1 = new System.Windows.Forms.TextBox();
+            this.btnDataEntry = new System.Windows.Forms.Button();
+            this.btnEnd = new System.Windows.Forms.Button();
+            this.groupBoxEx1.SuspendLayout();
+            this.groupBoxEx2.SuspendLayout();
+            this.SuspendLayout();
+            // 
+            // groupBoxEx1
+            // 
+            this.groupBoxEx1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
+            this.groupBoxEx1.BorderColor = System.Drawing.Color.White;
+            this.groupBoxEx1.Controls.Add(this.label4);
+            this.groupBoxEx1.Controls.Add(this.label2);
+            this.groupBoxEx1.Controls.Add(this.label3);
+            this.groupBoxEx1.Controls.Add(this.label1);
+            this.groupBoxEx1.Location = new System.Drawing.Point(7, 6);
+            this.groupBoxEx1.Name = "groupBoxEx1";
+            this.groupBoxEx1.Size = new System.Drawing.Size(570, 66);
+            this.groupBoxEx1.TabIndex = 0;
+            this.groupBoxEx1.TabStop = false;
+            // 
+            // label4
+            // 
+            this.label4.BackColor = System.Drawing.Color.White;
+            this.label4.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
+            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(134, 34);
+            this.label4.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label4.Name = "label4";
+            this.label4.Size = new System.Drawing.Size(430, 25);
+            this.label4.TabIndex = 2;
+            this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
+            // 
+            // 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, 34);
+            this.label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label2.Name = "label2";
+            this.label2.Size = new System.Drawing.Size(120, 25);
+            this.label2.TabIndex = 1;
+            this.label2.Text = "æ¥­è€…å��ç§°";
+            this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
+            // 
+            // label3
+            // 
+            this.label3.BackColor = System.Drawing.Color.White;
+            this.label3.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
+            this.label3.Font = new System.Drawing.Font("ï¼­ï¼³ æ˜Žæœ�", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
+            this.label3.ForeColor = System.Drawing.Color.Black;
+            this.label3.Location = new System.Drawing.Point(134, 4);
+            this.label3.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label3.Name = "label3";
+            this.label3.Size = new System.Drawing.Size(430, 25);
+            this.label3.TabIndex = 1;
+            this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
+            // 
+            // label1
+            // 
+            this.label1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(192)))));
+            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(6, 4);
+            this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label1.Name = "label1";
+            this.label1.Size = new System.Drawing.Size(120, 25);
+            this.label1.TabIndex = 1;
+            this.label1.Text = "ç�¾å ´å��ç§°";
+            this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
+            // 
+            // groupBoxEx2
+            // 
+            this.groupBoxEx2.BorderColor = System.Drawing.Color.White;
+            this.groupBoxEx2.Controls.Add(this.textBox1);
+            this.groupBoxEx2.ForeColor = System.Drawing.Color.White;
+            this.groupBoxEx2.Location = new System.Drawing.Point(7, 80);
+            this.groupBoxEx2.Name = "groupBoxEx2";
+            this.groupBoxEx2.Size = new System.Drawing.Size(570, 90);
+            this.groupBoxEx2.TabIndex = 1;
+            this.groupBoxEx2.TabStop = false;
+            this.groupBoxEx2.Text = "æ˜Žç´°å†…å®¹";
+            // 
+            // textBox1
+            // 
+            this.textBox1.ImeMode = System.Windows.Forms.ImeMode.On;
+            this.textBox1.Location = new System.Drawing.Point(5, 19);
+            this.textBox1.Multiline = true;
+            this.textBox1.Name = "textBox1";
+            this.textBox1.Size = new System.Drawing.Size(560, 60);
+            this.textBox1.TabIndex = 0;
+            this.textBox1.Text = "ã�‚\r\nã�‚\r\nã�‚";
+            // 
+            // btnDataEntry
+            // 
+            this.btnDataEntry.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+            this.btnDataEntry.BackColor = System.Drawing.Color.Green;
+            this.btnDataEntry.Font = new System.Drawing.Font("ï¼­ï¼³ æ˜Žæœ�", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
+            this.btnDataEntry.ForeColor = System.Drawing.Color.White;
+            this.btnDataEntry.Location = new System.Drawing.Point(329, 177);
+            this.btnDataEntry.Margin = new System.Windows.Forms.Padding(4);
+            this.btnDataEntry.Name = "btnDataEntry";
+            this.btnDataEntry.Size = new System.Drawing.Size(120, 30);
+            this.btnDataEntry.TabIndex = 11;
+            this.btnDataEntry.Text = "ç™»ã€€éŒ²";
+            this.btnDataEntry.UseVisualStyleBackColor = false;
+            this.btnDataEntry.Click += new System.EventHandler(this.btnDataEntry_Click);
+            // 
+            // btnEnd
+            // 
+            this.btnEnd.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+            this.btnEnd.BackColor = System.Drawing.Color.Blue;
+            this.btnEnd.DialogResult = System.Windows.Forms.DialogResult.Cancel;
+            this.btnEnd.ForeColor = System.Drawing.Color.White;
+            this.btnEnd.Location = new System.Drawing.Point(457, 177);
+            this.btnEnd.Margin = new System.Windows.Forms.Padding(4);
+            this.btnEnd.Name = "btnEnd";
+            this.btnEnd.Size = new System.Drawing.Size(120, 30);
+            this.btnEnd.TabIndex = 12;
+            this.btnEnd.Text = "çµ‚ã€€äº†";
+            this.btnEnd.UseVisualStyleBackColor = false;
+            this.btnEnd.Click += new System.EventHandler(this.btnEnd_Click);
+            // 
+            // FrmRowDetail
+            // 
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
+            this.BackColor = System.Drawing.Color.Black;
+            this.CancelButton = this.btnEnd;
+            this.ClientSize = new System.Drawing.Size(584, 211);
+            this.Controls.Add(this.btnDataEntry);
+            this.Controls.Add(this.btnEnd);
+            this.Controls.Add(this.groupBoxEx2);
+            this.Controls.Add(this.groupBoxEx1);
+            this.Font = new System.Drawing.Font("ï¼­ï¼³ æ˜Žæœ�", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
+            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
+            this.Margin = new System.Windows.Forms.Padding(4);
+            this.MaximizeBox = false;
+            this.MinimizeBox = false;
+            this.Name = "FrmRowDetail";
+            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
+            this.Text = "è«‹æ±‚æ˜Žç´°ç·¨é›†";
+            this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.FrmRowDetail_FormClosing);
+            this.Load += new System.EventHandler(this.FrmRowDetail_Load);
+            this.groupBoxEx1.ResumeLayout(false);
+            this.groupBoxEx2.ResumeLayout(false);
+            this.groupBoxEx2.PerformLayout();
+            this.ResumeLayout(false);
+
+        }
+
+        #endregion
+
+        private ProcessManagement.Forms.CustomControls.GroupBoxEx groupBoxEx1;
+        private System.Windows.Forms.Label label1;
+        private System.Windows.Forms.Label label2;
+        private System.Windows.Forms.Label label4;
+        private System.Windows.Forms.Label label3;
+        private ProcessManagement.Forms.CustomControls.GroupBoxEx groupBoxEx2;
+        private System.Windows.Forms.TextBox textBox1;
+        private System.Windows.Forms.Button btnDataEntry;
+        private System.Windows.Forms.Button btnEnd;
+
+    }
+}
\ No newline at end of file
Index: branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/FrmRowDetail.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/FrmRowDetail.cs	(nonexistent)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/FrmRowDetail.cs	(revision 283)
@@ -0,0 +1,214 @@
+ï»¿using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Forms;
+using ProcessManagement.DataModel;
+using ProcessManagement.Common;
+using ProcessManagement.Forms.SubForms;
+using System.Collections;
+using ProcessManagement.DB.IOAccess;
+
+using System.Diagnostics;
+using System.Threading;
+using System.Text.RegularExpressions;
+
+using log4net;
+using log4net.Appender;
+using log4net.Repository.Hierarchy;
+
+using ProcessManagement.DB.Core;
+using ProcessManagement.Forms.Master;
+using ProcessManagement.Forms.CustomControls;
+using ProcessManagement.Forms.ControlsAction;
+
+namespace ProcessManagement.Forms.DataEntry
+{
+    public partial class FrmRowDetail : Form
+    {
+        #region ãƒ­ã‚°ä½¿ç”¨å®šç¾©
+        //log4netãƒ­ã‚°ã‚’ä½¿ç”¨ã�™ã‚‹
+        private static readonly log4net.ILog logger = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
+        #endregion
+
+        #region å®šæ•°
+
+        #endregion
+
+        #region å¤‰æ•°
+        
+        /// <summary>
+        /// ç�¾å ´å��ç§°
+        /// </summary>
+        private string m_title01 = string.Empty;
+        /// <summary>
+        /// æ¥­è€…å��ç§°
+        /// </summary>
+        private string m_title02 = string.Empty;
+        /// <summary>
+        /// ç·¨é›†æ–‡å­—åˆ—
+        /// </summary>
+        private string m_EditString = string.Empty;
+
+        /// <summary>
+        /// çµ‚äº†ã‚¹ãƒ†ãƒ¼ã‚¿ã‚¹
+        /// </summary>
+        private DialogResult m_ResultVal = DialogResult.Cancel;
+        #endregion
+
+        #region ãƒ—ãƒ­ãƒ‘ãƒ†ã‚£
+        /// <summary>
+        /// ç�¾å ´å��ç§°
+        /// </summary>
+        public string title01
+        {
+            get { return m_title01; }
+            set { m_title01 = value; }
+        }
+        /// <summary>
+        /// æ¥­è€…å��ç§°
+        /// </summary>
+        public string title02
+        {
+            get { return m_title02; }
+            set { m_title02 = value; }
+        }
+        /// <summary>
+        /// ç·¨é›†æ–‡å­—åˆ—
+        /// </summary>
+        public string EditString
+        {
+            get { return m_EditString; }
+            set { m_EditString = value; }
+        }
+
+        /// <summary>
+        /// çµ‚äº†ã‚¹ãƒ†ãƒ¼ã‚¿ã‚¹
+        /// </summary>
+        public DialogResult ResultVal
+        {
+            get { return m_ResultVal; }
+            set { m_ResultVal = value; }
+        }
+        #endregion
+
+        #region ã‚³ãƒ³ã‚¹ãƒˆãƒ©ã‚¯ã‚¿
+        public FrmRowDetail()
+        {
+            InitializeComponent();
+        }
+        #endregion
+
+        #region ãƒ•ã‚©ãƒ¼ãƒ ãƒ­ãƒ¼ãƒ‰
+        /// <summary>
+        /// ãƒ•ã‚©ãƒ¼ãƒ ãƒ­ãƒ¼ãƒ‰
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        private void FrmRowDetail_Load(object sender, EventArgs e)
+        {
+            try
+            {
+                // ãƒ‘ãƒ©ãƒ¡ãƒ¼ã‚¿å€¤ã‚»ãƒƒãƒˆ
+                SetParameter();
+            }
+            catch (System.Exception ex)
+            {
+                logger.ErrorFormat("ã‚·ã‚¹ãƒ†ãƒ ã‚¨ãƒ©ãƒ¼ï¼š{0}ï¼š{1}", CommonMotions.GetMethodName(), ex.Message);
+            }
+        }
+        #endregion
+
+        #region ãƒ•ã‚©ãƒ¼ãƒ ã‚¯ãƒ­ãƒ¼ã‚¸ãƒ³ã‚°
+        /// <summary>
+        /// ãƒ•ã‚©ãƒ¼ãƒ ã‚¯ãƒ­ãƒ¼ã‚¸ãƒ³ã‚°
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        private void FrmRowDetail_FormClosing(object sender, FormClosingEventArgs e)
+        {
+            try
+            {
+            }
+            catch (System.Exception ex)
+            {
+                logger.ErrorFormat("ã‚·ã‚¹ãƒ†ãƒ ã‚¨ãƒ©ãƒ¼ï¼š{0}ï¼š{1}", CommonMotions.GetMethodName(), ex.Message);
+            }
+        }
+        #endregion
+
+        #region ç™»éŒ²ãƒœã‚¿ãƒ³
+        /// <summary>
+        /// ç™»éŒ²ãƒœã‚¿ãƒ³
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        private void btnDataEntry_Click(object sender, EventArgs e)
+        {
+            if (MessageBox.Show("æ˜Žç´°å†…å®¹ã‚’å��æ˜ ã�—ã�¾ã�™ã€�ã‚ˆã‚�ã�—ã�„ã�§ã�—ã‚‡ã�†ã�‹ã€‚",
+                                "ç™»éŒ²ç¢ºèª�",
+                                MessageBoxButtons.OKCancel,
+                                MessageBoxIcon.Question) == DialogResult.Cancel) return;
+
+            GetParameter();
+            m_ResultVal = DialogResult.OK;
+            this.Close();
+        }
+        #endregion
+
+        #region çµ‚äº†ãƒœã‚¿ãƒ³
+        /// <summary>
+        /// çµ‚äº†ãƒœã‚¿ãƒ³
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        private void btnEnd_Click(object sender, EventArgs e)
+        {
+            m_ResultVal = DialogResult.Cancel;
+            this.Close();
+        }
+        #endregion
+
+        #region ãƒ‘ãƒ©ãƒ¡ãƒ¼ã‚¿å€¤ã‚»ãƒƒãƒˆ
+        /// <summary>
+        /// ãƒ‘ãƒ©ãƒ¡ãƒ¼ã‚¿å€¤ã‚»ãƒƒãƒˆ
+        /// </summary>
+        private void SetParameter()
+        {
+            try
+            {
+                label3.Text = m_title01;
+                label4.Text = m_title02;
+                textBox1.Text = m_EditString;
+            }
+            catch (System.Exception ex)
+            {
+                logger.ErrorFormat("ã‚·ã‚¹ãƒ†ãƒ ã‚¨ãƒ©ãƒ¼ï¼š{0}ï¼š{1}", CommonMotions.GetMethodName(), ex.Message);
+            }
+        }
+        #endregion
+
+        #region ãƒ‘ãƒ©ãƒ¡ãƒ¼ã‚¿å€¤å�–å¾—
+        /// <summary>
+        /// ãƒ‘ãƒ©ãƒ¡ãƒ¼ã‚¿å€¤å�–å¾—
+        /// </summary>
+        private void GetParameter()
+        {
+            try
+            {
+                m_title01 = label3.Text;
+                m_title02 = label4.Text;
+                m_EditString = textBox1.Text;
+            }
+            catch (System.Exception ex)
+            {
+                logger.ErrorFormat("ã‚·ã‚¹ãƒ†ãƒ ã‚¨ãƒ©ãƒ¼ï¼š{0}ï¼š{1}", CommonMotions.GetMethodName(), ex.Message);
+            }
+        }
+        #endregion
+    }
+}
Index: branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/FrmRowDetail.resx
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/FrmRowDetail.resx	(nonexistent)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/FrmRowDetail.resx	(revision 283)
@@ -0,0 +1,120 @@
+ï»¿<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+</root>
\ No newline at end of file
Index: branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/RequestSummaryList/FrmRequestSummaryList.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/RequestSummaryList/FrmRequestSummaryList.cs	(revision 282)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/RequestSummaryList/FrmRequestSummaryList.cs	(revision 283)
@@ -43,9 +43,9 @@
                                                             ClsExcute.AppovalList[(int)ClsExcute.ApprovalListNo.FeePayment] };
         #endregion
 
-        #region �‡Œv�sƒJƒ‰ƒ€
+        #region �‡Œv�s’è‹`
         /// <summary>
-        /// �‡Œv�sƒJƒ‰ƒ€
+        /// �‡Œv�s’è‹`
         /// </summary>
         private enum GoukeiRows
         {
@@ -272,6 +272,11 @@
         /// �³”FŽÒ�‡�˜ƒJƒ‰ƒ€ƒIƒtƒZƒbƒg
         /// </summary>
         private int s_ShoninNoCnt = 4;
+
+        /// <summary>
+        /// •s–¾•¶Žš—ñ
+        /// </summary>
+        private const string s_UnknownString = "•s–¾";
         #endregion
 
         #region •Ï�”
@@ -808,16 +813,12 @@
         {
             DataGridView dgv = getShowingView();
 
+            // ‘I‘ð‚³‚ê‚Ä‚¢‚È‚¢
             if (dgv.CurrentRow == null) return;
+            if (dgv.Rows.Count == 0) return;
+            int nRowType = CommonMotions.cnvInt(dgv.CurrentRow.Cells[(int)DispColumn.RowType].Value);
+            if (nRowType != 0) return;
 
-            if (dgv.Rows.Count == 0                                                                     // ‘I‘ð‚³‚ê‚Ä‚¢‚È‚¢
-                || CommonMotions.cnvInt(dgv.CurrentRow.Cells[(int)DispColumn.RowType].Value) != 0)      // 
-            // TODO �i•s—v�H�j
-            //|| CommonMotions.cnvInt(dgv.CurrentRow.Cells[(int)DispColumn.SomuSeikyu].Value) == 0)     // �¿‹�‹àŠz‚ª“ü‚Á‚Ä‚¢‚È‚¢
-            {
-                return;
-            }
-
             // Œ»�ê‘I‘ð
             ShowSubLocationDiag();
         }
@@ -848,6 +849,19 @@
         }
         #endregion
 
+        #region ƒZƒ‹ƒ_ƒuƒ‹ƒNƒŠƒbƒN
+        /// <summary>
+        /// ƒZƒ‹ƒ_ƒuƒ‹ƒNƒŠƒbƒN
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        private void DataGridView_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
+        {
+            // ƒ_ƒuƒ‹ƒNƒŠƒbƒN�ˆ—�
+            GridDoubleClick(sender, e);
+        }
+        #endregion
+
         #region ƒOƒŠƒbƒhƒZƒ‹’l•Ï‰»
         /// <summary>
         /// ƒOƒŠƒbƒhƒZƒ‹’l•Ï‰»
@@ -1129,80 +1143,8 @@
         /// <param name="e"></param>
         private void btnDeleteCompany_Click(object sender, EventArgs e)
         {
-            IOPaymentDataDetail IoPdD = new IOPaymentDataDetail();
-            DataGridView dgv;
-            ArrayList arData = new ArrayList();
-            string sWhere = "";
-            List<DataGridViewRow> RemovRows = new List<DataGridViewRow>();
-
-            try
-            {
-                dgv = getShowingView();
-
-
-                // Œ��”Žæ“¾
-                sWhere = string.Format("where CompanyCode = {0} and TargetDate = {1}", dgv.CurrentRow.Cells[m_Company_Column].Value, m_Select_TargetDate);
-                int Count = IoPdD.DataCount(sWhere);
-                if (Count == -1) return;
-
-                if (Count > 0)
-                {
-                    MessageBox.Show("�HŽ–’S“–ŽÒ‚ª“ü—Í‚µ‚Ä‚¢‚é‚½‚ß�A�í�œ‚Å‚«‚Ü‚¹‚ñ�B", "ƒf�[ƒ^Šm”F"
-                                    , MessageBoxButtons.OK, MessageBoxIcon.Warning);
-                    return;
-                }
-
-                // �‡Œv�s�í�œ
-                DataGridViewRow[] RowsGoukei = dgv.Rows.Cast<DataGridViewRow>().Where(x => (CommonMotions.cnvInt(x.Cells[m_Company_Column].Value)
-                                                                                            == CommonMotions.cnvInt(dgv.CurrentRow.Cells[m_Company_Column].Value))
-                                                                                        && CommonMotions.cnvInt(x.Cells[(int)DispColumn.RowType].Value) != 0)
-                                                                                .ToArray();
-
-                foreach (DataGridViewRow r in RowsGoukei)
-                {
-                    dgv.Rows.Remove(r);
-                }
-
-                DataGridViewRow[] Rows = dgv.Rows.Cast<DataGridViewRow>().Where(x => (CommonMotions.cnvInt(x.Cells[m_Company_Column].Value)
-                                                                                        == CommonMotions.cnvInt(dgv.CurrentRow.Cells[m_Company_Column].Value))
-                                                                                    && CommonMotions.cnvInt(x.Cells[(int)DispColumn.RowType].Value) == 0)
-                                                                         .ToArray();
-                foreach (DataGridViewRow r in Rows)
-                {
-                    if ((DataRowState)r.Cells[(int)DispColumn.RowState].Value == DataRowState.Added)
-                    {
-                        RemovRows.Add(r);
-                    }
-                    else
-                    {
-                        r.Cells[(int)DispColumn.RowState].Value = DataRowState.Deleted;
-                        r.Cells[(int)DispColumn.RowVisible].Value = (int)RowVisibleDef.UnVisible;
-                        r.Visible = false;
-                    }
-                }
-
-                // �V‹K‚Å’Ç‰Á‚µ‚½�s‚Í�í�œ‚·‚é
-                foreach (DataGridViewRow r in RemovRows)
-                {
-                    dgv.Rows.Remove(r);
-                }
-
-                ResetNo();
-                controlButton_DataCount();
-
-                m_bChengeAns = true;
-
-            }
-            catch (System.Exception ex)
-            {
-                logger.ErrorFormat("ƒVƒXƒeƒ€ƒGƒ‰�[�F{0}�F{1}", CommonMotions.GetMethodName(), ex.Message);
-            }
-            finally
-            {
-                IoPdD.close();
-                IoPdD = null;
-            }
-
+            // �í�œ�ˆ—�
+            RemoveCompany();
         }
         #endregion
 
@@ -1214,255 +1156,8 @@
         /// <param name="e"></param>
         private void btnDeleteProject_Click(object sender, EventArgs e)
         {
-            IOPaymentDataDetail IoPdD = new IOPaymentDataDetail();
-            DataGridView dgv;
-            string sWhere;
-
-            int CurNo = 0;
-            int CurCompanyCode = 0, CurGenbaCode = 0;
-            int CurSeqNo = 0;
-            int CurLineCount = 0;
-            int MakeIndex = 0;
-            long CurSeikyu = 0, CurKousoku = 0, CurKananomo = 0, CurSanhai = 0;
-            bool bDefaultMake = true;
-            int iGoukeiCode = -1;
-            bool bDeleteRow = false;
-
-            try
-            {
-                List<PaymentDataDetail> PdDList = new List<PaymentDataDetail>();
-
-                dgv = getShowingView();
-                if (dgv.CurrentRow == null) return;
-
-                // ŠY“–�sˆÈŠO‚Í�ˆ—�‚µ‚È‚¢
-                if (CommonMotions.cnvInt(dgv.CurrentRow.Cells[(int)DispColumn.RowType].Value) != 0)
-                {
-                    return;
-                }
-
-                CurCompanyCode = CommonMotions.cnvInt(dgv.CurrentRow.Cells[m_Company_Column].Value);
-                CurSeqNo = CommonMotions.cnvInt(dgv.CurrentRow.Cells[(int)DispColumn.GroupSeqNo].Value);
-                CurNo = CommonMotions.cnvInt(dgv.CurrentRow.Cells[(int)DispColumn.No].Value);
-                CurGenbaCode = CommonMotions.cnvInt(dgv.CurrentRow.Cells[m_Genba_Column].Value);
-                CurLineCount = CommonMotions.cnvInt(dgv.CurrentRow.Cells[(int)DispColumn.LineCount].Value);
-                CurSeikyu = CommonMotions.cnvLong(dgv.CurrentRow.Cells[(int)DispColumn.SomuSeikyu].Value);
-                CurKousoku = CommonMotions.cnvLong(dgv.CurrentRow.Cells[(int)DispColumn.SomuKosoku].Value);
-                CurKananomo = CommonMotions.cnvLong(dgv.CurrentRow.Cells[(int)DispColumn.SomuKanamono].Value);
-                CurSanhai = CommonMotions.cnvLong(dgv.CurrentRow.Cells[(int)DispColumn.SomuSannhaiZei].Value);
-
-                iGoukeiCode = CommonMotions.cnvInt(dgv.CurrentRow.Cells[m_GoukeiCode_Column].Value);
-
-                // •s–¾‚ÌŒ»�ê�í�œ‚Í‚Å‚«‚È‚¢
-                if (CurGenbaCode == 0)
-                {
-                    MessageBox.Show("•s–¾‚ÌŒ»�ê�í�œ‚Í‚Å‚«‚Ü‚¹‚ñ�B", "ƒf�[ƒ^Šm”F", MessageBoxButtons.OK, MessageBoxIcon.Warning);
-                    return;
-                }
-
-                // �V‹K‚Å’Ç‰Á‚µ‚½�sˆÈŠO‚ð’²�¸‚·‚é
-                if ((DataRowState)dgv.CurrentRow.Cells[(int)DispColumn.RowState].Value != DataRowState.Added)
-                {
-
-                    sWhere = IoPdD.CreatePrimarykeyString(CurCompanyCode, m_Select_TargetDate, CurSeqNo, CurLineCount);
-
-                    if (!IoPdD.SelectAction(sWhere, ref PdDList))
-                    {
-                        MessageBox.Show("ƒf�[ƒ^Šm”F‚ÉŽ¸”s‚µ‚Ü‚µ‚½", "Œ»�ê�í�œ", MessageBoxButtons.OK, MessageBoxIcon.Error);
-                        return;
-                    }
-
-                    //�@ƒf�[ƒ^‚ª‘¶�Ý‚µ‚Ä‚¢‚é���HŽ–’S“–ŽÒ“ü—Í—“‚ª“ü—Í‚³‚ê‚Ä‚¢‚é
-                    if (PdDList.Count != 0)
-                    {
-                        if (PdDList[0].BillPrice != 0)
-                        {
-                            MessageBox.Show("�HŽ–’S“–ŽÒ‚ª“ü—Í‚µ‚Ä‚¢‚é‚½‚ß�A�í�œ‚Å‚«‚Ü‚¹‚ñ�B�¿‹�‹àŠz‚ð0‰~‚É‚µ‚Ä‚­‚¾‚³‚¢", "ƒf�[ƒ^Šm”F"
-                                            , MessageBoxButtons.OK, MessageBoxIcon.Warning);
-                            return;
-                        }
-                        if (PdDList[0].CnstrPriceExist == 1)
-                        {
-                            MessageBox.Show("�HŽ–’S“–ŽÒ‚ª“ü—Í‚µ‚Ä‚¢‚é‚½‚ß�A�í�œ‚Å‚«‚Ü‚¹‚ñ�B‹¦—Í‹à—L–³‚ð‹ó”’‚É‚µ‚Ä‰º‚³‚¢�B", "ƒf�[ƒ^Šm”F"
-                                            , MessageBoxButtons.OK, MessageBoxIcon.Warning);
-                            return;
-                        }
-                    }
-
-                }
-
-                // “¯‹ÆŽÒ‚ÅŠù‚É“o˜^‚³‚ê‚Ä‚¢‚éƒf�[ƒ^‚ª–³‚¯‚ê‚Î�A�s�í�œ
-                if ((DataRowState)dgv.CurrentRow.Cells[(int)DispColumn.RowState].Value == DataRowState.Added)
-                {
-                    DataGridViewRow[] ExistenceData = dgv.Rows.Cast<DataGridViewRow>().Where(x => CommonMotions.cnvInt(x.Cells[m_Company_Column].Value) == CurCompanyCode
-                                                                                                && CommonMotions.cnvInt(x.Cells[(int)DispColumn.RowType].Value) == 0
-                                                                                                && (DataRowState)dgv.CurrentRow.Cells[(int)DispColumn.RowState].Value != DataRowState.Added)
-                                                                                        .ToArray();
-                    if (ExistenceData.Count() == 0)
-                    {
-                        bDeleteRow = true;
-                    }
-                }
-
-
-                // �í�œƒ}�[ƒN
-                dgv.CurrentRow.Cells[(int)DispColumn.RowState].Value = DataRowState.Deleted;
-
-                // �í�œŒã‚Ì“¯‹ÆŽÒ�A“¯˜A”Ô‚Ì�ó‘Ô‚ð’²�¸
-                DataGridViewRow[] Rows = dgv.Rows.Cast<DataGridViewRow>().Where(x => CommonMotions.cnvInt(x.Cells[m_Company_Column].Value) == CurCompanyCode
-                                                                                  && CommonMotions.cnvInt(x.Cells[(int)DispColumn.GroupSeqNo].Value) == CurSeqNo
-                                                                                  && (DataRowState)x.Cells[(int)DispColumn.RowState].Value != DataRowState.Deleted
-                                                                                  && CommonMotions.cnvInt(x.Cells[m_Genba_Column].Value) == 0)
-                                                                         .OrderBy(y => CommonMotions.cnvInt(y.Cells[(int)DispColumn.LineCount]))
-                                                                         .ToArray();
-                if (Rows.Count() == 0)
-                {
-                    if (rdbCompany.Checked)
-                    {
-                        MakeIndex = dgv.CurrentRow.Index + 1;
-                    }
-                    else
-                    {
-                        DataGridViewRow[] PlusRow = dgv.Rows.Cast<DataGridViewRow>().Where(x => CommonMotions.cnvInt(x.Cells[m_Company_Column].Value) == CurCompanyCode
-                                                                                          && (DataRowState)x.Cells[(int)DispColumn.RowState].Value != DataRowState.Deleted
-                                                                                          && CommonMotions.cnvInt(x.Cells[m_Genba_Column].Value) == 0)
-                                                                                 .ToArray();
-                        if (PlusRow.Count() != 0)
-                        {
-                            MakeIndex = PlusRow[0].Index + 1;
-                        }
-                        else
-                        {
-                            MakeIndex = 0;
-                        }
-
-                    }
-                }
-                else
-                {
-                    // �í�œ�s‚Ì‹àŠz‰ÁŽZ
-                    foreach (DataGridViewRow work in Rows)
-                    {
-                        // •s–¾�s‚É‰ÁŽZ
-                        if (CommonMotions.cnvInt(work.Cells[m_Genba_Column].Value) == 0)
-                        {
-                            work.Cells[(int)DispColumn.SomuSeikyu].Value = CommonMotions.cnvLong(work.Cells[(int)DispColumn.SomuSeikyu].Value) + CurSeikyu;
-                            work.Cells[(int)DispColumn.SomuKosoku].Value = CommonMotions.cnvLong(work.Cells[(int)DispColumn.SomuKosoku].Value) + CurKousoku;
-                            work.Cells[(int)DispColumn.SomuKanamono].Value = CommonMotions.cnvLong(work.Cells[(int)DispColumn.SomuKanamono].Value) + CurKananomo;
-                            work.Cells[(int)DispColumn.SomuSannhaiZei].Value = CommonMotions.cnvLong(work.Cells[(int)DispColumn.SomuSannhaiZei].Value) + CurSanhai;
-
-                            iGoukeiCode = CommonMotions.cnvInt(work.Cells[m_GoukeiCode_Column].Value);
-
-                            // �‡Œv’lŽZ�o
-                            setGoukei_DataDisp(dgv, iGoukeiCode);
-
-                            bDefaultMake = false;
-                        }
-                        MakeIndex = work.Index + 1;
-                    }
-                }
-
-
-                // �í�œ‘Î�Û‚ª•s–¾Œ»�ê‚Å‚È‚¯‚ê‚Î�AŒ»�ê•s–¾‚Å�V‹K�s’Ç‰Á
-                if (bDefaultMake == true && CurGenbaCode != 0)
-                {
-                    MakeNewRow(CurCompanyCode, CommonMotions.cnvString(dgv.CurrentRow.Cells[m_CompanyNM_Column].ToolTipText), 0, CurNo, ref MakeIndex, CurSeqNo, MakeIndex, "•s–¾");
-                    dgv.Rows[MakeIndex].Cells[m_CompanyNM_Column].ToolTipText = CommonMotions.cnvString(dgv.CurrentRow.Cells[m_CompanyNM_Column].ToolTipText);
-                    dgv.Rows[MakeIndex].Cells[(int)DispColumn.CompanyDispOrder].Value = CommonMotions.cnvInt(dgv.CurrentRow.Cells[(int)DispColumn.CompanyDispOrder].Value);
-                    dgv.Rows[MakeIndex].Cells[m_GenbaNM_Column].ToolTipText = "•s–¾";
-                    dgv.Rows[MakeIndex].Cells[(int)DispColumn.RowType].Value = 0;
-                    dgv.Rows[MakeIndex].Cells[(int)DispColumn.SomuSeikyu].Value = CurSeikyu;
-                    dgv.Rows[MakeIndex].Cells[(int)DispColumn.SomuKosoku].Value = CurKousoku;
-                    dgv.Rows[MakeIndex].Cells[(int)DispColumn.SomuKanamono].Value = CurKananomo;
-                    dgv.Rows[MakeIndex].Cells[(int)DispColumn.SomuSannhaiZei].Value = CurSanhai;
-
-                    iGoukeiCode = CommonMotions.cnvInt(dgv.Rows[MakeIndex].Cells[m_GoukeiCode_Column].Value);
-
-                    if (rdbProject.Checked)
-                    {
-                        DataGridViewRow[] SameGenba = dgv.Rows.Cast<DataGridViewRow>().Where(x => CommonMotions.cnvInt(x.Cells[m_Genba_Column].Value) == 0
-                                                                                                && CommonMotions.cnvInt(x.Cells[(int)DispColumn.RowVisible].Value) == (int)RowVisibleDef.Visible
-                                                                                                && CommonMotions.cnvInt(x.Cells[(int)DispColumn.RowType].Value) == 0)
-                                                                                            .ToArray();
-
-                        //‘¼‚É•s–¾‚ª‚È‚¯‚ê‚Î�‡Œv�s’Ç‰Á(�¡’Ç‰Á‚µ‚½•s–¾ˆÈŠO)
-                        if (SameGenba.Count() == 1)
-                        {
-                            MakeGoukeiGyo(dgv, iGoukeiCode, CommonMotions.cnvInt(dgv.CurrentRow.Cells[(int)DispColumn.CompanyDispOrder].Value), MakeIndex + 1);
-                        }
-                    }
-                }
-
-
-                // ”ñ•\Ž¦‚Æ‚·‚é
-                dgv.CurrentRow.Cells[(int)DispColumn.RowVisible].Value = (int)RowVisibleDef.UnVisible;
-
-                // “¯Œ»�ê‚ª‘S‚Ä–³‚­‚È‚Á‚½�ê�‡‚Í�A�‡Œv•\Ž¦‚ð�í�œ
-                int cnt = dgv.Rows.Cast<DataGridViewRow>().Where(x => CommonMotions.cnvInt(x.Cells[(int)DispColumn.RowVisible].Value) == (int)RowVisibleDef.Visible
-                                                                    && CommonMotions.cnvInt(x.Cells[(int)DispColumn.RowType].Value) == 0
-                                                                    && (CommonMotions.cnvInt(x.Cells[m_GoukeiCode_Column].Value) 
-                                                                        == CommonMotions.cnvInt(dgv.CurrentRow.Cells[m_GoukeiCode_Column].Value)))
-                                                        .Count();
-                //bool DeleteGoukeiRow = false;
-                if (cnt == 0)
-                {
-                    // �‡Œv�s�í�œ
-                    DataGridViewRow[] RowsGoukei = dgv.Rows.Cast<DataGridViewRow>().Where(x =>
-                                                                                            (CommonMotions.cnvInt(x.Cells[m_GoukeiCode_Column].Value)
-                                                                                                == CommonMotions.cnvInt(dgv.CurrentRow.Cells[m_GoukeiCode_Column].Value))
-                                                                                            && CommonMotions.cnvInt(x.Cells[(int)DispColumn.RowType].Value) != 0)
-                                                                                        .ToArray();
-
-                    foreach (DataGridViewRow r in RowsGoukei)
-                    {
-                        dgv.Rows.Remove(r);
-                    }
-                    //DeleteGoukeiRow = true;
-                }
-
-                // �í�œ‘Î�Û‚ð�í�œ
-                if (bDeleteRow == true)
-                {
-                    DataGridViewRow r = dgv.CurrentRow;
-                    dgv.Rows.Remove(r);
-
-                    //if (DeleteGoukeiRow == false)
-                    //{
-                    // �‡Œv’lŽZ�o
-                    setGoukei_DataDisp(dgv, iGoukeiCode);
-                    //}
-                    ResetNo();
-                    ResetSeqNo(CurCompanyCode);
-                    controlButton_DataCount();
-
-                    return;
-
-                }
-
-                dgv.CurrentRow.Visible = false;
-
-                //if (DeleteGoukeiRow == false)
-                //{
-                // �‡Œv’lŽZ�o
-                setGoukei_DataDisp(dgv, iGoukeiCode);
-                //}
-
-                ResetNo();
-                controlButton_DataCount();
-
-                m_bChengeAns = true;
-
-            }
-            catch (System.Exception ex)
-            {
-                logger.ErrorFormat("ƒVƒXƒeƒ€ƒGƒ‰�[�F{0}�F{1}", CommonMotions.GetMethodName(), ex.Message);
-            }
-            finally
-            {
-                IoPdD.close();
-                IoPdD = null;
-            }
-
+            // �í�œ�ˆ—�
+            RemoveProject();
         }
         #endregion
 
Index: branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/RequestSummaryList/FrmRequestSummaryList.designer.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/RequestSummaryList/FrmRequestSummaryList.designer.cs	(revision 282)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/RequestSummaryList/FrmRequestSummaryList.designer.cs	(revision 283)
@@ -28,64 +28,64 @@
         /// </summary>
         private void InitializeComponent()
         {
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle27 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle8 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle9 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle10 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle11 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle12 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle13 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle14 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle15 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle16 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle17 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle18 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle19 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle20 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle21 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle22 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle23 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle24 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle25 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle26 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle28 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle58 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle29 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle30 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle31 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle32 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle33 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle34 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle35 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle36 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle37 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle38 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle39 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle40 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle41 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle42 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle43 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle44 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle45 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle46 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle47 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle48 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle49 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle50 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle51 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle52 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle53 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle54 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle55 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle56 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle57 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle59 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle85 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle60 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle61 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle62 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle63 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle64 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle65 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle66 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle67 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle68 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle69 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle70 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle71 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle72 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle73 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle74 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle75 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle76 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle77 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle78 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle79 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle80 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle81 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle82 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle83 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle84 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle86 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle116 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle87 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle88 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle89 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle90 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle91 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle92 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle93 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle94 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle95 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle96 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle97 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle98 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle99 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle100 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle101 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle102 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle103 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle104 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle105 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle106 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle107 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle108 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle109 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle110 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle111 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle112 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle113 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle114 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle115 = new System.Windows.Forms.DataGridViewCellStyle();
             this.btnEnd = new System.Windows.Forms.Button();
             this.label1 = new System.Windows.Forms.Label();
             this.btnDataEntry = new System.Windows.Forms.Button();
@@ -328,16 +328,15 @@
             // 
             // label1
             // 
-            this.label1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
-            | System.Windows.Forms.AnchorStyles.Right)));
+            this.label1.Anchor = System.Windows.Forms.AnchorStyles.Top;
             this.label1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(255)))), ((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(470, 10);
+            this.label1.Location = new System.Drawing.Point(420, 10);
             this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label1.Name = "label1";
-            this.label1.Size = new System.Drawing.Size(400, 20);
+            this.label1.Size = new System.Drawing.Size(500, 20);
             this.label1.TabIndex = 0;
             this.label1.Text = "è«‹ã€€æ±‚ã€€ã�¾ã€€ã�¨ã€€ã‚�";
             this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
@@ -360,7 +359,7 @@
             // btnDeleteProject
             // 
             this.btnDeleteProject.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
-            this.btnDeleteProject.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(128)))));
+            this.btnDeleteProject.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(192)))));
             this.btnDeleteProject.Font = new System.Drawing.Font("ï¼­ï¼³ æ˜Žæœ�", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
             this.btnDeleteProject.ForeColor = System.Drawing.Color.Black;
             this.btnDeleteProject.Location = new System.Drawing.Point(778, 661);
@@ -405,7 +404,7 @@
             // btnAddProject
             // 
             this.btnAddProject.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
-            this.btnAddProject.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(128)))));
+            this.btnAddProject.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(136)))), ((int)(((byte)(255)))), ((int)(((byte)(192)))));
             this.btnAddProject.Font = new System.Drawing.Font("ï¼­ï¼³ æ˜Žæœ�", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
             this.btnAddProject.ForeColor = System.Drawing.Color.Black;
             this.btnAddProject.Location = new System.Drawing.Point(650, 661);
@@ -807,11 +806,11 @@
             | System.Windows.Forms.AnchorStyles.Right)));
             this.dgvCompany.BackgroundColor = System.Drawing.Color.White;
             this.dgvCompany.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
-            dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
-            dataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(255)))), ((int)(((byte)(192)))));
-            dataGridViewCellStyle1.Font = new System.Drawing.Font("ï¼­ï¼³ æ˜Žæœ�", 11.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
-            dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
-            this.dgvCompany.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle1;
+            dataGridViewCellStyle59.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
+            dataGridViewCellStyle59.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(255)))), ((int)(((byte)(192)))));
+            dataGridViewCellStyle59.Font = new System.Drawing.Font("ï¼­ï¼³ æ˜Žæœ�", 11.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
+            dataGridViewCellStyle59.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
+            this.dgvCompany.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle59;
             this.dgvCompany.ColumnHeadersHeight = 45;
             this.dgvCompany.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing;
             this.dgvCompany.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
@@ -905,14 +904,14 @@
             this.Column64,
             this.Column139,
             this.Column140});
-            dataGridViewCellStyle27.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
-            dataGridViewCellStyle27.BackColor = System.Drawing.SystemColors.Window;
-            dataGridViewCellStyle27.Font = new System.Drawing.Font("ï¼­ï¼³ æ˜Žæœ�", 11.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
-            dataGridViewCellStyle27.ForeColor = System.Drawing.SystemColors.ControlText;
-            dataGridViewCellStyle27.SelectionBackColor = System.Drawing.Color.LightSeaGreen;
-            dataGridViewCellStyle27.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
-            dataGridViewCellStyle27.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
-            this.dgvCompany.DefaultCellStyle = dataGridViewCellStyle27;
+            dataGridViewCellStyle85.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
+            dataGridViewCellStyle85.BackColor = System.Drawing.SystemColors.Window;
+            dataGridViewCellStyle85.Font = new System.Drawing.Font("ï¼­ï¼³ æ˜Žæœ�", 11.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
+            dataGridViewCellStyle85.ForeColor = System.Drawing.SystemColors.ControlText;
+            dataGridViewCellStyle85.SelectionBackColor = System.Drawing.Color.LightSeaGreen;
+            dataGridViewCellStyle85.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
+            dataGridViewCellStyle85.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
+            this.dgvCompany.DefaultCellStyle = dataGridViewCellStyle85;
             this.dgvCompany.EditMode = System.Windows.Forms.DataGridViewEditMode.EditOnEnter;
             this.dgvCompany.EnableHeadersVisualStyles = false;
             this.dgvCompany.Location = new System.Drawing.Point(10, 84);
@@ -927,6 +926,7 @@
             this.dgvCompany.Size = new System.Drawing.Size(1320, 570);
             this.dgvCompany.TabIndex = 4;
             this.dgvCompany.CellBeginEdit += new System.Windows.Forms.DataGridViewCellCancelEventHandler(this.DataGridView_CellBeginEdit);
+            this.dgvCompany.CellDoubleClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.DataGridView_CellDoubleClick);
             this.dgvCompany.CellEnter += new System.Windows.Forms.DataGridViewCellEventHandler(this.DataGridView_CellEnter);
             this.dgvCompany.CellFormatting += new System.Windows.Forms.DataGridViewCellFormattingEventHandler(this.DataGridView_CellFormatting);
             this.dgvCompany.CellValidated += new System.Windows.Forms.DataGridViewCellEventHandler(this.DataGridView_CellValidated);
@@ -998,8 +998,8 @@
             // 
             // Column1
             // 
-            dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
-            this.Column1.DefaultCellStyle = dataGridViewCellStyle2;
+            dataGridViewCellStyle60.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
+            this.Column1.DefaultCellStyle = dataGridViewCellStyle60;
             this.Column1.FillWeight = 110F;
             this.Column1.HeaderText = "â„–";
             this.Column1.Name = "Column1";
@@ -1062,8 +1062,8 @@
             // 
             // Column4
             // 
-            dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
-            this.Column4.DefaultCellStyle = dataGridViewCellStyle3;
+            dataGridViewCellStyle61.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
+            this.Column4.DefaultCellStyle = dataGridViewCellStyle61;
             this.Column4.HeaderText = "è«‹æ±‚æ›¸\r\né‡‘é¡�";
             this.Column4.Name = "Column4";
             this.Column4.Resizable = System.Windows.Forms.DataGridViewTriState.False;
@@ -1072,8 +1072,8 @@
             // 
             // Column9
             // 
-            dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
-            this.Column9.DefaultCellStyle = dataGridViewCellStyle4;
+            dataGridViewCellStyle62.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
+            this.Column9.DefaultCellStyle = dataGridViewCellStyle62;
             this.Column9.HeaderText = "é«˜é€Ÿä»£é§�è»Šä»£";
             this.Column9.Name = "Column9";
             this.Column9.Resizable = System.Windows.Forms.DataGridViewTriState.False;
@@ -1082,8 +1082,8 @@
             // 
             // Column10
             // 
-            dataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
-            this.Column10.DefaultCellStyle = dataGridViewCellStyle5;
+            dataGridViewCellStyle63.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
+            this.Column10.DefaultCellStyle = dataGridViewCellStyle63;
             this.Column10.HeaderText = "é‡‘ç‰©ä»£";
             this.Column10.Name = "Column10";
             this.Column10.Resizable = System.Windows.Forms.DataGridViewTriState.False;
@@ -1092,8 +1092,8 @@
             // 
             // Column11
             // 
-            dataGridViewCellStyle6.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
-            this.Column11.DefaultCellStyle = dataGridViewCellStyle6;
+            dataGridViewCellStyle64.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
+            this.Column11.DefaultCellStyle = dataGridViewCellStyle64;
             this.Column11.HeaderText = "ç”£å»ƒç¨Ž";
             this.Column11.Name = "Column11";
             this.Column11.Resizable = System.Windows.Forms.DataGridViewTriState.False;
@@ -1102,8 +1102,8 @@
             // 
             // Column5
             // 
-            dataGridViewCellStyle7.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
-            this.Column5.DefaultCellStyle = dataGridViewCellStyle7;
+            dataGridViewCellStyle65.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
+            this.Column5.DefaultCellStyle = dataGridViewCellStyle65;
             this.Column5.HeaderText = "è«‹æ±‚\r\né‡‘é¡�";
             this.Column5.Name = "Column5";
             this.Column5.Resizable = System.Windows.Forms.DataGridViewTriState.False;
@@ -1112,8 +1112,8 @@
             // 
             // Column6
             // 
-            dataGridViewCellStyle8.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
-            this.Column6.DefaultCellStyle = dataGridViewCellStyle8;
+            dataGridViewCellStyle66.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
+            this.Column6.DefaultCellStyle = dataGridViewCellStyle66;
             this.Column6.HeaderText = "å€¤å¼•\r\né‡‘é¡�";
             this.Column6.Name = "Column6";
             this.Column6.Resizable = System.Windows.Forms.DataGridViewTriState.False;
@@ -1122,8 +1122,8 @@
             // 
             // Column7
             // 
-            dataGridViewCellStyle9.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
-            this.Column7.DefaultCellStyle = dataGridViewCellStyle9;
+            dataGridViewCellStyle67.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
+            this.Column7.DefaultCellStyle = dataGridViewCellStyle67;
             this.Column7.HeaderText = "ç›¸æ®º\r\né‡‘é¡�";
             this.Column7.Name = "Column7";
             this.Column7.Resizable = System.Windows.Forms.DataGridViewTriState.False;
@@ -1132,8 +1132,8 @@
             // 
             // Column8
             // 
-            dataGridViewCellStyle10.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
-            this.Column8.DefaultCellStyle = dataGridViewCellStyle10;
+            dataGridViewCellStyle68.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
+            this.Column8.DefaultCellStyle = dataGridViewCellStyle68;
             this.Column8.HeaderText = "æ¬¡å›ž\r\nç¹°è¶Š";
             this.Column8.Name = "Column8";
             this.Column8.Resizable = System.Windows.Forms.DataGridViewTriState.False;
@@ -1142,8 +1142,8 @@
             // 
             // Column40
             // 
-            dataGridViewCellStyle11.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
-            this.Column40.DefaultCellStyle = dataGridViewCellStyle11;
+            dataGridViewCellStyle69.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
+            this.Column40.DefaultCellStyle = dataGridViewCellStyle69;
             this.Column40.HeaderText = "é«˜é€Ÿä»£é§�è»Šä»£";
             this.Column40.Name = "Column40";
             this.Column40.Resizable = System.Windows.Forms.DataGridViewTriState.False;
@@ -1152,8 +1152,8 @@
             // 
             // Column41
             // 
-            dataGridViewCellStyle12.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
-            this.Column41.DefaultCellStyle = dataGridViewCellStyle12;
+            dataGridViewCellStyle70.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
+            this.Column41.DefaultCellStyle = dataGridViewCellStyle70;
             this.Column41.HeaderText = "é‡‘ç‰©ä»£";
             this.Column41.Name = "Column41";
             this.Column41.Resizable = System.Windows.Forms.DataGridViewTriState.False;
@@ -1162,8 +1162,8 @@
             // 
             // Column43
             // 
-            dataGridViewCellStyle13.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
-            this.Column43.DefaultCellStyle = dataGridViewCellStyle13;
+            dataGridViewCellStyle71.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
+            this.Column43.DefaultCellStyle = dataGridViewCellStyle71;
             this.Column43.HeaderText = "ç”£å»ƒç¨Ž";
             this.Column43.Name = "Column43";
             this.Column43.Resizable = System.Windows.Forms.DataGridViewTriState.False;
@@ -1172,8 +1172,8 @@
             // 
             // Column12
             // 
-            dataGridViewCellStyle14.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
-            this.Column12.DefaultCellStyle = dataGridViewCellStyle14;
+            dataGridViewCellStyle72.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
+            this.Column12.DefaultCellStyle = dataGridViewCellStyle72;
             this.Column12.HeaderText = "å�”åŠ›é‡‘";
             this.Column12.Name = "Column12";
             this.Column12.Resizable = System.Windows.Forms.DataGridViewTriState.False;
@@ -1189,10 +1189,10 @@
             // 
             // KyouryokuKin_Com
             // 
-            dataGridViewCellStyle15.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
-            dataGridViewCellStyle15.BackColor = System.Drawing.Color.White;
-            dataGridViewCellStyle15.ForeColor = System.Drawing.Color.Black;
-            this.KyouryokuKin_Com.DefaultCellStyle = dataGridViewCellStyle15;
+            dataGridViewCellStyle73.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
+            dataGridViewCellStyle73.BackColor = System.Drawing.Color.White;
+            dataGridViewCellStyle73.ForeColor = System.Drawing.Color.Black;
+            this.KyouryokuKin_Com.DefaultCellStyle = dataGridViewCellStyle73;
             this.KyouryokuKin_Com.HeaderText = "å�”åŠ›é‡‘\r\næœ‰ç„¡";
             this.KyouryokuKin_Com.MaxDropDownItems = 3;
             this.KyouryokuKin_Com.Name = "KyouryokuKin_Com";
@@ -1200,8 +1200,8 @@
             // 
             // Column14
             // 
-            dataGridViewCellStyle16.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
-            this.Column14.DefaultCellStyle = dataGridViewCellStyle16;
+            dataGridViewCellStyle74.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
+            this.Column14.DefaultCellStyle = dataGridViewCellStyle74;
             this.Column14.HeaderText = "æ³¨æ–‡æ›¸\r\né€�ä»˜";
             this.Column14.Name = "Column14";
             this.Column14.ReadOnly = true;
@@ -1210,8 +1210,8 @@
             // 
             // Column15
             // 
-            dataGridViewCellStyle17.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
-            this.Column15.DefaultCellStyle = dataGridViewCellStyle17;
+            dataGridViewCellStyle75.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
+            this.Column15.DefaultCellStyle = dataGridViewCellStyle75;
             this.Column15.HeaderText = "æ³¨æ–‡æ›¸\r\nåˆ°ç�€";
             this.Column15.Name = "Column15";
             this.Column15.ReadOnly = true;
@@ -1220,8 +1220,8 @@
             // 
             // Column16
             // 
-            dataGridViewCellStyle18.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
-            this.Column16.DefaultCellStyle = dataGridViewCellStyle18;
+            dataGridViewCellStyle76.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
+            this.Column16.DefaultCellStyle = dataGridViewCellStyle76;
             this.Column16.HeaderText = "äºˆç®—æ›¸";
             this.Column16.Name = "Column16";
             this.Column16.ReadOnly = true;
@@ -1237,8 +1237,8 @@
             // 
             // Column17
             // 
-            dataGridViewCellStyle19.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
-            this.Column17.DefaultCellStyle = dataGridViewCellStyle19;
+            dataGridViewCellStyle77.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
+            this.Column17.DefaultCellStyle = dataGridViewCellStyle77;
             this.Column17.HeaderText = "æ‹…å½“è€…\r\nç¢ºèª�";
             this.Column17.Name = "Column17";
             this.Column17.ReadOnly = true;
@@ -1261,8 +1261,8 @@
             // 
             // Column18
             // 
-            dataGridViewCellStyle20.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
-            this.Column18.DefaultCellStyle = dataGridViewCellStyle20;
+            dataGridViewCellStyle78.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
+            this.Column18.DefaultCellStyle = dataGridViewCellStyle78;
             this.Column18.HeaderText = "æ‰¿èª�è€…ï¼‘\r\næ‰¿èª�";
             this.Column18.Name = "Column18";
             this.Column18.ReadOnly = true;
@@ -1299,8 +1299,8 @@
             // 
             // Column19
             // 
-            dataGridViewCellStyle21.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
-            this.Column19.DefaultCellStyle = dataGridViewCellStyle21;
+            dataGridViewCellStyle79.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
+            this.Column19.DefaultCellStyle = dataGridViewCellStyle79;
             this.Column19.HeaderText = "æ‰¿èª�è€…ï¼’\r\næ‰¿èª�";
             this.Column19.Name = "Column19";
             this.Column19.ReadOnly = true;
@@ -1337,8 +1337,8 @@
             // 
             // Column22
             // 
-            dataGridViewCellStyle22.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
-            this.Column22.DefaultCellStyle = dataGridViewCellStyle22;
+            dataGridViewCellStyle80.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
+            this.Column22.DefaultCellStyle = dataGridViewCellStyle80;
             this.Column22.HeaderText = "æ‰¿èª�è€…ï¼“\r\næ‰¿èª�";
             this.Column22.Name = "Column22";
             this.Column22.ReadOnly = true;
@@ -1375,8 +1375,8 @@
             // 
             // Column25
             // 
-            dataGridViewCellStyle23.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
-            this.Column25.DefaultCellStyle = dataGridViewCellStyle23;
+            dataGridViewCellStyle81.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
+            this.Column25.DefaultCellStyle = dataGridViewCellStyle81;
             this.Column25.HeaderText = "æ‰¿èª�è€…ï¼”æ‰¿èª�";
             this.Column25.Name = "Column25";
             this.Column25.ReadOnly = true;
@@ -1413,8 +1413,8 @@
             // 
             // Column27
             // 
-            dataGridViewCellStyle24.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
-            this.Column27.DefaultCellStyle = dataGridViewCellStyle24;
+            dataGridViewCellStyle82.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
+            this.Column27.DefaultCellStyle = dataGridViewCellStyle82;
             this.Column27.HeaderText = "æ‰¿èª�è€…ï¼•æ‰¿èª�";
             this.Column27.Name = "Column27";
             this.Column27.ReadOnly = true;
@@ -1451,8 +1451,8 @@
             // 
             // Column28
             // 
-            dataGridViewCellStyle25.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
-            this.Column28.DefaultCellStyle = dataGridViewCellStyle25;
+            dataGridViewCellStyle83.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
+            this.Column28.DefaultCellStyle = dataGridViewCellStyle83;
             this.Column28.HeaderText = "æ‰¿èª�è€…ï¼–æ‰¿èª�";
             this.Column28.Name = "Column28";
             this.Column28.ReadOnly = true;
@@ -1625,8 +1625,8 @@
             // 
             // Column20
             // 
-            dataGridViewCellStyle26.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
-            this.Column20.DefaultCellStyle = dataGridViewCellStyle26;
+            dataGridViewCellStyle84.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
+            this.Column20.DefaultCellStyle = dataGridViewCellStyle84;
             this.Column20.HeaderText = "å‚™è€ƒ";
             this.Column20.Name = "Column20";
             this.Column20.Resizable = System.Windows.Forms.DataGridViewTriState.False;
@@ -1667,11 +1667,11 @@
             | System.Windows.Forms.AnchorStyles.Right)));
             this.dgvProject.BackgroundColor = System.Drawing.Color.White;
             this.dgvProject.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
-            dataGridViewCellStyle28.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
-            dataGridViewCellStyle28.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(255)))), ((int)(((byte)(192)))));
-            dataGridViewCellStyle28.Font = new System.Drawing.Font("ï¼­ï¼³ æ˜Žæœ�", 11.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
-            dataGridViewCellStyle28.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
-            this.dgvProject.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle28;
+            dataGridViewCellStyle86.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
+            dataGridViewCellStyle86.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(255)))), ((int)(((byte)(192)))));
+            dataGridViewCellStyle86.Font = new System.Drawing.Font("ï¼­ï¼³ æ˜Žæœ�", 11.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
+            dataGridViewCellStyle86.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
+            this.dgvProject.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle86;
             this.dgvProject.ColumnHeadersHeight = 45;
             this.dgvProject.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing;
             this.dgvProject.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
@@ -1765,14 +1765,14 @@
             this.Column77,
             this.Column141,
             this.Column142});
-            dataGridViewCellStyle58.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
-            dataGridViewCellStyle58.BackColor = System.Drawing.SystemColors.Window;
-            dataGridViewCellStyle58.Font = new System.Drawing.Font("ï¼­ï¼³ æ˜Žæœ�", 11.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
-            dataGridViewCellStyle58.ForeColor = System.Drawing.SystemColors.ControlText;
-            dataGridViewCellStyle58.SelectionBackColor = System.Drawing.Color.LightSeaGreen;
-            dataGridViewCellStyle58.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
-            dataGridViewCellStyle58.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
-            this.dgvProject.DefaultCellStyle = dataGridViewCellStyle58;
+            dataGridViewCellStyle116.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
+            dataGridViewCellStyle116.BackColor = System.Drawing.SystemColors.Window;
+            dataGridViewCellStyle116.Font = new System.Drawing.Font("ï¼­ï¼³ æ˜Žæœ�", 11.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
+            dataGridViewCellStyle116.ForeColor = System.Drawing.SystemColors.ControlText;
+            dataGridViewCellStyle116.SelectionBackColor = System.Drawing.Color.LightSeaGreen;
+            dataGridViewCellStyle116.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
+            dataGridViewCellStyle116.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
+            this.dgvProject.DefaultCellStyle = dataGridViewCellStyle116;
             this.dgvProject.EditMode = System.Windows.Forms.DataGridViewEditMode.EditOnEnter;
             this.dgvProject.EnableHeadersVisualStyles = false;
             this.dgvProject.Location = new System.Drawing.Point(10, 84);
@@ -1788,6 +1788,7 @@
             this.dgvProject.TabIndex = 3;
             this.dgvProject.Visible = false;
             this.dgvProject.CellBeginEdit += new System.Windows.Forms.DataGridViewCellCancelEventHandler(this.DataGridView_CellBeginEdit);
+            this.dgvProject.CellDoubleClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.DataGridView_CellDoubleClick);
             this.dgvProject.CellEnter += new System.Windows.Forms.DataGridViewCellEventHandler(this.DataGridView_CellEnter);
             this.dgvProject.CellFormatting += new System.Windows.Forms.DataGridViewCellFormattingEventHandler(this.DataGridView_CellFormatting);
             this.dgvProject.CellValidated += new System.Windows.Forms.DataGridViewCellEventHandler(this.DataGridView_CellValidated);
@@ -1859,8 +1860,8 @@
             // 
             // Project_Column3
             // 
-            dataGridViewCellStyle29.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
-            this.Project_Column3.DefaultCellStyle = dataGridViewCellStyle29;
+            dataGridViewCellStyle87.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
+            this.Project_Column3.DefaultCellStyle = dataGridViewCellStyle87;
             this.Project_Column3.HeaderText = "â„–";
             this.Project_Column3.Name = "Project_Column3";
             this.Project_Column3.ReadOnly = true;
@@ -1878,8 +1879,8 @@
             // 
             // Project_Column5
             // 
-            dataGridViewCellStyle30.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
-            this.Project_Column5.DefaultCellStyle = dataGridViewCellStyle30;
+            dataGridViewCellStyle88.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
+            this.Project_Column5.DefaultCellStyle = dataGridViewCellStyle88;
             this.Project_Column5.HeaderText = "ç�¾å ´å��";
             this.Project_Column5.Name = "Project_Column5";
             this.Project_Column5.ReadOnly = true;
@@ -1921,8 +1922,8 @@
             // 
             // Project_Column8
             // 
-            dataGridViewCellStyle31.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
-            this.Project_Column8.DefaultCellStyle = dataGridViewCellStyle31;
+            dataGridViewCellStyle89.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
+            this.Project_Column8.DefaultCellStyle = dataGridViewCellStyle89;
             this.Project_Column8.HeaderText = "è«‹æ±‚æ›¸\r\n é‡‘é¡�";
             this.Project_Column8.Name = "Project_Column8";
             this.Project_Column8.Resizable = System.Windows.Forms.DataGridViewTriState.False;
@@ -1931,8 +1932,8 @@
             // 
             // Project_Column9
             // 
-            dataGridViewCellStyle32.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
-            this.Project_Column9.DefaultCellStyle = dataGridViewCellStyle32;
+            dataGridViewCellStyle90.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
+            this.Project_Column9.DefaultCellStyle = dataGridViewCellStyle90;
             this.Project_Column9.HeaderText = "é«˜é€Ÿä»£\r\né§�è»Šä»£";
             this.Project_Column9.Name = "Project_Column9";
             this.Project_Column9.Resizable = System.Windows.Forms.DataGridViewTriState.False;
@@ -1941,8 +1942,8 @@
             // 
             // Project_Column10
             // 
-            dataGridViewCellStyle33.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
-            this.Project_Column10.DefaultCellStyle = dataGridViewCellStyle33;
+            dataGridViewCellStyle91.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
+            this.Project_Column10.DefaultCellStyle = dataGridViewCellStyle91;
             this.Project_Column10.HeaderText = "é‡‘ç‰©ä»£";
             this.Project_Column10.Name = "Project_Column10";
             this.Project_Column10.Resizable = System.Windows.Forms.DataGridViewTriState.False;
@@ -1951,8 +1952,8 @@
             // 
             // Project_Column11
             // 
-            dataGridViewCellStyle34.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
-            this.Project_Column11.DefaultCellStyle = dataGridViewCellStyle34;
+            dataGridViewCellStyle92.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
+            this.Project_Column11.DefaultCellStyle = dataGridViewCellStyle92;
             this.Project_Column11.HeaderText = "ç”£å»ƒç¨Ž";
             this.Project_Column11.Name = "Project_Column11";
             this.Project_Column11.Resizable = System.Windows.Forms.DataGridViewTriState.False;
@@ -1961,8 +1962,8 @@
             // 
             // Project_Column12
             // 
-            dataGridViewCellStyle35.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
-            this.Project_Column12.DefaultCellStyle = dataGridViewCellStyle35;
+            dataGridViewCellStyle93.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
+            this.Project_Column12.DefaultCellStyle = dataGridViewCellStyle93;
             this.Project_Column12.HeaderText = "è«‹æ±‚\r\né‡‘é¡�";
             this.Project_Column12.Name = "Project_Column12";
             this.Project_Column12.Resizable = System.Windows.Forms.DataGridViewTriState.False;
@@ -1971,8 +1972,8 @@
             // 
             // Project_Column13
             // 
-            dataGridViewCellStyle36.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
-            this.Project_Column13.DefaultCellStyle = dataGridViewCellStyle36;
+            dataGridViewCellStyle94.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
+            this.Project_Column13.DefaultCellStyle = dataGridViewCellStyle94;
             this.Project_Column13.HeaderText = "å€¤å¼•\r\né‡‘é¡�";
             this.Project_Column13.Name = "Project_Column13";
             this.Project_Column13.Resizable = System.Windows.Forms.DataGridViewTriState.False;
@@ -1981,8 +1982,8 @@
             // 
             // Project_Column14
             // 
-            dataGridViewCellStyle37.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
-            this.Project_Column14.DefaultCellStyle = dataGridViewCellStyle37;
+            dataGridViewCellStyle95.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
+            this.Project_Column14.DefaultCellStyle = dataGridViewCellStyle95;
             this.Project_Column14.HeaderText = "ç›¸æ®º\r\né‡‘é¡�";
             this.Project_Column14.Name = "Project_Column14";
             this.Project_Column14.Resizable = System.Windows.Forms.DataGridViewTriState.False;
@@ -1991,9 +1992,9 @@
             // 
             // Project_Column15
             // 
-            dataGridViewCellStyle38.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
-            dataGridViewCellStyle38.Format = "#,##0";
-            this.Project_Column15.DefaultCellStyle = dataGridViewCellStyle38;
+            dataGridViewCellStyle96.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
+            dataGridViewCellStyle96.Format = "#,##0";
+            this.Project_Column15.DefaultCellStyle = dataGridViewCellStyle96;
             this.Project_Column15.HeaderText = "æ¬¡å›ž\r\nç¹°è¶Š";
             this.Project_Column15.Name = "Project_Column15";
             this.Project_Column15.Resizable = System.Windows.Forms.DataGridViewTriState.False;
@@ -2002,8 +2003,8 @@
             // 
             // Project_Column16
             // 
-            dataGridViewCellStyle39.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
-            this.Project_Column16.DefaultCellStyle = dataGridViewCellStyle39;
+            dataGridViewCellStyle97.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
+            this.Project_Column16.DefaultCellStyle = dataGridViewCellStyle97;
             this.Project_Column16.HeaderText = "é«˜é€Ÿä»£\r\né§�è»Šä»£";
             this.Project_Column16.Name = "Project_Column16";
             this.Project_Column16.Resizable = System.Windows.Forms.DataGridViewTriState.False;
@@ -2012,8 +2013,8 @@
             // 
             // Project_Column17
             // 
-            dataGridViewCellStyle40.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
-            this.Project_Column17.DefaultCellStyle = dataGridViewCellStyle40;
+            dataGridViewCellStyle98.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
+            this.Project_Column17.DefaultCellStyle = dataGridViewCellStyle98;
             this.Project_Column17.HeaderText = "é‡‘ç‰©ä»£";
             this.Project_Column17.Name = "Project_Column17";
             this.Project_Column17.Resizable = System.Windows.Forms.DataGridViewTriState.False;
@@ -2022,8 +2023,8 @@
             // 
             // Project_Column18
             // 
-            dataGridViewCellStyle41.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
-            this.Project_Column18.DefaultCellStyle = dataGridViewCellStyle41;
+            dataGridViewCellStyle99.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
+            this.Project_Column18.DefaultCellStyle = dataGridViewCellStyle99;
             this.Project_Column18.HeaderText = "ç”£å»ƒç¨Ž";
             this.Project_Column18.Name = "Project_Column18";
             this.Project_Column18.Resizable = System.Windows.Forms.DataGridViewTriState.False;
@@ -2032,8 +2033,8 @@
             // 
             // Project_Column19
             // 
-            dataGridViewCellStyle42.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
-            this.Project_Column19.DefaultCellStyle = dataGridViewCellStyle42;
+            dataGridViewCellStyle100.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
+            this.Project_Column19.DefaultCellStyle = dataGridViewCellStyle100;
             this.Project_Column19.HeaderText = "å�”åŠ›é‡‘";
             this.Project_Column19.Name = "Project_Column19";
             this.Project_Column19.Resizable = System.Windows.Forms.DataGridViewTriState.False;
@@ -2049,10 +2050,10 @@
             // 
             // KyouryokuKin_Pro
             // 
-            dataGridViewCellStyle43.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
-            dataGridViewCellStyle43.BackColor = System.Drawing.Color.White;
-            dataGridViewCellStyle43.ForeColor = System.Drawing.Color.Black;
-            this.KyouryokuKin_Pro.DefaultCellStyle = dataGridViewCellStyle43;
+            dataGridViewCellStyle101.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
+            dataGridViewCellStyle101.BackColor = System.Drawing.Color.White;
+            dataGridViewCellStyle101.ForeColor = System.Drawing.Color.Black;
+            this.KyouryokuKin_Pro.DefaultCellStyle = dataGridViewCellStyle101;
             this.KyouryokuKin_Pro.HeaderText = "å�”åŠ›é‡‘\r\næœ‰ç„¡";
             this.KyouryokuKin_Pro.Name = "KyouryokuKin_Pro";
             this.KyouryokuKin_Pro.Resizable = System.Windows.Forms.DataGridViewTriState.False;
@@ -2059,8 +2060,8 @@
             // 
             // Project_Column21
             // 
-            dataGridViewCellStyle44.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
-            this.Project_Column21.DefaultCellStyle = dataGridViewCellStyle44;
+            dataGridViewCellStyle102.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
+            this.Project_Column21.DefaultCellStyle = dataGridViewCellStyle102;
             this.Project_Column21.HeaderText = "æ³¨æ–‡æ›¸\r\né€�ä»˜";
             this.Project_Column21.Name = "Project_Column21";
             this.Project_Column21.ReadOnly = true;
@@ -2069,8 +2070,8 @@
             // 
             // Project_Column22
             // 
-            dataGridViewCellStyle45.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
-            this.Project_Column22.DefaultCellStyle = dataGridViewCellStyle45;
+            dataGridViewCellStyle103.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
+            this.Project_Column22.DefaultCellStyle = dataGridViewCellStyle103;
             this.Project_Column22.HeaderText = "æ³¨æ–‡æ›¸\r\nåˆ°ç�€";
             this.Project_Column22.Name = "Project_Column22";
             this.Project_Column22.ReadOnly = true;
@@ -2079,8 +2080,8 @@
             // 
             // Project_Column23
             // 
-            dataGridViewCellStyle46.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
-            this.Project_Column23.DefaultCellStyle = dataGridViewCellStyle46;
+            dataGridViewCellStyle104.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
+            this.Project_Column23.DefaultCellStyle = dataGridViewCellStyle104;
             this.Project_Column23.HeaderText = "äºˆç®—æ›¸";
             this.Project_Column23.Name = "Project_Column23";
             this.Project_Column23.ReadOnly = true;
@@ -2096,8 +2097,8 @@
             // 
             // Project_Column24
             // 
-            dataGridViewCellStyle47.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
-            this.Project_Column24.DefaultCellStyle = dataGridViewCellStyle47;
+            dataGridViewCellStyle105.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
+            this.Project_Column24.DefaultCellStyle = dataGridViewCellStyle105;
             this.Project_Column24.HeaderText = "æ‹…å½“è€…\r\nç¢ºèª�";
             this.Project_Column24.Name = "Project_Column24";
             this.Project_Column24.ReadOnly = true;
@@ -2120,8 +2121,8 @@
             // 
             // Project_Column25
             // 
-            dataGridViewCellStyle48.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
-            this.Project_Column25.DefaultCellStyle = dataGridViewCellStyle48;
+            dataGridViewCellStyle106.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
+            this.Project_Column25.DefaultCellStyle = dataGridViewCellStyle106;
             this.Project_Column25.HeaderText = "æ‰¿èª�è€…ï¼‘\r\næ‰¿èª�";
             this.Project_Column25.Name = "Project_Column25";
             this.Project_Column25.ReadOnly = true;
@@ -2158,8 +2159,8 @@
             // 
             // Project_Column26
             // 
-            dataGridViewCellStyle49.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
-            this.Project_Column26.DefaultCellStyle = dataGridViewCellStyle49;
+            dataGridViewCellStyle107.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
+            this.Project_Column26.DefaultCellStyle = dataGridViewCellStyle107;
             this.Project_Column26.HeaderText = "æ‰¿èª�è€…ï¼’\r\næ‰¿èª�";
             this.Project_Column26.Name = "Project_Column26";
             this.Project_Column26.ReadOnly = true;
@@ -2196,8 +2197,8 @@
             // 
             // Project_Column27
             // 
-            dataGridViewCellStyle50.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
-            this.Project_Column27.DefaultCellStyle = dataGridViewCellStyle50;
+            dataGridViewCellStyle108.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
+            this.Project_Column27.DefaultCellStyle = dataGridViewCellStyle108;
             this.Project_Column27.HeaderText = "æ‰¿èª�è€…ï¼“\r\næ‰¿èª�";
             this.Project_Column27.Name = "Project_Column27";
             this.Project_Column27.ReadOnly = true;
@@ -2234,8 +2235,8 @@
             // 
             // Project_Column28
             // 
-            dataGridViewCellStyle51.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
-            this.Project_Column28.DefaultCellStyle = dataGridViewCellStyle51;
+            dataGridViewCellStyle109.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
+            this.Project_Column28.DefaultCellStyle = dataGridViewCellStyle109;
             this.Project_Column28.HeaderText = "æ‰¿èª�è€…ï¼”æ‰¿èª�";
             this.Project_Column28.Name = "Project_Column28";
             this.Project_Column28.ReadOnly = true;
@@ -2272,8 +2273,8 @@
             // 
             // Project_Column29
             // 
-            dataGridViewCellStyle52.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
-            this.Project_Column29.DefaultCellStyle = dataGridViewCellStyle52;
+            dataGridViewCellStyle110.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
+            this.Project_Column29.DefaultCellStyle = dataGridViewCellStyle110;
             this.Project_Column29.HeaderText = "æ‰¿èª�è€…ï¼•æ‰¿èª�";
             this.Project_Column29.Name = "Project_Column29";
             this.Project_Column29.ReadOnly = true;
@@ -2310,8 +2311,8 @@
             // 
             // Project_Column30
             // 
-            dataGridViewCellStyle53.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
-            this.Project_Column30.DefaultCellStyle = dataGridViewCellStyle53;
+            dataGridViewCellStyle111.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
+            this.Project_Column30.DefaultCellStyle = dataGridViewCellStyle111;
             this.Project_Column30.HeaderText = "æ‰¿èª�è€…ï¼–æ‰¿èª�";
             this.Project_Column30.Name = "Project_Column30";
             this.Project_Column30.ReadOnly = true;
@@ -2348,8 +2349,8 @@
             // 
             // Project_Column31
             // 
-            dataGridViewCellStyle54.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
-            this.Project_Column31.DefaultCellStyle = dataGridViewCellStyle54;
+            dataGridViewCellStyle112.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
+            this.Project_Column31.DefaultCellStyle = dataGridViewCellStyle112;
             this.Project_Column31.HeaderText = "æ‰¿èª�è€…ï¼—æ‰¿èª�";
             this.Project_Column31.Name = "Project_Column31";
             this.Project_Column31.ReadOnly = true;
@@ -2386,8 +2387,8 @@
             // 
             // Project_Column32
             // 
-            dataGridViewCellStyle55.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
-            this.Project_Column32.DefaultCellStyle = dataGridViewCellStyle55;
+            dataGridViewCellStyle113.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
+            this.Project_Column32.DefaultCellStyle = dataGridViewCellStyle113;
             this.Project_Column32.HeaderText = "æ‰¿èª�è€…ï¼˜æ‰¿èª�";
             this.Project_Column32.Name = "Project_Column32";
             this.Project_Column32.ReadOnly = true;
@@ -2424,8 +2425,8 @@
             // 
             // Project_Column33
             // 
-            dataGridViewCellStyle56.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
-            this.Project_Column33.DefaultCellStyle = dataGridViewCellStyle56;
+            dataGridViewCellStyle114.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
+            this.Project_Column33.DefaultCellStyle = dataGridViewCellStyle114;
             this.Project_Column33.HeaderText = "æ‰¿èª�è€…ï¼™æ‰¿èª�";
             this.Project_Column33.Name = "Project_Column33";
             this.Project_Column33.ReadOnly = true;
@@ -2462,8 +2463,8 @@
             // 
             // Project_Column34
             // 
-            dataGridViewCellStyle57.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
-            this.Project_Column34.DefaultCellStyle = dataGridViewCellStyle57;
+            dataGridViewCellStyle115.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
+            this.Project_Column34.DefaultCellStyle = dataGridViewCellStyle115;
             this.Project_Column34.HeaderText = "æ‰¿èª�è€…10æ‰¿èª�";
             this.Project_Column34.Name = "Project_Column34";
             this.Project_Column34.ReadOnly = true;
Index: branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/RequestSummaryList/FrmRequestSummaryListAuxiliary.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/RequestSummaryList/FrmRequestSummaryListAuxiliary.cs	(revision 282)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/RequestSummaryList/FrmRequestSummaryListAuxiliary.cs	(revision 283)
@@ -437,13 +437,13 @@
                                                                     .ToArray();
             if (Rows.Count() == 0)
             {
-                btnAddProject.Enabled = false;
-                btnDeleteProject.Enabled = false;
+                btnAddProject.Visible = false;
+                btnDeleteProject.Visible = false;
             }
             else
             {
-                btnAddProject.Enabled = true;
-                btnDeleteProject.Enabled = true;
+                btnAddProject.Visible = true;
+                btnDeleteProject.Visible = true;
             }
         }
         #endregion
@@ -460,43 +460,45 @@
                 // ‘�–±’S“–
                 if (m_UserInfo.m_GeneralAffairsFlg == (int)SecurityMaster.GeneAffDef.GeneralDep)
                 {
-                    btnAddCompany.Enabled = true;
-                    btnDeleteCompany.Enabled = true;
-                    btnAddProject.Enabled = true;
-                    btnDeleteProject.Enabled = true;
+                    btnAddCompany.Visible = true;
+                    btnDeleteCompany.Visible = true;
+                    btnAddProject.Visible = true;
+                    btnDeleteProject.Visible = true;
                 }
                 // ’S“–ŽÒ‚Ì�ê�‡
                 else if (m_UserInfo.m_Type == CommonDefine.SecurityRankPos.NormalAuthority)
                 {
-                    btnAddCompany.Enabled = false;
-                    btnDeleteCompany.Enabled = false;
-                    btnAddProject.Enabled = true;
-                    btnDeleteProject.Enabled = true;
+                    btnAddCompany.Visible = false;
+                    btnDeleteCompany.Visible = false;
+                    btnAddProject.Visible = true;
+                    btnDeleteProject.Visible = true;
                 }
                 // �Š‘®’·�A“�Š‡ŽÒ‚Ì�ê�‡
-                else if (m_UserInfo.m_Type == CommonDefine.SecurityRankPos.LimitedAuthority || m_UserInfo.m_Type == CommonDefine.SecurityRankPos.FreeAuthority)
+                else if (m_UserInfo.m_Type == CommonDefine.SecurityRankPos.LimitedAuthority
+                        || m_UserInfo.m_Type == CommonDefine.SecurityRankPos.FreeAuthority)
                 {
-                    btnAddCompany.Enabled = false;
-                    btnDeleteCompany.Enabled = false;
-                    btnAddProject.Enabled = true;
-                    btnDeleteProject.Enabled = true;
+                    btnAddCompany.Visible = false;
+                    btnDeleteCompany.Visible = false;
+                    btnAddProject.Visible = true;
+                    btnDeleteProject.Visible = true;
 
                 }
                 // “Á•ÊŒ ŒÀ‚Ì�ê�‡
                 else if (m_UserInfo.m_Type == CommonDefine.SecurityRankPos.SpecialAuthority)
                 {
-                    btnAddCompany.Enabled = true;
-                    btnDeleteCompany.Enabled = true;
-                    btnAddProject.Enabled = true;
-                    btnDeleteProject.Enabled = true;
+                    btnAddCompany.Visible = true;
+                    btnDeleteCompany.Visible = true;
+                    btnAddProject.Visible = true;
+                    btnDeleteProject.Visible = true;
                 }
 
-                // •\Ž¦Œ`Ž®‚ª�uŒ»�ê�v‚Ì�ê�‡�A”ñŠˆ�«
-                if (!rdbCompany.Checked)
-                {
-                    btnAddCompany.Enabled = false;
-                    btnDeleteCompany.Enabled = false;
-                }
+                // ***************** 2017/10/17 ƒfƒoƒbƒO‚Ìˆ×ˆêŽžƒRƒ�ƒ“ƒgƒAƒEƒg
+                //// •\Ž¦Œ`Ž®‚ª�uŒ»�ê�v‚Ì�ê�‡�A”ñŠˆ�«
+                //if (!rdbCompany.Checked)
+                //{
+                //    btnAddCompany.Enabled = false;
+                //    btnDeleteCompany.Enabled = false;
+                //}
             }
             catch (Exception ex)
             {
@@ -615,36 +617,49 @@
         private void ShowSubConstructorDiag()
         {
             FrmSubContractorDiag frm = new FrmSubContractorDiag();
-            int No = 0;
             DataGridView dgv = getShowingView();
-            bool MakeGoukei = false;
-            int MakeIndex = -1;
+            DataGridViewRow CurRow = dgv.CurrentRow;
             try
             {
                 frm.ConstructionCode = 0;
                 frm.StartupSource = (int)ClsExcute.ProcessExecuteNo.RequestSummaryList;
 
+                int nCompanyCode = CommonMotions.cnvInt(CurRow.Cells[m_Company_Column].Value);
+                int nConstrCode = CommonMotions.cnvInt(CurRow.Cells[m_ConstructionCode].Value);
                 //********************************************************
                 // ŽèŠÔ‹ÆŽÒ‹æ•ª‚ð“n‚·˜AŒg•”‚Í‚±‚±‚É‚È‚è‚Ü‚·
                 //*********************************************************
                 frm.SelectLabourKind = m_Labourkind;
 
+                // •s–¾ƒ{ƒ^ƒ“•\Ž¦
+                if (rdbProject.Checked)
+                {   // ----- Œ»�ê
+                    if (nConstrCode < 0) return;
+                    frm.DispAddUnknown = true;
+                }
+                // •s–¾‚Ì‘Î�ˆ‚ÅƒR�[ƒh‚ðƒZƒbƒg‚·‚é
+                frm.SelectData.CompanyCode = nCompanyCode;
                 // ‹¦—Í‰ïŽÐ‘I‘ð•\Ž¦
                 frm.ShowDialog();
 
-                if (frm.EndButton != System.Windows.Forms.DialogResult.OK) return;
+                // ƒLƒƒƒ“ƒZƒ‹Žž‚ÍˆÈ‰º‚Ì�ˆ—�‚ð�s‚í‚È‚¢
+                if (DialogResult.Cancel.Equals(frm.EndButton)) return;
 
+
                 SubContractorMaster selRec = frm.SelectData;
 
+                if (rdbCompany.Checked)
+                {   // ----- ‹ÆŽÒ
+                    InsertdgvCompanySubContr(selRec);
+                }
+                else
+                {   // ----- Œ»�ê
+                    // •s–¾Žž‚ÍƒNƒŠƒA
+                    if (DialogResult.Yes.Equals(frm.EndButton))
+                        selRec = new SubContractorMaster();
 
-                if (dgvCompany.Visible == true)  // ‹ÆŽÒ
-                {
-                    InsertCompany(selRec);
+                    InsertdgvProjectSubContr(selRec);
                 }
-                else if (dgvProject.Visible == true)  // Œ»�ê
-                {
-                    // Œ»�ê‚Å‹ÆŽÒ’Ç‰Á‚Í‚È‚¢
-                }
             }
             catch (System.Exception ex)
             {
@@ -662,7 +677,7 @@
         /// ‹ÆŽÒƒOƒŠƒbƒh‹ÆŽÒ’Ç‰Á�ˆ—�
         /// </summary>
         /// <param name="selRec"></param>
-        private void InsertCompany(SubContractorMaster selRec)
+        private void InsertdgvCompanySubContr(SubContractorMaster selRec)
         {
             DataGridView dgv = getShowingView();
             int No = 0;
@@ -669,10 +684,10 @@
             int MakeIndex = -1;
             try
             {
-                // Šù‚É•\Ž¦‚³‚ê‚Ä‚¢‚é‹ÆŽÒ‚ð”»’è‚·‚é
-                DataGridViewRow[] rows = dgv.Rows.Cast<DataGridViewRow>()
-                                                            .Where(x => CommonMotions.cnvInt(x.Cells[m_Company_Column].Value) == selRec.CompanyCode
-                                                                    && CommonMotions.cnvInt(x.Cells[(int)DispColumn.RowVisible].Value) == (int)RowVisibleDef.Visible).ToArray();
+                // Šù‚É‘I‘ð‚³‚ê‚Ä‚¢‚é‹ÆŽÒ‚ð”»’è‚·‚é
+                DataGridViewRow[] rows = dgv.Rows.Cast<DataGridViewRow>().Where(x => CommonMotions.cnvInt(x.Cells[m_Company_Column].Value) == selRec.CompanyCode
+                                                                                && CommonMotions.cnvInt(x.Cells[(int)DispColumn.RowVisible].Value) == (int)RowVisibleDef.Visible)
+                                                                            .ToArray();
                 bool bInsertRow = true;
                 if (rows.Count() > 1) bInsertRow = false;
 
@@ -688,7 +703,7 @@
                     No = CommonMotions.cnvInt(cell) + 1;
                 }
 
-                MakeIndex = SearchRowIndex(selRec.CompanyCode);
+                MakeIndex = SearchRowIndexCompany(selRec.CompanyCode, true);
 
                 // Šù‚É•\Ž¦‚³‚ê‚Ä‚¢‚é‹ÆŽÒ‚Í�A�¬Œv�s‚Ì�ã‚É•s–¾‚ð’Ç‰Á‚·‚é
                 if (!bInsertRow)
@@ -699,6 +714,7 @@
                 // ƒf�[ƒ^“ü—Í�s
                 MakeNewRow(selRec.CompanyCode, selRec.CompanyName, 0, No, ref MakeIndex, -1, MakeIndex);
                 dgv.Rows[MakeIndex].Cells[(int)DispColumn.CompanyDispOrder].Value = selRec.DisplayOrder;
+                dgv.Rows[MakeIndex].Cells[(int)DispColumn.RowState].Value = DataRowState.Added;
 
                 if (bInsertRow)
                 {
@@ -718,23 +734,120 @@
         }
         #endregion
 
-        #region Žw’è‚µ‚½‹¦—Í‰ïŽÐ•\Ž¦�‡�i‰ïŽÐƒR�[ƒh�‡�j‚ÌŽŸ‚ÌƒCƒ“ƒfƒbƒNƒX‚ðŽæ“¾‚·‚é
+        #region Œ»�êƒOƒŠƒbƒh‹ÆŽÒ’Ç‰Á�ˆ—�
         /// <summary>
-        /// Žw’è‚µ‚½‹¦—Í‰ïŽÐ•\Ž¦�‡�i‰ïŽÐƒR�[ƒh�‡�j‚ÌŽŸ‚Ì•\Ž¦�‡ƒCƒ“ƒfƒbƒNƒX‚ðŽæ“¾‚·‚é
+        /// Œ»�êƒOƒŠƒbƒh‹ÆŽÒ’Ç‰Á�ˆ—�
         /// </summary>
-        /// <param name="InsertDispOrder"></param>
+        /// <param name="selRec"></param>
+        private void InsertdgvProjectSubContr(SubContractorMaster selRec)
+        {
+            DataGridView dgv = getShowingView();
+            DataGridViewRow CurRow = dgv.CurrentRow;
+
+            int MakeIndex = -1;
+            try
+            {
+                int nConstrCode = CommonMotions.cnvInt(CurRow.Cells[m_Genba_Column].Value);
+
+                // �HŽ–“à‚ÅŠù‚É‘I‘ð‚³‚ê‚Ä‚¢‚é‹ÆŽÒ‚ð”»’è‚·‚é
+                DataGridViewRow[] rows = dgv.Rows.Cast<DataGridViewRow>().Where(x => CommonMotions.cnvInt(x.Cells[m_Genba_Column].Value) == nConstrCode
+                                                                                && CommonMotions.cnvInt(x.Cells[(int)DispColumn.RowVisible].Value) == (int)RowVisibleDef.Visible)
+                                                                            .ToArray();
+
+                // ”O‚Ì‚½‚ßŒ��”‚ðŠm”F‚·‚é
+                if (rows.Count() < 1) return;
+                
+                // �HŽ––¼‚ðŽæ“¾‚·‚é
+                int iNo = 0;
+                string strConstrName = string.Empty;
+                for (int i = CurRow.Index; i >= 0; i--)
+                {
+                    if (CommonMotions.cnvInt(dgv.Rows[i].Cells[m_Genba_Column].Value) != nConstrCode) break;
+                    if (CommonMotions.cnvString(dgv.Rows[i].Cells[m_GenbaNM_Column].Value).Length > 0)
+                        strConstrName = CommonMotions.cnvString(dgv.Rows[i].Cells[m_GenbaNM_Column].Value);
+                    if (CommonMotions.cnvInt(dgv.Rows[i].Cells[(int)DispColumn.No].Value) > 0)
+                        iNo = CommonMotions.cnvInt(dgv.Rows[i].Cells[(int)DispColumn.No].Value);
+                }
+
+                // ‘I‘ð‹ÆŽÒ‚ªŠù‚É‚ ‚é‚©‚ð”»’è‚·‚é
+                DataGridViewRow[] SelRows = dgv.Rows.Cast<DataGridViewRow>().Where(x => CommonMotions.cnvInt(x.Cells[m_Genba_Column].Value) == nConstrCode
+                                                                                && CommonMotions.cnvInt(x.Cells[m_Company_Column].Value) == selRec.CompanyCode
+                                                                                && CommonMotions.cnvInt(x.Cells[(int)DispColumn.RowVisible].Value) == (int)RowVisibleDef.Visible
+                                                                                && CommonMotions.cnvInt(x.Cells[(int)DispColumn.RowType].Value) == 0)
+                                                                            .OrderBy(x => CommonMotions.cnvInt(x.Cells[m_Company_Column].Value))
+                                                                            .ToArray();
+
+                bool bLastAdd = true;
+                if (SelRows.Count() > 0) bLastAdd = false;
+
+                if (s_UnknownString.Equals(CommonMotions.cnvString(CurRow.Cells[m_CompanyNM_Column].Value))
+                    && selRec.CompanyCode > 0)
+                {
+                    // •s–¾�s‚Í‚»‚Ì‚Ü‚ÜƒZƒbƒg
+                    MakeIndex = CurRow.Index;
+                    CurRow.Cells[m_Company_Column].Value = selRec.CompanyCode;
+                    CurRow.Cells[m_CompanyNM_Column].Value = selRec.CompanyName;
+                    if (DataRowState.Unchanged.Equals(CurRow.Cells[(int)DispColumn.RowState].Value))
+                        CurRow.Cells[(int)DispColumn.RowState].Value = DataRowState.Modified;
+                }
+                else
+                {
+                    if (!bLastAdd)
+                    {
+                        // ----- ‘¶�Ý‹ÆŽÒ‚Ì�ÅŒã‚É’Ç‰Á‚·‚é
+                        MakeIndex = SelRows[SelRows.Count() - 1].Index + 1;
+                    }
+                    else
+                    {
+                        // ----- �¬Œv�s‚Ì�ã‚É’Ç‰Á‚·‚é
+                        MakeIndex = SearchRowIndexProject(nConstrCode, true) + 1;
+                    }
+                    // ƒf�[ƒ^“ü—Í�s
+                    int nSeqNo = CommonMotions.cnvInt(CurRow.Cells[(int)DispColumn.GroupSeqNo].Value);
+                    MakeNewRow(selRec.CompanyCode, selRec.CompanyName, nConstrCode, iNo, ref MakeIndex, nSeqNo, MakeIndex, strConstrName);
+                    dgv.Rows[MakeIndex].Cells[(int)DispColumn.CompanyDispOrder].Value = selRec.DisplayOrder;
+                    dgv.Rows[MakeIndex].Cells[(int)DispColumn.RowState].Value = DataRowState.Added;
+                }
+                ResetNo();
+
+                m_bChengeAns = true;
+
+            }
+            catch (System.Exception ex)
+            {
+                logger.ErrorFormat("ƒVƒXƒeƒ€ƒGƒ‰�[�F{0}�F{1}", CommonMotions.GetMethodName(), ex.Message);
+            }
+        }
+        #endregion
+
+        #region ‹ÆŽÒƒOƒŠƒbƒh‚ÅŽw’è‚µ‚½‰ïŽÐƒR�[ƒh�‡‚ÌŽŸ‚ÌƒCƒ“ƒfƒbƒNƒX‚ðŽæ“¾‚·‚é
+        /// <summary>
+        /// ‹ÆŽÒƒOƒŠƒbƒh‚ÅŽw’è‚µ‚½‰ïŽÐƒR�[ƒh�‡‚ÌŽŸ‚ÌƒCƒ“ƒfƒbƒNƒX‚ðŽæ“¾‚·‚é
+        /// </summary>
         /// <returns></returns>
-        private int SearchRowIndex(int InsertDispOrder)
+        private int SearchRowIndexCompany(int CompnayCode, bool bCompany)
         {
             try
             {
                 int Result = 0;
                 DataGridView dgv = getShowingView();
-                DataGridViewRow Row = dgv.Rows.Cast<DataGridViewRow>().Where(x => CommonMotions.cnvInt(x.Cells[m_Company_Column].Value) > InsertDispOrder
-                                                                                && CommonMotions.cnvInt(x.Cells[(int)DispColumn.RowType].Value) == 0)
-                                                                        .FirstOrDefault();
+                DataGridViewRow SelRow = null;
+                if (bCompany)
+                {
+                    // ‹ÆŽÒŒŸ�õ
+                    SelRow = dgv.Rows.Cast<DataGridViewRow>().Where(x => CommonMotions.cnvInt(x.Cells[m_Company_Column].Value) > CompnayCode
+                                                                        && CommonMotions.cnvInt(x.Cells[(int)DispColumn.RowType].Value) == 0)
+                                                                .FirstOrDefault();
+                }
+                else
+                {
+                    // Œ»�êŒŸ�õ
+                    SelRow = dgv.Rows.Cast<DataGridViewRow>().Where(x => CommonMotions.cnvInt(x.Cells[m_Company_Column].Value) == CompnayCode
+                                                                        && CommonMotions.cnvInt(x.Cells[(int)DispColumn.RowType].Value) == 0)
+                                                                .LastOrDefault();
+                }
 
-                Result = Row == null ? -1 : Row.Index;
+                Result = SelRow == null ? -1 : SelRow.Index;
                 return Result;
             }
             catch (System.Exception ex)
@@ -745,6 +858,45 @@
         }
         #endregion
 
+        #region Œ»�êƒOƒŠƒbƒh‚ÅŽw’è‚µ‚½�HŽ–ƒR�[ƒh�‡‚ÌŽŸ‚ÌƒCƒ“ƒfƒbƒNƒX‚ðŽæ“¾‚·‚é
+        /// <summary>
+        /// Œ»�êƒOƒŠƒbƒh‚ÅŽw’è‚µ‚½�HŽ–ƒR�[ƒh�‡‚ÌŽŸ‚ÌƒCƒ“ƒfƒbƒNƒX‚ðŽæ“¾‚·‚é
+        /// </summary>
+        /// <param name="CompnayCode"></param>
+        /// <returns></returns>
+        private int SearchRowIndexProject(int ConstrCode, bool bCompany)
+        {
+            try
+            {
+                int Result = 0;
+                DataGridView dgv = getShowingView();
+                DataGridViewRow SelRow = null;
+                if (bCompany)
+                {
+                    // Œ»�êŒŸ�õ
+                    SelRow = dgv.Rows.Cast<DataGridViewRow>().Where(x => CommonMotions.cnvInt(x.Cells[m_Genba_Column].Value) == ConstrCode
+                                                                        && CommonMotions.cnvInt(x.Cells[(int)DispColumn.RowType].Value) == 0)
+                                                                .LastOrDefault();
+                }
+                else
+                {
+                    // ‹ÆŽÒŒŸ�õ
+                    SelRow = dgv.Rows.Cast<DataGridViewRow>().Where(x => CommonMotions.cnvInt(x.Cells[m_Genba_Column].Value) > ConstrCode
+                                                                        && CommonMotions.cnvInt(x.Cells[(int)DispColumn.RowType].Value) == 0)
+                                                                .FirstOrDefault();
+                }
+
+                Result = SelRow == null ? -1 : SelRow.Index;
+                return Result;
+            }
+            catch (System.Exception ex)
+            {
+                logger.ErrorFormat("ƒVƒXƒeƒ€ƒGƒ‰�[�F{0}�F{1}", CommonMotions.GetMethodName(), ex.Message);
+                return -1;
+            }
+        }
+        #endregion
+
         #region �s’Ç‰Á
         /// <summary>
         /// �V‹K�s’Ç‰Á
@@ -819,19 +971,14 @@
                 if (iIndex == -1)
                 {
                     iIndex = getNewIndexNo();
-                    dgv.Rows.Add(iIndex
-                                        , CompanyCode.ToString()
-                                        , CompanyName);
+                    dgv.Rows.Add(iIndex, CompanyCode.ToString(), CompanyName);
                     MakeIndex = iIndex;
                 }
                 else
                 {
-                    dgv.Rows.Insert(iIndex
-                                        , CompanyCode.ToString()
-                                        , CompanyName);
+                    dgv.Rows.Insert(iIndex, CompanyCode.ToString(), CompanyName);
                 }
 
-
                 dgv.Rows[iIndex].Cells[(int)DispColumn.CompanyDispOrder].Value = 0;
                 dgv.Rows[iIndex].Cells[(int)DispColumn.ApprovalEndFlg].Value = 0;
                 dgv.Rows[iIndex].Cells[(int)DispColumn.UpdateDate].Value = "";
@@ -845,10 +992,11 @@
 
                 dgv.Rows[iIndex].Cells[m_Company_Column].Value = CompanyCode;
                 dgv.Rows[iIndex].Cells[m_Company_DispColumn].Value = CompanyCode;
-                dgv.Rows[iIndex].Cells[m_CompanyNM_Column].Value = CompanyName;
-                dgv.Rows[iIndex].Cells[m_CompanyNM_Column].ToolTipText = CompanyName;
+                dgv.Rows[iIndex].Cells[m_CompanyNM_Column].Value = CompanyCode > 0 ? CompanyName : s_UnknownString;
+                dgv.Rows[iIndex].Cells[m_CompanyNM_Column].ToolTipText = CompanyCode > 0 ? CompanyName : s_UnknownString;
                 dgv.Rows[iIndex].Cells[m_Genba_Column].Value = GenbaCode;
-                dgv.Rows[iIndex].Cells[m_GenbaNM_Column].Value = GenbaName != "" ? GenbaName : "•s–¾";
+                dgv.Rows[iIndex].Cells[m_GenbaNM_Column].Value = GenbaCode > 0 ? GenbaName : s_UnknownString;
+                dgv.Rows[iIndex].Cells[m_GenbaNM_Column].ToolTipText = GenbaCode > 0 ? GenbaName : s_UnknownString;
 
                 dgv.Rows[iIndex].Cells[(int)DispColumn.SomuSeikyu].Value = 0;
                 dgv.Rows[iIndex].Cells[(int)DispColumn.SomuKosoku].Value = 0;
@@ -862,7 +1010,7 @@
                 dgv.Rows[iIndex].Cells[(int)DispColumn.KojiKanamono].Value = 0;
                 dgv.Rows[iIndex].Cells[(int)DispColumn.KojiSannhaiZei].Value = 0;
                 dgv.Rows[iIndex].Cells[(int)DispColumn.KyoryokuKin].Value = "";
-                dgv.Rows[iIndex].Cells[(int)DispColumn.KyoryokuKinRitu].Value = 0;// �¦•Ï�X•K—v
+                dgv.Rows[iIndex].Cells[(int)DispColumn.KyoryokuKinRitu].Value = CommonMotions.SystemMasterData.CooperationRate;
 
                 // ˆê’UƒZƒ‹‚Ì’l•Ï�XƒCƒxƒ“ƒg‚ð–³Œø‚É‚·‚é
                 dgv.CellValueChanged -= DataGridView_CellValueChanged;
@@ -887,7 +1035,7 @@
                 dgv.Rows[iIndex].Cells[(int)DispColumn.Shonin9].Value = "";
                 dgv.Rows[iIndex].Cells[(int)DispColumn.Shonin10].Value = "";
                 dgv.Rows[iIndex].Cells[(int)DispColumn.Bikou].Value = "";
-                //dgv.Rows[iIndex].Cells[(int)DispColumn.ShohiZeiRitu].Value = 0;// �¦•Ï�X•K—v
+                dgv.Rows[iIndex].Cells[(int)DispColumn.ShohiZeiRitu].Value = CommonMotions.SystemMasterData.ConsumptionTax;
                 dgv.Rows[iIndex].Cells[(int)DispColumn.ConstructionLedgerLineNo].Value = "";
                 dgv.Rows[iIndex].Cells[(int)DispColumn.ConstructionLedgerColNo].Value = "";
 
@@ -908,454 +1056,248 @@
         /// </summary>
         private void ShowSubLocationDiag()
         {
-            ConstructionFieldNameHeader constructionFieldNameHeader = new ConstructionFieldNameHeader();
-            DataGridView dgv = getShowingView();
+            FrmConstructionDiag frm = new FrmConstructionDiag();
             IOConstructionBaseInfo IoCbi = new IOConstructionBaseInfo();
             IOMPersonInCharge IoMpic = new IOMPersonInCharge();
-            FrmRegField frmRegField = new FrmRegField();
-            int ConstrDepartmentCode = 0;
-            ArrayList arData = new ArrayList();
-            List<RequestGridKeys> DeleteRowKeys = new List<RequestGridKeys>();
-
             try
             {
-                int PersonCharge = 0;
-                int iGoukeiCode = 0;
-                int CompanyDispOrder = CommonMotions.cnvInt(dgv.CurrentRow.Cells[(int)DispColumn.CompanyDispOrder].Value);
-                int iCompanyCode = CommonMotions.cnvInt(dgv.CurrentRow.Cells[m_Company_Column].Value);
-                int iSeqNo = CommonMotions.cnvInt(dgv.CurrentRow.Cells[(int)DispColumn.GroupSeqNo].Value);
-                int iGoukei = dgv.Rows.Cast<DataGridViewRow>().Where(x => CommonMotions.cnvInt(x.Cells[(int)DispColumn.RowType].Value) == 0
-                                                                        && (DataRowState)x.Cells[(int)DispColumn.RowState].Value != DataRowState.Deleted
-                                                                        && CommonMotions.cnvInt(x.Cells[m_Company_Column].Value) == iCompanyCode
-                                                                        && CommonMotions.cnvInt(x.Cells[(int)DispColumn.GroupSeqNo].Value) == iSeqNo)
-                                                               .Sum(y => CommonMotions.cnvInt(y.Cells[(int)DispColumn.SomuSeikyu].Value));
+                DataGridView dgv = getShowingView();
+                DataGridViewRow CurRow = dgv.CurrentRow;
 
-                int iKosoku = 0, iKanamono = 0, iSanpai = 0;////�‚‘¬‘ã“™Š„�U—p
-                string KojiTanto = "", KojiTantoCode = "";
+                int nCompnyCode = CommonMotions.cnvInt(CurRow.Cells[m_Company_Column].Value);
+                int nConstrCode = CommonMotions.cnvInt(CurRow.Cells[m_ConstructionCode].Value);
+                if (rdbCompany.Checked)
+                {   // ‹ÆŽÒ
+                    // ‹¦—Í‹ÆŽÒƒR�[ƒh‚ª–³‚¯‚ê‚Î�ˆ—�‚µ‚È‚¢
+                    if (nCompnyCode < 1) return;
+                    frm.DispAddUnknown = true;
+                }
 
-                // “Á•ÊŒ ŒÀ‚Ì�ê�‡
-                if (m_UserInfo.m_Type == CommonDefine.SecurityRankPos.SpecialAuthority)
+                // �³”F�Ï‚Ý‚Í�ˆ—�‚µ‚È‚¢
+                bool bReadOnly = CommonMotions.cnvInt(CurRow.Cells[(int)DispColumn.ApprovalEndFlg].Value) == 1 ? true : false;
+                if (bReadOnly) return;
+
+                int nPersonCode = CommonMotions.LoginUserData.PersonCode;
+
+                // �HŽ–’S“–ŽÒŒŸ�õ
+                frm.PersonCharge = (int)FrmConstructionDiag.PersonChargePoint.Construction;
+                frm.PersonCode = nPersonCode;
+                frm.ProcessNo = (int)ClsExcute.ProcessExecuteNo.RequestSummaryList;
+                frm.SelectType = (int)FrmConstructionDiag.SelectConstructionType.RengeOngoing;
+                frm.SetGridMultiSelect = false;
+
+                frm.ShowDialog();
+                // �I—¹ƒR�[ƒhŠm”F
+                if (DialogResult.Cancel.Equals(frm.EndButton)) return;
+
+                int nNewMakeRowIndex = -1;
+                if (rdbCompany.Checked)         // ‹ÆŽÒ
                 {
-                    PersonCharge = 3;
+                    int nSeqNo = CommonMotions.cnvInt(CurRow.Cells[(int)DispColumn.GroupSeqNo].Value);
+                    InsertdgvCompanyConstr(nCompnyCode, frm.ConstructionCode, frm.ConstructionName, nSeqNo, ref nNewMakeRowIndex);
                 }
-                // �Š‘®’·�A“�Š‡ŽÒ‚Ì�ê�‡
-                else if (m_UserInfo.m_Type == CommonDefine.SecurityRankPos.LimitedAuthority || m_UserInfo.m_Type == CommonDefine.SecurityRankPos.FreeAuthority)
+                else if (rdbProject.Checked)    // Œ»�ê
                 {
-                    PersonCharge = 2;
+                    InsertdgvProjectConstr(nCompnyCode, frm.ConstructionCode, frm.ConstructionName, ref nNewMakeRowIndex);
                 }
-                // ’S“–ŽÒ‚Ì�ê�‡
-                else if (m_UserInfo.m_Type == CommonDefine.SecurityRankPos.NormalAuthority)
-                {
-                    PersonCharge = 1;
-                }
 
-                // ‘�–±’S“–
-                if (m_UserInfo.m_GeneralAffairsFlg == (int)SecurityMaster.GeneAffDef.GeneralDep)
-                {
-                    PersonCharge = 3;
-                }
+                if (frm.ConstructionCode < 1) return;
 
-                //ƒwƒbƒ_�î•ñ
-                constructionFieldNameHeader.CompanyCode = iCompanyCode;
-                constructionFieldNameHeader.CompanyName = CommonMotions.cnvString(dgv.CurrentRow.Cells[m_CompanyNM_Column].ToolTipText);
-                constructionFieldNameHeader.TargetDate = m_Select_TargetDate;
-                constructionFieldNameHeader.SeqNo = iSeqNo;
-                constructionFieldNameHeader.BillPrice = iGoukei;
-                constructionFieldNameHeader.PersonCharge = PersonCharge;
+                // ‘I‘ð‚µ‚½�HŽ–‚Ì�HŽ–’S“–ŽÒ‚Ì•”��‹æ•ª‚ðŽæ“¾‚·‚é
+                ConstructionBaseInfo Cbi = new ConstructionBaseInfo();
+                PersonInChargeMaster Picm = new PersonInChargeMaster();
+                StringBuilder sWhere = new StringBuilder();
+                sWhere.Append(IoCbi.CreatePrimarykeyString(frm.ConstructionCode));
+                if (!IoCbi.SelectAction(sWhere.ToString(), ref Cbi)) throw new Exception("�HŽ–Šî–{�î•ñŽæ“¾ƒGƒ‰�[");
 
-                DataGridViewRow[] rows = dgv.Rows.Cast<DataGridViewRow>().Where(x => CommonMotions.cnvInt(x.Cells[(int)DispColumn.RowType].Value) == 0
-                                                                                    && CommonMotions.cnvInt(x.Cells[(int)DispColumn.RowVisible].Value) == (int)RowVisibleDef.Visible
-                                                                                    && (DataRowState)x.Cells[(int)DispColumn.RowState].Value != DataRowState.Deleted
-                                                                                    && CommonMotions.cnvInt(x.Cells[m_Company_Column].Value) == iCompanyCode
-                                                                                    && CommonMotions.cnvInt(x.Cells[(int)DispColumn.GroupSeqNo].Value) == iSeqNo)
-                                                                        .ToArray();
-                foreach (DataGridViewRow r in rows)
-                {
+                sWhere.Clear();
+                sWhere.Append(IoMpic.CreatePrimarykeyString(Cbi.ConstructionPersonCode));
+                if (!IoMpic.SelectAction(sWhere.ToString(), ref Picm)) throw new Exception("’S“–ŽÒƒ}ƒXƒ^Žæ“¾ƒGƒ‰�[");
 
-                    bool bReadOnly = CommonMotions.cnvInt(r.Cells[(int)DispColumn.ApprovalEndFlg].Value) == 1 ? true : false;
+                // ’�•¶�‘—X‘—�E’�•¶�‘•Ô‘—�E—\ŽZ�‘‚Ì’lŽæ“¾
+                ArrayList arData = new ArrayList();
+                if (!GetMarubatu(IoCbi, frm.ConstructionCode, ref arData)) throw new Exception("�HŽ–Šî–{�î•ñ�E�³”Fƒf�[ƒ^ƒGƒ‰�[");
 
-                    if (bReadOnly == false)
-                    {
-                        if (0 < CheckPaymentDataDetail(iCompanyCode, iSeqNo, CommonMotions.cnvInt(r.Cells[(int)DispColumn.LineCount].Value)))
-                        {
-                            bReadOnly = true;
-                        }
-                    }
+                // �³”FŽÒ�Ý’è
+                int iDefaultCount = 0;
+                if (!SetDefaultShonin(dgv, nNewMakeRowIndex, Picm.DepartmentCode, ref iDefaultCount)) throw new Exception("�‰Šú�³”FŽÒ’l�Ý’èƒGƒ‰�[");
 
-                    //‰æ–Ê‚Ì�s�î•ñ‚ð�Ý’è
-                    string sGenbaName = CommonMotions.cnvString(r.Cells[m_GenbaNM_Column].Value) == ""
-                                        ? CommonMotions.cnvString(r.Cells[m_GenbaNM_Column].ToolTipText)
-                                        : CommonMotions.cnvString(r.Cells[m_GenbaNM_Column].Value);
-                    constructionFieldNameHeader.ConstructionFieldNameDetails.Add(
-                        //�s”Ô�†�A�HŽ–”Ô�†�A�HŽ––¼�A‘�–±“ü—Í‹àŠz�A�í�œƒtƒ‰ƒO�A“ÇŽæ�ê—pƒtƒ‰ƒO(�³”FŠ®—¹ƒtƒ‰ƒO)
-                    new ConstructionFieldNameDetail(CommonMotions.cnvInt(r.Cells[(int)DispColumn.LineCount].Value),
-                                                    CommonMotions.cnvInt(r.Cells[m_Genba_Column].Value),
-                                                    sGenbaName,
-                                                    CommonMotions.cnvInt(r.Cells[(int)DispColumn.SomuSeikyu].Value), false,
-                                                    bReadOnly));
-
-                    if (CommonMotions.cnvInt(r.Cells[m_Genba_Column].Value) == 0) //�‚‘¬‘ã“™
+                // �³”F—ñ•\Ž¦
+                if (iDefaultCount > 0)
+                {
+                    for (int i = 0; i < iDefaultCount; i++)
                     {
-                        iKosoku = CommonMotions.cnvInt(r.Cells[(int)DispColumn.SomuKosoku].Value);
-                        iKanamono = CommonMotions.cnvInt(r.Cells[(int)DispColumn.SomuKanamono].Value);
-                        iSanpai = CommonMotions.cnvInt(r.Cells[(int)DispColumn.SomuSannhaiZei].Value);
+                        dgv.Columns[(int)DispColumn.Shonin1 + (i * s_ShoninBlockCnt)].Visible = true;
                     }
                 }
 
-
-                //Œ»�ê“o˜^‰æ–ÊŒÄ‚Ñ�o‚µ
-                frmRegField.ConstructionFieldNameHeader = constructionFieldNameHeader;
-                frmRegField.ShowDialog();
-
-                // �I—¹ƒ{ƒ^ƒ“‚Í�ˆ—�‚¹‚¸‚É�I—¹
-                if (frmRegField.EndButton != DialogResult.OK)
+                if (arData != null && arData.Count != 0)
                 {
-                    m_bChengeAns = true;
-                    return;
+                    // ’�•¶�‘’ñ�o�E’�•¶�‘“ž’…�E—\ŽZ�‘
+                    object[] row = (object[])arData[0];
+                    dgv.Rows[nNewMakeRowIndex].Cells[(int)DispColumn.CyuumonshoTeisyutu].Value = row[0];
+                    dgv.Rows[nNewMakeRowIndex].Cells[(int)DispColumn.CyuumonshoTouchaku].Value = row[1];
+                    dgv.Rows[nNewMakeRowIndex].Cells[(int)DispColumn.YosanSho].Value = row[2];
                 }
 
-                // ----- ‘I‘ð‚³‚ê‚½�ê�‡‚Ì�ˆ—�
-                //•Ï�X‚³‚ê‚½’l‚Å•\Ž¦�s‚ð�ˆ—�
-                foreach (ConstructionFieldNameDetail detail in frmRegField.ConstructionFieldNameHeader.ConstructionFieldNameDetails.OrderBy(x => x.DeleteFlag == true ? 1 : 0))
-                {
-                    if (detail.ReadOnly == false)
-                    {
-                        string sCompanyName = "", sGenbaName = "";
-                        bool bGoukeiDelete = false;
+                //’S“–ŽÒ�³”F�Ý’è
+                dgv.Rows[nNewMakeRowIndex].Cells[(int)DispColumn.TantoShoninCode].Value = Picm.PersonCode;
+                dgv.Rows[nNewMakeRowIndex].Cells[(int)DispColumn.TantoShonin].Value = Picm.PersonName;
+                dgv.Rows[nNewMakeRowIndex].Cells[(int)DispColumn.TantoShonin].Style.ForeColor = Color.Gray;
 
-                        if (rdbCompany.Checked)
-                        {
-                            iGoukeiCode = iCompanyCode;
-                            sGenbaName = detail.FieldName;
-                        }
-                        else
-                        {
-                            iGoukeiCode = detail.ConstructionCode;
-                            sCompanyName = constructionFieldNameHeader.CompanyName;
-                        }
+                m_bChengeAns = true;
 
-                        KojiTanto = "";
-                        KojiTantoCode = "";
+            }
+            catch (System.Exception ex)
+            {
+                logger.ErrorFormat("ƒVƒXƒeƒ€ƒGƒ‰�[�F{0}�F{1}", CommonMotions.GetMethodName(), ex.Message);
+            }
+            finally
+            {
+                frm.Dispose(); frm = null;
+                IoCbi.close(); IoCbi = null;
+                IoMpic.close(); IoMpic = null;
 
-                        // •s–¾�sˆÈŠO
-                        if (detail.ConstructionCode != 0)
-                        {
-                            // ‘I‘ð‚µ‚½�HŽ–‚Ì�HŽ–’S“–ŽÒ‚Ì•”��‹æ•ª‚ðŽæ“¾‚·‚é
-                            ConstructionBaseInfo Cbi = new ConstructionBaseInfo();
-                            PersonInChargeMaster Picm = new PersonInChargeMaster();
-                            string sWhere = IoCbi.CreatePrimarykeyString(detail.ConstructionCode);
-                            if (!IoCbi.SelectAction(sWhere, ref Cbi)) throw new Exception("�HŽ–Šî–{�î•ñŽæ“¾ƒGƒ‰�[");
+                ResetNo();
+            }
+        }
+        #endregion
 
-                            sWhere = IoMpic.CreatePrimarykeyString(Cbi.ConstructionPersonCode);
-                            if (!IoMpic.SelectAction(sWhere, ref Picm)) throw new Exception("’S“–ŽÒƒ}ƒXƒ^Žæ“¾ƒGƒ‰�[");
-                            ConstrDepartmentCode = Picm.DepartmentCode;
+        #region ‹ÆŽÒƒOƒŠƒbƒhŒ»�ê’Ç‰Á�ˆ—�
+        /// <summary>
+        /// ‹ÆŽÒƒOƒŠƒbƒhŒ»�ê’Ç‰Á�ˆ—�
+        /// </summary>
+        private void InsertdgvCompanyConstr(int nCompanyCode, int nConstructionCode, string strConstructionName, int nSeqNo
+                                            , ref int nNewMakeRowIndex)
+        {
+            try
+            {
+                DataGridView dgv = getShowingView();
+                DataGridViewRow CurRow = dgv.CurrentRow;
 
-                            //�HŽ–’S“–ŽÒ
-                            KojiTantoCode = Picm.PersonCode.ToString();
-                            KojiTanto = Picm.SealPrintName;
+                // ‹ÆŽÒ–¼‚ðŽæ“¾‚·‚é
+                string strCompnyName = string.Empty;
+                for (int i = CurRow.Index; i >= 0; i--)
+                {
+                    if (CommonMotions.cnvInt(dgv.Rows[i].Cells[m_Company_Column].Value) != nCompanyCode) break;
+                    if (CommonMotions.cnvString(dgv.Rows[i].Cells[m_CompanyNM_Column].Value).Length > 0)
+                        strCompnyName = CommonMotions.cnvString(dgv.Rows[i].Cells[m_CompanyNM_Column].Value);
+                }
 
-                            // ’�•¶�‘—X‘—�E’�•¶�‘•Ô‘—�E—\ŽZ�‘‚Ì’lŽæ“¾
-                            arData.Clear();
-                            if (!GetMarubatu(IoCbi, detail.ConstructionCode, ref arData)) throw new Exception("�HŽ–Šî–{�î•ñ�E�³”Fƒf�[ƒ^ƒGƒ‰�[");
-                        }
+                // ‘I‘ð‹ÆŽÒ‚ªŠù‚É‚ ‚é‚©‚ð”»’è‚·‚é
+                DataGridViewRow[] SelRows = dgv.Rows.Cast<DataGridViewRow>().Where(x => CommonMotions.cnvInt(x.Cells[m_Company_Column].Value) == nCompanyCode
+                                                                                && CommonMotions.cnvInt(x.Cells[m_Genba_Column].Value) == nConstructionCode
+                                                                                && CommonMotions.cnvInt(x.Cells[(int)DispColumn.RowVisible].Value) == (int)RowVisibleDef.Visible
+                                                                                && CommonMotions.cnvInt(x.Cells[(int)DispColumn.RowType].Value) == 0)
+                                                                            .OrderBy(x => CommonMotions.cnvInt(x.Cells[m_Company_Column].Value))
+                                                                            .ToArray();
 
-                        // Šù‘¶‚Ì�s”Ô�†ŒŸ�õ
-                        int iRowIndex = SearchRowIndex(m_Company_Column, iCompanyCode, GoukeiRows.�¬Œv, iSeqNo, CommonMotions.cnvInt(detail.LineCount));
+                bool bLastAdd = true;
+                if (SelRows.Count() > 0) bLastAdd = false;
+                if (nCompanyCode == 0) bLastAdd = false;
 
-                        //�‚‘¬‘ã“™Š„�U
-                        if (detail.ConstructionCode == 0 && detail.DeleteFlag == true)
-                        {
-                            dgv.Rows[iRowIndex].Cells[(int)DispColumn.SomuKosoku].Value = 0;
-                            dgv.Rows[iRowIndex].Cells[(int)DispColumn.SomuKanamono].Value = 0;
-                            dgv.Rows[iRowIndex].Cells[(int)DispColumn.SomuSannhaiZei].Value = 0;
-                        }
-                        else if (detail.DeleteFlag == true)
-                        {
-                            if (CommonMotions.cnvInt(dgv.Rows[iRowIndex].Cells[(int)DispColumn.SomuKosoku].Value) > 0)
-                            {
-                                iKosoku = CommonMotions.cnvInt(dgv.Rows[iRowIndex].Cells[(int)DispColumn.SomuKosoku].Value);
-                            }
-                            if (CommonMotions.cnvInt(dgv.Rows[iRowIndex].Cells[(int)DispColumn.SomuKanamono].Value) > 0)
-                            {
-                                iKanamono = CommonMotions.cnvInt(dgv.Rows[iRowIndex].Cells[(int)DispColumn.SomuKanamono].Value);
-                            }
-                            if (CommonMotions.cnvInt(dgv.Rows[iRowIndex].Cells[(int)DispColumn.SomuSannhaiZei].Value) > 0)
-                            {
-                                iSanpai = CommonMotions.cnvInt(dgv.Rows[iRowIndex].Cells[(int)DispColumn.SomuSannhaiZei].Value);
-                            }
-                        }
+                // •s–¾�s‚ð‘I‘ð‚µ‚½�ê�‡‚Í�HŽ–‚ðƒZƒbƒg‚·‚é
+                int MakeIndex = 0;
+                if (s_UnknownString.Equals(CommonMotions.cnvString(CurRow.Cells[m_GenbaNM_Column].Value))
+                    && nConstructionCode > 0)
+                {
+                    MakeIndex = CurRow.Index;
+                    CurRow.Cells[m_Genba_Column].Value = nConstructionCode;
+                    CurRow.Cells[m_GenbaNM_Column].Value = strConstructionName;
+                    if (DataRowState.Unchanged.Equals(CurRow.Cells[(int)DispColumn.RowState].Value))
+                        CurRow.Cells[(int)DispColumn.RowState].Value = DataRowState.Modified;
+                }
+                else
+                {
+                    if (!bLastAdd)
+                    {
+                        // ----- ‘¶�Ý‹ÆŽÒ‚Ì�ÅŒã‚É’Ç‰Á‚·‚é
+                        MakeIndex = SelRows[SelRows.Count() - 1].Index;
+                    }
+                    else
+                    {
+                        // ----- �¬Œv�s‚Ì�ã‚É’Ç‰Á‚·‚é
+                        MakeIndex = SearchRowIndexCompany(nCompanyCode, false);
+                    }
 
-                        if (iRowIndex != -1)
-                        {
-                            if (detail.DeleteFlag == true)
-                            {
-                                if ((DataRowState)dgv.Rows[iRowIndex].Cells[(int)DispColumn.RowState].Value == DataRowState.Added)
-                                {
-                                    //�í�œƒ}�[ƒN(ƒL�[�€–Ú‹L˜^)
-                                    DeleteRowKeys.Add(new RequestGridKeys(0, //CommonMotions.cnvInt(dgv.Rows[iRowIndex].Cells[(int)DispColumn.RowVisible].Value),
-                                                                          CommonMotions.cnvInt(dgv.Rows[iRowIndex].Cells[m_Company_Column].Value),
-                                                                          CommonMotions.cnvInt(dgv.Rows[iRowIndex].Cells[m_Genba_Column].Value),
-                                                                          CommonMotions.cnvInt(dgv.Rows[iRowIndex].Cells[(int)DispColumn.RowType].Value),
-                                                                          CommonMotions.cnvInt(dgv.Rows[iRowIndex].Cells[(int)DispColumn.GroupSeqNo].Value),
-                                                                          CommonMotions.cnvInt(dgv.Rows[iRowIndex].Cells[(int)DispColumn.LineCount].Value)));
+                    // �s�ì�¬
+                    MakeNewRow(nCompanyCode, strCompnyName, nConstructionCode, 0, ref MakeIndex, -1, MakeIndex + 1, strConstructionName);
+                    dgv.Rows[MakeIndex].Cells[(int)DispColumn.RowState].Value = DataRowState.Added;
+                }
+                
+                nNewMakeRowIndex = MakeIndex;
+            }
+            catch (System.Exception ex)
+            {
+                logger.ErrorFormat("ƒVƒXƒeƒ€ƒGƒ‰�[�F{0}�F{1}", CommonMotions.GetMethodName(), ex.Message);
+            }
+        }
+        #endregion
 
-                                    dgv.Rows[iRowIndex].Cells[(int)DispColumn.RowVisible].Value = (int)RowVisibleDef.UnVisible;
-                                }
-                                else
-                                {
-                                    dgv.Rows[iRowIndex].Cells[(int)DispColumn.RowState].Value = DataRowState.Deleted;
-                                    dgv.Rows[iRowIndex].Cells[(int)DispColumn.RowVisible].Value = (int)RowVisibleDef.UnVisible;
-                                    dgv.Rows[iRowIndex].Visible = false;
-                                }
-                                if (rdbProject.Checked)
-                                {
-                                    DeleteGoukeiRows(CommonMotions.cnvInt(dgv.Rows[iRowIndex].Cells[m_GoukeiCode_Column].Value), ref bGoukeiDelete);
-                                }
-                            }
-                            else
-                            {
-                                dgv.Rows[iRowIndex].Cells[m_Genba_Column].Value = detail.ConstructionCode;
-                                dgv.Rows[iRowIndex].Cells[m_GenbaNM_Column].Value = detail.FieldName;
-                                dgv.Rows[iRowIndex].Cells[(int)DispColumn.SomuSeikyu].Value = detail.BillPrice;
+        #region Œ»�êƒOƒŠƒbƒhŒ»�ê’Ç‰Á�ˆ—�
+        /// <summary>
+        /// Œ»�êƒOƒŠƒbƒhŒ»�ê’Ç‰Á�ˆ—�
+        /// </summary>
+        private void InsertdgvProjectConstr(int nCompanyCode, int nConstructionCode, string strConstructionName, ref int nNewMakeRowIndex)
+        {
+            try
+            {
+                DataGridView dgv = getShowingView();
+                DataGridViewRow CurRow = dgv.CurrentRow;
 
-                                ////�‚‘¬‘ã“™Š„�U Šù‘¶‚Ì�s‚ÉŠ„�U‚è
-                                if (iKosoku > 0)
-                                {
-                                    dgv.Rows[iRowIndex].Cells[(int)DispColumn.SomuKosoku].Value = iKosoku;
-                                    iKosoku = 0;
-                                }
-                                if (iKanamono > 0)
-                                {
-                                    dgv.Rows[iRowIndex].Cells[(int)DispColumn.SomuKanamono].Value = iKanamono;
-                                    iKanamono = 0;
-                                }
-                                if (iSanpai > 0)
-                                {
-                                    dgv.Rows[iRowIndex].Cells[(int)DispColumn.SomuSannhaiZei].Value = iSanpai;
-                                    iSanpai = 0;
-                                }
-                            }
-                        }
-                        else
-                        {
+                // Šù‚É�HŽ–‚ª‚ ‚é‚©‚Ìƒ`ƒFƒbƒN
+                DataGridViewRow[] Rows = dgv.Rows.Cast<DataGridViewRow>().Where(x => CommonMotions.cnvInt(x.Cells[m_Genba_Column].Value) == nConstructionCode)
+                                                                        .ToArray();
 
-                            DataGridViewRow[] MaxRow;
-                            int iNo = 0;
-                            bool bNewGoukei = false;
-                            int iFumeiIndex = -1;
-                            if (rdbCompany.Checked)
-                            {
-                                //�Å‘å�s”Ô�†‚ÌŽæ“¾(‰B‚ê‚Ä‚¢‚é�s‚àŠÜ‚ß‚Ä)
-                                int MaxLineCount = dgv.Rows.Cast<DataGridViewRow>().Where(x => CommonMotions.cnvInt(x.Cells[m_Company_Column].Value) == iCompanyCode
-                                                                                            && CommonMotions.cnvInt(x.Cells[(int)DispColumn.GroupSeqNo].Value) == iSeqNo)
-                                                                                   .Max(y => CommonMotions.cnvInt(y.Cells[(int)DispColumn.LineCount].Value));
+                bool bLastAdd = true;
+                if (Rows.Count() > 0) bLastAdd = false;
 
-                                MaxRow = dgv.Rows.Cast<DataGridViewRow>().Where(x => CommonMotions.cnvInt(x.Cells[m_Company_Column].Value) == iCompanyCode
-                                                                                                    && CommonMotions.cnvInt(x.Cells[(int)DispColumn.GroupSeqNo].Value) == iSeqNo
-                                                                                                    && CommonMotions.cnvInt(x.Cells[(int)DispColumn.LineCount].Value) == MaxLineCount)
-                                                                                           .ToArray();
-                                if (MaxRow.Count() > 1)
-                                {
-                                    DataGridViewRow dgvr = null;
-                                    foreach (DataGridViewRow r in MaxRow)
-                                    {
-                                        dgvr = r;
-                                        if (CommonMotions.cnvInt(r.Cells[(int)DispColumn.RowVisible].Value) == (int)RowVisibleDef.Visible) break;
-                                    }
-                                    MaxRow = new DataGridViewRow[] { dgvr };
-                                }
-                            }
-                            else
-                            {
-                                //�@“¯Œ»�êƒR�[ƒh‚Ì�Å‘å–¾�×”Ô�†‚ðŽæ“¾‚·‚é
-                                string MaxGoukeiSeq = dgv.Rows.Cast<DataGridViewRow>().Where(x => CommonMotions.cnvInt(x.Cells[m_Genba_Column].Value) == detail.ConstructionCode
-                                                                                             && CommonMotions.cnvInt(x.Cells[(int)DispColumn.RowVisible].Value) == (int)RowVisibleDef.Visible)
-                                                                                   .Max(y => CommonMotions.cnvString(y.Cells[(int)DispColumn.GoukeiSeqNo].Value));
+                int MakeIndex = 0;
 
-                                if (MaxGoukeiSeq == null)
-                                {
-                                    // ƒf�[ƒ^‚ª‘¶�Ý‚µ‚È‚¢�i�V‹KŒ»�êƒR�[ƒh�j
-                                    bNewGoukei = true;
-                                    MaxRow = new DataGridViewRow[] { dgv.Rows[dgv.Rows.Count - 1] };
+                    // ----- Šù‚É‚ ‚é�ê�‡
+                if (!bLastAdd)
+                {
+                    if (DataRowState.Deleted.Equals(Rows[0].Cells[(int)DispColumn.RowState].Value))
+                    {
+                        // ----- �í�œ‚³‚ê‚Ä‚¢‚½�ê�‡
+                        Rows[0].Cells[(int)DispColumn.RowState].Value = DataRowState.Modified;
+                        Rows[0].Visible = true;
 
-                                    if (rdbProject.Checked && detail.ConstructionCode == 0)
-                                    {
-                                        iFumeiIndex = 0;
-                                    }
+                        Rows[0].Cells[m_Company_Column].Value = 0;
+                        Rows[0].Cells[m_Company_DispColumn].Value = string.Empty;
+                        Rows[0].Cells[m_CompanyNM_Column].Value = s_UnknownString;
+                        Rows[0].Cells[m_CompanyNM_Column].ToolTipText = s_UnknownString;
+                        Rows[0].Cells[m_Genba_Column].Value = nConstructionCode;
+                        Rows[0].Cells[m_GenbaNM_Column].Value = strConstructionName;
+                        Rows[0].Cells[m_GenbaNM_Column].ToolTipText = strConstructionName;
 
-                                    // No’l
-                                    iNo = dgv.Rows.Cast<DataGridViewRow>().Max(x => CommonMotions.cnvInt(x.Cells[(int)DispColumn.No].Value.ToString()));
-                                    iNo++;
-                                }
-                                else
-                                {
-                                    // Žæ“¾‚µ‚½ƒf�[ƒ^‚ÌƒCƒ“ƒfƒbƒNƒX‚ðŽæ“¾
-                                    MaxRow = dgv.Rows.Cast<DataGridViewRow>().Where(x => CommonMotions.cnvInt(x.Cells[m_Genba_Column].Value) == detail.ConstructionCode
-                                                                                                        && CommonMotions.cnvInt(x.Cells[(int)DispColumn.GoukeiSeqNo].Value) == CommonMotions.cnvInt(MaxGoukeiSeq))
-                                                                                               .ToArray();
-                                }
-                            }
-                            int MakeIndex = 0;
-                            int SendMakeIndex;
-                            if (rdbCompany.Checked)
-                            {
-                                SendMakeIndex = iFumeiIndex == -1 ? MaxRow[0].Index : iFumeiIndex;
-                            }
-                            else
-                            {
-                                SendMakeIndex = iFumeiIndex == -1 ? MaxRow[0].Index + 1 : iFumeiIndex;
-                            }
-                            MakeNewRow(iCompanyCode, sCompanyName, detail.ConstructionCode, iNo, ref MakeIndex, iSeqNo, SendMakeIndex, detail.FieldName);
-
-                            string sGoukeiName = rdbCompany.Checked ? constructionFieldNameHeader.CompanyName : detail.FieldName;
-                            dgv.Rows[MakeIndex].Cells[m_GoukeiCode_Column + 1].ToolTipText = sGoukeiName;
-                            dgv.Rows[MakeIndex].Cells[(int)DispColumn.CompanyDispOrder].Value = CompanyDispOrder;
-                            dgv.Rows[MakeIndex].Cells[(int)DispColumn.SomuSeikyu].Value = detail.BillPrice;
-
-                            // •s–¾�sˆÈŠO
-                            if (detail.ConstructionCode != 0)
-                            {
-                                // �³”FŽÒ�Ý’è
-                                int iDefaultCount = 0;
-                                if (!SetDefaultShonin(dgv, MakeIndex, ConstrDepartmentCode, ref iDefaultCount)) throw new Exception("�‰Šú�³”FŽÒ’l�Ý’èƒGƒ‰�[");
-
-                                // �³”F—ñ•\Ž¦
-                                if (iDefaultCount > 0)
-                                {
-                                    for (int i = 0; i < iDefaultCount; i++)
-                                    {
-                                        dgv.Columns[(int)DispColumn.Shonin1 + (i * 5)].Visible = true;
-                                    }
-                                }
-
-                                if (arData != null && arData.Count != 0)
-                                {
-                                    // ’�•¶�‘’ñ�o�E’�•¶�‘“ž’…�E—\ŽZ�‘
-                                    object[] row = (object[])arData[0];
-                                    dgv.Rows[MakeIndex].Cells[(int)DispColumn.CyuumonshoTeisyutu].Value = row[0];
-                                    dgv.Rows[MakeIndex].Cells[(int)DispColumn.CyuumonshoTouchaku].Value = row[1];
-                                    dgv.Rows[MakeIndex].Cells[(int)DispColumn.YosanSho].Value = row[2];
-                                }
-
-                                // �¦ƒeƒXƒg—p
-                                //if (CommonMotions.LoginUserData.PersonCode == 88889988)
-                                //{
-                                //    dgv.Rows[MakeIndex].Cells[(int)DispColumn.TantoShonin].Value = "ƒeƒXƒg";
-                                //}
-                                //else
-                                //{ 
-                                //’S“–ŽÒ�³”F�Ý’è
-                                dgv.Rows[MakeIndex].Cells[(int)DispColumn.TantoShoninCode].Value = KojiTantoCode;
-                                dgv.Rows[MakeIndex].Cells[(int)DispColumn.TantoShonin].Value = KojiTanto;
-                                dgv.Rows[MakeIndex].Cells[(int)DispColumn.TantoShonin].Style.ForeColor = Color.Gray;
-                                //}
-
-                                ////�‚‘¬‘ã“™Š„�U �Å�‰‚Ì’Ç‰Á•ª‚ÉŠ„�U‚è
-                                if (iKosoku > 0)
-                                {
-                                    dgv.Rows[MakeIndex].Cells[(int)DispColumn.SomuKosoku].Value = iKosoku;
-                                    iKosoku = 0;
-                                }
-                                if (iKanamono > 0)
-                                {
-                                    dgv.Rows[MakeIndex].Cells[(int)DispColumn.SomuKanamono].Value = iKanamono;
-                                    iKanamono = 0;
-                                }
-                                if (iSanpai > 0)
-                                {
-                                    dgv.Rows[MakeIndex].Cells[(int)DispColumn.SomuSannhaiZei].Value = iSanpai;
-                                    iSanpai = 0;
-                                }
-                            }
-
-                            // �V‹K�‡Œv�s‚ð�ì�¬‚·‚é
-                            if (bNewGoukei == true)
-                            {
-                                // �‡Œv�s’Ç‰Á(�V‹K‚Ì�‡Œv’Ç‰Á‚ÍŒ»�ê‰æ–Ê‚Ì‚Ý)
-                                MakeGoukeiGyo(dgv, detail.ConstructionCode, CompanyDispOrder, MakeIndex + 1);
-                            }
-
-                        }
-
-                        if (bGoukeiDelete == false)
-                        {
-                            // �‡Œv’lŽZ�o
-                            setGoukei_DataDisp(dgv, iGoukeiCode);
-                        }
-
+                        nNewMakeRowIndex = Rows[0].Index;
+                        return;
                     }
-                }
 
-                if (iKosoku > 0 || iSanpai > 0 || iKanamono > 0)
-                {
-                    DataGridViewRow[] zappiRows = dgv.Rows.Cast<DataGridViewRow>().Where(x => CommonMotions.cnvInt(x.Cells[(int)DispColumn.RowType].Value) == 0
-                                                                                        && CommonMotions.cnvInt(x.Cells[(int)DispColumn.RowVisible].Value) == (int)RowVisibleDef.Visible
-                                                                                        && CommonMotions.cnvInt(x.Cells[m_Company_Column].Value) == iCompanyCode
-                                                                                        && CommonMotions.cnvInt(x.Cells[(int)DispColumn.GroupSeqNo].Value) == iSeqNo
-                                                                                        && CommonMotions.cnvInt(x.Cells[m_Genba_Column].Value) == 0).ToArray();
-
-                    if (zappiRows != null)
-                    {
-                        if (iKosoku > 0)
-                        {
-                            zappiRows[0].Cells[(int)DispColumn.SomuKosoku].Value = iKosoku;
-                            iKosoku = 0;
-                        }
-                        if (iKanamono > 0)
-                        {
-                            zappiRows[0].Cells[(int)DispColumn.SomuKanamono].Value = iKanamono;
-                            iKanamono = 0;
-                        }
-                        if (iSanpai > 0)
-                        {
-                            zappiRows[0].Cells[(int)DispColumn.SomuSannhaiZei].Value = iSanpai;
-                            iSanpai = 0;
-                        }
-                    }
                 }
-
-                // ƒ}�[ƒN‚µ‚Ä‚¨‚¢‚½�í�œ‘Î�Û�s‚ª‘¶�Ý‚·‚ê‚Î�í�œ‚·‚é
-                foreach (RequestGridKeys delRow in DeleteRowKeys)
+                else
                 {
-                    DataGridViewRow[] r = dgv.Rows.Cast<DataGridViewRow>().Where(x => CommonMotions.cnvInt(x.Cells[(int)DispColumn.RowVisible].Value) == delRow.Visible
-                                                                                     && CommonMotions.cnvInt(x.Cells[(int)DispColumn.RowType].Value) == delRow.RowType
-                                                                                     && CommonMotions.cnvInt(x.Cells[m_Company_Column].Value) == delRow.CompanyCode
-                                                                                     && CommonMotions.cnvInt(x.Cells[m_Genba_Column].Value) == delRow.GenbaCode
-                                                                                     && CommonMotions.cnvInt(x.Cells[(int)DispColumn.GroupSeqNo].Value) == delRow.SeqNo
-                                                                                     && CommonMotions.cnvInt(x.Cells[(int)DispColumn.LineCount].Value) == delRow.LineCount)
-                                                                                     .ToArray();
-                    if (r != null)
-                    {
-                        dgv.Rows.Remove(r[0]);
-                    }
-                }
+                    // ----- �V‹K�s
+                    MakeIndex = SearchRowIndexProject(nConstructionCode, false);
+                    
+                    // �s�ì�¬
+                    MakeNewRow(0, string.Empty, nConstructionCode, 0, ref MakeIndex, -1, -1, strConstructionName);
+                    dgv.Rows[MakeIndex].Cells[(int)DispColumn.CompanyDispOrder].Value = 0;
+                    dgv.Rows[MakeIndex].Cells[(int)DispColumn.RowState].Value = DataRowState.Added;
 
-                // �‡Œv’lŽZ�o
-                setGoukei_DataDisp(dgv, iGoukeiCode);
-
-                if (rdbCompany.Checked)
-                {
-                    ResetSeqNo(iGoukeiCode);
+                    // �‡Œv�s’Ç‰Á
+                    int GoukeiNo = CommonMotions.cnvInt(dgv.Rows[MakeIndex].Cells[(int)DispColumn.GoukeiSeqNo].Value);
+                    MakeIndex++;
+                    MakeGoukeiGyo(dgv, GoukeiNo, 0, MakeIndex);
                 }
 
-                ResetNo();
-
-                m_bChengeAns = true;
-
+                nNewMakeRowIndex = MakeIndex;
             }
             catch (System.Exception ex)
             {
                 logger.ErrorFormat("ƒVƒXƒeƒ€ƒGƒ‰�[�F{0}�F{1}", CommonMotions.GetMethodName(), ex.Message);
             }
-            finally
-            {
-                frmRegField.Dispose();
-                frmRegField = null;
-                IoCbi.close();
-                IoCbi = null;
-                IoMpic.close();
-                IoMpic = null;
-            }
         }
         #endregion
 
@@ -1365,7 +1307,6 @@
         /// </summary>
         private void ResetNo()
         {
-
             try
             {
                 DataGridView dgv = getShowingView();
@@ -1377,26 +1318,29 @@
                 {
                     DisporderCol = (int)DispColumn_Company.SubConstractorCode;
 
+                    // •\Ž¦‚³‚ê‚Ä‚¢‚é�i�í�œ‚³‚ê‚Ä‚¢‚È‚¢�j–¾�×�s‚ð‘Î�Û‚Æ‚·‚é
                     var OrderRows = dgv.Rows.Cast<DataGridViewRow>().Where(x => CommonMotions.cnvInt(x.Cells[(int)DispColumn.RowType].Value) == 0
-                                                    && CommonMotions.cnvInt(x.Cells[(int)DispColumn.RowVisible].Value) == (int)RowVisibleDef.Visible)
-                                                    .GroupBy(c => new
-                                                    {
-                                                        DispOrder = CommonMotions.cnvInt(c.Cells[DisporderCol].Value),
-                                                        GoukeiCode = CommonMotions.cnvInt(c.Cells[m_GoukeiCode_Column].Value),
-                                                        GoukeiName = CommonMotions.cnvString(c.Cells[m_GoukeiCode_Column + 2].ToolTipText)
-                                                    })
-                                                    .OrderBy(x => x.Key.DispOrder)
-                                                    .ToArray();
+                                                                            && CommonMotions.cnvInt(x.Cells[(int)DispColumn.RowVisible].Value) == (int)RowVisibleDef.Visible)
+                                                                    .GroupBy(c => new
+                                                                    {
+                                                                        DispOrder = CommonMotions.cnvInt(c.Cells[DisporderCol].Value),
+                                                                        GoukeiCode = CommonMotions.cnvInt(c.Cells[m_GoukeiCode_Column].Value),
+                                                                        GoukeiName = CommonMotions.cnvString(c.Cells[m_GoukeiCode_Column + 2].ToolTipText)
+                                                                    })
+                                                                    .OrderBy(x => x.Key.DispOrder)
+                                                                    .ToArray();
 
                     iNo = 1;
                     foreach (var k in OrderRows)
                     {
+                        // �HŽ–”Ô�†‚ª“¯‚¶‚à‚Ì‚ðŽæ“¾‚·‚é
                         DataGridViewRow[] GoukeiRows = dgv.Rows.Cast<DataGridViewRow>().Where(x => CommonMotions.cnvInt(x.Cells[(int)DispColumn.RowType].Value) == 0
-                                                                     && CommonMotions.cnvInt(x.Cells[m_GoukeiCode_Column].Value) == k.Key.GoukeiCode)
-                                                          .OrderBy(x => x.Cells[(int)DispColumn.CompanyDispOrder].Value)
-                                                          .ThenBy(x => x.Cells[(int)DispColumn.GroupSeqNo].Value)
-                                                          .ThenBy(x => x.Cells[(int)DispColumn.LineCount].Value)
-                                                          .ToArray();
+                                                                                                 && CommonMotions.cnvInt(x.Cells[m_GoukeiCode_Column].Value) == k.Key.GoukeiCode)
+                                                                                      .OrderBy(x => x.Cells[(int)DispColumn.CompanyDispOrder].Value)
+                                                                                      .ThenBy(x => x.Cells[(int)DispColumn.GroupSeqNo].Value)
+                                                                                      .ThenBy(x => x.Cells[(int)DispColumn.LineCount].Value)
+                                                                                      .ToArray();
+                        // �s‚ÌSEQNO‚ðƒZƒbƒg‚·‚é
                         iTop = 1;
                         foreach (DataGridViewRow r in GoukeiRows)
                         {
@@ -1404,42 +1348,29 @@
                             iTop++;
                         }
 
-                        DataGridViewRow[] Rows;
-                        if (rdbCompany.Checked)
-                        {
-                            Rows = dgv.Rows.Cast<DataGridViewRow>().Where(x => CommonMotions.cnvInt(x.Cells[(int)DispColumn.RowVisible].Value) == (int)RowVisibleDef.Visible
-                                                                                             && CommonMotions.cnvInt(x.Cells[(int)DispColumn.RowType].Value) == 0
-                                                                                             && CommonMotions.cnvInt(x.Cells[m_GoukeiCode_Column].Value) == k.Key.GoukeiCode)
-                                                                                    .OrderBy(x => x.Cells[(int)DispColumn.GoukeiSeqNo].RowIndex)
-                                                                                    .ToArray();
-                        }
-                        else
-                        {
-                            Rows = dgv.Rows.Cast<DataGridViewRow>().Where(x => CommonMotions.cnvInt(x.Cells[(int)DispColumn.RowVisible].Value) == (int)RowVisibleDef.Visible
-                                                                                         && CommonMotions.cnvInt(x.Cells[(int)DispColumn.RowType].Value) == 0
-                                                                                         && CommonMotions.cnvInt(x.Cells[m_GoukeiCode_Column].Value) == k.Key.GoukeiCode)
-                                                                                    .OrderBy(x => x.Cells[m_GoukeiCode_Column].RowIndex)
-                                                                                    .ToArray();
-                        }
+                        DataGridViewRow[] Rows = dgv.Rows.Cast<DataGridViewRow>().Where(x => CommonMotions.cnvInt(x.Cells[(int)DispColumn.RowVisible].Value) == (int)RowVisibleDef.Visible
+                                                                        && CommonMotions.cnvInt(x.Cells[(int)DispColumn.RowType].Value) == 0
+                                                                        && CommonMotions.cnvInt(x.Cells[m_GoukeiCode_Column].Value) == k.Key.GoukeiCode)
+                                                                .OrderBy(x => x.Cells[(int)DispColumn.GoukeiSeqNo].RowIndex)
+                                                                .ToArray();
 
-                        iTop = 1;
+                        bool bFirst = true;
                         foreach (DataGridViewRow r in Rows)
                         {
-                            if (iTop == 1)
+                            if (bFirst)
                             {
                                 r.Cells[(int)DispColumn.No].Value = iNo;
                                 r.Cells[m_GoukeiCode_Column + 1].Value = k.Key.GoukeiCode;
                                 r.Cells[m_GoukeiCode_Column + 2].Value = k.Key.GoukeiName;
                                 r.Cells[m_GoukeiCode_Column + 2].ToolTipText = k.Key.GoukeiName;
+                                bFirst = false;
+                                continue;
                             }
-                            else
-                            {
-                                r.Cells[(int)DispColumn.No].Value = "";
-                                r.Cells[m_GoukeiCode_Column + 1].Value = "";
-                                r.Cells[m_GoukeiCode_Column + 2].Value = "";
-                                r.Cells[m_GoukeiCode_Column + 2].ToolTipText = k.Key.GoukeiName;
-                            }
-                            iTop++;
+
+                            r.Cells[(int)DispColumn.No].Value = "";
+                            r.Cells[m_GoukeiCode_Column + 1].Value = "";
+                            r.Cells[m_GoukeiCode_Column + 2].Value = "";
+                            r.Cells[m_GoukeiCode_Column + 2].ToolTipText = k.Key.GoukeiName;
                         }
                         iNo++;
                     }
@@ -1450,31 +1381,31 @@
                     DisporderCol = m_GoukeiCode_Column;
 
                     var OrderRows = dgv.Rows.Cast<DataGridViewRow>().Where(x => CommonMotions.cnvInt(x.Cells[(int)DispColumn.RowType].Value) == 0
-                                                    && CommonMotions.cnvInt(x.Cells[(int)DispColumn.RowVisible].Value) == (int)RowVisibleDef.Visible)
-                                                    .GroupBy(c => new
-                                                    {
-                                                        DispOrder = CommonMotions.cnvInt(c.Cells[DisporderCol].Value),
-                                                        GoukeiCode = CommonMotions.cnvInt(c.Cells[m_GoukeiCode_Column].Value),
-                                                        GoukeiName = CommonMotions.cnvString(c.Cells[m_GoukeiCode_Column + 1].ToolTipText)
-                                                    }).Select(g => new
-                                                    {
-                                                        DispOrder = g.Key.DispOrder,
-                                                        GoukeiCode = g.Key.GoukeiCode,
-                                                        GoukeiName = g.Key.GoukeiName,
-                                                        MinRowIndex = g.Min(c => CommonMotions.cnvInt(c.Cells[DisporderCol].RowIndex))
-                                                    })
-                                                    .OrderBy(x => x.MinRowIndex)
-                                                    .ToArray();
+                                                                            && CommonMotions.cnvInt(x.Cells[(int)DispColumn.RowVisible].Value) == (int)RowVisibleDef.Visible)
+                                                                    .GroupBy(c => new
+                                                                    {
+                                                                        DispOrder = CommonMotions.cnvInt(c.Cells[DisporderCol].Value),
+                                                                        GoukeiCode = CommonMotions.cnvInt(c.Cells[m_GoukeiCode_Column].Value),
+                                                                        GoukeiName = CommonMotions.cnvString(c.Cells[m_GoukeiCode_Column + 1].ToolTipText)
+                                                                    }).Select(g => new
+                                                                    {
+                                                                        DispOrder = g.Key.DispOrder,
+                                                                        GoukeiCode = g.Key.GoukeiCode,
+                                                                        GoukeiName = g.Key.GoukeiName,
+                                                                        MinRowIndex = g.Min(c => CommonMotions.cnvInt(c.Cells[DisporderCol].RowIndex))
+                                                                    })
+                                                                    .OrderBy(x => x.MinRowIndex)
+                                                                    .ToArray();
 
                     iNo = 1;
                     foreach (var k in OrderRows)
                     {
                         DataGridViewRow[] GoukeiRows = dgv.Rows.Cast<DataGridViewRow>().Where(x => CommonMotions.cnvInt(x.Cells[(int)DispColumn.RowType].Value) == 0
-                                                                     && CommonMotions.cnvInt(x.Cells[m_GoukeiCode_Column].Value) == k.GoukeiCode)
-                                                          .OrderBy(x => x.Cells[(int)DispColumn.CompanyDispOrder].Value)
-                                                          .ThenBy(x => x.Cells[(int)DispColumn.GroupSeqNo].Value)
-                                                          .ThenBy(x => x.Cells[(int)DispColumn.LineCount].Value)
-                                                          .ToArray();
+                                                                                                 && CommonMotions.cnvInt(x.Cells[m_GoukeiCode_Column].Value) == k.GoukeiCode)
+                                                                                        .OrderBy(x => x.Cells[(int)DispColumn.CompanyDispOrder].Value)
+                                                                                        .ThenBy(x => x.Cells[(int)DispColumn.GroupSeqNo].Value)
+                                                                                        .ThenBy(x => x.Cells[(int)DispColumn.LineCount].Value)
+                                                                                        .ToArray();
                         iTop = 1;
                         foreach (DataGridViewRow r in GoukeiRows)
                         {
@@ -1482,45 +1413,31 @@
                             iTop++;
                         }
 
-                        DataGridViewRow[] Rows;
-                        if (rdbCompany.Checked)
-                        {
-                            Rows = dgv.Rows.Cast<DataGridViewRow>().Where(x => CommonMotions.cnvInt(x.Cells[(int)DispColumn.RowVisible].Value) == (int)RowVisibleDef.Visible
-                                                                                             && CommonMotions.cnvInt(x.Cells[(int)DispColumn.RowType].Value) == 0
-                                                                                             && CommonMotions.cnvInt(x.Cells[m_GoukeiCode_Column].Value) == k.GoukeiCode)
-                                                                                    .OrderBy(x => x.Cells[(int)DispColumn.GoukeiSeqNo].RowIndex)
-                                                                                    .ToArray();
-                        }
-                        else
-                        {
-                            Rows = dgv.Rows.Cast<DataGridViewRow>().Where(x => CommonMotions.cnvInt(x.Cells[(int)DispColumn.RowVisible].Value) == (int)RowVisibleDef.Visible
-                                                                                         && CommonMotions.cnvInt(x.Cells[(int)DispColumn.RowType].Value) == 0
-                                                                                         && CommonMotions.cnvInt(x.Cells[m_GoukeiCode_Column].Value) == k.GoukeiCode)
-                                                                                    .OrderBy(x => x.Cells[m_GoukeiCode_Column].RowIndex)
-                                                                                    .ToArray();
-                        }
+                        DataGridViewRow[] Rows = dgv.Rows.Cast<DataGridViewRow>().Where(x => CommonMotions.cnvInt(x.Cells[(int)DispColumn.RowVisible].Value) == (int)RowVisibleDef.Visible
+                                                                        && CommonMotions.cnvInt(x.Cells[(int)DispColumn.RowType].Value) == 0
+                                                                        && CommonMotions.cnvInt(x.Cells[m_GoukeiCode_Column].Value) == k.GoukeiCode)
+                                                                .OrderBy(x => x.Cells[m_GoukeiCode_Column].RowIndex)
+                                                                .ToArray();
 
-                        iTop = 1;
+                        bool bFirst = true;
                         foreach (DataGridViewRow r in Rows)
                         {
-                            if (iTop == 1)
+                            if (bFirst)
                             {
                                 r.Cells[(int)DispColumn.No].Value = iNo;
                                 r.Cells[m_GoukeiCode_Column + 1].Value = k.GoukeiName;
                                 r.Cells[m_GoukeiCode_Column + 1].ToolTipText = k.GoukeiName;
+                                bFirst = false;
+                                continue;
                             }
-                            else
-                            {
-                                r.Cells[(int)DispColumn.No].Value = "";
-                                r.Cells[m_GoukeiCode_Column + 1].Value = "";
-                                r.Cells[m_GoukeiCode_Column + 1].ToolTipText = k.GoukeiName;
-                            }
-                            iTop++;
+
+                            r.Cells[(int)DispColumn.No].Value = "";
+                            r.Cells[m_GoukeiCode_Column + 1].Value = "";
+                            r.Cells[m_GoukeiCode_Column + 1].ToolTipText = k.GoukeiName;
                         }
                         iNo++;
                     }
                 }
-
             }
             catch (System.Exception ex)
             {
@@ -2094,7 +2011,7 @@
                         Money = "0";
                     }
 
-                    if (dgvCompany.Visible == true)
+                    if (rdbCompany.Checked)
                     {
                         row.SetValues(new object[] { DispOrder,
                                                         "",
@@ -2218,11 +2135,15 @@
             try
             {
                 sql.AppendLine("select  ");
-                sql.AppendFormat(" case DATE_FORMAT(ifnull(Cbi.PurchaseOrderMailingDate,'{0}')) when '{0}' then '�~'", DateTime.MinValue.ToShortDateString());
-                sql.AppendLine("																	      else '�›'  ");
+                sql.AppendLine(" case ifnull(");
+                sql.AppendLine("     DATE_FORMAT(Cbi.PurchaseOrderMailingDate, '%Y/%m/%d')");
+                sql.AppendFormat(" , '{0}')", DateTime.MinValue.ToShortDateString());
+                sql.AppendFormat("     when '{0}' then '�~' else '�›'  ", DateTime.MinValue.ToShortDateString());
                 sql.AppendLine(" end as PurchaseOrderMailingDate, /*’�•¶�‘—X‘—“ú*/ ");
-                sql.AppendFormat(" case DATE_FORMAT(ifnull(Cbi.PurchaseOrderReturnDate,'{0}')) when '{0}' then '�~'", DateTime.MinValue.ToShortDateString());
-                sql.AppendLine("																	      else '�›'  ");
+                sql.AppendLine(" case ifnull(");
+                sql.AppendLine("     DATE_FORMAT(Cbi.PurchaseOrderReturnDate, '%Y/%m/%d')");
+                sql.AppendFormat(" , '{0}')", DateTime.MinValue.ToShortDateString());
+                sql.AppendFormat("     when '{0}' then '�~' else '�›'  ", DateTime.MinValue.ToShortDateString());
                 sql.AppendLine(" end as PurchaseOrderReturnDate,  /*’�•¶�‘•Ô‘—“ú*/ ");
                 sql.AppendLine(" case ifnull(Pa.PERSONCODE,0) when 0 then '�~' /* —\ŽZ�‘ */ ");
                 sql.AppendLine("							  else '�›'   ");
@@ -2511,7 +2432,7 @@
                 ClsExcute.ProcControlPara[NowPoint].IntExecParameter.Add(CommonDefine.s_Default_OrderNo);
 
                 // ----- Žx•¥�³”F�î•ñƒf�[ƒ^ƒZƒbƒg
-                DataGridView dgv = dgvCompany.Visible == true ? dgvCompany : dgvProject;
+                DataGridView dgv = getShowingView();
                 ArrayList DataList = new ArrayList();
                 ClsExcute.ProcControlPara[NowPoint].ArrayParameter.Clear();
                 SetApprovalInfoData(dgv, ref DataList, true);
@@ -2539,7 +2460,7 @@
         {
             try
             {
-                DataGridView dgv = dgvCompany.Visible == true ? dgvCompany : dgvProject;
+                DataGridView dgv = getShowingView();
                 int nPersonCode = 0;
 
                 foreach (DataGridViewRow CurRow in dgv.Rows)
@@ -2593,7 +2514,7 @@
                 ClsExcute.ProcControlPara[NowPoint].IntExecParameter.Add(CommonDefine.s_Default_OrderNo);
 
                 // ----- Žx•¥�³”F�î•ñƒf�[ƒ^
-                DataGridView dgv = dgvCompany.Visible == true ? dgvCompany : dgvProject;
+                DataGridView dgv = getShowingView();
                 ArrayList DataList = new ArrayList();
                 ClsExcute.ProcControlPara[NowPoint].ArrayParameter.Clear();
                 SetApprovalInfoData(dgv, ref DataList);
@@ -2636,7 +2557,7 @@
                 frm.OrderNo = CommonDefine.s_Default_OrderNo;
 
                 // ----- Žx•¥�³”F�î•ñƒf�[ƒ^
-                DataGridView dgv = dgvCompany.Visible == true ? dgvCompany : dgvProject;
+                DataGridView dgv = getShowingView();
                 ArrayList DataList = new ArrayList();
                 SetApprovalInfoData(dgv, ref DataList);
                 frm.ArrayParam.Clear();
@@ -2693,7 +2614,7 @@
                 frm.OrderNo = CommonDefine.s_Default_OrderNo;
 
                 // ----- Žx•¥�³”F�î•ñƒf�[ƒ^
-                DataGridView dgv = dgvCompany.Visible == true ? dgvCompany : dgvProject;
+                DataGridView dgv = getShowingView();
                 ArrayList DataList = new ArrayList();
                 SetApprovalInfoData(dgv, ref DataList);
                 frm.ArrayParam.Clear();
@@ -2750,7 +2671,7 @@
                 frm.OrderNo = CommonDefine.s_Default_OrderNo;
 
                 // ----- Žx•¥�³”F�î•ñƒf�[ƒ^
-                DataGridView dgv = dgvCompany.Visible == true ? dgvCompany : dgvProject;
+                DataGridView dgv = getShowingView();
                 ArrayList DataList = new ArrayList();
                 SetApprovalInfoData(dgv, ref DataList);
                 frm.ArrayParam.Clear();
@@ -2957,11 +2878,11 @@
                     CreateSQLType2(m_PaInfo, ref sql);
                 }
 
-                if (dgvCompany.Visible == true)         // ‹ÆŽÒ’PˆÊ•\Ž¦
+                if (rdbCompany.Checked)         // ‹ÆŽÒ’PˆÊ•\Ž¦
                 {
                     sql.AppendLine(" order by CompanyCode ASC, SeqNo ASC, LineCount ASC, ConstructionCode ASC ");
                 }
-                else if (dgvProject.Visible == true)    // Œ»�ê’PˆÊ•\Ž¦
+                else if (rdbProject.Checked)    // Œ»�ê’PˆÊ•\Ž¦
                 {
                     sql.AppendLine(" order by ConstructionPersonCode ASC, ConstructionCode DESC, DisplayOrder ASC, SEQNO ASC, LineCount ASC ");
                 }
@@ -2981,6 +2902,7 @@
                     // �‡Œv�s�ì�¬
                     if (iGoukeiCd != CommonMotions.cnvInt(work[DataGoukeiCd_Column]))
                     {
+                        // �Å�‰‚Í�ˆ—�‚¹‚¸‚ÉƒR�[ƒhŽæ“¾‚Ì‚Ý
                         if (iGoukeiCd != -1)
                         {
                             // –¾�×•\Ž¦‚³‚ê‚Ä‚¢‚éƒf�[ƒ^Œ��”ƒ`ƒFƒbƒN
@@ -3005,7 +2927,6 @@
                         iGoukeiCd = CommonMotions.cnvInt(work[DataGoukeiCd_Column]);
                     }
 
-
                     dgv.Rows.Add();
 
                     // ƒOƒŠƒbƒhƒf�[ƒ^ƒZƒbƒg
@@ -3182,19 +3103,6 @@
                         // �Å�I�³”FŽÒ‚É‚æ‚Á‚Ä�³”F‚³‚ê‚Ä‚¢‚é�ê�‡‚Í�A�s‘S�€–Ú•Ò�W•s‰Â
                         dgv.Rows[icnt].ReadOnly = true;
                     }
-                    //else if ((ApprovalPerson == true && m_UserInfo.m_Type == CommonDefine.SecurityRankPos.NormalAuthority)
-                    //      || (SekininApproval == true && m_UserInfo.m_Type == CommonDefine.SecurityRankPos.LimitedAuthority)
-                    //      || (SekininApproval == true && m_UserInfo.m_Type == CommonDefine.SecurityRankPos.FreeAuthority))
-                    //{
-                    //    // �HŽ–’S“–ŽÒ‚ª’S“–ŽÒ�³”F‚ðŽÀ�s‚µ‚Ä‚¢‚é�ê�‡�A‚Ü‚½‚Í�@�Ó”CŽÒ‚ªŽ©�g‚Ì�³”F‚ðŽÀ�s‚µ‚Ä‚¢‚é�ê�‡‚Í�A�HŽ–’S“–“ü—Í—“•Ò�W•s‰Â
-                    //    dgv.Rows[icnt].Cells[(int)DispColumn.KojiSeikyu].ReadOnly = true;
-                    //    dgv.Rows[icnt].Cells[(int)DispColumn.KojiNebiki].ReadOnly = true;
-                    //    dgv.Rows[icnt].Cells[(int)DispColumn.KojiSousai].ReadOnly = true;
-                    //    dgv.Rows[icnt].Cells[(int)DispColumn.KojiKosoku].ReadOnly = true;
-                    //    dgv.Rows[icnt].Cells[(int)DispColumn.KojiKanamono].ReadOnly = true;
-                    //    dgv.Rows[icnt].Cells[(int)DispColumn.KojiSannhaiZei].ReadOnly = true;
-                    //    dgv.Rows[icnt].Cells[(int)DispColumn.KyoryokuUmu].ReadOnly = true;
-                    //}
 
                     icnt++;
                     iGoukeiSeq++;
@@ -3315,7 +3223,7 @@
                 dgv.Rows[icnt].Cells[(int)DispColumn.ApprovalEndFlg].Value = CommonMotions.cnvInt(work[(int)ClickGetData.ApprovalEndFlg]);
                 dgv.Rows[icnt].Cells[(int)DispColumn.UpdateDate].Value = CommonMotions.cnvString(work[(int)ClickGetData.UpdateDate]);
 
-                dgv.Rows[icnt].Cells[(int)DispColumn.RowState].Value = DataRowState.Modified;
+                dgv.Rows[icnt].Cells[(int)DispColumn.RowState].Value = DataRowState.Unchanged;
                 dgv.Rows[icnt].Cells[(int)DispColumn.RowType].Value = 0;
                 dgv.Rows[icnt].Cells[(int)DispColumn.GoukeiSeqNo].Value = iGoukeiSeq;
                 dgv.Rows[icnt].Cells[(int)DispColumn.GroupSeqNo].Value = CommonMotions.cnvInt(work[(int)ClickGetData.SEQNO]);
@@ -3322,13 +3230,18 @@
                 dgv.Rows[icnt].Cells[(int)DispColumn.LineCount].Value = CommonMotions.cnvInt(work[(int)ClickGetData.LINECOUNT]);
                 dgv.Rows[icnt].Cells[(int)DispColumn.No].Value = iNo;
 
-                dgv.Rows[icnt].Cells[m_Company_Column].Value = CommonMotions.cnvInt(work[(int)ClickGetData.COMPANYCODE]);
-                dgv.Rows[icnt].Cells[m_CompanyNM_Column].Value = CommonMotions.cnvString(work[(int)ClickGetData.COMPANYNAME]);
-                dgv.Rows[icnt].Cells[m_CompanyNM_Column].ToolTipText = CommonMotions.cnvString(work[(int)ClickGetData.COMPANYNAME]);
-                dgv.Rows[icnt].Cells[m_Genba_Column].Value = CommonMotions.cnvInt(work[(int)ClickGetData.CONSTRUCTIONCODE]);
-                dgv.Rows[icnt].Cells[m_GenbaNM_Column].Value = CommonMotions.cnvString(work[(int)ClickGetData.FIELDNAME]);
-                dgv.Rows[icnt].Cells[m_GenbaNM_Column].ToolTipText = CommonMotions.cnvString(work[(int)ClickGetData.FIELDNAME]);
+                int nCompanyCode = CommonMotions.cnvInt(work[(int)ClickGetData.COMPANYCODE]);
+                string strCompanyName = CommonMotions.cnvString(work[(int)ClickGetData.COMPANYNAME]);
+                dgv.Rows[icnt].Cells[m_Company_Column].Value = nCompanyCode;
+                dgv.Rows[icnt].Cells[m_CompanyNM_Column].Value = nCompanyCode > 0 ? strCompanyName : s_UnknownString;
+                dgv.Rows[icnt].Cells[m_CompanyNM_Column].ToolTipText = nCompanyCode > 0 ? strCompanyName : s_UnknownString;
 
+                int nConstrCode = CommonMotions.cnvInt(work[(int)ClickGetData.CONSTRUCTIONCODE]);
+                string strConstrName = CommonMotions.cnvString(work[(int)ClickGetData.FIELDNAME]);
+                dgv.Rows[icnt].Cells[m_Genba_Column].Value = nConstrCode;
+                dgv.Rows[icnt].Cells[m_GenbaNM_Column].Value = nConstrCode > 0 ? strConstrName : s_UnknownString;
+                dgv.Rows[icnt].Cells[m_GenbaNM_Column].ToolTipText = nConstrCode > 0 ? strConstrName : s_UnknownString;
+
                 dgv.Rows[icnt].Cells[(int)DispColumn.SomuSeikyu].Value = CommonMotions.cnvInt(work[(int)ClickGetData.BILLPRICE]);
                 dgv.Rows[icnt].Cells[(int)DispColumn.SomuKosoku].Value = CommonMotions.cnvInt(work[(int)ClickGetData.HIGHWPRICE]);
                 dgv.Rows[icnt].Cells[(int)DispColumn.SomuKanamono].Value = CommonMotions.cnvInt(work[(int)ClickGetData.HARDWPRICE]);
@@ -3375,7 +3288,10 @@
                 sql.Append("  , ifnull(Scm.CompanyName, \"\") as CompanyName ");
                 sql.Append("  , Scm.DisplayOrder as DisplayOrder ");
                 sql.Append("  , Bdd.ConstructionCode as ConstructionCode ");
-                sql.Append("  , Bdd.FieldName as FieldName ");
+                sql.Append("  , case Bdd.FieldName ");
+                sql.AppendFormat("    when '{0}' then Cbd.DetailString", s_UnknownString);
+                sql.Append("    else  Bdd.FieldName");
+                sql.Append("    End as FieldName ");
                 sql.Append("  , Bdd.BillPrice as BillPrice ");
                 sql.Append("  , Bdd.HighwPrice as HighwPrice ");
                 sql.Append("  , Bdd.HardwPrice as HardwPrice ");
@@ -3426,7 +3342,8 @@
                 sql.Append("  , Bdd.CONSTRUCTIONCOLCNT as ColPoint  ");
                 sql.Append("from ");
                 sql.Append("  BillingData as Bd join ( ");
-                sql.Append("    BillingDataDetail as Bdd join SubContractorMaster as Scm ");
+                sql.Append("    BillingDataDetail as Bdd");
+                sql.Append("    left join SubContractorMaster as Scm ");
                 sql.Append("      on Bdd.CompanyCode = Scm.CompanyCode ");
                 sql.AppendFormat("      and Scm.LabourKind = {0} ", m_Labourkind);
                 sql.Append("      join ( ");
@@ -3450,6 +3367,9 @@
                 sql.Append("                and ApprovalAuthority = 1 ");
                 sql.Append("          ) ");
                 sql.Append("            on Cbi.ConstructionPersonCode = Picm2.PersonCode ");
+                sql.Append("        left join ConstructionBaseinfoDetail as Cbd");
+                sql.Append("                   on Cbd.ConstructionCode = Cbi.ConstructionCode ");
+                sql.AppendFormat("             and Cbd.DetailNo = {0} ", (int)ConstructionBaseInfoDetail.DataNoDef.ConstructionName);
                 sql.Append("          left join ProcessApproval as Pa ");
                 sql.Append("            on Cbi.ConstructionCode = Pa.ConstructionCode ");
                 sql.Append("            and Am.ApprovalPerson = Pa.PersonCode ");
@@ -3586,7 +3506,7 @@
                 sql.Append("  inner join ConstructionLedger as Cl on Cl.ConstructionCode = Cld.ConstructionCode ");
                 sql.AppendFormat("    and Cl.ComplateFlg = {0} ", (int)ConstructionLedger.CompFlagDef.Operateing);
                 sql.Append("  inner join ConstructionBaseinfoDetail as Cbd on Cbd.ConstructionCode = Cld.ConstructionCode ");
-                sql.Append("    and Cbd.DetailNo = 2 ");
+                sql.AppendFormat("    and Cbd.DetailNo = {0} ", (int)ConstructionBaseInfoDetail.DataNoDef.ConstructionName);
                 sql.Append("  inner join SubContractorMaster as Sc on Sc.COMPANYCODE = Cld.CompanyCode ");
                 sql.AppendFormat("  and Sc.LABOURKIND = {0} ", m_Labourkind);
                 sql.Append("  left join ConstructionLedgerExcute AS Cle on Cle.ConstructionCode = Cld.ConstructionCode ");
@@ -3651,9 +3571,12 @@
                 sql.Append("  , ifnull(Bdd.LineCount, 0) as LineCount ");
                 sql.Append("  , ifnull(Bdd.CompanyCode, 0) as CompanyCode ");
                 sql.Append("  , ifnull(Scm.CompanyName, \'\') as CompanyName ");
-                sql.Append("  , Scm.DisplayOrder as DisplayOrder ");
+                sql.Append("  , ifnull(Scm.DisplayOrder, 99999999) as DisplayOrder ");
                 sql.Append("  , Bdd.ConstructionCode as ConstructionCode ");
-                sql.Append("  , Bdd.FieldName as FieldName ");
+                sql.Append("  , case Bdd.FieldName ");
+                sql.AppendFormat("    when '{0}' then Cbd.DetailString", s_UnknownString);
+                sql.Append("    else  Bdd.FieldName");
+                sql.Append("    End as FieldName ");
                 sql.Append("  , Bdd.BillPrice as BillPrice ");
                 sql.Append("  , Bdd.HighwPrice as HighwPrice ");
                 sql.Append("  , Bdd.HardwPrice as HardwPrice ");
@@ -3703,7 +3626,8 @@
                 sql.Append("  , Cld.SecondString as DetailName ");
                 sql.Append(" from ");
                 sql.Append("  BillingData as Bd join ( ");
-                sql.Append("    BillingDataDetail as Bdd join SubContractorMaster as Scm ");
+                sql.Append("    BillingDataDetail as Bdd");
+                sql.Append("      left join SubContractorMaster as Scm ");
                 sql.Append("      on Bdd.CompanyCode = Scm.CompanyCode ");
                 sql.AppendFormat("      and Scm.LabourKind = {0} ", m_Labourkind);
                 sql.Append("      left join ( ");
@@ -3732,6 +3656,9 @@
                 sql.Append("            and Pa.ApprovalStatus = 2 ");
                 sql.Append("      ) ");
                 sql.Append("        on Bdd.ConstructionCode = Cbi.ConstructionCode ");
+                sql.Append("      left join ConstructionBaseinfoDetail as Cbd");
+                sql.Append("                 on Cbd.ConstructionCode = Cbi.ConstructionCode ");
+                sql.AppendFormat("           and Cbd.DetailNo = {0} ", (int)ConstructionBaseInfoDetail.DataNoDef.ConstructionName);
                 sql.Append("  ) ");
                 sql.Append("       on Bd.CompanyCode = Bdd.CompanyCode ");
                 sql.Append("       and Bd.TargetDate = Bdd.TargetDate ");
@@ -4856,8 +4783,273 @@
                 logger.ErrorFormat("ƒVƒXƒeƒ€ƒGƒ‰�[�F{0}�F{1}", CommonMotions.GetMethodName(), ex.Message);
             }
             return Result;
+        }
+        #endregion
 
+        #region ƒZƒ‹ƒ_ƒuƒ‹ƒNƒŠƒbƒN
+        /// <summary>
+        /// ƒZƒ‹ƒ_ƒuƒ‹ƒNƒŠƒbƒN
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        private void GridDoubleClick(object sender, DataGridViewCellEventArgs e)
+        {
+            try
+            {
+                switch (e.ColumnIndex)
+                {
+                    case(int)DispColumn.DetailName:
+                        EditRowDetail();
+                        break;
+                }
+            }
+            catch (System.Exception ex)
+            {
+                logger.ErrorFormat("ƒVƒXƒeƒ€ƒGƒ‰�[�F{0}�F{1}", CommonMotions.GetMethodName(), ex.Message);
+            }
         }
         #endregion
+
+        #region �s–¾�×•Ò�W�ˆ—�
+        /// <summary>
+        /// �s–¾�×•Ò�W�ˆ—�
+        /// </summary>
+        private void EditRowDetail()
+        {
+            FrmRowDetail frm = new FrmRowDetail();
+            try
+            {
+                DataGridView dgv = getShowingView();
+                DataGridViewRow CurRow = dgv.CurrentRow;
+
+                // ----- ƒpƒ‰ƒ��[ƒ^ƒZƒbƒg
+                // �HŽ––¼�Ì
+                frm.title01 = CurRow.Cells[m_GenbaNM_Column].ToolTipText;
+                // ‹ÆŽÒ–¼�Ì
+                frm.title02 = CurRow.Cells[m_CompanyNM_Column].ToolTipText;
+                // •Ò�W•¶Žš—ñ
+                frm.EditString = CommonMotions.cnvString(CurRow.Cells[(int)DispColumn.DetailName].Value);
+                // ‰æ–Ê•\Ž¦
+                frm.ShowDialog();
+                // ƒLƒƒƒ“ƒZƒ‹Žž‚Í�ˆ—�‚µ‚È‚¢
+                if (DialogResult.Cancel.Equals(frm.ResultVal)) return;
+
+                // •Ò�W•¶ŽšƒZƒbƒg
+                CurRow.Cells[(int)DispColumn.DetailName].Value = frm.EditString;
+
+            }
+            catch (System.Exception ex)
+            {
+                logger.ErrorFormat("ƒVƒXƒeƒ€ƒGƒ‰�[�F{0}�F{1}", CommonMotions.GetMethodName(), ex.Message);
+            }
+            finally
+            {
+                frm.Dispose(); frm = null;
+            }
+        }
+        #endregion
+
+        #region ‹ÆŽÒ�í�œ�ˆ—�
+        /// <summary>
+        /// ‹ÆŽÒ�í�œ�ˆ—�
+        /// </summary>
+        private void RemoveCompany()
+        {
+            try
+            {
+                DataGridView dgv = getShowingView();
+                DataGridViewRow CurRow = dgv.CurrentRow;
+
+                int nCompanyCode = CommonMotions.cnvInt(CurRow.Cells[m_Company_Column].Value);
+                int nConstrCode = CommonMotions.cnvInt(CurRow.Cells[m_Genba_Column].Value);
+                // –¾�×�sŽæ“¾
+                DataGridViewRow[] DetailRows = null;
+                if (rdbCompany.Checked)
+                {
+                    DetailRows = dgv.Rows.Cast<DataGridViewRow>().Where(x => CommonMotions.cnvInt(x.Cells[m_Company_Column].Value) == nCompanyCode
+                                                                                && CommonMotions.cnvInt(x.Cells[(int)DispColumn.RowType].Value) == 0)
+                                                                             .ToArray();
+                }
+                else
+                {
+                    // –¾�×ˆÈŠO‚Í�ˆ—�‚µ‚È‚¢
+                    if (CommonMotions.cnvInt(CurRow.Cells[(int)DispColumn.RowType].Value) != 0) return;
+                    DetailRows = new DataGridViewRow[1];
+                    DetailRows[0] = CurRow;
+                }
+
+                // ‘Î�Û�s‚ª–³‚¯‚ê‚Î�ˆ—�‚µ‚È‚¢
+                if (DetailRows.Count() < 1) return;
+
+                // �í�œƒ`ƒFƒbƒN
+                long nChkValue = 0;
+                foreach (DataGridViewRow wrkRow in DetailRows)
+                {
+                    for (int i = (int)DispColumn.SomuSeikyu; i < (int)DispColumn.KojiKanamono; i++)
+                    {
+                        if (i == (int)DispColumn.JikaiKurikosi) continue;
+                        nChkValue += CommonMotions.cnvLong(wrkRow.Cells[i].Value);
+                    }
+                }
+
+                if (nChkValue > 0)
+                {
+                    MessageBox.Show("‹àŠz‚ª“ü—Í‚³‚ê‚Ä‚¢‚é‚½‚ß�A�í�œ‚Å‚«‚Ü‚¹‚ñ�B", "ƒf�[ƒ^Šm”F", MessageBoxButtons.OK, MessageBoxIcon.Error);
+                    return;
+                }
+
+                // ‹ÆŽÒƒOƒŠƒbƒh‚Å‹ÆŽÒ�í�œ‚Í�‡Œv‚à�í�œ‚·‚é
+                if (rdbCompany.Checked)
+                {
+                    // �‡Œv�sŽæ“¾
+                    DataGridViewRow[] TotalRows = dgv.Rows.Cast<DataGridViewRow>().Where(x => CommonMotions.cnvInt(x.Cells[m_Company_Column].Value) == nCompanyCode
+                                                                                                && CommonMotions.cnvInt(x.Cells[(int)DispColumn.RowType].Value) != 0)
+                                                                                    .ToArray();
+
+                    // �‡Œv�s�í�œ
+                    foreach (DataGridViewRow r in TotalRows)
+                    {
+                        dgv.Rows.Remove(r);
+                    }
+                }
+
+                // –¾�×�s�í�œ
+                List<DataGridViewRow> RemovRows = new List<DataGridViewRow>();
+                foreach (DataGridViewRow r in DetailRows)
+                {
+                    if ((DataRowState)r.Cells[(int)DispColumn.RowState].Value == DataRowState.Added)
+                    {
+                        RemovRows.Add(r);
+                    }
+                    else
+                    {
+                        r.Cells[(int)DispColumn.RowState].Value = DataRowState.Deleted;
+                        r.Cells[(int)DispColumn.RowVisible].Value = (int)RowVisibleDef.UnVisible;
+                        r.Visible = false;
+                    }
+                }
+
+                // �V‹K‚Å’Ç‰Á‚µ‚½�s‚Í�í�œ‚·‚é
+                foreach (DataGridViewRow r in RemovRows)
+                {
+                    dgv.Rows.Remove(r);
+                }
+
+                ResetNo();
+
+                controlButton_DataCount();
+
+                m_bChengeAns = true;
+
+            }
+            catch (System.Exception ex)
+            {
+                logger.ErrorFormat("ƒVƒXƒeƒ€ƒGƒ‰�[�F{0}�F{1}", CommonMotions.GetMethodName(), ex.Message);
+            }
+        }
+        #endregion
+
+        #region Œ»�ê�í�œ�ˆ—�
+        /// <summary>
+        /// Œ»�ê�í�œ�ˆ—�
+        /// </summary>
+        private void RemoveProject()
+        {
+            try
+            {
+
+                DataGridView dgv = getShowingView();
+                if (dgv == null) return;
+                DataGridViewRow CurRow = dgv.CurrentRow;
+                if (CurRow == null) return;
+
+                int nCompanyCode = CommonMotions.cnvInt(CurRow.Cells[m_Company_Column].Value);
+                int nConstrCode = CommonMotions.cnvInt(CurRow.Cells[m_Genba_Column].Value);
+
+                // –¾�×�sŽæ“¾
+                DataGridViewRow[] DetailRows = null;
+                if (rdbCompany.Checked)
+                {
+                    // –¾�×ˆÈŠO‚Í�ˆ—�‚µ‚È‚¢
+                    if (CommonMotions.cnvInt(CurRow.Cells[(int)DispColumn.RowType].Value) != 0) return;
+                    DetailRows = new DataGridViewRow[1];
+                    DetailRows[0] = CurRow;
+                }
+                else
+                {
+                    DetailRows = dgv.Rows.Cast<DataGridViewRow>().Where(x => CommonMotions.cnvInt(x.Cells[m_Genba_Column].Value) == nConstrCode
+                                                                                && CommonMotions.cnvInt(x.Cells[(int)DispColumn.RowType].Value) == 0)
+                                                                             .ToArray();
+                }
+
+                // ‘Î�Û�s‚ª–³‚¯‚ê‚Î�ˆ—�‚µ‚È‚¢
+                if (DetailRows.Count() < 1) return;
+
+                // �í�œƒ`ƒFƒbƒN
+                long nChkValue = 0;
+                foreach (DataGridViewRow wrkRow in DetailRows)
+                {
+                    for (int i = (int)DispColumn.SomuSeikyu; i < (int)DispColumn.KojiKanamono; i++)
+                    {
+                        if (i == (int)DispColumn.JikaiKurikosi) continue;
+                        nChkValue += CommonMotions.cnvLong(wrkRow.Cells[i].Value);
+                    }
+                }
+
+                if (nChkValue > 0)
+                {
+                    MessageBox.Show("‹àŠz‚ª“ü—Í‚³‚ê‚Ä‚¢‚é‚½‚ß�A�í�œ‚Å‚«‚Ü‚¹‚ñ�B", "ƒf�[ƒ^Šm”F", MessageBoxButtons.OK, MessageBoxIcon.Error);
+                    return;
+                }
+
+                // Œ»�êƒOƒŠƒbƒh‚ÅŒ»�ê�í�œ‚Í�‡Œv‚à�í�œ‚·‚é
+                if (rdbProject.Checked)
+                {
+                    // �‡Œv�sŽæ“¾
+                    DataGridViewRow[] TotalRows = dgv.Rows.Cast<DataGridViewRow>().Where(x => CommonMotions.cnvInt(x.Cells[m_Genba_Column].Value) == nConstrCode
+                                                                                                && CommonMotions.cnvInt(x.Cells[(int)DispColumn.RowType].Value) != 0)
+                                                                                    .ToArray();
+
+                    // �‡Œv�s�í�œ
+                    foreach (DataGridViewRow r in TotalRows)
+                    {
+                        dgv.Rows.Remove(r);
+                    }
+                }
+
+                // –¾�×�s�í�œ
+                List<DataGridViewRow> RemovRows = new List<DataGridViewRow>();
+                foreach (DataGridViewRow r in DetailRows)
+                {
+                    if ((DataRowState)r.Cells[(int)DispColumn.RowState].Value == DataRowState.Added)
+                    {
+                        RemovRows.Add(r);
+                    }
+                    else
+                    {
+                        r.Cells[(int)DispColumn.RowState].Value = DataRowState.Deleted;
+                        r.Cells[(int)DispColumn.RowVisible].Value = (int)RowVisibleDef.UnVisible;
+                        r.Visible = false;
+                    }
+                }
+
+                // �V‹K‚Å’Ç‰Á‚µ‚½�s‚Í�í�œ‚·‚é
+                foreach (DataGridViewRow r in RemovRows)
+                {
+                    dgv.Rows.Remove(r);
+                }
+
+                ResetNo();
+
+                controlButton_DataCount();
+
+                m_bChengeAns = true;
+            }
+            catch (System.Exception ex)
+            {
+                logger.ErrorFormat("ƒVƒXƒeƒ€ƒGƒ‰�[�F{0}�F{1}", CommonMotions.GetMethodName(), ex.Message);
+            }
+        }
+        #endregion
     }
 }
Index: branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/TAndPCosts/FrmTAndPCostsAuxiliary.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/TAndPCosts/FrmTAndPCostsAuxiliary.cs	(revision 282)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/TAndPCosts/FrmTAndPCostsAuxiliary.cs	(revision 283)
@@ -1686,11 +1686,11 @@
                 frm.PersonCharge = (int)FrmConstructionDiag.PersonChargePoint.Construction;
                 frm.PersonCode = PersonCode;
                 frm.ProcessNo = (int)ClsExcute.ProcessExecuteNo.TAndPCosts;
-                frm.SelectType = (int)FrmConstructionDiag.SelectConstructionType.Ongoing;
+                frm.SelectType = (int)FrmConstructionDiag.SelectConstructionType.OwnOngoing;
 
                 frm.ShowDialog();
                 // çµ‚äº†ã‚³ãƒ¼ãƒ‰ç¢ºèª�
-                if (frm.EndButton == DialogResult.No) return;
+                if (DialogResult.Cancel.Equals(frm.EndButton)) return;
 
                 // å·¥äº‹ã‚³ãƒ¼ãƒ‰ã‚»ãƒƒãƒˆ
                 dgvRow.Cells[(int)DispGridColumn.ConstractionCode].Value = frm.ConstructionCode;
@@ -1764,13 +1764,12 @@
                 frm.ConstructionCode = m_ConstructionCode;
                 //frm.ShowInTaskbar = false;
                 frm.ShowDialog();
-                if (frm.EndButton == System.Windows.Forms.DialogResult.OK)
-                {
-                    SubContractorMaster selRec = frm.SelectData;
-                    dgv.CurrentRow.Cells[(int)DispGridColumn.SuppliersCode].Value = selRec.CompanyCode;
-                    dgv.CurrentRow.Cells[(int)DispGridColumn.SuppliersName].Value = selRec.CompanyName;
-                    m_bChengeAns = true;
-                }
+                if (frm.EndButton != System.Windows.Forms.DialogResult.OK) return;
+
+                SubContractorMaster selRec = frm.SelectData;
+                dgv.CurrentRow.Cells[(int)DispGridColumn.SuppliersCode].Value = selRec.CompanyCode;
+                dgv.CurrentRow.Cells[(int)DispGridColumn.SuppliersName].Value = selRec.CompanyName;
+                m_bChengeAns = true;
             }
             catch (System.Exception ex)
             {
Index: branches/src/ProcessManagement/ProcessManagement/Forms/Master/ComponentLink/FrmComponentLink.designer.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/Master/ComponentLink/FrmComponentLink.designer.cs	(revision 282)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/Master/ComponentLink/FrmComponentLink.designer.cs	(revision 283)
@@ -360,7 +360,7 @@
             // Column4
             // 
             dataGridViewCellStyle9.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
-            dataGridViewCellStyle9.Font = new System.Drawing.Font("ï¼­ï¼³ ã‚´ã‚·ãƒƒã‚¯", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
+            dataGridViewCellStyle9.Font = new System.Drawing.Font("ï¼­ï¼³ æ˜Žæœ�", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
             dataGridViewCellStyle9.ForeColor = System.Drawing.Color.Black;
             this.Column4.DefaultCellStyle = dataGridViewCellStyle9;
             this.Column4.Frozen = true;
Index: branches/src/ProcessManagement/ProcessManagement/Forms/SubForms/FrmConstructionDiag.Designer.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/SubForms/FrmConstructionDiag.Designer.cs	(revision 282)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/SubForms/FrmConstructionDiag.Designer.cs	(revision 283)
@@ -44,6 +44,7 @@
             this.Column2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.Column4 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.Column6 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.btnAddUnknown = new System.Windows.Forms.Button();
             ((System.ComponentModel.ISupportInitialize)(this.dgvMaster)).BeginInit();
             this.SuspendLayout();
             // 
@@ -185,6 +186,20 @@
             this.Column6.ReadOnly = true;
             this.Column6.Visible = false;
             // 
+            // btnAddUnknown
+            // 
+            this.btnAddUnknown.BackColor = System.Drawing.Color.DarkSlateGray;
+            this.btnAddUnknown.Font = new System.Drawing.Font("ï¼­ï¼³ æ˜Žæœ�", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
+            this.btnAddUnknown.ForeColor = System.Drawing.Color.White;
+            this.btnAddUnknown.Location = new System.Drawing.Point(12, 524);
+            this.btnAddUnknown.Name = "btnAddUnknown";
+            this.btnAddUnknown.Size = new System.Drawing.Size(120, 30);
+            this.btnAddUnknown.TabIndex = 5;
+            this.btnAddUnknown.Text = "ä¸�ã€€æ˜Ž";
+            this.btnAddUnknown.UseVisualStyleBackColor = false;
+            this.btnAddUnknown.Visible = false;
+            this.btnAddUnknown.Click += new System.EventHandler(this.btnAddUnknown_Click);
+            // 
             // FrmConstructionDiag
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
@@ -191,6 +206,7 @@
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
             this.BackColor = System.Drawing.Color.Black;
             this.ClientSize = new System.Drawing.Size(1024, 561);
+            this.Controls.Add(this.btnAddUnknown);
             this.Controls.Add(this.dgvMaster);
             this.Controls.Add(this.btnSelect);
             this.Controls.Add(this.btnEnd);
@@ -221,5 +237,6 @@
         private System.Windows.Forms.DataGridViewTextBoxColumn Column2;
         private System.Windows.Forms.DataGridViewTextBoxColumn Column4;
         private System.Windows.Forms.DataGridViewTextBoxColumn Column6;
+        private System.Windows.Forms.Button btnAddUnknown;
     }
 }
\ No newline at end of file
Index: branches/src/ProcessManagement/ProcessManagement/Forms/SubForms/FrmConstructionDiag.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/SubForms/FrmConstructionDiag.cs	(revision 282)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/SubForms/FrmConstructionDiag.cs	(revision 283)
@@ -12,6 +12,7 @@
 using ProcessManagement.DataModel;
 using ProcessManagement.Forms.CustomControls;
 using ProcessManagement.Forms.ControlsAction;
+using ProcessManagement.Forms.DataEntry;
 using System.Collections;
 
 namespace ProcessManagement.Forms.SubForms
@@ -65,7 +66,7 @@
             /// <summary>
             /// é€²è¡Œä¸­ï¼ˆè³¼å…¥å“�é�¸æŠžã€�è³‡æ��è²¸å‡ºã€�è³‡æ��è¿”å�´ï¼‰
             /// </summary>
-            Ongoing,
+            OwnOngoing,
             /// <summary>
             /// ä¸€æ‹¬è«‹æ±‚å¯¾è±¡
             /// </summary>
@@ -74,7 +75,10 @@
             /// åˆ†å‰²è«‹æ±‚å¯¾è±¡
             /// </summary>
             SeparateBilling,
-                
+            /// <summary>
+            /// ç®¡è½„ç¯„å›²é€²è¡Œä¸­
+            /// </summary>
+            RengeOngoing,
         }
 
         #endregion
@@ -219,6 +223,24 @@
             set { m_SelectType = value; }
         }
 
+        /// <summary>
+        /// è¤‡æ•°é�¸æŠžã‚»ãƒƒãƒˆ
+        /// </summary>
+        public bool SetGridMultiSelect
+        {
+            get { return dgvMaster.MultiSelect; }
+            set { dgvMaster.MultiSelect = value; }
+        }
+
+        /// <summary>
+        /// ä¸�æ˜Žè¿½åŠ ãƒœã‚¿ãƒ³è¡¨ç¤ºåˆ¶å¾¡
+        /// </summary>
+        public bool DispAddUnknown
+        {
+            get { return btnAddUnknown.Visible; }
+            set { btnAddUnknown.Visible = value; }
+        }
+
         #endregion
 
         #region ãƒ•ã‚©ãƒ¼ãƒ åˆ�æœŸåŒ–
@@ -254,7 +276,7 @@
         /// <param name="e"></param>
         private void btnEnd_Click(object sender, EventArgs e)
         {
-            m_EndButton = DialogResult.No;
+            m_EndButton = DialogResult.Cancel;
             this.Close();
         }
         #endregion
@@ -273,10 +295,25 @@
             // é�¸æŠžãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆ
             DataSelectProc();
 
+            m_EndButton = DialogResult.OK;
             this.Close();
         }
         #endregion
 
+        #region ä¸�æ˜Žè¿½åŠ ãƒœã‚¿ãƒ³
+        /// <summary>
+        /// ä¸�æ˜Žè¿½åŠ ãƒœã‚¿ãƒ³
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        private void btnAddUnknown_Click(object sender, EventArgs e)
+        {
+            // ä¸�æ˜Žã�®å ´å�ˆã�¯Yesã‚’è¿”ã�™
+            m_EndButton = DialogResult.Yes;
+            this.Close();
+        }
+        #endregion
+
         #region ã‚»ãƒ«ã�®ãƒ€ãƒ–ãƒ«ã‚¯ãƒªãƒƒã‚¯æ™‚
         /// <summary>
         /// ã‚»ãƒ«ã�®ãƒ€ãƒ–ãƒ«ã‚¯ãƒªãƒƒã‚¯æ™‚
@@ -393,7 +430,7 @@
 
                 switch (m_SelectType)
                 {
-                    case (int)SelectConstructionType.Ongoing:                           // æ¤œç´¢ã‚¿ã‚¤ãƒ—ã�Œé€²è¡Œä¸­ Add BIT 2017/02/22
+                    case (int)SelectConstructionType.OwnOngoing:                           // æ¤œç´¢ã‚¿ã‚¤ãƒ—ã�Œé€²è¡Œä¸­ Add BIT 2017/02/22
                         // é€²è¡Œä¸­æ¡ˆä»¶ã‚’æ¤œç´¢ã�™ã‚‹
                         SetSelectTypeOngoing(ref strSQL);
                         break;
@@ -413,6 +450,10 @@
                         SetSelectTypeAll(ref strSQL);
                         break;
 
+                    case (int)SelectConstructionType.RengeOngoing:                      // ã‚»ã‚­ãƒ¥ãƒªãƒ†ã‚£ç¯„å›²ã�®ãƒ‡ãƒ¼ã‚¿æ¤œç´¢
+                        // é€²è¡Œä¸­æ¡ˆä»¶ã‚’æ¤œç´¢ã�™ã‚‹
+                        SetSelectTypeRengeOngoing(ref strSQL);
+                        break;
                 }
 
                 ArrayList BaseList = new ArrayList();
@@ -460,12 +501,12 @@
         }
         #endregion
 
-        #region é€²è¡Œä¸­ï¼ˆè³¼å…¥å“�é�¸æŠžã€�è³‡æ��è²¸å‡ºã€�è³‡æ��è¿”å�´ï¼‰SQLä½œæˆ�
+        #region é€²è¡Œä¸­ã�®æ±Žç”¨ï¼³ï¼±ï¼¬
         /// <summary>
-        /// é€²è¡Œä¸­ï¼ˆè³¼å…¥å“�é�¸æŠžã€�è³‡æ��è²¸å‡ºã€�è³‡æ��è¿”å�´ï¼‰SQLä½œæˆ�
+        /// é€²è¡Œä¸­ã�®æ±Žç”¨ï¼³ï¼±ï¼¬
         /// </summary>
         /// <param name="strSQL"></param>
-        private void SetSelectTypeOngoing(ref StringBuilder strSQL)
+        private void SetSelectShareGoing(ref StringBuilder strSQL)
         {
             try
             {
@@ -483,8 +524,50 @@
                 strSQL.Append(", PERSONINCHARGEMASTER D");
                 strSQL.Append(" WHERE (A.CONSTRUCTIONCODE = B.CONSTRUCTIONCODE");
                 strSQL.AppendFormat(" AND B.DETAILNO = {0})", (int)ConstructionBaseInfoDetail.DataNoDef.ConstructionName);
-                strSQL.Append(" AND A.CONSTRUCTIONCODE = C.CONSTRUCTIONCODE AND C.COMPLATEFLG = 0");
+                strSQL.AppendFormat(" AND A.CONSTRUCTIONCODE = C.CONSTRUCTIONCODE AND C.COMPLATEFLG = {0}", (int)ConstructionLedger.CompFlagDef.Operateing);
+                strSQL.Append(" AND D.PERSONCODE = A.ConstructionPersonCode");
 
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("ã‚·ã‚¹ãƒ†ãƒ ã‚¨ãƒ©ãƒ¼ï¼š{0}ï¼š{1}", CommonMotions.GetMethodName(), ex.Message);
+            }
+        }
+        #endregion
+
+        #region ã‚»ã‚­ãƒ¥ãƒªãƒ†ã‚£ç¯„å›²ãƒ‡ãƒ¼ã‚¿å�–å¾—SQLä½œæˆ�
+        /// <summary>
+        /// ã‚»ã‚­ãƒ¥ãƒªãƒ†ã‚£ç¯„å›²ãƒ‡ãƒ¼ã‚¿å�–å¾—SQLä½œæˆ�
+        /// </summary>
+        /// <param name="strSQL"></param>
+        private void SetSelectTypeRengeOngoing(ref StringBuilder strSQL)
+        {
+            try
+            {
+                SetSelectShareGoing(ref strSQL);
+                CreateSecuritySQL(ref strSQL);
+                strSQL.Append(" ORDER BY A.ConstructionPeriodStart DESC");
+
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("ã‚·ã‚¹ãƒ†ãƒ ã‚¨ãƒ©ãƒ¼ï¼š{0}ï¼š{1}", CommonMotions.GetMethodName(), ex.Message);
+            }
+        }
+        #endregion
+
+        #region é€²è¡Œä¸­ï¼ˆè³¼å…¥å“�é�¸æŠžã€�è³‡æ��è²¸å‡ºã€�è³‡æ��è¿”å�´ï¼‰SQLä½œæˆ�
+        /// <summary>
+        /// é€²è¡Œä¸­ï¼ˆè³¼å…¥å“�é�¸æŠžã€�è³‡æ��è²¸å‡ºã€�è³‡æ��è¿”å�´ï¼‰SQLä½œæˆ�
+        /// </summary>
+        /// <param name="strSQL"></param>
+        private void SetSelectTypeOngoing(ref StringBuilder strSQL)
+        {
+            try
+            {
+                // é€²è¡Œä¸­æ¡ˆä»¶ã‚’æ¤œç´¢ã�™ã‚‹
+                SetSelectShareGoing(ref strSQL);
+
                 switch (m_PersonCharge)
                 {
                     case (int)PersonChargePoint.Sales:
@@ -496,8 +579,6 @@
                         strSQL.AppendFormat(" AND (A.ConstructionPersonCode = {0} OR A.ConstrSubPersonCode = {0} OR A.ConstructionInstructor = {0})", m_PersonCode);
                         break;
                 }
-                strSQL.Append(" AND D.PERSONCODE = A.ConstructionPersonCode");
-
                 strSQL.Append(" ORDER BY A.ConstructionPeriodStart DESC");
             }
             catch (Exception ex)
@@ -719,5 +800,75 @@
             }
         }
         #endregion
+
+        #region æ¤œç´¢SQLã�®ã‚»ã‚­ãƒ¥ãƒªãƒ†ã‚£åˆ¤å®šéƒ¨åˆ†ã‚’ä½œæˆ�ã�™ã‚‹
+        /// <summary>
+        /// æ¤œç´¢SQLã�®ã‚»ã‚­ãƒ¥ãƒªãƒ†ã‚£åˆ¤å®šéƒ¨åˆ†ã‚’ä½œæˆ�ã�™ã‚‹
+        /// </summary>
+        /// <param name="strSQL"></param>
+        public void CreateSecuritySQL(ref StringBuilder strSQL)
+        {
+            try
+            {
+                // ã‚­ãƒ¼å€¤å�–å¾—
+                int AllPath = (int)CommonDefine.SecurityRangePos.AllPath;           // å…¨éƒ¨ç½²
+                int Multiple = (int)CommonDefine.SecurityRangePos.Multiple;         // è¤‡æ•°éƒ¨ç½²
+                int Only = (int)CommonDefine.SecurityRangePos.Only;                 // è‡ªéƒ¨ç½²ã�®ã�¿
+                int None = (int)CommonDefine.SecurityRangePos.None;                 // è‡ªæ‹…å½“è€…ã�®ã�¿
+
+                // ãƒ‡ãƒ¼ã‚¿ã‚¢ã‚¯ã‚»ã‚¹ã�«æ¨©é™�ã�«ã‚ˆã‚Šåˆ¶é™�ã�Œã�‚ã‚‹
+                if (CommonMotions.LoginUserData.PersonCode == CommonDefine.AdminCode
+                || CommonMotions.LoginUserSecurity.SecRange == CommonDefine.SecurityRangeList[AllPath].Key)
+                {
+                    // ã�™ã�¹ã�¦å¯¾è±¡ï¼ˆåˆ¶é™�SQLç„¡ï¼‰
+                }
+                else if (CommonMotions.LoginUserSecurity.SecRange == CommonDefine.SecurityRangeList[Multiple].Key
+                        || CommonMotions.LoginUserSecurity.SecRange == CommonDefine.SecurityRangeList[Only].Key)
+                {
+                    // ä¸€éƒ¨åˆ¶é™�æœ‰
+                    // æ©Ÿå¯†ç®¡ç�†è€…ï¼ˆè‡ªéƒ¨ç½²ã�®ã�¿ï¼‰
+                    int iStatus = CommonDefine.ProjectsStatus.First(x => x.Value.Equals("è¦‹ç©�æ��å‡º")).Key;
+                    int iStatus2 = CommonDefine.ProjectsStatus.First(x => x.Value.Equals("éƒ¨ç½²å¼•ç¶™")).Key;
+
+                    strSQL.Append(" And (A.SalesPersonCode IN (Select A1.PersonCode From PersonInChargeMaster A1");
+                    strSQL.AppendFormat(" Where A1.DepartmentCode IN (SELECT A2.DEPARTMENTCODE FROM PERSONDEPARTMENTMASTER A2 WHERE A2.PERSONCODE = {0}))", CommonMotions.LoginUserData.PersonCode);
+
+                    strSQL.AppendFormat(" Or (A.ConstructionStatusFlg >= {0}", iStatus);
+
+                    strSQL.Append(" And (A.ConstructionPersonCode IN (Select A3.PersonCode From PersonInChargeMaster A3");
+                    strSQL.AppendFormat(" Where A3.DepartmentCode IN (SELECT A4.DEPARTMENTCODE FROM PERSONDEPARTMENTMASTER A4 WHERE A4.PERSONCODE = {0}))", CommonMotions.LoginUserData.PersonCode);
+
+                    strSQL.Append(" Or A.CONSTRSUBPERSONCODE IN (Select A5.PersonCode From PersonInChargeMaster A5");
+                    strSQL.AppendFormat(" Where A5.DepartmentCode IN (SELECT A6.DEPARTMENTCODE FROM PERSONDEPARTMENTMASTER A6 WHERE A6.PERSONCODE = {0}))", CommonMotions.LoginUserData.PersonCode);
+
+                    strSQL.Append(" Or A.ConstructionInstructor IN (Select A7.PersonCode From PersonInChargeMaster A7");
+                    strSQL.AppendFormat(" Where A7.DepartmentCode IN (SELECT A8.DEPARTMENTCODE FROM PERSONDEPARTMENTMASTER A8 WHERE A8.PERSONCODE = {0}))))", CommonMotions.LoginUserData.PersonCode);
+
+                    strSQL.AppendFormat(" Or (A.ConstructionStatusFlg >= {0} And A.ConstructionPersonCode = 0)", iStatus);          // æ‰€å±žé•·ã�¯è¦‹ç©�æ��å‡ºå¾Œã�§å·¥äº‹æ‹…å½“è€…ã�Œå…¥ã�£ã�¦ã�„ã�ªã�„å ´å�ˆè¡¨ç¤º
+                    strSQL.AppendFormat(" Or (A.ConstructionStatusFlg = {0}", iStatus2);                                            // éƒ¨ç½²å¼•ç¶™æ™‚ã�¯å¼•ç¶™éƒ¨ç½²ã�®ã‚‚ã�®ã�¯è¦‹ã�ˆã‚‹
+                    strSQL.AppendFormat(" And A.TransferConstruction = {0}))", CommonMotions.LoginUserData.DepartmentCode);
+                }
+                else if (CommonMotions.LoginUserSecurity.SecRange == CommonDefine.SecurityRangeList[None].Key)
+                {
+                    // ä¸€èˆ¬ä½¿ç”¨è€…
+                    int iStatus = CommonDefine.ProjectsStatus.First(x => x.Value.Equals("è¦‹ç©�æ��å‡º")).Key;
+
+                    strSQL.AppendFormat(" And (A.SalesPersonCode = {0}", CommonMotions.LoginUserData.PersonCode);
+
+                    strSQL.AppendFormat(" Or (A.ConstructionStatusFlg > {0}", iStatus);
+
+                    strSQL.AppendFormat(" And (A.ConstructionPersonCode = {0}", CommonMotions.LoginUserData.PersonCode);
+
+                    strSQL.AppendFormat(" Or A.CONSTRSUBPERSONCODE = {0}", CommonMotions.LoginUserData.PersonCode);
+
+                    strSQL.AppendFormat(" Or A.ConstructionInstructor = {0})))", CommonMotions.LoginUserData.PersonCode);
+                }
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("ã‚·ã‚¹ãƒ†ãƒ ã‚¨ãƒ©ãƒ¼ï¼š{0}ï¼š{1}", ex.Message, strSQL);
+            }
+        }
+        #endregion
     }
 }
Index: branches/src/ProcessManagement/ProcessManagement/Forms/SubForms/FrmSubconstractorDiag.Designer.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/SubForms/FrmSubconstractorDiag.Designer.cs	(revision 282)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/SubForms/FrmSubconstractorDiag.Designer.cs	(revision 283)
@@ -28,14 +28,14 @@
         /// </summary>
         private void InitializeComponent()
         {
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle8 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle17 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle18 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle19 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle20 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle21 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle22 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle23 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle24 = new System.Windows.Forms.DataGridViewCellStyle();
             this.btnSelect = new System.Windows.Forms.Button();
             this.btnEnd = new System.Windows.Forms.Button();
             this.tabControl1 = new System.Windows.Forms.TabControl();
@@ -63,6 +63,7 @@
             this.Column2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.Column3 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.Column5 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.btnAddUnknown = new System.Windows.Forms.Button();
             this.tabControl1.SuspendLayout();
             this.tabPage1.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)(this.dgvHistory)).BeginInit();
@@ -77,7 +78,7 @@
             this.btnSelect.BackColor = System.Drawing.Color.Green;
             this.btnSelect.Font = new System.Drawing.Font("ï¼­ï¼³ æ˜Žæœ�", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
             this.btnSelect.ForeColor = System.Drawing.Color.White;
-            this.btnSelect.Location = new System.Drawing.Point(382, 640);
+            this.btnSelect.Location = new System.Drawing.Point(399, 640);
             this.btnSelect.Name = "btnSelect";
             this.btnSelect.Size = new System.Drawing.Size(120, 30);
             this.btnSelect.TabIndex = 4;
@@ -90,7 +91,7 @@
             this.btnEnd.BackColor = System.Drawing.Color.Blue;
             this.btnEnd.Font = new System.Drawing.Font("ï¼­ï¼³ æ˜Žæœ�", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
             this.btnEnd.ForeColor = System.Drawing.Color.White;
-            this.btnEnd.Location = new System.Drawing.Point(510, 640);
+            this.btnEnd.Location = new System.Drawing.Point(527, 640);
             this.btnEnd.Name = "btnEnd";
             this.btnEnd.Size = new System.Drawing.Size(120, 30);
             this.btnEnd.TabIndex = 5;
@@ -157,14 +158,14 @@
             this.dgvHistory.AllowUserToResizeRows = false;
             this.dgvHistory.BackgroundColor = System.Drawing.Color.White;
             this.dgvHistory.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
-            dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
-            dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Control;
-            dataGridViewCellStyle1.Font = new System.Drawing.Font("ï¼­ï¼³ æ˜Žæœ�", 12F, System.Drawing.FontStyle.Bold);
-            dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.WindowText;
-            dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight;
-            dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
-            dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
-            this.dgvHistory.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle1;
+            dataGridViewCellStyle17.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
+            dataGridViewCellStyle17.BackColor = System.Drawing.SystemColors.Control;
+            dataGridViewCellStyle17.Font = new System.Drawing.Font("ï¼­ï¼³ æ˜Žæœ�", 12F, System.Drawing.FontStyle.Bold);
+            dataGridViewCellStyle17.ForeColor = System.Drawing.SystemColors.WindowText;
+            dataGridViewCellStyle17.SelectionBackColor = System.Drawing.SystemColors.Highlight;
+            dataGridViewCellStyle17.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
+            dataGridViewCellStyle17.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
+            this.dgvHistory.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle17;
             this.dgvHistory.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing;
             this.dgvHistory.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
             this.dataGridViewTextBoxColumn1,
@@ -187,8 +188,8 @@
             // 
             // dataGridViewTextBoxColumn1
             // 
-            dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
-            this.dataGridViewTextBoxColumn1.DefaultCellStyle = dataGridViewCellStyle2;
+            dataGridViewCellStyle18.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
+            this.dataGridViewTextBoxColumn1.DefaultCellStyle = dataGridViewCellStyle18;
             this.dataGridViewTextBoxColumn1.Frozen = true;
             this.dataGridViewTextBoxColumn1.HeaderText = "No.";
             this.dataGridViewTextBoxColumn1.Name = "dataGridViewTextBoxColumn1";
@@ -196,8 +197,8 @@
             // 
             // dataGridViewTextBoxColumn2
             // 
-            dataGridViewCellStyle3.Font = new System.Drawing.Font("ï¼­ï¼³ æ˜Žæœ�", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
-            this.dataGridViewTextBoxColumn2.DefaultCellStyle = dataGridViewCellStyle3;
+            dataGridViewCellStyle19.Font = new System.Drawing.Font("ï¼­ï¼³ æ˜Žæœ�", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
+            this.dataGridViewTextBoxColumn2.DefaultCellStyle = dataGridViewCellStyle19;
             this.dataGridViewTextBoxColumn2.Frozen = true;
             this.dataGridViewTextBoxColumn2.HeaderText = "ã‚³ãƒ¼ãƒ‰";
             this.dataGridViewTextBoxColumn2.Name = "dataGridViewTextBoxColumn2";
@@ -207,9 +208,9 @@
             // 
             // dataGridViewTextBoxColumn3
             // 
-            dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
-            dataGridViewCellStyle4.Font = new System.Drawing.Font("ï¼­ï¼³ æ˜Žæœ�", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
-            this.dataGridViewTextBoxColumn3.DefaultCellStyle = dataGridViewCellStyle4;
+            dataGridViewCellStyle20.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
+            dataGridViewCellStyle20.Font = new System.Drawing.Font("ï¼­ï¼³ æ˜Žæœ�", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
+            this.dataGridViewTextBoxColumn3.DefaultCellStyle = dataGridViewCellStyle20;
             this.dataGridViewTextBoxColumn3.Frozen = true;
             this.dataGridViewTextBoxColumn3.HeaderText = "å��ã€€ã€€ç§°";
             this.dataGridViewTextBoxColumn3.Name = "dataGridViewTextBoxColumn3";
@@ -386,14 +387,14 @@
             this.dgvSearch.AllowUserToResizeRows = false;
             this.dgvSearch.BackgroundColor = System.Drawing.Color.White;
             this.dgvSearch.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
-            dataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
-            dataGridViewCellStyle5.BackColor = System.Drawing.SystemColors.Control;
-            dataGridViewCellStyle5.Font = new System.Drawing.Font("ï¼­ï¼³ æ˜Žæœ�", 12F, System.Drawing.FontStyle.Bold);
-            dataGridViewCellStyle5.ForeColor = System.Drawing.SystemColors.WindowText;
-            dataGridViewCellStyle5.SelectionBackColor = System.Drawing.SystemColors.Highlight;
-            dataGridViewCellStyle5.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
-            dataGridViewCellStyle5.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
-            this.dgvSearch.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle5;
+            dataGridViewCellStyle21.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
+            dataGridViewCellStyle21.BackColor = System.Drawing.SystemColors.Control;
+            dataGridViewCellStyle21.Font = new System.Drawing.Font("ï¼­ï¼³ æ˜Žæœ�", 12F, System.Drawing.FontStyle.Bold);
+            dataGridViewCellStyle21.ForeColor = System.Drawing.SystemColors.WindowText;
+            dataGridViewCellStyle21.SelectionBackColor = System.Drawing.SystemColors.Highlight;
+            dataGridViewCellStyle21.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
+            dataGridViewCellStyle21.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
+            this.dgvSearch.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle21;
             this.dgvSearch.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing;
             this.dgvSearch.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
             this.Column1,
@@ -416,8 +417,8 @@
             // 
             // Column1
             // 
-            dataGridViewCellStyle6.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
-            this.Column1.DefaultCellStyle = dataGridViewCellStyle6;
+            dataGridViewCellStyle22.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
+            this.Column1.DefaultCellStyle = dataGridViewCellStyle22;
             this.Column1.Frozen = true;
             this.Column1.HeaderText = "No.";
             this.Column1.Name = "Column1";
@@ -425,8 +426,8 @@
             // 
             // Column2
             // 
-            dataGridViewCellStyle7.Font = new System.Drawing.Font("ï¼­ï¼³ æ˜Žæœ�", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
-            this.Column2.DefaultCellStyle = dataGridViewCellStyle7;
+            dataGridViewCellStyle23.Font = new System.Drawing.Font("ï¼­ï¼³ æ˜Žæœ�", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
+            this.Column2.DefaultCellStyle = dataGridViewCellStyle23;
             this.Column2.Frozen = true;
             this.Column2.HeaderText = "ä¼šç¤¾ã‚³ãƒ¼ãƒ‰";
             this.Column2.Name = "Column2";
@@ -436,9 +437,9 @@
             // 
             // Column3
             // 
-            dataGridViewCellStyle8.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
-            dataGridViewCellStyle8.Font = new System.Drawing.Font("ï¼­ï¼³ æ˜Žæœ�", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
-            this.Column3.DefaultCellStyle = dataGridViewCellStyle8;
+            dataGridViewCellStyle24.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
+            dataGridViewCellStyle24.Font = new System.Drawing.Font("ï¼­ï¼³ æ˜Žæœ�", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
+            this.Column3.DefaultCellStyle = dataGridViewCellStyle24;
             this.Column3.Frozen = true;
             this.Column3.HeaderText = "ä¼šã€€ç¤¾ã€€å��ã€€ç§°";
             this.Column3.Name = "Column3";
@@ -455,6 +456,20 @@
             this.Column5.Visible = false;
             this.Column5.Width = 5;
             // 
+            // btnAddUnknown
+            // 
+            this.btnAddUnknown.BackColor = System.Drawing.Color.DarkSlateGray;
+            this.btnAddUnknown.Font = new System.Drawing.Font("ï¼­ï¼³ æ˜Žæœ�", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
+            this.btnAddUnknown.ForeColor = System.Drawing.Color.White;
+            this.btnAddUnknown.Location = new System.Drawing.Point(7, 640);
+            this.btnAddUnknown.Name = "btnAddUnknown";
+            this.btnAddUnknown.Size = new System.Drawing.Size(120, 30);
+            this.btnAddUnknown.TabIndex = 4;
+            this.btnAddUnknown.Text = "ä¸�ã€€æ˜Ž";
+            this.btnAddUnknown.UseVisualStyleBackColor = false;
+            this.btnAddUnknown.Visible = false;
+            this.btnAddUnknown.Click += new System.EventHandler(this.btnAddUnknown_Click);
+            // 
             // FrmSubContractorDiag
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
@@ -462,6 +477,7 @@
             this.BackColor = System.Drawing.Color.Black;
             this.ClientSize = new System.Drawing.Size(654, 681);
             this.Controls.Add(this.tabControl1);
+            this.Controls.Add(this.btnAddUnknown);
             this.Controls.Add(this.btnSelect);
             this.Controls.Add(this.btnEnd);
             this.Font = new System.Drawing.Font("ï¼­ï¼³ æ˜Žæœ�", 12F, System.Drawing.FontStyle.Bold);
@@ -514,5 +530,6 @@
         private System.Windows.Forms.DataGridViewTextBoxColumn Column5;
         private System.Windows.Forms.Label label26;
         private System.Windows.Forms.ComboBox cmbLabour;
+        private System.Windows.Forms.Button btnAddUnknown;
     }
 }
\ No newline at end of file
Index: branches/src/ProcessManagement/ProcessManagement/Forms/SubForms/FrmSubconstractorDiag.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/SubForms/FrmSubconstractorDiag.cs	(revision 282)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/SubForms/FrmSubconstractorDiag.cs	(revision 283)
@@ -217,6 +217,14 @@
             set { m_SelectLabourKind = value; }
         }
 
+        /// <summary>
+        /// ä¸�æ˜Žè¿½åŠ ãƒœã‚¿ãƒ³è¡¨ç¤ºåˆ¶å¾¡
+        /// </summary>
+        public bool DispAddUnknown
+        {
+            get { return btnAddUnknown.Visible; }
+            set { btnAddUnknown.Visible = value; }
+        }
         #endregion
 
         #region ã‚³ãƒ³ã‚¹ãƒˆãƒ©ã‚¯ã‚¿
@@ -288,24 +296,45 @@
         /// <param name="e"></param>
         private void FrmSubContractorDiag_FormClosing(object sender, FormClosingEventArgs e)
         {
-            if (m_EndButton == DialogResult.OK)
+            try
             {
-                // ã‚°ãƒªãƒƒãƒ‰é�¸æŠž
-                DataGridView dgv = null;
-                if (tabControl1.SelectedIndex == 0)
-                    dgv = dgvHistory;
-                else
-                    dgv = dgvSearch;
-         
-                // é�¸æŠžãƒ‡ãƒ¼ã‚¿å�–å¾—
-                int SelRow = dgv.CurrentRow.Index;
-                int SelCode = CommonMotions.cnvInt(dgv.Rows[SelRow].Cells[(int)DispGridColumn.CompanyCode].Value);
-                m_DataType = CommonMotions.cnvInt(dgv.Rows[SelRow].Cells[(int)DispGridColumn.DataType].Value);
+                // çµ‚äº†æ™‚ã�¯ã�¯ã��ã�®ã�¾ã�¾çµ‚äº†
+                if (DialogResult.Cancel.Equals(m_EndButton)) return;
+
+                int SelCode = 0;
+
+                if (DialogResult.OK.Equals(m_EndButton))
+                {
+                    // ----- é�¸æŠžæ™‚
+                    // ã‚°ãƒªãƒƒãƒ‰é�¸æŠž
+                    DataGridView dgv = null;
+                    if (tabControl1.SelectedIndex == 0)
+                        dgv = dgvHistory;
+                    else
+                        dgv = dgvSearch;
+
+                    // é�¸æŠžãƒ‡ãƒ¼ã‚¿å�–å¾—
+                    int SelRow = dgv.CurrentRow.Index;
+                    SelCode = CommonMotions.cnvInt(dgv.Rows[SelRow].Cells[(int)DispGridColumn.CompanyCode].Value);
+                    m_DataType = CommonMotions.cnvInt(dgv.Rows[SelRow].Cells[(int)DispGridColumn.DataType].Value);
+
+                    // å±¥æ­´ã�¯çµ‚äº†æ™‚ã�«ç™»éŒ²ã‚’è¡Œã�†
+                    EntryInputLogData(dgv, SelCode);
+                }
+                else if (DialogResult.Yes.Equals(m_EndButton))
+                {
+                    // ----- ä¸�æ˜Žæ™‚
+                    SelCode = m_SubContractorSelcet.CompanyCode;
+                    m_DataType = (int)CommonDefine.CodeDataType.Subconstractor;
+                }
+
+                // å�”åŠ›ä¼šç¤¾ãƒžã‚¹ã‚¿èª­è¾¼
                 GetSubContractor(m_DataType, SelCode, ref m_SubContractorSelcet);
-
-                // å±¥æ­´ã�¯çµ‚äº†æ™‚ã�«ç™»éŒ²ã‚’è¡Œã�†
-                EntryInputLogData(dgv, SelCode);
             }
+            catch (System.Exception ex)
+            {
+                logger.ErrorFormat("ã‚·ã‚¹ãƒ†ãƒ ã‚¨ãƒ©ãƒ¼ï¼š{0}ï¼š{1}", CommonMotions.GetMethodName(), ex.Message);
+            }
         }
         #endregion
 
@@ -371,19 +400,6 @@
         }
         #endregion
 
-        #region ã‚­ãƒ£ãƒ³ã‚»ãƒ«ãƒœã‚¿ãƒ³
-        /// <summary>
-        /// ã‚­ãƒ£ãƒ³ã‚»ãƒ«ãƒœã‚¿ãƒ³æŠ¼ä¸‹
-        /// </summary>
-        /// <param name="sender"></param>
-        /// <param name="e"></param>
-        private void btnCancel_Click(object sender, EventArgs e)
-        {
-            m_EndButton = DialogResult.Cancel;
-            this.Close();
-        }
-        #endregion
-
         #region çµ‚äº†ãƒœã‚¿ãƒ³
         /// <summary>
         /// çµ‚äº†ãƒœã‚¿ãƒ³æŠ¼ä¸‹
@@ -392,7 +408,7 @@
         /// <param name="e"></param>
         private void btnEnd_Click(object sender, EventArgs e)
         {
-            m_EndButton = DialogResult.None;
+            m_EndButton = DialogResult.Cancel;
             this.Close();
         }
         #endregion
@@ -421,6 +437,20 @@
         }
         #endregion
 
+        #region ä¸�æ˜Žè¿½åŠ ãƒœã‚¿ãƒ³
+        /// <summary>
+        /// ä¸�æ˜Žè¿½åŠ ãƒœã‚¿ãƒ³
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        private void btnAddUnknown_Click(object sender, EventArgs e)
+        {
+            // ä¸�æ˜Žã�®å ´å�ˆã�¯Yesã‚’è¿”ã�™
+            m_EndButton = DialogResult.Yes;
+            this.Close();
+        }
+        #endregion
+
         #region è‡ªç¤¾ãƒœã‚¿ãƒ³
         /// <summary>
         /// è‡ªç¤¾é�¸æŠžãƒœã‚¿ãƒ³æŠ¼ä¸‹
@@ -903,7 +933,7 @@
                 {
                     // SQLä½œæˆ�
                     strSQL = sbcDB.CreatePrimarykeyString(SubContractorCode);
-                    // å·¥ç¨®ãƒžã‚¹ã‚¿å�–å¾—
+                    // å�”åŠ›ä¼šç¤¾ãƒžã‚¹ã‚¿å�–å¾—
                     if (!sbcDB.SelectAction(strSQL, ref DataRec)) return false;
                 }
                 else if (DataType == (int)CommonDefine.CodeDataType.Person)
@@ -1213,7 +1243,6 @@
         }
         #endregion
 
-
         #region æ¤œç´¢ï¼³ï¼±ï¼¬ä½œæˆ�
         /// <summary>
         /// æ¤œç´¢ï¼³ï¼±ï¼¬ä½œæˆ�
Index: branches/src/ProcessManagement/ProcessManagement/Forms/ZMenu/FrmMenuAuxiliary.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/ZMenu/FrmMenuAuxiliary.cs	(revision 282)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/ZMenu/FrmMenuAuxiliary.cs	(revision 283)
@@ -4801,7 +4801,8 @@
                 strSQL.Append(" , CONSTRUCTIONBASEINFODETAIL B, PERSONINCHARGEMASTER C");
 
                 strSQL.AppendFormat(" WHERE A.TYINGFLG = {0}", (int)ConstructionBaseInfo.TyingFlgDef.Tying);
-                strSQL.Append(" AND (DATE(A.BILLINGDATE) = STR_TO_DATE('0001/01/01', '%Y/%m/%d') OR DATE(A.BILLINGDATE) > DATE_ADD(NOW(), INTERVAL -1 MONTH))");
+                strSQL.AppendFormat(" AND (DATE(A.BILLINGDATE) = STR_TO_DATE('{0}', '%Y/%m/%d')", DateTime.MinValue.ToShortDateString());
+                strSQL.Append(" OR DATE(A.BILLINGDATE) > DATE_ADD(NOW(), INTERVAL -1 MONTH))");
                 strSQL.AppendFormat(" AND A.ConstructionStatusFlg <> {0} AND A.ConstructionStatusFlg < {1}", NotOrder, BillComp);
 
                 strSQL.Append(" AND B.CONSTRUCTIONCODE = A.CONSTRUCTIONCODE");
Index: branches/src/ProcessManagement/ProcessManagement/ProcessManagement.csproj
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/ProcessManagement.csproj	(revision 282)
+++ branches/src/ProcessManagement/ProcessManagement/ProcessManagement.csproj	(revision 283)
@@ -639,6 +639,12 @@
     <Compile Include="Forms\DataEntry\Request\ConstrReqList\FrmConstrReqListAuxiliary.cs">
       <SubType>Form</SubType>
     </Compile>
+    <Compile Include="Forms\DataEntry\Request\FrmRowDetail.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="Forms\DataEntry\Request\FrmRowDetail.Designer.cs">
+      <DependentUpon>FrmRowDetail.cs</DependentUpon>
+    </Compile>
     <Compile Include="Forms\DataEntry\Request\FrmEntryDeposit.cs">
       <SubType>Form</SubType>
     </Compile>
@@ -1475,6 +1481,9 @@
     <EmbeddedResource Include="Forms\DataEntry\Request\ConstrReqList\FrmConstrReqList.resx">
       <DependentUpon>FrmConstrReqList.cs</DependentUpon>
     </EmbeddedResource>
+    <EmbeddedResource Include="Forms\DataEntry\Request\FrmRowDetail.resx">
+      <DependentUpon>FrmRowDetail.cs</DependentUpon>
+    </EmbeddedResource>
     <EmbeddedResource Include="Forms\DataEntry\Request\FrmEntryDeposit.resx">
       <DependentUpon>FrmEntryDeposit.cs</DependentUpon>
     </EmbeddedResource>
Index: branches/src/ProcessManagement/ProcessManagement/Properties/AssemblyInfo.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Properties/AssemblyInfo.cs	(revision 282)
+++ branches/src/ProcessManagement/ProcessManagement/Properties/AssemblyInfo.cs	(revision 283)
@@ -32,7 +32,7 @@
 // ã�™ã�¹ã�¦ã�®å€¤ã‚’æŒ‡å®šã�™ã‚‹ã�‹ã€�ä¸‹ã�®ã‚ˆã�†ã�« '*' ã‚’ä½¿ã�£ã�¦ãƒ“ãƒ«ãƒ‰ã�Šã‚ˆã�³ãƒªãƒ“ã‚¸ãƒ§ãƒ³ç•ªå�·ã‚’ 
 // æ—¢å®šå€¤ã�«ã�™ã‚‹ã�“ã�¨ã�Œã�§ã��ã�¾ã�™:
 // [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.0.0.91")]
-[assembly: AssemblyFileVersion("1.0.0.91")]
+[assembly: AssemblyVersion("1.0.0.94")]
+[assembly: AssemblyFileVersion("1.0.0.94")]
 // Log4netã‚’ä½¿ç”¨ã�™ã‚‹
 [assembly: log4net.Config.XmlConfigurator(ConfigFile = @"log4net.config", Watch = true)]
\ No newline at end of file
