Index: trunk/src/ProcessManagement/ProcessManagement/Common/CommonMotions.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/Common/CommonMotions.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/Common/CommonMotions.cs	(revision 484)
@@ -4248,7 +4248,7 @@
                 DateTime dtDefaultStart = CommonMotions.GetOpeningEndDate(nTargetYear, true);
                 DateTime dtDefaultEnd = CommonMotions.GetOpeningEndDate(nTargetYear, false);
 
-                strSQL.Append("Select A.* From");
+                strSQL.AppendFormat("Select {0} From", IOMPersonInCharge.CreateFieldNameList("A."));
                 strSQL.Append(" personinchargemaster As A");
                 strSQL.Append(" Left Join chgchargedep As B");
                 strSQL.Append("       On B.PersonCode = A.PersonCode");
@@ -4347,12 +4347,12 @@
                 strSQL.Append(", A.PersonName");
                 strSQL.Append(", B.DepartmentCode");
                 strSQL.Append(", B.DepartmentName");
-                strSQL.Append(" From");
-                strSQL.Append(" personinchargemaster As A");
-                strSQL.Append(" Left Join chgchargedep As B");
-                strSQL.Append("       On B.PersonCode = A.PersonCode");
+                strSQL.Append(" From personinchargemaster As A");
+                strSQL.Append("      Left Join chgchargedep As B");
+                strSQL.Append("           On B.PersonCode = A.PersonCode");
 
-                strSQL.AppendFormat(" WHERE ((DATE(A.STARTDATE) <= DATE('{0}'))", dtDefaultEnd.ToShortDateString());
+                strSQL.Append(" WHERE");
+                strSQL.AppendFormat(" ((DATE(A.STARTDATE) <= DATE('{0}'))", dtDefaultEnd.ToShortDateString());
                 strSQL.AppendFormat(" AND (DATE('{0}') <= DATE(A.ENDDATE)", dtDefaultStart.ToShortDateString());
                 strSQL.AppendFormat(" OR DATE('{0}') = DATE(A.ENDDATE)))", DateTime.MinValue.ToShortDateString());
 
@@ -4694,22 +4694,27 @@
         /// <summary>
         /// 営業日だけのｎ日前の日付を取る
         /// </summary>
-        public static DateTime GetPrevBusinessDate( DateTime WorktDate, int nCount)
+        public static DateTime GetPrevBusinessDate( DateTime WorktDate, int nCount, int PersonCode = 0)
         {
             IOMHolidayCalender CalDB = new IOMHolidayCalender();
+            IOAllFreeSQL FreeDB = new IOAllFreeSQL();
             try
             {
-                // 当月以前は翌月１日をセットして抜ける
-                if(WorktDate.Year < DateTime.Today.Year
-                    || WorktDate.Month < DateTime.Today.Month)
+                // 当月以前は当月１日をセットして抜ける
+                int nCheckDay = (WorktDate.Year * 100) + WorktDate.Month;
+                int nToday = (DateTime.Today.Year * 100) + DateTime.Today.Month;
+                if (nCheckDay < nToday)
                 {
-                    DateTime dtTarget = new DateTime(WorktDate.Year, WorktDate.Month, 1).AddMonths(1);
+                    DateTime dtTarget = new DateTime(WorktDate.Year, WorktDate.Month, 1);
                     return dtTarget;
                 }
 
                 StringBuilder strSQL = new StringBuilder();
 
-                strSQL.Append("SELECT t1.d, DATE_FORMAT(C.HOLIDAY, '%Y/%m/%d') HOLIDAY FROM");
+                strSQL.Append("SELECT t1.d");
+                strSQL.Append("     , DATE_FORMAT(C.HOLIDAY, '%Y/%m/%d') HOLIDAY");
+                strSQL.Append("     , WEEKDAY(t1.d)");
+                strSQL.Append(" FROM");
                 strSQL.Append("     (SELECT A1.years, A2.month, A3.days");
                 strSQL.Append("           , CAST(CONCAT(A1.years, '/', A2.month, '/', A3.days) as DATE) as d");
                 strSQL.Append("      FROM yearmaster as A1");
@@ -4726,6 +4731,39 @@
                 ArrayList arList = new ArrayList();
                 CalDB.ExecuteReader(strSQL.ToString(), ref arList);
 
+                // 担当者コードがある場合は勤務シフトの月曜日を０として読み込む
+                ArrayList WeekList = new ArrayList();
+                object[] objWeek = null;
+                DateTime dtEnd = DateTime.Today;
+                if (PersonCode > 0)
+                {
+                    strSQL.Clear();
+                    strSQL.Append("Select");
+                    strSQL.Append(" B.MonValue");
+                    strSQL.Append(", B.TueValue");
+                    strSQL.Append(", B.WedValue");
+                    strSQL.Append(", B.ThuValue");
+                    strSQL.Append(", B.FriValue");
+                    strSQL.Append(", B.SatValue");
+                    strSQL.Append(", B.SunValue");
+                    strSQL.Append(", A.PersonCode");
+                    strSQL.Append(", A.PersonName");
+                    strSQL.Append(", A.EndDate");
+                    strSQL.Append(" From personinchargemaster As A");
+                    strSQL.Append(" Inner Join workingtime As B");
+                    strSQL.Append("       On B.WorkingCode = A.WorkingCode");
+                    strSQL.Append(" Where");
+                    strSQL.AppendFormat(" A.Personcode = {0}", PersonCode);
+
+                    FreeDB.ExecuteReader(strSQL.ToString(), ref WeekList);
+
+                    objWeek = (object[])WeekList[0];
+                    // 退職日が無い場合は日付をＭＡＸにする
+                    dtEnd = CommonMotions.cnvDate(objWeek[9]).Date == DateTime.MinValue.Date
+                                                                            ? DateTime.MaxValue.Date
+                                                                            : CommonMotions.cnvDate(objWeek[9]).Date;
+                }
+
                 DateTime dtRet = DateTime.MinValue;
                 int nPrevCount = 0;
                 foreach(object[] objCalender in arList)
@@ -4738,6 +4776,18 @@
                     DateTime dtholiday = CommonMotions.cnvDate(objCalender[1]);
                     if (DateTime.MinValue.Date != dtholiday.Date) continue;
 
+                    // 担当者コードがある場合は勤務シフトの比較を行う
+                    if (PersonCode > 0)
+                    {
+                        if(PersonCode== 20200401) { Debug.WriteLine(""); }
+                        int nWeekFlg = CommonMotions.cnvInt(objCalender[2]);
+                        // 休みの曜日は除外する
+                        if (CommonMotions.cnvInt(objWeek[nWeekFlg]) == 1) continue;
+
+                        //退職日以降は除外する
+                        if (dtEnd < dtwork.Date) continue;
+                    }
+
                     nPrevCount++;
                     if (nCount <= nPrevCount)
                     {
@@ -4756,6 +4806,7 @@
             finally
             {
                 CalDB.close(); CalDB = null;
+                FreeDB.close(); FreeDB = null;
             }
         }
         #endregion
Index: trunk/src/ProcessManagement/ProcessManagement/Common/Process/ClsExcute.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/Common/Process/ClsExcute.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/Common/Process/ClsExcute.cs	(revision 484)
@@ -139,7 +139,7 @@
             ConstrExpenses = 126,               // 126:施工経費区分登録
             MaterialKind = 127,                 // 127:資材種類マスタ
             MaterialItem = 128,                 // 128:資材品目マスタ
-            SalesConfirm = 129,                 // 129:売上確認
+            SalesConfirm = 129,                 // 129:売上一覧確認
             BankBusinessDay = 130,              // 130:銀行営業日マスタ
             BudgetCodeSum = 131,                // 131:予算書集計コードマスタ
             AddressConvert = 132,               // 132:郵便番号変換処理
@@ -147,6 +147,8 @@
             QualificationD = 134,               // 134:資格マスタ分類
             QualificationQ = 135,               // 135:資格マスタ区分
             WorkingTime = 136,                  // 136:就業時間マスタ
+            EvalScore = 137,                    // 137:評価点数登録
+            AverageScore = 138,                 // 138:評価点一覧確認
         }
         #endregion
 
@@ -328,6 +330,8 @@
                                                                                 { (int)MaintenanceExecuteNo.QualificationD,             "資格マスタ区分登録" },        // 134
                                                                                 { (int)MaintenanceExecuteNo.QualificationQ,             "資格マスタ登録" },            // 135
                                                                                 { (int)MaintenanceExecuteNo.WorkingTime,                "就業時間マスタ" },            // 136
+                                                                                { (int)MaintenanceExecuteNo.EvalScore,                  "評価点数登録" },              // 137
+                                                                                { (int)MaintenanceExecuteNo.AverageScore,               "評価点一覧確認" },            // 138
                                                                                 };
         #endregion
 
@@ -986,6 +990,12 @@
                         case (int)ClsExcute.MaintenanceExecuteNo.WorkingTime:               // 136:就業時間マスタ
                             MaintenanceExecuteNo_WorkingTime(m_ProcControlPara[NowPoint]);
                             break;
+                        case (int)ClsExcute.MaintenanceExecuteNo.EvalScore:                 // 137:評価点数登録
+                            MaintenanceExecuteNo_EvalScore(m_ProcControlPara[NowPoint]);
+                            break;
+                        case (int)ClsExcute.MaintenanceExecuteNo.AverageScore:              // 138:評価点一覧確認
+                            MaintenanceExecuteNo_AverageScore(m_ProcControlPara[NowPoint]);
+                            break;
 
                         #endregion
 
@@ -1784,7 +1794,6 @@
                 frm.ConstructionCode = CurrentPara.IntExecParameter[0];
                 frm.OrderNo = CurrentPara.IntExecParameter[1];
                 int nApprovalNo = CurrentPara.IntExecParameter[2];
-                frm.PersonCode = CurrentPara.IntExecParameter[3];
                 frm.CreateData = CurrentPara.BoolExecParameter[0];
 
                 // フォーム表示
@@ -4541,8 +4550,79 @@
             }
         }
         #endregion
+
+        #region 評価点数登録
+        /// <summary>
+        /// 評価点数登録
+        /// </summary>
+        /// <param name="CurrentPara"></param>
+        public static void MaintenanceExecuteNo_EvalScore(ProcessParameter CurrentPara)
+        {
+            //　評価点数登録
+            FrmEvalScore frm = new FrmEvalScore();
+            try
+            {
+                int ProcessNo = (int)MaintenanceExecuteNo.EvalScore;
+                // 起動・編集フラグ
+                int EditFlg = (int)CommonDefine.ProcessDataEdit.Reference;
+                if (!ClsSecurityPermission.GetExecutePermission(ProcessNo, ref EditFlg))
+                {
+                    BackProcess();
+                    return;
+                }
+                if (EditFlg == (int)CommonDefine.ProcessDataEdit.Reference) frm.EditLock = true;
+
+                // フォーム表示
+                frm.ShowDialog();
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("システムエラー：{0}：{1}", CommonMotions.GetMethodName(), ex.Message);
+            }
+            finally
+            {
+                frm.Dispose(); frm = null;
+            }
+        }
         #endregion
 
+        #region 評価点数一覧確認
+        /// <summary>
+        /// 評価点数一覧確認
+        /// </summary>
+        /// <param name="CurrentPara"></param>
+        public static void MaintenanceExecuteNo_AverageScore(ProcessParameter CurrentPara)
+        {
+            //　評価点一覧確認
+            FrmAverageScore frm = new FrmAverageScore();
+            try
+            {
+                int ProcessNo = (int)MaintenanceExecuteNo.AverageScore;
+                // 起動・編集フラグ
+                int EditFlg = (int)CommonDefine.ProcessDataEdit.Reference;
+                if (!ClsSecurityPermission.GetExecutePermission(ProcessNo, ref EditFlg))
+                {
+                    BackProcess();
+                    return;
+                }
+                if (EditFlg == (int)CommonDefine.ProcessDataEdit.Reference) frm.EditLock = true;
+
+                // フォーム表示
+                frm.ShowDialog();
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("システムエラー：{0}：{1}", CommonMotions.GetMethodName(), ex.Message);
+            }
+            finally
+            {
+                frm.Dispose(); frm = null;
+            }
+        }
+        #endregion
+
+        #endregion
+
         #region サブフォーム
         #region 掲示板メッセージ入力
         /// <summary>
Index: trunk/src/ProcessManagement/ProcessManagement/Common/Process/ClsMessageBoradAccess.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/Common/Process/ClsMessageBoradAccess.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/Common/Process/ClsMessageBoradAccess.cs	(revision 484)
@@ -196,7 +196,9 @@
                 // 対象データの取得
                 StringBuilder strSQL = new StringBuilder();
                 strSQL.Append("SELECT");
-                strSQL.Append(" A.*, B.*, C.*");
+                strSQL.AppendFormat(" {0}", IOMessageBoardData.CreateFieldNameList("A."));
+                strSQL.AppendFormat(",{0}", IOMPersonInCharge.CreateFieldNameList("B."));
+                strSQL.AppendFormat(",{0}", IOMSecurity.CreateFieldNameList("C."));
                 strSQL.Append(" FROM");
                 strSQL.Append(" MESSAGEBOARDDATA A");
                 strSQL.Append(" LEFT JOIN PERSONINCHARGEMASTER B");
Index: trunk/src/ProcessManagement/ProcessManagement/Common/Process/ClsOtherProc.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/Common/Process/ClsOtherProc.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/Common/Process/ClsOtherProc.cs	(revision 484)
@@ -491,7 +491,7 @@
 
                 // 工事日報入力起動
                 frm.ConstructionCode = ClsProcessExist.GetParentConstrCode(ConstrCode);
-                frm.PersonCode = PersonCode;
+                //frm.PersonCode = PersonCode;
                 frm.EditLock = EditLock;
                 frm.SubForm = true;
                 frm.ShowInTaskbar = true;
Index: trunk/src/ProcessManagement/ProcessManagement/DB/Core/ABaseDBProcess.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/DB/Core/ABaseDBProcess.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/DB/Core/ABaseDBProcess.cs	(revision 484)
@@ -3,6 +3,7 @@
 using System.Data;
 using System.Linq;
 using System.Text;
+using System.Diagnostics;
 using System.Collections;
 
 using MySql.Data.MySqlClient; 
@@ -326,7 +327,6 @@
                         //objwrk[i++] = www.ToString().Equals("null") ? "" : www;
                         objwrk[i++] = www is null ? "" : www;
                     }
-
                     arData.Add(objwrk);
 
                 }
Index: trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOActionScheduleData.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOActionScheduleData.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOActionScheduleData.cs	(revision 484)
@@ -137,7 +137,7 @@
 
                     strcmd.AppendFormat(" STR_TO_DATE('{0}','%Y/%m/%d')", work.TargetDate.ToShortDateString());
                     strcmd.AppendFormat(", {0}", work.PersonCode.ToString());
-                    strcmd.AppendFormat(", '{0}'", work.ActionSchedule);
+                    strcmd.AppendFormat(", {0}", SeparateString(work.ActionSchedule));
                     strcmd.AppendFormat(", {0}", work.TargetYear.ToString());
                     strcmd.AppendFormat(", {0}", work.TargetMonth.ToString());
                     strcmd.AppendFormat(", {0}", work.TargetDay.ToString());
@@ -186,7 +186,7 @@
 
                 strcmd.AppendFormat(" STR_TO_DATE('{0}','%Y/%m/%d')", data.TargetDate.ToShortDateString());
                 strcmd.AppendFormat(", {0}", data.PersonCode.ToString());
-                strcmd.AppendFormat(", '{0}'", data.ActionSchedule);
+                strcmd.AppendFormat(", {0}", SeparateString(data.ActionSchedule));
                 strcmd.AppendFormat(", {0}", data.TargetYear.ToString());
                 strcmd.AppendFormat(", {0}", data.TargetMonth.ToString());
                 strcmd.AppendFormat(", {0}", data.TargetDay.ToString());
@@ -226,7 +226,7 @@
 
                 strcmd.AppendFormat(" TargetDate = STR_TO_DATE('{0}','%Y/%m/%d')", data.TargetDate.ToShortDateString());
                 strcmd.AppendFormat(",PersonCode = {0}", data.PersonCode.ToString());
-                strcmd.AppendFormat(",ActionSchedule = '{0}'", data.ActionSchedule);
+                strcmd.AppendFormat(",ActionSchedule = {0}", SeparateString(data.ActionSchedule));
                 strcmd.AppendFormat(",TargetYear = {0}", data.TargetYear.ToString());
                 strcmd.AppendFormat(",TargetMonth = {0}", data.TargetMonth.ToString());
                 strcmd.AppendFormat(",TargetDay = {0}", data.TargetDay.ToString());
Index: trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOAttNoticeConstrction.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOAttNoticeConstrction.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOAttNoticeConstrction.cs	(revision 484)
@@ -189,7 +189,7 @@
                 strcmd.AppendFormat(", {0}", work.AttendanceMonth);                             // 出勤管理年月
                 strcmd.AppendFormat(", {0}", work.OrderNo);                                     // 届番号
                 strcmd.AppendFormat(", {0}", work.ConstructionCode);                            // 工事コード
-                strcmd.AppendFormat(",'{0}'", work.ConstructionName);                           // 工事名称
+                strcmd.AppendFormat(", {0}", SeparateString(work.ConstructionName));            // 工事名称
 
                 strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.EntryDate);
                 strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.UpdateDate);
@@ -238,7 +238,7 @@
                     strcmd.AppendFormat(", {0}", work.AttendanceMonth);                             // 出勤管理年月
                     strcmd.AppendFormat(", {0}", work.OrderNo);                                     // 届番号
                     strcmd.AppendFormat(", {0}", work.ConstructionCode);                            // 工事コード
-                    strcmd.AppendFormat(",'{0}'", work.ConstructionName);                           // 工事名称
+                    strcmd.AppendFormat(", {0}", SeparateString(work.ConstructionName));            // 工事名称
 
                     strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.EntryDate);
                     strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.UpdateDate);
@@ -278,7 +278,7 @@
                 strcmd.AppendFormat(", AttendanceMonth = {0}", data.AttendanceMonth);                       // 出勤管理年月
                 strcmd.AppendFormat(", OrderNo = {0}", data.OrderNo);                                       // 届番号
                 strcmd.AppendFormat(", ConstructionCode = {0}", data.ConstructionCode);                     // 工事コード
-                strcmd.AppendFormat(", ConstructionName = '{0}'", data.ConstructionName);                   // 工事名称
+                strcmd.AppendFormat(", ConstructionName = {0}", SeparateString(data.ConstructionName));     // 工事名称
 
                 strcmd.Append(", UpdateDate = NOW()");
                 strcmd.Append(AddSQLString);
@@ -349,7 +349,7 @@
                         strcmd.AppendFormat(" ConstructionCode = {0}", (int)value);
                         break;
                     case (int)TableColumn.ConstructionName:     // 工事名称
-                        strcmd.AppendFormat(" ConstructionName = '{0}'", value.ToString());
+                        strcmd.AppendFormat(" ConstructionName = {0}", SeparateString(value.ToString()));
                         break;
                 }
 
Index: trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOAttendanceDailyData.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOAttendanceDailyData.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOAttendanceDailyData.cs	(revision 484)
@@ -104,6 +104,49 @@
 
         #endregion
 
+        #region テーブルのフィールドリストを作成する
+        /// <summary>
+        /// テーブルのフィールドリストを作成する
+        /// </summary>
+        /// <returns></returns>
+        public static string CreateFieldNameList(string strAlias = "")
+        {
+            StringBuilder strcmd = new StringBuilder();
+            try
+            {
+                strcmd.Append(" ");
+                bool bColFirst = true;
+                string strWork = string.Empty;
+                foreach (var gender in Enum.GetValues(typeof(TableColumn)))
+                {
+                    strWork = gender.ToString();
+                    if (!bColFirst) strcmd.Append(",");
+                    if (strWork.Equals("EntryDate") || strWork.Equals("UpdateDate")
+                        || strWork.Equals("StartTime") || strWork.Equals("CompTime"))
+                    {
+                        strcmd.AppendFormat(" DATE_FORMAT({0}{1}, '%Y/%m/%d %H:%i:%s') As {1}", strAlias, strWork);
+                    }
+                    else if (strWork.Equals("AttendanceDate"))
+                    {
+                        strcmd.AppendFormat(" DATE_FORMAT({0}{1}, '%Y/%m/%d') As {1}", strAlias, strWork);
+                    }
+                    else
+                    {
+                        strcmd.AppendFormat(" {0}{1}", strAlias, strWork);
+                    }
+                    bColFirst = false;
+                }
+
+                return strcmd.ToString();
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("システムエラー：{0}：{1}：{2}", CommonMotions.GetMethodName(2), ex.Message, strcmd.ToString());
+                return string.Empty;
+            }
+        }
+        #endregion
+
         #region SQL作成
         /// <summary>
         /// SQL作成
@@ -110,35 +153,18 @@
         /// </summary>
         private string CreateSelectSQL()
         {
-            // SQL作成（DateTime型が変換できないのでCharに変換しておく）
             StringBuilder strcmd = new StringBuilder();
-            strcmd.Append("SELECT");
+            try
+            {
+                strcmd.AppendFormat("SELECT {0} FROM AttendanceDailyData", CreateFieldNameList());
 
-            bool bColFirst = true;
-            string strWork = string.Empty;
-            foreach (var gender in Enum.GetValues(typeof(TableColumn)))
+                return strcmd.ToString();
+            }
+            catch (Exception ex)
             {
-                strWork = gender.ToString();
-                if (!bColFirst) strcmd.Append(",");
-                if (strWork.Equals("EntryDate") || strWork.Equals("UpdateDate")
-                    || strWork.Equals("StartTime") || strWork.Equals("CompTime"))
-                {
-                    strcmd.AppendFormat(" DATE_FORMAT({0}, '%Y/%m/%d %H:%i:%s')", strWork);
-                }
-                else if (strWork.Equals("AttendanceDate"))
-                {
-                    strcmd.AppendFormat(" DATE_FORMAT({0}, '%Y/%m/%d')", strWork);
-                }
-                else
-                {
-                    strcmd.AppendFormat(" {0}", strWork);
-                }
-                bColFirst = false;
+                logger.ErrorFormat("システムエラー：{0}：{1}：{2}", CommonMotions.GetMethodName(2), ex.Message, strcmd.ToString());
+                return string.Empty;
             }
-
-            strcmd.Append(" FROM AttendanceDailyData");
-
-            return strcmd.ToString();
         }
         #endregion
 
@@ -236,13 +262,13 @@
                                             , work.AttendanceDate.ToShortDateString());             // 日報作成日
                 strcmd.AppendFormat(", {0}", work.SeqNo);                                           // 明細行番号
                 strcmd.AppendFormat(", {0}", work.ConstructionCode);                                // 工事番号
-                strcmd.AppendFormat(",'{0}'", work.ActionResult);                                   // 行動実績
+                strcmd.AppendFormat(", {0}", SeparateString(work.ActionResult));                    // 行動実績
                 strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.StartTime);    // 開始時間
                 strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.CompTime);     // 終了時間
                 strcmd.AppendFormat(", {0}", work.DayTimes);                                        // 稼働時間
                 strcmd.AppendFormat(", {0}", work.Overtime);                                        // 時間外就業
                 strcmd.AppendFormat(", {0}", work.OvertimeWA);                                      // 残業認可時間
-                strcmd.AppendFormat(",'{0}'", work.WorkingComment);                                 // コメント
+                strcmd.AppendFormat(", {0}", SeparateString(work.WorkingComment));                  // コメント
                 strcmd.AppendFormat(", {0}", work.WorkKindFlg);                                     // 作業区分フラグ
 
                 strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.EntryDate);
@@ -289,13 +315,13 @@
                                                 , work.AttendanceDate.ToShortDateString());             // 日報作成日
                     strcmd.AppendFormat(", {0}", work.SeqNo);                                           // 明細行番号
                     strcmd.AppendFormat(", {0}", work.ConstructionCode);                                // 工事番号
-                    strcmd.AppendFormat(",'{0}'", work.ActionResult);                                   // 行動実績
+                    strcmd.AppendFormat(", {0}", SeparateString(work.ActionResult));                    // 行動実績
                     strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.StartTime);    // 開始時間
                     strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.CompTime);     // 終了時間
                     strcmd.AppendFormat(", {0}", work.DayTimes);                                        // 稼働時間
                     strcmd.AppendFormat(", {0}", work.Overtime);                                        // 時間外就業
                     strcmd.AppendFormat(", {0}", work.OvertimeWA);                                      // 残業認可時間
-                    strcmd.AppendFormat(",'{0}'", work.WorkingComment);                                 // コメント
+                    strcmd.AppendFormat(", {0}", SeparateString(work.WorkingComment));                  // コメント
                     strcmd.AppendFormat(", {0}", work.WorkKindFlg);                                     // 作業区分フラグ
 
                     strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.EntryDate);
@@ -339,7 +365,7 @@
                                         , data.AttendanceDate.ToShortDateString());         // 日報作成日
                 strcmd.AppendFormat(",SeqNo =  {0} ", data.SeqNo);                          // 明細行番号
                 strcmd.AppendFormat(",ConstructionCode = {0}", data.ConstructionCode);      // 工事番号
-                strcmd.AppendFormat(",ActionResult = '{0}'", data.ActionResult);            // 行動実績
+                strcmd.AppendFormat(",ActionResult = {0}", SeparateString(data.ActionResult));  // 行動実績
 
                 strcmd.AppendFormat(",StartTime = STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')"
                                         , data.StartTime);                                  // 開始時間
@@ -349,7 +375,7 @@
                 strcmd.AppendFormat(",DayTimes = {0}", data.DayTimes);                      // 稼働時間
                 strcmd.AppendFormat(",Overtime = {0}", data.Overtime);                      // 時間外就業
                 strcmd.AppendFormat(",OvertimeWA = {0}", data.OvertimeWA);                  // 残業認可時間
-                strcmd.AppendFormat(",WorkingComment = '{0}'", data.WorkingComment);        // コメント
+                strcmd.AppendFormat(",WorkingComment = {0}", SeparateString(data.WorkingComment));  // コメント
                 strcmd.AppendFormat(",WorkKindFlg = {0}", data.WorkKindFlg);                // 作業区分フラグ
 
                 strcmd.Append(", UpdateDate = NOW()");
@@ -421,7 +447,7 @@
                         strcmd.AppendFormat(" ConstructionCode = {0}", (int)value);
                         break;
                     case (int)TableColumn.ActionResult:
-                        strcmd.AppendFormat(" ActionResult = '{0}'", value.ToString());
+                        strcmd.AppendFormat(" ActionResult = {0}", SeparateString(value.ToString()));
                         break;
                     case (int)TableColumn.StartTime:
                         strcmd.AppendFormat(" StartTime = STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", ((DateTime)value).ToString());
@@ -439,7 +465,7 @@
                         strcmd.AppendFormat(" OvertimeWA = {0}", (decimal)value);
                         break;
                     case (int)TableColumn.WorkingComment:
-                        strcmd.AppendFormat(" WorkingComment = '{0}'", CommonMotions.cnvString(value));
+                        strcmd.AppendFormat(" WorkingComment = {0}", SeparateString(value.ToString()));
                         break;
                     case (int)TableColumn.WorkKindFlg:
                         strcmd.AppendFormat(" WorkKindFlg = {0}", (int)value);
Index: trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOAttendanceNotice.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOAttendanceNotice.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOAttendanceNotice.cs	(revision 484)
@@ -203,8 +203,8 @@
                 strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.ToDate);   // 申請終了日時
                 strcmd.AppendFormat(", {0}", work.NoticePeriod);                                // 勤怠期間日
                 strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d')", work.TransferDay.ToShortDateString());   // 振替日
-                strcmd.AppendFormat(", '{0}'", work.Reason);                                    // 事由
-                strcmd.AppendFormat(", '{0}'", work.Note);                                      // 備考
+                strcmd.AppendFormat(", {0}", SeparateString(work.Reason));                      // 事由
+                strcmd.AppendFormat(", {0}", SeparateString(work.Note));                        // 備考
                 strcmd.AppendFormat(", {0}", work.ApprovalDate);                                // 承認日
                 strcmd.AppendFormat(", {0}", work.ApprovalNo);                                  // 承認受付番号
                 strcmd.AppendFormat(", {0}", work.DeleteFlg);                                   // 削除フラグ
@@ -261,8 +261,8 @@
                     strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.ToDate);   // 申請終了日時
                     strcmd.AppendFormat(", {0}", work.NoticePeriod);                                // 勤怠期間日
                     strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d')", work.TransferDay.ToShortDateString());   // 振替日
-                    strcmd.AppendFormat(", '{0}'", work.Reason);                                    // 事由
-                    strcmd.AppendFormat(", '{0}'", work.Note);                                      // 備考
+                    strcmd.AppendFormat(", {0}", SeparateString(work.Reason));                      // 事由
+                    strcmd.AppendFormat(", {0}", SeparateString(work.Note));                        // 備考
                     strcmd.AppendFormat(", {0}", work.ApprovalDate);                                // 承認日
                     strcmd.AppendFormat(", {0}", work.ApprovalNo);                                  // 承認受付番号
                     strcmd.AppendFormat(", {0}", work.DeleteFlg);                                   // 削除フラグ
@@ -308,10 +308,10 @@
                 strcmd.AppendFormat(", HolidayReason = {0}", data.HolidayReason);                           // 休み区分
                 strcmd.AppendFormat(", FromDate = STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", data.FromDate);  // 申請開始日時
                 strcmd.AppendFormat(", ToDate = STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", data.ToDate);      // 申請終了日時
-                strcmd.AppendFormat(", NoticePeriod = {0}", data.NoticePeriod);                                // 勤怠期間日
+                strcmd.AppendFormat(", NoticePeriod = {0}", data.NoticePeriod);                             // 勤怠期間日
                 strcmd.AppendFormat(", TransferDay = STR_TO_DATE('{0}','%Y/%m/%d')", data.TransferDay.ToShortDateString()); // 振替日
-                strcmd.AppendFormat(", Reason = '{0}'", data.Reason);                                       // 事由
-                strcmd.AppendFormat(", Note = '{0}'", data.Note);                                           // 備考
+                strcmd.AppendFormat(", Reason = {0}", SeparateString(data.Reason));                         // 事由
+                strcmd.AppendFormat(", Note = {0}", SeparateString(data.Note));                             // 備考
                 strcmd.AppendFormat(", ApprovalDate = {0}", data.ApprovalDate);                             // 承認日
                 strcmd.AppendFormat(", ApprovalNo = {0}", data.ApprovalNo);                                 // 承認受付番号
                 strcmd.AppendFormat(", DeleteFlg = {0}", data.DeleteFlg);                                   // 削除フラグ
Index: trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOBankBusinessDayMaster.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOBankBusinessDayMaster.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOBankBusinessDayMaster.cs	(revision 484)
@@ -123,7 +123,7 @@
 
                     strcmd.AppendFormat("  {0}", work.YearMonth.ToString());
                     strcmd.AppendFormat(", {0}", work.BankBusinessDay.ToString());
-                    strcmd.AppendFormat(", '{0}'", work.Note.ToString());
+                    strcmd.AppendFormat(", {0}", SeparateString(work.Note.ToString()));
                     strcmd.AppendFormat(", {0}", work.DeleteFlg.ToString());
 
                     strcmd.Append(", NOW()");
@@ -160,7 +160,7 @@
 
                 strcmd.AppendFormat(" YearMonth = {0}", data.YearMonth.ToString());
                 strcmd.AppendFormat(",BankBusinessDay = {0}", data.BankBusinessDay.ToString());
-                strcmd.AppendFormat(",Note = '{0}'", data.Note);
+                strcmd.AppendFormat(",Note = {0}", SeparateString(data.Note));
                 strcmd.AppendFormat(",DeleteFlg = {0}", data.DeleteFlg.ToString());
 
                 strcmd.Append(", UpdateDate = NOW()");
Index: trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOBillingCostDataLink.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOBillingCostDataLink.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOBillingCostDataLink.cs	(revision 484)
@@ -38,11 +38,16 @@
             SeqNoB,
             LineCount,
             LabourKind,
+            LinkType,
             YearNumber,
             CostType,
             TargetType,
             TargetCode,
             SeqNoC,
+            PersonCode,
+            ActionDate,
+            DataType,
+            DataAddCount,
             EntryDate,
             UpdateDate,
         }
@@ -192,11 +197,16 @@
                 strcmd.AppendFormat(", {0}", work.SeqNoB);
                 strcmd.AppendFormat(", {0}", work.LineCount);
                 strcmd.AppendFormat(", {0}", work.LabourKind);
+                strcmd.AppendFormat(", {0}", work.LinkType);
                 strcmd.AppendFormat(", {0}", work.YearNumber);
                 strcmd.AppendFormat(", {0}", work.CostType);
                 strcmd.AppendFormat(", {0}", work.TargetType);
                 strcmd.AppendFormat(", {0}", work.TargetCode);
                 strcmd.AppendFormat(", {0}", work.SeqNoC);
+                strcmd.AppendFormat(", {0}", work.PersonCode);
+                strcmd.AppendFormat(", DATE('{0}')", work.ActionDate.ToShortDateString());
+                strcmd.AppendFormat(", {0}", work.DataType);
+                strcmd.AppendFormat(", {0}", work.DataAddCount);
 
                 strcmd.Append(", NOW()");
                 strcmd.Append(", NOW()");
@@ -248,11 +258,16 @@
                     strcmd.AppendFormat(", {0}", work.SeqNoB);
                     strcmd.AppendFormat(", {0}", work.LineCount);
                     strcmd.AppendFormat(", {0}", work.LabourKind);
+                    strcmd.AppendFormat(", {0}", work.LinkType);
                     strcmd.AppendFormat(", {0}", work.YearNumber);
                     strcmd.AppendFormat(", {0}", work.CostType);
                     strcmd.AppendFormat(", {0}", work.TargetType);
                     strcmd.AppendFormat(", {0}", work.TargetCode);
                     strcmd.AppendFormat(", {0}", work.SeqNoC);
+                    strcmd.AppendFormat(", {0}", work.PersonCode);
+                    strcmd.AppendFormat(", DATE('{0}')", work.ActionDate.ToShortDateString());
+                    strcmd.AppendFormat(", {0}", work.DataType);
+                    strcmd.AppendFormat(", {0}", work.DataAddCount);
 
                     strcmd.Append(", NOW()");
                     strcmd.Append(", NOW()");
@@ -292,11 +307,16 @@
                 strcmd.AppendFormat(", SeqNoB = {0}", data.SeqNoB);
                 strcmd.AppendFormat(", LineCount = {0}", data.LineCount);
                 strcmd.AppendFormat(", LabourKind = {0}", data.LabourKind);
+                strcmd.AppendFormat(", LinkType = {0}", data.LinkType);
                 strcmd.AppendFormat(", YearNumber = {0}", data.YearNumber);
                 strcmd.AppendFormat(", CostType = {0}", data.CostType);
                 strcmd.AppendFormat(", TargetType = {0}", data.TargetType);
                 strcmd.AppendFormat(", TargetCode = {0}", data.TargetCode);
                 strcmd.AppendFormat(", SeqNo = {0}", data.SeqNoC);
+                strcmd.AppendFormat(", PersonCode = {0}", data.PersonCode);
+                strcmd.AppendFormat(", ActionDate = DATE('{0}')", data.ActionDate.ToShortDateString());
+                strcmd.AppendFormat(", DataType = {0}", data.DataType);
+                strcmd.AppendFormat(", DataAddCount = {0}", data.DataAddCount);
 
                 strcmd.Append(", UpdateDate = NOW()");
                 strcmd.Append(AddSQLString);
@@ -343,6 +363,9 @@
                     case (int)NameColumn.LabourKind:
                         strcmd.AppendFormat(" LabourKind = {0}", (int)value);
                         break;
+                    case (int)NameColumn.LinkType:
+                        strcmd.AppendFormat(" LinkType = {0}", (int)value);
+                        break;
                     case (int)NameColumn.YearNumber:
                         strcmd.AppendFormat(" YearNumber = {0}", (int)value);
                         break;
@@ -358,6 +381,18 @@
                     case (int)NameColumn.SeqNoC:
                         strcmd.AppendFormat(" SeqNoC = {0}", (int)value);
                         break;
+                    case (int)NameColumn.PersonCode:
+                        strcmd.AppendFormat(" PersonCode = {0}", (int)value);
+                        break;
+                    case (int)NameColumn.ActionDate:
+                        strcmd.AppendFormat(" ActionDate = DATE('{0}')", ((DateTime)value).ToShortDateString());
+                        break;
+                    case (int)NameColumn.DataType:
+                        strcmd.AppendFormat(" DataType = {0}", (int)value);
+                        break;
+                    case (int)NameColumn.DataAddCount:
+                        strcmd.AppendFormat(" DataAddCount = {0}", (int)value);
+                        break;
                 }
 
                 strcmd.Append(", UpdateDate = NOW()");
@@ -415,11 +450,16 @@
                 wrk.SeqNoB = int.Parse(objwrk[(int)NameColumn.SeqNoB].ToString());
                 wrk.LineCount= int.Parse(objwrk[(int)NameColumn.LineCount].ToString());
                 wrk.LabourKind= int.Parse(objwrk[(int)NameColumn.LabourKind].ToString());
+                wrk.LinkType = int.Parse(objwrk[(int)NameColumn.LinkType].ToString());
                 wrk.YearNumber = int.Parse(objwrk[(int)NameColumn.YearNumber].ToString());
                 wrk.CostType = int.Parse(objwrk[(int)NameColumn.CostType].ToString());
                 wrk.TargetType = int.Parse(objwrk[(int)NameColumn.TargetType].ToString());
                 wrk.TargetCode = int.Parse(objwrk[(int)NameColumn.TargetCode].ToString());
                 wrk.SeqNoC = int.Parse(objwrk[(int)NameColumn.SeqNoC].ToString());
+                wrk.PersonCode = int.Parse(objwrk[(int)NameColumn.PersonCode].ToString());
+                wrk.ActionDate = DateTime.Parse(objwrk[(int)NameColumn.ActionDate].ToString());
+                wrk.DataType = int.Parse(objwrk[(int)NameColumn.DataType].ToString());
+                wrk.DataAddCount = int.Parse(objwrk[(int)NameColumn.DataAddCount].ToString());
 
                 wrk.EntryDate = DateTime.Parse(objwrk[(int)NameColumn.EntryDate].ToString());
                 wrk.UpdateDate = DateTime.Parse(objwrk[(int)NameColumn.UpdateDate].ToString());
@@ -464,8 +504,6 @@
         /// <summary>
         /// 行ロック
         /// </summary>
-        /// <param name="MaterialItemCode"></param>
-        /// <param name="bConnect"></param>
         /// <returns></returns>
         public bool RowLock(int CompanyCode, int TargetDate, int SeqNo, int LineCount, int LabourKind, bool bConnect = true)
         {
Index: trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOBillingData.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOBillingData.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOBillingData.cs	(revision 484)
@@ -434,8 +434,6 @@
         /// <summary>
         /// 行ロック
         /// </summary>
-        /// <param name="MaterialItemCode"></param>
-        /// <param name="bConnect"></param>
         /// <returns></returns>
         public bool RowLock(int CompanyCode, int TargetDate, int SeqNo, bool bConnect = true)
         {
Index: trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOBillingDataDetail.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOBillingDataDetail.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOBillingDataDetail.cs	(revision 484)
@@ -203,13 +203,13 @@
                 strcmd.AppendFormat(", {0}", work.ConstructionRowCnt);
                 strcmd.AppendFormat(", {0}", work.ConstructionColCnt);
                 strcmd.AppendFormat(", {0}", work.LinkDataType);
-                strcmd.AppendFormat(", '{0}'", work.FieldName);
+                strcmd.AppendFormat(", {0}", SeparateString(work.FieldName));
                 strcmd.AppendFormat(", {0}", work.BillPrice);
                 strcmd.AppendFormat(", {0}", work.HighwPrice);
                 strcmd.AppendFormat(", {0}", work.HardwPrice);
                 strcmd.AppendFormat(", {0}", work.IndsWasteTax);
                 strcmd.AppendFormat(", {0}", work.OverFlg);
-                strcmd.AppendFormat(", '{0}'", work.Note);
+                strcmd.AppendFormat(", {0}", SeparateString(work.Note));
                 strcmd.AppendFormat(", {0}", work.DeleteFlg);
 
                 strcmd.Append(", NOW()");
@@ -266,13 +266,13 @@
                     strcmd.AppendFormat(", {0}", work.ConstructionRowCnt);
                     strcmd.AppendFormat(", {0}", work.ConstructionColCnt);
                     strcmd.AppendFormat(", {0}", work.LinkDataType);
-                    strcmd.AppendFormat(", '{0}'", work.FieldName);
+                    strcmd.AppendFormat(", {0}", SeparateString(work.FieldName));
                     strcmd.AppendFormat(", {0}", work.BillPrice);
                     strcmd.AppendFormat(", {0}", work.HighwPrice);
                     strcmd.AppendFormat(", {0}", work.HardwPrice);
                     strcmd.AppendFormat(", {0}", work.IndsWasteTax);
                     strcmd.AppendFormat(", {0}", work.OverFlg);
-                    strcmd.AppendFormat(", '{0}'", work.Note);
+                    strcmd.AppendFormat(", {0}", SeparateString(work.Note));
                     strcmd.AppendFormat(", {0}", work.DeleteFlg);
 
                     strcmd.Append(", NOW()");
@@ -317,13 +317,13 @@
                 strcmd.AppendFormat(", ConstructionRowCnt = {0}", data.ConstructionRowCnt);
                 strcmd.AppendFormat(", ConstructionColCnt = {0}", data.ConstructionColCnt);
                 strcmd.AppendFormat(", LinkDataType = {0}", data.LinkDataType);
-                strcmd.AppendFormat(", FieldName = '{0}'", data.FieldName);
+                strcmd.AppendFormat(", FieldName = {0}", SeparateString(data.FieldName));
                 strcmd.AppendFormat(", BillPrice = {0}", data.BillPrice);
                 strcmd.AppendFormat(", HighwPrice = {0}", data.HighwPrice);
                 strcmd.AppendFormat(", HardwPrice = {0}", data.HardwPrice);
                 strcmd.AppendFormat(", IndsWasteTax = {0}", data.IndsWasteTax);
                 strcmd.AppendFormat(", OverFlg = {0}", data.OverFlg);
-                strcmd.AppendFormat(", Note = '{0}'", data.Note);
+                strcmd.AppendFormat(", Note = {0}", SeparateString(data.Note));
                 strcmd.AppendFormat(", DeleteFlg = {0}", data.DeleteFlg);
 
                 strcmd.Append(", UpdateDate = NOW()");
@@ -520,8 +520,6 @@
         /// <summary>
         /// 行ロック
         /// </summary>
-        /// <param name="MaterialItemCode"></param>
-        /// <param name="bConnect"></param>
         /// <returns></returns>
         public bool RowLock(int CompanyCode, int TargetDate, int SeqNo, int LineCount, int LabourKind, bool bConnect = true)
         {
Index: trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOBillingPaymentSummary.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOBillingPaymentSummary.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOBillingPaymentSummary.cs	(revision 484)
@@ -411,8 +411,6 @@
         /// <summary>
         /// 行ロック
         /// </summary>
-        /// <param name="MaterialItemCode"></param>
-        /// <param name="bConnect"></param>
         /// <returns></returns>
         public bool RowLock(int CompanyCode, int TargetDate, int ChargePaymentKind, bool bConnect = true)
         {
Index: trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOConstructionBaseInfo.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOConstructionBaseInfo.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOConstructionBaseInfo.cs	(revision 484)
@@ -108,17 +108,17 @@
 
         #endregion
 
-        #region SELECT　SQL作成
+        #region テーブルのフィールドリストを作成する
         /// <summary>
-        /// SQL作成
+        /// テーブルのフィールドリストを作成する
         /// </summary>
-        private string CreateSelectSQL()
+        /// <returns></returns>
+        public static string CreateFieldNameList(string strAlias = "")
         {
             StringBuilder strcmd = new StringBuilder();
             try
             {
-                strcmd.Append("SELECT ");
-
+                strcmd.Append(" ");
                 bool bColFirst = true;
                 string strWork = string.Empty;
                 foreach (var gender in Enum.GetValues(typeof(TableColumn)))
@@ -127,7 +127,7 @@
                     if (!bColFirst) strcmd.Append(",");
                     if (strWork.Equals("EntryDate") || strWork.Equals("UpdateDate"))
                     {
-                        strcmd.AppendFormat(" DATE_FORMAT({0}, '%Y/%m/%d %H:%i:%s')", strWork);
+                        strcmd.AppendFormat(" DATE_FORMAT({0}{1}, '%Y/%m/%d %H:%i:%s') As {1}", strAlias, strWork);
                     }
                     else if (strWork.Equals("RequestedDate")
                             || strWork.Equals("EstimatesSubmitDeadline")
@@ -159,17 +159,36 @@
                             || strWork.Equals("InspectExecuteDate")
                             || strWork.Equals("RevCompleteDate"))
                     {
-                        strcmd.AppendFormat(" DATE_FORMAT({0}, '%Y/%m/%d')", strWork);
+                        strcmd.AppendFormat(" DATE_FORMAT({0}{1}, '%Y/%m/%d') As {1}", strAlias, strWork);
                     }
                     else
                     {
-                        strcmd.AppendFormat(" {0}", strWork);
+                        strcmd.AppendFormat(" {0}{1}", strAlias, strWork);
                     }
                     bColFirst = false;
                 }
 
-                strcmd.Append(" FROM ConstructionBaseInfo");
+                return strcmd.ToString();
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("システムエラー：{0}：{1}：{2}", CommonMotions.GetMethodName(2), ex.Message, strcmd.ToString());
+                return string.Empty;
+            }
+        }
+        #endregion
 
+        #region SELECT　SQL作成
+        /// <summary>
+        /// SQL作成
+        /// </summary>
+        private string CreateSelectSQL()
+        {
+            StringBuilder strcmd = new StringBuilder();
+            try
+            {
+                strcmd.AppendFormat("SELECT {0} FROM ConstructionBaseInfo", CreateFieldNameList());
+
                 return strcmd.ToString();
             }
             catch (Exception ex)
Index: trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOConstructionBaseInfoDetail.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOConstructionBaseInfoDetail.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOConstructionBaseInfoDetail.cs	(revision 484)
@@ -177,7 +177,7 @@
 
                 strcmd.AppendFormat("  {0}", data.ConstructionCode);
                 strcmd.AppendFormat(", {0}", data.DetailNo);
-                strcmd.AppendFormat(",'{0}'", data.DetailString);
+                strcmd.AppendFormat(", {0}", SeparateString(data.DetailString));
 
                 strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", data.EntryDate);
                 strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", data.UpdateDate);
@@ -225,7 +225,7 @@
 
                     strcmd.AppendFormat("  {0}", work.ConstructionCode);
                     strcmd.AppendFormat(", {0}", work.DetailNo);
-                    strcmd.AppendFormat(",'{0}'", work.DetailString);
+                    strcmd.AppendFormat(", {0}", SeparateString(work.DetailString));
 
                     strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.EntryDate);
                     strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.UpdateDate);
@@ -265,7 +265,7 @@
 
                 strcmd.AppendFormat("  ConstructionCode = {0}", data.ConstructionCode);
                 strcmd.AppendFormat(", DetailNo = {0}", data.DetailNo);
-                strcmd.AppendFormat(", DetailString = '{0}'", data.DetailString);
+                strcmd.AppendFormat(", DetailString = {0}", SeparateString(data.DetailString));
 
                 strcmd.Append(", UpdateDate = NOW()");
                 strcmd.Append(AddSQLString);
@@ -362,7 +362,7 @@
                         strcmd.AppendFormat(" DetailNo = {0}", ((int)value).ToString());
                         break;
                     case (int)TableColumn.DETAILSTRING:
-                        strcmd.AppendFormat(" DetailString = '{0}'", value.ToString());
+                        strcmd.AppendFormat(" DetailString = {0}", SeparateString(value.ToString()));
                         break;
                 }
 
@@ -382,7 +382,6 @@
         #endregion
 
         #region 検索の文字列を返す
-
         /// <summary>
         /// 主キー検索の文字列を返す
         /// </summary>
Index: trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOConstructionBudget.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOConstructionBudget.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOConstructionBudget.cs	(revision 484)
@@ -231,15 +231,15 @@
                 strcmd.AppendFormat("  {0}", work.ConstructionCode);                // 工事番号
 
                 strcmd.AppendFormat(", {0}", work.CreatorCode);                     // 作成者コード
-                strcmd.AppendFormat(",'{0}'", work.CreatorName);                    // 作成者名
+                strcmd.AppendFormat(", {0}", SeparateString(work.CreatorName));     // 作成者名
                 strcmd.AppendFormat(", {0}", work.CreatorCosts);                    // 作成者給与
 
                 strcmd.AppendFormat(", {0}", work.AssistantCode);                   // 副担当者コード
-                strcmd.AppendFormat(",'{0}'", work.AssistantName);                  // 副担当者名
+                strcmd.AppendFormat(", {0}", SeparateString(work.AssistantName));   // 副担当者名
                 strcmd.AppendFormat(", {0}", work.AssistantCosts);                  // 副担当者給与
 
                 strcmd.AppendFormat(", {0}", work.InstructorCode);                  // 工事指導員コード
-                strcmd.AppendFormat(",'{0}'", work.InstructorName);                 // 工事指導員名
+                strcmd.AppendFormat(", {0}", SeparateString(work.InstructorName));  // 工事指導員名
                 strcmd.AppendFormat(", {0}", work.InstructorCosts);                 // 工事指導員給与
                 
                 strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d')",
@@ -306,15 +306,15 @@
                     strcmd.AppendFormat("  {0}", work.ConstructionCode);                // 工事番号
 
                     strcmd.AppendFormat(", {0}", work.CreatorCode);                     // 作成者コード
-                    strcmd.AppendFormat(",'{0}'", work.CreatorName);                    // 作成者名
+                    strcmd.AppendFormat(", {0} ", SeparateString(work.CreatorName));    // 作成者名
                     strcmd.AppendFormat(", {0}", work.CreatorCosts);                    // 作成者給与
 
                     strcmd.AppendFormat(", {0}", work.AssistantCode);                   // 副担当者コード
-                    strcmd.AppendFormat(",'{0}'", work.AssistantName);                  // 副担当者名
+                    strcmd.AppendFormat(", {0}", SeparateString(work.AssistantName));   // 副担当者名
                     strcmd.AppendFormat(", {0}", work.AssistantCosts);                  // 副担当者給与
 
                     strcmd.AppendFormat(", {0}", work.InstructorCode);                  // 工事指導員コード
-                    strcmd.AppendFormat(",'{0}'", work.InstructorName);                 // 工事指導員名
+                    strcmd.AppendFormat(", {0}", SeparateString(work.InstructorName));  // 工事指導員名
                     strcmd.AppendFormat(", {0}", work.InstructorCosts);                 // 工事指導員給与
 
                     strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d')",
@@ -373,15 +373,15 @@
                 strcmd.AppendFormat(" ConstructionCode = {0}", data.ConstructionCode);	            // 工事番号
 
                 strcmd.AppendFormat(", CreatorCode = {0}", data.CreatorCode);                       // 作成者コード
-                strcmd.AppendFormat(", CreatorName = '{0}'", data.CreatorName);                     // 作成者名
+                strcmd.AppendFormat(", CreatorName = {0}", SeparateString(data.CreatorName));       // 作成者名
                 strcmd.AppendFormat(", CreatorCosts = {0}", data.CreatorCosts);                     // 作成者給与
 
                 strcmd.AppendFormat(", AssistantCode = {0}", data.AssistantCode);                   // 副担当者コード
-                strcmd.AppendFormat(", AssistantName = '{0}'", data.AssistantName);                 // 副担当者名
+                strcmd.AppendFormat(", AssistantName = {0}", SeparateString(data.AssistantName));   // 副担当者名
                 strcmd.AppendFormat(", AssistantCosts = {0}", data.AssistantCosts);                 // 副担当者給与
 
                 strcmd.AppendFormat(", InstructorCode = {0}", data.InstructorCode);                 // 工事指導員コード
-                strcmd.AppendFormat(", InstructorName = '{0}'", data.InstructorName);               // 工事指導員名
+                strcmd.AppendFormat(", InstructorName = {0}", SeparateString(data.InstructorName)); // 工事指導員名
                 strcmd.AppendFormat(", InstructorCosts = {0}", data.InstructorCosts);               // 工事指導員給与
                 strcmd.AppendFormat(", CreateDate = STR_TO_DATE('{0}','%Y/%m/%d')",
                                                         data.CreateDate.ToShortDateString());       // 作成日
@@ -465,7 +465,7 @@
                         strcmd.AppendFormat(" CreatorCode = {0}", ((int)value).ToString());
                         break;
                     case (int)TableColumn.CreatorName:    	    // 作成者名
-                        strcmd.AppendFormat(" CreatorName = '{0}'", value.ToString());
+                        strcmd.AppendFormat(" CreatorName = {0}", SeparateString(value.ToString()));
                         break;
                     case (int)TableColumn.CreatorCosts:	        // 作成者給与
                         strcmd.AppendFormat(" CreatorCosts = {0}", ((double)value).ToString());
@@ -474,7 +474,7 @@
                         strcmd.AppendFormat(" AssistantCode = {0}", ((int)value).ToString());
                         break;
                     case (int)TableColumn.AssistantName:        // 副担当者名
-                        strcmd.AppendFormat(" AssistantName = '{0}'", value.ToString());
+                        strcmd.AppendFormat(" AssistantName = {0}", SeparateString(value.ToString()));
                         break;
                     case (int)TableColumn.AssistantCosts:       // 副担当者給与
                         strcmd.AppendFormat(" AssistantCosts = {0}", ((double)value).ToString());
@@ -483,7 +483,7 @@
                         strcmd.AppendFormat(" InstructorCode = {0}", ((int)value).ToString());
                         break;
                     case (int)TableColumn.InstructorName:	    // 工事指導員名
-                        strcmd.AppendFormat(" InstructorName = '{0}'", value.ToString());
+                        strcmd.AppendFormat(" InstructorName = {0}", SeparateString(value.ToString()));
                         break;
                     case (int)TableColumn.InstructorCosts:	    // 工事指導員給与
                         strcmd.AppendFormat(" InstructorCosts = {0}", ((double)value).ToString());
Index: trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOConstructionBudgetDetail.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOConstructionBudgetDetail.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOConstructionBudgetDetail.cs	(revision 484)
@@ -205,11 +205,11 @@
                 strcmd.AppendFormat(", {0}", work.LineCount);               // 行番号
                 strcmd.AppendFormat(", {0}", work.ComponentCode);           // 構成キー
                 strcmd.AppendFormat(", {0}", work.ItemCode);		        // 工種キー
-                strcmd.AppendFormat(",'{0}'", work.FirstString);            // 項目名称
-                strcmd.AppendFormat(",'{0}'", work.SecondString);           // 工事内容
+                strcmd.AppendFormat(", {0}", SeparateString(work.FirstString));     // 項目名称
+                strcmd.AppendFormat(", {0}", SeparateString(work.SecondString));    // 工事内容
                 strcmd.AppendFormat(", {0}", work.CompanyType);             // 協力会社コードタイプ
                 strcmd.AppendFormat(", {0}", work.CompanyCode);             // 協力会社コード
-                strcmd.AppendFormat(",'{0}'", work.CompanyName);            // 協力会社名称
+                strcmd.AppendFormat(", {0}", SeparateString(work.CompanyName));     // 協力会社名称
                 strcmd.AppendFormat(", {0}", work.EstimatePrice);           // 見積時金額
                 strcmd.AppendFormat(", {0}", work.NegotiationPrice);        // 交渉時金額
                 strcmd.AppendFormat(", {0}", work.OrderDesiredAmount);      // 発注希望金額
@@ -267,11 +267,11 @@
                     strcmd.AppendFormat(", {0}", work.LineCount);               // 行番号
                     strcmd.AppendFormat(", {0}", work.ComponentCode);           // 構成キー
                     strcmd.AppendFormat(", {0}", work.ItemCode);		        // 工種キー
-                    strcmd.AppendFormat(",'{0}'", work.FirstString);            // 項目名称
-                    strcmd.AppendFormat(",'{0}'", work.SecondString);           // 工事内容
+                    strcmd.AppendFormat(", {0}", SeparateString(work.FirstString));         // 項目名称
+                    strcmd.AppendFormat(", {0}", SeparateString(work.SecondString));        // 工事内容
                     strcmd.AppendFormat(", {0}", work.CompanyType);             // 協力会社コードタイプ
                     strcmd.AppendFormat(", {0}", work.CompanyCode);             // 協力会社コード
-                    strcmd.AppendFormat(",'{0}'", work.CompanyName);            // 協力会社名称
+                    strcmd.AppendFormat(", {0}", SeparateString(work.CompanyName));         // 協力会社名称
                     strcmd.AppendFormat(", {0}", work.EstimatePrice);           // 見積時金額
                     strcmd.AppendFormat(", {0}", work.NegotiationPrice);        // 交渉時金額
                     strcmd.AppendFormat(", {0}", work.OrderDesiredAmount);      // 発注希望金額
@@ -321,11 +321,11 @@
                 strcmd.AppendFormat(", LineCount = {0}", data.LineCount);                       // 行番号
                 strcmd.AppendFormat(", ComponentCode = {0}", data.ComponentCode);               // 構成キー
                 strcmd.AppendFormat(", ItemCode = {0}", data.ItemCode);		                    // 工種キー
-                strcmd.AppendFormat(", FirstString = '{0}'", data.FirstString);                 // 項目名称名称
-                strcmd.AppendFormat(", SecondString = '{0}'", data.SecondString);               // 工事内容
+                strcmd.AppendFormat(", FirstString = {0}", SeparateString(data.FirstString));   // 項目名称名称
+                strcmd.AppendFormat(", SecondString = {0}", SeparateString(data.SecondString)); // 工事内容
                 strcmd.AppendFormat(", CompanyType = {0}", data.CompanyType);                   // 協力会社コードタイプ
                 strcmd.AppendFormat(", CompanyCode = {0}", data.CompanyCode);                   // 協力会社コード
-                strcmd.AppendFormat(", CompanyName = '{0}'", data.CompanyName);                 // 協力会社名称
+                strcmd.AppendFormat(", CompanyName = {0}", SeparateString(data.CompanyName));   // 協力会社名称
                 strcmd.AppendFormat(", EstimatePrice = {0}", data.EstimatePrice);               // 見積時金額
                 strcmd.AppendFormat(", NegotiationPrice = {0}", data.NegotiationPrice);         // 交渉時金額
                 strcmd.AppendFormat(", OrderDesiredAmount = {0}", data.OrderDesiredAmount);     // 発注希望金額
@@ -407,10 +407,10 @@
                         strcmd.AppendFormat(" ItemCode = {0}", ((int)value).ToString());
                         break;
                     case (int)TableColumn.FirstString:            // 項目名称
-                        strcmd.AppendFormat(" FirstString = '{0}'", value.ToString());
+                        strcmd.AppendFormat(" FirstString = {0}", SeparateString(value.ToString()));
                         break;
                     case (int)TableColumn.SecondString:           // 工事内容
-                        strcmd.AppendFormat(" SecondString = '{0}'", value.ToString());
+                        strcmd.AppendFormat(" SecondString = {0}", SeparateString(value.ToString()));
                         break;
                     case (int)TableColumn.CompanyType:            // 協力会社コードタイプ
                         strcmd.AppendFormat(" CompanyType = {0}", ((int)value).ToString());
@@ -419,7 +419,7 @@
                         strcmd.AppendFormat(" CompanyCode = {0}", ((int)value).ToString());
                         break;
                     case (int)TableColumn.CompanyName:            // 協力会社名称
-                        strcmd.AppendFormat(" CompanyName = '{0}'", value.ToString());
+                        strcmd.AppendFormat(" CompanyName = {0}", SeparateString(value.ToString()));
                         break;
                     case (int)TableColumn.EstimatePrice:          // 見積時金額
                         strcmd.AppendFormat(" EstimatePrice = {0}", ((double)value).ToString());
Index: trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOConstructionLedger.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOConstructionLedger.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOConstructionLedger.cs	(revision 484)
@@ -215,9 +215,9 @@
 
                 strcmd.AppendFormat(", {0}", work.ConstructionPeriod);              // 事業期
                 strcmd.AppendFormat(", {0}", work.CreatorCode);                     // 作成者コード
-                strcmd.AppendFormat(",'{0}'", work.CreatorName);                    // 作成者名
+                strcmd.AppendFormat(", {0}", SeparateString(work.CreatorName));     // 作成者名
                 strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d')",
-                                        work.CreateDate.ToShortDateString());           // 作成日
+                                        work.CreateDate.ToShortDateString());       // 作成日
                 strcmd.AppendFormat(", {0}", work.ConstructionTimes);               // 工期（単位・月）
                 strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d')",
                                         work.ConstructionStart.ToShortDateString());    // 契約工期開始
@@ -284,9 +284,9 @@
 
                     strcmd.AppendFormat(", {0}", work.ConstructionPeriod);              // 事業期
                     strcmd.AppendFormat(", {0}", work.CreatorCode);                     // 作成者コード
-                    strcmd.AppendFormat(",'{0}'", work.CreatorName);                    // 作成者名
+                    strcmd.AppendFormat(", {0}", SeparateString(work.CreatorName));     // 作成者名
                     strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d')",
-                                            work.CreateDate.ToShortDateString());           // 作成日
+                                            work.CreateDate.ToShortDateString());       // 作成日
                     strcmd.AppendFormat(", {0}", work.ConstructionTimes);               // 工期（単位・月）
                     strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d')",
                                             work.ConstructionStart.ToShortDateString());    // 契約工期開始
@@ -344,9 +344,9 @@
 
                 strcmd.AppendFormat(", ConstructionPeriod = {0}", data.ConstructionPeriod);     // 事業期
                 strcmd.AppendFormat(", CreatorCode = {0}", data.CreatorCode);                   // 作成者コード
-                strcmd.AppendFormat(", CreatorName = '{0}'", data.CreatorName);                 // 作成者名
+                strcmd.AppendFormat(", CreatorName = {0}", SeparateString(data.CreatorName));   // 作成者名
                 strcmd.AppendFormat(", CreateDate = STR_TO_DATE('{0}','%Y/%m/%d')",
-                                                        data.CreateDate.ToShortDateString());       // 作成日
+                                                        data.CreateDate.ToShortDateString());   // 作成日
                 strcmd.AppendFormat(", ConstructionTimes = {0}", data.ConstructionTimes);       // 工期（単位・月）
                 strcmd.AppendFormat(", ConstructionStart = STR_TO_DATE('{0}','%Y/%m/%d')",
                                                         data.ConstructionStart.ToShortDateString());// 契約工期開始
@@ -437,7 +437,7 @@
                         strcmd.AppendFormat(" CreatorCode = {0}", ((int)value).ToString());
                         break;
                     case (int)TableColumn.CreatorName:    	        // 作成者名
-                        strcmd.AppendFormat(" CreatorName = '{0}'", value.ToString());
+                        strcmd.AppendFormat(" CreatorName = {0}", SeparateString(value.ToString()));
                         break;
                     case (int)TableColumn.CreateDate:	            // 作成日
                         strcmd.AppendFormat(" CreateDate = STR_TO_DATE('{0}','%Y/%m/%d')", ((DateTime)value).ToShortDateString());
Index: trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOConstructionLedgerDetail.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOConstructionLedgerDetail.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOConstructionLedgerDetail.cs	(revision 484)
@@ -78,6 +78,44 @@
 
         #endregion
 
+        #region テーブルのフィールドリストを作成する
+        /// <summary>
+        /// テーブルのフィールドリストを作成する
+        /// </summary>
+        /// <returns></returns>
+        public static string CreateFieldNameList(string strAlias = "")
+        {
+            StringBuilder strcmd = new StringBuilder();
+            try
+            {
+                strcmd.Append(" ");
+                bool bColFirst = true;
+                string strWork = string.Empty;
+                foreach (var gender in Enum.GetValues(typeof(TableColumn)))
+                {
+                    strWork = gender.ToString();
+                    if (!bColFirst) strcmd.Append(",");
+                    if (strWork.Equals("EntryDate") || strWork.Equals("UpdateDate"))
+                    {
+                        strcmd.AppendFormat(" DATE_FORMAT({0}{1}, '%Y/%m/%d %H:%i:%s') As {1}", strAlias, strWork);
+                    }
+                    else
+                    {
+                        strcmd.AppendFormat(" {0}{1}", strAlias, strWork);
+                    }
+                    bColFirst = false;
+                }
+
+                return strcmd.ToString();
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("システムエラー：{0}：{1}：{2}", CommonMotions.GetMethodName(2), ex.Message, strcmd.ToString());
+                return string.Empty;
+            }
+        }
+        #endregion
+
         #region SELECT　SQL作成
         /// <summary>
         /// SQL作成
@@ -85,28 +123,17 @@
         private string CreateSelectSQL()
         {
             StringBuilder strcmd = new StringBuilder();
-            strcmd.Append("SELECT");
+            try
+            {
+                strcmd.AppendFormat("SELECT {0} FROM ConstructionLedgerDetail", CreateFieldNameList());
 
-            bool bColFirst = true;
-            string strWork = string.Empty;
-            foreach (var gender in Enum.GetValues(typeof(TableColumn)))
+                return strcmd.ToString();
+            }
+            catch (Exception ex)
             {
-                strWork = gender.ToString();
-                if (!bColFirst) strcmd.Append(",");
-                if (strWork.Equals("EntryDate") || strWork.Equals("UpdateDate"))
-                {
-                    strcmd.AppendFormat(" DATE_FORMAT({0}, '%Y/%m/%d %H:%i:%s')", strWork);
-                }
-                else
-                {
-                    strcmd.AppendFormat(" {0}", strWork);
-                }
-                bColFirst = false;
+                logger.ErrorFormat("システムエラー：{0}：{1}：{2}", CommonMotions.GetMethodName(2), ex.Message, strcmd.ToString());
+                return string.Empty;
             }
-
-            strcmd.Append(" FROM ConstructionLedgerDetail");
-
-            return strcmd.ToString();
         }
         #endregion
 
@@ -213,11 +240,11 @@
                 strcmd.AppendFormat(", {0}", work.LineCount);               // 行番号
                 strcmd.AppendFormat(", {0}", work.ComponentCode);           // 構成キー
                 strcmd.AppendFormat(", {0}", work.ItemCode);		        // 工種キー
-                strcmd.AppendFormat(",'{0}'", work.FirstString);            // 項目名称
-                strcmd.AppendFormat(",'{0}'", work.SecondString);           // 工事内容
+                strcmd.AppendFormat(", {0}", SeparateString(work.FirstString));     // 項目名称
+                strcmd.AppendFormat(", {0}", SeparateString(work.SecondString));    // 工事内容
                 strcmd.AppendFormat(", {0}", work.CompanyType);             // 協力会社コードタイプ
                 strcmd.AppendFormat(", {0}", work.CompanyCode);             // 協力会社コード
-                strcmd.AppendFormat(",'{0}'", work.CompanyName);            // 協力会社名称
+                strcmd.AppendFormat(", {0}", SeparateString(work.CompanyName));     // 協力会社名称
                 strcmd.AppendFormat(", {0}", work.EstimatePrice);           // 予算（見積）金額
                 strcmd.AppendFormat(", {0}", work.ExecutionAmount);         // 実行金額
                 strcmd.AppendFormat(", {0}", work.AmountConfigRate);        // 金額構成率
@@ -287,11 +314,11 @@
                     strcmd.AppendFormat(", {0}", work.LineCount);               // 行番号
                     strcmd.AppendFormat(", {0}", work.ComponentCode);           // 構成キー
                     strcmd.AppendFormat(", {0}", work.ItemCode);		        // 工種キー
-                    strcmd.AppendFormat(",'{0}'", work.FirstString);            // 項目名称
-                    strcmd.AppendFormat(",'{0}'", work.SecondString);           // 工事内容
+                    strcmd.AppendFormat(", {0}", SeparateString(work.FirstString));     // 項目名称
+                    strcmd.AppendFormat(", {0}", SeparateString(work.SecondString));    // 工事内容
                     strcmd.AppendFormat(", {0}", work.CompanyType);             // 協力会社コードタイプ
                     strcmd.AppendFormat(", {0}", work.CompanyCode);             // 協力会社コード
-                    strcmd.AppendFormat(",'{0}'", work.CompanyName);            // 協力会社名称
+                    strcmd.AppendFormat(", {0}", SeparateString(work.CompanyName));     // 協力会社名称
                     strcmd.AppendFormat(", {0}", work.EstimatePrice);           // 予算（見積）金額
                     strcmd.AppendFormat(", {0}", work.ExecutionAmount);         // 実行金額
                     strcmd.AppendFormat(", {0}", work.AmountConfigRate);        // 金額構成率
@@ -352,11 +379,11 @@
                 strcmd.AppendFormat(", LineCount = {0}", data.LineCount);                       // 行番号
                 strcmd.AppendFormat(", ComponentCode = {0}", data.ComponentCode);               // 構成キー
                 strcmd.AppendFormat(", ItemCode = {0}", data.ItemCode);		                    // 工種キー
-                strcmd.AppendFormat(", FirstString = '{0}'", data.FirstString);                 // 項目名称名称
-                strcmd.AppendFormat(", SecondString = '{0}'", data.SecondString);               // 工事内容
+                strcmd.AppendFormat(", FirstString = {0}", SeparateString(data.FirstString));   // 項目名称名称
+                strcmd.AppendFormat(", SecondString = {0}", SeparateString(data.SecondString)); // 工事内容
                 strcmd.AppendFormat(", CompanyType = {0}", data.CompanyType);                   // 協力会社コードタイプ
                 strcmd.AppendFormat(", CompanyCode = {0}", data.CompanyCode);                   // 協力会社コード
-                strcmd.AppendFormat(", CompanyName = '{0}'", data.CompanyName);                 // 協力会社名称
+                strcmd.AppendFormat(", CompanyName = {0}", SeparateString(data.CompanyName));   // 協力会社名称
                 strcmd.AppendFormat(", EstimatePrice = {0}", data.EstimatePrice);               // 予算（見積）金額
                 strcmd.AppendFormat(", ExecutionAmount = {0}", data.ExecutionAmount);           // 実行金額
                 strcmd.AppendFormat(", AmountConfigRate = {0}", data.AmountConfigRate);         // 金額構成率
@@ -561,10 +588,10 @@
                         strcmd.AppendFormat(" ItemCode = {0}", ((int)value).ToString());
                         break;
                     case (int)TableColumn.FirstString:           // 項目名称
-                        strcmd.AppendFormat(" FirstString = '{0}'", value.ToString());
+                        strcmd.AppendFormat(" FirstString = {0}", SeparateString(value.ToString()));
                         break;
                     case (int)TableColumn.SecondString:          // 工事内容
-                        strcmd.AppendFormat(" SecondString = '{0}'", value.ToString());
+                        strcmd.AppendFormat(" SecondString = {0}", SeparateString(value.ToString()));
                         break;
                     case (int)TableColumn.CompanyType:           // 協力会社コードタイプ
                         strcmd.AppendFormat(" CompanyType = {0}", ((int)value).ToString());
@@ -573,7 +600,7 @@
                         strcmd.AppendFormat(" CompanyCode = {0}", ((int)value).ToString());
                         break;
                     case (int)TableColumn.CompanyName:           // 協力会社名称
-                        strcmd.AppendFormat(" CompanyName = '{0}'", value.ToString());
+                        strcmd.AppendFormat(" CompanyName = {0}", SeparateString(value.ToString()));
                         break;
                     case (int)TableColumn.EstimatePrice:         // 予算（見積）金額
                         strcmd.AppendFormat(" EstimatePrice = {0}", ((int)value).ToString());
Index: trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOConstructionLedgerExcute.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOConstructionLedgerExcute.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOConstructionLedgerExcute.cs	(revision 484)
@@ -75,6 +75,48 @@
 
         #endregion
 
+        #region テーブルのフィールドリストを作成する
+        /// <summary>
+        /// テーブルのフィールドリストを作成する
+        /// </summary>
+        /// <returns></returns>
+        public static string CreateFieldNameList(string strAlias = "")
+        {
+            StringBuilder strcmd = new StringBuilder();
+            try
+            {
+                strcmd.Append(" ");
+                bool bColFirst = true;
+                string strWork = string.Empty;
+                foreach (var gender in Enum.GetValues(typeof(TableColumn)))
+                {
+                    strWork = gender.ToString();
+                    if (!bColFirst) strcmd.Append(",");
+                    if (strWork.Equals("EntryDate") || strWork.Equals("UpdateDate"))
+                    {
+                        strcmd.AppendFormat(" DATE_FORMAT({0}{1}, '%Y/%m/%d %H:%i:%s') As {1}", strAlias, strWork);
+                    }
+                    else if (strWork.Equals("TargetMonth"))
+                    {
+                        strcmd.AppendFormat(" DATE({0}{1}) As {1}", strAlias, strWork);
+                    }
+                    else
+                    {
+                        strcmd.AppendFormat(" {0}{1}", strAlias, strWork);
+                    }
+                    bColFirst = false;
+                }
+
+                return strcmd.ToString();
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("システムエラー：{0}：{1}：{2}", CommonMotions.GetMethodName(2), ex.Message, strcmd.ToString());
+                return string.Empty;
+            }
+        }
+        #endregion
+
         #region SELECT　SQL作成
         /// <summary>
         /// SQL作成
@@ -81,23 +123,18 @@
         /// </summary>
         private string CreateSelectSQL()
         {
-            // SQL作成
             StringBuilder strcmd = new StringBuilder();
+            try
+            {
+                strcmd.AppendFormat("SELECT {0} FROM ConstructionLedgerExcute", CreateFieldNameList());
 
-            strcmd.Append("SELECT");
-            strcmd.Append("  ConstructionCode");	        // 工事コード
-            strcmd.Append(", GroupCount");               // グループ番号
-            strcmd.Append(", LineCount");                // 行番号
-            strcmd.Append(", ColumnCount");              // 列番号
-
-            strcmd.Append(", PaymentAmount");            // 支払金額
-            strcmd.Append(", DATE_FORMAT(TargetMonth, '%Y/%m/%d')");    // 対象年月
-
-            strcmd.Append(", DATE_FORMAT(EntryDate, '%Y/%m/%d %H:%i:%s')");
-            strcmd.Append(", DATE_FORMAT(UpdateDate, '%Y/%m/%d %H:%i:%s')");
-            strcmd.Append(" FROM ConstructionLedgerExcute");
-
-            return strcmd.ToString();
+                return strcmd.ToString();
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("システムエラー：{0}：{1}：{2}", CommonMotions.GetMethodName(2), ex.Message, strcmd.ToString());
+                return string.Empty;
+            }
         }
         #endregion
 
Index: trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOCostDataOfCompensation.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOCostDataOfCompensation.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOCostDataOfCompensation.cs	(revision 484)
@@ -42,6 +42,7 @@
             FromCodeType,       // 相手先コードタイプ
             FromCode,           // 相手先コード
             SendDate,           // 対象日付
+            LinkCode,           // リンク先工事コード
             EntryPrice,         // 金額（税抜）
             EntryTax,           // 金額（税込）
             Content,            // 支払内容
@@ -64,6 +65,48 @@
 
         #endregion
 
+        #region テーブルのフィールドリストを作成する
+        /// <summary>
+        /// テーブルのフィールドリストを作成する
+        /// </summary>
+        /// <returns></returns>
+        public static string CreateFieldNameList(string strAlias = "")
+        {
+            StringBuilder strcmd = new StringBuilder();
+            try
+            {
+                strcmd.Append(" ");
+                bool bColFirst = true;
+                string strWork = string.Empty;
+                foreach (var gender in Enum.GetValues(typeof(TableColumn)))
+                {
+                    strWork = gender.ToString();
+                    if (!bColFirst) strcmd.Append(",");
+                    if (strWork.Equals("EntryDate") || strWork.Equals("UpdateDate"))
+                    {
+                        strcmd.AppendFormat(" DATE_FORMAT({0}{1}, '%Y/%m/%d %H:%i:%s') As {1}", strAlias, strWork);
+                    }
+                    else if (strWork.Equals("SendDate"))
+                    {
+                        strcmd.AppendFormat(" DATE({0}{1}) As {1}", strAlias, strWork);
+                    }
+                    else
+                    {
+                        strcmd.AppendFormat(" {0}{1}", strAlias, strWork);
+                    }
+                    bColFirst = false;
+                }
+
+                return strcmd.ToString();
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("システムエラー：{0}：{1}：{2}", CommonMotions.GetMethodName(2), ex.Message, strcmd.ToString());
+                return string.Empty;
+            }
+        }
+        #endregion
+
         #region SQL作成
         /// <summary>
         /// SQL作成
@@ -70,34 +113,18 @@
         /// </summary>
         private string CreateSelectSQL()
         {
-            // SQL作成
             StringBuilder strcmd = new StringBuilder();
-            strcmd.Append("SELECT");
+            try
+            {
+                strcmd.AppendFormat("SELECT {0} FROM CostDataOfCompensation", CreateFieldNameList());
 
-            bool bColFirst = true;
-            string strWork = string.Empty;
-            foreach (var gender in Enum.GetValues(typeof(TableColumn)))
+                return strcmd.ToString();
+            }
+            catch (Exception ex)
             {
-                strWork = gender.ToString();
-                if (!bColFirst) strcmd.Append(",");
-                if (strWork.Equals("EntryDate") || strWork.Equals("UpdateDate"))
-                {
-                    strcmd.AppendFormat(" DATE_FORMAT({0}, '%Y/%m/%d %H:%i:%s')", strWork);
-                }
-                else if (strWork.Equals("SendDate"))
-                {
-                    strcmd.AppendFormat(" DATE({0})", strWork);
-                }
-                else
-                {
-                    strcmd.AppendFormat(" {0}", strWork);
-                }
-                bColFirst = false;
+                logger.ErrorFormat("システムエラー：{0}：{1}：{2}", CommonMotions.GetMethodName(2), ex.Message, strcmd.ToString());
+                return string.Empty;
             }
-
-            strcmd.Append(" FROM CostDataOfCompensation");
-
-            return strcmd.ToString();
         }
         #endregion
 
@@ -199,10 +226,11 @@
                 strcmd.AppendFormat(", {0}", work.FromCodeType);                                // 相手先コードタイプ
                 strcmd.AppendFormat(", {0}", work.FromCode);                                    // 相手先コード
                 strcmd.AppendFormat(", DATE('{0}')", work.SendDate.Date);                       // 対象日付
+                strcmd.AppendFormat(", {0}", work.LinkCode);                                    // リンク先工事コード
                 strcmd.AppendFormat(", {0}", work.EntryPrice);                                  // 金額（税抜）
                 strcmd.AppendFormat(", {0}", work.EntryTax);                                    // 金額（税込）
-                strcmd.AppendFormat(", '{0}'", work.Content);                                   // 支払内容
-                strcmd.AppendFormat(", '{0}'", work.BikoComment);                               // 備考
+                strcmd.AppendFormat(", {0}", SeparateString(work.Content));                     // 支払内容
+                strcmd.AppendFormat(", {0}", SeparateString(work.BikoComment));                 // 備考
                 strcmd.AppendFormat(", {0}", work.LockFlg);                                     // データロック
 
                 strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.EntryDate);
@@ -253,10 +281,11 @@
                     strcmd.AppendFormat(", {0}", work.FromCodeType);                                // 相手先コードタイプ
                     strcmd.AppendFormat(", {0}", work.FromCode);                                    // 相手先コード
                     strcmd.AppendFormat(", DATE('{0}')", work.SendDate.Date);                       // 対象日付
+                    strcmd.AppendFormat(", {0}", work.LinkCode);                                    // リンク先工事コード
                     strcmd.AppendFormat(", {0}", work.EntryPrice);                                  // 金額（税抜）
                     strcmd.AppendFormat(", {0}", work.EntryTax);                                    // 金額（税込）
-                    strcmd.AppendFormat(", '{0}'", work.Content);                                   // 支払内容
-                    strcmd.AppendFormat(", '{0}'", work.BikoComment);                               // 備考
+                    strcmd.AppendFormat(", {0}", SeparateString(work.Content));                     // 支払内容
+                    strcmd.AppendFormat(", {0}", SeparateString(work.BikoComment));                 // 備考
                     strcmd.AppendFormat(", {0}", work.LockFlg);                                     // データロック
 
                     strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.EntryDate);
@@ -303,10 +332,11 @@
                 strcmd.AppendFormat(", FromCodeType = {0}", data.FromCodeType);                                     // 相手先コードタイプ
                 strcmd.AppendFormat(", FromCode = {0}", data.FromCode);                                             // 相手先コード
                 strcmd.AppendFormat(", SendDate = DATE('{0}')", data.SendDate.Date);                                // 対象日付
+                strcmd.AppendFormat(", LinkCode = {0}", data.LinkCode);                                             // リンク先工事コード
                 strcmd.AppendFormat(", EntryPrice = {0}", data.EntryPrice);                                         // 金額（税抜）
                 strcmd.AppendFormat(", EntryTax = {0}", data.EntryTax);                                             // 金額（税込）
-                strcmd.AppendFormat(", Content = '{0}'", data.Content);                                             // 支払内容
-                strcmd.AppendFormat(", BikoComment = '{0}'", data.BikoComment);                                         // 備考
+                strcmd.AppendFormat(", Content = {0}", SeparateString(data.Content));                               // 支払内容
+                strcmd.AppendFormat(", BikoComment = {0}", SeparateString(data.BikoComment));                       // 備考
                 strcmd.AppendFormat(", LockFlg = {0}", data.LockFlg);                                               // データロック
 
                 strcmd.Append(", UpdateDate = NOW()");
@@ -371,6 +401,7 @@
                 wrk.FromCodeType = int.Parse(objwrk[(int)TableColumn.FromCodeType].ToString());                 // 相手先コードタイプ
                 wrk.FromCode = int.Parse(objwrk[(int)TableColumn.FromCode].ToString());                         // 相手先コード
                 wrk.SendDate = DateTime.Parse(objwrk[(int)TableColumn.SendDate].ToString());                    // 対象日付
+                wrk.LinkCode = int.Parse(objwrk[(int)TableColumn.LinkCode].ToString());                         // リンク先工事コード
                 wrk.EntryPrice = decimal.Parse(objwrk[(int)TableColumn.EntryPrice].ToString());                 // 金額（税抜）
                 wrk.EntryTax = decimal.Parse(objwrk[(int)TableColumn.EntryTax].ToString());                     // 金額（税込）
                 wrk.Content = objwrk[(int)TableColumn.Content].ToString();                                      // 支払内容
Index: trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOCostDataOfPerson.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOCostDataOfPerson.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOCostDataOfPerson.cs	(revision 484)
@@ -193,14 +193,14 @@
 
                 strcmd.AppendFormat("  {0}", work.PersonCode);                      // 担当者コード
                 strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d')"
-                                            , work.ActionDate.ToShortDateString());     // 対象日付
+                                            , work.ActionDate.ToShortDateString()); // 対象日付
                 strcmd.AppendFormat(", {0}", work.DataType);                        // データ区分
                 strcmd.AppendFormat(", {0}", work.DataAddCount);                    // データ追加番号
                 strcmd.AppendFormat(",'{0}'", work.TargetMonth);                    // 対象年月
                 strcmd.AppendFormat(", {0}", work.ConstructionCode);                // 工事番号
                 strcmd.AppendFormat(", {0}", work.SuppliersCode);                   // 支払先コード
-                strcmd.AppendFormat(",'{0}'", work.SuppliersName);                  // 支払先名称
-                strcmd.AppendFormat(",'{0}'", work.PaymentContent);                 // 支払内容
+                strcmd.AppendFormat(", {0}", SeparateString(work.SuppliersName));   // 支払先名称
+                strcmd.AppendFormat(", {0}", SeparateString(work.PaymentContent));  // 支払内容
                 strcmd.AppendFormat(", {0}", work.PaymentType);                     // 支払方法フラグ
                 strcmd.AppendFormat(", {0}", work.EntryPrice);	                    // 金額（税抜）
                 strcmd.AppendFormat(", {0}", work.EntryPriceInTax);	                // 金額（税込）
@@ -256,8 +256,8 @@
                     strcmd.AppendFormat(",'{0}'", work.TargetMonth);                    // 対象年月
                     strcmd.AppendFormat(", {0}", work.ConstructionCode);                // 工事番号
                     strcmd.AppendFormat(", {0}", work.SuppliersCode);                   // 支払先コード
-                    strcmd.AppendFormat(",'{0}'", work.SuppliersName);                  // 支払先名称
-                    strcmd.AppendFormat(",'{0}'", work.PaymentContent);                 // 支払内容
+                    strcmd.AppendFormat(", {0}", SeparateString(work.SuppliersName));   // 支払先名称
+                    strcmd.AppendFormat(", {0}", SeparateString(work.PaymentContent));  // 支払内容
                     strcmd.AppendFormat(", {0}", work.PaymentType);                     // 支払方法フラグ
                     strcmd.AppendFormat(", {0}", work.EntryPrice);	                    // 金額（税抜）
                     strcmd.AppendFormat(", {0}", work.EntryPriceInTax);	                // 金額（税込）
@@ -309,8 +309,8 @@
                 strcmd.AppendFormat(",TargetMonth = '{0}'", data.TargetMonth);              // 対象年月
                 strcmd.AppendFormat(",ConstructionCode = {0}", data.ConstructionCode);      // 工事番号
                 strcmd.AppendFormat(",SuppliersCode = {0}", data.SuppliersCode);            // 支払先コード
-                strcmd.AppendFormat(",SuppliersName = '{0}'", data.SuppliersName);          // 支払先名称
-                strcmd.AppendFormat(",PaymentContent = '{0}'", data.PaymentContent);        // 支払内容
+                strcmd.AppendFormat(",SuppliersName = {0}", SeparateString(data.SuppliersName));    // 支払先名称
+                strcmd.AppendFormat(",PaymentContent = {0}", SeparateString(data.PaymentContent));  // 支払内容
                 strcmd.AppendFormat(",PaymentType = {0}", data.PaymentType);                // 支払方法フラグ
                 strcmd.AppendFormat(",EntryPrice = {0}", data.EntryPrice);                  // 金額（税抜）
                 strcmd.AppendFormat(",EntryPriceInTax = {0}", data.EntryPriceInTax);        // 金額（税込）
@@ -471,5 +471,41 @@
             return iRet;
         }
         #endregion
+
+        #region 最大伝票ナンバー取得
+        /// <summary>
+        /// 最大伝票ナンバー取得
+        /// </summary>
+        public int SelectMaxSlipNumber(string AddSQLString, bool bConnect = true)
+        {
+            // インターフェース
+            StringBuilder strcmd = new StringBuilder();
+            ArrayList arData = new ArrayList();
+            int iRet = 0;
+            try
+            {
+                // SQL作成
+                strcmd.AppendFormat("SELECT IFNULL(MAX(SlipNumber), 0) FROM CostDataOfPerson{0}", AddSQLString);
+
+                // SQL実行
+                if (!ExecuteReader(strcmd.ToString(), ref arData, bConnect)) return iRet;
+
+                // データセット
+                foreach (object[] objwrk in arData)
+                {
+                    if (objwrk[0].ToString().Equals("null"))
+                        iRet = 0;
+                    else
+                        iRet = int.Parse(objwrk[0].ToString());
+                }
+
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("システムエラー：{0}：{1}：{2}", CommonMotions.GetMethodName(2), ex.Message, strcmd.ToString());
+            }
+            return iRet;
+        }
+        #endregion
     }
 }
Index: trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOCostomerRegist.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOCostomerRegist.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOCostomerRegist.cs	(revision 484)
@@ -77,42 +77,66 @@
 
         #endregion
 
+        #region テーブルのフィールドリストを作成する
+        /// <summary>
+        /// テーブルのフィールドリストを作成する
+        /// </summary>
+        /// <returns></returns>
+        public static string CreateFieldNameList(string strAlias = "")
+        {
+            StringBuilder strcmd = new StringBuilder();
+            try
+            {
+                strcmd.Append(" ");
+                bool bColFirst = true;
+                string strWork = string.Empty;
+                foreach (var gender in Enum.GetValues(typeof(TableColumn)))
+                {
+                    strWork = gender.ToString();
+                    if (!bColFirst) strcmd.Append(",");
+                    if (strWork.Equals("EntryDate") || strWork.Equals("UpdateDate"))
+                    {
+                        strcmd.AppendFormat(" DATE_FORMAT({0}{1}, '%Y/%m/%d %H:%i:%s') As {1}", strAlias, strWork);
+                    }
+                    else if (strWork.Equals("CreateDate"))
+                    {
+                        strcmd.AppendFormat(" DATE({0}) As {1}", strWork);
+                    }
+                    else
+                    {
+                        strcmd.AppendFormat(" {0}{1}", strAlias, strWork);
+                    }
+                    bColFirst = false;
+                }
+
+                return strcmd.ToString();
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("システムエラー：{0}：{1}：{2}", CommonMotions.GetMethodName(2), ex.Message, strcmd.ToString());
+                return string.Empty;
+            }
+        }
+        #endregion
+
         #region 発注者登録申請データ検索SQL作成
         /// <summary>
         /// 発注者登録申請データ検索作成
         /// </summary>
-        /// <param name="AddSQLString">検索条件SQL文字列</param>
-        /// <param name="data">発注者登録申請データデータ</param>
-        /// <returns>true：成功 false：失敗</returns>
         private string CreateSelectSQL()
         {
             StringBuilder strcmd = new StringBuilder();
-            strcmd.Append("SELECT");
+            try
+            {
+                strcmd.AppendFormat("SELECT {0} FROM CostomerRegist", CreateFieldNameList());
 
-            bool bColFirst = true;
-            string strWork = string.Empty;
-            foreach (var gender in Enum.GetValues(typeof(TableColumn)))
+                return strcmd.ToString();
+            }
+            catch (Exception ex)
             {
-                strWork = gender.ToString();
-                if (!bColFirst) strcmd.Append(",");
-                if (strWork.Equals("EntryDate") || strWork.Equals("UpdateDate"))
-                {
-                    strcmd.AppendFormat(" DATE_FORMAT({0}, '%Y/%m/%d %H:%i:%s')", strWork);
-                }
-                else if (strWork.Equals("CreateDate"))
-                {
-                    strcmd.AppendFormat(" DATE({0})", strWork);
-                }
-                else
-                {
-                    strcmd.AppendFormat(" {0}", strWork);
-                }
-                bColFirst = false;
+                logger.ErrorFormat("システムエラー：{0}：{1}：{2}", CommonMotions.GetMethodName(2), ex.Message, strcmd.ToString());
+                return string.Empty;
             }
-
-            strcmd.Append(" FROM CostomerRegist");
-
-            return strcmd.ToString();
         }
         #endregion
 
@@ -229,25 +253,25 @@
                 strcmd.AppendFormat(", {0}", work.SourceCode);
                 strcmd.AppendFormat(", {0}", work.PetitionPeriod);
                 strcmd.AppendFormat(", {0}", work.OrderFlg);
-                strcmd.AppendFormat(", '{0}'", work.CorporateStatusName);
+                strcmd.AppendFormat(", {0}", SeparateString(work.CorporateStatusName));
                 strcmd.AppendFormat(", {0}", work.CorporateStatusPoint);
-                strcmd.AppendFormat(", '{0}'", work.OrderersName1);
-                strcmd.AppendFormat(", '{0}'", work.OrderersName2);
-                strcmd.AppendFormat(", '{0}'", work.DepartmentName);
-                strcmd.AppendFormat(", '{0}'", work.PersonName);
-                strcmd.AppendFormat(", '{0}'", work.ZipCode);
-                strcmd.AppendFormat(", '{0}'", work.Address1);
-                strcmd.AppendFormat(", '{0}'", work.Address2);
-                strcmd.AppendFormat(", '{0}'", work.Address3);
-                strcmd.AppendFormat(", '{0}'", work.PhoneNumber);
-                strcmd.AppendFormat(", '{0}'", work.FaxNumber);
-                strcmd.AppendFormat(", '{0}'", work.MailAddress);
-                strcmd.AppendFormat(", '{0}'", work.Note);
+                strcmd.AppendFormat(",  {0}", SeparateString(work.OrderersName1));
+                strcmd.AppendFormat(",  {0}", SeparateString(work.OrderersName2));
+                strcmd.AppendFormat(",  {0}", SeparateString(work.DepartmentName));
+                strcmd.AppendFormat(",  {0}", SeparateString(work.PersonName));
+                strcmd.AppendFormat(",  {0}", SeparateString(work.ZipCode));
+                strcmd.AppendFormat(",  {0}", SeparateString(work.Address1));
+                strcmd.AppendFormat(",  {0}", SeparateString(work.Address2));
+                strcmd.AppendFormat(",  {0}", SeparateString(work.Address3));
+                strcmd.AppendFormat(",  {0}", SeparateString(work.PhoneNumber));
+                strcmd.AppendFormat(",  {0}", SeparateString(work.FaxNumber));
+                strcmd.AppendFormat(",  {0}", SeparateString(work.MailAddress));
+                strcmd.AppendFormat(",  {0}", SeparateString(work.Note));
                 strcmd.AppendFormat(", {0}", work.OrderCotegory);
                 strcmd.AppendFormat(", {0}", work.OrderDate);
                 strcmd.AppendFormat(", {0}", work.OrderNo);
                 strcmd.AppendFormat(", {0}", work.CreateDepartmentCode);
-                strcmd.AppendFormat(", '{0}'", work.CreateDepartmentName);
+                strcmd.AppendFormat(", {0}", SeparateString(work.CreateDepartmentName));
 
                 strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.EntryDate);
                 strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.UpdateDate);
@@ -301,25 +325,25 @@
                     strcmd.AppendFormat(", {0}", work.SourceCode);
                     strcmd.AppendFormat(", {0}", work.PetitionPeriod);
                     strcmd.AppendFormat(", {0}", work.OrderFlg);
-                    strcmd.AppendFormat(", '{0}'", work.CorporateStatusName);
+                    strcmd.AppendFormat(", {0}", SeparateString(work.CorporateStatusName));
                     strcmd.AppendFormat(", {0}", work.CorporateStatusPoint);
-                    strcmd.AppendFormat(", '{0}'", work.OrderersName1);
-                    strcmd.AppendFormat(", '{0}'", work.OrderersName2);
-                    strcmd.AppendFormat(", '{0}'", work.DepartmentName);
-                    strcmd.AppendFormat(", '{0}'", work.PersonName);
-                    strcmd.AppendFormat(", '{0}'", work.ZipCode);
-                    strcmd.AppendFormat(", '{0}'", work.Address1);
-                    strcmd.AppendFormat(", '{0}'", work.Address2);
-                    strcmd.AppendFormat(", '{0}'", work.Address3);
-                    strcmd.AppendFormat(", '{0}'", work.PhoneNumber);
-                    strcmd.AppendFormat(", '{0}'", work.FaxNumber);
-                    strcmd.AppendFormat(", '{0}'", work.MailAddress);
-                    strcmd.AppendFormat(", '{0}'", work.Note);
+                    strcmd.AppendFormat(",  {0}", SeparateString(work.OrderersName1));
+                    strcmd.AppendFormat(",  {0}", SeparateString(work.OrderersName2));
+                    strcmd.AppendFormat(",  {0}", SeparateString(work.DepartmentName));
+                    strcmd.AppendFormat(",  {0}", SeparateString(work.PersonName));
+                    strcmd.AppendFormat(",  {0}", SeparateString(work.ZipCode));
+                    strcmd.AppendFormat(",  {0}", SeparateString(work.Address1));
+                    strcmd.AppendFormat(",  {0}", SeparateString(work.Address2));
+                    strcmd.AppendFormat(",  {0}", SeparateString(work.Address3));
+                    strcmd.AppendFormat(",  {0}", SeparateString(work.PhoneNumber));
+                    strcmd.AppendFormat(",  {0}", SeparateString(work.FaxNumber));
+                    strcmd.AppendFormat(",  {0}", SeparateString(work.MailAddress));
+                    strcmd.AppendFormat(",  {0}", SeparateString(work.Note));
                     strcmd.AppendFormat(", {0}", work.OrderCotegory);
                     strcmd.AppendFormat(", {0}", work.OrderDate);
                     strcmd.AppendFormat(", {0}", work.OrderNo);
                     strcmd.AppendFormat(", {0}", work.CreateDepartmentCode);
-                    strcmd.AppendFormat(", '{0}'", work.CreateDepartmentName);
+                    strcmd.AppendFormat(", {0}", SeparateString(work.CreateDepartmentName));
 
                     strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.EntryDate);
                     strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.UpdateDate);
@@ -365,25 +389,25 @@
                 strcmd.AppendFormat(", SourceCode = {0}", data.SourceCode);
                 strcmd.AppendFormat(", PetitionPeriod = {0}", data.PetitionPeriod);
                 strcmd.AppendFormat(", OrderFlg = {0}", data.OrderFlg);
-                strcmd.AppendFormat(", CorporateStatusName = '{0}'", data.CorporateStatusName);
+                strcmd.AppendFormat(", CorporateStatusName = {0}", SeparateString(data.CorporateStatusName));
                 strcmd.AppendFormat(", CorporateStatusPoint = {0}", data.CorporateStatusPoint);
-                strcmd.AppendFormat(", OrderersName1 = '{0}'", data.OrderersName1);
-                strcmd.AppendFormat(", OrderersName2 = '{0}'", data.OrderersName2);
-                strcmd.AppendFormat(", DepartmentName = '{0}'", data.DepartmentName);
-                strcmd.AppendFormat(", PersonName = '{0}'", data.PersonName);
-                strcmd.AppendFormat(", ZipCode = '{0}'", data.ZipCode);
-                strcmd.AppendFormat(", Address1 = '{0}'", data.Address1);
-                strcmd.AppendFormat(", Address2 = '{0}'", data.Address2);
-                strcmd.AppendFormat(", Address3 = '{0}'", data.Address3);
-                strcmd.AppendFormat(", PhoneNumber = '{0}'", data.PhoneNumber);
-                strcmd.AppendFormat(", FaxNumber = '{0}'", data.FaxNumber);
-                strcmd.AppendFormat(", MailAddress = '{0}'", data.MailAddress);
-                strcmd.AppendFormat(", Note = '{0}'", data.Note);
+                strcmd.AppendFormat(", OrderersName1 =  {0}", SeparateString(data.OrderersName1));
+                strcmd.AppendFormat(", OrderersName2 =  {0}", SeparateString(data.OrderersName2));
+                strcmd.AppendFormat(", DepartmentName =  {0}", SeparateString(data.DepartmentName));
+                strcmd.AppendFormat(", PersonName =  {0}", SeparateString(data.PersonName));
+                strcmd.AppendFormat(", ZipCode =  {0}", SeparateString(data.ZipCode));
+                strcmd.AppendFormat(", Address1 =  {0}", SeparateString(data.Address1));
+                strcmd.AppendFormat(", Address2 =  {0}", SeparateString(data.Address2));
+                strcmd.AppendFormat(", Address3 =  {0}", SeparateString(data.Address3));
+                strcmd.AppendFormat(", PhoneNumber =  {0}", SeparateString(data.PhoneNumber));
+                strcmd.AppendFormat(", FaxNumber =  {0}", SeparateString(data.FaxNumber));
+                strcmd.AppendFormat(", MailAddress =  {0}", SeparateString(data.MailAddress));
+                strcmd.AppendFormat(", Note =  {0}", SeparateString(data.Note));
                 strcmd.AppendFormat(", OrderCotegory = {0}", data.OrderCotegory);
                 strcmd.AppendFormat(", OrderDate = {0}", data.OrderDate);
                 strcmd.AppendFormat(", OrderNo = {0}", data.OrderNo);
-                strcmd.AppendFormat(", CreateDepartmentCode = '{0}'", data.CreateDepartmentCode);
-                strcmd.AppendFormat(", CreateDepartmentName = '{0}'", data.CreateDepartmentName);
+                strcmd.AppendFormat(", CreateDepartmentCode = {0}", data.CreateDepartmentCode);
+                strcmd.AppendFormat(", CreateDepartmentName = {0}", SeparateString(data.CreateDepartmentName));
 
                 strcmd.Append(", UpdateDate = NOW()");
                 strcmd.Append(AddSQLString);
@@ -467,46 +491,46 @@
                         strcmd.AppendFormat(" OrderFlg = {0}", (int)value);
                         break;
                     case (int)TableColumn.CorporateStatusName:
-                        strcmd.AppendFormat(" CorporateStatusName = '{0}'", value.ToString());
+                        strcmd.AppendFormat(" CorporateStatusName = {0}", SeparateString(value.ToString()));
                         break;
                     case (int)TableColumn.CorporateStatusPoint:
-                        strcmd.AppendFormat(" CorporateStatusPoint = '{0}'", value.ToString());
+                        strcmd.AppendFormat(" CorporateStatusPoint = {0}", (int)value);
                         break;
                     case (int)TableColumn.OrderersName1:
-                        strcmd.AppendFormat(" OrderersName1 = '{0}'", value.ToString());
+                        strcmd.AppendFormat(" OrderersName1 =  {0}", SeparateString(value.ToString()));
                         break;
                     case (int)TableColumn.OrderersName2:
-                        strcmd.AppendFormat(" OrderersName2 = '{0}'", value.ToString());
+                        strcmd.AppendFormat(" OrderersName2 =  {0}", SeparateString(value.ToString()));
                         break;
                     case (int)TableColumn.DepartmentName:
-                        strcmd.AppendFormat(" DepartmentName = '{0}'", value.ToString());
+                        strcmd.AppendFormat(" DepartmentName =  {0}", SeparateString(value.ToString()));
                         break;
                     case (int)TableColumn.PersonName:
-                        strcmd.AppendFormat(" PersonName = '{0}'", value.ToString());
+                        strcmd.AppendFormat(" PersonName =  {0}", SeparateString(value.ToString()));
                         break;
                     case (int)TableColumn.ZipCode:
-                        strcmd.AppendFormat(" ZipCode = '{0}'", value.ToString());
+                        strcmd.AppendFormat(" ZipCode =  {0}", SeparateString(value.ToString()));
                         break;
                     case (int)TableColumn.Address1:
-                        strcmd.AppendFormat(" Address1 = '{0}'", value.ToString());
+                        strcmd.AppendFormat(" Address1 =  {0}", SeparateString(value.ToString()));
                         break;
                     case (int)TableColumn.Address2:
-                        strcmd.AppendFormat(" Address2 = '{0}'", value.ToString());
+                        strcmd.AppendFormat(" Address2 =  {0}", SeparateString(value.ToString()));
                         break;
                     case (int)TableColumn.Address3:
-                        strcmd.AppendFormat(" Address3 = '{0}'", value.ToString());
+                        strcmd.AppendFormat(" Address3 =  {0}", SeparateString(value.ToString()));
                         break;
                     case (int)TableColumn.PhoneNumber:
-                        strcmd.AppendFormat(" PhoneNumber = '{0}'", value.ToString());
+                        strcmd.AppendFormat(" PhoneNumber =  {0}", SeparateString(value.ToString()));
                         break;
                     case (int)TableColumn.FaxNumber:
-                        strcmd.AppendFormat(" FaxNumber = '{0}'", value.ToString());
+                        strcmd.AppendFormat(" FaxNumber =  {0}", SeparateString(value.ToString()));
                         break;
                     case (int)TableColumn.MailAddress:
-                        strcmd.AppendFormat(" MailAddress = '{0}'", value.ToString());
+                        strcmd.AppendFormat(" MailAddress =  {0}", SeparateString(value.ToString()));
                         break;
                     case (int)TableColumn.Note:
-                        strcmd.AppendFormat(" Note = '{0}'", value.ToString());
+                        strcmd.AppendFormat(" Note =  {0}", SeparateString(value.ToString()));
                         break;
                     case (int)TableColumn.OrderCotegory:
                         strcmd.AppendFormat(" OrderCotegory = {0}", (int)value);
Index: trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IODailyDataConstruction.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IODailyDataConstruction.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IODailyDataConstruction.cs	(revision 484)
@@ -34,17 +34,17 @@
         public enum TableColumn
         {
             /// <summary>
-            /// 作成者コード
+            /// 工事番号
             /// </summary>
-            PersonCode,
+            ConstructionCode,
             /// <summary>
             /// 日報作成日
             /// </summary>
             DailyDataDate,
             /// <summary>
-            /// 工事番号
+            /// 作成者コード
             /// </summary>
-            ConstructionCode,
+            PersonCode,
             /// <summary>
             /// 天気
             /// </summary>
@@ -78,16 +78,30 @@
         /// </summary>
         private string CreateSelectSQL()
         {
-            // SQL作成（DateTime型が変換できないのでCharに変換しておく）
             StringBuilder strcmd = new StringBuilder();
-            strcmd.Append("SELECT");
+            strcmd.Append("SELECT ");
 
-            strcmd.Append("  PersonCode");                                       // 担当者コード
-            strcmd.Append(", DATE_FORMAT(DailyDataDate, '%Y/%m/%d')");             // 日報作成日
-            strcmd.Append(", ConstructionCode");                                 // 工事番号
-            strcmd.Append(", Weather");                                          // 天気
-            strcmd.Append(", DATE_FORMAT(EntryDate, '%Y/%m/%d %H:%i:%s')");      // 登録年月日
-            strcmd.Append(", DATE_FORMAT(UpdateDate, '%Y/%m/%d %H:%i:%s')");     // 更新年月日
+            bool bColFirst = true;
+            string strWork = string.Empty;
+            foreach (var gender in Enum.GetValues(typeof(TableColumn)))
+            {
+                strWork = gender.ToString();
+                if (!bColFirst) strcmd.Append(",");
+                if (strWork.Equals("EntryDate") || strWork.Equals("UpdateDate"))
+                {
+                    strcmd.AppendFormat(" DATE_FORMAT({0}, '%Y/%m/%d %H:%i:%s')", strWork);
+                }
+                else if (strWork.Equals("DailyDataDate"))
+                {
+                    strcmd.AppendFormat(" DATE_FORMAT({0}, '%Y/%m/%d')", strWork);
+                }
+                else
+                {
+                    strcmd.AppendFormat(" {0}", strWork);
+                }
+                bColFirst = false;
+            }
+
             strcmd.Append(" FROM DailyDataConstruction");
 
             return strcmd.ToString();
@@ -183,11 +197,11 @@
                 }
                 strcmd.Append(") VALUES (");
 
-                strcmd.AppendFormat("  {0}", work.PersonCode);                      // 担当者コード
+                strcmd.AppendFormat(" {0}", work.ConstructionCode);                 // 工事番号
                 strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d')"
                                             , work.DailyDataDate.ToShortDateString());  // 日報作成日
-                strcmd.AppendFormat(", {0}", work.ConstructionCode);                // 工事番号
-                strcmd.AppendFormat(",'{0}'", work.Weather);                        // 天気
+                strcmd.AppendFormat(", {0}", work.PersonCode);                      // 担当者コード
+                strcmd.AppendFormat(", {0}", SeparateString(work.Weather));         // 天気
 
                 strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.EntryDate);
                 strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.UpdateDate);
@@ -228,11 +242,11 @@
                     if (bDataFirst) strcmd.Append(" (");
                     else strcmd.Append(", (");
 
-                    strcmd.AppendFormat("  {0}", work.PersonCode);                      // 担当者コード
+                    strcmd.AppendFormat("  {0}", work.ConstructionCode);                // 工事番号
                     strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d')"
                                                 , work.DailyDataDate.ToShortDateString());  // 日報作成日
-                    strcmd.AppendFormat(", {0}", work.ConstructionCode);                // 工事番号
-                    strcmd.AppendFormat(",'{0}'", work.Weather);                        // 天気
+                    strcmd.AppendFormat(", {0}", work.PersonCode);                      // 担当者コード
+                    strcmd.AppendFormat(", {0}", SeparateString(work.Weather));         // 天気
 
                     strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.EntryDate);
                     strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.UpdateDate);
@@ -270,11 +284,11 @@
 
                 strcmd.Append(" SET");
 
-                strcmd.AppendFormat(" PersonCode = {0}", data.PersonCode);                  // 担当者コード
+                strcmd.AppendFormat(" ConstructionCode = {0}", data.ConstructionCode);      // 工事番号
                 strcmd.AppendFormat(",DailyDataDate = DATE_FORMAT('{0}','%Y/%m/%d')"
-                                        , data.DailyDataDate.ToShortDateString());              // 日報作成日
-                strcmd.AppendFormat(",ConstructionCode = {0}", data.ConstructionCode);      // 工事番号
-                strcmd.AppendFormat(",Weather = '{0}'", data.Weather);                      // 天気
+                                        , data.DailyDataDate.ToShortDateString());          // 日報作成日
+                strcmd.AppendFormat(",PersonCode = {0}", data.PersonCode);                  // 担当者コード
+                strcmd.AppendFormat(",Weather = {0}", SeparateString(data.Weather));        // 天気
 
                 strcmd.Append(", UpdateDate = NOW()");
                 strcmd.Append(AddSQLString);
@@ -300,7 +314,7 @@
         /// <param name="value"></param>
         /// <param name="bConnect"></param>
         /// <returns></returns>
-        public bool UpdateFeild(int PersonCode, DateTime DailyDataDate, int ConstructionCode, int FeildNo, object value, bool bConnect = true)
+        public bool UpdateFeild(int ConstructionCode, DateTime DailyDataDate, int PersonCode, int FeildNo, object value, bool bConnect = true)
         {
             StringBuilder strcmd = new StringBuilder();
             try
@@ -310,22 +324,22 @@
                 strcmd.Append(" SET");
                 switch (FeildNo)
                 {
-                    case (int)TableColumn.PersonCode:
-                        strcmd.AppendFormat(" PersonCode = {0}", ((int)value).ToString());
+                    case (int)TableColumn.ConstructionCode:
+                        strcmd.AppendFormat(" ConstructionCode = {0}", ((int)value).ToString());
                         break;
                     case (int)TableColumn.DailyDataDate:
                         strcmd.AppendFormat(" DailyDataDate = STR_TO_DATE('{0}','%Y/%m/%d')", ((DateTime)value).ToShortDateString());
                         break;
-                    case (int)TableColumn.ConstructionCode:
-                        strcmd.AppendFormat(" ConstructionCode = {0}", ((int)value).ToString());
+                    case (int)TableColumn.PersonCode:
+                        strcmd.AppendFormat(" PersonCode = {0}", ((int)value).ToString());
                         break;
                     case (int)TableColumn.Weather:
-                        strcmd.AppendFormat(" Weather = '{0}'", value.ToString());
+                        strcmd.AppendFormat(" Weather = {0}", SeparateString(value.ToString()));
                         break;
                 }
 
                 strcmd.Append(", UpdateDate = NOW()");
-                strcmd.Append(CreatePrimarykeyString(PersonCode, DailyDataDate, ConstructionCode));
+                strcmd.Append(CreatePrimarykeyString(ConstructionCode, DailyDataDate, PersonCode));
 
                 if (!ExecuteNonQuery(strcmd.ToString(), bConnect)) return false;
 
@@ -377,9 +391,9 @@
             try
             {
                 // データ取得
+                wrk.ConstructionCode = int.Parse(objwrk[(int)TableColumn.ConstructionCode].ToString());     // 工事番号
+                wrk.DailyDataDate = DateTime.Parse(objwrk[(int)TableColumn.DailyDataDate].ToString());      // 日報作成日
                 wrk.PersonCode = int.Parse(objwrk[(int)TableColumn.PersonCode].ToString());                 // 担当者コード
-                wrk.DailyDataDate = DateTime.Parse(objwrk[(int)TableColumn.DailyDataDate].ToString());      // 日報作成日
-                wrk.ConstructionCode = int.Parse(objwrk[(int)TableColumn.ConstructionCode].ToString());     // 工事番号
                 wrk.Weather = objwrk[(int)TableColumn.Weather].ToString();                                  // 天気
 
                 wrk.EntryDate = DateTime.Parse(objwrk[(int)TableColumn.EntryDate].ToString());
@@ -405,16 +419,17 @@
         /// <param name="DataType"></param>
         /// <param name="DataAddCount"></param>
         /// <returns></returns>
-        public string CreatePrimarykeyString(int PersonCode, DateTime DailyDataDate, int ConstructionCode)
+        public string CreatePrimarykeyString(int ConstructionCode, DateTime DailyDataDate, int PersonCode = 0)
         {
             StringBuilder strWork = new StringBuilder();
             try
             {
-                strWork.AppendFormat(" WHERE PersonCode = {0}", PersonCode);
+                strWork.Append(" WHERE");
+                strWork.AppendFormat(" ConstructionCode = {0}", ConstructionCode);
                 if (DailyDataDate != DateTime.MinValue)
                     strWork.AppendFormat(" AND DailyDataDate = STR_TO_DATE('{0}','%Y/%m/%d')", DailyDataDate.ToShortDateString());
-                if (ConstructionCode != 0)
-                    strWork.AppendFormat(" AND ConstructionCode = {0}", ConstructionCode);
+                if (PersonCode > 0)
+                    strWork.AppendFormat(" And PersonCode = {0}", PersonCode);
 
                 return strWork.ToString();
             }
Index: trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IODailyDataDetail.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IODailyDataDetail.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IODailyDataDetail.cs	(revision 484)
@@ -34,17 +34,17 @@
         public enum TableColumn
         {
             /// <summary>
-            /// 作成者コード
+            /// 工事番号
             /// </summary>
-            PersonCode,
+            ConstructionCode,
             /// <summary>
             /// 日報作成日
             /// </summary>
             DailyDataDate,
             /// <summary>
-            /// 工事番号
+            /// 作成者コード
             /// </summary>
-            ConstructionCode,
+            PersonCode,
             /// <summary>
             /// 明細行番号
             /// </summary>
@@ -106,23 +106,30 @@
         /// </summary>
         private string CreateSelectSQL()
         {
-            // SQL作成（DateTime型が変換できないのでCharに変換しておく）
             StringBuilder strcmd = new StringBuilder();
-            strcmd.Append("SELECT");
+            strcmd.Append("SELECT ");
 
-            strcmd.Append("  PersonCode");                                      // 担当者コード
-            strcmd.Append(", DATE_FORMAT(DailyDataDate, '%Y/%m/%d')");          // 日報作成日
-            strcmd.Append(", ConstructionCode");                                // 工事番号
-            strcmd.Append(", SeqNo");                                           // 明細行番号
-            strcmd.Append(", JobCategoryCode");                                 // 職種キー
-            strcmd.Append(", CompanyCode");                                     // 協力会社コード
-            strcmd.Append(", TodayHeadCount");                                  // 当日人員数
-            strcmd.Append(", TotalHeadCount");                                  // 累計人員数
-            strcmd.Append(", TodayWork");                                       // 当日作業内容
-            strcmd.Append(", NextdayWork");                                     // 翌日作業内容
-            strcmd.Append(", NextdayHeadCount");                                // 翌日人員数
-            strcmd.Append(", DATE_FORMAT(EntryDate, '%Y/%m/%d %H:%i:%s')");     // 登録年月日
-            strcmd.Append(", DATE_FORMAT(UpdateDate, '%Y/%m/%d %H:%i:%s')");    // 更新年月日
+            bool bColFirst = true;
+            string strWork = string.Empty;
+            foreach (var gender in Enum.GetValues(typeof(TableColumn)))
+            {
+                strWork = gender.ToString();
+                if (!bColFirst) strcmd.Append(",");
+                if (strWork.Equals("EntryDate") || strWork.Equals("UpdateDate"))
+                {
+                    strcmd.AppendFormat(" DATE_FORMAT({0}, '%Y/%m/%d %H:%i:%s')", strWork);
+                }
+                else if (strWork.Equals("DailyDataDate"))
+                {
+                    strcmd.AppendFormat(" DATE_FORMAT({0}, '%Y/%m/%d')", strWork);
+                }
+                else
+                {
+                    strcmd.AppendFormat(" {0}", strWork);
+                }
+                bColFirst = false;
+            }
+
             strcmd.Append(" FROM DailyDataDetail");
 
             return strcmd.ToString();
@@ -218,17 +225,17 @@
                 }
                 strcmd.Append(") VALUES (");
 
-                strcmd.AppendFormat("  {0}", work.PersonCode);                      // 担当者コード
+                strcmd.AppendFormat("  {0}", work.ConstructionCode);                // 工事番号
                 strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d')"
                                             , work.DailyDataDate.ToShortDateString());  // 日報作成日
-                strcmd.AppendFormat(", {0}", work.ConstructionCode);                // 工事番号
+                strcmd.AppendFormat(", {0}", work.PersonCode);                      // 担当者コード
                 strcmd.AppendFormat(", {0}", work.SeqNo);                           // 明細行番号
                 strcmd.AppendFormat(", {0}", work.JobCategoryCode);                 // 職種キー
                 strcmd.AppendFormat(", {0}", work.CompanyCode);                     // 協力会社コード
                 strcmd.AppendFormat(", {0}", work.TodayHeadCount);                  // 当日人員数
                 strcmd.AppendFormat(", {0}", work.TotalHeadCount);                  // 累計人員数
-                strcmd.AppendFormat(",'{0}'", work.TodayWork);                      // 当日作業内容
-                strcmd.AppendFormat(",'{0}'", work.NextdayWork);                    // 翌日作業内容
+                strcmd.AppendFormat(", {0}", SeparateString(work.TodayWork));       // 当日作業内容
+                strcmd.AppendFormat(", {0}", SeparateString(work.NextdayWork));     // 翌日作業内容
                 strcmd.AppendFormat(", {0}", work.NextdayHeadCount);                // 翌日人員数
 
                 strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.EntryDate);
@@ -270,17 +277,17 @@
                     if (bDataFirst) strcmd.Append(" (");
                     else strcmd.Append(", (");
 
-                    strcmd.AppendFormat("  {0}", work.PersonCode);                      // 担当者コード
+                    strcmd.AppendFormat("  {0}", work.ConstructionCode);                // 工事番号
                     strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d')"
                                                 , work.DailyDataDate.ToShortDateString());  // 日報作成日
-                    strcmd.AppendFormat(", {0}", work.ConstructionCode);                // 工事番号
+                    strcmd.AppendFormat(", {0}", work.PersonCode);                      // 担当者コード
                     strcmd.AppendFormat(", {0}", work.SeqNo);                           // 明細行番号
                     strcmd.AppendFormat(", {0}", work.JobCategoryCode);                 // 職種キー
                     strcmd.AppendFormat(", {0}", work.CompanyCode);                     // 協力会社コード
                     strcmd.AppendFormat(", {0}", work.TodayHeadCount);                  // 当日人員数
                     strcmd.AppendFormat(", {0}", work.TotalHeadCount);                  // 累計人員数
-                    strcmd.AppendFormat(",'{0}'", work.TodayWork);                      // 当日作業内容
-                    strcmd.AppendFormat(",'{0}'", work.NextdayWork);                    // 翌日作業内容
+                    strcmd.AppendFormat(", {0}", SeparateString(work.TodayWork));       // 当日作業内容
+                    strcmd.AppendFormat(", {0}", SeparateString(work.NextdayWork));     // 翌日作業内容
                     strcmd.AppendFormat(", {0}", work.NextdayHeadCount);                // 翌日人員数
 
                     strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.EntryDate);
@@ -319,17 +326,17 @@
 
                 strcmd.Append(" SET");
 
-                strcmd.AppendFormat(" PersonCode = {0}", data.PersonCode);                  // 担当者コード
+                strcmd.AppendFormat(" ConstructionCode = {0}", data.ConstructionCode);      // 工事番号
                 strcmd.AppendFormat(",DailyDataDate = STR_TO_DATE('{0}','%Y/%m/%d')"
                                         , data.DailyDataDate.ToShortDateString());              // 日報作成日
-                strcmd.AppendFormat(",ConstructionCode = {0}", data.ConstructionCode);      // 工事番号
+                strcmd.AppendFormat(",PersonCode = {0}", data.PersonCode);                  // 担当者コード
                 strcmd.AppendFormat(",SeqNo =  {0} ", data.SeqNo);                          // 明細行番号
                 strcmd.AppendFormat(",JobCategoryCode =  {0} ", data.JobCategoryCode);      // 職種キー
                 strcmd.AppendFormat(",CompanyCode =  {0} ", data.CompanyCode);              // 協力会社コード
                 strcmd.AppendFormat(",TodayHeadCount =  {0} ", data.TodayHeadCount);        // 当日人員数
                 strcmd.AppendFormat(",TotalHeadCount =  {0} ", data.TotalHeadCount);        // 累計人員数
-                strcmd.AppendFormat(",TodayWork = '{0}'", data.TodayWork);                  // 当日作業内容
-                strcmd.AppendFormat(",NextdayWork = '{0}'", data.NextdayWork);              // 翌日作業内容
+                strcmd.AppendFormat(",TodayWork = {0}", SeparateString(data.TodayWork));    // 当日作業内容
+                strcmd.AppendFormat(",NextdayWork = {0}", SeparateString(data.NextdayWork));    // 翌日作業内容
                 strcmd.AppendFormat(",NextdayHeadCount =  {0} ", data.NextdayHeadCount);    // 翌日人員数
 
                 strcmd.Append(", UpdateDate = NOW()");
@@ -383,7 +390,7 @@
         /// <param name="value"></param>
         /// <param name="bConnect"></param>
         /// <returns></returns>
-        public bool UpdateFeild(int PersonCode, DateTime DailyDataDate, int ConstructionCode, int SeqNo, int FeildNo, object value, bool bConnect = true)
+        public bool UpdateFeild(int ConstructionCode, DateTime DailyDataDate, int PersonCode, int SeqNo, int FeildNo, object value, bool bConnect = true)
         {
             StringBuilder strcmd = new StringBuilder();
             try
@@ -393,14 +400,14 @@
                 strcmd.Append(" SET");
                 switch (FeildNo)
                 {
-                    case (int)TableColumn.PersonCode:
-                        strcmd.AppendFormat(" PersonCode = {0}", (int)value);
+                    case (int)TableColumn.ConstructionCode:
+                        strcmd.AppendFormat(" ConstructionCode = {0}", (int)value);
                         break;
                     case (int)TableColumn.DailyDataDate:
                         strcmd.AppendFormat(" DailyDataDate = STR_TO_DATE('{0}','%Y/%m/%d')", ((DateTime)value).ToShortDateString());
                         break;
-                    case (int)TableColumn.ConstructionCode:
-                        strcmd.AppendFormat(" ConstructionCode = {0}", (int)value);
+                    case (int)TableColumn.PersonCode:
+                        strcmd.AppendFormat(" PersonCode = {0}", (int)value);
                         break;
                     case (int)TableColumn.SeqNo:
                         strcmd.AppendFormat(" SeqNo = {0}", (int)value);
@@ -418,10 +425,10 @@
                         strcmd.AppendFormat(" TotalHeadCount = {0}", (double)value);
                         break;
                     case (int)TableColumn.TodayWork:
-                        strcmd.AppendFormat(" TodayWork = '{0}'", CommonMotions.cnvString(value));
+                        strcmd.AppendFormat(" TodayWork = {0}", SeparateString(CommonMotions.cnvString(value)));
                         break;
                     case (int)TableColumn.NextdayWork:
-                        strcmd.AppendFormat(" NextdayWork = '{0}'", CommonMotions.cnvString(value));
+                        strcmd.AppendFormat(" NextdayWork = {0}", SeparateString(CommonMotions.cnvString(value)));
                         break;
                     case (int)TableColumn.NextdayHeadCount:
                         strcmd.AppendFormat(" NextdayHeadCount = {0}", (double)value);
@@ -429,7 +436,7 @@
                 }
 
                 strcmd.Append(", UpdateDate = NOW()");
-                strcmd.Append(CreatePrimarykeyString(PersonCode, DailyDataDate, ConstructionCode, SeqNo));
+                strcmd.Append(CreatePrimarykeyString(ConstructionCode, DailyDataDate, PersonCode, SeqNo));
 
                 if (!ExecuteNonQuery(strcmd.ToString(), bConnect)) return false;
 
@@ -454,9 +461,9 @@
             try
             {
                 // データ取得
+                wrk.ConstructionCode = int.Parse(objwrk[(int)TableColumn.ConstructionCode].ToString());      // 工事番号
+                wrk.DailyDataDate = DateTime.Parse(objwrk[(int)TableColumn.DailyDataDate].ToString());       // 日報作成日
                 wrk.PersonCode = int.Parse(objwrk[(int)TableColumn.PersonCode].ToString());                  // 担当者コード
-                wrk.DailyDataDate = DateTime.Parse(objwrk[(int)TableColumn.DailyDataDate].ToString());       // 日報作成日
-                wrk.ConstructionCode = int.Parse(objwrk[(int)TableColumn.ConstructionCode].ToString());      // 工事番号
                 wrk.SeqNo = int.Parse(objwrk[(int)TableColumn.SeqNo].ToString());                            // 明細行番号
                 wrk.JobCategoryCode = int.Parse(objwrk[(int)TableColumn.JobCategoryCode].ToString());        // 職種キー
                 wrk.CompanyCode = int.Parse(objwrk[(int)TableColumn.CompanyCode].ToString());                // 協力会社コード
@@ -484,21 +491,18 @@
         /// <summary>
         /// 主キー検索の文字列を返す
         /// </summary>
-        /// <param name="PersonCode"></param>
-        /// <param name="ActionDate"></param>
-        /// <param name="DataType"></param>
-        /// <param name="DataAddCount"></param>
         /// <returns></returns>
-        public string CreatePrimarykeyString(int PersonCode, DateTime DailyDataDate, int ConstructionCode = 0, int SeqNo = 0)
+        public string CreatePrimarykeyString(int ConstructionCode, DateTime DailyDataDate, int PersonCode = 0, int SeqNo = 0)
         {
             StringBuilder strWork = new StringBuilder();
             try
             {
-                strWork.AppendFormat(" WHERE PersonCode = {0}", PersonCode);
+                strWork.Append(" WHERE");
+                strWork.AppendFormat(" ConstructionCode = {0}", ConstructionCode);
                 if (DailyDataDate != DateTime.MinValue)
                     strWork.AppendFormat(" AND DailyDataDate = STR_TO_DATE('{0}','%Y/%m/%d')", DailyDataDate.ToShortDateString());
-                if (ConstructionCode != 0)
-                    strWork.AppendFormat(" AND ConstructionCode = {0}", ConstructionCode);
+                if (PersonCode != 0)
+                    strWork.AppendFormat(" And PersonCode = {0}", PersonCode);
                 if (SeqNo != 0)
                     strWork.AppendFormat(" AND SeqNo = {0}", SeqNo);
 
Index: trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IODailyDataField.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IODailyDataField.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IODailyDataField.cs	(revision 484)
@@ -34,17 +34,17 @@
         public enum TableColumn
         {
             /// <summary>
-            /// 作成者コード
+            /// 工事番号
             /// </summary>
-            PersonCode,
+            ConstructionCode,
             /// <summary>
             /// 日報作成日
             /// </summary>
             DailyDataDate,
             /// <summary>
-            /// 工事番号
+            /// 作成者コード
             /// </summary>
-            ConstructionCode,
+            PersonCode,
             /// <summary>
             /// 明細行番号
             /// </summary>
@@ -86,20 +86,30 @@
         /// </summary>
         private string CreateSelectSQL()
         {
-            // SQL作成（DateTime型が変換できないのでCharに変換しておく）
             StringBuilder strcmd = new StringBuilder();
-            strcmd.Append("SELECT");
+            strcmd.Append("SELECT ");
 
-            strcmd.Append("  PersonCode");                                      // 担当者コード
-            strcmd.Append(", DATE_FORMAT(DailyDataDate, '%Y/%m/%d')");          // 日報作成日
-            strcmd.Append(", ConstructionCode");                                // 工事番号
-            strcmd.Append(", SeqNo");                                           // 明細行番号
+            bool bColFirst = true;
+            string strWork = string.Empty;
+            foreach (var gender in Enum.GetValues(typeof(TableColumn)))
+            {
+                strWork = gender.ToString();
+                if (!bColFirst) strcmd.Append(",");
+                if (strWork.Equals("PatrolTime") || strWork.Equals("EntryDate") || strWork.Equals("UpdateDate"))
+                {
+                    strcmd.AppendFormat(" DATE_FORMAT({0}, '%Y/%m/%d %H:%i:%s')", strWork);
+                }
+                else if (strWork.Equals("DailyDataDate"))
+                {
+                    strcmd.AppendFormat(" DATE_FORMAT({0}, '%Y/%m/%d')", strWork);
+                }
+                else
+                {
+                    strcmd.AppendFormat(" {0}", strWork);
+                }
+                bColFirst = false;
+            }
 
-            strcmd.Append(", DATE_FORMAT(PatrolTime, '%Y/%m/%d %H:%i:%s')");    // 巡回時間
-            strcmd.Append(", ContentsText");                                    // 内容
-
-            strcmd.Append(", DATE_FORMAT(EntryDate, '%Y/%m/%d %H:%i:%s')");     // 登録年月日
-            strcmd.Append(", DATE_FORMAT(UpdateDate, '%Y/%m/%d %H:%i:%s')");    // 更新年月日
             strcmd.Append(" FROM DailyDataField");
 
             return strcmd.ToString();
@@ -196,15 +206,15 @@
                 }
                 strcmd.Append(") VALUES (");
 
-                strcmd.AppendFormat("  {0}", work.PersonCode);                      // 担当者コード
+                strcmd.AppendFormat("  {0}", work.ConstructionCode);                // 工事番号
                 strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d')"
                                             , work.DailyDataDate.ToShortDateString());  // 日報作成日
-                strcmd.AppendFormat(", {0}", work.ConstructionCode);                // 工事番号
+                strcmd.AppendFormat(", {0}", work.PersonCode);                      // 担当者コード
                 strcmd.AppendFormat(", {0}", work.SeqNo);                           // 明細行番号
 
                 strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')"
                                             , work.PatrolTime.ToString());              // 巡回時間
-                strcmd.AppendFormat(",'{0}'", work.ContentsText);                   // 内容
+                strcmd.AppendFormat(",{0}", SeparateString(work.ContentsText));         // 内容
 
                 strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.EntryDate);
                 strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.UpdateDate);
@@ -245,15 +255,15 @@
                     if (bDataFirst) strcmd.Append(" (");
                     else strcmd.Append(", (");
 
-                    strcmd.AppendFormat("  {0}", work.PersonCode);                      // 担当者コード
+                    strcmd.AppendFormat("  {0}", work.ConstructionCode);                // 工事番号
                     strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d')"
                                                 , work.DailyDataDate.ToShortDateString());  // 日報作成日
-                    strcmd.AppendFormat(", {0}", work.ConstructionCode);                // 工事番号
+                    strcmd.AppendFormat(", {0}", work.PersonCode);                      // 担当者コード
                     strcmd.AppendFormat(", {0}", work.SeqNo);                           // 明細行番号
 
                     strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')"
                                                 , work.PatrolTime.ToString());              // 巡回時間
-                    strcmd.AppendFormat(",'{0}'", work.ContentsText);                   // 内容
+                    strcmd.AppendFormat(", {0}", SeparateString(work.ContentsText));        // 内容
 
                     strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.EntryDate);
                     strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.UpdateDate);
@@ -291,15 +301,15 @@
 
                 strcmd.Append(" SET");
 
-                strcmd.AppendFormat(" PersonCode = {0}", data.PersonCode);                  // 担当者コード
+                strcmd.AppendFormat(" ConstructionCode = {0}", data.ConstructionCode);      // 工事番号
                 strcmd.AppendFormat(",DailyDataDate = STR_TO_DATE('{0}','%Y/%m/%d')"
                                         , data.DailyDataDate.ToShortDateString());              // 日報作成日
-                strcmd.AppendFormat(",ConstructionCode = {0}", data.ConstructionCode);      // 工事番号
+                strcmd.AppendFormat(",PersonCode = {0}", data.PersonCode);                  // 担当者コード
                 strcmd.AppendFormat(",SeqNo =  {0} ", data.SeqNo);                          // 明細行番号
 
                 strcmd.AppendFormat(",PatrolTime = STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')"
                                         , data.PatrolTime.ToShortDateString());                 // 巡回時間
-                strcmd.AppendFormat(",ContentsText = '{0}'", data.ContentsText);            // 内容
+                strcmd.AppendFormat(",ContentsText = {0}", SeparateString(data.ContentsText));  // 内容
 
                 strcmd.Append(", UpdateDate = NOW()");
                 strcmd.Append(AddSQLString);
@@ -354,9 +364,9 @@
             try
             {
                 // データ取得
+                wrk.ConstructionCode = int.Parse(objwrk[(int)TableColumn.ConstructionCode].ToString());      // 工事番号
+                wrk.DailyDataDate = DateTime.Parse(objwrk[(int)TableColumn.DailyDataDate].ToString());       // 日報作成日
                 wrk.PersonCode = int.Parse(objwrk[(int)TableColumn.PersonCode].ToString());                  // 担当者コード
-                wrk.DailyDataDate = DateTime.Parse(objwrk[(int)TableColumn.DailyDataDate].ToString());       // 日報作成日
-                wrk.ConstructionCode = int.Parse(objwrk[(int)TableColumn.ConstructionCode].ToString());      // 工事番号
                 wrk.SeqNo = int.Parse(objwrk[(int)TableColumn.SeqNo].ToString());                            // 明細行番号
 
                 wrk.PatrolTime =  DateTime.Parse(objwrk[(int)TableColumn.PatrolTime].ToString());            // 巡回時間
@@ -380,21 +390,18 @@
         /// <summary>
         /// 主キー検索の文字列を返す
         /// </summary>
-        /// <param name="PersonCode"></param>
-        /// <param name="ActionDate"></param>
-        /// <param name="DataType"></param>
-        /// <param name="DataAddCount"></param>
         /// <returns></returns>
-        public string CreatePrimarykeyString(int PersonCode, DateTime DailyDataDetailDate, int ConstructionCode, int SeqNo)
+        public string CreatePrimarykeyString(int ConstructionCode, DateTime DailyDataDetailDate, int PersonCode = 0, int SeqNo = 0)
         {
             StringBuilder strWork = new StringBuilder();
             try
             {
-                strWork.AppendFormat(" WHERE PersonCode = {0}", PersonCode);
+                strWork.Append(" WHERE");
+                    strWork.AppendFormat(" ConstructionCode = {0}", ConstructionCode);
                 if (DailyDataDetailDate != DateTime.MinValue)
                     strWork.AppendFormat(" AND DailyDataDate = STR_TO_DATE('{0}','%Y/%m/%d')", DailyDataDetailDate.ToShortDateString());
-                if (ConstructionCode != 0)
-                    strWork.AppendFormat(" AND ConstructionCode = {0}", ConstructionCode);
+                if (PersonCode != 0)
+                    strWork.AppendFormat(" And PersonCode = {0}", PersonCode);
                 if (SeqNo != 0)
                     strWork.AppendFormat(" AND SeqNo = {0}", SeqNo);
 
Index: trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IODailyDataMaterials.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IODailyDataMaterials.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IODailyDataMaterials.cs	(revision 484)
@@ -34,17 +34,17 @@
         public enum TableColumn
         {
             /// <summary>
-            /// 作成者コード
+            /// 工事番号
             /// </summary>
-            PersonCode,
+            ConstructionCode,
             /// <summary>
             /// 日報作成日
             /// </summary>
             DailyDataDate,
             /// <summary>
-            /// 工事番号
+            /// 作成者コード
             /// </summary>
-            ConstructionCode,
+            PersonCode,
             /// <summary>
             /// 明細行番号
             /// </summary>
@@ -98,23 +98,30 @@
         /// </summary>
         private string CreateSelectSQL()
         {
-            // SQL作成（DateTime型が変換できないのでCharに変換しておく）
             StringBuilder strcmd = new StringBuilder();
-            strcmd.Append("SELECT");
+            strcmd.Append("SELECT ");
 
-            strcmd.Append("  PersonCode");                                      // 担当者コード
-            strcmd.Append(", DATE_FORMAT(DailyDataDate, '%Y/%m/%d')");          // 日報作成日
-            strcmd.Append(", ConstructionCode");                                // 工事番号
-            strcmd.Append(", SeqNo");                                           // 明細行番号
+            bool bColFirst = true;
+            string strWork = string.Empty;
+            foreach (var gender in Enum.GetValues(typeof(TableColumn)))
+            {
+                strWork = gender.ToString();
+                if (!bColFirst) strcmd.Append(",");
+                if (strWork.Equals("EntryDate") || strWork.Equals("UpdateDate"))
+                {
+                    strcmd.AppendFormat(" DATE_FORMAT({0}, '%Y/%m/%d %H:%i:%s')", strWork);
+                }
+                else if (strWork.Equals("DailyDataDate"))
+                {
+                    strcmd.AppendFormat(" DATE_FORMAT({0}, '%Y/%m/%d')", strWork);
+                }
+                else
+                {
+                    strcmd.AppendFormat(" {0}", strWork);
+                }
+                bColFirst = false;
+            }
 
-            strcmd.Append(", Materials");                                       // 資材名
-            strcmd.Append(", Quantity");                                        // 数量
-            strcmd.Append(", Production");                                      // 制作会社
-            strcmd.Append(", Delivery");                                        // 納入業者
-            strcmd.Append(", QualityControl");                                  // 品質管理事項
-
-            strcmd.Append(", DATE_FORMAT(EntryDate, '%Y/%m/%d %H:%i:%s')");     // 登録年月日
-            strcmd.Append(", DATE_FORMAT(UpdateDate, '%Y/%m/%d %H:%i:%s')");    // 更新年月日
             strcmd.Append(" FROM DailyDataMaterials");
 
             return strcmd.ToString();
@@ -210,16 +217,16 @@
                 }
                 strcmd.Append(") VALUES (");
 
-                strcmd.AppendFormat("  {0}", work.PersonCode);                      // 担当者コード
+                strcmd.AppendFormat("  {0}", work.ConstructionCode);                // 工事番号
                 strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d')"
                                             , work.DailyDataDate.ToShortDateString());  // 日報作成日
-                strcmd.AppendFormat(", {0}", work.ConstructionCode);                // 工事番号
+                strcmd.AppendFormat(", {0}", work.PersonCode);                      // 担当者コード
                 strcmd.AppendFormat(", {0}", work.SeqNo);                           // 明細行番号
-                strcmd.AppendFormat(",'{0}'", work.Materials);                      // 資材名
-                strcmd.AppendFormat(",'{0}'", work.Quantity);                       // 数量
-                strcmd.AppendFormat(",'{0}'", work.Production);                     // 制作会社
-                strcmd.AppendFormat(",'{0}'", work.Delivery);                       // 納入業者
-                strcmd.AppendFormat(",'{0}'", work.QualityControl);                 // 品質管理事項
+                strcmd.AppendFormat(", {0}", SeparateString(work.Materials));       // 資材名
+                strcmd.AppendFormat(", {0}", SeparateString(work.Quantity));        // 数量
+                strcmd.AppendFormat(", {0}", SeparateString(work.Production));      // 制作会社
+                strcmd.AppendFormat(", {0}", SeparateString(work.Delivery));        // 納入業者
+                strcmd.AppendFormat(", {0}", SeparateString(work.QualityControl));  // 品質管理事項
 
                 strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.EntryDate);
                 strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.UpdateDate);
@@ -260,16 +267,16 @@
                     if (bDataFirst) strcmd.Append(" (");
                     else strcmd.Append(", (");
 
-                    strcmd.AppendFormat("  {0}", work.PersonCode);                      // 担当者コード
+                    strcmd.AppendFormat("  {0}", work.ConstructionCode);                // 工事番号
                     strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d')"
                                                 , work.DailyDataDate.ToShortDateString());  // 日報作成日
-                    strcmd.AppendFormat(", {0}", work.ConstructionCode);                // 工事番号
+                    strcmd.AppendFormat(", {0}", work.PersonCode);                      // 担当者コード
                     strcmd.AppendFormat(", {0}", work.SeqNo);                           // 明細行番号
-                    strcmd.AppendFormat(",'{0}'", work.Materials);                      // 資材名
-                    strcmd.AppendFormat(",'{0}'", work.Quantity);                       // 数量
-                    strcmd.AppendFormat(",'{0}'", work.Production);                     // 制作会社
-                    strcmd.AppendFormat(",'{0}'", work.Delivery);                       // 納入業者
-                    strcmd.AppendFormat(",'{0}'", work.QualityControl);                 // 品質管理事項
+                    strcmd.AppendFormat(", {0}", SeparateString(work.Materials));       // 資材名
+                    strcmd.AppendFormat(", {0}", SeparateString(work.Quantity));        // 数量
+                    strcmd.AppendFormat(", {0}", SeparateString(work.Production));      // 制作会社
+                    strcmd.AppendFormat(", {0}", SeparateString(work.Delivery));        // 納入業者
+                    strcmd.AppendFormat(", {0}", SeparateString(work.QualityControl));  // 品質管理事項
 
                     strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.EntryDate);
                     strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.UpdateDate);
@@ -307,17 +314,17 @@
 
                 strcmd.Append(" SET");
 
-                strcmd.AppendFormat(" PersonCode = {0}", data.PersonCode);                  // 担当者コード
+                strcmd.AppendFormat(" ConstructionCode = {0}", data.ConstructionCode);              // 工事番号
                 strcmd.AppendFormat(",DailyDataDate = STR_TO_DATE('{0}','%Y/%m/%d')"
-                                        , data.DailyDataDate.ToShortDateString());              // 日報作成日
-                strcmd.AppendFormat(",ConstructionCode = {0}", data.ConstructionCode);      // 工事番号
-                strcmd.AppendFormat(",SeqNo =  {0} ", data.SeqNo);                          // 明細行番号
+                                        , data.DailyDataDate.ToShortDateString());                  // 日報作成日
+                strcmd.AppendFormat(",PersonCode = {0}", data.PersonCode);                          // 担当者コード
+                strcmd.AppendFormat(",SeqNo =  {0} ", data.SeqNo);                                  // 明細行番号
 
-                strcmd.AppendFormat(",Materials = '{0}'", data.Materials);                  // 資材名
-                strcmd.AppendFormat(",Quantity = '{0}'", data.Quantity);                    // 数量
-                strcmd.AppendFormat(",Production = '{0}'", data.Production);                // 制作会社
-                strcmd.AppendFormat(",Delivery = '{0}'", data.Delivery);                    // 納入業者
-                strcmd.AppendFormat(",QualityControl = '{0}'", data.QualityControl);        // 品質管理事項
+                strcmd.AppendFormat(",Materials = {0}", SeparateString(data.Materials));            // 資材名
+                strcmd.AppendFormat(",Quantity = {0}", SeparateString(data.Quantity));              // 数量
+                strcmd.AppendFormat(",Production = {0}", SeparateString(data.Production));          // 制作会社
+                strcmd.AppendFormat(",Delivery = {0}", SeparateString(data.Delivery));              // 納入業者
+                strcmd.AppendFormat(",QualityControl = {0}", SeparateString(data.QualityControl));  // 品質管理事項
 
                 strcmd.Append(", UpdateDate = NOW()");
                 strcmd.Append(AddSQLString);
@@ -372,9 +379,9 @@
             try
             {
                 // データ取得
+                wrk.ConstructionCode = int.Parse(objwrk[(int)TableColumn.ConstructionCode].ToString());        // 工事番号
+                wrk.DailyDataDate = DateTime.Parse(objwrk[(int)TableColumn.DailyDataDate].ToString());         // 日報作成日
                 wrk.PersonCode = int.Parse(objwrk[(int)TableColumn.PersonCode].ToString());                    // 担当者コード
-                wrk.DailyDataDate = DateTime.Parse(objwrk[(int)TableColumn.DailyDataDate].ToString());         // 日報作成日
-                wrk.ConstructionCode = int.Parse(objwrk[(int)TableColumn.ConstructionCode].ToString());        // 工事番号
                 wrk.SeqNo = int.Parse(objwrk[(int)TableColumn.SeqNo].ToString());                              // 明細行番号
                 
                 wrk.Materials = objwrk[(int)TableColumn.Materials].ToString();                                 // 	資材名
@@ -401,21 +408,18 @@
         /// <summary>
         /// 主キー検索の文字列を返す
         /// </summary>
-        /// <param name="PersonCode"></param>
-        /// <param name="ActionDate"></param>
-        /// <param name="DataType"></param>
-        /// <param name="DataAddCount"></param>
         /// <returns></returns>
-        public string CreatePrimarykeyString(int PersonCode, DateTime DailyDataDetailDate, int ConstructionCode, int SeqNo)
+        public string CreatePrimarykeyString(int ConstructionCode, DateTime DailyDataDetailDate, int PersonCode = 0, int SeqNo = 0)
         {
             StringBuilder strWork = new StringBuilder();
             try
             {
-                strWork.AppendFormat(" WHERE PersonCode = {0}", PersonCode);
+                strWork.Append(" WHERE");
+                strWork.AppendFormat(" ConstructionCode = {0}", ConstructionCode);
                 if (DailyDataDetailDate != DateTime.MinValue)
                     strWork.AppendFormat(" AND DailyDataDate = STR_TO_DATE('{0}','%Y/%m/%d')", DailyDataDetailDate.ToShortDateString());
-                if (ConstructionCode != 0)
-                    strWork.AppendFormat(" AND ConstructionCode = {0}", ConstructionCode);
+                if (PersonCode != 0)
+                    strWork.AppendFormat(" And PersonCode = {0}", PersonCode);
                 if (SeqNo != 0)
                     strWork.AppendFormat(" AND SeqNo = {0}", SeqNo);
 
Index: trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IODailyDataSubcontractors.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IODailyDataSubcontractors.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IODailyDataSubcontractors.cs	(revision 484)
@@ -34,17 +34,17 @@
         public enum TableColumn
         {
             /// <summary>
-            /// 作成者コード
+            /// 工事番号
             /// </summary>
-            PersonCode,
+            ConstructionCode,
             /// <summary>
             /// 日報作成日
             /// </summary>
             DailyDataDate,
             /// <summary>
-            /// 工事番号
+            /// 作成者コード
             /// </summary>
-            ConstructionCode,
+            PersonCode,
             /// <summary>
             /// 明細行番号
             /// </summary>
@@ -86,20 +86,30 @@
         /// </summary>
         private string CreateSelectSQL()
         {
-            // SQL作成（DateTime型が変換できないのでCharに変換しておく）
             StringBuilder strcmd = new StringBuilder();
-            strcmd.Append("SELECT");
+            strcmd.Append("SELECT ");
 
-            strcmd.Append("  PersonCode");                                      // 担当者コード
-            strcmd.Append(", DATE_FORMAT(DailyDataDate, '%Y/%m/%d')");          // 日報作成日
-            strcmd.Append(", ConstructionCode");                                // 工事番号
-            strcmd.Append(", SeqNo");                                           // 明細行番号
+            bool bColFirst = true;
+            string strWork = string.Empty;
+            foreach (var gender in Enum.GetValues(typeof(TableColumn)))
+            {
+                strWork = gender.ToString();
+                if (!bColFirst) strcmd.Append(",");
+                if (strWork.Equals("EntryDate") || strWork.Equals("UpdateDate"))
+                {
+                    strcmd.AppendFormat(" DATE_FORMAT({0}, '%Y/%m/%d %H:%i:%s')", strWork);
+                }
+                else if (strWork.Equals("DailyDataDate"))
+                {
+                    strcmd.AppendFormat(" DATE_FORMAT({0}, '%Y/%m/%d')", strWork);
+                }
+                else
+                {
+                    strcmd.AppendFormat(" {0}", strWork);
+                }
+                bColFirst = false;
+            }
 
-            strcmd.Append(", Attendee");                                        // 出席者
-            strcmd.Append(", ContentsText");                                    // 内容
-
-            strcmd.Append(", DATE_FORMAT(EntryDate, '%Y/%m/%d %H:%i:%s')");     // 登録年月日
-            strcmd.Append(", DATE_FORMAT(UpdateDate, '%Y/%m/%d %H:%i:%s')");    // 更新年月日
             strcmd.Append(" FROM DailyDataSubcontractors");
 
             return strcmd.ToString();
@@ -195,14 +205,14 @@
                 }
                 strcmd.Append(") VALUES (");
 
-                strcmd.AppendFormat("  {0}", work.PersonCode);                      // 担当者コード
+                strcmd.AppendFormat("  {0}", work.ConstructionCode);                    // 工事番号
                 strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d')"
                                             , work.DailyDataDate.ToShortDateString());  // 日報作成日
-                strcmd.AppendFormat(", {0}", work.ConstructionCode);                // 工事番号
-                strcmd.AppendFormat(", {0}", work.SeqNo);                           // 明細行番号
+                strcmd.AppendFormat(", {0}", work.PersonCode);                          // 担当者コード
+                strcmd.AppendFormat(", {0}", work.SeqNo);                               // 明細行番号
                 
-                strcmd.AppendFormat(",'{0}'", work.Attendee);                       // 出席者
-                strcmd.AppendFormat(",'{0}'", work.ContentsText);                       // 内容
+                strcmd.AppendFormat(", {0}", SeparateString(work.Attendee));            // 出席者
+                strcmd.AppendFormat(", {0}", SeparateString(work.ContentsText));        // 内容
 
                 strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.EntryDate);
                 strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.UpdateDate);
@@ -243,14 +253,14 @@
                     if (bDataFirst) strcmd.Append(" (");
                     else strcmd.Append(", (");
 
-                    strcmd.AppendFormat("  {0}", work.PersonCode);                      // 担当者コード
+                    strcmd.AppendFormat("  {0}", work.ConstructionCode);                    // 工事番号
                     strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d')"
                                                 , work.DailyDataDate.ToShortDateString());  // 日報作成日
-                    strcmd.AppendFormat(", {0}", work.ConstructionCode);                // 工事番号
-                    strcmd.AppendFormat(", {0}", work.SeqNo);                           // 明細行番号
+                    strcmd.AppendFormat(", {0}", work.PersonCode);                          // 担当者コード
+                    strcmd.AppendFormat(", {0}", work.SeqNo);                               // 明細行番号
 
-                    strcmd.AppendFormat(",'{0}'", work.Attendee);                       // 出席者
-                    strcmd.AppendFormat(",'{0}'", work.ContentsText);                       // 内容
+                    strcmd.AppendFormat(", {0}", SeparateString(work.Attendee));            // 出席者
+                    strcmd.AppendFormat(", {0}", SeparateString(work.ContentsText));        // 内容
 
                     strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.EntryDate);
                     strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.UpdateDate);
@@ -288,14 +298,14 @@
 
                 strcmd.Append(" SET");
 
-                strcmd.AppendFormat(" PersonCode = {0}", data.PersonCode);                  // 担当者コード
+                strcmd.AppendFormat(" ConstructionCode = {0}", data.ConstructionCode);          // 工事番号
                 strcmd.AppendFormat(",DailyDataDate = STR_TO_DATE('{0}','%Y/%m/%d')"
                                         , data.DailyDataDate.ToShortDateString());              // 日報作成日
-                strcmd.AppendFormat(",ConstructionCode = {0}", data.ConstructionCode);      // 工事番号
-                strcmd.AppendFormat(",SeqNo =  {0} ", data.SeqNo);                          // 明細行番号
+                strcmd.AppendFormat(",PersonCode = {0}", data.PersonCode);                      // 担当者コード
+                strcmd.AppendFormat(",SeqNo =  {0} ", data.SeqNo);                              // 明細行番号
 
-                strcmd.AppendFormat(",Attendee = '{0}'", data.Attendee);                    // 出席者
-                strcmd.AppendFormat(",ContentsText = '{0}'", data.ContentsText);                    // 内容
+                strcmd.AppendFormat(",Attendee = {0}", SeparateString(data.Attendee));          // 出席者
+                strcmd.AppendFormat(",ContentsText = {0}", SeparateString(data.ContentsText));  // 内容
 
                 strcmd.Append(", UpdateDate = NOW()");
                 strcmd.Append(AddSQLString);
@@ -350,9 +360,9 @@
             try
             {
                 // データ取得
+                wrk.ConstructionCode = int.Parse(objwrk[(int)TableColumn.ConstructionCode].ToString());      // 工事番号
+                wrk.DailyDataDate = DateTime.Parse(objwrk[(int)TableColumn.DailyDataDate].ToString());       // 日報作成日
                 wrk.PersonCode = int.Parse(objwrk[(int)TableColumn.PersonCode].ToString());                  // 担当者コード
-                wrk.DailyDataDate = DateTime.Parse(objwrk[(int)TableColumn.DailyDataDate].ToString());       // 日報作成日
-                wrk.ConstructionCode = int.Parse(objwrk[(int)TableColumn.ConstructionCode].ToString());      // 工事番号
                 wrk.SeqNo = int.Parse(objwrk[(int)TableColumn.SeqNo].ToString());                            // 明細行番号
 
                 wrk.Attendee = objwrk[(int)TableColumn.Attendee].ToString();                                 //出席者
@@ -376,21 +386,18 @@
         /// <summary>
         /// 主キー検索の文字列を返す
         /// </summary>
-        /// <param name="PersonCode"></param>
-        /// <param name="ActionDate"></param>
-        /// <param name="DataType"></param>
-        /// <param name="DataAddCount"></param>
         /// <returns></returns>
-        public string CreatePrimarykeyString(int PersonCode, DateTime DailyDataDetailDate, int ConstructionCode, int SeqNo)
+        public string CreatePrimarykeyString(int ConstructionCode, DateTime DailyDataDetailDate, int PersonCode = 0, int SeqNo = 0)
         {
             StringBuilder strWork = new StringBuilder();
             try
             {
-                strWork.AppendFormat(" WHERE PersonCode = {0}", PersonCode);
+                strWork.Append(" WHERE");
+                strWork.AppendFormat(" ConstructionCode = {0}", ConstructionCode);
                 if (DailyDataDetailDate != DateTime.MinValue)
                     strWork.AppendFormat(" AND DailyDataDate = STR_TO_DATE('{0}','%Y/%m/%d')", DailyDataDetailDate.ToShortDateString());
-                if (ConstructionCode != 0)
-                    strWork.AppendFormat(" AND ConstructionCode = {0}", ConstructionCode);
+                if (PersonCode != 0)
+                    strWork.AppendFormat(" And PersonCode = {0}", PersonCode);
                 if (SeqNo != 0)
                     strWork.AppendFormat(" AND SeqNo = {0}", SeqNo);
 
Index: trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IODailyDataVehicles.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IODailyDataVehicles.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IODailyDataVehicles.cs	(revision 484)
@@ -34,17 +34,17 @@
         public enum TableColumn
         {
             /// <summary>
-            /// 作成者コード
+            /// 工事番号
             /// </summary>
-            PersonCode,
+            ConstructionCode,
             /// <summary>
             /// 日報作成日
             /// </summary>
             DailyDataDate,
             /// <summary>
-            /// 工事番号
+            /// 作成者コード
             /// </summary>
-            ConstructionCode,
+            PersonCode,
             /// <summary>
             /// 明細行番号
             /// </summary>
@@ -102,24 +102,31 @@
         /// </summary>
         private string CreateSelectSQL()
         {
-            // SQL作成（DateTime型が変換できないのでCharに変換しておく）
             StringBuilder strcmd = new StringBuilder();
-            strcmd.Append("SELECT");
+            strcmd.Append("SELECT ");
 
-            strcmd.Append("  PersonCode");                                          // 担当者コード
-            strcmd.Append(", DATE_FORMAT(DailyDataDate, '%Y/%m/%d')");              // 日報作成日
-            strcmd.Append(", ConstructionCode");                                    // 工事番号
-            strcmd.Append(", SeqNo");                                               // 明細行番号
+            bool bColFirst = true;
+            string strWork = string.Empty;
+            foreach (var gender in Enum.GetValues(typeof(TableColumn)))
+            {
+                strWork = gender.ToString();
+                if (!bColFirst) strcmd.Append(",");
+                if (strWork.Equals("StartWorkingTime") || strWork.Equals("EndWorkingTime")
+                 || strWork.Equals("EntryDate") || strWork.Equals("UpdateDate"))
+                {
+                    strcmd.AppendFormat(" DATE_FORMAT({0}, '%Y/%m/%d %H:%i:%s')", strWork);
+                }
+                else if (strWork.Equals("DailyDataDate"))
+                {
+                    strcmd.AppendFormat(" DATE_FORMAT({0}, '%Y/%m/%d')", strWork);
+                }
+                else
+                {
+                    strcmd.AppendFormat(" {0}", strWork);
+                }
+                bColFirst = false;
+            }
 
-            strcmd.Append(", Model");                                               // 機種
-            strcmd.Append(", Performance");                                         // 性能
-            strcmd.Append(", Owner");                                               // 所有会社
-            strcmd.Append(", Driver");                                              // 当日運転者
-            strcmd.Append(", DATE_FORMAT(StartWorkingTime, '%Y/%m/%d %H:%i:%s')");  // 作業時間開始
-            strcmd.Append(", DATE_FORMAT(EndWorkingTime, '%Y/%m/%d %H:%i:%s')");    // 作業時間終了
-
-            strcmd.Append(", DATE_FORMAT(EntryDate, '%Y/%m/%d %H:%i:%s')");         // 登録年月日
-            strcmd.Append(", DATE_FORMAT(UpdateDate, '%Y/%m/%d %H:%i:%s')");        // 更新年月日
             strcmd.Append(" FROM DailyDataVehicles");
 
             return strcmd.ToString();
@@ -215,15 +222,15 @@
                 }
                 strcmd.Append(") VALUES (");
 
-                strcmd.AppendFormat("  {0}", work.PersonCode);                      // 担当者コード
+                strcmd.AppendFormat("  {0}", work.ConstructionCode);                    // 工事番号
                 strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d')"
                                             , work.DailyDataDate.ToShortDateString());  // 日報作成日
-                strcmd.AppendFormat(", {0}", work.ConstructionCode);                // 工事番号
-                strcmd.AppendFormat(", {0}", work.SeqNo);                           // 明細行番号
-                strcmd.AppendFormat(",'{0}'", work.Model);                          // 機種
-                strcmd.AppendFormat(",'{0}'", work.Performance);                    // 性能
-                strcmd.AppendFormat(",'{0}'", work.Owner);                          // 所有会社
-                strcmd.AppendFormat(",'{0}'", work.Driver);                         // 当日運転者
+                strcmd.AppendFormat(", {0}", work.PersonCode);                          // 担当者コード
+                strcmd.AppendFormat(", {0}", work.SeqNo);                               // 明細行番号
+                strcmd.AppendFormat(", {0}", SeparateString(work.Model));               // 機種
+                strcmd.AppendFormat(", {0}", SeparateString(work.Performance));         // 性能
+                strcmd.AppendFormat(", {0}", SeparateString(work.Owner));               // 所有会社
+                strcmd.AppendFormat(", {0}", SeparateString(work.Driver));              // 当日運転者
                 strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')"
                                             , work.StartWorkingTime.ToString());        // 作業時間開始
                 strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')"
@@ -268,15 +275,15 @@
                     if (bDataFirst) strcmd.Append(" (");
                     else strcmd.Append(", (");
 
-                    strcmd.AppendFormat("  {0}", work.PersonCode);                      // 担当者コード
+                    strcmd.AppendFormat("  {0}", work.ConstructionCode);                    // 工事番号
                     strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d')"
                                                 , work.DailyDataDate.ToShortDateString());  // 日報作成日
-                    strcmd.AppendFormat(", {0}", work.ConstructionCode);                // 工事番号
-                    strcmd.AppendFormat(", {0}", work.SeqNo);                           // 明細行番号
-                    strcmd.AppendFormat(",'{0}'", work.Model);                          // 機種
-                    strcmd.AppendFormat(",'{0}'", work.Performance);                    // 性能
-                    strcmd.AppendFormat(",'{0}'", work.Owner);                          // 所有会社
-                    strcmd.AppendFormat(",'{0}'", work.Driver);                         // 当日運転者
+                    strcmd.AppendFormat(", {0}", work.PersonCode);                          // 担当者コード
+                    strcmd.AppendFormat(", {0}", work.SeqNo);                               // 明細行番号
+                    strcmd.AppendFormat(", {0}", SeparateString(work.Model));               // 機種
+                    strcmd.AppendFormat(", {0}", SeparateString(work.Performance));         // 性能
+                    strcmd.AppendFormat(", {0}", SeparateString(work.Owner));               // 所有会社
+                    strcmd.AppendFormat(", {0}", SeparateString(work.Driver));              // 当日運転者
                     strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')"
                                                 , work.StartWorkingTime.ToString());        // 作業時間開始
                     strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')"
@@ -318,16 +325,16 @@
 
                 strcmd.Append(" SET");
 
-                strcmd.AppendFormat(" PersonCode = {0}", data.PersonCode);                  // 担当者コード
+                strcmd.AppendFormat(" ConstructionCode = {0}", data.ConstructionCode);          // 工事番号
                 strcmd.AppendFormat(",DailyDataDate = STR_TO_DATE('{0}','%Y/%m/%d')"
                                         , data.DailyDataDate.ToShortDateString());              // 日報作成日
-                strcmd.AppendFormat(",ConstructionCode = {0}", data.ConstructionCode);      // 工事番号
-                strcmd.AppendFormat(",SeqNo =  {0} ", data.SeqNo);                          // 明細行番号
+                strcmd.AppendFormat(",PersonCode = {0}", data.PersonCode);                      // 担当者コード
+                strcmd.AppendFormat(",SeqNo =  {0} ", data.SeqNo);                              // 明細行番号
 
-                strcmd.AppendFormat(",TodayWork = '{0}'", data.Model);                       // 機種
-                strcmd.AppendFormat(",TodayWork = '{0}'", data.Performance);                 // 性能
-                strcmd.AppendFormat(",TodayWork = '{0}'", data.Owner);                       // 所有会社
-                strcmd.AppendFormat(",TodayWork = '{0}'", data.Driver);                      // 当日運転者
+                strcmd.AppendFormat(",TodayWork =  {0}", SeparateString(data.Model));           // 機種
+                strcmd.AppendFormat(",TodayWork =  {0}", SeparateString(data.Performance));     // 性能
+                strcmd.AppendFormat(",TodayWork =  {0}", SeparateString(data.Owner));           // 所有会社
+                strcmd.AppendFormat(",TodayWork =  {0}", SeparateString(data.Driver));          // 当日運転者
                 strcmd.AppendFormat(",DailyDataDate = STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')"
                                         , data.StartWorkingTime.ToString());                    // 作業時間開始
                 strcmd.AppendFormat(",DailyDataDate = STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')"
@@ -386,9 +393,9 @@
             try
             {
                 // データ取得
+                wrk.ConstructionCode = int.Parse(objwrk[(int)TableColumn.ConstructionCode].ToString());         // 工事番号
+                wrk.DailyDataDate = DateTime.Parse(objwrk[(int)TableColumn.DailyDataDate].ToString());          // 日報作成日
                 wrk.PersonCode = int.Parse(objwrk[(int)TableColumn.PersonCode].ToString());                     // 担当者コード
-                wrk.DailyDataDate = DateTime.Parse(objwrk[(int)TableColumn.DailyDataDate].ToString());          // 日報作成日
-                wrk.ConstructionCode = int.Parse(objwrk[(int)TableColumn.ConstructionCode].ToString());         // 工事番号
                 wrk.SeqNo = int.Parse(objwrk[(int)TableColumn.SeqNo].ToString());                               // 明細行番号
                 
                 wrk.Model = objwrk[(int)TableColumn.Model].ToString();                                          // 機種
@@ -416,21 +423,18 @@
         /// <summary>
         /// 主キー検索の文字列を返す
         /// </summary>
-        /// <param name="PersonCode"></param>
-        /// <param name="ActionDate"></param>
-        /// <param name="DataType"></param>
-        /// <param name="DataAddCount"></param>
         /// <returns></returns>
-        public string CreatePrimarykeyString(int PersonCode, DateTime DailyDataDetailDate, int ConstructionCode, int SeqNo)
+        public string CreatePrimarykeyString(int ConstructionCode, DateTime DailyDataDetailDate, int PersonCode = 0, int SeqNo = 0)
         {
             StringBuilder strWork = new StringBuilder();
             try
             {
-                strWork.AppendFormat(" WHERE PersonCode = {0}", PersonCode);
+                strWork.Append(" WHERE");
+                strWork.AppendFormat(" ConstructionCode = {0}", ConstructionCode);
                 if (DailyDataDetailDate != DateTime.MinValue)
                     strWork.AppendFormat(" AND DailyDataDate = STR_TO_DATE('{0}','%Y/%m/%d')", DailyDataDetailDate.ToShortDateString());
-                if (ConstructionCode != 0)
-                    strWork.AppendFormat(" AND ConstructionCode = {0}", ConstructionCode);
+                if (PersonCode != 0)
+                    strWork.AppendFormat(" And PersonCode = {0}", PersonCode);
                 if (SeqNo != 0)
                     strWork.AppendFormat(" AND SeqNo = {0}", SeqNo);
 
Index: trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IODeadLineMaster.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IODeadLineMaster.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IODeadLineMaster.cs	(revision 484)
@@ -127,7 +127,7 @@
                     strcmd.AppendFormat("  {0}", work.LabourKind.ToString());
                     strcmd.AppendFormat(", {0}", work.DeadLine.ToString());
                     strcmd.AppendFormat(", {0}", work.PayDay.ToString());
-                    strcmd.AppendFormat(", '{0}'", work.Note.ToString());
+                    strcmd.AppendFormat(", {0}", SeparateString(work.Note));
                     strcmd.AppendFormat(", {0}", work.DeleteFlg.ToString());
 
                     strcmd.Append(", NOW()");
@@ -165,7 +165,7 @@
                 strcmd.AppendFormat(" LabourKind = {0}", data.LabourKind.ToString());
                 strcmd.AppendFormat(",DeadLine = {0}", data.DeadLine.ToString());
                 strcmd.AppendFormat(",PayDay = {0}", data.PayDay.ToString());
-                strcmd.AppendFormat(",Note = '{0}'", data.Note);
+                strcmd.AppendFormat(",Note = {0}", SeparateString(data.Note));
                 strcmd.AppendFormat(",DeleteFlg = {0}", data.DeleteFlg.ToString());
 
                 strcmd.Append(", UpdateDate = NOW()");
Index: trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IODepositApprovalInfo.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IODepositApprovalInfo.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IODepositApprovalInfo.cs	(revision 484)
@@ -221,7 +221,7 @@
                     strcmd.AppendFormat(", {0}", data.LineCount.ToString());
                     strcmd.AppendFormat(", {0}", data.ApprovalNo.ToString());
                     strcmd.AppendFormat(", {0}", data.ApprovalPerson.ToString());
-                    strcmd.AppendFormat(", '{0}'", data.ApprovalPersonName.ToString());
+                    strcmd.AppendFormat(", {0}", SeparateString(data.ApprovalPersonName));
                     strcmd.AppendFormat(", {0}", data.ApprovalAuthority.ToString());
                     strcmd.AppendFormat(", DATE_FORMAT('{0}','%Y%m%d')", data.ApprovalDate.ToString());
                     strcmd.Append(", NOW()");
@@ -264,7 +264,7 @@
                 strcmd.AppendFormat(",LineCount = {0}", data.LineCount.ToString());
                 strcmd.AppendFormat(",ApprovalNo = {0}", data.ApprovalNo.ToString());
                 strcmd.AppendFormat(",ApprovalPerson = {0}", data.ApprovalPerson.ToString());
-                strcmd.AppendFormat(",ApprovalPersonName = '{0}'", data.ApprovalPersonName.ToString());
+                strcmd.AppendFormat(",ApprovalPersonName = {0}", SeparateString(data.ApprovalPersonName));
                 strcmd.AppendFormat(",ApprovalAuthority = {0}", data.ApprovalAuthority.ToString());
                 strcmd.AppendFormat(",ApprovalDate = DATE_FORMAT('{0}','%Y%m%d')", data.ApprovalDate.ToString());
                 strcmd.Append(", UpdateDate = NOW()");
Index: trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IODepositData.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IODepositData.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IODepositData.cs	(revision 484)
@@ -66,6 +66,48 @@
 
         #endregion
 
+        #region テーブルのフィールドリストを作成する
+        /// <summary>
+        /// テーブルのフィールドリストを作成する
+        /// </summary>
+        /// <returns></returns>
+        public static string CreateFieldNameList(string strAlias = "")
+        {
+            StringBuilder strcmd = new StringBuilder();
+            try
+            {
+                strcmd.Append(" ");
+                bool bColFirst = true;
+                string strWork = string.Empty;
+                foreach (var gender in Enum.GetValues(typeof(ColumnName)))
+                {
+                    strWork = gender.ToString();
+                    if (!bColFirst) strcmd.Append(",");
+                    if (strWork.Equals("EntryDate") || strWork.Equals("UpdateDate"))
+                    {
+                        strcmd.AppendFormat(" DATE_FORMAT({0}{1}, '%Y/%m/%d %H:%i:%s') As {1}", strAlias, strWork);
+                    }
+                    else if (strWork.Equals("DepositDate"))
+                    {
+                        strcmd.AppendFormat(" DATE_FORMAT({0}{1}, '%Y/%m/%d') As {1}", strAlias, strWork);
+                    }
+                    else
+                    {
+                        strcmd.AppendFormat(" {0}{1}", strAlias, strWork);
+                    }
+                    bColFirst = false;
+                }
+
+                return strcmd.ToString();
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("システムエラー：{0}：{1}：{2}", CommonMotions.GetMethodName(2), ex.Message, strcmd.ToString());
+                return string.Empty;
+            }
+        }
+        #endregion
+
         #region 入金データ検索文字列作成
         /// <summary>
         /// 入金データ検索文字列作成
@@ -75,34 +117,18 @@
         /// <returns>true：成功 false：失敗</returns>
         private string CreateSelectSQL()
         {
-            // SQL作成（DateTime型が変換できないのでCharに変換しておく）
             StringBuilder strcmd = new StringBuilder();
-            strcmd.Append("SELECT");
+            try
+            {
+                strcmd.AppendFormat("SELECT {0} FROM DepositData", CreateFieldNameList());
 
-            bool bColFirst = true;
-            string strWork = string.Empty;
-            foreach (var gender in Enum.GetValues(typeof(ColumnName)))
+                return strcmd.ToString();
+            }
+            catch (Exception ex)
             {
-                strWork = gender.ToString();
-                if (!bColFirst) strcmd.Append(",");
-                if (strWork.Equals("EntryDate") || strWork.Equals("UpdateDate"))
-                {
-                    strcmd.AppendFormat(" DATE_FORMAT({0}, '%Y/%m/%d %H:%i:%s')", strWork);
-                }
-                else if (strWork.Equals("DepositDate"))
-                {
-                    strcmd.AppendFormat(" DATE_FORMAT({0}, '%Y/%m/%d')", strWork);
-                }
-                else
-                {
-                    strcmd.AppendFormat(" {0}", strWork);
-                }
-                bColFirst = false;
+                logger.ErrorFormat("システムエラー：{0}：{1}：{2}", CommonMotions.GetMethodName(2), ex.Message, strcmd.ToString());
+                return string.Empty;
             }
-
-            strcmd.Append(" FROM DepositData");
-
-            return strcmd.ToString();
         }
         #endregion
 
@@ -229,7 +255,7 @@
                     strcmd.AppendFormat(", {0}", work.CnstrPrice.ToString());
                     strcmd.AppendFormat(", {0}", work.RemainingClearing.ToString());
                     strcmd.AppendFormat(", {0}", work.DepositPersonCode.ToString());
-                    strcmd.AppendFormat(", '{0}'", work.Note.ToString());
+                    strcmd.AppendFormat(", {0}", SeparateString(work.Note));
                     strcmd.Append(", NOW()");
                     strcmd.Append(", NOW()");
                     strcmd.Append(")");
@@ -286,7 +312,7 @@
                 strcmd.AppendFormat(", {0}", data.CnstrPrice.ToString());
                 strcmd.AppendFormat(", {0}", data.RemainingClearing.ToString());
                 strcmd.AppendFormat(", {0}", data.DepositPersonCode.ToString());
-                strcmd.AppendFormat(", '{0}'", data.Note.ToString());
+                strcmd.AppendFormat(", {0}", SeparateString(data.Note));
                 strcmd.Append(", NOW()");
                 strcmd.Append(", NOW()");
                 strcmd.Append(")");
@@ -334,7 +360,7 @@
                 strcmd.AppendFormat(",CnstrPrice = {0}", data.CnstrPrice.ToString());
                 strcmd.AppendFormat(",RemainingClearing = {0}", data.RemainingClearing.ToString());
                 strcmd.AppendFormat(",DepositPersonCode =  {0}", data.DepositPersonCode.ToString());
-                strcmd.AppendFormat(",Note =  '{0}'", data.Note.ToString());
+                strcmd.AppendFormat(",Note =  {0}", SeparateString(data.Note));
                 strcmd.Append(", UpdateDate = NOW()");
                 strcmd.Append(AddSQLString);
 
@@ -503,7 +529,7 @@
                         strcmd.AppendFormat(" DepositPersonCode = {0}", ((int)value).ToString());
                         break;
                     case (int)ColumnName.Note:
-                        strcmd.AppendFormat(" Note = '{0}'", value.ToString());
+                        strcmd.AppendFormat(" Note = {0}", SeparateString(value.ToString()));
                         break;
                 }
 
Index: trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IODepositDataDetail.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IODepositDataDetail.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IODepositDataDetail.cs	(revision 484)
@@ -69,17 +69,17 @@
 
         #endregion
 
-        #region SELECT　SQL作成
+        #region テーブルのフィールドリストを作成する
         /// <summary>
-        /// SQL作成
+        /// テーブルのフィールドリストを作成する
         /// </summary>
-        private string CreateSelectSQL()
+        /// <returns></returns>
+        public static string CreateFieldNameList(string strAlias = "")
         {
             StringBuilder strcmd = new StringBuilder();
             try
             {
-                strcmd.Append("SELECT ");
-
+                strcmd.Append(" ");
                 bool bColFirst = true;
                 string strWork = string.Empty;
                 foreach (var gender in Enum.GetValues(typeof(NameColumn)))
@@ -88,21 +88,40 @@
                     if (!bColFirst) strcmd.Append(",");
                     if (strWork.Equals("EntryDate") || strWork.Equals("UpdateDate"))
                     {
-                        strcmd.AppendFormat(" DATE_FORMAT({0}, '%Y/%m/%d %H:%i:%s')", strWork);
+                        strcmd.AppendFormat(" DATE_FORMAT({0}{1}, '%Y/%m/%d %H:%i:%s') As {1}", strAlias, strWork);
                     }
                     else if (strWork.Equals("ConfirmationDate"))
                     {
-                        strcmd.AppendFormat(" DATE_FORMAT({0}, '%Y/%m/%d')", strWork);
+                        strcmd.AppendFormat(" DATE({0}{1}) As {1}", strAlias, strWork);
                     }
                     else
                     {
-                        strcmd.AppendFormat(" {0}", strWork);
+                        strcmd.AppendFormat(" {0}{1}", strAlias, strWork);
                     }
                     bColFirst = false;
                 }
 
-                strcmd.Append(" FROM DepositDataDetail");
+                return strcmd.ToString();
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("システムエラー：{0}：{1}：{2}", CommonMotions.GetMethodName(2), ex.Message, strcmd.ToString());
+                return string.Empty;
+            }
+        }
+        #endregion
 
+        #region SELECT　SQL作成
+        /// <summary>
+        /// SQL作成
+        /// </summary>
+        private string CreateSelectSQL()
+        {
+            StringBuilder strcmd = new StringBuilder();
+            try
+            {
+                strcmd.AppendFormat("SELECT {0} FROM DepositDataDetail", CreateFieldNameList());
+
                 return strcmd.ToString();
             }
             catch (Exception ex)
@@ -198,7 +217,7 @@
                     strcmd.AppendFormat(", {0}", work.ConfirmationPersonCode.ToString());
                     strcmd.AppendFormat(", DATE_FORMAT('{0}','%Y/%m/%d')", work.ConfirmationDate.ToShortDateString());
                     strcmd.AppendFormat(", {0}", work.ConfirmationEndFlg.ToString());
-                    strcmd.AppendFormat(", '{0}'", work.Note.ToString());
+                    strcmd.AppendFormat(", {0}", SeparateString(work.Note));
                     strcmd.Append(", NOW()");
                     strcmd.Append(", NOW()");
                     strcmd.Append(")");
@@ -257,7 +276,7 @@
                 strcmd.AppendFormat(", {0}", data.ConfirmationPersonCode.ToString());
                 strcmd.AppendFormat(", DATE_FORMAT('{0}','%Y/%m/%d')", data.ConfirmationDate.ToShortDateString());
                 strcmd.AppendFormat(", {0}", data.ConfirmationEndFlg.ToString());
-                strcmd.AppendFormat(", '{0}'", data.Note.ToString());
+                strcmd.AppendFormat(", {0}", SeparateString(data.Note));
                 strcmd.Append(", NOW()");
                 strcmd.Append(", NOW()");
                 strcmd.Append(")");
@@ -308,7 +327,7 @@
                 strcmd.AppendFormat(",ConfirmationPersonCode = {0}", data.ConfirmationPersonCode.ToString());
                 strcmd.AppendFormat(",ConfirmationDate = DATE_FORMAT('{0}','%Y/%m/%d')", data.ConfirmationDate.ToShortDateString());
                 strcmd.AppendFormat(",ConfirmationEndFlg = {0}", data.ConfirmationEndFlg.ToString());
-                strcmd.AppendFormat(",Note = '{0}'", data.Note.ToString());
+                strcmd.AppendFormat(",Note = {0}", SeparateString(data.Note));
                 strcmd.Append(", UpdateDate = NOW()");
 
                 strcmd.Append(AddSQLString);
Index: trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOEstimateBudgetDetail.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOEstimateBudgetDetail.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOEstimateBudgetDetail.cs	(revision 484)
@@ -196,11 +196,11 @@
                 strcmd.AppendFormat(", {0}", work.ComponentCode);           // 構成キー
                 strcmd.AppendFormat(", {0}", work.ItemCode);		        // 工種キー
                 strcmd.AppendFormat(", {0}", work.CompanyCode);             // 協力会社コード
-                strcmd.AppendFormat(",'{0}'", work.FirstString);            // 構成名称
-                strcmd.AppendFormat(",'{0}'", work.SecondString);           // 工種名称・協力会社名
+                strcmd.AppendFormat(", {0}", SeparateString(work.FirstString));     // 構成名称
+                strcmd.AppendFormat(", {0}", SeparateString(work.SecondString));    // 工種名称・協力会社名
                 strcmd.AppendFormat(", {0}", work.EstimatePrice);           // 見積時金額
                 strcmd.AppendFormat(", {0}", work.NegotiationPrice);        // 交渉時金額
-                strcmd.AppendFormat(",'{0}'", work.Notes);                  // 注意事項
+                strcmd.AppendFormat(", {0}", SeparateString(work.Notes));           // 注意事項
 
                 strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.EntryDate);
                 strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.UpdateDate);
@@ -253,11 +253,11 @@
                     strcmd.AppendFormat(", {0}", work.ComponentCode);           // 構成キー
                     strcmd.AppendFormat(", {0}", work.ItemCode);		        // 工種キー
                     strcmd.AppendFormat(", {0}", work.CompanyCode);             // 協力会社コード
-                    strcmd.AppendFormat(",'{0}'", work.FirstString);            // 構成名称
-                    strcmd.AppendFormat(",'{0}'", work.SecondString);           // 工種名称・協力会社名
+                    strcmd.AppendFormat(", {0}", SeparateString(work.FirstString));     // 構成名称
+                    strcmd.AppendFormat(", {0}", SeparateString(work.SecondString));    // 工種名称・協力会社名
                     strcmd.AppendFormat(", {0}", work.EstimatePrice);           // 見積時金額
                     strcmd.AppendFormat(", {0}", work.NegotiationPrice);        // 交渉時金額
-                    strcmd.AppendFormat(",'{0}'", work.Notes);                  // 注意事項
+                    strcmd.AppendFormat(", {0}", SeparateString(work.Notes));           // 注意事項
 
                     strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.EntryDate);
                     strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.UpdateDate);
@@ -302,11 +302,11 @@
                 strcmd.AppendFormat(", ComponentCode = {0}", data.ComponentCode);               // 構成キー
                 strcmd.AppendFormat(", ItemCode = {0}", data.ItemCode);		                    // 工種キー
                 strcmd.AppendFormat(", CompanyCode = {0}", data.CompanyCode);                   // 協力会社コード
-                strcmd.AppendFormat(", FirstString = '{0}'", data.FirstString);                 // 構成名称
-                strcmd.AppendFormat(", SecondString = '{0}'", data.SecondString);               // 工種名称・協力会社名
+                strcmd.AppendFormat(", FirstString = {0}", SeparateString(data.FirstString));   // 構成名称
+                strcmd.AppendFormat(", SecondString = {0}", SeparateString(data.SecondString)); // 工種名称・協力会社名
                 strcmd.AppendFormat(", EstimatePrice = {0}", data.EstimatePrice);               // 見積時金額
                 strcmd.AppendFormat(", NegotiationPrice = {0}", data.NegotiationPrice);         // 交渉時金額
-                strcmd.AppendFormat(", Notes = '{0}'", data.Notes);                             // 注意事項
+                strcmd.AppendFormat(", Notes = {0}", SeparateString(data.Notes));               // 注意事項
 
                 strcmd.Append(", UpdateDate = NOW()");
                 strcmd.Append(AddSQLString);
@@ -384,10 +384,10 @@
                         strcmd.AppendFormat(" CompanyCode = {0}", ((int)value).ToString());
                         break;
                     case (int)TableColumn.FirstString:          // 構成名称
-                        strcmd.AppendFormat(" FirstString = '{0}'", value.ToString());
+                        strcmd.AppendFormat(" FirstString = {0}", SeparateString(value.ToString()));
                         break;
                     case (int)TableColumn.SecondString:         // 工種名称・協力会社名
-                        strcmd.AppendFormat(" SecondString = '{0}'", value.ToString());
+                        strcmd.AppendFormat(" SecondString = {0}", SeparateString(value.ToString()));
                         break;
                     case (int)TableColumn.EstimatePrice:        // 見積時金額
                         strcmd.AppendFormat(" EstimatePrice = {0}", ((int)value).ToString());
@@ -396,7 +396,7 @@
                         strcmd.AppendFormat(" NegotiationPrice = {0}", ((int)value).ToString());
                         break;
                     case (int)TableColumn.Notes:                // 注意事項
-                        strcmd.AppendFormat(" Notes = '{0}'", value.ToString());
+                        strcmd.AppendFormat(" Notes = {0}", SeparateString(value.ToString()));
                         break;
                 }
 
Index: trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOEstimateData.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOEstimateData.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOEstimateData.cs	(revision 484)
@@ -60,6 +60,44 @@
 
         #endregion
 
+        #region テーブルのフィールドリストを作成する
+        /// <summary>
+        /// テーブルのフィールドリストを作成する
+        /// </summary>
+        /// <returns></returns>
+        public static string CreateFieldNameList(string strAlias = "")
+        {
+            StringBuilder strcmd = new StringBuilder();
+            try
+            {
+                strcmd.Append(" ");
+                bool bColFirst = true;
+                string strWork = string.Empty;
+                foreach (var gender in Enum.GetValues(typeof(TableColumn)))
+                {
+                    strWork = gender.ToString();
+                    if (!bColFirst) strcmd.Append(",");
+                    if (strWork.Equals("EntryDate") || strWork.Equals("UpdateDate"))
+                    {
+                        strcmd.AppendFormat(" DATE_FORMAT({0}{1}, '%Y/%m/%d %H:%i:%s') As {1}", strAlias, strWork);
+                    }
+                    else
+                    {
+                        strcmd.AppendFormat(" {0}{1}", strAlias, strWork);
+                    }
+                    bColFirst = false;
+                }
+
+                return strcmd.ToString();
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("システムエラー：{0}：{1}：{2}", CommonMotions.GetMethodName(2), ex.Message, strcmd.ToString());
+                return string.Empty;
+            }
+        }
+        #endregion
+
         #region SQL作成
         /// <summary>
         /// SQL作成
@@ -66,26 +104,18 @@
         /// </summary>
         private string CreateSelectSQL()
         {
-            // SQL作成（DateTime型が変換できないのでCharに変換しておく）
             StringBuilder strcmd = new StringBuilder();
-            strcmd.Append("SELECT");
+            try
+            {
+                strcmd.AppendFormat("SELECT {0} FROM EstimateData", CreateFieldNameList());
 
-            strcmd.Append("  ConstructionCode");     // 工事番号
-            strcmd.Append(", LineCount");            // 行番号
-            strcmd.Append(", ComponentCode");        // 構成キー
-            strcmd.Append(", FixedItemCode");		// 固定項目キー
-            strcmd.Append(", ItemName");      		// 作業名称
-            strcmd.Append(", SpecName");      		// 品質・形状・寸法
-            strcmd.Append(", PriceValue");           // 金額
-            strcmd.Append(", Note");			        // 備考
-            strcmd.Append(", MyExpensesFlg");
-            strcmd.Append(", InputFlg");
-
-            strcmd.Append(", DATE_FORMAT(EntryDate, '%Y/%m/%d %H:%i:%s')");
-            strcmd.Append(", DATE_FORMAT(UpdateDate, '%Y/%m/%d %H:%i:%s')");
-            strcmd.Append(" FROM EstimateData");
-
-            return strcmd.ToString();
+                return strcmd.ToString();
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("システムエラー：{0}：{1}：{2}", CommonMotions.GetMethodName(2), ex.Message, strcmd.ToString());
+                return string.Empty;
+            }
         }
         #endregion
 
@@ -184,10 +214,10 @@
                 strcmd.AppendFormat(", {0}", work.LineCount);               // 行番号
                 strcmd.AppendFormat(", {0}", work.ComponentCode);           // 構成キー
                 strcmd.AppendFormat(",'{0}'", work.FixedItemCode);		    // 固定項目キー
-                strcmd.AppendFormat(",'{0}'", work.ItemName.Replace(",", "，"));     // 作業名称
-                strcmd.AppendFormat(",'{0}'", work.SpecName.Replace(",", "，"));     // 品質・形状・寸法
-                strcmd.AppendFormat(", {0}", work.PriceValue);                      // 金額
-                strcmd.AppendFormat(",'{0}'", work.Note.Replace(",", "，"));		// 備考
+                strcmd.AppendFormat(", {0}", SeparateString(work.ItemName));    // 作業名称
+                strcmd.AppendFormat(", {0}", SeparateString(work.SpecName));    // 品質・形状・寸法
+                strcmd.AppendFormat(", {0}", work.PriceValue);              // 金額
+                strcmd.AppendFormat(", {0}", SeparateString(work.Note));	// 備考
                 strcmd.AppendFormat(", {0}", work.MyExpensesFlg);           // 自社経費フラグ
                 strcmd.AppendFormat(", {0}", work.InputFlg);                // 入力フラグ
 
@@ -234,10 +264,10 @@
                     strcmd.AppendFormat(", {0}", work.LineCount);               // 行番号
                     strcmd.AppendFormat(", {0}", work.ComponentCode);           // 構成キー
                     strcmd.AppendFormat(",'{0}'", work.FixedItemCode);		    // 固定項目キー
-                    strcmd.AppendFormat(",'{0}'", work.ItemName.Replace(",", "，"));     // 作業名称
-                    strcmd.AppendFormat(",'{0}'", work.SpecName.Replace(",", "，"));     // 品質・形状・寸法
-                    strcmd.AppendFormat(", {0}", work.PriceValue);                      // 金額
-                    strcmd.AppendFormat(",'{0}'", work.Note.Replace(",", "，"));		// 備考
+                    strcmd.AppendFormat(", {0}", SeparateString(work.ItemName));    // 作業名称
+                    strcmd.AppendFormat(", {0}", SeparateString(work.SpecName));    // 品質・形状・寸法
+                    strcmd.AppendFormat(", {0}", work.PriceValue);              // 金額
+                    strcmd.AppendFormat(", {0}", SeparateString(work.Note));	// 備考
                     strcmd.AppendFormat(", {0}", work.MyExpensesFlg);           // 自社経費フラグ
                     strcmd.AppendFormat(", {0}", work.InputFlg);                // 入力フラグ
 
@@ -281,10 +311,10 @@
                 strcmd.AppendFormat(", LineCount = {0}", data.LineCount);               // 行番号
                 strcmd.AppendFormat(", ComponentCode = {0}", data.ComponentCode);       // 構成キー
                 strcmd.AppendFormat(", FixedItemCode = '{0}'", data.FixedItemCode);		// 固定項目キー
-                strcmd.AppendFormat(", ItemName = '{0}'", data.ItemName.Replace(",", "，"));      	// 作業名称
-                strcmd.AppendFormat(", SpecName = '{0}'", data.SpecName.Replace(",", "，"));      	// 品質・形状・寸法
+                strcmd.AppendFormat(", ItemName = {0}", SeparateString(data.ItemName));     // 作業名称
+                strcmd.AppendFormat(", SpecName = {0}", SeparateString(data.SpecName));     // 品質・形状・寸法
                 strcmd.AppendFormat(", PriceValue = {0}", data.PriceValue);             // 金額
-                strcmd.AppendFormat(", Note = '{0}'", data.Note.Replace(",", "，"));			    // 備考
+                strcmd.AppendFormat(", Note = {0}", SeparateString(data.Note));			// 備考
                 strcmd.AppendFormat(", MyExpensesFlg = {0}", data.MyExpensesFlg);       // 自社経費フラグ
                 strcmd.AppendFormat(", InputFlg = {0}", data.InputFlg);                 // 入力フラグ
 
@@ -355,19 +385,19 @@
                         strcmd.AppendFormat(" ComponentCode = {0}", ((int)value).ToString());
                         break;
                     case (int)TableColumn.FixedItemCode:        // 固定項目キー
-                        strcmd.AppendFormat(" FixedItemCode = {0}", ((int)value).ToString());
+                        strcmd.AppendFormat(" FixedItemCode = '{0}'", value.ToString());
                         break;
                     case (int)TableColumn.ItemName:             // 作業名称
-                        strcmd.AppendFormat(" ItemName = '{0}'", value.ToString());
+                        strcmd.AppendFormat(" ItemName = {0}", SeparateString(value.ToString()));
                         break;
                     case (int)TableColumn.SpecName:             // 品質・形状・寸法
-                        strcmd.AppendFormat(" SpecName = '{0}'", value.ToString());
+                        strcmd.AppendFormat(" SpecName = {0}", SeparateString(value.ToString()));
                         break;
                     case (int)TableColumn.PriceValue:           // 金額
                         strcmd.AppendFormat(" PriceValue = {0}", ((double)value).ToString());
                         break;
                     case (int)TableColumn.Note:                 // 備考
-                        strcmd.AppendFormat(" Note = '{0}'", value.ToString());
+                        strcmd.AppendFormat(" Note = {0}", SeparateString(value.ToString()));
                         break;
                     case (int)TableColumn.MyExpensesFlg:
                         strcmd.AppendFormat(" MyExpensesFlg = {0}", ((int)value).ToString());
Index: trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOEstimateDataBody.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOEstimateDataBody.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOEstimateDataBody.cs	(revision 484)
@@ -59,6 +59,44 @@
 
         #endregion
 
+        #region テーブルのフィールドリストを作成する
+        /// <summary>
+        /// テーブルのフィールドリストを作成する
+        /// </summary>
+        /// <returns></returns>
+        public static string CreateFieldNameList(string strAlias = "")
+        {
+            StringBuilder strcmd = new StringBuilder();
+            try
+            {
+                strcmd.Append(" ");
+                bool bColFirst = true;
+                string strWork = string.Empty;
+                foreach (var gender in Enum.GetValues(typeof(TableColumn)))
+                {
+                    strWork = gender.ToString();
+                    if (!bColFirst) strcmd.Append(",");
+                    if (strWork.Equals("EntryDate") || strWork.Equals("UpdateDate"))
+                    {
+                        strcmd.AppendFormat(" DATE_FORMAT({0}{1}, '%Y/%m/%d %H:%i:%s') As {1}", strAlias, strWork);
+                    }
+                    else
+                    {
+                        strcmd.AppendFormat(" {0}{1}", strAlias, strWork);
+                    }
+                    bColFirst = false;
+                }
+
+                return strcmd.ToString();
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("システムエラー：{0}：{1}：{2}", CommonMotions.GetMethodName(2), ex.Message, strcmd.ToString());
+                return string.Empty;
+            }
+        }
+        #endregion
+
         #region SQL作成
         /// <summary>
         /// SQL作成
@@ -65,24 +103,18 @@
         /// </summary>
         private string CreateSelectSQL()
         {
-            // SQL作成（DateTime型が変換できないのでCharに変換しておく）
             StringBuilder strcmd = new StringBuilder();
-            strcmd.Append("SELECT");
-            strcmd.Append("  ConstructionCode");         // 工事番号
-            strcmd.Append(", PageCount");		        // ページ番号
-            strcmd.Append(", Category");		            // 頁区分
-            strcmd.Append(", UnionComponentCode");		// 所属構成キー
-            strcmd.Append(", ComponentCode");		    // 構成キー
-            strcmd.Append(", ItemCode");		            // 工種キー
-            strcmd.Append(", SelectComponent");		    // 選択構成キー
-            strcmd.Append(", PageTitle");		        // ページ表示名
-            strcmd.Append(", DetailLineCount");          // 明細行番号
+            try
+            {
+                strcmd.AppendFormat("SELECT {0} FROM EstimateDataBody", CreateFieldNameList());
 
-            strcmd.Append(", DATE_FORMAT(EntryDate, '%Y/%m/%d %H:%i:%s')");
-            strcmd.Append(", DATE_FORMAT(UpdateDate, '%Y/%m/%d %H:%i:%s')");
-            strcmd.Append(" FROM EstimateDataBody");
-
-            return strcmd.ToString();
+                return strcmd.ToString();
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("システムエラー：{0}：{1}：{2}", CommonMotions.GetMethodName(2), ex.Message, strcmd.ToString());
+                return string.Empty;
+            }
         }
         #endregion
 
@@ -187,7 +219,7 @@
                 strcmd.AppendFormat(", {0}", work.ComponentCode);	    // 構成キー
                 strcmd.AppendFormat(", {0}", work.ItemCode);		    // 工種キー
                 strcmd.AppendFormat(", {0}", work.SelectComponent);	    // 選択構成キー
-                strcmd.AppendFormat(",'{0}'", work.PageTitle);	        // ページ表示名
+                strcmd.AppendFormat(", {0}", SeparateString(work.PageTitle));   // ページ表示名
                 strcmd.AppendFormat(", {0}", work.DetailLineCount);     // 明細行番号
 
                 strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.EntryDate);
@@ -241,7 +273,7 @@
                     strcmd.AppendFormat(", {0}", work.ComponentCode);	    // 構成キー
                     strcmd.AppendFormat(", {0}", work.ItemCode);		    // 工種キー
                     strcmd.AppendFormat(", {0}", work.SelectComponent);	    // 選択構成キー
-                    strcmd.AppendFormat(",'{0}'", work.PageTitle);	        // ページ表示名
+                    strcmd.AppendFormat(", {0}", SeparateString(work.PageTitle));   // ページ表示名
                     strcmd.AppendFormat(", {0}", work.DetailLineCount);     // 明細行番号
 
                     strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.EntryDate);
@@ -286,7 +318,7 @@
                 strcmd.AppendFormat(",ComponentCode = {0}", data.ComponentCode);        // 構成キー
                 strcmd.AppendFormat(",ItemCode = {0}", data.ItemCode);		            // 工種キー
                 strcmd.AppendFormat(",SelectComponent = {0}", data.SelectComponent);    // 選択構成キー
-                strcmd.AppendFormat(",PageTitle ='{0}'", data.PageTitle);                // ページ表示名
+                strcmd.AppendFormat(",PageTitle = {0}", SeparateString(data.PageTitle));    // ページ表示名
                 strcmd.AppendFormat(",DetailLineCount = {0}", data.DetailLineCount);    // 明細行番号
 
                 strcmd.Append(", UpdateDate = NOW()");
@@ -368,7 +400,7 @@
                         strcmd.AppendFormat(" SelectComponent = {0}", ((int)value).ToString());
                         break;
                     case (int)TableColumn.PageTitle:            // ページ表示名
-                        strcmd.AppendFormat(" PageTitle = '{0}'", value.ToString());
+                        strcmd.AppendFormat(" PageTitle = {0}", SeparateString(value.ToString()));
                         break;
                     case (int)TableColumn.DetailLineCount:      // 明細行番号
                         strcmd.AppendFormat(" DetailLineCount = {0}", ((int)value).ToString());
Index: trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOEstimateDataDetail.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOEstimateDataDetail.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOEstimateDataDetail.cs	(revision 484)
@@ -67,6 +67,44 @@
 
         #endregion
 
+        #region テーブルのフィールドリストを作成する
+        /// <summary>
+        /// テーブルのフィールドリストを作成する
+        /// </summary>
+        /// <returns></returns>
+        public static string CreateFieldNameList(string strAlias = "")
+        {
+            StringBuilder strcmd = new StringBuilder();
+            try
+            {
+                strcmd.Append(" ");
+                bool bColFirst = true;
+                string strWork = string.Empty;
+                foreach (var gender in Enum.GetValues(typeof(TableColumn)))
+                {
+                    strWork = gender.ToString();
+                    if (!bColFirst) strcmd.Append(",");
+                    if (strWork.Equals("EntryDate") || strWork.Equals("UpdateDate"))
+                    {
+                        strcmd.AppendFormat(" DATE_FORMAT({0}{1}, '%Y/%m/%d %H:%i:%s') As {1}", strAlias, strWork);
+                    }
+                    else
+                    {
+                        strcmd.AppendFormat(" {0}{1}", strAlias, strWork);
+                    }
+                    bColFirst = false;
+                }
+
+                return strcmd.ToString();
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("システムエラー：{0}：{1}：{2}", CommonMotions.GetMethodName(2), ex.Message, strcmd.ToString());
+                return string.Empty;
+            }
+        }
+        #endregion
+
         #region SQL作成
         /// <summary>
         /// SQL作成
@@ -74,33 +112,18 @@
         /// <returns></returns>
         private string CreateSelectSQL()
         {
-            // SQL作成（DateTime型が変換できないのでCharに変換しておく）
             StringBuilder strcmd = new StringBuilder();
-            strcmd.Append("SELECT");
+            try
+            {
+                strcmd.AppendFormat("SELECT {0} FROM EstimateDataDetail", CreateFieldNameList());
 
-            strcmd.Append("  ConstructionCode");         // 工事番号
-            strcmd.Append(", PageCount");		        // ページ番号
-            strcmd.Append(", LineCount");		        // 行番号
-            strcmd.Append(", DataType");                 // データイプ
-            strcmd.Append(", ComponentCode");		    // 構成キー（行）
-            strcmd.Append(", ItemCode");		            // 工種キー
-            strcmd.Append(", SpecCode");		            // 規格・寸法キー
-            strcmd.Append(", ItemName");		            // 作業名称
-            strcmd.Append(", SpecName");		            // 作業／品質・形状・寸法
-            strcmd.Append(", UnitCount");		        // 数量
-            strcmd.Append(", UnitName");		            // 単位
-            strcmd.Append(", UnitPrice");		        // 単価
-            strcmd.Append(", LineTotal");		        // 金額
-            strcmd.Append(", Note");			            // 備考
-            strcmd.Append(", CompanyCode");              // 協力会社コード
-            strcmd.Append(", MyExpensesFlg");
-            strcmd.Append(", InputFlg");
-
-            strcmd.Append(", DATE_FORMAT(EntryDate, '%Y/%m/%d %H:%i:%s')");
-            strcmd.Append(", DATE_FORMAT(UpdateDate, '%Y/%m/%d %H:%i:%s')");
-            strcmd.Append(" FROM EstimateDataDetail");
-
-            return strcmd.ToString();
+                return strcmd.ToString();
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("システムエラー：{0}：{1}：{2}", CommonMotions.GetMethodName(2), ex.Message, strcmd.ToString());
+                return string.Empty;
+            }
         }
         #endregion
 
@@ -208,13 +231,13 @@
                     strcmd.AppendFormat(", {0}", work.ComponentCode);	    // 構成キー
                     strcmd.AppendFormat(", {0}", work.ItemCode);		    // 工種キー
                     strcmd.AppendFormat(", {0}", work.SpecCode);		    // 規格・寸法キー
-                    strcmd.AppendFormat(",'{0}'", work.ItemName.Replace(",", "，").Replace("'", "’"));		    // 作業名称
-                    strcmd.AppendFormat(",'{0}'", work.SpecName.Replace(",", "，").Replace("'", "’"));		    // 作業／品質・形状・寸法
+                    strcmd.AppendFormat(", {0}", SeparateString(work.ItemName));	// 作業名称
+                    strcmd.AppendFormat(", {0}", SeparateString(work.SpecName));	// 作業／品質・形状・寸法
                     strcmd.AppendFormat(", {0}", work.UnitCount);		    // 数量
-                    strcmd.AppendFormat(",'{0}'", work.UnitName);		    // 単位
+                    strcmd.AppendFormat(", {0}", SeparateString(work.UnitName));    // 単位
                     strcmd.AppendFormat(", {0}", work.UnitPrice);		    // 単価
                     strcmd.AppendFormat(", {0}", work.LineTotal);		    // 金額
-                    strcmd.AppendFormat(",'{0}'", work.Note.Replace(",", "，").Replace("'", "’"));			    // 備考
+                    strcmd.AppendFormat(", {0}", SeparateString(work.Note));	    // 備考
                     strcmd.AppendFormat(", {0}", work.CompanyCode);		    // 協力会社コード
                     strcmd.AppendFormat(", {0}", work.MyExpensesFlg);       // 自社経費フラグ
                     strcmd.AppendFormat(", {0}", work.InputFlg);            // 入力フラグ
@@ -270,13 +293,13 @@
                     strcmd.AppendFormat(", {0}", work.ComponentCode);	    // 構成キー
                     strcmd.AppendFormat(", {0}", work.ItemCode);		    // 工種キー
                     strcmd.AppendFormat(", {0}", work.SpecCode);		    // 規格・寸法キー
-                    strcmd.AppendFormat(",'{0}'", work.ItemName.Replace(",", "，").Replace("'", "’"));		    // 作業名称
-                    strcmd.AppendFormat(",'{0}'", work.SpecName.Replace(",", "，").Replace("'", "’"));		    // 作業／品質・形状・寸法
+                    strcmd.AppendFormat(", {0}", SeparateString(work.ItemName));    // 作業名称
+                    strcmd.AppendFormat(", {0}", SeparateString(work.SpecName));	// 作業／品質・形状・寸法
                     strcmd.AppendFormat(", {0}", work.UnitCount);		    // 数量
-                    strcmd.AppendFormat(",'{0}'", work.UnitName);		    // 単位
+                    strcmd.AppendFormat(", {0}", SeparateString(work.UnitName));	// 単位
                     strcmd.AppendFormat(", {0}", work.UnitPrice);		    // 単価
                     strcmd.AppendFormat(", {0}", work.LineTotal);		    // 金額
-                    strcmd.AppendFormat(",'{0}'", work.Note.Replace(",", "，").Replace("'", "’"));			    // 備考
+                    strcmd.AppendFormat(", {0}", SeparateString(work.Note));	    // 備考
                     strcmd.AppendFormat(", {0}", work.CompanyCode);		    // 協力会社コード
                     strcmd.AppendFormat(", {0}", work.MyExpensesFlg);       // 自社経費フラグ
                     strcmd.AppendFormat(", {0}", work.InputFlg);            // 入力フラグ
@@ -324,13 +347,13 @@
                 strcmd.AppendFormat(",ComponentCode = {0}", data.ComponentCode);        // 構成キー（行）
                 strcmd.AppendFormat(",ItemCode = {0}", data.ItemCode);		            // 工種キー
                 strcmd.AppendFormat(",SpecCode = {0}", data.SpecCode);		            // 規格・寸法キー
-                strcmd.AppendFormat(",ItemName = '{0}'", data.ItemName.Replace(",", "，").Replace("'", "’"));		        // 作業名称
-                strcmd.AppendFormat(",SpecName = '{0}'", data.SpecName.Replace(",", "，").Replace("'", "’"));		        // 作業／品質・形状・寸法
+                strcmd.AppendFormat(",ItemName = {0}", SeparateString(data.ItemName));	// 作業名称
+                strcmd.AppendFormat(",SpecName = {0}", SeparateString(data.SpecName));	// 作業／品質・形状・寸法
                 strcmd.AppendFormat(",UnitCount = {0}", data.UnitCount);		        // 数量
-                strcmd.AppendFormat(",UnitName = '{0}'", data.UnitName);		        // 単位
+                strcmd.AppendFormat(",UnitName = {0}", SeparateString(data.UnitName));	// 単位
                 strcmd.AppendFormat(",UnitPrice = {0}", data.UnitPrice);		        // 単価
                 strcmd.AppendFormat(",LineTotal = {0}", data.LineTotal);		        // 金額
-                strcmd.AppendFormat(",Note = '{0}'", data.Note.Replace(",", "，").Replace("'", "’"));			            // 備考
+                strcmd.AppendFormat(",Note = {0}", SeparateString(data.Note));		    // 備考
                 strcmd.AppendFormat(",CompanyCode = {0}", data.CompanyCode);		    // 協力会社コード
                 strcmd.AppendFormat(",MyExpensesFlg = {0}", data.MyExpensesFlg);        // 自社経費フラグ
                 strcmd.AppendFormat(",InputFlg = {0}", data.InputFlg);                  // 入力フラグ
@@ -414,16 +437,16 @@
                         strcmd.AppendFormat(" SpecCode = {0}", ((int)value).ToString());
                         break;
                     case (int)TableColumn.ItemName:		        // 作業名称
-                        strcmd.AppendFormat(" ItemName = '{0}'", value.ToString());
+                        strcmd.AppendFormat(" ItemName = {0}", SeparateString(value.ToString()));
                         break;
                     case (int)TableColumn.SpecName:		        // 作業／品質・形状・寸法
-                        strcmd.AppendFormat(" SpecName = '{0}'", value.ToString());
+                        strcmd.AppendFormat(" SpecName = {0}", SeparateString(value.ToString()));
                         break;
                     case (int)TableColumn.UnitCount:		        // 数量
                         strcmd.AppendFormat(" UnitCount = {0}", ((double)value).ToString());
                         break;
                     case (int)TableColumn.UnitName:		        // 単位
-                        strcmd.AppendFormat(" UnitName = '{0}'", value.ToString());
+                        strcmd.AppendFormat(" UnitName = {0}", SeparateString(value.ToString()));
                         break;
                     case (int)TableColumn.UnitPrice:		        // 単価
                         strcmd.AppendFormat(" UnitPrice = {0}", ((double)value).ToString());
@@ -432,7 +455,7 @@
                         strcmd.AppendFormat(" LineTotal = {0}", ((double)value).ToString());
                         break;
                     case (int)TableColumn.Note:			        // 備考
-                        strcmd.AppendFormat(" Note = '{0}'", value.ToString());
+                        strcmd.AppendFormat(" Note = {0}", SeparateString(value.ToString()));
                         break;
                     case (int)TableColumn.CompanyCode:            // 協力会社コード
                         strcmd.AppendFormat(" CompanyCode = {0}", ((int)value).ToString());
Index: trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOInputBillingData.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOInputBillingData.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOInputBillingData.cs	(revision 484)
@@ -193,8 +193,8 @@
                 strcmd.AppendFormat(", {0}", data.TargetDate);
                 strcmd.AppendFormat(", {0}", data.SeqNo);
                 strcmd.AppendFormat(", {0}", data.ConstructionCode);
-                strcmd.AppendFormat(",'{0}'", data.FieldName);
-                strcmd.AppendFormat(",'{0}'", data.PersonName);
+                strcmd.AppendFormat(", {0}", SeparateString(data.FieldName));
+                strcmd.AppendFormat(", {0}", SeparateString(data.PersonName));
                 strcmd.AppendFormat(", {0}", data.BillPrice);
                 strcmd.AppendFormat(", {0}", data.ConsumptionTax);
                 strcmd.AppendFormat(", {0}", data.OtherPrice);
@@ -254,8 +254,8 @@
                     strcmd.AppendFormat(", {0}", work.TargetDate);
                     strcmd.AppendFormat(", {0}", work.SeqNo);
                     strcmd.AppendFormat(", {0}", work.ConstructionCode);
-                    strcmd.AppendFormat(",'{0}'", work.FieldName);
-                    strcmd.AppendFormat(",'{0}'", work.PersonName);
+                    strcmd.AppendFormat(", {0}", SeparateString(work.FieldName));
+                    strcmd.AppendFormat(", {0}", SeparateString(work.PersonName));
                     strcmd.AppendFormat(", {0}", work.BillPrice);
                     strcmd.AppendFormat(", {0}", work.ConsumptionTax);
                     strcmd.AppendFormat(", {0}", work.OtherPrice);
@@ -302,8 +302,8 @@
                 strcmd.AppendFormat(", TargetDate = {0}", data.TargetDate);
                 strcmd.AppendFormat(", SeqNo ={0}", data.SeqNo);
                 strcmd.AppendFormat(", ConstructionCode = {0}", data.ConstructionCode);
-                strcmd.AppendFormat(", FieldName = '{0}'", data.FieldName);
-                strcmd.AppendFormat(", PersonName = '{0}'", data.PersonName);
+                strcmd.AppendFormat(", FieldName = {0}", SeparateString(data.FieldName));
+                strcmd.AppendFormat(", PersonName = {0}", SeparateString(data.PersonName));
                 strcmd.AppendFormat(", BillPrice = {0}", data.BillPrice);
                 strcmd.AppendFormat(", ConsumptionTax = {0}", data.ConsumptionTax);
                 strcmd.AppendFormat(", OtherPrice = {0}", data.OtherPrice);
@@ -353,10 +353,10 @@
                         strcmd.AppendFormat(" SeqNo = {0}", (int)value);
                         break;
                     case (int)NameColumn.FieldName:
-                        strcmd.AppendFormat(" FieldName = '{0}'", value);
+                        strcmd.AppendFormat(" FieldName = {0}", SeparateString(value.ToString()));
                         break;
                     case (int)NameColumn.PersonName:
-                        strcmd.AppendFormat(" PersonName = '{0}'", value);
+                        strcmd.AppendFormat(" PersonName = {0}", SeparateString(value.ToString()));
                         break;
                     case (int)NameColumn.BillPrice:
                         strcmd.AppendFormat(" BillPrice = {0}", (long)value);
Index: trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOInputBillingDataDetail.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOInputBillingDataDetail.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOInputBillingDataDetail.cs	(revision 484)
@@ -201,13 +201,13 @@
                 strcmd.AppendFormat(", {0}", work.ConstructionCode);
                 strcmd.AppendFormat(", {0}", work.ConstructionRowCnt);
                 strcmd.AppendFormat(", {0}", work.ConstructionColCnt);
-                strcmd.AppendFormat(", '{0}'", work.FieldName);
-                strcmd.AppendFormat(", '{0}'", work.SecondString);
+                strcmd.AppendFormat(", {0}", SeparateString(work.FieldName));
+                strcmd.AppendFormat(", {0}", SeparateString(work.SecondString));
                 strcmd.AppendFormat(", {0}", work.BillPrice);
                 strcmd.AppendFormat(", {0}", work.HighwPrice);
                 strcmd.AppendFormat(", {0}", work.HardwPrice);
                 strcmd.AppendFormat(", {0}", work.IndsWasteTax);
-                strcmd.AppendFormat(", '{0}'", work.Note);
+                strcmd.AppendFormat(", {0}", SeparateString(work.Note));
                 strcmd.AppendFormat(", {0}", work.DeleteFlg);
 
                 strcmd.Append(", NOW()");
@@ -263,13 +263,13 @@
                     strcmd.AppendFormat(", {0}", work.ConstructionCode);
                     strcmd.AppendFormat(", {0}", work.ConstructionRowCnt);
                     strcmd.AppendFormat(", {0}", work.ConstructionColCnt);
-                    strcmd.AppendFormat(", '{0}'", work.FieldName);
-                    strcmd.AppendFormat(", '{0}'", work.SecondString);
+                    strcmd.AppendFormat(", {0}", SeparateString(work.FieldName));
+                    strcmd.AppendFormat(", {0}", SeparateString(work.SecondString));
                     strcmd.AppendFormat(", {0}", work.BillPrice);
                     strcmd.AppendFormat(", {0}", work.HighwPrice);
                     strcmd.AppendFormat(", {0}", work.HardwPrice);
                     strcmd.AppendFormat(", {0}", work.IndsWasteTax);
-                    strcmd.AppendFormat(", '{0}'", work.Note);
+                    strcmd.AppendFormat(", {0}", SeparateString(work.Note));
                     strcmd.AppendFormat(", {0}", work.DeleteFlg);
 
                     strcmd.Append(", NOW()");
@@ -313,13 +313,13 @@
                 strcmd.AppendFormat(", ConstructionCode = {0}", data.ConstructionCode);
                 strcmd.AppendFormat(", ConstructionRowCnt = {0}", data.ConstructionRowCnt);
                 strcmd.AppendFormat(", ConstructionColCnt = {0}", data.ConstructionColCnt);
-                strcmd.AppendFormat(", FieldName = '{0}'", data.FieldName);
-                strcmd.AppendFormat(", SecondString = '{0}'", data.SecondString);
+                strcmd.AppendFormat(", FieldName = {0}", SeparateString(data.FieldName));
+                strcmd.AppendFormat(", SecondString = {0}", SeparateString(data.SecondString));
                 strcmd.AppendFormat(", BillPrice = {0}", data.BillPrice);
                 strcmd.AppendFormat(", HighwPrice = {0}", data.HighwPrice);
                 strcmd.AppendFormat(", HardwPrice = {0}", data.HardwPrice);
                 strcmd.AppendFormat(", IndsWasteTax = {0}", data.IndsWasteTax);
-                strcmd.AppendFormat(", Note = '{0}'", data.Note);
+                strcmd.AppendFormat(", Note = {0}", SeparateString(data.Note));
                 strcmd.AppendFormat(", DeleteFlg = {0}", data.DeleteFlg);
 
                 strcmd.Append(", UpdateDate = NOW()");
@@ -377,10 +377,10 @@
                         strcmd.AppendFormat(" ConstructionColCnt = {0}", (int)value);
                         break;
                     case (int)NameColumn.FieldName:
-                        strcmd.AppendFormat(" FieldName = '{0}'", value.ToString());
+                        strcmd.AppendFormat(" FieldName = {0}", SeparateString(value.ToString()));
                         break;
                     case (int)NameColumn.SecondString:
-                        strcmd.AppendFormat(" SecondString = '{0}'", value.ToString());
+                        strcmd.AppendFormat(" SecondString = {0}", SeparateString(value.ToString()));
                         break;
                     case (int)NameColumn.BillPrice:
                         strcmd.AppendFormat(" BillPrice = {0}", (int)value);
@@ -395,7 +395,7 @@
                         strcmd.AppendFormat(" IndsWasteTax = {0}", (int)value);
                         break;
                     case (int)NameColumn.Note:
-                        strcmd.AppendFormat(" Note = '{0}'", value.ToString());
+                        strcmd.AppendFormat(" Note = {0}", SeparateString(value.ToString()));
                         break;
                     case (int)NameColumn.DeleteFlg:
                         strcmd.AppendFormat(" DeleteFlg = {0}", (int)value);
@@ -512,8 +512,6 @@
         /// <summary>
         /// 行ロック
         /// </summary>
-        /// <param name="MaterialItemCode"></param>
-        /// <param name="bConnect"></param>
         /// <returns></returns>
         public bool RowLock(int CompanyCode, int TargetDate, int SeqNo, int LineCount, int LabourKind, bool bConnect = true)
         {
Index: trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOInvoiceData.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOInvoiceData.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOInvoiceData.cs	(revision 484)
@@ -68,6 +68,62 @@
 
         #endregion
 
+        #region テーブルのフィールドリストを作成する
+        /// <summary>
+        /// テーブルのフィールドリストを作成する
+        /// </summary>
+        /// <returns></returns>
+        public static string CreateFieldNameList(string strAlias = "")
+        {
+            StringBuilder strcmd = new StringBuilder();
+            try
+            {
+                strcmd.Append(" ");
+                bool bColFirst = true;
+                string strWork = string.Empty;
+                foreach (var gender in Enum.GetValues(typeof(NameColumn)))
+                {
+                    strWork = gender.ToString();
+                    if (!bColFirst) strcmd.Append(",");
+                    if (strWork.Equals("EntryDate") || strWork.Equals("UpdateDate"))
+                    {
+                        strcmd.AppendFormat(" DATE_FORMAT({0}{1}, '%Y/%m/%d %H:%i:%s') As {1}", strAlias, strWork);
+                    }
+                    else
+                    {
+                        strcmd.AppendFormat(" {0}{1}", strAlias, strWork);
+                    }
+                    bColFirst = false;
+                }
+
+                return strcmd.ToString();
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("システムエラー：{0}：{1}：{2}", CommonMotions.GetMethodName(2), ex.Message, strcmd.ToString());
+                return string.Empty;
+            }
+        }
+        #endregion
+
+        #region SELECT　SQL作成
+        private string CreateSelectSQL()
+        {
+            StringBuilder strcmd = new StringBuilder();
+            try
+            {
+                strcmd.AppendFormat("SELECT {0} FROM InvoiceData", CreateFieldNameList());
+
+                return strcmd.ToString();
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("システムエラー：{0}：{1}：{2}", CommonMotions.GetMethodName(2), ex.Message, strcmd.ToString());
+                return string.Empty;
+            }
+        }
+        #endregion
+
         #region 請求書データ検索(１件取得)
         /// <summary>
         /// 請求書データ検索(複数件取得)
@@ -198,14 +254,14 @@
                 strcmd.AppendFormat(", {0}", data.SeqNo.ToString());
                 strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d')", data.CretateDate.ToShortDateString());
                 strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d')", data.RequestDate.ToShortDateString());
-                strcmd.AppendFormat(", '{0}'", data.RequestName.ToString());
+                strcmd.AppendFormat(", {0}", SeparateString(data.RequestName.ToString()));
                 strcmd.AppendFormat(", {0}", data.TotalAmount.ToString());    
                 strcmd.AppendFormat(", {0}", data.TaxAmount.ToString());
-                strcmd.AppendFormat(", '{0}'", data.Comment1.ToString());
-                strcmd.AppendFormat(", '{0}'", data.Comment2.ToString());
-                strcmd.AppendFormat(", '{0}'", data.Comment3.ToString());
-                strcmd.AppendFormat(", '{0}'", data.Comment4.ToString());
-                strcmd.AppendFormat(", '{0}'", data.Comment5.ToString());
+                strcmd.AppendFormat(", {0}", SeparateString(data.Comment1.ToString()));
+                strcmd.AppendFormat(", {0}", SeparateString(data.Comment2.ToString()));
+                strcmd.AppendFormat(", {0}", SeparateString(data.Comment3.ToString()));
+                strcmd.AppendFormat(", {0}", SeparateString(data.Comment4.ToString()));
+                strcmd.AppendFormat(", {0}", SeparateString(data.Comment5.ToString()));
                 strcmd.AppendFormat(", {0}", data.CompleteFlg.ToString());
                 strcmd.AppendFormat(", {0}", data.DeleteFlg.ToString());
                 strcmd.Append(", NOW()");
@@ -247,14 +303,14 @@
                 strcmd.AppendFormat(", SeqNo = {0}", data.SeqNo.ToString());
                 strcmd.AppendFormat(", CretateDate = STR_TO_DATE('{0}','%Y/%m/%d')", data.CretateDate.ToShortDateString());
                 strcmd.AppendFormat(", RequestDate = STR_TO_DATE('{0}','%Y/%m/%d')", data.RequestDate.ToShortDateString());
-                strcmd.AppendFormat(", RequestName = '{0}'", data.RequestName.ToString());
+                strcmd.AppendFormat(", RequestName = {0}", SeparateString(data.RequestName.ToString()));
                 strcmd.AppendFormat(", TotalAmount = {0}", data.TotalAmount.ToString());
                 strcmd.AppendFormat(", TaxAmount = {0}", data.TaxAmount.ToString());
-                strcmd.AppendFormat(", Comment1 = '{0}'", data.Comment1.ToString());
-                strcmd.AppendFormat(", Comment2 = '{0}'", data.Comment2.ToString());
-                strcmd.AppendFormat(", Comment3 = '{0}'", data.Comment3.ToString());
-                strcmd.AppendFormat(", Comment4 = '{0}'", data.Comment4.ToString());
-                strcmd.AppendFormat(", Comment5 = '{0}'", data.Comment5.ToString());
+                strcmd.AppendFormat(", Comment1 = {0}", SeparateString(data.Comment1.ToString()));
+                strcmd.AppendFormat(", Comment2 = {0}", SeparateString(data.Comment2.ToString()));
+                strcmd.AppendFormat(", Comment3 = {0}", SeparateString(data.Comment3.ToString()));
+                strcmd.AppendFormat(", Comment4 = {0}", SeparateString(data.Comment4.ToString()));
+                strcmd.AppendFormat(", Comment5 = {0}", SeparateString(data.Comment5.ToString()));
                 strcmd.AppendFormat(", CompleteFlg = {0}", data.CompleteFlg.ToString());
                 strcmd.AppendFormat(", DeleteFlg = {0}", data.DeleteFlg.ToString());
                 strcmd.Append(", UpdateDate = NOW()");
@@ -462,8 +518,7 @@
 
             try
             {
-                //sql.AppendFormat("SELECT IFNULL(MAX(InvoiceNo),0) FROM InvoiceData WHERE RequestMonth = {0}", RequestMonth);
-                sql.AppendFormat("SELECT IFNULL(MAX(InvoiceNo), {0}) + 1 As NewReqNo FROM RequestHead AS A", RequestMonth * 1000);
+                sql.AppendFormat("SELECT IFNULL(MAX(InvoiceNo), {0}) + 1 As NewReqNo FROM INVOICEDATA AS A", RequestMonth * 1000);
                 sql.AppendFormat(" WHERE REQUESTMONTH = {0}", RequestMonth);
 
                 // SQL実行
@@ -473,22 +528,6 @@
                 object[] objwrk = (object[])arData[0];
                 ret = int.Parse(objwrk[0].ToString());
 
-                //// データセット
-                //foreach (object[] objwrk in arData)
-                //{
-                //    ret = int.Parse(objwrk[0].ToString());
-                //    break;
-                //}
-
-                //if (ret > 0)
-                //{
-                //    ret++;
-                //}
-                //else
-                //{
-                //    ret = (RequestMonth * 1000) + 1;
-                //}
-
             }
             catch (Exception ex)
             {
@@ -537,38 +576,6 @@
 
         }
         #endregion
-
-        #region SELECT　SQL作成
-        private string CreateSelectSQL()
-        {
-            StringBuilder strcmd = new StringBuilder();
-
-            strcmd.Append("SELECT ");
-
-            bool bColFirst = true;
-            string strWork = string.Empty;
-            foreach (var gender in Enum.GetValues(typeof(NameColumn)))
-            {
-                strWork = gender.ToString();
-                if (!bColFirst) strcmd.Append(",");
-                if (strWork.Equals("EntryDate") || strWork.Equals("UpdateDate"))
-                {
-                    strcmd.AppendFormat(" DATE_FORMAT({0}, '%Y/%m/%d %H:%i:%s')", strWork);
-                }
-                else
-                {
-                    strcmd.AppendFormat(" {0}", strWork);
-                }
-                bColFirst = false;
-            }
-
-            strcmd.Append(" FROM InvoiceData");
-
-            return strcmd.ToString();
-        }
-        #endregion
-
-
     }
 
 }
Index: trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOMBudgetSumCode.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOMBudgetSumCode.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOMBudgetSumCode.cs	(revision 484)
@@ -182,11 +182,11 @@
                 }
                 strcmd.Append(") VALUES (");
 
-                strcmd.AppendFormat(" {0}", work.BlockCode);                // ブロック番号
-                strcmd.AppendFormat(", {0}", work.GroupCode);               // グループ番号
-                strcmd.AppendFormat(", {0}", work.ComponentCode);           // 構成キー
-                strcmd.AppendFormat(", {0}", work.ItemCode);                // 工種キー
-                strcmd.AppendFormat(",'{0}'", work.ElementsName);           // 構成名称
+                strcmd.AppendFormat(" {0}", work.BlockCode);                        // ブロック番号
+                strcmd.AppendFormat(", {0}", work.GroupCode);                       // グループ番号
+                strcmd.AppendFormat(", {0}", work.ComponentCode);                   // 構成キー
+                strcmd.AppendFormat(", {0}", work.ItemCode);                        // 工種キー
+                strcmd.AppendFormat(", {0}", SeparateString(work.ElementsName));    // 構成名称
 
                 strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.EntryDate);
                 strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.UpdateDate);
@@ -232,11 +232,11 @@
                     if (bDataFirst) strcmd.Append(" (");
                     else strcmd.Append(", (");
 
-                    strcmd.AppendFormat(" {0}", work.BlockCode);                // ブロック番号
-                    strcmd.AppendFormat(", {0}", work.GroupCode);               // グループ番号
-                    strcmd.AppendFormat(", {0}", work.ComponentCode);           // 構成キー
-                    strcmd.AppendFormat(", {0}", work.ItemCode);                // 工種キー
-                    strcmd.AppendFormat(",'{0}'", work.ElementsName);           // 構成名称
+                    strcmd.AppendFormat(" {0}", work.BlockCode);                        // ブロック番号
+                    strcmd.AppendFormat(", {0}", work.GroupCode);                       // グループ番号
+                    strcmd.AppendFormat(", {0}", work.ComponentCode);                   // 構成キー
+                    strcmd.AppendFormat(", {0}", work.ItemCode);                        // 工種キー
+                    strcmd.AppendFormat(", {0}", SeparateString(work.ElementsName));    // 構成名称
 
                     strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.EntryDate);
                     strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.UpdateDate);
@@ -274,11 +274,11 @@
 
                 strcmd.Append(" SET");
 
-                strcmd.AppendFormat(" BlockCode = {0}", data.BlockCode);            // ブロック番号
-                strcmd.AppendFormat(", GroupCode = {0}", data.GroupCode);           // グループ番号
-                strcmd.AppendFormat(", ComponentCode = {0}", data.ComponentCode);   // 構成キー
-                strcmd.AppendFormat(", ItemCode = {0}", data.ItemCode);             // 工種キー
-                strcmd.AppendFormat(", ElementsName = '{0}'", data.ElementsName);   // 構成名称
+                strcmd.AppendFormat(" BlockCode = {0}", data.BlockCode);                        // ブロック番号
+                strcmd.AppendFormat(", GroupCode = {0}", data.GroupCode);                       // グループ番号
+                strcmd.AppendFormat(", ComponentCode = {0}", data.ComponentCode);               // 構成キー
+                strcmd.AppendFormat(", ItemCode = {0}", data.ItemCode);                         // 工種キー
+                strcmd.AppendFormat(", ElementsName = {0}", SeparateString(data.ElementsName)); // 構成名称
 
                 strcmd.Append(", UpdateDate = NOW()");
                 strcmd.Append(AddSQLString);
@@ -350,7 +350,7 @@
                         strcmd.AppendFormat(" ItemCode = {0}", ((int)value).ToString());
                         break;
                     case (int)TableColumn.ElementsName:                // 構成名称
-                        strcmd.AppendFormat(" ElementsName = '{0}'", value.ToString());
+                        strcmd.AppendFormat(" ElementsName = {0}", SeparateString(value.ToString()));
                         break;
                 }
 
Index: trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOMBusinessType.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOMBusinessType.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOMBusinessType.cs	(revision 484)
@@ -129,7 +129,7 @@
 
                     strcmd.AppendFormat("  {0}", work.BusinessTypeCode.ToString());
                     strcmd.AppendFormat(", {0}", work.DisplayOrder.ToString());
-                    strcmd.AppendFormat(", '{0}'", work.BusinessTypeName);
+                    strcmd.AppendFormat(", {0}", SeparateString(work.BusinessTypeName));
 
                     strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.EntryDate);
                     strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.UpdateDate);
@@ -169,7 +169,7 @@
 
                 strcmd.AppendFormat(" BusinessTypeCode = {0}", data.BusinessTypeCode.ToString());
                 strcmd.AppendFormat(",DisplayOrder = {0}", data.DisplayOrder.ToString());
-                strcmd.AppendFormat(",BusinessTypeName = '{0}'", data.BusinessTypeName);
+                strcmd.AppendFormat(",BusinessTypeName = {0}", SeparateString(data.BusinessTypeName));
 
                 strcmd.Append(", UpdateDate = NOW()");
                 strcmd.Append(AddSQLString);
Index: trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOMCategoryName.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOMCategoryName.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOMCategoryName.cs	(revision 484)
@@ -128,7 +128,7 @@
                     strcmd.AppendFormat("  {0}", work.NameCode.ToString());
                     strcmd.AppendFormat(", {0}", work.CategoryCode.ToString());
                     strcmd.AppendFormat(", {0}", work.DisplayOrder.ToString());
-                    strcmd.AppendFormat(",'{0}'", work.CategoryName.ToString());
+                    strcmd.AppendFormat(", {0}", SeparateString(work.CategoryName.ToString()));
                     strcmd.AppendFormat(", {0}", work.DeleteFlg.ToString());
 
                     strcmd.Append(", NOW()");
@@ -167,7 +167,7 @@
                 strcmd.AppendFormat(" NameCode = {0}", data.NameCode.ToString());
                 strcmd.AppendFormat(",CategoryCode = {0}", data.CategoryCode.ToString());
                 strcmd.AppendFormat(",DisplayOrder = {0}", data.DisplayOrder.ToString());
-                strcmd.AppendFormat(",CategoryName ='{0}'", data.CategoryName.ToString());
+                strcmd.AppendFormat(",CategoryName = {0}", SeparateString(data.CategoryName.ToString()));
                 strcmd.AppendFormat(",DeleteFlg = {0}", data.DeleteFlg.ToString());
 
                 strcmd.Append(", UpdateDate = NOW()");
Index: trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOMChgChargeDep.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOMChgChargeDep.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOMChgChargeDep.cs	(revision 484)
@@ -56,6 +56,48 @@
 
         #endregion
 
+        #region テーブルのフィールドリストを作成する
+        /// <summary>
+        /// テーブルのフィールドリストを作成する
+        /// </summary>
+        /// <returns></returns>
+        public static string CreateFieldNameList(string strAlias = "")
+        {
+            StringBuilder strcmd = new StringBuilder();
+            try
+            {
+                strcmd.Append(" ");
+                bool bColFirst = true;
+                string strWork = string.Empty;
+                foreach (var gender in Enum.GetValues(typeof(ColumnCnt)))
+                {
+                    strWork = gender.ToString();
+                    if (!bColFirst) strcmd.Append(",");
+                    if (strWork.Equals("EntryDate") || strWork.Equals("UpdateDate"))
+                    {
+                        strcmd.AppendFormat(" DATE_FORMAT({0}{1}, '%Y/%m/%d %H:%i:%s') As {1}", strAlias, strWork);
+                    }
+                    else if (strWork.Equals("StartDate") || strWork.Equals("CompDate"))
+                    {
+                        strcmd.AppendFormat(" DATE({0}{1}) As {1}", strAlias, strWork);
+                    }
+                    else
+                    {
+                        strcmd.AppendFormat(" {0}{1}", strAlias, strWork);
+                    }
+                    bColFirst = false;
+                }
+
+                return strcmd.ToString();
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("システムエラー：{0}：{1}：{2}", CommonMotions.GetMethodName(2), ex.Message, strcmd.ToString());
+                return string.Empty;
+            }
+        }
+        #endregion
+
         #region 担当者部署履歴データ検索文字列作成
         /// <summary>
         /// 担当者部署履歴データ検索文字列作成
@@ -66,20 +108,17 @@
         private string CreateSelectSQL()
         {
             StringBuilder strcmd = new StringBuilder();
-            strcmd.Append("SELECT");
-            strcmd.Append("  PersonCode");
-            strcmd.Append(", DATE_FORMAT(StartDate, '%Y/%m/%d')");
+            try
+            {
+                strcmd.AppendFormat("SELECT {0} FROM ChgChargeDep", CreateFieldNameList());
 
-            strcmd.Append(", DATE_FORMAT(CompDate, '%Y/%m/%d')");
-            strcmd.Append(", DepartmentCode");
-            strcmd.Append(", DepartmentName");
-
-            strcmd.Append(", DATE_FORMAT(EntryDate, '%Y/%m/%d %H:%i:%s')");
-            strcmd.Append(", DATE_FORMAT(UpdateDate, '%Y/%m/%d %H:%i:%s')");
-
-            strcmd.Append(" FROM ChgChargeDep");
-
-            return strcmd.ToString();
+                return strcmd.ToString();
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("システムエラー：{0}：{1}：{2}", CommonMotions.GetMethodName(2), ex.Message, strcmd.ToString());
+                return string.Empty;
+            }
         }
         #endregion
 
@@ -192,7 +231,7 @@
 
                 strcmd.AppendFormat(", STR_TO_DATE('{0}', '%Y/%m/%d')", work.CompDate.ToShortDateString());
                 strcmd.AppendFormat(", {0}", work.DepartmentCode);
-                strcmd.AppendFormat(",'{0}'", work.DepartmentName);
+                strcmd.AppendFormat(", {0}", SeparateString(work.DepartmentName));
 
                 strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.EntryDate);
                 strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.UpdateDate);
@@ -243,7 +282,7 @@
 
                     strcmd.AppendFormat(", STR_TO_DATE('{0}', '%Y/%m/%d')", work.CompDate.ToShortDateString());
                     strcmd.AppendFormat(", {0}", work.DepartmentCode);
-                    strcmd.AppendFormat(",'{0}'", work.DepartmentName);
+                    strcmd.AppendFormat(", {0}", SeparateString(work.DepartmentName));
 
                     strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.EntryDate);
                     strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.UpdateDate);
@@ -287,7 +326,7 @@
                 strcmd.AppendFormat(", CompDate = STR_TO_DATE('{0}' ,'%Y/%m/%d')", data.CompDate.ToShortDateString());
 
                 strcmd.AppendFormat(", DepartmentCode = {0}", data.DepartmentCode);
-                strcmd.AppendFormat(", DepartmentName = '{0}'", data.DepartmentName);
+                strcmd.AppendFormat(", DepartmentName = {0}", SeparateString(data.DepartmentName));
 
                 strcmd.Append(", UpdateDate = NOW()");
                 strcmd.Append(AddSQLString);
@@ -363,7 +402,7 @@
                         strcmd.AppendFormat(" DepartmentCode = {0}", ((int)value).ToString());
                         break;
                     case (int)ColumnCnt.DepartmentName:
-                        strcmd.AppendFormat(" DepartmentName = '{0}'", value.ToString());
+                        strcmd.AppendFormat(" DepartmentName = {0}", SeparateString(value.ToString()));
                         break;
                 }
 
Index: trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOMCommonCostLarge.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOMCommonCostLarge.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOMCommonCostLarge.cs	(revision 484)
@@ -190,8 +190,8 @@
 
                     strcmd.AppendFormat("  {0}", work.LargeCode.ToString());
                     strcmd.AppendFormat(", {0}", work.DisplayOrder.ToString());
-                    strcmd.AppendFormat(", '{0}'", work.LargeName);
-                    strcmd.AppendFormat(", '{0}'", work.CommentText);
+                    strcmd.AppendFormat(", {0}", SeparateString(work.LargeName));
+                    strcmd.AppendFormat(", {0}", SeparateString(work.CommentText));
                     strcmd.AppendFormat(", {0}", work.DeleteFlg.ToString());
 
                     strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.EntryDate);
@@ -232,8 +232,8 @@
 
                 strcmd.AppendFormat(" LargeCode = {0}", data.LargeCode.ToString());
                 strcmd.AppendFormat(",DisplayOrder = {0}", data.DisplayOrder.ToString());
-                strcmd.AppendFormat(",LargeName = '{0}'", data.LargeName);
-                strcmd.AppendFormat(",CommentText = '{0}'", data.CommentText);
+                strcmd.AppendFormat(",LargeName = {0}", SeparateString(data.LargeName));
+                strcmd.AppendFormat(",CommentText = {0}", SeparateString(data.CommentText));
                 strcmd.AppendFormat(",DeleteFlg = {0}", data.DeleteFlg.ToString());
 
                 strcmd.Append(", UpdateDate = NOW()");
Index: trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOMCommonCostMiddle.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOMCommonCostMiddle.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOMCommonCostMiddle.cs	(revision 484)
@@ -195,8 +195,8 @@
                     strcmd.AppendFormat("  {0}", work.LargeCode.ToString());
                     strcmd.AppendFormat(", {0}", work.MiddleCode.ToString());
                     strcmd.AppendFormat(", {0}", work.DisplayOrder.ToString());
-                    strcmd.AppendFormat(", '{0}'", work.MiddleName);
-                    strcmd.AppendFormat(", '{0}'", work.CommentText);
+                    strcmd.AppendFormat(", {0}", SeparateString(work.MiddleName));
+                    strcmd.AppendFormat(", {0}", SeparateString(work.CommentText));
                     strcmd.AppendFormat(", {0}", work.DeleteFlg.ToString());
 
                     strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.EntryDate);
@@ -238,8 +238,8 @@
                 strcmd.AppendFormat(" LargeCode = {0}", data.LargeCode.ToString());
                 strcmd.AppendFormat(" MiddleCode = {0}", data.MiddleCode.ToString());
                 strcmd.AppendFormat(",DisplayOrder = {0}", data.DisplayOrder.ToString());
-                strcmd.AppendFormat(",MiddleName = '{0}'", data.MiddleName);
-                strcmd.AppendFormat(",CommentText = '{0}'", data.CommentText);
+                strcmd.AppendFormat(",MiddleName = {0}", SeparateString(data.MiddleName));
+                strcmd.AppendFormat(",CommentText = {0}", SeparateString(data.CommentText));
                 strcmd.AppendFormat(",DeleteFlg = {0}", data.DeleteFlg.ToString());
 
                 strcmd.Append(", UpdateDate = NOW()");
Index: trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOMCommonCostMiddleSearchWord.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOMCommonCostMiddleSearchWord.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOMCommonCostMiddleSearchWord.cs	(revision 484)
@@ -186,7 +186,7 @@
                 strcmd.AppendFormat("  {0}", work.LargeCode.ToString());
                 strcmd.AppendFormat(", {0}", work.MiddleCode.ToString());
                 strcmd.AppendFormat(", {0}", work.SeqNo.ToString());
-                strcmd.AppendFormat(", '{0}'", work.SearchWord);
+                strcmd.AppendFormat(", {0}", SeparateString(work.SearchWord));
 
                 strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.EntryDate);
                 strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.UpdateDate);
@@ -235,7 +235,7 @@
                     strcmd.AppendFormat("  {0}", work.LargeCode.ToString());
                     strcmd.AppendFormat(", {0}", work.MiddleCode.ToString());
                     strcmd.AppendFormat(", {0}", work.SeqNo.ToString());
-                    strcmd.AppendFormat(", '{0}'", work.SearchWord);
+                    strcmd.AppendFormat(", {0}", SeparateString(work.SearchWord));
 
                     strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.EntryDate);
                     strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.UpdateDate);
@@ -276,7 +276,7 @@
                 strcmd.AppendFormat(" LargeCode = {0}", data.LargeCode.ToString());
                 strcmd.AppendFormat(" MiddleCode = {0}", data.MiddleCode.ToString());
                 strcmd.AppendFormat(",SeqNo = {0}", data.SeqNo.ToString());
-                strcmd.AppendFormat(",SearchWord = '{0}'", data.SearchWord);
+                strcmd.AppendFormat(",SearchWord = {0}", SeparateString(data.SearchWord));
 
                 strcmd.Append(", UpdateDate = NOW()");
                 strcmd.Append(AddSQLString);
Index: trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOMComponent.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOMComponent.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOMComponent.cs	(revision 484)
@@ -57,6 +57,44 @@
 
         #endregion
 
+        #region テーブルのフィールドリストを作成する
+        /// <summary>
+        /// テーブルのフィールドリストを作成する
+        /// </summary>
+        /// <returns></returns>
+        public static string CreateFieldNameList(string strAlias = "")
+        {
+            StringBuilder strcmd = new StringBuilder();
+            try
+            {
+                strcmd.Append(" ");
+                bool bColFirst = true;
+                string strWork = string.Empty;
+                foreach (var gender in Enum.GetValues(typeof(NameColumn)))
+                {
+                    strWork = gender.ToString();
+                    if (!bColFirst) strcmd.Append(",");
+                    if (strWork.Equals("EntryDate") || strWork.Equals("UpdateDate"))
+                    {
+                        strcmd.AppendFormat(" DATE_FORMAT({0}{1}, '%Y/%m/%d %H:%i:%s') As {1}", strAlias, strWork);
+                    }
+                    else
+                    {
+                        strcmd.AppendFormat(" {0}{1}", strAlias, strWork);
+                    }
+                    bColFirst = false;
+                }
+
+                return strcmd.ToString();
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("システムエラー：{0}：{1}：{2}", CommonMotions.GetMethodName(2), ex.Message, strcmd.ToString());
+                return string.Empty;
+            }
+        }
+        #endregion
+
         #region 工事構成マスタ検索文字作成
         /// <summary>
         /// 工事構成マスタ検索文字作成
@@ -66,21 +104,18 @@
         /// <returns>true：成功 false：失敗</returns>
         private string CreateSelectSQL()
         {
-            // SQL作成（DateTime型が変換できないのでCharに変換しておく）
             StringBuilder strcmd = new StringBuilder();
-            strcmd.Append("SELECT");
-            strcmd.Append("  ComponentCode");
-            strcmd.Append(", DisplayOrder");
-            strcmd.Append(", ComponentName");
-            strcmd.Append(", SubitemsFlg");
-            strcmd.Append(", DirectInputFlg");
-            strcmd.Append(", MyExpensesFlg");
-            strcmd.Append(", DeleteFlg");
-            strcmd.Append(", DATE_FORMAT(EntryDate, '%Y/%m/%d %H:%i:%s')");
-            strcmd.Append(", DATE_FORMAT(UpdateDate, '%Y/%m/%d %H:%i:%s')");
-            strcmd.Append(" FROM ComponentMaster");
+            try
+            {
+                strcmd.AppendFormat("SELECT {0} FROM ComponentMaster", CreateFieldNameList());
 
-            return strcmd.ToString();
+                return strcmd.ToString();
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("システムエラー：{0}：{1}：{2}", CommonMotions.GetMethodName(2), ex.Message, strcmd.ToString());
+                return string.Empty;
+            }
         }
         #endregion
 
@@ -191,7 +226,7 @@
 
                 strcmd.AppendFormat("  {0}", data.ComponentCode.ToString());
                 strcmd.AppendFormat(", {0}", data.DisplayOrder.ToString());
-                strcmd.AppendFormat(", '{0}'", data.ComponentName);
+                strcmd.AppendFormat(", {0}", SeparateString(data.ComponentName));
                 strcmd.AppendFormat(", {0}", data.SubitemsFlg.ToString());
                 strcmd.AppendFormat(", {0}", data.DirectInputFlg.ToString());
                 strcmd.AppendFormat(", {0}", data.MyExpensesFlg.ToString());
@@ -243,7 +278,7 @@
 
                     strcmd.AppendFormat("  {0}", work.ComponentCode.ToString());
                     strcmd.AppendFormat(", {0}", work.DisplayOrder.ToString());
-                    strcmd.AppendFormat(", '{0}'", work.ComponentName);
+                    strcmd.AppendFormat(", {0}", SeparateString(work.ComponentName));
                     strcmd.AppendFormat(", {0}", work.SubitemsFlg.ToString());
                     strcmd.AppendFormat(", {0}", work.DirectInputFlg.ToString());
                     strcmd.AppendFormat(", {0}", work.MyExpensesFlg.ToString());
@@ -287,7 +322,7 @@
 
                 strcmd.AppendFormat(" ComponentCode = {0}", data.ComponentCode.ToString());
                 strcmd.AppendFormat(",DisplayOrder = {0}", data.DisplayOrder.ToString());
-                strcmd.AppendFormat(",ComponentName = '{0}'", data.ComponentName);
+                strcmd.AppendFormat(",ComponentName = {0}", SeparateString(data.ComponentName));
                 strcmd.AppendFormat(",SubitemsFlg = {0}", data.SubitemsFlg.ToString());
                 strcmd.AppendFormat(",DirectInputFlg = {0}", data.DirectInputFlg.ToString());
                 strcmd.AppendFormat(",MyExpensesFlg = {0}", data.MyExpensesFlg.ToString());
@@ -330,7 +365,7 @@
                         strcmd.AppendFormat(" DisplayOrder = {0}", ((int)value).ToString());
                         break;
                     case (int)NameColumn.ComponentName:
-                        strcmd.AppendFormat(" ComponentName = '{0}'", value.ToString());
+                        strcmd.AppendFormat(" ComponentName = {0}", SeparateString(value.ToString()));
                         break;
                     case (int)NameColumn.SubitemsFlg:
                         strcmd.AppendFormat(" SubitemsFlg = {0}", ((int)value).ToString());
Index: trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOMConstructionItem.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOMConstructionItem.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOMConstructionItem.cs	(revision 484)
@@ -56,6 +56,44 @@
 
         #endregion
 
+        #region テーブルのフィールドリストを作成する
+        /// <summary>
+        /// テーブルのフィールドリストを作成する
+        /// </summary>
+        /// <returns></returns>
+        public static string CreateFieldNameList(string strAlias = "")
+        {
+            StringBuilder strcmd = new StringBuilder();
+            try
+            {
+                strcmd.Append(" ");
+                bool bColFirst = true;
+                string strWork = string.Empty;
+                foreach (var gender in Enum.GetValues(typeof(NameColumn)))
+                {
+                    strWork = gender.ToString();
+                    if (!bColFirst) strcmd.Append(",");
+                    if (strWork.Equals("EntryDate") || strWork.Equals("UpdateDate"))
+                    {
+                        strcmd.AppendFormat(" DATE_FORMAT({0}{1}, '%Y/%m/%d %H:%i:%s') As {1}", strAlias, strWork);
+                    }
+                    else
+                    {
+                        strcmd.AppendFormat(" {0}{1}", strAlias, strWork);
+                    }
+                    bColFirst = false;
+                }
+
+                return strcmd.ToString();
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("システムエラー：{0}：{1}：{2}", CommonMotions.GetMethodName(2), ex.Message, strcmd.ToString());
+                return string.Empty;
+            }
+        }
+        #endregion
+
         #region 工事項目マスタ検索SQL作成
         /// <summary>
         /// 工事項目マスタ検索SQL作成
@@ -65,20 +103,18 @@
         /// <returns>true：成功 false：失敗</returns>
         private string CreateSelectSQL()
         {
-            // SQL作成（DateTime型が変換できないのでCharに変換しておく）
             StringBuilder strcmd = new StringBuilder();
-            strcmd.Append("SELECT");
-            strcmd.Append("  ItemCode");
-            strcmd.Append(", DisplayOrder");
-            strcmd.Append(", ItemName");
-            strcmd.Append(", SubitemsFlg");
-            strcmd.Append(", MyExpensesFlg");
-            strcmd.Append(", DeleteFlg");
-            strcmd.Append(", DATE_FORMAT(EntryDate, '%Y/%m/%d %H:%i:%s')");
-            strcmd.Append(", DATE_FORMAT(UpdateDate, '%Y/%m/%d %H:%i:%s')");
-            strcmd.Append(" FROM ConstructionItemMaster");
+            try
+            {
+                strcmd.AppendFormat("SELECT {0} FROM ConstructionItemMaster", CreateFieldNameList());
 
-            return strcmd.ToString();
+                return strcmd.ToString();
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("システムエラー：{0}：{1}：{2}", CommonMotions.GetMethodName(2), ex.Message, strcmd.ToString());
+                return string.Empty;
+            }
         }
         #endregion
 
@@ -189,7 +225,7 @@
 
                 strcmd.AppendFormat("  {0}", work.ItemCode.ToString());
                 strcmd.AppendFormat(", {0}", work.DisplayOrder.ToString());
-                strcmd.AppendFormat(", '{0}'", work.ItemName);
+                strcmd.AppendFormat(", {0}", SeparateString(work.ItemName));
                 strcmd.AppendFormat(", {0}", work.SubitemsFlg.ToString());
                 strcmd.AppendFormat(", {0}", work.MyExpensesFlg.ToString());
                 strcmd.AppendFormat(", {0}", work.DeleteFlg.ToString());
@@ -240,7 +276,7 @@
 
                     strcmd.AppendFormat("  {0}", work.ItemCode.ToString());
                     strcmd.AppendFormat(", {0}", work.DisplayOrder.ToString());
-                    strcmd.AppendFormat(", '{0}'", work.ItemName);
+                    strcmd.AppendFormat(", {0}", SeparateString(work.ItemName));
                     strcmd.AppendFormat(", {0}", work.SubitemsFlg.ToString());
                     strcmd.AppendFormat(", {0}", work.MyExpensesFlg.ToString());
                     strcmd.AppendFormat(", {0}", work.DeleteFlg.ToString());
@@ -283,7 +319,7 @@
 
                 strcmd.AppendFormat(" ItemCode = {0}", data.ItemCode.ToString());
                 strcmd.AppendFormat(",DisplayOrder = {0}", data.DisplayOrder.ToString());
-                strcmd.AppendFormat(",ItemName = '{0}'", data.ItemName);
+                strcmd.AppendFormat(",ItemName = {0}", SeparateString(data.ItemName));
                 strcmd.AppendFormat(",SubitemsFlg = {0}", data.SubitemsFlg.ToString());
                 strcmd.AppendFormat(",MyExpensesFlg = {0}", data.MyExpensesFlg.ToString());
                 strcmd.AppendFormat(",DeleteFlg = {0}", data.DeleteFlg.ToString());
Index: trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOMConstructionSpec.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOMConstructionSpec.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOMConstructionSpec.cs	(revision 484)
@@ -191,9 +191,9 @@
                 strcmd.AppendFormat(",{0}", work.SpecCode);
                 strcmd.AppendFormat(",{0}", work.DisplayOrder);
 
-                strcmd.AppendFormat(",'{0}'", work.ItemName);
-                strcmd.AppendFormat(",'{0}'", work.SpecName);
-                strcmd.AppendFormat(",'{0}'", work.UnitName);
+                strcmd.AppendFormat(", {0}", SeparateString(work.ItemName));
+                strcmd.AppendFormat(", {0}", SeparateString(work.SpecName));
+                strcmd.AppendFormat(", {0}", SeparateString(work.UnitName));
                 strcmd.AppendFormat(",{0}", work.UnitPrice);
                 strcmd.AppendFormat(",{0}", work.DeleteFlg);
 
@@ -245,9 +245,9 @@
                     strcmd.AppendFormat(",{0}", work.SpecCode);
                     strcmd.AppendFormat(",{0}", work.DisplayOrder);
 
-                    strcmd.AppendFormat(",'{0}'", work.ItemName);
-                    strcmd.AppendFormat(",'{0}'", work.SpecName);
-                    strcmd.AppendFormat(",'{0}'", work.UnitName);
+                    strcmd.AppendFormat(",{0}", SeparateString(work.ItemName));
+                    strcmd.AppendFormat(",{0}", SeparateString(work.SpecName));
+                    strcmd.AppendFormat(",{0}", SeparateString(work.UnitName));
                     strcmd.AppendFormat(",{0}", work.UnitPrice);
                     strcmd.AppendFormat(",{0}", work.DeleteFlg);
 
@@ -291,9 +291,9 @@
                 strcmd.AppendFormat(",SpecCode = {0}", data.SpecCode);
                 strcmd.AppendFormat(",DisplayOrder = {0}", data.DisplayOrder);
 
-                strcmd.AppendFormat(",ItemName = '{0}'", data.ItemName);
-                strcmd.AppendFormat(",SpecName = '{0}'", data.SpecName);
-                strcmd.AppendFormat(",UnitName = '{0}'", data.UnitName);
+                strcmd.AppendFormat(",ItemName =  {0}", SeparateString(data.ItemName));
+                strcmd.AppendFormat(",SpecName =  {0}", SeparateString(data.SpecName));
+                strcmd.AppendFormat(",UnitName =  {0}", SeparateString(data.UnitName));
                 strcmd.AppendFormat(",UnitPrice = {0}", data.UnitPrice);
                 strcmd.AppendFormat(",DeleteFlg = {0}", data.DeleteFlg);
 
@@ -406,13 +406,13 @@
                         strcmd.AppendFormat(" DisplayOrder = {0}", ((int)value).ToString());
                         break;
                     case (int)TableColumn.ItemName:
-                        strcmd.AppendFormat(" ItemName = '{0}'", value.ToString());
+                        strcmd.AppendFormat(" ItemName = {0}", SeparateString(value.ToString()));
                         break;
                     case (int)TableColumn.SpecName:
-                        strcmd.AppendFormat(" SpecName = '{0}'", value.ToString());
+                        strcmd.AppendFormat(" SpecName = {0}", SeparateString(value.ToString()));
                         break;
                     case (int)TableColumn.UnitName:
-                        strcmd.AppendFormat(" UnitName = '{0}'", value.ToString());
+                        strcmd.AppendFormat(" UnitName = {0}", SeparateString(value.ToString()));
                         break;
                     case (int)TableColumn.UnitPrice:
                         strcmd.AppendFormat(" UnitPrice = {0}", ((double)value).ToString());
Index: trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOMConstructionTypeMaster.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOMConstructionTypeMaster.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOMConstructionTypeMaster.cs	(revision 484)
@@ -196,7 +196,7 @@
 
                 strcmd.AppendFormat("  {0}", work.TypeCode);
                 strcmd.AppendFormat(", {0}", work.DisplayOrder);
-                strcmd.AppendFormat(",'{0}'", work.NameString);
+                strcmd.AppendFormat(", {0}", SeparateString(work.NameString));
                 strcmd.AppendFormat(", {0}", work.PublicFlg);
                 strcmd.AppendFormat(", {0}", work.RepairFlg);
                 strcmd.AppendFormat(", {0}", work.SecRank);
@@ -251,7 +251,7 @@
 
                     strcmd.AppendFormat("  {0}", work.TypeCode);
                     strcmd.AppendFormat(", {0}", work.DisplayOrder);
-                    strcmd.AppendFormat(",'{0}'", work.NameString);
+                    strcmd.AppendFormat(", {0}", SeparateString(work.NameString));
                     strcmd.AppendFormat(", {0}", work.PublicFlg);
                     strcmd.AppendFormat(", {0}", work.RepairFlg);
                     strcmd.AppendFormat(", {0}", work.SecRank);
@@ -297,7 +297,7 @@
 
                 strcmd.AppendFormat(" TypeCode = {0}", data.TypeCode);
                 strcmd.AppendFormat(", DisplayOrder = {0}", data.DisplayOrder);
-                strcmd.AppendFormat(", NameString = '{0}'", data.NameString);
+                strcmd.AppendFormat(", NameString = {0}", SeparateString(data.NameString));
                 strcmd.AppendFormat(", PublicFlg = {0}", data.PublicFlg);
                 strcmd.AppendFormat(", RepairFlg = {0}", data.RepairFlg);
                 strcmd.AppendFormat(", SecRank = {0}", data.SecRank);
@@ -342,7 +342,7 @@
                         strcmd.AppendFormat(" DisplayOrder = {0}", ((int)value).ToString());
                         break;
                     case (int)NameColumn.NameString:
-                        strcmd.AppendFormat(" NameString = '{0}'", value.ToString());
+                        strcmd.AppendFormat(" NameString = {0}", SeparateString(value.ToString()));
                         break;
                     case (int)NameColumn.PublicFlg:
                         strcmd.AppendFormat(" PublicFlg = {0}", ((int)value).ToString());
Index: trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOMCostDataType.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOMCostDataType.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOMCostDataType.cs	(revision 484)
@@ -176,8 +176,8 @@
                 strcmd.Append(") VALUES (");
 
                 strcmd.AppendFormat("  {0}", work.CostType);                                // 出納タイプコード
-                strcmd.AppendFormat(", {0}", work.TargetType);                                  // 出納先コードタイプ
-                strcmd.AppendFormat(",'{0}'", work.CostDataTypeName);                           // 出納タイプ名称
+                strcmd.AppendFormat(", {0}", work.TargetType);                              // 出納先コードタイプ
+                strcmd.AppendFormat(", {0}", SeparateString(work.CostDataTypeName));        // 出納タイプ名称
 
                 strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.EntryDate);
                 strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.UpdateDate);
@@ -219,8 +219,8 @@
                     else strcmd.Append(", (");
 
                     strcmd.AppendFormat("  {0}", work.CostType);                                // 出納タイプコード
-                    strcmd.AppendFormat(", {0}", work.TargetType);                                  // 出納先コードタイプ
-                    strcmd.AppendFormat(",'{0}'", work.CostDataTypeName);                           // 出納タイプ名称
+                    strcmd.AppendFormat(", {0}", work.TargetType);                              // 出納先コードタイプ
+                    strcmd.AppendFormat(", {0}", SeparateString(work.CostDataTypeName));        // 出納タイプ名称
 
                     strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.EntryDate);
                     strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.UpdateDate);
@@ -257,9 +257,9 @@
 
                 strcmd.Append(" SET");
 
-                strcmd.AppendFormat(" CostType = {0}", data.CostType);              // 出納タイプコード
-                strcmd.AppendFormat(",TargetType = {0}", data.TargetType);                  // 出納先コードタイプ
-                strcmd.AppendFormat(",CostDataTypeName = '{0}'", data.CostDataTypeName);    // 出納タイプ名称
+                strcmd.AppendFormat(" CostType = {0}", data.CostType);                                  // 出納タイプコード
+                strcmd.AppendFormat(",TargetType = {0}", data.TargetType);                              // 出納先コードタイプ
+                strcmd.AppendFormat(",CostDataTypeName =  {0}", SeparateString(data.CostDataTypeName)); // 出納タイプ名称
 
                 strcmd.Append(", UpdateDate = NOW()");
                 strcmd.Append(AddSQLString);
Index: trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOMDepartment.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOMDepartment.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOMDepartment.cs	(revision 484)
@@ -58,6 +58,44 @@
 
         #endregion
 
+        #region テーブルのフィールドリストを作成する
+        /// <summary>
+        /// テーブルのフィールドリストを作成する
+        /// </summary>
+        /// <returns></returns>
+        public static string CreateFieldNameList(string strAlias = "")
+        {
+            StringBuilder strcmd = new StringBuilder();
+            try
+            {
+                strcmd.Append(" ");
+                bool bColFirst = true;
+                string strWork = string.Empty;
+                foreach (var gender in Enum.GetValues(typeof(NameColumn)))
+                {
+                    strWork = gender.ToString();
+                    if (!bColFirst) strcmd.Append(",");
+                    if (strWork.Equals("EntryDate") || strWork.Equals("UpdateDate"))
+                    {
+                        strcmd.AppendFormat(" DATE_FORMAT({0}{1}, '%Y/%m/%d %H:%i:%s') As {1}", strAlias, strWork);
+                    }
+                    else
+                    {
+                        strcmd.AppendFormat(" {0}{1}", strAlias, strWork);
+                    }
+                    bColFirst = false;
+                }
+
+                return strcmd.ToString();
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("システムエラー：{0}：{1}：{2}", CommonMotions.GetMethodName(2), ex.Message, strcmd.ToString());
+                return string.Empty;
+            }
+        }
+        #endregion
+
         #region 部署マスタ検索文字列作成
         /// <summary>
         /// 部署マスタ検索文字列作成
@@ -67,24 +105,18 @@
         /// <returns>true：成功 false：失敗</returns>
         private string CreateSelectSQL()
         {
-            // SQL作成（DateTime型が変換できないのでCharに変換しておく）
             StringBuilder strcmd = new StringBuilder();
+            try
+            {
+                strcmd.AppendFormat("SELECT {0} FROM DepartmentMaster", CreateFieldNameList());
 
-            strcmd.Append("SELECT");
-            strcmd.Append(" DepartmentCode");
-            strcmd.Append(",DisplayOrder");
-            strcmd.Append(",DepartmentString");
-            strcmd.Append(",ActionScheduleFlg");
-            strcmd.Append(",StaffAssignFlg");
-            strcmd.Append(",StartDate");
-            strcmd.Append(",CompDate");
-            strcmd.Append(",DeleteFlg");
-
-            strcmd.Append(", DATE_FORMAT(EntryDate, '%Y/%m/%d %H:%i:%s')");
-            strcmd.Append(", DATE_FORMAT(UpdateDate, '%Y/%m/%d %H:%i:%s')");
-            strcmd.Append(" FROM DepartmentMaster");
-
-            return strcmd.ToString();
+                return strcmd.ToString();
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("システムエラー：{0}：{1}：{2}", CommonMotions.GetMethodName(2), ex.Message, strcmd.ToString());
+                return string.Empty;
+            }
         }
         #endregion
 
@@ -196,7 +228,7 @@
 
                     strcmd.AppendFormat("  {0}", work.DepartmentCode.ToString());
                     strcmd.AppendFormat(", {0}", work.DisplayOrder.ToString());
-                    strcmd.AppendFormat(",'{0}'", work.DepartmentString.ToString());
+                    strcmd.AppendFormat(", {0}", SeparateString(work.DepartmentString));
                     strcmd.AppendFormat(", {0}", work.ActionScheduleFlg.ToString());
                     strcmd.AppendFormat(", {0}", work.StaffAssignFlg.ToString());
                     strcmd.AppendFormat(", DATE('{0}')", work.StartDate);
@@ -241,7 +273,7 @@
 
                 strcmd.AppendFormat(" DepartmentCode = {0}", data.DepartmentCode);
                 strcmd.AppendFormat(",DisplayOrder = {0}", data.DisplayOrder);
-                strcmd.AppendFormat(",DepartmentString = '{0}'", data.DepartmentString);
+                strcmd.AppendFormat(",DepartmentString = {0}", SeparateString(data.DepartmentString));
                 strcmd.AppendFormat(",ActionScheduleFlg = {0}", data.ActionScheduleFlg);
                 strcmd.AppendFormat(",StaffAssignFlg = {0}", data.StaffAssignFlg);
                 strcmd.AppendFormat(",StartDate = DATE('{0}')", data.StartDate);
@@ -351,7 +383,7 @@
                         strcmd.AppendFormat(" DisplayOrder = {0}", ((int)value).ToString());
                         break;
                     case (int)NameColumn.DepartmentString:
-                        strcmd.AppendFormat(" DepartmentString = '{0}'", value.ToString());
+                        strcmd.AppendFormat(" DepartmentString = {0}", SeparateString(value.ToString()));
                         break;
                     case (int)NameColumn.ActionScheduleFlg:
                         strcmd.AppendFormat(" ActionScheduleFlg = {0}", ((int)value).ToString());
Index: trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOMDepartmentExpenses.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOMDepartmentExpenses.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOMDepartmentExpenses.cs	(revision 484)
@@ -220,7 +220,7 @@
                 strcmd.AppendFormat("  {0}", data.DepartmentCode.ToString());
                 strcmd.AppendFormat(", {0}", data.ExpensesPeriod.ToString());
                 strcmd.AppendFormat(", {0}", data.NameCode.ToString());
-                strcmd.AppendFormat(",'{0}'", data.NameString);
+                strcmd.AppendFormat(", {0}", SeparateString(data.NameString));
                 strcmd.AppendFormat(", {0}", data.DisplayOrder.ToString());
                 strcmd.AppendFormat(", {0}", data.ExpensesRaito.ToString());
                 strcmd.AppendFormat(", {0}", data.DeleteFlg.ToString());
@@ -272,7 +272,7 @@
                     strcmd.AppendFormat("  {0}", work.DepartmentCode.ToString());
                     strcmd.AppendFormat(", {0}", work.ExpensesPeriod.ToString());
                     strcmd.AppendFormat(", {0}", work.NameCode.ToString());
-                    strcmd.AppendFormat(",'{0}'", work.NameString);
+                    strcmd.AppendFormat(", {0}", SeparateString(work.NameString));
                     strcmd.AppendFormat(", {0}", work.DisplayOrder.ToString());
                     strcmd.AppendFormat(", {0}", work.ExpensesRaito.ToString());
                     strcmd.AppendFormat(", {0}", work.DeleteFlg.ToString());
@@ -316,7 +316,7 @@
                 strcmd.AppendFormat(" DepartmentCode = {0}", data.DepartmentCode.ToString());
                 strcmd.AppendFormat(", ExpensesPeriod = {0}", data.ExpensesPeriod.ToString());
                 strcmd.AppendFormat(", NameCode = {0}", data.NameCode.ToString());
-                strcmd.AppendFormat(", NameString = '{0}'", data.NameString);
+                strcmd.AppendFormat(", NameString = {0}", SeparateString(data.NameString));
                 strcmd.AppendFormat(", DisplayOrder = {0}", data.DisplayOrder.ToString());
                 strcmd.AppendFormat(", EXPENSESRAITO = {0}", data.ExpensesRaito.ToString());
                 strcmd.AppendFormat(", DeleteFlg = {0}", data.DeleteFlg.ToString());
@@ -429,7 +429,7 @@
                         break;
                     case (int)NameColumn.NameString:
                         // 名称
-                        strcmd.AppendFormat(" NameString = '{0}'", value.ToString());
+                        strcmd.AppendFormat(" NameString = {0}", SeparateString(value.ToString()));
                         break;
                     case (int)NameColumn.DisplayOrder:
                         // 表示順
Index: trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOMDivision.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOMDivision.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOMDivision.cs	(revision 484)
@@ -55,6 +55,44 @@
 
         #endregion
 
+        #region テーブルのフィールドリストを作成する
+        /// <summary>
+        /// テーブルのフィールドリストを作成する
+        /// </summary>
+        /// <returns></returns>
+        public static string CreateFieldNameList(string strAlias = "")
+        {
+            StringBuilder strcmd = new StringBuilder();
+            try
+            {
+                strcmd.Append(" ");
+                bool bColFirst = true;
+                string strWork = string.Empty;
+                foreach (var gender in Enum.GetValues(typeof(NameColumn)))
+                {
+                    strWork = gender.ToString();
+                    if (!bColFirst) strcmd.Append(",");
+                    if (strWork.Equals("EntryDate") || strWork.Equals("UpdateDate"))
+                    {
+                        strcmd.AppendFormat(" DATE_FORMAT({0}{1}, '%Y/%m/%d %H:%i:%s') As {1}", strAlias, strWork);
+                    }
+                    else
+                    {
+                        strcmd.AppendFormat(" {0}{1}", strAlias, strWork);
+                    }
+                    bColFirst = false;
+                }
+
+                return strcmd.ToString();
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("システムエラー：{0}：{1}：{2}", CommonMotions.GetMethodName(2), ex.Message, strcmd.ToString());
+                return string.Empty;
+            }
+        }
+        #endregion
+
         #region 名称マスタ検索SQL作成
         /// <summary>
         /// 名称マスタ検索
@@ -65,19 +103,17 @@
         private string CreateSelectSQL()
         {
             StringBuilder strcmd = new StringBuilder();
+            try
+            {
+                strcmd.AppendFormat("SELECT {0} FROM DivisionMaster", CreateFieldNameList());
 
-            strcmd.Append("SELECT");
-            strcmd.Append(" DivisionCode");
-            strcmd.Append(",NameCode");
-            strcmd.Append(",DisplayOrder");
-            strcmd.Append(",NameString");
-            strcmd.Append(",DeleteFlg");
-
-            strcmd.Append(", DATE_FORMAT(EntryDate, '%Y/%m/%d %H:%i:%s')");
-            strcmd.Append(", DATE_FORMAT(UpdateDate, '%Y/%m/%d %H:%i:%s')");
-            strcmd.Append(" FROM DivisionMaster");
-
-            return strcmd.ToString();
+                return strcmd.ToString();
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("システムエラー：{0}：{1}：{2}", CommonMotions.GetMethodName(2), ex.Message, strcmd.ToString());
+                return string.Empty;
+            }
         }
         #endregion
 
@@ -194,7 +230,7 @@
                     strcmd.AppendFormat("  {0}", work.DivisionCode.ToString());
                     strcmd.AppendFormat(", {0}", work.NameCode.ToString());
                     strcmd.AppendFormat(", {0}", work.DisplayOrder.ToString());
-                    strcmd.AppendFormat(",'{0}'", work.NameString.ToString());
+                    strcmd.AppendFormat(", {0}", SeparateString(work.NameString));
                     strcmd.AppendFormat(", {0}", work.DeleteFlg.ToString());
 
                     strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.EntryDate);
@@ -236,7 +272,7 @@
                 strcmd.AppendFormat(" DivisionCode = {0}", data.DivisionCode.ToString());
                 strcmd.AppendFormat(",NameCode = {0}", data.NameCode.ToString());
                 strcmd.AppendFormat(",DisplayOrder = {0}", data.DisplayOrder.ToString());
-                strcmd.AppendFormat(",NameString = '{0}'", data.NameString.ToString());
+                strcmd.AppendFormat(",NameString = {0}", SeparateString(data.NameString));
                 strcmd.AppendFormat(",DeleteFlg = {0}", data.DeleteFlg.ToString());
 
                 strcmd.Append(", UpdateDate = NOW()");
@@ -346,7 +382,7 @@
                         strcmd.AppendFormat(" DisplayOrder = {0}", ((int)value).ToString());
                         break;
                     case (int)NameColumn.NameString:
-                        strcmd.AppendFormat(" NameString = '{0}'", value.ToString());
+                        strcmd.AppendFormat(" NameString = {0}", SeparateString(value.ToString()));
                         break;
                     case (int)NameColumn.DeleteFlg:
                         strcmd.AppendFormat(" DeleteFlg = {0}", ((int)value).ToString());
Index: trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOMHolidayCalender.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOMHolidayCalender.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOMHolidayCalender.cs	(revision 484)
@@ -53,6 +53,48 @@
 
         #endregion
 
+        #region テーブルのフィールドリストを作成する
+        /// <summary>
+        /// テーブルのフィールドリストを作成する
+        /// </summary>
+        /// <returns></returns>
+        public static string CreateFieldNameList(string strAlias = "")
+        {
+            StringBuilder strcmd = new StringBuilder();
+            try
+            {
+                strcmd.Append(" ");
+                bool bColFirst = true;
+                string strWork = string.Empty;
+                foreach (var gender in Enum.GetValues(typeof(NameColumn)))
+                {
+                    strWork = gender.ToString();
+                    if (!bColFirst) strcmd.Append(",");
+                    if (strWork.Equals("EntryDate") || strWork.Equals("UpdateDate"))
+                    {
+                        strcmd.AppendFormat(" DATE_FORMAT({0}{1}, '%Y/%m/%d %H:%i:%s') As {1}", strAlias, strWork);
+                    }
+                    else if (strWork.Equals("Holiday"))
+                    {
+                        strcmd.AppendFormat(" DATE({0}{1}) As {1}", strAlias, strWork);
+                    }
+                    else
+                    {
+                        strcmd.AppendFormat(" {0}{1}", strAlias, strWork);
+                    }
+                    bColFirst = false;
+                }
+
+                return strcmd.ToString();
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("システムエラー：{0}：{1}：{2}", CommonMotions.GetMethodName(2), ex.Message, strcmd.ToString());
+                return string.Empty;
+            }
+        }
+        #endregion
+
         #region SELECT　SQL作成
         /// <summary>
         /// SQL作成
@@ -60,14 +102,17 @@
         private string CreateSelectSQL()
         {
             StringBuilder strcmd = new StringBuilder();
-            strcmd.Append("SELECT");
-            strcmd.Append(" DATE_FORMAT(Holiday, '%Y/%m/%d')");
-            strcmd.Append(",BusinessYear");
-            strcmd.Append(",TargetMonth");
-            strcmd.Append(",TargetDay");
-            strcmd.Append(" FROM HolidayCalenderMaster");
+            try
+            {
+                strcmd.AppendFormat("SELECT {0} FROM HolidayCalenderMaster", CreateFieldNameList());
 
-            return strcmd.ToString();
+                return strcmd.ToString();
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("システムエラー：{0}：{1}：{2}", CommonMotions.GetMethodName(2), ex.Message, strcmd.ToString());
+                return string.Empty;
+            }
         }
         #endregion
 
Index: trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOMMailContentsMaster.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOMMailContentsMaster.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOMMailContentsMaster.cs	(revision 484)
@@ -197,8 +197,8 @@
                 strcmd.Append(") VALUES (");
 
                 strcmd.AppendFormat("  {0}", data.MailDelivery.ToString());
-                strcmd.AppendFormat(", '{0}'", data.MailTitle);
-                strcmd.AppendFormat(", '{0}'", data.MailContent);
+                strcmd.AppendFormat(", {0}", SeparateString(data.MailTitle));
+                strcmd.AppendFormat(", {0}", SeparateString(data.MailContent));
                 strcmd.Append(", NOW()");                           // 登録日付
                 strcmd.Append(", NOW()");                           // 更新日付
                 strcmd.Append(")");
@@ -244,8 +244,8 @@
                     else strcmd.Append(", (");
 
                     strcmd.AppendFormat("  {0}", work.MailDelivery.ToString());
-                    strcmd.AppendFormat(", '{0}'", work.MailTitle);
-                    strcmd.AppendFormat(", '{0}'", work.MailContent);
+                    strcmd.AppendFormat(", {0}", SeparateString(work.MailTitle));
+                    strcmd.AppendFormat(", {0}", SeparateString(work.MailContent));
                     strcmd.Append(", NOW()");                           // 登録日付
                     strcmd.Append(", NOW()");                           // 更新日付
 
@@ -284,8 +284,8 @@
                 strcmd.Append(" SET");
 
                 strcmd.AppendFormat(" MailDelivery = {0}", data.MailDelivery.ToString());
-                strcmd.AppendFormat(", MailTitle = '{0}'", data.MailTitle);
-                strcmd.AppendFormat(", MailContent = '{0}'", data.MailContent);
+                strcmd.AppendFormat(", MailTitle = {0}", SeparateString(data.MailTitle));
+                strcmd.AppendFormat(", MailContent = {0}", SeparateString(data.MailContent));
                 strcmd.Append("      , UpdateDate = NOW()");
 
                 strcmd.Append(AddSQLString);
@@ -321,10 +321,10 @@
                         strcmd.AppendFormat(" MailDelivery = {0}", ((int)value).ToString());
                         break;
                     case (int)NameColumn.MailTitle:
-                        strcmd.AppendFormat(" MailTitle = '{0}'", value.ToString());
+                        strcmd.AppendFormat(" MailTitle = {0}", SeparateString(value.ToString()));
                         break;
                     case (int)NameColumn.MailContent:
-                        strcmd.AppendFormat(" MailContent = '{0}'", value.ToString());
+                        strcmd.AppendFormat(" MailContent = {0}", SeparateString(value.ToString()));
                         break;
                 }
 
Index: trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOMOrderers.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOMOrderers.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOMOrderers.cs	(revision 484)
@@ -50,6 +50,7 @@
             Address3,
             PhoneNumber,
             FaxNumber,
+            JapaneseSyllabary,
             MailAddress,
             Note,
             PersonCode,
@@ -71,6 +72,44 @@
 
         #endregion
 
+        #region テーブルのフィールドリストを作成する
+        /// <summary>
+        /// テーブルのフィールドリストを作成する
+        /// </summary>
+        /// <returns></returns>
+        public static string CreateFieldNameList(string strAlias = "")
+        {
+            StringBuilder strcmd = new StringBuilder();
+            try
+            {
+                strcmd.Append(" ");
+                bool bColFirst = true;
+                string strWork = string.Empty;
+                foreach (var gender in Enum.GetValues(typeof(OrderersColumn)))
+                {
+                    strWork = gender.ToString();
+                    if (!bColFirst) strcmd.Append(",");
+                    if (strWork.Equals("EntryDate") || strWork.Equals("UpdateDate"))
+                    {
+                        strcmd.AppendFormat(" DATE_FORMAT({0}{1}, '%Y/%m/%d %H:%i:%s') As {1}", strAlias, strWork);
+                    }
+                    else
+                    {
+                        strcmd.AppendFormat(" {0}{1}", strAlias, strWork);
+                    }
+                    bColFirst = false;
+                }
+
+                return strcmd.ToString();
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("システムエラー：{0}：{1}：{2}", CommonMotions.GetMethodName(2), ex.Message, strcmd.ToString());
+                return string.Empty;
+            }
+        }
+        #endregion
+
         #region 発注者マスタ検索SQL作成
         /// <summary>
         /// 発注者マスタ検索SQL作成
@@ -81,26 +120,17 @@
         private string CreateSelectSQL()
         {
             StringBuilder strcmd = new StringBuilder();
-            strcmd.Append("SELECT");
-            bool bColFirst = true;
-            string strWork = string.Empty;
-            foreach (var gender in Enum.GetValues(typeof(OrderersColumn)))
+            try
             {
-                strWork = gender.ToString();
-                if (!bColFirst) strcmd.Append(",");
-                if (strWork.Equals("EntryDate") || strWork.Equals("UpdateDate"))
-                {
-                    strcmd.AppendFormat(" DATE_FORMAT({0}, '%Y/%m/%d %H:%i:%s')", strWork);
-                }
-                else
-                {
-                    strcmd.AppendFormat(" {0}", strWork);
-                }
-                bColFirst = false;
+                strcmd.AppendFormat("SELECT {0} FROM OrderersMaster", CreateFieldNameList());
+
+                return strcmd.ToString();
             }
-            strcmd.Append(" FROM OrderersMaster");
-
-            return strcmd.ToString();
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("システムエラー：{0}：{1}：{2}", CommonMotions.GetMethodName(2), ex.Message, strcmd.ToString());
+                return string.Empty;
+            }
         }
         #endregion
 
@@ -212,20 +242,21 @@
                     strcmd.AppendFormat(", {0}", work.OrderersCode);
                     strcmd.AppendFormat(", {0}", work.DisplayOrder);
                     strcmd.AppendFormat(", {0}", work.OrderFlg);
-                    strcmd.AppendFormat(",'{0}'", work.CorporateStatusName);
+                    strcmd.AppendFormat(", {0}", SeparateString(work.CorporateStatusName));
                     strcmd.AppendFormat(", {0}", work.CorporateStatusPoint);
-                    strcmd.AppendFormat(",'{0}'", work.OrderersName1);
-                    strcmd.AppendFormat(",'{0}'", work.OrderersName2);
-                    strcmd.AppendFormat(",'{0}'", work.DepartmentName);
-                    strcmd.AppendFormat(",'{0}'", work.ChargePersonName);
-                    strcmd.AppendFormat(",'{0}'", work.ZipCode);
-                    strcmd.AppendFormat(",'{0}'", work.Address1);
-                    strcmd.AppendFormat(",'{0}'", work.Address2);
-                    strcmd.AppendFormat(",'{0}'", work.Address3);
-                    strcmd.AppendFormat(",'{0}'", work.PhoneNumber);
-                    strcmd.AppendFormat(",'{0}'", work.FaxNumber);
-                    strcmd.AppendFormat(",'{0}'", work.MailAddress);
-                    strcmd.AppendFormat(",'{0}'", work.Note);
+                    strcmd.AppendFormat(", {0}", SeparateString(work.OrderersName1));
+                    strcmd.AppendFormat(", {0}", SeparateString(work.OrderersName2));
+                    strcmd.AppendFormat(", {0}", SeparateString(work.DepartmentName));
+                    strcmd.AppendFormat(", {0}", SeparateString(work.ChargePersonName));
+                    strcmd.AppendFormat(", {0}", SeparateString(work.ZipCode));
+                    strcmd.AppendFormat(", {0}", SeparateString(work.Address1));
+                    strcmd.AppendFormat(", {0}", SeparateString(work.Address2));
+                    strcmd.AppendFormat(", {0}", SeparateString(work.Address3));
+                    strcmd.AppendFormat(", {0}", SeparateString(work.PhoneNumber));
+                    strcmd.AppendFormat(", {0}", SeparateString(work.FaxNumber));
+                    strcmd.AppendFormat(", {0}", SeparateString(work.JapaneseSyllabary));
+                    strcmd.AppendFormat(", {0}", SeparateString(work.MailAddress));
+                    strcmd.AppendFormat(", {0}", SeparateString(work.Note));
                     strcmd.AppendFormat(", {0}", work.PersonCode);
                     strcmd.AppendFormat(", {0}", work.DeleteFlg);
 
@@ -277,20 +308,21 @@
                 strcmd.AppendFormat(", {0}", work.OrderersCode);
                 strcmd.AppendFormat(", {0}", work.DisplayOrder);
                 strcmd.AppendFormat(", {0}", work.OrderFlg);
-                strcmd.AppendFormat(",'{0}'", work.CorporateStatusName);
+                strcmd.AppendFormat(", {0}", SeparateString(work.CorporateStatusName));
                 strcmd.AppendFormat(", {0}", work.CorporateStatusPoint);
-                strcmd.AppendFormat(",'{0}'", work.OrderersName1);
-                strcmd.AppendFormat(",'{0}'", work.OrderersName2);
-                strcmd.AppendFormat(",'{0}'", work.DepartmentName);
-                strcmd.AppendFormat(",'{0}'", work.ChargePersonName);
-                strcmd.AppendFormat(",'{0}'", work.ZipCode);
-                strcmd.AppendFormat(",'{0}'", work.Address1);
-                strcmd.AppendFormat(",'{0}'", work.Address2);
-                strcmd.AppendFormat(",'{0}'", work.Address3);
-                strcmd.AppendFormat(",'{0}'", work.PhoneNumber);
-                strcmd.AppendFormat(",'{0}'", work.FaxNumber);
-                strcmd.AppendFormat(",'{0}'", work.MailAddress);
-                strcmd.AppendFormat(",'{0}'", work.Note);
+                strcmd.AppendFormat(", {0}", SeparateString(work.OrderersName1));
+                strcmd.AppendFormat(", {0}", SeparateString(work.OrderersName2));
+                strcmd.AppendFormat(", {0}", SeparateString(work.DepartmentName));
+                strcmd.AppendFormat(", {0}", SeparateString(work.ChargePersonName));
+                strcmd.AppendFormat(", {0}", SeparateString(work.ZipCode));
+                strcmd.AppendFormat(", {0}", SeparateString(work.Address1));
+                strcmd.AppendFormat(", {0}", SeparateString(work.Address2));
+                strcmd.AppendFormat(", {0}", SeparateString(work.Address3));
+                strcmd.AppendFormat(", {0}", SeparateString(work.PhoneNumber));
+                strcmd.AppendFormat(", {0}", SeparateString(work.FaxNumber));
+                strcmd.AppendFormat(", {0}", SeparateString(work.JapaneseSyllabary));
+                strcmd.AppendFormat(", {0}", SeparateString(work.MailAddress));
+                strcmd.AppendFormat(", {0}", SeparateString(work.Note));
                 strcmd.AppendFormat(", {0}", work.PersonCode);
                 strcmd.AppendFormat(", {0}", work.DeleteFlg);
 
@@ -331,20 +363,21 @@
                 strcmd.AppendFormat(", OrderersCode = {0}", data.OrderersCode);
                 strcmd.AppendFormat(", DisplayOrder = {0}", data.DisplayOrder);
                 strcmd.AppendFormat(", OrderFlg = {0}", data.OrderFlg);
-                strcmd.AppendFormat(", CorporateStatusName = '{0}'", data.CorporateStatusName);
+                strcmd.AppendFormat(", CorporateStatusName = {0}", SeparateString(data.CorporateStatusName));
                 strcmd.AppendFormat(", CorporateStatusPoint = {0}", data.CorporateStatusPoint);
-                strcmd.AppendFormat(", OrderersName1 = '{0}'", data.OrderersName1);
-                strcmd.AppendFormat(", OrderersName2 = '{0}'", data.OrderersName2);
-                strcmd.AppendFormat(", DepartmentName = '{0}'", data.DepartmentName);
-                strcmd.AppendFormat(", ChargePersonName = '{0}'", data.ChargePersonName);
-                strcmd.AppendFormat(", ZipCode = '{0}'", data.ZipCode);
-                strcmd.AppendFormat(", Address1 = '{0}'", data.Address1);
-                strcmd.AppendFormat(", Address2 = '{0}'", data.Address2);
-                strcmd.AppendFormat(", Address3 = '{0}'", data.Address3);
-                strcmd.AppendFormat(", PhoneNumber = '{0}'", data.PhoneNumber);
-                strcmd.AppendFormat(", FaxNumber = '{0}'", data.FaxNumber);
-                strcmd.AppendFormat(", Note = '{0}'", data.Note);
-                strcmd.AppendFormat(", MailAddress = '{0}'", data.MailAddress);
+                strcmd.AppendFormat(", OrderersName1 =  {0}", SeparateString(data.OrderersName1));
+                strcmd.AppendFormat(", OrderersName2 =  {0}", SeparateString(data.OrderersName2));
+                strcmd.AppendFormat(", DepartmentName =  {0}", SeparateString(data.DepartmentName));
+                strcmd.AppendFormat(", ChargePersonName =  {0}", SeparateString(data.ChargePersonName));
+                strcmd.AppendFormat(", ZipCode =  {0}", SeparateString(data.ZipCode));
+                strcmd.AppendFormat(", Address1 =  {0}", SeparateString(data.Address1));
+                strcmd.AppendFormat(", Address2 =  {0}", SeparateString(data.Address2));
+                strcmd.AppendFormat(", Address3 =  {0}", SeparateString(data.Address3));
+                strcmd.AppendFormat(", PhoneNumber =  {0}", SeparateString(data.PhoneNumber));
+                strcmd.AppendFormat(", FaxNumber =  {0}", SeparateString(data.FaxNumber));
+                strcmd.AppendFormat(", JapaneseSyllabary =  {0}", SeparateString(data.JapaneseSyllabary));
+                strcmd.AppendFormat(", Note =  {0}", SeparateString(data.Note));
+                strcmd.AppendFormat(", MailAddress =  {0}", SeparateString(data.MailAddress));
                 strcmd.AppendFormat(", PersonCode = {0}", data.PersonCode);
                 strcmd.AppendFormat(", DeleteFlg = {0}", data.DeleteFlg);
 
@@ -418,6 +451,7 @@
                 wrk.Address3 = objwrk[(int)OrderersColumn.Address3].ToString();
                 wrk.PhoneNumber = objwrk[(int)OrderersColumn.PhoneNumber].ToString();
                 wrk.FaxNumber = objwrk[(int)OrderersColumn.FaxNumber].ToString();
+                wrk.JapaneseSyllabary = objwrk[(int)OrderersColumn.JapaneseSyllabary].ToString();
                 wrk.MailAddress = objwrk[(int)OrderersColumn.MailAddress].ToString();
                 wrk.Note = objwrk[(int)OrderersColumn.Note].ToString();
                 wrk.PersonCode = int.Parse(objwrk[(int)OrderersColumn.PersonCode].ToString());
Index: trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOMPersonInCharge.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOMPersonInCharge.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOMPersonInCharge.cs	(revision 484)
@@ -197,6 +197,50 @@
 
         #endregion
 
+        #region テーブルのフィールドリストを作成する
+        /// <summary>
+        /// テーブルのフィールドリストを作成する
+        /// </summary>
+        /// <returns></returns>
+        public static string CreateFieldNameList(string strAlias = "")
+        {
+            StringBuilder strcmd = new StringBuilder();
+            try
+            {
+                strcmd.Append(" ");
+                bool bColFirst = true;
+                string strWork = string.Empty;
+                foreach (var gender in Enum.GetValues(typeof(ColumnCnt)))
+                {
+                    strWork = gender.ToString();
+                    if (!bColFirst) strcmd.Append(",");
+                    if (strWork.Equals("EntryDate") || strWork.Equals("UpdateDate"))
+                    {
+                        strcmd.AppendFormat(" DATE_FORMAT({0}{1}, '%Y/%m/%d %H:%i:%s') As {1}", strAlias, strWork);
+                    }
+                    else if (strWork.Equals("Birthday")
+                            || strWork.Equals("StartDate")
+                            || strWork.Equals("EndDate"))
+                    {
+                        strcmd.AppendFormat(" DATE({0}{1}) As {1}", strAlias, strWork);
+                    }
+                    else
+                    {
+                        strcmd.AppendFormat(" {0}{1}", strAlias, strWork);
+                    }
+                    bColFirst = false;
+                }
+
+                return strcmd.ToString();
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("システムエラー：{0}：{1}：{2}", CommonMotions.GetMethodName(2), ex.Message, strcmd.ToString());
+                return string.Empty;
+            }
+        }
+        #endregion
+
         #region 担当者マスタ検索文字列作成
         /// <summary>
         /// 担当者マスタ検索文字列作成
@@ -207,33 +251,17 @@
         private string CreateSelectSQL()
         {
             StringBuilder strcmd = new StringBuilder();
-            strcmd.Append("SELECT");
+            try
+            {
+                strcmd.AppendFormat("SELECT {0} FROM PersonInChargeMaster", CreateFieldNameList());
 
-            bool bColFirst = true;
-            string strWork = string.Empty;
-            foreach (var gender in Enum.GetValues(typeof(ColumnCnt)))
+                return strcmd.ToString();
+            }
+            catch (Exception ex)
             {
-                strWork = gender.ToString();
-                if (!bColFirst) strcmd.Append(",");
-                if (strWork.Equals("EntryDate") || strWork.Equals("UpdateDate"))
-                {
-                    strcmd.AppendFormat(" DATE_FORMAT({0}, '%Y/%m/%d %H:%i:%s')", strWork);
-                }
-                else if (strWork.Equals("StartDate")
-                        || strWork.Equals("EndDate"))
-                {
-                    strcmd.AppendFormat(" DATE_FORMAT({0}, '%Y/%m/%d')", strWork);
-                }
-                else
-                {
-                    strcmd.AppendFormat(" {0}", strWork);
-                }
-                bColFirst = false;
+                logger.ErrorFormat("システムエラー：{0}：{1}：{2}", CommonMotions.GetMethodName(2), ex.Message, strcmd.ToString());
+                return string.Empty;
             }
-
-            strcmd.Append(" FROM PersonInChargeMaster");
-
-            return strcmd.ToString();
         }
         #endregion
 
@@ -249,8 +277,6 @@
         {
             // インターフェース
             StringBuilder strcmd = new StringBuilder();;
-            ArrayList arData = new ArrayList();
-
             try
             {
                 // SQL作成（DateTime型が変換できないのでCharに変換しておく）
@@ -258,6 +284,7 @@
                 strcmd.Append(AddSQLString);
 
                 // SQL実行
+                ArrayList arData = new ArrayList();
                 if (!ExecuteReader(strcmd.ToString(), ref arData, bConnect)) return false;
 
                 // データセット
@@ -290,8 +317,6 @@
         {
             // インターフェース
             StringBuilder strcmd = new StringBuilder();;
-            ArrayList arData = new ArrayList();
-
             try
             {
                 // SQL作成（DateTime型が変換できないのでCharに変換しておく）
@@ -299,6 +324,7 @@
                 strcmd.Append(AddSQLString);
 
                 // SQL実行
+                ArrayList arData = new ArrayList();
                 if (!ExecuteReader(strcmd.ToString(), ref arData, bConnect)) return false;
                 if (arData.Count == 0) return false;
 
@@ -343,32 +369,32 @@
 
                 strcmd.AppendFormat("  {0}", work.PersonCode);
                 strcmd.AppendFormat(", {0}", work.DisplayOrder);
-                strcmd.AppendFormat(", '{0}'", work.PersonName);
+                strcmd.AppendFormat(", {0}", SeparateString(work.PersonName));
 
-                strcmd.AppendFormat(", '{0}'", work.PersonNameKana);
+                strcmd.AppendFormat(", {0}", SeparateString(work.PersonNameKana));
                 strcmd.AppendFormat(", {0}", work.Sex);
-                strcmd.AppendFormat(", '{0}'", work.BloodType);
+                strcmd.AppendFormat(", {0}", SeparateString(work.BloodType));
                 strcmd.AppendFormat(", STR_TO_DATE('{0}' ,'%Y/%m/%d')", work.Birthday.ToShortDateString());
-                strcmd.AppendFormat(", '{0}'", work.ZipCode);
-                strcmd.AppendFormat(", '{0}'", work.Address1);
-                strcmd.AppendFormat(", '{0}'", work.Address2);
-                strcmd.AppendFormat(", '{0}'", work.Address3);
-                strcmd.AppendFormat(", '{0}'", work.PhoneNumber);
-                strcmd.AppendFormat(", '{0}'", work.EmgPhoneNumber);
-                strcmd.AppendFormat(", '{0}'", work.EmgContact);
+                strcmd.AppendFormat(", {0}", SeparateString(work.ZipCode));
+                strcmd.AppendFormat(", {0}", SeparateString(work.Address1));
+                strcmd.AppendFormat(", {0}", SeparateString(work.Address2));
+                strcmd.AppendFormat(", {0}", SeparateString(work.Address3));
+                strcmd.AppendFormat(", {0}", SeparateString(work.PhoneNumber));
+                strcmd.AppendFormat(", {0}", SeparateString(work.EmgPhoneNumber));
+                strcmd.AppendFormat(", {0}", SeparateString(work.EmgContact));
 
                 strcmd.AppendFormat(", STR_TO_DATE('{0}' ,'%Y/%m/%d')", work.StartDate.ToShortDateString());
                 strcmd.AppendFormat(", STR_TO_DATE('{0}' ,'%Y/%m/%d')", work.EndDate.ToShortDateString());
-                strcmd.AppendFormat(", '{0}'", work.PassWord);
+                strcmd.AppendFormat(", {0}", SeparateString(work.PassWord));
                 strcmd.AppendFormat(", {0}", work.SecurityManagement);
                 strcmd.AppendFormat(", {0}", work.SecCode);
                 strcmd.AppendFormat(", '{0}'", work.MsgBackColor);
-                strcmd.AppendFormat(", '{0}'", work.DisplayString);
+                strcmd.AppendFormat(", {0}", SeparateString(work.DisplayString));
                 strcmd.AppendFormat(", {0}", work.DepartmentCode);
                 strcmd.AppendFormat(", {0}", work.MonthlySalary);
                 strcmd.AppendFormat(", {0}", work.YearSalary);
-                strcmd.AppendFormat(", '{0}'", work.Qualification);
-                strcmd.AppendFormat(", '{0}'", work.SealPrintName);
+                strcmd.AppendFormat(", {0}", SeparateString(work.Qualification));
+                strcmd.AppendFormat(", {0}", SeparateString(work.SealPrintName));
                 strcmd.AppendFormat(", {0}", work.EmployeeClassFlg);
                 strcmd.AppendFormat(", {0}", work.LedgerFlg);
                 strcmd.AppendFormat(", {0}", work.CommutingDistance);
@@ -425,32 +451,32 @@
 
                     strcmd.AppendFormat("  {0}", work.PersonCode);
                     strcmd.AppendFormat(", {0}", work.DisplayOrder);
-                    strcmd.AppendFormat(", '{0}'", work.PersonName);
+                    strcmd.AppendFormat(", {0}", SeparateString(work.PersonName));
 
-                    strcmd.AppendFormat(", '{0}'", work.PersonNameKana);
+                    strcmd.AppendFormat(", {0}", SeparateString(work.PersonNameKana));
                     strcmd.AppendFormat(", {0}", work.Sex);
-                    strcmd.AppendFormat(", '{0}'", work.BloodType);
+                    strcmd.AppendFormat(", {0}", SeparateString(work.BloodType));
                     strcmd.AppendFormat(", STR_TO_DATE('{0}' ,'%Y/%m/%d')", work.Birthday);
-                    strcmd.AppendFormat(", '{0}'", work.ZipCode);
-                    strcmd.AppendFormat(", '{0}'", work.Address1);
-                    strcmd.AppendFormat(", '{0}'", work.Address2);
-                    strcmd.AppendFormat(", '{0}'", work.Address3);
-                    strcmd.AppendFormat(", '{0}'", work.PhoneNumber);
-                    strcmd.AppendFormat(", '{0}'", work.EmgPhoneNumber);
-                    strcmd.AppendFormat(", '{0}'", work.EmgContact);
+                    strcmd.AppendFormat(", {0}", SeparateString(work.ZipCode));
+                    strcmd.AppendFormat(", {0}", SeparateString(work.Address1));
+                    strcmd.AppendFormat(", {0}", SeparateString(work.Address2));
+                    strcmd.AppendFormat(", {0}", SeparateString(work.Address3));
+                    strcmd.AppendFormat(", {0}", SeparateString(work.PhoneNumber));
+                    strcmd.AppendFormat(", {0}", SeparateString(work.EmgPhoneNumber));
+                    strcmd.AppendFormat(", {0}", SeparateString(work.EmgContact));
 
                     strcmd.AppendFormat(", STR_TO_DATE('{0}' ,'%Y/%m/%d')", work.StartDate.ToShortDateString());
                     strcmd.AppendFormat(", STR_TO_DATE('{0}' ,'%Y/%m/%d')", work.EndDate.ToShortDateString());
-                    strcmd.AppendFormat(", '{0}'", work.PassWord);
+                    strcmd.AppendFormat(", {0}", SeparateString(work.PassWord));
                     strcmd.AppendFormat(", {0}", work.SecurityManagement);
                     strcmd.AppendFormat(", {0}", work.SecCode);
                     strcmd.AppendFormat(", '{0}'", work.MsgBackColor);
-                    strcmd.AppendFormat(", '{0}'", work.DisplayString);
+                    strcmd.AppendFormat(", {0}", SeparateString(work.DisplayString));
                     strcmd.AppendFormat(", {0}", work.DepartmentCode);
                     strcmd.AppendFormat(", {0}", work.MonthlySalary);
                     strcmd.AppendFormat(", {0}", work.YearSalary);
-                    strcmd.AppendFormat(", '{0}'", work.Qualification);
-                    strcmd.AppendFormat(", '{0}'", work.SealPrintName);
+                    strcmd.AppendFormat(", {0}", SeparateString(work.Qualification));
+                    strcmd.AppendFormat(", {0}", SeparateString(work.SealPrintName));
                     strcmd.AppendFormat(", {0}", work.EmployeeClassFlg);
                     strcmd.AppendFormat(", {0}", work.LedgerFlg);
                     strcmd.AppendFormat(", {0}", work.CommutingDistance);
@@ -499,32 +525,32 @@
 
                 strcmd.AppendFormat("  PersonCode = {0}", data.PersonCode.ToString());
                 strcmd.AppendFormat(", DisplayOrder = {0}", data.DisplayOrder.ToString());
-                strcmd.AppendFormat(", PersonName = '{0}'", data.PersonName);
+                strcmd.AppendFormat(", PersonName = {0}", SeparateString(data.PersonName));
 
-                strcmd.AppendFormat(", PersonNameKana = '{0}'", data.PersonNameKana);
+                strcmd.AppendFormat(", PersonNameKana = {0}", SeparateString(data.PersonNameKana));
                 strcmd.AppendFormat(", Sex = {0}", data.Sex);
-                strcmd.AppendFormat(", BloodType = '{0}'", data.BloodType);
+                strcmd.AppendFormat(", BloodType = {0}", SeparateString(data.BloodType));
                 strcmd.AppendFormat(", Birthday = STR_TO_DATE('{0}' ,'%Y/%m/%d')", data.Birthday.ToShortDateString());
-                strcmd.AppendFormat(", ZipCode = '{0}'", data.ZipCode);
-                strcmd.AppendFormat(", Address1 = '{0}'", data.Address1);
-                strcmd.AppendFormat(", Address2 = '{0}'", data.Address2);
-                strcmd.AppendFormat(", Address3 = '{0}'", data.Address3);
-                strcmd.AppendFormat(", PhoneNumber = '{0}'", data.PhoneNumber);
-                strcmd.AppendFormat(", EmgPhoneNumber = '{0}'", data.EmgPhoneNumber);
-                strcmd.AppendFormat(", EmgContact = '{0}'", data.EmgContact);
+                strcmd.AppendFormat(", ZipCode = {0}", SeparateString(data.ZipCode));
+                strcmd.AppendFormat(", Address1 = {0}", SeparateString(data.Address1));
+                strcmd.AppendFormat(", Address2 = {0}", SeparateString(data.Address2));
+                strcmd.AppendFormat(", Address3 = {0}", SeparateString(data.Address3));
+                strcmd.AppendFormat(", PhoneNumber = {0}", SeparateString(data.PhoneNumber));
+                strcmd.AppendFormat(", EmgPhoneNumber = {0}", SeparateString(data.EmgPhoneNumber));
+                strcmd.AppendFormat(", EmgContact = {0}", SeparateString(data.EmgContact));
 
                 strcmd.AppendFormat(", StartDate = STR_TO_DATE('{0}','%Y/%m/%d')", data.StartDate.ToShortDateString());
                 strcmd.AppendFormat(", EndDate = STR_TO_DATE('{0}','%Y/%m/%d')",data.EndDate.ToShortDateString());
-                strcmd.AppendFormat(", PassWord = '{0}'", data.PassWord);
+                strcmd.AppendFormat(", PassWord = {0}", SeparateString(data.PassWord));
                 strcmd.AppendFormat(", SecurityManagement = {0}", data.SecurityManagement.ToString());
                 strcmd.AppendFormat(", SecCode = {0}", data.SecCode.ToString());
                 strcmd.AppendFormat(", MsgBackColor = '{0}'", data.MsgBackColor);
-                strcmd.AppendFormat(", DisplayString = '{0}'", data.DisplayString);
+                strcmd.AppendFormat(", DisplayString = {0}", SeparateString(data.DisplayString));
                 strcmd.AppendFormat(", DepartmentCode = {0}", data.DepartmentCode.ToString());
                 strcmd.AppendFormat(", MonthlySalary = {0}", data.MonthlySalary.ToString());
                 strcmd.AppendFormat(", YearSalary = {0}", data.YearSalary.ToString());
-                strcmd.AppendFormat(", Qualification = '{0}'", data.Qualification);
-                strcmd.AppendFormat(", SealPrintName = '{0}'", data.SealPrintName);
+                strcmd.AppendFormat(", Qualification = {0}", SeparateString(data.Qualification));
+                strcmd.AppendFormat(", SealPrintName = {0}", SeparateString(data.SealPrintName));
                 strcmd.AppendFormat(", EmployeeClassFlg = {0}", data.EmployeeClassFlg.ToString());
                 strcmd.AppendFormat(", LedgerFlg = {0}", data.LedgerFlg);
                 strcmd.AppendFormat(", CommutingDistance = {0}", data.CommutingDistance);
@@ -599,40 +625,40 @@
                         strcmd.AppendFormat(" DisplayOrder = {0}", ((int)value).ToString());
                         break;
                     case (int)ColumnCnt.PersonName:
-                        strcmd.AppendFormat(" PersonName = '{0}'", value.ToString());
+                        strcmd.AppendFormat(" PersonName = {0}", SeparateString(value.ToString()));
                         break;
                     case (int)ColumnCnt.PersonNameKana:
-                        strcmd.AppendFormat(", PersonNameKana = '{0}'", value.ToString());
+                        strcmd.AppendFormat(", PersonNameKana = {0}", SeparateString(value.ToString()));
                         break;
                     case (int)ColumnCnt.Sex:
                         strcmd.AppendFormat(", Sex = {0}", ((int)value).ToString());
                         break;
                     case (int)ColumnCnt.BloodType:
-                        strcmd.AppendFormat(", BloodType = '{0}'", value.ToString());
+                        strcmd.AppendFormat(", BloodType = {0}", SeparateString(value.ToString()));
                         break;
                     case (int)ColumnCnt.Birthday:
                         strcmd.AppendFormat(", Birthday = STR_TO_DATE('{0}' ,'%Y/%m/%d')", ((DateTime)value).ToShortDateString());
                         break;
                     case (int)ColumnCnt.ZipCode:
-                        strcmd.AppendFormat(", ZipCode = '{0}'", value.ToString());
+                        strcmd.AppendFormat(", ZipCode = {0}", SeparateString(value.ToString()));
                         break;
                     case (int)ColumnCnt.Address1:
-                        strcmd.AppendFormat(", Address1 = '{0}'", value.ToString());
+                        strcmd.AppendFormat(", Address1 = {0}", SeparateString(value.ToString()));
                         break;
                     case (int)ColumnCnt.Address2:
-                        strcmd.AppendFormat(", Address2 = '{0}'", value.ToString());
+                        strcmd.AppendFormat(", Address2 = {0}", SeparateString(value.ToString()));
                         break;
                     case (int)ColumnCnt.Address3:
-                        strcmd.AppendFormat(", Address3 = '{0}'", value.ToString());
+                        strcmd.AppendFormat(", Address3 = {0}", SeparateString(value.ToString()));
                         break;
                     case (int)ColumnCnt.PhoneNumber:
-                        strcmd.AppendFormat(", PhoneNumber = '{0}'", value.ToString());
+                        strcmd.AppendFormat(", PhoneNumber = {0}", SeparateString(value.ToString()));
                         break;
                     case (int)ColumnCnt.EmgPhoneNumber:
-                        strcmd.AppendFormat(", EmgPhoneNumber = '{0}'", value.ToString());
+                        strcmd.AppendFormat(", EmgPhoneNumber = {0}", SeparateString(value.ToString()));
                         break;
                     case (int)ColumnCnt.EmgContact:
-                        strcmd.AppendFormat(", EmgContact = '{0}'", value.ToString());
+                        strcmd.AppendFormat(", EmgContact = {0}", SeparateString(value.ToString()));
                         break;
                     case (int)ColumnCnt.StartDate:
                         strcmd.AppendFormat(" StartDate = STR_TO_DATE('{0}','%Y/%m/%d')", ((DateTime)value).ToShortDateString());
@@ -641,7 +667,7 @@
                         strcmd.AppendFormat(" EndDate = STR_TO_DATE('{0}','%Y/%m/%d')", ((DateTime)value).ToShortDateString());
                         break;
                     case (int)ColumnCnt.PassWord:
-                        strcmd.AppendFormat(" PassWord = '{0}'", value.ToString());
+                        strcmd.AppendFormat(" PassWord = {0}", SeparateString(value.ToString()));
                         break;
                     case (int)ColumnCnt.SecurityManagement:
                         strcmd.AppendFormat(" SecurityManagement = {0}", ((int)value).ToString());
@@ -653,7 +679,7 @@
                         strcmd.AppendFormat(" MsgBackColor = '{0}'", value.ToString());
                         break;
                     case (int)ColumnCnt.DisplayString:
-                        strcmd.AppendFormat(" DisplayString = '{0}'", value.ToString());
+                        strcmd.AppendFormat(" DisplayString = {0}", SeparateString(value.ToString()));
                         break;
                     case (int)ColumnCnt.DepartmentCode:
                         strcmd.AppendFormat(" DepartmentCode = {0}", ((int)value).ToString());
@@ -665,10 +691,10 @@
                         strcmd.AppendFormat(" YearSalary = {0}", ((double)value).ToString());
                         break;
                     case (int)ColumnCnt.Qualification:
-                        strcmd.AppendFormat(" Qualification = '{0}'", value.ToString());
+                        strcmd.AppendFormat(" Qualification = {0}", SeparateString(value.ToString()));
                         break;
                     case (int)ColumnCnt.SealPrintName:
-                        strcmd.AppendFormat(" SealPrintName = '{0}'", value.ToString());
+                        strcmd.AppendFormat(" SealPrintName = {0}", SeparateString(value.ToString()));
                         break;
                     case (int)ColumnCnt.EmployeeClassFlg:
                         strcmd.AppendFormat(" EmployeeClassFlg = {0}", ((int)value).ToString());
Index: trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOMQualificationMaster.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOMQualificationMaster.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOMQualificationMaster.cs	(revision 484)
@@ -192,8 +192,8 @@
 
                 strcmd.AppendFormat("  {0}", data.DCode);
                 strcmd.AppendFormat(", {0}", data.QCode);
-                strcmd.AppendFormat(",'{0}'", data.Qualification);
-                strcmd.AppendFormat(",'{0}'", data.DisplayOrder);
+                strcmd.AppendFormat(", {0}", SeparateString(data.Qualification));
+                strcmd.AppendFormat(", {0}", data.DisplayOrder);
                 strcmd.AppendFormat(", {0}", data.DeleteFlg);
 
                 strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", data.EntryDate);
@@ -242,7 +242,7 @@
 
                     strcmd.AppendFormat("  {0}", work.DCode);
                     strcmd.AppendFormat(", {0}", work.QCode);
-                    strcmd.AppendFormat(",'{0}'", work.Qualification);
+                    strcmd.AppendFormat(", {0}", SeparateString(work.Qualification));
                     strcmd.AppendFormat(", {0}", work.DisplayOrder);
                     strcmd.AppendFormat(", {0}", work.DeleteFlg);
 
@@ -284,7 +284,7 @@
 
                 strcmd.AppendFormat(" DCode =  {0}", data.DCode);
                 strcmd.AppendFormat(", QCode = {0}", data.QCode);
-                strcmd.AppendFormat(", Qualification = '{0}'", data.Qualification);
+                strcmd.AppendFormat(", Qualification = {0}", SeparateString(data.Qualification));
                 strcmd.AppendFormat(", DisplayOrder = {0}", data.DisplayOrder);
                 strcmd.AppendFormat(", DeleteFlg = {0}", data.DeleteFlg);
 
@@ -351,7 +351,7 @@
                         strcmd.AppendFormat(" QCode = {0}", ((int)value).ToString());
                         break;
                     case (int)NameColumn.Qualification:
-                        strcmd.AppendFormat(" Qualification = '{0}'", value.ToString());
+                        strcmd.AppendFormat(" Qualification = {0}", SeparateString(value.ToString()));
                         break;
                     case (int)NameColumn.DisplayOrder:
                         strcmd.AppendFormat(" DisplayOrder = {0}", ((int)value).ToString());
Index: trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOMSecurity.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOMSecurity.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOMSecurity.cs	(revision 484)
@@ -59,6 +59,44 @@
 
         #endregion
 
+        #region テーブルのフィールドリストを作成する
+        /// <summary>
+        /// テーブルのフィールドリストを作成する
+        /// </summary>
+        /// <returns></returns>
+        public static string CreateFieldNameList(string strAlias = "")
+        {
+            StringBuilder strcmd = new StringBuilder();
+            try
+            {
+                strcmd.Append(" ");
+                bool bColFirst = true;
+                string strWork = string.Empty;
+                foreach (var gender in Enum.GetValues(typeof(TableColumn)))
+                {
+                    strWork = gender.ToString();
+                    if (!bColFirst) strcmd.Append(",");
+                    if (strWork.Equals("EntryDate") || strWork.Equals("UpdateDate"))
+                    {
+                        strcmd.AppendFormat(" DATE_FORMAT({0}{1}, '%Y/%m/%d %H:%i:%s') As {1}", strAlias, strWork);
+                    }
+                    else
+                    {
+                        strcmd.AppendFormat(" {0}{1}", strAlias, strWork);
+                    }
+                    bColFirst = false;
+                }
+
+                return strcmd.ToString();
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("システムエラー：{0}：{1}：{2}", CommonMotions.GetMethodName(2), ex.Message, strcmd.ToString());
+                return string.Empty;
+            }
+        }
+        #endregion
+
         #region 保護区分マスタ検索文字作成
         /// <summary>
         /// 保護区分マスタ検索文字作成
@@ -65,31 +103,18 @@
         /// </summary>
         private string CreateSelectSQL()
         {
-            // SQL作成（DateTime型が変換できないのでCharに変換しておく）
             StringBuilder strcmd = new StringBuilder();
+            try
+            {
+                strcmd.AppendFormat("SELECT {0} FROM SecurityMaster", CreateFieldNameList());
 
-            strcmd.Append("SELECT ");
-
-            bool bColFirst = true;
-            string strWork = string.Empty;
-            foreach (var gender in Enum.GetValues(typeof(TableColumn)))
+                return strcmd.ToString();
+            }
+            catch (Exception ex)
             {
-                strWork = gender.ToString();
-                if (!bColFirst) strcmd.Append(",");
-                if (strWork.Equals("EntryDate") || strWork.Equals("UpdateDate"))
-                {
-                    strcmd.AppendFormat(" DATE_FORMAT({0}, '%Y/%m/%d %H:%i:%s')", strWork);
-                }
-                else
-                {
-                    strcmd.AppendFormat(" {0}", strWork);
-                }
-                bColFirst = false;
+                logger.ErrorFormat("システムエラー：{0}：{1}：{2}", CommonMotions.GetMethodName(2), ex.Message, strcmd.ToString());
+                return string.Empty;
             }
-
-            strcmd.Append(" FROM SecurityMaster");
-
-            return strcmd.ToString();
         }
         #endregion
 
@@ -199,7 +224,7 @@
 
                 strcmd.AppendFormat(" {0}", work.SecCode.ToString());
                 strcmd.AppendFormat(", {0}", work.DisplayOrder);
-                strcmd.AppendFormat(",'{0}'", work.SecName);
+                strcmd.AppendFormat(", {0}", SeparateString(work.SecName));
                 strcmd.AppendFormat(", {0}", work.SecRank);
                 strcmd.AppendFormat(", {0}", work.SecRange);
                 strcmd.AppendFormat(", {0}", work.GeneralAffairs);
@@ -252,7 +277,7 @@
 
                     strcmd.AppendFormat("  {0}", work.SecCode);
                     strcmd.AppendFormat(", {0}", work.DisplayOrder);
-                    strcmd.AppendFormat(",'{0}'", work.SecName);
+                    strcmd.AppendFormat(", {0}", SeparateString(work.SecName));
                     strcmd.AppendFormat(", {0}", work.SecRank);
                     strcmd.AppendFormat(", {0}", work.SecRange);
                     strcmd.AppendFormat(", {0}", work.GeneralAffairs);
@@ -297,7 +322,7 @@
 
                 strcmd.AppendFormat(" SecCode = {0}", data.SecCode);
                 strcmd.AppendFormat(",DisplayOrder = {0}", data.DisplayOrder);
-                strcmd.AppendFormat(",SecName = '{0}'", data.SecName);
+                strcmd.AppendFormat(",SecName = {0}", SeparateString(data.SecName));
                 strcmd.AppendFormat(",SecRank = {0}", data.SecRank);
                 strcmd.AppendFormat(",SecRange = {0}", data.SecRange);
                 strcmd.AppendFormat(",GeneralAffairs = {0}", data.GeneralAffairs);
@@ -372,7 +397,7 @@
                         strcmd.AppendFormat(" DisplayOrder = {0}", ((int)value).ToString());
                         break;
                     case (int)TableColumn.SecName:
-                        strcmd.AppendFormat(" SecurityName = '{0}'", value.ToString());
+                        strcmd.AppendFormat(" SecurityName = {0}", SeparateString(value.ToString()));
                         break;
                     case (int)TableColumn.SecRank:
                         strcmd.AppendFormat(" SecurityRank = {0}", ((int)value).ToString());
Index: trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOMSubContrMailDelivery.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOMSubContrMailDelivery.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOMSubContrMailDelivery.cs	(revision 484)
@@ -195,7 +195,7 @@
 
                 strcmd.AppendFormat("  {0}", data.CompanyCode);
                 strcmd.AppendFormat(", {0}", data.SeqNo);
-                strcmd.AppendFormat(",'{0}'", data.MailDelivery);
+                strcmd.AppendFormat(", {0}", data.MailDelivery);
 
                 strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", data.EntryDate);
                 strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", data.UpdateDate);
@@ -243,7 +243,7 @@
 
                     strcmd.AppendFormat("  {0}", work.CompanyCode);
                     strcmd.AppendFormat(", {0}", work.SeqNo);
-                    strcmd.AppendFormat(",'{0}'", work.MailDelivery);
+                    strcmd.AppendFormat(", {0}", work.MailDelivery);
 
                     strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.EntryDate);
                     strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.UpdateDate);
@@ -282,7 +282,7 @@
 
                 strcmd.AppendFormat(" CompanyCode = {0}", data.CompanyCode);
                 strcmd.AppendFormat(", SeqNo = {0}", data.SeqNo);
-                strcmd.AppendFormat(", MailDelivery = '{0}'", data.MailDelivery);
+                strcmd.AppendFormat(", MailDelivery = {0}", data.MailDelivery);
 
                 strcmd.Append(", UpdateDate = NOW()");
                 strcmd.Append(AddSQLString);
Index: trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOMSubContractor.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOMSubContractor.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOMSubContractor.cs	(revision 484)
@@ -86,6 +86,48 @@
 
         #endregion
 
+        #region テーブルのフィールドリストを作成する
+        /// <summary>
+        /// テーブルのフィールドリストを作成する
+        /// </summary>
+        /// <returns></returns>
+        public static string CreateFieldNameList(string strAlias = "")
+        {
+            StringBuilder strcmd = new StringBuilder();
+            try
+            {
+                strcmd.Append(" ");
+                bool bColFirst = true;
+                string strWork = string.Empty;
+                foreach (var gender in Enum.GetValues(typeof(TableColumn)))
+                {
+                    strWork = gender.ToString();
+                    if (!bColFirst) strcmd.Append(",");
+                    if (strWork.Equals("ConfirmedDate") || strWork.Equals("EntryDate") || strWork.Equals("UpdateDate"))
+                    {
+                        strcmd.AppendFormat(" DATE_FORMAT({0}{1}, '%Y/%m/%d %H:%i:%s') As {1}", strAlias, strWork);
+                    }
+                    else if (strWork.Equals("StartDate"))
+                    {
+                        strcmd.AppendFormat(" DATE_FORMAT({0}{1}, '%Y/%m/%d') As {1}", strAlias, strWork);
+                    }
+                    else
+                    {
+                        strcmd.AppendFormat(" {0}{1}", strAlias, strWork);
+                    }
+                    bColFirst = false;
+                }
+
+                return strcmd.ToString();
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("システムエラー：{0}：{1}：{2}", CommonMotions.GetMethodName(2), ex.Message, strcmd.ToString());
+                return string.Empty;
+            }
+        }
+        #endregion
+
         #region 協力会社マスタ検索文字列作成
         /// <summary>
         /// 協力会社マスタ検索文字列作成
@@ -96,32 +138,17 @@
         private string CreateSelectSQL()
         {
             StringBuilder strcmd = new StringBuilder();
-            strcmd.Append("SELECT");
+            try
+            {
+                strcmd.AppendFormat("SELECT {0} FROM SubContractorMaster", CreateFieldNameList());
 
-            bool bColFirst = true;
-            string strWork = string.Empty;
-            foreach (var gender in Enum.GetValues(typeof(TableColumn)))
+                return strcmd.ToString();
+            }
+            catch (Exception ex)
             {
-                strWork = gender.ToString();
-                if (!bColFirst) strcmd.Append(",");
-                if (strWork.Equals("ConfirmedDate") || strWork.Equals("EntryDate") || strWork.Equals("UpdateDate"))
-                {
-                    strcmd.AppendFormat(" DATE_FORMAT({0}, '%Y/%m/%d %H:%i:%s')", strWork);
-                }
-                else if (strWork.Equals("StartDate"))
-                {
-                    strcmd.AppendFormat(" DATE_FORMAT({0}, '%Y/%m/%d')", strWork);
-                }
-                else
-                {
-                    strcmd.AppendFormat(" {0}", strWork);
-                }
-                bColFirst = false;
+                logger.ErrorFormat("システムエラー：{0}：{1}：{2}", CommonMotions.GetMethodName(2), ex.Message, strcmd.ToString());
+                return string.Empty;
             }
-
-            strcmd.Append(" FROM SubContractorMaster");
-
-            return strcmd.ToString();
         }
         #endregion
 
@@ -231,36 +258,36 @@
 
                 strcmd.AppendFormat("  {0}", data.CompanyCode);
                 strcmd.AppendFormat(", {0}", data.DisplayOrder);
-                strcmd.AppendFormat(",'{0}'", data.CorporateStatusName);
+                strcmd.AppendFormat(", {0}", SeparateString(data.CorporateStatusName));
                 strcmd.AppendFormat(", {0}", data.CorporateStatusPoint);
-                strcmd.AppendFormat(",'{0}'", data.CompanyName);
-                strcmd.AppendFormat(",'{0}'", data.CompanyNameKana);
-                strcmd.AppendFormat(",'{0}'", data.CEOPositionName);
-                strcmd.AppendFormat(",'{0}'", data.CEOName);
-                strcmd.AppendFormat(",'{0}'", data.CEONameKana);
-                strcmd.AppendFormat(",'{0}'", data.ContactPersonName);
-                strcmd.AppendFormat(",'{0}'", data.ContactPersonNameKana);
-                strcmd.AppendFormat(",'{0}'", data.ZipCode);
-                strcmd.AppendFormat(",'{0}'", data.Address1);
-                strcmd.AppendFormat(",'{0}'", data.Address2);
-                strcmd.AppendFormat(",'{0}'", data.Address3);
-                strcmd.AppendFormat(",'{0}'", data.CellPhoneNumber);
-                strcmd.AppendFormat(",'{0}'", data.MailAddress);
-                strcmd.AppendFormat(",'{0}'", data.PhoneNumber);
-                strcmd.AppendFormat(",'{0}'", data.FaxNumber );
-                strcmd.AppendFormat(",'{0}'", data.JapaneseSyllabary);
+                strcmd.AppendFormat(", {0}", SeparateString(data.CompanyName));
+                strcmd.AppendFormat(", {0}", SeparateString(data.CompanyNameKana));
+                strcmd.AppendFormat(", {0}", SeparateString(data.CEOPositionName));
+                strcmd.AppendFormat(", {0}", SeparateString(data.CEOName));
+                strcmd.AppendFormat(", {0}", SeparateString(data.CEONameKana));
+                strcmd.AppendFormat(", {0}", SeparateString(data.ContactPersonName));
+                strcmd.AppendFormat(", {0}", SeparateString(data.ContactPersonNameKana));
+                strcmd.AppendFormat(", {0}", SeparateString(data.ZipCode));
+                strcmd.AppendFormat(", {0}", SeparateString(data.Address1));
+                strcmd.AppendFormat(", {0}", SeparateString(data.Address2));
+                strcmd.AppendFormat(", {0}", SeparateString(data.Address3));
+                strcmd.AppendFormat(", {0}", SeparateString(data.CellPhoneNumber));
+                strcmd.AppendFormat(", {0}", SeparateString(data.MailAddress));
+                strcmd.AppendFormat(", {0}", SeparateString(data.PhoneNumber));
+                strcmd.AppendFormat(", {0}", SeparateString(data.FaxNumber ));
+                strcmd.AppendFormat(", {0}", SeparateString(data.JapaneseSyllabary));
                 strcmd.AppendFormat(",STR_TO_DATE('{0}','%Y/%m/%d')", data.StartDate.ToShortDateString());
-                strcmd.AppendFormat(",'{0}'", data.Note);
+                strcmd.AppendFormat(", {0}", SeparateString(data.Note));
                 strcmd.AppendFormat(", {0} ", data.labourKind);
                 strcmd.AppendFormat(",'{0}'", data.RequestImputId);
-                strcmd.AppendFormat(",'{0}'", data.Password);
+                strcmd.AppendFormat(", {0}", SeparateString(data.Password));
                 strcmd.AppendFormat(", {0} ", data.BankCode);
-                strcmd.AppendFormat(",'{0}'", data.BankName);
+                strcmd.AppendFormat(", {0}", SeparateString(data.BankName));
                 strcmd.AppendFormat(", {0} ", data.BankBranchCode);
-                strcmd.AppendFormat(",'{0}'", data.BankBranchName);
+                strcmd.AppendFormat(", {0}", SeparateString(data.BankBranchName));
                 strcmd.AppendFormat(", {0} ", data.BankAccountKind);
                 strcmd.AppendFormat(", {0} ", data.BankAccountNo);
-                strcmd.AppendFormat(",'{0}'", data.BankAccountName);
+                strcmd.AppendFormat(", {0}", SeparateString(data.BankAccountName));
                 strcmd.AppendFormat(", {0} ", data.TransferFees);
                 strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", data.ConfirmedDate);
                 strcmd.AppendFormat(", {0} ", data.DeleteFlg.ToString());
@@ -311,36 +338,36 @@
 
                     strcmd.AppendFormat("  {0}", work.CompanyCode);
                     strcmd.AppendFormat(", {0}", work.DisplayOrder);
-                    strcmd.AppendFormat(",'{0}'", work.CorporateStatusName);
+                    strcmd.AppendFormat(", {0}", SeparateString(work.CorporateStatusName));
                     strcmd.AppendFormat(", {0}", work.CorporateStatusPoint);
-                    strcmd.AppendFormat(",'{0}'", work.CompanyName);
-                    strcmd.AppendFormat(",'{0}'", work.CompanyNameKana);
-                    strcmd.AppendFormat(",'{0}'", work.CEOPositionName);
-                    strcmd.AppendFormat(",'{0}'", work.CEOName);
-                    strcmd.AppendFormat(",'{0}'", work.CEONameKana);
-                    strcmd.AppendFormat(",'{0}'", work.ContactPersonName);
-                    strcmd.AppendFormat(",'{0}'", work.ContactPersonNameKana);
-                    strcmd.AppendFormat(",'{0}'", work.ZipCode);
-                    strcmd.AppendFormat(",'{0}'", work.Address1);
-                    strcmd.AppendFormat(",'{0}'", work.Address2);
-                    strcmd.AppendFormat(",'{0}'", work.Address3);
-                    strcmd.AppendFormat(",'{0}'", work.CellPhoneNumber);
-                    strcmd.AppendFormat(",'{0}'", work.MailAddress);
-                    strcmd.AppendFormat(",'{0}'", work.PhoneNumber);
-                    strcmd.AppendFormat(",'{0}'", work.FaxNumber);
-                    strcmd.AppendFormat(",'{0}'", work.JapaneseSyllabary);
+                    strcmd.AppendFormat(", {0}", SeparateString(work.CompanyName));
+                    strcmd.AppendFormat(", {0}", SeparateString(work.CompanyNameKana));
+                    strcmd.AppendFormat(", {0}", SeparateString(work.CEOPositionName));
+                    strcmd.AppendFormat(", {0}", SeparateString(work.CEOName));
+                    strcmd.AppendFormat(", {0}", SeparateString(work.CEONameKana));
+                    strcmd.AppendFormat(", {0}", SeparateString(work.ContactPersonName));
+                    strcmd.AppendFormat(", {0}", SeparateString(work.ContactPersonNameKana));
+                    strcmd.AppendFormat(", {0}", SeparateString(work.ZipCode));
+                    strcmd.AppendFormat(", {0}", SeparateString(work.Address1));
+                    strcmd.AppendFormat(", {0}", SeparateString(work.Address2));
+                    strcmd.AppendFormat(", {0}", SeparateString(work.Address3));
+                    strcmd.AppendFormat(", {0}", SeparateString(work.CellPhoneNumber));
+                    strcmd.AppendFormat(", {0}", SeparateString(work.MailAddress));
+                    strcmd.AppendFormat(", {0}", SeparateString(work.PhoneNumber));
+                    strcmd.AppendFormat(", {0}", SeparateString(work.FaxNumber));
+                    strcmd.AppendFormat(", {0}", SeparateString(work.JapaneseSyllabary));
                     strcmd.AppendFormat(",STR_TO_DATE('{0}','%Y/%m/%d')", work.StartDate.ToShortDateString());
-                    strcmd.AppendFormat(",'{0}'", work.Note);
+                    strcmd.AppendFormat(", {0}", SeparateString(work.Note));
                     strcmd.AppendFormat(", {0} ", work.labourKind.ToString());
                     strcmd.AppendFormat(",'{0}'", work.RequestImputId);
-                    strcmd.AppendFormat(",'{0}'", work.Password);
+                    strcmd.AppendFormat(", {0}", SeparateString(work.Password));
                     strcmd.AppendFormat(", {0} ", work.BankCode);
-                    strcmd.AppendFormat(",'{0}'", work.BankName);
+                    strcmd.AppendFormat(", {0}", SeparateString(work.BankName));
                     strcmd.AppendFormat(", {0} ", work.BankBranchCode);
-                    strcmd.AppendFormat(",'{0}'", work.BankBranchName);
+                    strcmd.AppendFormat(", {0}", SeparateString(work.BankBranchName));
                     strcmd.AppendFormat(", {0} ", work.BankAccountKind);
                     strcmd.AppendFormat(", {0} ", work.BankAccountNo);
-                    strcmd.AppendFormat(",'{0}'", work.BankAccountName);
+                    strcmd.AppendFormat(", {0}", SeparateString(work.BankAccountName));
                     strcmd.AppendFormat(", {0} ", work.TransferFees);
                     strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.ConfirmedDate);
                     strcmd.AppendFormat(", {0} ", work.DeleteFlg.ToString());
@@ -382,36 +409,36 @@
 
                 strcmd.AppendFormat(" CompanyCode = {0}", data.CompanyCode);
                 strcmd.AppendFormat(", DisplayOrder = {0}", data.DisplayOrder);
-                strcmd.AppendFormat(", CorporateStatusName = '{0}'", data.CorporateStatusName);
+                strcmd.AppendFormat(", CorporateStatusName = {0}", SeparateString(data.CorporateStatusName));
                 strcmd.AppendFormat(", CorporateStatusPoint = {0}", data.CorporateStatusPoint);
-                strcmd.AppendFormat(", CompanyName = '{0}'", data.CompanyName);
-                strcmd.AppendFormat(", CompanyNameKana = '{0}'", data.CompanyNameKana);
-                strcmd.AppendFormat(", CEOPositionName = '{0}'", data.CEOPositionName);
-                strcmd.AppendFormat(", CEOName = '{0}'", data.CEOName);
-                strcmd.AppendFormat(", CEONameKana = '{0}'", data.CEONameKana);
-                strcmd.AppendFormat(", ContactPersonName = '{0}'", data.ContactPersonName);
-                strcmd.AppendFormat(", ContactPersonNameKana = '{0}'", data.ContactPersonNameKana);
-                strcmd.AppendFormat(", ZipCode = '{0}'", data.ZipCode);
-                strcmd.AppendFormat(", Address1 = '{0}'", data.Address1);
-                strcmd.AppendFormat(", Address2 = '{0}'", data.Address2);
-                strcmd.AppendFormat(", Address3 = '{0}'", data.Address3);
-                strcmd.AppendFormat(", CellPhoneNumber = '{0}'", data.CellPhoneNumber);
-                strcmd.AppendFormat(", MailAddress = '{0}'", data.MailAddress);
-                strcmd.AppendFormat(", PhoneNumber = '{0}'", data.PhoneNumber);
-                strcmd.AppendFormat(", FaxNumber = '{0}'", data.FaxNumber);
-                strcmd.AppendFormat(", JapaneseSyllabary = '{0}'", data.JapaneseSyllabary);
+                strcmd.AppendFormat(", CompanyName = {0}", SeparateString(data.CompanyName));
+                strcmd.AppendFormat(", CompanyNameKana = {0}", SeparateString(data.CompanyNameKana));
+                strcmd.AppendFormat(", CEOPositionName = {0}", SeparateString(data.CEOPositionName));
+                strcmd.AppendFormat(", CEOName = {0}", SeparateString(data.CEOName));
+                strcmd.AppendFormat(", CEONameKana = {0}", SeparateString(data.CEONameKana));
+                strcmd.AppendFormat(", ContactPersonName = {0}", SeparateString(data.ContactPersonName));
+                strcmd.AppendFormat(", ContactPersonNameKana = {0}", SeparateString(data.ContactPersonNameKana));
+                strcmd.AppendFormat(", ZipCode = {0}", SeparateString(data.ZipCode));
+                strcmd.AppendFormat(", Address1 = {0}", SeparateString(data.Address1));
+                strcmd.AppendFormat(", Address2 = {0}", SeparateString(data.Address2));
+                strcmd.AppendFormat(", Address3 = {0}", SeparateString(data.Address3));
+                strcmd.AppendFormat(", CellPhoneNumber = {0}", SeparateString(data.CellPhoneNumber));
+                strcmd.AppendFormat(", MailAddress = {0}", SeparateString(data.MailAddress));
+                strcmd.AppendFormat(", PhoneNumber = {0}", SeparateString(data.PhoneNumber));
+                strcmd.AppendFormat(", FaxNumber = {0}", SeparateString(data.FaxNumber));
+                strcmd.AppendFormat(", JapaneseSyllabary = {0}", SeparateString(data.JapaneseSyllabary));
                 strcmd.AppendFormat(", StartDate = STR_TO_DATE('{0}','%Y/%m/%d')", data.StartDate.ToShortDateString());
-                strcmd.AppendFormat(", Note = '{0}'", data.Note);
+                strcmd.AppendFormat(", Note = {0}", SeparateString(data.Note));
                 strcmd.AppendFormat(", labourKind = {0}", data.labourKind);
                 strcmd.AppendFormat(", RequestImputId = '{0}'", data.RequestImputId);
-                strcmd.AppendFormat(", Password = '{0}'", data.Password);
+                strcmd.AppendFormat(", Password = {0}", SeparateString(data.Password));
                 strcmd.AppendFormat(", BankCode = {0} ", data.BankCode);
-                strcmd.AppendFormat(", BankName = '{0}'", data.BankName);
+                strcmd.AppendFormat(", BankName = {0}", SeparateString(data.BankName));
                 strcmd.AppendFormat(", BankBranchCode = {0} ", data.BankBranchCode);
-                strcmd.AppendFormat(", BankBranchName = '{0}'", data.BankBranchName);
+                strcmd.AppendFormat(", BankBranchName = {0}", SeparateString(data.BankBranchName));
                 strcmd.AppendFormat(", BankAccountKind = {0} ", data.BankAccountKind);
                 strcmd.AppendFormat(", BankAccountNo = {0} ", data.BankAccountNo);
-                strcmd.AppendFormat(", BankAccountName = '{0}'", data.BankAccountName);
+                strcmd.AppendFormat(", BankAccountName = {0}", SeparateString(data.BankAccountName));
                 strcmd.AppendFormat(", TransferFees = {0} ", data.TransferFees);
                 strcmd.Append(", ConfirmedDate = NOW()");
                 strcmd.AppendFormat(", DeleteFlg = {0}", data.DeleteFlg);
@@ -479,64 +506,64 @@
                         strcmd.AppendFormat(" DisplayOrder = {0}", ((int)value).ToString());
                         break;
                     case (int)TableColumn.CorporateStatusName:
-                        strcmd.AppendFormat(" CorporateStatusName = '{0}'", value.ToString());
+                        strcmd.AppendFormat(" CorporateStatusName = {0}", SeparateString(value.ToString()));
                         break;
                     case (int)TableColumn.CorporateStatusPoint:
                         strcmd.AppendFormat(" CorporateStatusPoint = {0}", ((int)value).ToString());
                         break;
                     case (int)TableColumn.CompanyName:
-                        strcmd.AppendFormat(" CompanyName = '{0}'", value.ToString());
+                        strcmd.AppendFormat(" CompanyName =  {0}", SeparateString(value.ToString()));
                         break;
                     case (int)TableColumn.CompanyNameKana:
-                        strcmd.AppendFormat(" CompanyNameKana = '{0}'", value.ToString());
+                        strcmd.AppendFormat(" CompanyNameKana =  {0}", SeparateString(value.ToString()));
                         break;
                     case (int)TableColumn.CEOPositionName:
-                        strcmd.AppendFormat(" CEOPositionName = '{0}'", value.ToString());
+                        strcmd.AppendFormat(" CEOPositionName =  {0}", SeparateString(value.ToString()));
                         break;
                     case (int)TableColumn.CEOName:
-                        strcmd.AppendFormat(" CEOName = '{0}'", value.ToString());
+                        strcmd.AppendFormat(" CEOName =  {0}", SeparateString(value.ToString()));
                         break;
                     case (int)TableColumn.CEONameKana:
-                        strcmd.AppendFormat(" CEONameKana = '{0}'", value.ToString());
+                        strcmd.AppendFormat(" CEONameKana =  {0}", SeparateString(value.ToString()));
                         break;
                     case (int)TableColumn.ContactPersonName:
-                        strcmd.AppendFormat(" ContactPersonName = '{0}'", value.ToString());
+                        strcmd.AppendFormat(" ContactPersonName =  {0}", SeparateString(value.ToString()));
                         break;
                     case (int)TableColumn.ContactPersonNameKana:
-                        strcmd.AppendFormat(" ContactPersonNameKana = '{0}'", value.ToString());
+                        strcmd.AppendFormat(" ContactPersonNameKana =  {0}", SeparateString(value.ToString()));
                         break;
                     case (int)TableColumn.ZipCode:
-                        strcmd.AppendFormat(" ZipCode = '{0}'", value.ToString());
+                        strcmd.AppendFormat(" ZipCode =  {0}", SeparateString(value.ToString()));
                         break;
                     case (int)TableColumn.Address1:
-                        strcmd.AppendFormat(" Address1 = '{0}'", value.ToString());
+                        strcmd.AppendFormat(" Address1 =  {0}", SeparateString(value.ToString()));
                         break;
                     case (int)TableColumn.Address2:
-                        strcmd.AppendFormat(" Address2 = '{0}'", value.ToString());
+                        strcmd.AppendFormat(" Address2 =  {0}", SeparateString(value.ToString()));
                         break;
                     case (int)TableColumn.Address3:
-                        strcmd.AppendFormat(" Address3 = '{0}'", value.ToString());
+                        strcmd.AppendFormat(" Address3 =  {0}", SeparateString(value.ToString()));
                         break;
                     case (int)TableColumn.CellPhoneNumber:
-                        strcmd.AppendFormat(" CellPhoneNumber = '{0}'", value.ToString());
+                        strcmd.AppendFormat(" CellPhoneNumber =  {0}", SeparateString(value.ToString()));
                         break;
                     case (int)TableColumn.MailAddress:
-                        strcmd.AppendFormat(" MailAddress = '{0}'", value.ToString());
+                        strcmd.AppendFormat(" MailAddress =  {0}", SeparateString(value.ToString()));
                         break;
                     case (int)TableColumn.PhoneNumber:
-                        strcmd.AppendFormat(" PhoneNumber = '{0}'", value.ToString());
+                        strcmd.AppendFormat(" PhoneNumber =  {0}", SeparateString(value.ToString()));
                         break;
                     case (int)TableColumn.FaxNumber:
-                        strcmd.AppendFormat(" FaxNumber = '{0}'", value.ToString());
+                        strcmd.AppendFormat(" FaxNumber =  {0}", SeparateString(value.ToString()));
                         break;
                     case (int)TableColumn.JapaneseSyllabary:
-                        strcmd.AppendFormat(" JapaneseSyllabary = '{0}'", value.ToString());
+                        strcmd.AppendFormat(" JapaneseSyllabary =  {0}", SeparateString(value.ToString()));
                         break;
                     case (int)TableColumn.StartDate:
                         strcmd.AppendFormat(" StartDate = STR_TO_DATE('{0}','%Y/%m/%d')", ((DateTime)value).ToShortDateString());
                         break;
                     case (int)TableColumn.Note:
-                        strcmd.AppendFormat(" Note = '{0}'", value.ToString());
+                        strcmd.AppendFormat(" Note = {0}", SeparateString(value.ToString()));
                         break;
                     case (int)TableColumn.labourKind:
                         strcmd.AppendFormat(" labourKind = {0}", ((int)value).ToString());
@@ -545,19 +572,19 @@
                         strcmd.AppendFormat(" RequestImputId = '{0}'", value.ToString());
                         break;
                     case (int)TableColumn.Password:
-                        strcmd.AppendFormat(" Password = '{0}'", value.ToString());
+                        strcmd.AppendFormat(" Password = {0}", SeparateString(value.ToString()));
                         break;
                     case (int)TableColumn.BankCode:
                         strcmd.AppendFormat(" BankCode = {0}", ((int)value).ToString());
                         break;
                     case (int)TableColumn.BankName:
-                        strcmd.AppendFormat(" BankName = '{0}'", value.ToString());
+                        strcmd.AppendFormat(" BankName = {0}", SeparateString(value.ToString()));
                         break;
                     case (int)TableColumn.BankBranchCode:
                         strcmd.AppendFormat(" BankBranchCode = {0}", ((int)value).ToString());
                         break;
                     case (int)TableColumn.BankBranchName:
-                        strcmd.AppendFormat(" BankBranchName = '{0}'", value.ToString());
+                        strcmd.AppendFormat(" BankBranchName = {0}", SeparateString(value.ToString()));
                         break;
                     case (int)TableColumn.BankAccountKind:
                         strcmd.AppendFormat(" BankAccountKind = {0}", ((int)value).ToString());
@@ -566,7 +593,7 @@
                         strcmd.AppendFormat(" BankAccountNo = {0}", ((int)value).ToString());
                         break;
                     case (int)TableColumn.BankAccountName:
-                        strcmd.AppendFormat(" BankAccountName = '{0}'", value.ToString());
+                        strcmd.AppendFormat(" BankAccountName = {0}", SeparateString(value.ToString()));
                         break;
                     case (int)TableColumn.TransferFees:
                         strcmd.AppendFormat(" TransferFees = {0}", ((int)value).ToString());
Index: trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOMSubContractorItem.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOMSubContractorItem.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOMSubContractorItem.cs	(revision 484)
@@ -193,7 +193,7 @@
 
                     strcmd.AppendFormat(" {0}", work.ItemCode.ToString());
                     strcmd.AppendFormat(", {0}", work.DisplayOrder.ToString());
-                    strcmd.AppendFormat(", '{0}'", work.ItemName);
+                    strcmd.AppendFormat(", {0}", SeparateString(work.ItemName));
                     strcmd.AppendFormat(", {0}", work.DeleteFlg.ToString());
 
                     strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.EntryDate);
@@ -234,7 +234,7 @@
 
                 strcmd.AppendFormat("  ItemCode = {0}", data.ItemCode.ToString());
                 strcmd.AppendFormat(", DisplayOrder = {0}", data.DisplayOrder.ToString());
-                strcmd.AppendFormat(", ItemName = '{0}'", data.ItemName);
+                strcmd.AppendFormat(", ItemName = {0}", SeparateString(data.ItemName));
                 strcmd.AppendFormat(", DeleteFlg = {0}", data.DeleteFlg.ToString());
 
                 strcmd.Append(", UpdateDate = NOW()");
Index: trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOMSubContractorJobCategory.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOMSubContractorJobCategory.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOMSubContractorJobCategory.cs	(revision 484)
@@ -187,7 +187,7 @@
 
                 strcmd.AppendFormat(" {0}", data.JobCategoryCode.ToString());
                 strcmd.AppendFormat(", {0}", data.DisplayOrder.ToString());
-                strcmd.AppendFormat(", '{0}'", data.JobCategoryName);
+                strcmd.AppendFormat(", {0}", SeparateString(data.JobCategoryName));
                 strcmd.AppendFormat(", {0}", data.DeleteFlg.ToString());
 
                 strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", data.EntryDate);
@@ -236,7 +236,7 @@
 
                     strcmd.AppendFormat(" {0}", work.JobCategoryCode.ToString());
                     strcmd.AppendFormat(", {0}", work.DisplayOrder.ToString());
-                    strcmd.AppendFormat(", '{0}'", work.JobCategoryName);
+                    strcmd.AppendFormat(", {0}", SeparateString(work.JobCategoryName));
                     strcmd.AppendFormat(", {0}", work.DeleteFlg.ToString());
 
                     strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.EntryDate);
@@ -277,7 +277,7 @@
 
                 strcmd.AppendFormat("  JobCategoryCode = {0}", data.JobCategoryCode.ToString());
                 strcmd.AppendFormat(", DisplayOrder = {0}", data.DisplayOrder.ToString());
-                strcmd.AppendFormat(", JobCategoryName = '{0}'", data.JobCategoryName);
+                strcmd.AppendFormat(", JobCategoryName = {0}", SeparateString(data.JobCategoryName));
                 strcmd.AppendFormat(", DeleteFlg = {0}", data.DeleteFlg.ToString());
 
                 strcmd.Append(", UpdateDate = NOW()");
Index: trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOMSubContractorJobItem.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOMSubContractorJobItem.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOMSubContractorJobItem.cs	(revision 484)
@@ -53,6 +53,44 @@
 
         #endregion
 
+        #region テーブルのフィールドリストを作成する
+        /// <summary>
+        /// テーブルのフィールドリストを作成する
+        /// </summary>
+        /// <returns></returns>
+        public static string CreateFieldNameList(string strAlias = "")
+        {
+            StringBuilder strcmd = new StringBuilder();
+            try
+            {
+                strcmd.Append(" ");
+                bool bColFirst = true;
+                string strWork = string.Empty;
+                foreach (var gender in Enum.GetValues(typeof(NameColumn)))
+                {
+                    strWork = gender.ToString();
+                    if (!bColFirst) strcmd.Append(",");
+                    if (strWork.Equals("EntryDate") || strWork.Equals("UpdateDate"))
+                    {
+                        strcmd.AppendFormat(" DATE_FORMAT({0}{1}, '%Y/%m/%d %H:%i:%s') As {1}", strAlias, strWork);
+                    }
+                    else
+                    {
+                        strcmd.AppendFormat(" {0}{1}", strAlias, strWork);
+                    }
+                    bColFirst = false;
+                }
+
+                return strcmd.ToString();
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("システムエラー：{0}：{1}：{2}", CommonMotions.GetMethodName(2), ex.Message, strcmd.ToString());
+                return string.Empty;
+            }
+        }
+        #endregion
+
         #region パブリックメソッド
         /// <summary>
         /// 協力会社工種関連マスタ検索
@@ -62,17 +100,18 @@
         /// <returns>true：成功 false：失敗</returns>
         private string CreateSelectSQL()
         {
-            // SQL作成（DateTime型が変換できないのでCharに変換しておく）
             StringBuilder strcmd = new StringBuilder();
-            strcmd.Append("SELECT");
-            strcmd.Append("  CompanyCode");
-            strcmd.Append(", ItemCode");
-            strcmd.Append(", DisplayOrder");
-            strcmd.Append(", DATE_FORMAT(EntryDate, '%Y/%m/%d %H:%i:%s')");
-            strcmd.Append(", DATE_FORMAT(UpdateDate, '%Y/%m/%d %H:%i:%s')");
-            strcmd.Append(" FROM SubContractorJobItem");
+            try
+            {
+                strcmd.AppendFormat("SELECT {0} FROM SubContractorJobItem", CreateFieldNameList());
 
-            return strcmd.ToString();
+                return strcmd.ToString();
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("システムエラー：{0}：{1}：{2}", CommonMotions.GetMethodName(2), ex.Message, strcmd.ToString());
+                return string.Empty;
+            }
         }
         #endregion
 
Index: trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOMSubContractorJobLink.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOMSubContractorJobLink.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOMSubContractorJobLink.cs	(revision 484)
@@ -53,6 +53,44 @@
 
         #endregion
 
+        #region テーブルのフィールドリストを作成する
+        /// <summary>
+        /// テーブルのフィールドリストを作成する
+        /// </summary>
+        /// <returns></returns>
+        public static string CreateFieldNameList(string strAlias = "")
+        {
+            StringBuilder strcmd = new StringBuilder();
+            try
+            {
+                strcmd.Append(" ");
+                bool bColFirst = true;
+                string strWork = string.Empty;
+                foreach (var gender in Enum.GetValues(typeof(NameColumn)))
+                {
+                    strWork = gender.ToString();
+                    if (!bColFirst) strcmd.Append(",");
+                    if (strWork.Equals("EntryDate") || strWork.Equals("UpdateDate"))
+                    {
+                        strcmd.AppendFormat(" DATE_FORMAT({0}{1}, '%Y/%m/%d %H:%i:%s') As {1}", strAlias, strWork);
+                    }
+                    else
+                    {
+                        strcmd.AppendFormat(" {0}{1}", strAlias, strWork);
+                    }
+                    bColFirst = false;
+                }
+
+                return strcmd.ToString();
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("システムエラー：{0}：{1}：{2}", CommonMotions.GetMethodName(2), ex.Message, strcmd.ToString());
+                return string.Empty;
+            }
+        }
+        #endregion
+
         #region 協力会社職種関連マスタ検索
         /// <summary>
         /// 協力会社職種関連マスタ検索
@@ -60,17 +98,18 @@
         /// <returns></returns>
         private string CreateSelectSQL()
         {
-            // SQL作成（DateTime型が変換できないのでCharに変換しておく）
             StringBuilder strcmd = new StringBuilder();
-            strcmd.Append("SELECT");
-            strcmd.Append("  CompanyCode");
-            strcmd.Append(", JobCategoryCode");
-            strcmd.Append(", DisplayOrder");
-            strcmd.Append(", DATE_FORMAT(EntryDate, '%Y/%m/%d %H:%i:%s')");
-            strcmd.Append(", DATE_FORMAT(UpdateDate, '%Y/%m/%d %H:%i:%s')");
-            strcmd.Append(" FROM SubContractorJobLink");
+            try
+            {
+                strcmd.AppendFormat("SELECT {0} FROM SubContractorJobLink", CreateFieldNameList());
 
-            return strcmd.ToString();
+                return strcmd.ToString();
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("システムエラー：{0}：{1}：{2}", CommonMotions.GetMethodName(2), ex.Message, strcmd.ToString());
+                return string.Empty;
+            }
         }
         #endregion
 
Index: trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOMSubContractorMail.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOMSubContractorMail.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOMSubContractorMail.cs	(revision 484)
@@ -195,7 +195,7 @@
 
                 strcmd.AppendFormat("  {0}", data.CompanyCode);
                 strcmd.AppendFormat(", {0}", data.SeqNo);
-                strcmd.AppendFormat(",'{0}'", data.MailAddress);
+                strcmd.AppendFormat(", {0}", SeparateString(data.MailAddress));
 
                 strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", data.EntryDate);
                 strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", data.UpdateDate);
@@ -243,7 +243,7 @@
 
                     strcmd.AppendFormat("  {0}", work.CompanyCode);
                     strcmd.AppendFormat(", {0}", work.SeqNo);
-                    strcmd.AppendFormat(",'{0}'", work.MailAddress);
+                    strcmd.AppendFormat(", {0}", SeparateString(work.MailAddress));
 
                     strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.EntryDate);
                     strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.UpdateDate);
@@ -282,7 +282,7 @@
 
                 strcmd.AppendFormat(" CompanyCode = {0}", data.CompanyCode);
                 strcmd.AppendFormat(", SeqNo = {0}", data.SeqNo);
-                strcmd.AppendFormat(", MailAddress = '{0}'", data.MailAddress);
+                strcmd.AppendFormat(", MailAddress = {0}", SeparateString(data.MailAddress));
 
                 strcmd.Append(", UpdateDate = NOW()");
                 strcmd.Append(AddSQLString);
@@ -347,7 +347,7 @@
                         strcmd.AppendFormat(" SeqNo = {0}", ((int)value).ToString());
                         break;
                     case (int)TableColumn.MailAddress:
-                        strcmd.AppendFormat(" MailAddress = '{0}'", value.ToString());
+                        strcmd.AppendFormat(" MailAddress = {0}", SeparateString(value.ToString()));
                         break;
                 }
 
Index: trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOMSuppliers.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOMSuppliers.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOMSuppliers.cs	(revision 484)
@@ -202,15 +202,15 @@
 
                 strcmd.AppendFormat("  {0}", work.SuppliersCode);
                 strcmd.AppendFormat(", {0}", work.DisplayOrder);
-                strcmd.AppendFormat(",'{0}'", work.SuppliersName1);
-                strcmd.AppendFormat(",'{0}'", work.SuppliersName2);
-                strcmd.AppendFormat(",'{0}'", work.ZipCode);
-                strcmd.AppendFormat(",'{0}'", work.Address1);
-                strcmd.AppendFormat(",'{0}'", work.Address2);
-                strcmd.AppendFormat(",'{0}'", work.Address3);
-                strcmd.AppendFormat(",'{0}'", work.PhoneNumber);
-                strcmd.AppendFormat(",'{0}'", work.FaxNumber);
-                strcmd.AppendFormat(",'{0}'", work.Note);
+                strcmd.AppendFormat(", {0}", SeparateString(work.SuppliersName1));
+                strcmd.AppendFormat(", {0}", SeparateString(work.SuppliersName2));
+                strcmd.AppendFormat(", {0}", SeparateString(work.ZipCode));
+                strcmd.AppendFormat(", {0}", SeparateString(work.Address1));
+                strcmd.AppendFormat(", {0}", SeparateString(work.Address2));
+                strcmd.AppendFormat(", {0}", SeparateString(work.Address3));
+                strcmd.AppendFormat(", {0}", SeparateString(work.PhoneNumber));
+                strcmd.AppendFormat(", {0}", SeparateString(work.FaxNumber));
+                strcmd.AppendFormat(", {0}", SeparateString(work.Note));
                 strcmd.AppendFormat(", {0}", work.DeleteFlg);
 
                 strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.EntryDate);
@@ -260,15 +260,15 @@
 
                     strcmd.AppendFormat("  {0}", work.SuppliersCode);
                     strcmd.AppendFormat(", {0}", work.DisplayOrder);
-                    strcmd.AppendFormat(",'{0}'", work.SuppliersName1);
-                    strcmd.AppendFormat(",'{0}'", work.SuppliersName2);
-                    strcmd.AppendFormat(",'{0}'", work.ZipCode);
-                    strcmd.AppendFormat(",'{0}'", work.Address1);
-                    strcmd.AppendFormat(",'{0}'", work.Address2);
-                    strcmd.AppendFormat(",'{0}'", work.Address3);
-                    strcmd.AppendFormat(",'{0}'", work.PhoneNumber);
-                    strcmd.AppendFormat(",'{0}'", work.FaxNumber);
-                    strcmd.AppendFormat(",'{0}'", work.Note);
+                    strcmd.AppendFormat(", {0}", SeparateString(work.SuppliersName1));
+                    strcmd.AppendFormat(", {0}", SeparateString(work.SuppliersName2));
+                    strcmd.AppendFormat(", {0}", SeparateString(work.ZipCode));
+                    strcmd.AppendFormat(", {0}", SeparateString(work.Address1));
+                    strcmd.AppendFormat(", {0}", SeparateString(work.Address2));
+                    strcmd.AppendFormat(", {0}", SeparateString(work.Address3));
+                    strcmd.AppendFormat(", {0}", SeparateString(work.PhoneNumber));
+                    strcmd.AppendFormat(", {0}", SeparateString(work.FaxNumber));
+                    strcmd.AppendFormat(", {0}", SeparateString(work.Note));
                     strcmd.AppendFormat(", {0}", work.DeleteFlg);
 
                     strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.EntryDate);
@@ -309,15 +309,15 @@
 
                 strcmd.AppendFormat(" SuppliersCode = {0}", data.SuppliersCode);
                 strcmd.AppendFormat(", DisplayOrder = {0}", data.DisplayOrder);
-                strcmd.AppendFormat(", SuppliersName1 = '{0}'", data.SuppliersName1);
-                strcmd.AppendFormat(", SuppliersName2 = '{0}'", data.SuppliersName2);
-                strcmd.AppendFormat(", ZipCode = '{0}'", data.ZipCode);
-                strcmd.AppendFormat(", Address1 = '{0}'", data.Address1);
-                strcmd.AppendFormat(", Address2 = '{0}'", data.Address2);
-                strcmd.AppendFormat(", Address3 = '{0}'", data.Address3);
-                strcmd.AppendFormat(", PhoneNumber = '{0}'", data.PhoneNumber);
-                strcmd.AppendFormat(", FaxNumber = '{0}'", data.FaxNumber);
-                strcmd.AppendFormat(", Note = '{0}'", data.Note);
+                strcmd.AppendFormat(", SuppliersName1 =  {0}", SeparateString(data.SuppliersName1));
+                strcmd.AppendFormat(", SuppliersName2 =  {0}", SeparateString(data.SuppliersName2));
+                strcmd.AppendFormat(", ZipCode =  {0}", SeparateString(data.ZipCode));
+                strcmd.AppendFormat(", Address1 =  {0}", SeparateString(data.Address1));
+                strcmd.AppendFormat(", Address2 =  {0}", SeparateString(data.Address2));
+                strcmd.AppendFormat(", Address3 =  {0}", SeparateString(data.Address3));
+                strcmd.AppendFormat(", PhoneNumber =  {0}", SeparateString(data.PhoneNumber));
+                strcmd.AppendFormat(", FaxNumber =  {0}", SeparateString(data.FaxNumber));
+                strcmd.AppendFormat(", Note =  {0}", SeparateString(data.Note));
                 strcmd.AppendFormat(", DeleteFlg = {0}", data.DeleteFlg);
 
                 strcmd.Append(", UpdateDate = NOW()");
Index: trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOMSystem.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOMSystem.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOMSystem.cs	(revision 484)
@@ -218,23 +218,23 @@
                 strcmd.Append(") VALUES (");
 
                 strcmd.AppendFormat("  {0}", data.SystemCode);
-                strcmd.AppendFormat(",'{0}'", data.CompanyName1);
-                strcmd.AppendFormat(",'{0}'", data.CompanyName2);
-                strcmd.AppendFormat(",'{0}'", data.CEOName);
-                strcmd.AppendFormat(",'{0}'", data.CEOPositionName);
-                strcmd.AppendFormat(",'{0}'", data.ZipCode);
-                strcmd.AppendFormat(",'{0}'", data.Address1);
-                strcmd.AppendFormat(",'{0}'", data.Address2);
-                strcmd.AppendFormat(",'{0}'", data.Address3);
-                strcmd.AppendFormat(",'{0}'", data.PhoneNumber);
-                strcmd.AppendFormat(",'{0}'", data.FaxNumber);
-                strcmd.AppendFormat(",'{0}'", data.HomePageURL);
+                strcmd.AppendFormat(", {0}", SeparateString(data.CompanyName1));
+                strcmd.AppendFormat(", {0}", SeparateString(data.CompanyName2));
+                strcmd.AppendFormat(", {0}", SeparateString(data.CEOName));
+                strcmd.AppendFormat(", {0}", SeparateString(data.CEOPositionName));
+                strcmd.AppendFormat(", {0}", SeparateString(data.ZipCode));
+                strcmd.AppendFormat(", {0}", SeparateString(data.Address1));
+                strcmd.AppendFormat(", {0}", SeparateString(data.Address2));
+                strcmd.AppendFormat(", {0}", SeparateString(data.Address3));
+                strcmd.AppendFormat(", {0}", SeparateString(data.PhoneNumber));
+                strcmd.AppendFormat(", {0}", SeparateString(data.FaxNumber));
+                strcmd.AppendFormat(", {0}", SeparateString(data.HomePageURL));
                 strcmd.AppendFormat(", {0}", data.ConsumptionTax);
                 strcmd.AppendFormat(", {0}", data.CooperationRate);
                 strcmd.AppendFormat(", {0}", data.StatutoryWelfareRate);
                 strcmd.AppendFormat(", {0}", data.FuelPrice);
                 strcmd.AppendFormat(", {0}", data.AreaDistance);
-                strcmd.AppendFormat(",'{0}'", data.ExcelSavePath);
+                strcmd.AppendFormat(", {0}", SeparateString(data.ExcelSavePath));
 
                 strcmd.AppendFormat(", {0}", data.BusinessPeriod);
                 strcmd.AppendFormat(", {0}", data.ConstrYear);
@@ -244,9 +244,9 @@
                 strcmd.AppendFormat(",DATE('{0}')", data.ConstrCompDate.ToShortDateString());
                 strcmd.AppendFormat(", {0}", data.ConstructionNoBase);
 
-                strcmd.AppendFormat(",'{0}'", data.SloganString1);
-                strcmd.AppendFormat(",'{0}'", data.SloganString2);
-                strcmd.AppendFormat(",'{0}'", data.SloganString3);
+                strcmd.AppendFormat(", {0}", SeparateString(data.SloganString1));
+                strcmd.AppendFormat(", {0}", SeparateString(data.SloganString2));
+                strcmd.AppendFormat(", {0}", SeparateString(data.SloganString3));
 
                 strcmd.AppendFormat(", {0}", data.OperationFlg);
 
@@ -295,23 +295,23 @@
                     else strcmd.Append(", (");
 
                     strcmd.AppendFormat("  {0}", work.SystemCode);
-                    strcmd.AppendFormat(",'{0}'", work.CompanyName1);
-                    strcmd.AppendFormat(",'{0}'", work.CompanyName2);
-                    strcmd.AppendFormat(",'{0}'", work.CEOName);
-                    strcmd.AppendFormat(",'{0}'", work.CEOPositionName);
-                    strcmd.AppendFormat(",'{0}'", work.ZipCode);
-                    strcmd.AppendFormat(",'{0}'", work.Address1);
-                    strcmd.AppendFormat(",'{0}'", work.Address2);
-                    strcmd.AppendFormat(",'{0}'", work.Address3);
-                    strcmd.AppendFormat(",'{0}'", work.PhoneNumber);
-                    strcmd.AppendFormat(",'{0}'", work.FaxNumber);
-                    strcmd.AppendFormat(",'{0}'", work.HomePageURL);
+                    strcmd.AppendFormat(", {0}", SeparateString(work.CompanyName1));
+                    strcmd.AppendFormat(", {0}", SeparateString(work.CompanyName2));
+                    strcmd.AppendFormat(", {0}", SeparateString(work.CEOName));
+                    strcmd.AppendFormat(", {0}", SeparateString(work.CEOPositionName));
+                    strcmd.AppendFormat(", {0}", SeparateString(work.ZipCode));
+                    strcmd.AppendFormat(", {0}", SeparateString(work.Address1));
+                    strcmd.AppendFormat(", {0}", SeparateString(work.Address2));
+                    strcmd.AppendFormat(", {0}", SeparateString(work.Address3));
+                    strcmd.AppendFormat(", {0}", SeparateString(work.PhoneNumber));
+                    strcmd.AppendFormat(", {0}", SeparateString(work.FaxNumber));
+                    strcmd.AppendFormat(", {0}", SeparateString(work.HomePageURL));
                     strcmd.AppendFormat(", {0}", work.ConsumptionTax);
                     strcmd.AppendFormat(", {0}", work.CooperationRate);
                     strcmd.AppendFormat(", {0}", work.StatutoryWelfareRate);
                     strcmd.AppendFormat(", {0}", work.FuelPrice);
                     strcmd.AppendFormat(", {0}", work.AreaDistance);
-                    strcmd.AppendFormat(",'{0}'", work.ExcelSavePath);
+                    strcmd.AppendFormat(", {0}", SeparateString(work.ExcelSavePath));
 
                     strcmd.AppendFormat(", {0}", work.BusinessPeriod);
                     strcmd.AppendFormat(", {0}", work.ConstrYear);
@@ -321,9 +321,9 @@
                     strcmd.AppendFormat(",DATE('{0}')", work.ConstrCompDate);
                     strcmd.AppendFormat(", {0}", work.ConstructionNoBase);
 
-                    strcmd.AppendFormat(",'{0}'", work.SloganString1);
-                    strcmd.AppendFormat(",'{0}'", work.SloganString2);
-                    strcmd.AppendFormat(",'{0}'", work.SloganString3);
+                    strcmd.AppendFormat(", {0}", SeparateString(work.SloganString1));
+                    strcmd.AppendFormat(", {0}", SeparateString(work.SloganString2));
+                    strcmd.AppendFormat(", {0}", SeparateString(work.SloganString3));
 
                     strcmd.AppendFormat(", {0}", work.OperationFlg);
 
@@ -364,23 +364,23 @@
                 strcmd.Append(" SET");
 
                 strcmd.AppendFormat("  SystemCode = {0}", data.SystemCode);
-                strcmd.AppendFormat(", CompanyName1 = '{0}'", data.CompanyName1);
-                strcmd.AppendFormat(", CompanyName2 = '{0}'", data.CompanyName2);
-                strcmd.AppendFormat(", CEOName = '{0}'", data.CEOName);
-                strcmd.AppendFormat(", CEOPositionName = '{0}'", data.CEOPositionName);
-                strcmd.AppendFormat(", ZipCode = '{0}'", data.ZipCode);
-                strcmd.AppendFormat(", Address1 = '{0}'", data.Address1);
-                strcmd.AppendFormat(", Address2 = '{0}'", data.Address2);
-                strcmd.AppendFormat(", Address3 = '{0}'", data.Address3);
-                strcmd.AppendFormat(", PhoneNumber = '{0}'", data.PhoneNumber);
-                strcmd.AppendFormat(", FaxNumber = '{0}'", data.FaxNumber);
-                strcmd.AppendFormat(", HomePageURL = '{0}'", data.HomePageURL);
+                strcmd.AppendFormat(", CompanyName1 =  {0}", SeparateString(data.CompanyName1));
+                strcmd.AppendFormat(", CompanyName2 =  {0}", SeparateString(data.CompanyName2));
+                strcmd.AppendFormat(", CEOName =  {0}", SeparateString(data.CEOName));
+                strcmd.AppendFormat(", CEOPositionName =  {0}", SeparateString(data.CEOPositionName));
+                strcmd.AppendFormat(", ZipCode =  {0}", SeparateString(data.ZipCode));
+                strcmd.AppendFormat(", Address1 =  {0}", SeparateString(data.Address1));
+                strcmd.AppendFormat(", Address2 =  {0}", SeparateString(data.Address2));
+                strcmd.AppendFormat(", Address3 =  {0}", SeparateString(data.Address3));
+                strcmd.AppendFormat(", PhoneNumber =  {0}", SeparateString(data.PhoneNumber));
+                strcmd.AppendFormat(", FaxNumber =  {0}", SeparateString(data.FaxNumber));
+                strcmd.AppendFormat(", HomePageURL =  {0}", SeparateString(data.HomePageURL));
                 strcmd.AppendFormat(", ConsumptionTax = {0}", data.ConsumptionTax);
                 strcmd.AppendFormat(", CooperationRate = {0}", data.CooperationRate);
                 strcmd.AppendFormat(", StatutoryWelfareRate = {0}", data.StatutoryWelfareRate);
                 strcmd.AppendFormat(", FuelPrice = {0}", data.FuelPrice);
                 strcmd.AppendFormat(", AreaDistance = {0}", data.AreaDistance);
-                strcmd.AppendFormat(", ExcelSavePath = '{0}'", data.ExcelSavePath);
+                strcmd.AppendFormat(", ExcelSavePath = {0}", SeparateString(data.ExcelSavePath));
 
                 strcmd.AppendFormat(", BusinessPeriod = {0}", data.BusinessPeriod);
                 strcmd.AppendFormat(", ConstrYear = {0}", data.ConstrYear);
@@ -390,9 +390,9 @@
                 strcmd.AppendFormat(", ConstrCompDate = DATE('{0}')", data.ConstrCompDate.ToShortDateString());
                 strcmd.AppendFormat(", ConstructionNoBase = {0}", data.ConstructionNoBase);
 
-                strcmd.AppendFormat(", SloganString1 = '{0}'", data.SloganString1);
-                strcmd.AppendFormat(", SloganString2 = '{0}'", data.SloganString2);
-                strcmd.AppendFormat(", SloganString3 = '{0}'", data.SloganString3);
+                strcmd.AppendFormat(", SloganString1 = {0}", SeparateString(data.SloganString1));
+                strcmd.AppendFormat(", SloganString2 = {0}", SeparateString(data.SloganString2));
+                strcmd.AppendFormat(", SloganString3 = {0}", SeparateString(data.SloganString3));
 
                 strcmd.AppendFormat(", OperationFlg = {0}", data.OperationFlg);
 
@@ -430,37 +430,37 @@
                         strcmd.AppendFormat(" SystemCode = {0}", ((int)value).ToString());
                         break;
                     case (int)SystemColumn.CompanyName1:
-                        strcmd.AppendFormat(" CompanyName1 = '{0}'", value.ToString());
+                        strcmd.AppendFormat(" CompanyName1 =  {0}", SeparateString(value.ToString()));
                         break;
                     case (int)SystemColumn.CompanyName2:
-                        strcmd.AppendFormat(" CompanyName2 = '{0}'", value.ToString());
+                        strcmd.AppendFormat(" CompanyName2 =  {0}", SeparateString(value.ToString()));
                         break;
                     case (int)SystemColumn.CEOName:
-                        strcmd.AppendFormat(" CeoName = '{0}'", value.ToString());
+                        strcmd.AppendFormat(" CeoName =  {0}", SeparateString(value.ToString()));
                         break;
                     case (int)SystemColumn.CEOPositionName:
-                        strcmd.AppendFormat(" CeoName = '{0}'", value.ToString());
+                        strcmd.AppendFormat(" CeoName =  {0}", SeparateString(value.ToString()));
                         break;
                     case (int)SystemColumn.ZipCode:
-                        strcmd.AppendFormat(" CeoName = '{0}'", value.ToString());
+                        strcmd.AppendFormat(" CeoName =  {0}", SeparateString(value.ToString()));
                         break;
                     case (int)SystemColumn.Address1:
-                        strcmd.AppendFormat(" Address1 = '{0}'", value.ToString());
+                        strcmd.AppendFormat(" Address1 =  {0}", SeparateString(value.ToString()));
                         break;
                     case (int)SystemColumn.Address2:
-                        strcmd.AppendFormat(" Address2 = '{0}'", value.ToString());
+                        strcmd.AppendFormat(" Address2 =  {0}", SeparateString(value.ToString()));
                         break;
                     case (int)SystemColumn.Address3:
-                        strcmd.AppendFormat(" Address3 = '{0}'", value.ToString());
+                        strcmd.AppendFormat(" Address3 =  {0}", SeparateString(value.ToString()));
                         break;
                     case (int)SystemColumn.PhoneNumber:
-                        strcmd.AppendFormat(" PhoneNumber = '{0}'", value.ToString());
+                        strcmd.AppendFormat(" PhoneNumber =  {0}", SeparateString(value.ToString()));
                         break;
                     case (int)SystemColumn.FaxNumber:
-                        strcmd.AppendFormat(" FaxNumber = '{0}'", value.ToString());
+                        strcmd.AppendFormat(" FaxNumber =  {0}", SeparateString(value.ToString()));
                         break;
                     case (int)SystemColumn.HomePageURL:
-                        strcmd.AppendFormat(" HomePageURL = '{0}'", value.ToString());
+                        strcmd.AppendFormat(" HomePageURL =  {0}", SeparateString(value.ToString()));
                         break;
                     case (int)SystemColumn.ConsumptionTax:
                         strcmd.AppendFormat(" ConsumptionTax = {0}", ((decimal)value).ToString());
@@ -478,7 +478,7 @@
                         strcmd.AppendFormat(" AreaDistance = {0}", ((decimal)value).ToString());
                         break;
                     case (int)SystemColumn.ExcelSavePath:
-                        strcmd.AppendFormat(" ExcelSavePath = '{0}'", value.ToString());
+                        strcmd.AppendFormat(" ExcelSavePath = {0}", SeparateString(value.ToString()));
                         break;
                     case (int)SystemColumn.BusinessPeriod:
                         strcmd.AppendFormat(" BusinessPeriod = {0}", ((int)value).ToString());
@@ -502,13 +502,13 @@
                         strcmd.AppendFormat(" ConstructionNoBase = {0}", ((int)value).ToString());
                         break;
                     case (int)SystemColumn.SloganString1:
-                        strcmd.AppendFormat(" SloganString1 = '{0}'", value.ToString());
+                        strcmd.AppendFormat(" SloganString1 = {0}", SeparateString(value.ToString()));
                         break;
                     case (int)SystemColumn.SloganString2:
-                        strcmd.AppendFormat(" SloganString2 = '{0}'", value.ToString());
+                        strcmd.AppendFormat(" SloganString2 = {0}", SeparateString(value.ToString()));
                         break;
                     case (int)SystemColumn.SloganString3:
-                        strcmd.AppendFormat(" SloganString3 = '{0}'", value.ToString());
+                        strcmd.AppendFormat(" SloganString3 = {0}", SeparateString(value.ToString()));
                         break;
                     case (int)SystemColumn.OperationFlg:
                         strcmd.AppendFormat(" OperationFlg = {0}", ((int)value).ToString());
Index: trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOMTerm.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOMTerm.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOMTerm.cs	(revision 484)
@@ -142,8 +142,8 @@
                 strcmd.AppendFormat(",{0}", data.DisplayOrder);
                 strcmd.AppendFormat(",{0}", data.CheckSchdule.ToString());
                 strcmd.AppendFormat(",{0}", data.TermDays.ToString());
-                strcmd.AppendFormat(",'{0}'", data.SendTitle);
-                strcmd.AppendFormat(",'{0}'", data.SendMessage);
+                strcmd.AppendFormat(",{0}", SeparateString(data.SendTitle));
+                strcmd.AppendFormat(",{0}", SeparateString(data.SendMessage));
                 strcmd.AppendFormat(",'{0}'", data.BackColor);
                 strcmd.AppendFormat(",'{0}'", data.ForeColor);
 
@@ -198,8 +198,8 @@
                     strcmd.AppendFormat(",{0}", work.DisplayOrder);
                     strcmd.AppendFormat(",{0}", work.CheckSchdule.ToString());
                     strcmd.AppendFormat(",{0}", work.TermDays.ToString());
-                    strcmd.AppendFormat(",'{0}'", work.SendTitle);
-                    strcmd.AppendFormat(",'{0}'", work.SendMessage);
+                    strcmd.AppendFormat(",{0}", SeparateString(work.SendTitle));
+                    strcmd.AppendFormat(",{0}", SeparateString(work.SendMessage));
                     strcmd.AppendFormat(",'{0}'", work.BackColor);
                     strcmd.AppendFormat(",'{0}'", work.ForeColor);
 
@@ -244,8 +244,8 @@
                 strcmd.AppendFormat(",CheckSchdule = {0}", data.CheckSchdule.ToString());
 
                 strcmd.AppendFormat(",TermDays = {0}", data.TermDays.ToString());
-                strcmd.AppendFormat(",SendTitile = '{0}'", data.SendTitle);
-                strcmd.AppendFormat(",SendMessage = '{0}'", data.SendMessage);
+                strcmd.AppendFormat(",SendTitile = {0}", SeparateString(data.SendTitle));
+                strcmd.AppendFormat(",SendMessage = {0}", SeparateString(data.SendMessage));
                 strcmd.AppendFormat(",BackColor = '{0}'", data.BackColor);
                 strcmd.AppendFormat(",ForeColor = '{0}'", data.ForeColor);
 
Index: trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOMVehicle.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOMVehicle.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOMVehicle.cs	(revision 484)
@@ -166,24 +166,24 @@
 
                     strcmd.AppendFormat("  {0}", work.VehicleCode.ToString());
                     strcmd.AppendFormat(", {0}", work.DisplayOrder.ToString());
-                    strcmd.AppendFormat(",'{0}'", work.VehicleName);
-                    strcmd.AppendFormat(",'{0}'", work.RegistrationNumber.ToString());
-                    strcmd.AppendFormat(",'{0}'", work.IdentificationNumber.ToString());
-                    strcmd.AppendFormat(",'{0}'", work.ModelCode);
+                    strcmd.AppendFormat(", {0}", SeparateString(work.VehicleName));
+                    strcmd.AppendFormat(", {0}", SeparateString(work.RegistrationNumber.ToString()));
+                    strcmd.AppendFormat(", {0}", SeparateString(work.IdentificationNumber.ToString()));
+                    strcmd.AppendFormat(", {0}", SeparateString(work.ModelCode));
                     strcmd.AppendFormat(", {0}", work.DepartmentCode.ToString());
                     strcmd.AppendFormat(", {0}", work.VehicleScheduleFlg.ToString());
                     strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%dD')", work.PurchaseDate.ToShortDateString());
-                    strcmd.AppendFormat(",'{0}'", work.PurchaseName);
-                    strcmd.AppendFormat(",'{0}'", work.PurchaseContactPersons);
-                    strcmd.AppendFormat(",'{0}'", work.PurchasePhone);
+                    strcmd.AppendFormat(", {0}", SeparateString(work.PurchaseName));
+                    strcmd.AppendFormat(", {0}", SeparateString(work.PurchaseContactPersons));
+                    strcmd.AppendFormat(", {0}", SeparateString(work.PurchasePhone));
                     strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d')", work.LeaseDate.ToShortDateString());
-                    strcmd.AppendFormat(",'{0}'", work.LeaseDestination);
-                    strcmd.AppendFormat(",'{0}'", work.LeaseContactPersons);
-                    strcmd.AppendFormat(",'{0}'", work.LeasePhone);
-                    strcmd.AppendFormat(",'{0}'", work.InsuranceCompany);
-                    strcmd.AppendFormat(",'{0}'", work.InsuranceContactPersons);
-                    strcmd.AppendFormat(",'{0}'", work.InsurancePhone);
-                    strcmd.AppendFormat(",'{0}'", work.Note);
+                    strcmd.AppendFormat(", {0}", SeparateString(work.LeaseDestination));
+                    strcmd.AppendFormat(", {0}", SeparateString(work.LeaseContactPersons));
+                    strcmd.AppendFormat(", {0}", SeparateString(work.LeasePhone));
+                    strcmd.AppendFormat(", {0}", SeparateString(work.InsuranceCompany));
+                    strcmd.AppendFormat(", {0}", SeparateString(work.InsuranceContactPersons));
+                    strcmd.AppendFormat(", {0}", SeparateString(work.InsurancePhone));
+                    strcmd.AppendFormat(", {0}", SeparateString(work.Note));
 
                     strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.EntryDate);
                     strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.UpdateDate);
@@ -223,24 +223,24 @@
 
                 strcmd.AppendFormat(" VehicleCode = {0}", data.VehicleCode.ToString());
                 strcmd.AppendFormat(",DisplayOrder = {0}", data.DisplayOrder.ToString());
-                strcmd.AppendFormat(",VehicleName = '{0}'", data.VehicleName);
-                strcmd.AppendFormat(",RegistrationNumber = '{0}'", data.RegistrationNumber);
-                strcmd.AppendFormat(",IdentificationNumber = '{0}'", data.IdentificationNumber);
-                strcmd.AppendFormat(",ModelCode = '{0}'", data.ModelCode);
+                strcmd.AppendFormat(",IdentificationNumber =  {0}", SeparateString(data.IdentificationNumber));
+                strcmd.AppendFormat(",ModelCode =  {0}", SeparateString(data.ModelCode));
+                strcmd.AppendFormat(",DepartmentCode = {0}", SeparateString(data.DepartmentCode.ToString()));
+                strcmd.AppendFormat(",VehicleScheduleFlg = {0}", SeparateString(data.VehicleScheduleFlg.ToString()));
                 strcmd.AppendFormat(",DepartmentCode = {0}", data.DepartmentCode.ToString());
                 strcmd.AppendFormat(",VehicleScheduleFlg = {0}", data.VehicleScheduleFlg.ToString());
                 strcmd.AppendFormat(",PurchaseDate = STR_TO_DATE('{0}','%Y/%m/%d')", data.PurchaseDate.ToShortDateString());
-                strcmd.AppendFormat(",PurchaseName = '{0}'", data.PurchaseName);
-                strcmd.AppendFormat(",PurchaseContactPersons = '{0}'", data.PurchaseContactPersons);
-                strcmd.AppendFormat(",PurchasePhone = '{0}'", data.PurchasePhone);
+                strcmd.AppendFormat(",PurchaseName =  {0}", SeparateString(data.PurchaseName));
+                strcmd.AppendFormat(",PurchaseContactPersons =  {0}", SeparateString(data.PurchaseContactPersons));
+                strcmd.AppendFormat(",PurchasePhone =  {0}", SeparateString(data.PurchasePhone));
                 strcmd.AppendFormat(",LeaseDate = STR_TO_DATE('{0}','%Y/%m/%d')", data.LeaseDate.ToShortDateString());
-                strcmd.AppendFormat(",LeaseDestination = '{0}'", data.LeaseDestination);
-                strcmd.AppendFormat(",LeaseContactPersons = '{0}'", data.LeaseContactPersons);
-                strcmd.AppendFormat(",LeasePhone = '{0}'", data.LeasePhone);
-                strcmd.AppendFormat(",InsuranceCompany = '{0}'", data.InsuranceCompany);
-                strcmd.AppendFormat(",InsuranceContactPersons = '{0}'", data.InsuranceContactPersons);
-                strcmd.AppendFormat(",InsurancePhone = '{0}'", data.InsurancePhone);
-                strcmd.AppendFormat(",Note = '{0}'", data.Note);
+                strcmd.AppendFormat(",LeaseDestination =  {0}", SeparateString(data.LeaseDestination));
+                strcmd.AppendFormat(",LeaseContactPersons =  {0}", SeparateString(data.LeaseContactPersons));
+                strcmd.AppendFormat(",LeasePhone =  {0}", SeparateString(data.LeasePhone));
+                strcmd.AppendFormat(",InsuranceCompany =  {0}", SeparateString(data.InsuranceCompany));
+                strcmd.AppendFormat(",InsuranceContactPersons =  {0}", SeparateString(data.InsuranceContactPersons));
+                strcmd.AppendFormat(",InsurancePhone =  {0}", SeparateString(data.InsurancePhone));
+                strcmd.AppendFormat(",Note =  {0}", SeparateString(data.Note));
 
 
                 strcmd.Append(", UpdateDate = NOW()");
Index: trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOMVehicleRecordData.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOMVehicleRecordData.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOMVehicleRecordData.cs	(revision 484)
@@ -143,7 +143,7 @@
                     strcmd.AppendFormat(", {0}", work.SeqNo.ToString());
                     strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d')", work.RecordDate.ToShortDateString());
                     strcmd.AppendFormat(", {0}", work.Mileage.ToString());
-                    strcmd.AppendFormat(",'{0}'", work.Content);
+                    strcmd.AppendFormat(", {0}", SeparateString(work.Content));
                     strcmd.AppendFormat(", {0}", work.PaymentCost.ToString());
 
                     strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.EntryDate);
@@ -187,7 +187,7 @@
                 strcmd.AppendFormat(",SeqNo = {0}", data.SeqNo.ToString());
                 strcmd.AppendFormat(",RecordDate = STR_TO_DATE('{0}','%Y/%m/%d')", data.RecordDate.ToShortDateString());
                 strcmd.AppendFormat(",Mileage = {0}", data.Mileage.ToString());
-                strcmd.AppendFormat(",Content = '{0}'", data.Content);
+                strcmd.AppendFormat(",Content = {0}", SeparateString(data.Content));
                 strcmd.AppendFormat(",PaymentCost = {0}", data.PaymentCost.ToString());
 
                 strcmd.Append(", UpdateDate = NOW()");
Index: trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOMWorkingTime.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOMWorkingTime.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOMWorkingTime.cs	(revision 484)
@@ -211,7 +211,7 @@
 
                 strcmd.AppendFormat("  {0}", data.WorkingCode);
                 strcmd.AppendFormat(", {0}", data.DisplayOrder);
-                strcmd.AppendFormat(", '{0}'", data.WorkingName);
+                strcmd.AppendFormat(", {0}", SeparateString(data.WorkingName));
                 strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", data.StartTime);
                 strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", data.CompTime);
                 strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", data.OverStartTime);
@@ -223,7 +223,7 @@
                 strcmd.AppendFormat(", {0}", data.FriValue);
                 strcmd.AppendFormat(", {0}", data.SatValue);
                 strcmd.AppendFormat(", {0}", data.SunValue);
-                strcmd.AppendFormat(", '{0}'", data.Note);
+                strcmd.AppendFormat(", {0}", SeparateString(data.Note));
                 strcmd.AppendFormat(", {0}", data.DeleteFlg);
 
                 strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", data.EntryDate);
@@ -272,7 +272,7 @@
 
                     strcmd.AppendFormat("  {0}", work.WorkingCode);
                     strcmd.AppendFormat(", {0}", work.DisplayOrder);
-                    strcmd.AppendFormat(", '{0}'", work.WorkingName);
+                    strcmd.AppendFormat(", {0}", SeparateString(work.WorkingName));
                     strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.StartTime);
                     strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.CompTime);
                     strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.OverStartTime);
@@ -284,7 +284,7 @@
                     strcmd.AppendFormat(", {0}", work.FriValue);
                     strcmd.AppendFormat(", {0}", work.SatValue);
                     strcmd.AppendFormat(", {0}", work.SunValue);
-                    strcmd.AppendFormat(", '{0}'", work.Note);
+                    strcmd.AppendFormat(", {0}", SeparateString(work.Note));
                     strcmd.AppendFormat(", {0}", work.DeleteFlg);
 
                     strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.EntryDate);
@@ -325,7 +325,7 @@
 
                 strcmd.AppendFormat(" WorkingCode = {0}", data.WorkingCode);
                 strcmd.AppendFormat(", DisplayOrder = {0}", data.DisplayOrder);
-                strcmd.AppendFormat(", WorkingName = '{0}'", data.WorkingName);
+                strcmd.AppendFormat(", WorkingName = {0}", SeparateString(data.WorkingName));
                 strcmd.AppendFormat(", StartTime = STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", data.StartTime);
                 strcmd.AppendFormat(", CompTime = STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", data.CompTime);
                 strcmd.AppendFormat(", OverStartTime = STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", data.OverStartTime);
@@ -337,7 +337,7 @@
                 strcmd.AppendFormat(", FriValue = {0}", data.FriValue);
                 strcmd.AppendFormat(", SatValue = {0}", data.SatValue);
                 strcmd.AppendFormat(", SunValue = {0}", data.SunValue);
-                strcmd.AppendFormat(", Note = '{0}'", data.Note);
+                strcmd.AppendFormat(", Note = {0}", SeparateString(data.Note));
                 strcmd.AppendFormat(", DeleteFlg = {0}", data.DeleteFlg);
 
                 strcmd.Append(", UpdateDate = NOW()");
@@ -449,7 +449,7 @@
                         strcmd.AppendFormat(" DisplayOrder = {0}", ((int)value).ToString());
                         break;
                     case (int)TableColumn.WorkingName:
-                        strcmd.AppendFormat(" WorkingName = '{0}'", value.ToString());
+                        strcmd.AppendFormat(" WorkingName = {0}", SeparateString(value.ToString()));
                         break;
                     case (int)TableColumn.StartTime:
                         strcmd.AppendFormat(" StartTime = STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", ((DateTime)value).ToShortDateString());
@@ -488,7 +488,7 @@
                         strcmd.AppendFormat(" DeleteFlg = {0}", ((int)value).ToString());
                         break;
                     case (int)TableColumn.Note:
-                        strcmd.AppendFormat(" Note = '{0}'", value.ToString());
+                        strcmd.AppendFormat(" Note = {0}", SeparateString(value.ToString()));
                         break;
                 }
 
Index: trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOMaterialInfo.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOMaterialInfo.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOMaterialInfo.cs	(revision 484)
@@ -258,8 +258,6 @@
         /// <summary>
         /// 排他行ロック
         /// </summary>
-        /// <param name="MaterialTypesCode"></param>
-        /// <param name="bConnect"></param>
         /// <returns></returns>
         public bool RowLockUpdate(int MaterialItemCode, bool bConnect = true)
         {
@@ -291,8 +289,6 @@
         /// <summary>
         /// 共有行ロック
         /// </summary>
-        /// <param name="MaterialTypesCode"></param>
-        /// <param name="bConnect"></param>
         /// <returns></returns>
         public bool RowLockShare(int MaterialItemCode, bool bConnect = true)
         {
Index: trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOMaterialItem.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOMaterialItem.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOMaterialItem.cs	(revision 484)
@@ -127,7 +127,7 @@
 
                     strcmd.AppendFormat("  {0}", work.MaterialItemCode.ToString());
                     strcmd.AppendFormat(", {0}", work.MaterialKindCode.ToString());
-                    strcmd.AppendFormat(", '{0}'", work.MaterialItemName);
+                    strcmd.AppendFormat(", {0}", SeparateString(work.MaterialItemName));
                     strcmd.AppendFormat(", {0}", work.DisplayOrder.ToString());
                     strcmd.AppendFormat(", {0}", work.DeleteFlg.ToString());
 
@@ -167,7 +167,7 @@
 
                 strcmd.AppendFormat(" MaterialItemCode = {0}", data.MaterialItemCode.ToString());
                 strcmd.AppendFormat(",MaterialKindCode = {0}", data.MaterialKindCode.ToString());
-                strcmd.AppendFormat(",MaterialItemName = '{0}'", data.MaterialItemName);
+                strcmd.AppendFormat(",MaterialItemName = {0}", SeparateString(data.MaterialItemName));
                 strcmd.AppendFormat(",DisplayOrder = {0}", data.DisplayOrder.ToString());
                 strcmd.AppendFormat(",DeleteFlg = {0}", data.DeleteFlg.ToString());
                 strcmd.Append(", UpdateDate = NOW()");
@@ -206,7 +206,7 @@
 
                 strcmd.AppendFormat(" MaterialItemCode = {0}", data.MaterialItemCode.ToString());
                 strcmd.AppendFormat(",MaterialKindCode = {0}", data.MaterialKindCode.ToString());
-                strcmd.AppendFormat(",MaterialItemName = '{0}'", data.MaterialItemName);
+                strcmd.AppendFormat(",MaterialItemName = {0}", SeparateString(data.MaterialItemName));
                 strcmd.AppendFormat(",DisplayOrder = {0}", data.DisplayOrder.ToString());
                 strcmd.AppendFormat(",DeleteFlg = {0}", data.DeleteFlg.ToString());
                 strcmd.Append(", UpdateDate = NOW()");
@@ -416,8 +416,6 @@
         /// <summary>
         /// 行ロック
         /// </summary>
-        /// <param name="MaterialTypesCode"></param>
-        /// <param name="bConnect"></param>
         /// <returns></returns>
         public bool RowLock(int MaterialItemCode, bool bConnect = true)
         {
Index: trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOMaterialRecordInfo.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOMaterialRecordInfo.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOMaterialRecordInfo.cs	(revision 484)
@@ -136,7 +136,7 @@
                     strcmd.AppendFormat(", {0}", work.PersonCode.ToString());
                     strcmd.AppendFormat(", {0}", work.MaterialCount.ToString());
                     strcmd.AppendFormat(", DATE_FORMAT('{0}','%Y/%m/%d')", work.RepayPlanDate.ToString());
-                    strcmd.AppendFormat(", '{0}'", work.CommentText.ToString());
+                    strcmd.AppendFormat(", {0}", SeparateString(work.CommentText));
 
                     strcmd.Append(", NOW()");
                     strcmd.Append(", NOW()");
@@ -175,7 +175,7 @@
                 strcmd.AppendFormat(",PersonCode = {0}", data.PersonCode.ToString());
                 strcmd.AppendFormat(",MaterialCount = {0}", data.MaterialCount.ToString());
                 strcmd.AppendFormat(",RepayPlanDate = DATE_FORMAT('{0}','%Y/%m/%d')", data.RepayPlanDate.ToString());
-                strcmd.AppendFormat(",CommentText = '{0}'", data.CommentText.ToString());
+                strcmd.AppendFormat(",CommentText = {0}", SeparateString(data.CommentText));
 
                 strcmd.Append(", UpdateDate = NOW()");
                 strcmd.Append(AddSQLString);
@@ -319,8 +319,6 @@
         /// <summary>
         /// 行ロック
         /// </summary>
-        /// <param name="MaterialItemCode"></param>
-        /// <param name="bConnect"></param>
         /// <returns></returns>
         public bool RowLock(int MaterialItemCode, DateTime ProcessDate, int SeqNo, bool bConnect = true)
         {
Index: trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOMaterialTypes.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOMaterialTypes.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOMaterialTypes.cs	(revision 484)
@@ -117,7 +117,7 @@
                     strcmd.Append(" VALUES (");
 
                     strcmd.AppendFormat("  {0}", work.MaterialKindCode.ToString());
-                    strcmd.AppendFormat(", '{0}'", work.MaterialKindName);
+                    strcmd.AppendFormat(", {0}", SeparateString(work.MaterialKindName));
                     strcmd.AppendFormat(", {0}", work.DisplayOrder.ToString());
                     strcmd.AppendFormat(", {0}", work.DeleteFlg.ToString());
 
@@ -153,7 +153,7 @@
                 strcmd.Append(" SET");
 
                 strcmd.AppendFormat(" MaterialKindCode = {0}", data.MaterialKindCode.ToString());
-                strcmd.AppendFormat(",MaterialKindName = '{0}'", data.MaterialKindName);
+                strcmd.AppendFormat(",MaterialKindName = {0}", SeparateString(data.MaterialKindName));
                 strcmd.AppendFormat(",DisplayOrder = {0}", data.DisplayOrder.ToString());
                 strcmd.AppendFormat(",DeleteFlg = {0}", data.DeleteFlg.ToString());
 
@@ -292,8 +292,6 @@
         /// <summary>
         /// 行ロック
         /// </summary>
-        /// <param name="MaterialTypesCode"></param>
-        /// <param name="bConnect"></param>
         /// <returns></returns>
         public bool RowLock(int MaterialTypesCode, bool bConnect = true)
         {
Index: trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOMessageBoardData.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOMessageBoardData.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOMessageBoardData.cs	(revision 484)
@@ -65,6 +65,44 @@
 
         #endregion
 
+        #region テーブルのフィールドリストを作成する
+        /// <summary>
+        /// テーブルのフィールドリストを作成する
+        /// </summary>
+        /// <returns></returns>
+        public static string CreateFieldNameList(string strAlias = "")
+        {
+            StringBuilder strcmd = new StringBuilder();
+            try
+            {
+                strcmd.Append(" ");
+                bool bColFirst = true;
+                string strWork = string.Empty;
+                foreach (var gender in Enum.GetValues(typeof(ColumnCnt)))
+                {
+                    strWork = gender.ToString();
+                    if (!bColFirst) strcmd.Append(",");
+                    if (strWork.Equals("WritingDate") || strWork.Equals("EntryDate") || strWork.Equals("UpdateDate"))
+                    {
+                        strcmd.AppendFormat(" DATE_FORMAT({0}{1}, '%Y/%m/%d %H:%i:%s') As {1}", strAlias, strWork);
+                    }
+                    else
+                    {
+                        strcmd.AppendFormat(" {0}{1}", strAlias, strWork);
+                    }
+                    bColFirst = false;
+                }
+
+                return strcmd.ToString();
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("システムエラー：{0}：{1}：{2}", CommonMotions.GetMethodName(2), ex.Message, strcmd.ToString());
+                return string.Empty;
+            }
+        }
+        #endregion
+
         #region 掲示板データ検索文字作成
         /// <summary>
         /// 掲示板データ検索文字作成
@@ -75,28 +113,17 @@
         private string CreateSelectSQL()
         {
             StringBuilder strcmd = new StringBuilder();
-            strcmd.Append("SELECT");
-            strcmd.Append(" RecordNumber");
-            strcmd.Append(",BranchNumber");
-            strcmd.Append(",FromCode");
-            strcmd.Append(",FromName");
-            strcmd.Append(",MessageTitile");
-            strcmd.Append(",MessageContent");
-            strcmd.Append(",LinkType");
-            strcmd.Append(",LinkMessage");
-            strcmd.Append(",LinkCode");
-            strcmd.Append(",DATE_FORMAT(WritingDate, '%Y/%m/%d %H:%i:%s')");
-            strcmd.Append(",PersonCode");
-            strcmd.Append(",ShareFlag");
-            strcmd.Append(",MessageColor");
-            strcmd.Append(",BackColor");
-            strcmd.Append(",MessageFlag");
+            try
+            {
+                strcmd.AppendFormat("SELECT {0} FROM MessageBoardData", CreateFieldNameList());
 
-            strcmd.Append(", DATE_FORMAT(EntryDate, '%Y/%m/%d %H:%i:%s')");
-            strcmd.Append(", DATE_FORMAT(UpdateDate, '%Y/%m/%d %H:%i:%s')");
-            strcmd.Append(" FROM MessageBoardData");
-
-            return strcmd.ToString();
+                return strcmd.ToString();
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("システムエラー：{0}：{1}：{2}", CommonMotions.GetMethodName(2), ex.Message, strcmd.ToString());
+                return string.Empty;
+            }
         }
         #endregion
 
@@ -206,11 +233,11 @@
                 strcmd.AppendFormat("  {0} ", data.RecordNumber.ToString());
                 strcmd.AppendFormat(", {0} ", data.BranchNumber.ToString());
                 strcmd.AppendFormat(", {0} ", data.FromCode);
-                strcmd.AppendFormat(",'{0}'", data.FromName);
-                strcmd.AppendFormat(",'{0}'", data.MessageTitle.Replace(",", "，").Replace("'", "’"));
-                strcmd.AppendFormat(",'{0}'", data.MessageContent.Replace(",", "，").Replace("'", "’"));
+                strcmd.AppendFormat(", {0} ", SeparateString(data.FromName));
+                strcmd.AppendFormat(", {0} ", SeparateString(data.MessageTitle));
+                strcmd.AppendFormat(", {0} ", SeparateString(data.MessageContent));
                 strcmd.AppendFormat(", {0} ", data.LinkType);
-                strcmd.AppendFormat(",'{0}'", data.LinkMessage.Replace(",", "，").Replace("'", "’"));
+                strcmd.AppendFormat(", {0} ", SeparateString(data.LinkMessage));
                 strcmd.AppendFormat(",'{0}'", data.LinkCode);
 
                 strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", data.WritingDate.ToString());
@@ -268,11 +295,11 @@
                     strcmd.AppendFormat("  {0} ", work.RecordNumber.ToString());
                     strcmd.AppendFormat(", {0} ", work.BranchNumber.ToString());
                     strcmd.AppendFormat(", {0} ", work.FromCode);
-                    strcmd.AppendFormat(",'{0}'", work.FromName);
-                    strcmd.AppendFormat(",'{0}'", work.MessageTitle);
-                    strcmd.AppendFormat(",'{0}'", work.MessageContent);
+                    strcmd.AppendFormat(", {0} ", SeparateString(work.FromName));
+                    strcmd.AppendFormat(", {0} ", SeparateString(work.MessageTitle));
+                    strcmd.AppendFormat(", {0} ", SeparateString(work.MessageContent));
                     strcmd.AppendFormat(", {0} ", work.LinkType);
-                    strcmd.AppendFormat(",'{0}'", work.LinkMessage);
+                    strcmd.AppendFormat(", {0} ", SeparateString(work.LinkMessage));
                     strcmd.AppendFormat(",'{0}'", work.LinkCode);
 
                     strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.WritingDate.ToString());
@@ -321,11 +348,11 @@
                 strcmd.AppendFormat(" RecordNumber = {0} ", data.RecordNumber);
                 strcmd.AppendFormat(",BranchNumber = {0} ", data.BranchNumber);
                 strcmd.AppendFormat(",FromCode = {0} ", data.FromCode);
-                strcmd.AppendFormat(",FromName = '{0}'", data.FromName);
-                strcmd.AppendFormat(",MessageTitile = '{0}'", data.MessageTitle.Replace(",", "，").Replace("'", "’"));
-                strcmd.AppendFormat(",MessageContent = '{0}'", data.MessageContent.Replace(",", "，").Replace("'", "’"));
+                strcmd.AppendFormat(",FromName = {0} ", SeparateString(data.FromName));
+                strcmd.AppendFormat(",MessageTitile = {0}", SeparateString(data.MessageTitle));
+                strcmd.AppendFormat(",MessageContent = {0}", SeparateString(data.MessageContent));
                 strcmd.AppendFormat(",LinkType = {0} ", data.LinkType);
-                strcmd.AppendFormat(",LinkMessage = '{0}'", data.LinkMessage.Replace(",", "，").Replace("'", "’"));
+                strcmd.AppendFormat(",LinkMessage = {0}", SeparateString(data.LinkMessage));
                 strcmd.AppendFormat(",LinkCode = '{0}'", data.LinkCode);
                 strcmd.AppendFormat(",WritingDate = DATE_FORMAT('{0}','%Y/%m/%d %H:%i:%s')", data.WritingDate.ToString());
                 strcmd.AppendFormat(",PersonCode = {0} ", data.PersonCode);
Index: trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOMessageBoardDataTerget.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOMessageBoardDataTerget.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOMessageBoardDataTerget.cs	(revision 484)
@@ -187,7 +187,7 @@
                 strcmd.AppendFormat(", {0} ", CommonMotions.cnvInt(work.BranchNumber.ToString()));
                 strcmd.AppendFormat(", {0} ", work.SeqNum);
                 strcmd.AppendFormat(", {0} ", work.ToCode);
-                strcmd.AppendFormat(",'{0}'", work.ToName.ToString());
+                strcmd.AppendFormat(", {0} ", SeparateString(work.ToName));
 
                 strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.EntryDate);
                 strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.UpdateDate);
@@ -237,7 +237,7 @@
                     strcmd.AppendFormat(", {0} ", CommonMotions.cnvInt(work.BranchNumber.ToString()));
                     strcmd.AppendFormat(", {0} ", work.SeqNum);
                     strcmd.AppendFormat(", {0} ", work.ToCode);
-                    strcmd.AppendFormat(",'{0}'", work.ToName.ToString());
+                    strcmd.AppendFormat(", {0} ", SeparateString(work.ToName));
 
                     strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.EntryDate);
                     strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.UpdateDate);
@@ -278,7 +278,7 @@
                 strcmd.AppendFormat(",BranchNumber = {0} ", CommonMotions.cnvInt(data.BranchNumber.ToString()));
                 strcmd.AppendFormat(",SeqNum = {0} ", data.SeqNum);
                 strcmd.AppendFormat(",ToCode = {0} ", data.ToCode);
-                strcmd.AppendFormat(",ToName = '{0}'", data.ToName.ToString());
+                strcmd.AppendFormat(",ToName = {0} ", SeparateString(data.ToName));
 
                 strcmd.Append(", UpdateDate = NOW()");
                 strcmd.Append(AddSQLString);
Index: trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IONotificationMessage.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IONotificationMessage.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IONotificationMessage.cs	(revision 484)
@@ -91,6 +91,48 @@
 
         #endregion
 
+        #region テーブルのフィールドリストを作成する
+        /// <summary>
+        /// テーブルのフィールドリストを作成する
+        /// </summary>
+        /// <returns></returns>
+        public static string CreateFieldNameList(string strAlias = "")
+        {
+            StringBuilder strcmd = new StringBuilder();
+            try
+            {
+                strcmd.Append(" ");
+                bool bColFirst = true;
+                string strWork = string.Empty;
+                foreach (var gender in Enum.GetValues(typeof(ColumnCnt)))
+                {
+                    strWork = gender.ToString();
+                    if (!bColFirst) strcmd.Append(",");
+                    if (strWork.Equals("EntryDate") || strWork.Equals("UpdateDate"))
+                    {
+                        strcmd.AppendFormat(" DATE_FORMAT({0}{1}, '%Y/%m/%d %H:%i:%s') As {1}", strAlias, strWork);
+                    }
+                    else if (strWork.Equals("MessageDate"))
+                    {
+                        strcmd.AppendFormat(" DATE_FORMAT({0}{1}, '%Y/%m/%d') As {1}", strAlias, strWork);
+                    }
+                    else
+                    {
+                        strcmd.AppendFormat(" {0}{1}", strAlias, strWork);
+                    }
+                    bColFirst = false;
+                }
+
+                return strcmd.ToString();
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("システムエラー：{0}：{1}：{2}", CommonMotions.GetMethodName(2), ex.Message, strcmd.ToString());
+                return string.Empty;
+            }
+        }
+        #endregion
+
         #region お知らせ情報検索文字作成
         /// <summary>
         /// お知らせ情報検索文字作成
@@ -98,33 +140,17 @@
         private string CreateSelectSQL()
         {
             StringBuilder strcmd = new StringBuilder();
-            strcmd.Append("SELECT");
-
-            bool bColFirst = true;
-            string strWork = string.Empty;
-            foreach (var gender in Enum.GetValues(typeof(ColumnCnt)))
+            try
             {
-                strWork = gender.ToString();
-                if (!bColFirst) strcmd.Append(",");
+                strcmd.AppendFormat("SELECT {0} FROM NotificationMessage", CreateFieldNameList());
 
-                if (strWork.Equals("EntryDate") || strWork.Equals("UpdateDate"))
-                {
-                    strcmd.AppendFormat(" DATE_FORMAT({0}, '%Y/%m/%d %H:%i:%s')", strWork);
-                }
-                else if (strWork.Equals("MessageDate"))
-                {
-                    strcmd.AppendFormat(" DATE_FORMAT({0}, '%Y/%m/%d')", strWork);
-                }
-                else
-                {
-                    strcmd.AppendFormat(" {0}", strWork);
-                }
-                bColFirst = false;
+                return strcmd.ToString();
             }
-
-            strcmd.Append(" FROM NotificationMessage");
-
-            return strcmd.ToString();
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("システムエラー：{0}：{1}：{2}", CommonMotions.GetMethodName(2), ex.Message, strcmd.ToString());
+                return string.Empty;
+            }
         }
         #endregion
 
@@ -233,8 +259,8 @@
 
                 strcmd.AppendFormat(" STR_TO_DATE('{0}','%Y/%m/%d')", data.MessageDate.ToShortDateString());
                 strcmd.AppendFormat(", {0} ", data.SeqNo);
-                strcmd.AppendFormat(",'{0}'", data.MessageTitle);
-                strcmd.AppendFormat(",'{0}'", data.MessageContent);
+                strcmd.AppendFormat(", {0}", SeparateString(data.MessageTitle));
+                strcmd.AppendFormat(", {0}", SeparateString(data.MessageContent));
 
                 strcmd.AppendFormat(", {0} ", data.PersonCode.ToString());
                 strcmd.AppendFormat(", {0} ", data.ShareFlag.ToString());
@@ -289,8 +315,8 @@
 
                     strcmd.AppendFormat(" STR_TO_DATE('{0}','%Y/%m/%d')", work.MessageDate.ToShortDateString());
                     strcmd.AppendFormat(", {0} ", work.SeqNo);
-                    strcmd.AppendFormat(",'{0}'", work.MessageTitle);
-                    strcmd.AppendFormat(",'{0}'", work.MessageContent);
+                    strcmd.AppendFormat(", {0}", SeparateString(work.MessageTitle));
+                    strcmd.AppendFormat(", {0}", SeparateString(work.MessageContent));
 
                     strcmd.AppendFormat(", {0} ", work.PersonCode.ToString());
                     strcmd.AppendFormat(", {0} ", work.ShareFlag.ToString());
@@ -336,8 +362,8 @@
 
                 strcmd.AppendFormat(" MessageDate = STR_TO_DATE('{0}','%Y/%m/%d')", data.MessageDate.ToShortDateString());
                 strcmd.AppendFormat(", SeqNo = {0} ", data.SeqNo);
-                strcmd.AppendFormat(", MessageTitle = '{0}'", data.MessageTitle.ToString());
-                strcmd.AppendFormat(", MessageContent = '{0}'", data.MessageContent.ToString());
+                strcmd.AppendFormat(", MessageTitle = {0}", SeparateString(data.MessageTitle));
+                strcmd.AppendFormat(", MessageContent = {0}", SeparateString(data.MessageContent));
                 strcmd.AppendFormat(", PersonCode = {0} ", data.PersonCode.ToString());
                 strcmd.AppendFormat(", ShareFlag = {0} ", data.ShareFlag.ToString());
                 strcmd.AppendFormat(", MessageColor = '{0}'", data.MessageColor.ToString());
Index: trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IONotificationMessageBrowsing.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IONotificationMessageBrowsing.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IONotificationMessageBrowsing.cs	(revision 484)
@@ -71,6 +71,48 @@
 
         #endregion
 
+        #region テーブルのフィールドリストを作成する
+        /// <summary>
+        /// テーブルのフィールドリストを作成する
+        /// </summary>
+        /// <returns></returns>
+        public static string CreateFieldNameList(string strAlias = "")
+        {
+            StringBuilder strcmd = new StringBuilder();
+            try
+            {
+                strcmd.Append(" ");
+                bool bColFirst = true;
+                string strWork = string.Empty;
+                foreach (var gender in Enum.GetValues(typeof(ColumnCnt)))
+                {
+                    strWork = gender.ToString();
+                    if (!bColFirst) strcmd.Append(",");
+                    if (strWork.Equals("EntryDate") || strWork.Equals("UpdateDate"))
+                    {
+                        strcmd.AppendFormat(" DATE_FORMAT({0}{1}, '%Y/%m/%d %H:%i:%s') As {1}", strAlias, strWork);
+                    }
+                    else if (strWork.Equals("MessageDate"))
+                    {
+                        strcmd.AppendFormat(" DATE_FORMAT({0}{1}, '%Y/%m/%d') As {1}", strAlias, strWork);
+                    }
+                    else
+                    {
+                        strcmd.AppendFormat(" {0}{1}", strAlias, strWork);
+                    }
+                    bColFirst = false;
+                }
+
+                return strcmd.ToString();
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("システムエラー：{0}：{1}：{2}", CommonMotions.GetMethodName(2), ex.Message, strcmd.ToString());
+                return string.Empty;
+            }
+        }
+        #endregion
+
         #region お知らせ閲覧情報検索文字作成
         /// <summary>
         /// お知らせ閲覧情報検索文字作成
@@ -78,33 +120,17 @@
         private string CreateSelectSQL()
         {
             StringBuilder strcmd = new StringBuilder();
-            strcmd.Append("SELECT");
-
-            bool bColFirst = true;
-            string strWork = string.Empty;
-            foreach (var gender in Enum.GetValues(typeof(ColumnCnt)))
+            try
             {
-                strWork = gender.ToString();
-                if (!bColFirst) strcmd.Append(",");
+                strcmd.AppendFormat("SELECT {0} FROM NotificationMessageBrowsing", CreateFieldNameList());
 
-                if (strWork.Equals("EntryDate") || strWork.Equals("UpdateDate"))
-                {
-                    strcmd.AppendFormat(" DATE_FORMAT({0}, '%Y/%m/%d %H:%i:%s')", strWork);
-                }
-                else if (strWork.Equals("MessageDate"))
-                {
-                    strcmd.AppendFormat(" DATE_FORMAT({0}, '%Y/%m/%d')", strWork);
-                }
-                else
-                {
-                    strcmd.AppendFormat(" {0}", strWork);
-                }
-                bColFirst = false;
+                return strcmd.ToString();
             }
-
-            strcmd.Append(" FROM NotificationMessageBrowsing");
-
-            return strcmd.ToString();
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("システムエラー：{0}：{1}：{2}", CommonMotions.GetMethodName(2), ex.Message, strcmd.ToString());
+                return string.Empty;
+            }
         }
         #endregion
 
Index: trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IONotificationMessageSelect.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IONotificationMessageSelect.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IONotificationMessageSelect.cs	(revision 484)
@@ -67,6 +67,48 @@
 
         #endregion
 
+        #region テーブルのフィールドリストを作成する
+        /// <summary>
+        /// テーブルのフィールドリストを作成する
+        /// </summary>
+        /// <returns></returns>
+        public static string CreateFieldNameList(string strAlias = "")
+        {
+            StringBuilder strcmd = new StringBuilder();
+            try
+            {
+                strcmd.Append(" ");
+                bool bColFirst = true;
+                string strWork = string.Empty;
+                foreach (var gender in Enum.GetValues(typeof(ColumnCnt)))
+                {
+                    strWork = gender.ToString();
+                    if (!bColFirst) strcmd.Append(",");
+                    if (strWork.Equals("EntryDate") || strWork.Equals("UpdateDate"))
+                    {
+                        strcmd.AppendFormat(" DATE_FORMAT({0}{1}, '%Y/%m/%d %H:%i:%s') As {1}", strAlias, strWork);
+                    }
+                    else if (strWork.Equals("MessageDate"))
+                    {
+                        strcmd.AppendFormat(" DATE_FORMAT({0}{1}, '%Y/%m/%d') As {1}", strAlias, strWork);
+                    }
+                    else
+                    {
+                        strcmd.AppendFormat(" {0}{1}", strAlias, strWork);
+                    }
+                    bColFirst = false;
+                }
+
+                return strcmd.ToString();
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("システムエラー：{0}：{1}：{2}", CommonMotions.GetMethodName(2), ex.Message, strcmd.ToString());
+                return string.Empty;
+            }
+        }
+        #endregion
+
         #region お知らせ対象業者選択情報検索文字作成
         /// <summary>
         /// お知らせ対象業者選択情報検索文字作成
@@ -74,33 +116,17 @@
         private string CreateSelectSQL()
         {
             StringBuilder strcmd = new StringBuilder();
-            strcmd.Append("SELECT");
-
-            bool bColFirst = true;
-            string strWork = string.Empty;
-            foreach (var gender in Enum.GetValues(typeof(ColumnCnt)))
+            try
             {
-                strWork = gender.ToString();
-                if (!bColFirst) strcmd.Append(",");
+                strcmd.AppendFormat("SELECT {0} FROM NotificationMessageSelect", CreateFieldNameList());
 
-                if (strWork.Equals("EntryDate") || strWork.Equals("UpdateDate"))
-                {
-                    strcmd.AppendFormat(" DATE_FORMAT({0}, '%Y/%m/%d %H:%i:%s')", strWork);
-                }
-                else if (strWork.Equals("MessageDate"))
-                {
-                    strcmd.AppendFormat(" DATE_FORMAT({0}, '%Y/%m/%d')", strWork);
-                }
-                else
-                {
-                    strcmd.AppendFormat(" {0}", strWork);
-                }
-                bColFirst = false;
+                return strcmd.ToString();
             }
-
-            strcmd.Append(" FROM NotificationMessageSelect");
-
-            return strcmd.ToString();
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("システムエラー：{0}：{1}：{2}", CommonMotions.GetMethodName(2), ex.Message, strcmd.ToString());
+                return string.Empty;
+            }
         }
         #endregion
 
Index: trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOOrdersPriceData.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOOrdersPriceData.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOOrdersPriceData.cs	(revision 484)
@@ -185,7 +185,7 @@
                 strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d')"
                                                 , work.ChangeDate.ToShortDateString());	    // 変更日
                 strcmd.AppendFormat(", {0}", work.ChangePersonCode);                    // 変更者コード
-                strcmd.AppendFormat(",'{0}'", work.ChangePersonName);                   // 変更者名
+                strcmd.AppendFormat(", {0}", SeparateString(work.ChangePersonName));    // 変更者名
                 
                 strcmd.AppendFormat(", {0}", work.BeforeValue);                         // 変更前税抜受注金額
                 strcmd.AppendFormat(", {0}", work.BeforeValueInTax);                    // 　〃　税込受注金額
@@ -192,7 +192,7 @@
                 strcmd.AppendFormat(", {0}", work.AfterValue);                          // 変更後税抜受注金額
                 strcmd.AppendFormat(", {0}", work.AfterValueInTax);                     // 　〃　税込受注金額
 
-                strcmd.AppendFormat(",'{0}'", work.ChangeComment);                      // 変更理由
+                strcmd.AppendFormat(", {0}", SeparateString(work.ChangeComment));       // 変更理由
 
                 strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.EntryDate);
                 strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.UpdateDate);
@@ -239,7 +239,7 @@
                     strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d')"
                                                     , work.ChangeDate.ToShortDateString());	    // 変更日
                     strcmd.AppendFormat(", {0}", work.ChangePersonCode);                    // 変更者コード
-                    strcmd.AppendFormat(",'{0}'", work.ChangePersonName);                   // 変更者名
+                    strcmd.AppendFormat(", {0}", SeparateString(work.ChangePersonName));    // 変更者名
 
                     strcmd.AppendFormat(", {0}", work.BeforeValue);                         // 変更前税抜受注金額
                     strcmd.AppendFormat(", {0}", work.BeforeValueInTax);                    // 　〃　税込受注金額
@@ -246,7 +246,7 @@
                     strcmd.AppendFormat(", {0}", work.AfterValue);                          // 変更後税抜受注金額
                     strcmd.AppendFormat(", {0}", work.AfterValueInTax);                     // 　〃　税込受注金額
 
-                    strcmd.AppendFormat(",'{0}'", work.ChangeComment);                      // 変更理由
+                    strcmd.AppendFormat(", {0}", SeparateString(work.ChangeComment));       // 変更理由
 
                     strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.EntryDate);
                     strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.UpdateDate);
@@ -288,9 +288,9 @@
 
                 strcmd.AppendFormat(",ChangeNo = {0}", data.ChangeNo);	                                // 変更番号
                 strcmd.AppendFormat(",ChangeDate = STR_TO_DATE('{0}','%Y/%m/%d')"
-                                        , data.ChangeDate.ToShortDateString());	                            // 変更日
+                                        , data.ChangeDate.ToShortDateString());	                        // 変更日
                 strcmd.AppendFormat(",ChangePersonCode = {0}", data.ChangePersonCode);                  // 変更者コード
-                strcmd.AppendFormat(",ChangePersonName = '{0}'", data.ChangePersonName);                // 変更者名
+                strcmd.AppendFormat(",ChangePersonName = {0}", SeparateString(data.ChangePersonName));  // 変更者名
                 
                 strcmd.AppendFormat(",BeforeValue = {0}", data.BeforeValue);                            // 変更前税抜受注金額
                 strcmd.AppendFormat(",BeforeValueInTax = {0}", data.BeforeValueInTax);                  // 　〃　税込受注金額
@@ -297,7 +297,7 @@
                 strcmd.AppendFormat(",AfterValue = {0}", data.AfterValue);                              // 変更後税抜受注金額
                 strcmd.AppendFormat(",AfterValueInTax = {0}", data.AfterValueInTax);                    // 　〃　税込受注金額
 
-                strcmd.AppendFormat(",ChangeComment = '{0}'", data.ChangeComment);                      // 変更理由
+                strcmd.AppendFormat(",ChangeComment = {0}", SeparateString(data.ChangeComment));        // 変更理由
 
                 strcmd.Append(", UpdateDate = NOW()");
                 strcmd.Append(AddSQLString);
@@ -351,18 +351,18 @@
             try
             {
                 // データ取得
-                wrk.ConstructionCode = int.Parse(objwrk[(int)TableColumn.ConstructionCode].ToString());                   // 工事コード
-                wrk.ChangeNo = int.Parse(objwrk[(int)TableColumn.ChangeNo].ToString());	                                // 変更番号
+                wrk.ConstructionCode = int.Parse(objwrk[(int)TableColumn.ConstructionCode].ToString());                     // 工事コード
+                wrk.ChangeNo = int.Parse(objwrk[(int)TableColumn.ChangeNo].ToString());	                                    // 変更番号
                 wrk.ChangeDate = DateTime.Parse(objwrk[(int)TableColumn.ChangeDate].ToString());	                        // 変更日
-                wrk.ChangePersonCode = int.Parse(objwrk[(int)TableColumn.ChangePersonCode].ToString());                   // 変更者コード
-                wrk.ChangePersonName = objwrk[(int)TableColumn.ChangePersonName].ToString();                              // 変更者名
+                wrk.ChangePersonCode = int.Parse(objwrk[(int)TableColumn.ChangePersonCode].ToString());                     // 変更者コード
+                wrk.ChangePersonName = objwrk[(int)TableColumn.ChangePersonName].ToString();                                // 変更者名
 
-                wrk.BeforeValue = int.Parse(objwrk[(int)TableColumn.BeforeValue].ToString());                             // 変更前税抜受注金額
-                wrk.BeforeValueInTax = int.Parse(objwrk[(int)TableColumn.BeforeValueInTax].ToString());                   // 　〃　税込受注金額
-                wrk.AfterValue = int.Parse(objwrk[(int)TableColumn.AfterValue].ToString());                               // 変更後税抜受注金額
-                wrk.AfterValueInTax = int.Parse(objwrk[(int)TableColumn.AfterValueInTax].ToString());                     // 　〃　税込受注金額
+                wrk.BeforeValue = long.Parse(objwrk[(int)TableColumn.BeforeValue].ToString());                              // 変更前税抜受注金額
+                wrk.BeforeValueInTax = long.Parse(objwrk[(int)TableColumn.BeforeValueInTax].ToString());                    // 　〃　税込受注金額
+                wrk.AfterValue = long.Parse(objwrk[(int)TableColumn.AfterValue].ToString());                                // 変更後税抜受注金額
+                wrk.AfterValueInTax = long.Parse(objwrk[(int)TableColumn.AfterValueInTax].ToString());                      // 　〃　税込受注金額
 
-                wrk.ChangeComment = objwrk[(int)TableColumn.ChangeComment].ToString();                                    // 変更理由
+                wrk.ChangeComment = objwrk[(int)TableColumn.ChangeComment].ToString();                                      // 変更理由
 
                 wrk.EntryDate = DateTime.Parse(objwrk[(int)TableColumn.EntryDate].ToString());
                 wrk.UpdateDate = DateTime.Parse(objwrk[(int)TableColumn.UpdateDate].ToString());
@@ -406,22 +406,22 @@
                         strcmd.AppendFormat(" ChangePersonCode = {0}", ((int)value).ToString());
                         break;
                     case (int)TableColumn.ChangePersonName:         // 変更者名
-                        strcmd.AppendFormat(" ChangePersonName = '{0}'", value.ToString());
+                        strcmd.AppendFormat(" ChangePersonName = {0}", SeparateString(value.ToString()));
                         break;
                     case (int)TableColumn.BeforeValue:              // 変更前税抜受注金額
-                        strcmd.AppendFormat(" BeforeValue = {0}", ((double)value).ToString());
+                        strcmd.AppendFormat(" BeforeValue = {0}", ((long)value).ToString());
                         break;
                     case (int)TableColumn.BeforeValueInTax:         // 　〃　税込受注金額
-                        strcmd.AppendFormat(" BeforeValueInTax = {0}", ((double)value).ToString());
+                        strcmd.AppendFormat(" BeforeValueInTax = {0}", ((long)value).ToString());
                         break;
                     case (int)TableColumn.AfterValue:               // 変更後税抜受注金額
-                        strcmd.AppendFormat(" AfterValue = {0}", ((double)value).ToString());
+                        strcmd.AppendFormat(" AfterValue = {0}", ((long)value).ToString());
                         break;
                     case (int)TableColumn.AfterValueInTax:          // 　〃　税込受注金額
-                        strcmd.AppendFormat(" AfterValueInTax = {0}", ((double)value).ToString());
+                        strcmd.AppendFormat(" AfterValueInTax = {0}", ((long)value).ToString());
                         break;
                     case (int)TableColumn.ChangeComment:            // 変更理由
-                        strcmd.AppendFormat(" ChangeComment = '{0}'", value.ToString());
+                        strcmd.AppendFormat(" ChangeComment = {0}", SeparateString(value.ToString()));
                         break;
                 }
 
Index: trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOPaymentApprovalInfo.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOPaymentApprovalInfo.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOPaymentApprovalInfo.cs	(revision 484)
@@ -212,7 +212,7 @@
                     strcmd.AppendFormat(", {0}", work.LineCount.ToString());
                     strcmd.AppendFormat(", {0}", work.ApprovalNo.ToString());
                     strcmd.AppendFormat(", {0}", work.ApprovalPerson.ToString());
-                    strcmd.AppendFormat(", '{0}'", work.ApprovalPersonName);
+                    strcmd.AppendFormat(", {0}", SeparateString(work.ApprovalPersonName));
                     strcmd.AppendFormat(", {0}", work.ApprovalAuthority.ToString());
                     strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d')", work.ApprovalDate.ToShortDateString());
 
@@ -262,7 +262,7 @@
                 strcmd.AppendFormat(", {0}", data.LineCount.ToString());
                 strcmd.AppendFormat(", {0}", data.ApprovalNo.ToString());
                 strcmd.AppendFormat(", {0}", data.ApprovalPerson.ToString());
-                strcmd.AppendFormat(", '{0}'", data.ApprovalPersonName);
+                strcmd.AppendFormat(", {0}", SeparateString(data.ApprovalPersonName));
                 strcmd.AppendFormat(", {0}", data.ApprovalAuthority.ToString());
                 strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d')", data.ApprovalDate.ToShortDateString());
 
@@ -306,7 +306,7 @@
                 strcmd.AppendFormat(", LineCount = {0}", data.LineCount);
                 strcmd.AppendFormat(", ApprovalNo = {0}", data.ApprovalNo);
                 strcmd.AppendFormat(", ApprovalPerson = {0}", data.ApprovalPerson);
-                strcmd.AppendFormat(", ApprovalPersonName = '{0}'", data.ApprovalPersonName);
+                strcmd.AppendFormat(", ApprovalPersonName = {0}", SeparateString(data.ApprovalPersonName));
                 strcmd.AppendFormat(", ApprovalAuthority = {0}", data.ApprovalAuthority);
                 strcmd.AppendFormat(", ApprovalDate = STR_TO_DATE('{0}','%Y/%m/%d')", data.ApprovalDate.ToShortDateString());
 
Index: trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOPeriodAvoidance.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOPeriodAvoidance.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOPeriodAvoidance.cs	(revision 484)
@@ -16,7 +16,7 @@
 namespace ProcessManagement.DB.IOAccess
 {
     /// <summary>
-    /// 期限マスタアクセスクラス
+    /// 工事期限回避データアクセスクラス
     /// </summary>
     public class IOPeriodAvoidance : MySqlProcess
     {
@@ -29,7 +29,7 @@
 
         #region 定数
         /// <summary>
-        /// 行動予定フィールド並び
+        /// 工事期限回避データフィールド並び
         /// </summary>
         public enum NameColumn
         {
@@ -53,12 +53,71 @@
 
         #endregion
 
-        #region 行動予定検索
+        #region テーブルのフィールドリストを作成する
         /// <summary>
-        /// 行動予定検索
+        /// テーブルのフィールドリストを作成する
         /// </summary>
+        /// <returns></returns>
+        public static string CreateFieldNameList(string strAlias = "")
+        {
+            StringBuilder strcmd = new StringBuilder();
+            try
+            {
+                strcmd.Append(" ");
+                bool bColFirst = true;
+                string strWork = string.Empty;
+                foreach (var gender in Enum.GetValues(typeof(NameColumn)))
+                {
+                    strWork = gender.ToString();
+                    if (!bColFirst) strcmd.Append(",");
+                    if (strWork.Equals("EntryDate") || strWork.Equals("UpdateDate"))
+                    {
+                        strcmd.AppendFormat(" DATE_FORMAT({0}{1}, '%Y/%m/%d %H:%i:%s') As {1}", strAlias, strWork);
+                    }
+                    else
+                    {
+                        strcmd.AppendFormat(" {0}{1}", strAlias, strWork);
+                    }
+                    bColFirst = false;
+                }
+
+                return strcmd.ToString();
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("システムエラー：{0}：{1}：{2}", CommonMotions.GetMethodName(2), ex.Message, strcmd.ToString());
+                return string.Empty;
+            }
+        }
+        #endregion
+
+        #region 検索文字列作成
+        /// <summary>
+        /// 検索文字列作成
+        /// </summary>
+        private string CreateSelectSQL()
+        {
+            StringBuilder strcmd = new StringBuilder();
+            try
+            {
+                strcmd.AppendFormat("SELECT {0} FROM PeriodAvoidance", CreateFieldNameList());
+
+                return strcmd.ToString();
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("システムエラー：{0}：{1}：{2}", CommonMotions.GetMethodName(2), ex.Message, strcmd.ToString());
+                return string.Empty;
+            }
+        }
+        #endregion
+
+        #region 工事期限回避データ検索
+        /// <summary>
+        /// 工事期限回避データ検索
+        /// </summary>
         /// <param name="AddSQLString">検索条件SQL文字列</param>
-        /// <param name="data">行動予定データ</param>
+        /// <param name="data">工事期限回避データデータ</param>
         /// <returns>true：成功 false：失敗</returns>
         public bool SelectAction(string AddSQLString, ref List<PeriodAvoidance> data, bool bConnect = true)
         {
@@ -68,14 +127,7 @@
 
             try
             {
-                // SQL作成
-                strcmd.Append("SELECT");
-                strcmd.Append(" ConstructionCode");
-                strcmd.Append(", ConstructionStatusFlg");
-                strcmd.Append(", FieldNo");
-                strcmd.Append(", DATE_FORMAT(EntryDate,'%Y/%m/%d %H:%i:%s')");
-                strcmd.Append(", DATE_FORMAT(UpdateDate,'%Y/%m/%d %H:%i:%s')");
-                strcmd.Append(" FROM PeriodAvoidance");
+                strcmd.Append(CreateSelectSQL());
                 strcmd.Append(AddSQLString);
 
                 // SQL実行
@@ -100,11 +152,11 @@
         }
         #endregion
 
-        #region 行動予定追加（1件）
+        #region 工事期限回避データ追加（1件）
         /// <summary>
-        /// 行動予定追加（1件）
+        /// 工事期限回避データ追加（1件）
         /// </summary>
-        /// <param name="data">行動予定データ</param>
+        /// <param name="data">工事期限回避データデータ</param>
         /// <returns>true：成功 false：失敗</returns>
         public bool OneRecInsertAction(PeriodAvoidance data, bool bConnect = true)
         {
@@ -142,9 +194,9 @@
         }
         #endregion
 
-        #region 行動予定追加
+        #region 工事期限回避データ追加
         /// <summary>
-        /// 行動予定追加
+        /// 工事期限回避データ追加
         /// </summary>
         /// <param name="data"></param>
         /// <param name="bConnect"></param>
@@ -193,12 +245,12 @@
         }
         #endregion
 
-        #region 行動予定更新
+        #region 工事期限回避データ更新
         /// <summary>
-        /// 行動予定更新
+        /// 工事期限回避データ更新
         /// </summary>
         /// <param name="AddSQLString">更新条件SQL文字列</param>
-        /// <param name="data">行動予定データ</param>
+        /// <param name="data">工事期限回避データデータ</param>
         /// <returns>true：成功 false：失敗</returns>
         public bool UpdateAction(string AddSQLString, PeriodAvoidance data, bool bConnect = true)
         {
@@ -228,12 +280,12 @@
         }
         #endregion
 
-        #region 行動予定削除
+        #region 工事期限回避データ削除
         /// <summary>
-        /// 行動予定削除
+        /// 工事期限回避データ削除
         /// </summary>
         /// <param name="AddSQLString">削除条件SQL文字列</param>
-        /// <param name="data">行動予定データ</param>
+        /// <param name="data">工事期限回避データデータ</param>
         /// <returns>true：成功 false：失敗</returns>
         public bool DeleteAction(string AddSQLString, bool bConnect = true)
         {
Index: trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOPersonApprovalCommnet.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOPersonApprovalCommnet.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOPersonApprovalCommnet.cs	(revision 484)
@@ -208,7 +208,7 @@
                     strcmd.AppendFormat(", {0}", work.OrderNo);
                     strcmd.AppendFormat(", {0}", work.CommentNo);
                     strcmd.AppendFormat(", {0}", work.ParentNo);
-                    strcmd.AppendFormat(", '{0}'", work.ApproValComment);
+                    strcmd.AppendFormat(", {0}", SeparateString(work.ApproValComment));
 
                     strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.EntryDate);
                     strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.UpdateDate);
@@ -260,7 +260,7 @@
                 strcmd.AppendFormat(", {0}", data.OrderNo);
                 strcmd.AppendFormat(", {0}", data.CommentNo);
                 strcmd.AppendFormat(", {0}", data.ParentNo);
-                strcmd.AppendFormat(", '{0}'", data.ApproValComment);
+                strcmd.AppendFormat(", {0}", SeparateString(data.ApproValComment));
 
                 strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", data.EntryDate);
                 strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", data.UpdateDate);
@@ -301,7 +301,7 @@
                 strcmd.AppendFormat(",OrderNo = {0}", data.OrderNo);
                 strcmd.AppendFormat(",CommentNo = {0}", data.CommentNo);
                 strcmd.AppendFormat(",ParentNo = {0}", data.ParentNo);
-                strcmd.AppendFormat(",ApproValComment = '{0}'", data.ApproValComment);
+                strcmd.AppendFormat(",ApproValComment = {0}", SeparateString(data.ApproValComment));
 
                 strcmd.Append(", UpdateDate = NOW()");
                 strcmd.Append(AddSQLString);
@@ -379,7 +379,7 @@
                         strcmd.AppendFormat(" ParentNo = {0}", (int)value);
                         break;
                     case (int)ColumnName.ApproValComment:
-                        strcmd.AppendFormat(" ApproValComment = '{0}'", value.ToString());
+                        strcmd.AppendFormat(" ApproValComment = {0}", SeparateString(value.ToString()));
                         break;
                 }
 
Index: trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOPersonQualification.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOPersonQualification.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOPersonQualification.cs	(revision 484)
@@ -205,8 +205,8 @@
                 strcmd.AppendFormat(", {0}", data.DCode);
                 strcmd.AppendFormat(", {0}", data.QCode);
                 strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d')", data.DateOfAcquisition.ToShortDateString());
-                strcmd.AppendFormat(",'{0}'", data.Qualification);
-                strcmd.AppendFormat(",'{0}'", data.Notes);
+                strcmd.AppendFormat(", {0}", SeparateString(data.Qualification));
+                strcmd.AppendFormat(", {0}", SeparateString(data.Notes));
 
                 strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", data.EntryDate);
                 strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", data.UpdateDate);
@@ -258,8 +258,8 @@
                     strcmd.AppendFormat(", {0}", work.DCode);
                     strcmd.AppendFormat(", {0}", work.QCode);
                     strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d')", work.DateOfAcquisition.ToShortDateString());
-                    strcmd.AppendFormat(",'{0}'", work.Qualification);
-                    strcmd.AppendFormat(",'{0}'", work.Notes);
+                    strcmd.AppendFormat(", {0}", SeparateString(work.Qualification));
+                    strcmd.AppendFormat(", {0}", SeparateString(work.Notes));
 
                     strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.EntryDate);
                     strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.UpdateDate);
@@ -303,8 +303,8 @@
                 strcmd.AppendFormat(", DCode =  {0}", data.DCode);
                 strcmd.AppendFormat(", QCode = {0}", data.QCode);
                 strcmd.AppendFormat(", DateOfAcquisition = STR_TO_DATE('{0}','%Y/%m/%d')", data.DateOfAcquisition.ToShortDateString());
-                strcmd.AppendFormat(", Qualification = '{0}'", data.Qualification);
-                strcmd.AppendFormat(", Notes = '{0}'", data.Notes);
+                strcmd.AppendFormat(", Qualification = {0}", SeparateString(data.Qualification));
+                strcmd.AppendFormat(", Notes = {0}", SeparateString(data.Notes));
 
                 strcmd.Append(", UpdateDate = NOW()");
                 strcmd.Append(AddSQLString);
Index: trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOProceedingsData.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOProceedingsData.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOProceedingsData.cs	(revision 484)
@@ -207,7 +207,7 @@
                 strcmd.AppendFormat(", {0}", work.EndMeetingTime);                      // 会議時間終了
                 strcmd.AppendFormat(", {0}", work.CreatorCode);                         // 作成者コード
                 strcmd.AppendFormat(", {0}", work.PalceFlag);                           // 現地フラグ
-                strcmd.AppendFormat(",'{0}'", work.MeetingPalce);                       // 打合せ場所１
+                strcmd.AppendFormat(", {0}", SeparateString(work.MeetingPalce));        // 打合せ場所１
 
                 strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.EntryDate);
                 strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.UpdateDate);
@@ -255,7 +255,7 @@
                     strcmd.AppendFormat(", {0}", work.EndMeetingTime);                      // 会議時間終了
                     strcmd.AppendFormat(", {0}", work.CreatorCode);                         // 作成者コード
                     strcmd.AppendFormat(", {0}", work.PalceFlag);                           // 現地フラグ
-                    strcmd.AppendFormat(",'{0}'", work.MeetingPalce);                       // 打合せ場所１
+                    strcmd.AppendFormat(", {0}", SeparateString(work.MeetingPalce));        // 打合せ場所１
 
                     strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.EntryDate);
                     strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.UpdateDate);
@@ -300,7 +300,7 @@
                 strcmd.AppendFormat(",EndMeetingTime = {0}", data.EndMeetingTime);          // 会議時間終了
                 strcmd.AppendFormat(",CreatorCode = {0}", data.CreatorCode);                // 作成者コード
                 strcmd.AppendFormat(",PalceFlag = {0}", data.PalceFlag);                    // 現地フラグ
-                strcmd.AppendFormat(",MeetingPalce = '{0}'", data.MeetingPalce);            // 打合せ場所
+                strcmd.AppendFormat(",MeetingPalce = {0}", SeparateString(data.MeetingPalce));  // 打合せ場所
 
                 strcmd.Append(", UpdateDate = NOW()");
                 strcmd.Append(AddSQLString);
Index: trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOProceedingsDataAttend.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOProceedingsDataAttend.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOProceedingsDataAttend.cs	(revision 484)
@@ -202,8 +202,8 @@
                 strcmd.AppendFormat(", {0}", work.StartMeetingTime);                    // 会議時間開始
                 strcmd.AppendFormat(", {0}", work.SeqNo);                               // データ行番号
 
-                strcmd.AppendFormat(",'{0}'", work.Department);                         // 出席者所属
-                strcmd.AppendFormat(",'{0}'", work.AttendName);                         // 出席者氏名
+                strcmd.AppendFormat(", {0}", SeparateString(work.Department));          // 出席者所属
+                strcmd.AppendFormat(", {0}", SeparateString(work.AttendName));          // 出席者氏名
 
                 strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.EntryDate);
                 strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.UpdateDate);
@@ -252,8 +252,8 @@
                     strcmd.AppendFormat(", {0}", work.StartMeetingTime);                    // 会議時間開始
                     strcmd.AppendFormat(", {0}", work.SeqNo);                               // データ行番号
 
-                    strcmd.AppendFormat(",'{0}'", work.Department);                         // 出席者所属
-                    strcmd.AppendFormat(",'{0}'", work.AttendName);                         // 出席者氏名
+                    strcmd.AppendFormat(", {0}", SeparateString(work.Department));          // 出席者所属
+                    strcmd.AppendFormat(", {0}", SeparateString(work.AttendName));          // 出席者氏名
 
                     strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.EntryDate);
                     strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.UpdateDate);
@@ -294,13 +294,13 @@
                 strcmd.AppendFormat(" ConstructionCode = {0}", data.ConstructionCode);      // 工事番号
                 
                 strcmd.AppendFormat(",ProceedingsDataDate = STR_TO_DATE('{0}','%Y/%m/%d')"
-                                        , data.ProceedingsDataDate.ToShortDateString());        // 議事録作成日
+                                        , data.ProceedingsDataDate.ToShortDateString());    // 議事録作成日
 
                 strcmd.AppendFormat(",StartMeetingTime = {0}", data.StartMeetingTime);      // 会議時間開始
                 strcmd.AppendFormat(",SeqNo = {0}", data.SeqNo);                            // データ行番号
 
-                strcmd.AppendFormat(",Department = '{0}'", data.Department);                // 出席者所属
-                strcmd.AppendFormat(",AttendName = '{0}'", data.AttendName);                // 出席者氏名
+                strcmd.AppendFormat(",Department = {0}", SeparateString(data.Department));  // 出席者所属
+                strcmd.AppendFormat(",AttendName = {0}", SeparateString(data.AttendName));  // 出席者氏名
 
                 strcmd.Append(", UpdateDate = NOW()");
                 strcmd.Append(AddSQLString);
Index: trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOProceedingsDataDetail.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOProceedingsDataDetail.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOProceedingsDataDetail.cs	(revision 484)
@@ -205,9 +205,9 @@
                 strcmd.AppendFormat(", {0}", work.StartMeetingTime);                    // 会議時間開始
                 strcmd.AppendFormat(", {0}", work.SeqNo);                               // データ行番号
 
-                strcmd.AppendFormat(",'{0}'", work.TitleNo);                            // 議題番号
-                strcmd.AppendFormat(",'{0}'", work.Title);                              // 議題
-                strcmd.AppendFormat(",'{0}'", work.ContentsText);                       // 内容
+                strcmd.AppendFormat(", {0}", SeparateString(work.TitleNo));             // 議題番号
+                strcmd.AppendFormat(", {0}", SeparateString(work.Title));               // 議題
+                strcmd.AppendFormat(", {0}", SeparateString(work.ContentsText));        // 内容
 
                 strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.EntryDate);
                 strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.UpdateDate);
@@ -254,9 +254,9 @@
                     strcmd.AppendFormat(", {0}", work.StartMeetingTime);                    // 会議時間開始
                     strcmd.AppendFormat(", {0}", work.SeqNo);                               // データ行番号
 
-                    strcmd.AppendFormat(",'{0}'", work.TitleNo);                            // 議題番号
-                    strcmd.AppendFormat(",'{0}'", work.Title);                              // 議題
-                    strcmd.AppendFormat(",'{0}'", work.ContentsText);                       // 内容
+                    strcmd.AppendFormat(", {0}", SeparateString(work.TitleNo));                            // 議題番号
+                    strcmd.AppendFormat(", {0}", SeparateString(work.Title));                              // 議題
+                    strcmd.AppendFormat(", {0}", SeparateString(work.ContentsText));                       // 内容
 
                     strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.EntryDate);
                     strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.UpdateDate);
@@ -294,15 +294,15 @@
 
                 strcmd.Append(" SET");
 
-                strcmd.AppendFormat(" ConstructionCode = {0}", data.ConstructionCode);      // 工事番号
+                strcmd.AppendFormat(" ConstructionCode = {0}", data.ConstructionCode);          // 工事番号
                 strcmd.AppendFormat(",ProceedingsDataDate = STR_TO_DATE('{0}','%Y/%m/%d')"
                                         , data.ProceedingsDataDate.ToShortDateString());        // 議事録作成日
-                strcmd.AppendFormat(",StartMeetingTime = {0}", data.StartMeetingTime);      // 会議時間開始
-                strcmd.AppendFormat(",SeqNo = {0}", data.SeqNo);                            // データ行番号
+                strcmd.AppendFormat(",StartMeetingTime = {0}", data.StartMeetingTime);          // 会議時間開始
+                strcmd.AppendFormat(",SeqNo = {0}", data.SeqNo);                                // データ行番号
 
-                strcmd.AppendFormat(",TitleNo = '{0}'", data.TitleNo);                      // 議題番号
-                strcmd.AppendFormat(",Title = '{0}'", data.Title);                          // 議題
-                strcmd.AppendFormat(",ContentsText = '{0}'", data.ContentsText);            // 内容
+                strcmd.AppendFormat(",TitleNo =  {0}", SeparateString(data.TitleNo));           // 議題番号
+                strcmd.AppendFormat(",Title =  {0}", SeparateString(data.Title));               // 議題
+                strcmd.AppendFormat(",ContentsText =  {0}", SeparateString(data.ContentsText)); // 内容
 
                 strcmd.Append(", UpdateDate = NOW()");
                 strcmd.Append(AddSQLString);
Index: trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOProcessApproval.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOProcessApproval.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOProcessApproval.cs	(revision 484)
@@ -59,6 +59,48 @@
 
         #endregion
 
+        #region テーブルのフィールドリストを作成する
+        /// <summary>
+        /// テーブルのフィールドリストを作成する
+        /// </summary>
+        /// <returns></returns>
+        public static string CreateFieldNameList(string strAlias = "")
+        {
+            StringBuilder strcmd = new StringBuilder();
+            try
+            {
+                strcmd.Append(" ");
+                bool bColFirst = true;
+                string strWork = string.Empty;
+                foreach (var gender in Enum.GetValues(typeof(ColumnName)))
+                {
+                    strWork = gender.ToString();
+                    if (!bColFirst) strcmd.Append(",");
+                    if (strWork.Equals("EntryDate") || strWork.Equals("UpdateDate"))
+                    {
+                        strcmd.AppendFormat(" DATE_FORMAT({0}{1}, '%Y/%m/%d %H:%i:%s') As {1}", strAlias, strWork);
+                    }
+                    else if (strWork.Equals("PetitionApprovalDate") || strWork.Equals("ApprovalLimitDates"))
+                    {
+                        strcmd.AppendFormat(" DATE_FORMAT({0}{1}, '%Y/%m/%d') As {1}", strAlias, strWork);
+                    }
+                    else
+                    {
+                        strcmd.AppendFormat(" {0}{1}", strAlias, strWork);
+                    }
+                    bColFirst = false;
+                }
+
+                return strcmd.ToString();
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("システムエラー：{0}：{1}：{2}", CommonMotions.GetMethodName(2), ex.Message, strcmd.ToString());
+                return string.Empty;
+            }
+        }
+        #endregion
+
         #region 承認データ検索文字列作成
         /// <summary>
         /// 承認データ検索文字列作成
@@ -68,34 +110,18 @@
         /// <returns>true：成功 false：失敗</returns>
         private string CreateSelectSQL()
         {
-            // SQL作成
             StringBuilder strcmd = new StringBuilder();
-            strcmd.Append("SELECT");
+            try
+            {
+                strcmd.AppendFormat("SELECT {0} FROM ProcessApproval", CreateFieldNameList());
 
-            bool bColFirst = true;
-            string strWork = string.Empty;
-            foreach (var gender in Enum.GetValues(typeof(ColumnName)))
+                return strcmd.ToString();
+            }
+            catch (Exception ex)
             {
-                strWork = gender.ToString();
-                if (!bColFirst) strcmd.Append(",");
-                if (strWork.Equals("EntryDate") || strWork.Equals("UpdateDate"))
-                {
-                    strcmd.AppendFormat(" DATE_FORMAT({0}, '%Y/%m/%d %H:%i:%s')", strWork);
-                }
-                else if (strWork.Equals("PetitionApprovalDate") || strWork.Equals("ApprovalLimitDates"))
-                {
-                    strcmd.AppendFormat(" DATE_FORMAT({0}, '%Y/%m/%d')", strWork);
-                }
-                else
-                {
-                    strcmd.AppendFormat(" {0}", strWork);
-                }
-                bColFirst = false;
+                logger.ErrorFormat("システムエラー：{0}：{1}：{2}", CommonMotions.GetMethodName(2), ex.Message, strcmd.ToString());
+                return string.Empty;
             }
-
-            strcmd.Append(" FROM ProcessApproval");
-
-            return strcmd.ToString();
         }
         #endregion
 
@@ -216,7 +242,7 @@
                     strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d')", work.PetitionApprovalDate.ToShortDateString());
                     strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d')", work.ApprovalLimitDates.ToShortDateString());
                     strcmd.AppendFormat(", {0}", work.ApprovalStatus.ToString());
-                    strcmd.AppendFormat(",'{0}'", work.InputComment.ToString());
+                    strcmd.AppendFormat(", {0}", SeparateString(work.InputComment));
 
                     strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.EntryDate);
                     strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.UpdateDate);
@@ -270,7 +296,7 @@
                 strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d')", data.PetitionApprovalDate.ToShortDateString());
                 strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d')", data.ApprovalLimitDates.ToShortDateString());
                 strcmd.AppendFormat(", {0}", data.ApprovalStatus.ToString());
-                strcmd.AppendFormat(",'{0}'", data.InputComment.ToString());
+                strcmd.AppendFormat(", {0}", SeparateString(data.InputComment));
 
                 strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", data.EntryDate);
                 strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", data.UpdateDate);
@@ -313,7 +339,7 @@
                 strcmd.AppendFormat(",PetitionApprovalDate = STR_TO_DATE('{0}','%Y/%m/%d')", data.PetitionApprovalDate.ToShortDateString());
                 strcmd.AppendFormat(",ApprovalLimitDates = STR_TO_DATE('{0}','%Y/%m/%d')", data.ApprovalLimitDates.ToShortDateString());
                 strcmd.AppendFormat(",ApprovalStatus = {0}", data.ApprovalStatus.ToString());
-                strcmd.AppendFormat(",InputComment = '{0}'", data.InputComment);
+                strcmd.AppendFormat(",InputComment = {0}", SeparateString(data.InputComment));
 
                 strcmd.Append(", UpdateDate = NOW()");
                 strcmd.Append(AddSQLString);
@@ -402,7 +428,7 @@
                         strcmd.AppendFormat(" ApprovalStatus = {0}", ((int)value).ToString());
                         break;
                     case (int)ColumnName.InputComment:
-                        strcmd.AppendFormat(" InputComment = '{0}'", value.ToString());
+                        strcmd.AppendFormat(" InputComment = {0}", SeparateString(value.ToString()));
                         break;
                 }
 
Index: trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOProcessApprovalCommnet.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOProcessApprovalCommnet.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOProcessApprovalCommnet.cs	(revision 484)
@@ -56,6 +56,44 @@
 
         #endregion
 
+        #region テーブルのフィールドリストを作成する
+        /// <summary>
+        /// テーブルのフィールドリストを作成する
+        /// </summary>
+        /// <returns></returns>
+        public static string CreateFieldNameList(string strAlias = "")
+        {
+            StringBuilder strcmd = new StringBuilder();
+            try
+            {
+                strcmd.Append(" ");
+                bool bColFirst = true;
+                string strWork = string.Empty;
+                foreach (var gender in Enum.GetValues(typeof(ColumnName)))
+                {
+                    strWork = gender.ToString();
+                    if (!bColFirst) strcmd.Append(",");
+                    if (strWork.Equals("EntryDate") || strWork.Equals("UpdateDate"))
+                    {
+                        strcmd.AppendFormat(" DATE_FORMAT({0}{1}, '%Y/%m/%d %H:%i:%s') As {1}", strAlias, strWork);
+                    }
+                    else
+                    {
+                        strcmd.AppendFormat(" {0}{1}", strAlias, strWork);
+                    }
+                    bColFirst = false;
+                }
+
+                return strcmd.ToString();
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("システムエラー：{0}：{1}：{2}", CommonMotions.GetMethodName(2), ex.Message, strcmd.ToString());
+                return string.Empty;
+            }
+        }
+        #endregion
+
         #region 承認コメントデータ検索文字列作成
         /// <summary>
         /// 承認コメントデータ検索文字列作成
@@ -65,20 +103,18 @@
         /// <returns>true：成功 false：失敗</returns>
         private string CreateSelectSQL()
         {
-            // SQL作成
             StringBuilder strcmd = new StringBuilder();
-            strcmd.Append("SELECT");
-            strcmd.Append(" ConstructionCode");
-            strcmd.Append(",ApprovalCode");
-            strcmd.Append(",OrderNo");
-            strcmd.Append(",CommentNo");
-            strcmd.Append(",ParentNo");
-            strcmd.Append(",ApproValComment");
-            strcmd.Append(", DATE_FORMAT(EntryDate, '%Y/%m/%d %H:%i:%s')");      // 更新年月日
-            strcmd.Append(", DATE_FORMAT(UpdateDate, '%Y/%m/%d %H:%i:%s')");     // 登録年月日
-            strcmd.Append(" FROM ProcessApprovalComment");
+            try
+            {
+                strcmd.AppendFormat("SELECT {0} FROM ProcessApprovalComment", CreateFieldNameList());
 
-            return strcmd.ToString();
+                return strcmd.ToString();
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("システムエラー：{0}：{1}：{2}", CommonMotions.GetMethodName(2), ex.Message, strcmd.ToString());
+                return string.Empty;
+            }
         }
         #endregion
 
@@ -196,7 +232,7 @@
                     strcmd.AppendFormat(", {0}", work.OrderNo.ToString());
                     strcmd.AppendFormat(", {0}", work.CommentNo.ToString());
                     strcmd.AppendFormat(", {0}", work.ParentNo.ToString());
-                    strcmd.AppendFormat(", '{0}'", work.ApproValComment.ToString());
+                    strcmd.AppendFormat(", {0}", SeparateString(work.ApproValComment));
 
                     strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.EntryDate);
                     strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.UpdateDate);
@@ -248,7 +284,7 @@
                 strcmd.AppendFormat(", {0}", data.OrderNo.ToString());
                 strcmd.AppendFormat(", {0}", data.CommentNo.ToString());
                 strcmd.AppendFormat(", {0}", data.ParentNo.ToString());
-                strcmd.AppendFormat(", '{0}'", data.ApproValComment.ToString());
+                strcmd.AppendFormat(", {0}", SeparateString(data.ApproValComment));
 
                 strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", data.EntryDate);
                 strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", data.UpdateDate);
@@ -288,7 +324,7 @@
                 strcmd.AppendFormat(",OrderNo = {0}", data.OrderNo.ToString());
                 strcmd.AppendFormat(",CommentNo = {0}", data.CommentNo.ToString());
                 strcmd.AppendFormat(",ParentNo = {0}", data.ParentNo.ToString());
-                strcmd.AppendFormat(",ApproValComment = '{0}'", data.ApproValComment.ToString());
+                strcmd.AppendFormat(",ApproValComment = {0}", SeparateString(data.ApproValComment));
 
                 strcmd.Append(", UpdateDate = NOW()");
                 strcmd.Append(AddSQLString);
@@ -363,7 +399,7 @@
                         strcmd.AppendFormat(" ParentNo = {0}", ((int)value).ToString());
                         break;
                     case (int)ColumnName.ApproValComment:
-                        strcmd.AppendFormat(" ApproValComment = '{0}'", value.ToString());
+                        strcmd.AppendFormat(" ApproValComment = {0}", SeparateString(value.ToString()));
                         break;
                 }
 
Index: trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOPurchaseOrder.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOPurchaseOrder.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOPurchaseOrder.cs	(revision 484)
@@ -83,6 +83,49 @@
 
         #endregion
 
+        #region テーブルのフィールドリストを作成する
+        /// <summary>
+        /// テーブルのフィールドリストを作成する
+        /// </summary>
+        /// <returns></returns>
+        public static string CreateFieldNameList(string strAlias = "")
+        {
+            StringBuilder strcmd = new StringBuilder();
+            try
+            {
+                strcmd.Append(" ");
+                bool bColFirst = true;
+                string strWork = string.Empty;
+                foreach (var gender in Enum.GetValues(typeof(TableColumn)))
+                {
+                    strWork = gender.ToString();
+                    if (!bColFirst) strcmd.Append(",");
+                    if (strWork.Equals("EntryDate") || strWork.Equals("UpdateDate"))
+                    {
+                        strcmd.AppendFormat(" DATE_FORMAT({0}{1}, '%Y/%m/%d %H:%i:%s') As {1}", strAlias, strWork);
+                    }
+                    else if (strWork.Equals("CreateDate") || strWork.Equals("LastRowStringDate")
+                            || strWork.Equals("PrintoutDate") || strWork.Equals("OrderDate"))
+                    {
+                        strcmd.AppendFormat(" DATE_FORMAT({0}{1}, '%Y/%m/%d') As {1}", strAlias, strWork);
+                    }
+                    else
+                    {
+                        strcmd.AppendFormat(" {0}{1}", strAlias, strWork);
+                    }
+                    bColFirst = false;
+                }
+
+                return strcmd.ToString();
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("システムエラー：{0}：{1}：{2}", CommonMotions.GetMethodName(2), ex.Message, strcmd.ToString());
+                return string.Empty;
+            }
+        }
+        #endregion
+
         #region 注文書データ検索文字列作成
         /// <summary>
         /// 注文書データ検索文字列作成
@@ -91,34 +134,17 @@
         private string CreateSelectSQL()
         {
             StringBuilder strcmd = new StringBuilder();
+            try
+            {
+                strcmd.AppendFormat("SELECT {0} FROM PurchaseOrder", CreateFieldNameList());
 
-            strcmd.Append("SELECT");
-
-            bool bColFirst = true;
-            string strWork = string.Empty;
-            foreach (var gender in Enum.GetValues(typeof(TableColumn)))
+                return strcmd.ToString();
+            }
+            catch (Exception ex)
             {
-                strWork = gender.ToString();
-                if (!bColFirst) strcmd.Append(",");
-                if (strWork.Equals("EntryDate") || strWork.Equals("UpdateDate"))
-                {
-                    strcmd.AppendFormat(" DATE_FORMAT({0}, '%Y/%m/%d %H:%i:%s')", strWork);
-                }
-                else if (strWork.Equals("CreateDate") || strWork.Equals("LastRowStringDate")
-                        || strWork.Equals("PrintoutDate") || strWork.Equals("OrderDate"))
-                {
-                    strcmd.AppendFormat(" DATE_FORMAT({0}, '%Y/%m/%d')", strWork);
-                }
-                else
-                {
-                    strcmd.AppendFormat(" {0}", strWork);
-                }
-                bColFirst = false;
+                logger.ErrorFormat("システムエラー：{0}：{1}：{2}", CommonMotions.GetMethodName(2), ex.Message, strcmd.ToString());
+                return string.Empty;
             }
-
-            strcmd.Append(" FROM PurchaseOrder");
-
-            return strcmd.ToString();
         }
         #endregion
 
@@ -254,9 +280,9 @@
                 strcmd.AppendFormat(",{0}", work.CompletionPaymentDays);                // 引渡し時の支払日数
                 strcmd.AppendFormat(",{0}", work.CompletionPaymentPrice);               // 引渡し時の支払金額
                 strcmd.AppendFormat(",{0}", work.LeadEngineerCode);                     // 主任技術者コード
-                strcmd.AppendFormat(",'{0}'", work.LeadEngineerName);                   // 主任技術者名
+                strcmd.AppendFormat(",{0}", SeparateString(work.LeadEngineerName));     // 主任技術者名
                 strcmd.AppendFormat(",{0}", work.SafetyOfficerCode);                    // 安全管理者コード
-                strcmd.AppendFormat(",'{0}'", work.SafetyOfficerName);                  // 安全管理者名
+                strcmd.AppendFormat(",{0}", SeparateString(work.SafetyOfficerName));    // 安全管理者名
                 strcmd.AppendFormat(",{0}", work.WorkersCount);                         // 作業員数
                 strcmd.AppendFormat(",STR_TO_DATE('{0}','%Y/%m/%d')", work.PrintoutDate.ToShortDateString());   // 印刷年月日
                 strcmd.AppendFormat(",{0}", work.RePrintFlag);                          // 再印刷可能フラグ
@@ -337,9 +363,9 @@
                     strcmd.AppendFormat(",{0}", work.CompletionPaymentDays);                // 引渡し時の支払日数
                     strcmd.AppendFormat(",{0}", work.CompletionPaymentPrice);               // 引渡し時の支払金額
                     strcmd.AppendFormat(",{0}", work.LeadEngineerCode);                     // 主任技術者コード
-                    strcmd.AppendFormat(",'{0}'", work.LeadEngineerName);                   // 主任技術者名
+                    strcmd.AppendFormat(",{0}", SeparateString(work.LeadEngineerName));     // 主任技術者名
                     strcmd.AppendFormat(",{0}", work.SafetyOfficerCode);                    // 安全管理者コード
-                    strcmd.AppendFormat(",'{0}'", work.SafetyOfficerName);                  // 安全管理者名
+                    strcmd.AppendFormat(",{0}", SeparateString(work.SafetyOfficerName));    // 安全管理者名
                     strcmd.AppendFormat(",{0}", work.WorkersCount);                         // 作業員数
                     strcmd.AppendFormat(",STR_TO_DATE('{0}','%Y/%m/%d')", work.PrintoutDate.ToShortDateString());   // 印刷年月日
                     strcmd.AppendFormat(",{0}", work.RePrintFlag);                          // 再印刷可能フラグ
@@ -415,9 +441,9 @@
                 strcmd.AppendFormat(",CompletionPaymentPrice = {0}", data.CompletionPaymentPrice);          // 引渡し時の支払金額
 
                 strcmd.AppendFormat(",LeadEngineerCode = {0}", data.LeadEngineerCode);                      // 主任技術者コード
-                strcmd.AppendFormat(",LeadEngineerName = '{0}'", data.LeadEngineerName);                    // 主任技術者名
+                strcmd.AppendFormat(",LeadEngineerName = {0}", SeparateString(data.LeadEngineerName));      // 主任技術者名
                 strcmd.AppendFormat(",SafetyOfficerCode = {0}", data.SafetyOfficerCode);                    // 安全管理者コード
-                strcmd.AppendFormat(",SafetyOfficerName = '{0}'", data.SafetyOfficerName);                  // 安全管理者名
+                strcmd.AppendFormat(",SafetyOfficerName = {0}", SeparateString(data.SafetyOfficerName));    // 安全管理者名
                 strcmd.AppendFormat(",WorkersCount = {0}", data.WorkersCount);                              // 作業員数
                 strcmd.AppendFormat(",PrintoutDate = STR_TO_DATE('{0}','%Y/%m/%d')", data.PrintoutDate.ToShortDateString());// 印刷年月日
                 strcmd.AppendFormat(",RePrintFlag = {0}", data.RePrintFlag);                                // 再印刷可能フラグ
@@ -551,13 +577,13 @@
                         strcmd.AppendFormat(" LeadEngineerCode = {0}", ((int)value).ToString());
                         break;
                     case (int)TableColumn.LeadEngineerName:         // 主任技術者名
-                        strcmd.AppendFormat(" LeadEngineerName = '{0}'", value.ToString());
+                        strcmd.AppendFormat(" LeadEngineerName = {0}", SeparateString(value.ToString()));
                         break;
                     case (int)TableColumn.SafetyOfficerCode:        // 安全管理者コード
                         strcmd.AppendFormat(" SafetyOfficerCode = {0}", ((int)value).ToString());
                         break;
                     case (int)TableColumn.SafetyOfficerName:        // 安全管理者名
-                        strcmd.AppendFormat(" SafetyOfficerName = '{0}'", value.ToString());
+                        strcmd.AppendFormat(" SafetyOfficerName = {0}", SeparateString(value.ToString()));
                         break;
                     case (int)TableColumn.WorkersCount:             // 作業員数
                         strcmd.AppendFormat(" WorkersCount = {0}", ((int)value).ToString());
Index: trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOPurchaseOrderDetail.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOPurchaseOrderDetail.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOPurchaseOrderDetail.cs	(revision 484)
@@ -67,6 +67,44 @@
 
         #endregion
 
+        #region テーブルのフィールドリストを作成する
+        /// <summary>
+        /// テーブルのフィールドリストを作成する
+        /// </summary>
+        /// <returns></returns>
+        public static string CreateFieldNameList(string strAlias = "")
+        {
+            StringBuilder strcmd = new StringBuilder();
+            try
+            {
+                strcmd.Append(" ");
+                bool bColFirst = true;
+                string strWork = string.Empty;
+                foreach (var gender in Enum.GetValues(typeof(TableColumn)))
+                {
+                    strWork = gender.ToString();
+                    if (!bColFirst) strcmd.Append(",");
+                    if (strWork.Equals("EntryDate") || strWork.Equals("UpdateDate"))
+                    {
+                        strcmd.AppendFormat(" DATE_FORMAT({0}{1}, '%Y/%m/%d %H:%i:%s') As {1}", strAlias, strWork);
+                    }
+                    else
+                    {
+                        strcmd.AppendFormat(" {0}{1}", strAlias, strWork);
+                    }
+                    bColFirst = false;
+                }
+
+                return strcmd.ToString();
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("システムエラー：{0}：{1}：{2}", CommonMotions.GetMethodName(2), ex.Message, strcmd.ToString());
+                return string.Empty;
+            }
+        }
+        #endregion
+
         #region SELECT　SQL作成
         /// <summary>
         /// SQL作成
@@ -73,31 +111,18 @@
         /// </summary>
         private string CreateSelectSQL()
         {
-            // SQL作成（DateTime型が変換できないのでCharに変換しておく）
             StringBuilder strcmd = new StringBuilder();
+            try
+            {
+                strcmd.AppendFormat("SELECT {0} FROM PurchaseOrderDetail", CreateFieldNameList());
 
-            strcmd.Append("SELECT");
-            strcmd.Append("  ConstructionCode");	    // 工事コード
-            strcmd.Append(", SeqNo");                   // 注文書枝番
-            strcmd.Append(", GroupCount");              // グループ番号
-            strcmd.Append(", LineCount");               // 行番号
-            strcmd.Append(", ComponentCode");           // 構成キー
-            strcmd.Append(", ItemCode");		        // 工種キー
-            strcmd.Append(", FirstString");             // 工種品名
-            strcmd.Append(", SecondString");            // 内容内訳
-            strcmd.Append(", UnitCount");		        // 数量
-            strcmd.Append(", UnitName");		        // 単位
-            strcmd.Append(", UnitPrice");		        // 単価
-            strcmd.Append(", OrdersLinePrice");		    // 金額
-            strcmd.Append(", SourceCode");              // 台帳工事番号
-            strcmd.Append(", SourceDetailCnt");	        // 台帳明細番号
-            strcmd.Append(", DataTypeFlag");            // 明細行データタイプフラグ
-            strcmd.Append(", StatutoryWelfareRate");    // 法定福利費比率
-            strcmd.Append(", DATE_FORMAT(EntryDate, '%Y/%m/%d %H:%i:%s')");
-            strcmd.Append(", DATE_FORMAT(UpdateDate, '%Y/%m/%d %H:%i:%s')");
-            strcmd.Append(" FROM PurchaseOrderDetail");
-
-            return strcmd.ToString();
+                return strcmd.ToString();
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("システムエラー：{0}：{1}：{2}", CommonMotions.GetMethodName(2), ex.Message, strcmd.ToString());
+                return string.Empty;
+            }
         }
         #endregion
 
@@ -211,10 +236,10 @@
                 strcmd.AppendFormat(", {0}", work.LineCount);               // 行番号
                 strcmd.AppendFormat(", {0}", work.ComponentCode);           // 構成キー
                 strcmd.AppendFormat(", {0}", work.ItemCode);		        // 工種キー
-                strcmd.AppendFormat(",'{0}'", work.FirstString);            // 工種・品名
-                strcmd.AppendFormat(",'{0}'", work.SecondString);           // 内容内訳
+                strcmd.AppendFormat(", {0}", SeparateString(work.FirstString));     // 工種・品名
+                strcmd.AppendFormat(", {0}", SeparateString(work.SecondString));    // 内容内訳
                 strcmd.AppendFormat(", {0}", work.UnitCount);		        // 数量
-                strcmd.AppendFormat(",'{0}'", work.UnitName);		        // 単位
+                strcmd.AppendFormat(", {0}", SeparateString(work.UnitName));		// 単位
                 strcmd.AppendFormat(", {0}", work.UnitPrice);		        // 単価
                 strcmd.AppendFormat(", {0}", work.OrdersLinePrice);         // 金額
                 strcmd.AppendFormat(", {0}", work.SourceCode);              // 台帳工事番号
@@ -273,10 +298,10 @@
                     strcmd.AppendFormat(", {0}", work.LineCount);               // 行番号
                     strcmd.AppendFormat(", {0}", work.ComponentCode);           // 構成キー
                     strcmd.AppendFormat(", {0}", work.ItemCode);		        // 工種キー
-                    strcmd.AppendFormat(",'{0}'", work.FirstString);            // 工種・品名
-                    strcmd.AppendFormat(",'{0}'", work.SecondString);           // 内容内訳
+                    strcmd.AppendFormat(", {0}", SeparateString(work.FirstString));     // 工種・品名
+                    strcmd.AppendFormat(", {0}", SeparateString(work.SecondString));    // 内容内訳
                     strcmd.AppendFormat(", {0}", work.UnitCount);		        // 数量
-                    strcmd.AppendFormat(",'{0}'", work.UnitName);		        // 単位
+                    strcmd.AppendFormat(", {0}", SeparateString(work.UnitName));	    // 単位
                     strcmd.AppendFormat(", {0}", work.UnitPrice);		        // 単価
                     strcmd.AppendFormat(", {0}", work.OrdersLinePrice);         // 金額
                     strcmd.AppendFormat(", {0}", work.SourceCode);              // 台帳工事番号
@@ -327,10 +352,10 @@
                 strcmd.AppendFormat(", LineCount = {0}", data.LineCount);                       // 行番号
                 strcmd.AppendFormat(", ComponentCode = {0}", data.ComponentCode);               // 構成キー
                 strcmd.AppendFormat(", ItemCode = {0}", data.ItemCode);		                    // 工種キー
-                strcmd.AppendFormat(", FirstString = '{0}'", data.FirstString);                 // 工種・品名
-                strcmd.AppendFormat(", SecondString = '{0}'", data.SecondString);               // 内容内訳
+                strcmd.AppendFormat(", FirstString = {0}", SeparateString(data.FirstString));   // 工種・品名
+                strcmd.AppendFormat(", SecondString = {0}", SeparateString(data.SecondString)); // 内容内訳
                 strcmd.AppendFormat(", UnitCount = {0}", data.UnitCount);		                // 数量
-                strcmd.AppendFormat(", UnitName = '{0}'", data.UnitName);		                // 単位
+                strcmd.AppendFormat(", UnitName = {0}", SeparateString(data.UnitName));		    // 単位
                 strcmd.AppendFormat(", UnitPrice = {0}", data.UnitPrice);		                // 単価
                 strcmd.AppendFormat(", OrdersLinePrice = {0}", data.OrdersLinePrice);		    // 金額
                 strcmd.AppendFormat(", SourceCode = {0}", data.SourceCode);                     // 台帳工事番号
@@ -414,16 +439,16 @@
                         strcmd.AppendFormat(" ItemCode = {0}", ((int)value).ToString());
                         break;
                     case (int)TableColumn.FirstString:      // 工種・品名
-                        strcmd.AppendFormat(" FirstString = '{0}'", value);
+                        strcmd.AppendFormat(" FirstString = {0}", SeparateString(value.ToString()));
                         break;
                     case (int)TableColumn.SecondString:     // 内容内訳
-                        strcmd.AppendFormat(" SecondString = '{0}'", value);
+                        strcmd.AppendFormat(" SecondString = {0}", SeparateString(value.ToString()));
                         break;
                     case (int)TableColumn.UnitCount:		// 数量
                         strcmd.AppendFormat(" UnitCount = {0}", ((double)value).ToString());
                         break;
                     case (int)TableColumn.UnitName:		    // 単位
-                        strcmd.AppendFormat(" UnitName = '{0}'", value);
+                        strcmd.AppendFormat(" UnitName = {0}", SeparateString(value.ToString()));
                         break;
                     case (int)TableColumn.UnitPrice:		// 単価
                         strcmd.AppendFormat(" UnitPrice = {0}", ((int)value).ToString());
Index: trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IORemInvoiceData.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IORemInvoiceData.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IORemInvoiceData.cs	(revision 484)
@@ -201,7 +201,7 @@
                 strcmd.AppendFormat(" {0}", data.InvoiceNo);
                 strcmd.AppendFormat(", {0}", data.RemPerson);
                 strcmd.AppendFormat(", DATE('{0}')", data.RemDate.ToShortDateString());
-                strcmd.AppendFormat(",'{0}'", data.RemComment);
+                strcmd.AppendFormat(", {0}", SeparateString(data.RemComment));
 
                 strcmd.Append(", NOW()");
                 strcmd.Append(", NOW()");
@@ -249,7 +249,7 @@
                     strcmd.AppendFormat(" {0}", work.InvoiceNo);
                     strcmd.AppendFormat(", {0}", work.RemPerson);
                     strcmd.AppendFormat(", {0}", work.RemDate);
-                    strcmd.AppendFormat(",'{0}'", work.RemComment);
+                    strcmd.AppendFormat(", {0}", SeparateString(work.RemComment));
 
                     strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.EntryDate);
                     strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.UpdateDate);
@@ -290,7 +290,7 @@
                 strcmd.AppendFormat(" InvoiceNo = {0}", data.InvoiceNo);
                 strcmd.AppendFormat(", RemPerson = {0}", data.RemPerson);
                 strcmd.AppendFormat(", RemDate = {0}", data.RemDate);
-                strcmd.AppendFormat(", RemComment = '{0}'", data.RemComment);
+                strcmd.AppendFormat(", RemComment = {0}", SeparateString(data.RemComment));
 
                 strcmd.Append(", UpdateDate = NOW()");
 
Index: trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IORemoveRequest.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IORemoveRequest.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IORemoveRequest.cs	(revision 484)
@@ -171,7 +171,7 @@
                 strcmd.AppendFormat(" {0}", data.RemoveNo);
                 strcmd.AppendFormat(", {0}", data.RemoveDate);
                 strcmd.AppendFormat(", {0}", data.RemovePersonCode);
-                strcmd.AppendFormat(",'{0}'", data.RemoveComment);
+                strcmd.AppendFormat(", {0}", SeparateString(data.RemoveComment));
 
                 strcmd.AppendFormat(", {0}", data.RequestNo);
                 strcmd.AppendFormat(", {0}", data.ReqConstructionCode);
@@ -180,13 +180,13 @@
                 strcmd.AppendFormat(", {0}", data.RequestMonth);
                 strcmd.AppendFormat(", {0}", data.OrderersDivision);
                 strcmd.AppendFormat(", {0}", data.OrderersCode);
-                strcmd.AppendFormat(",'{0}'", data.OrderersName);
-                strcmd.AppendFormat(",'{0}'", data.ReqConstructionName);
+                strcmd.AppendFormat(", {0}", SeparateString(data.OrderersName));
+                strcmd.AppendFormat(", {0}", SeparateString(data.ReqConstructionName));
                 strcmd.AppendFormat(", {0}", data.RequestTotalAmount);
                 strcmd.AppendFormat(", {0}", data.RequestAmount);
                 strcmd.AppendFormat(", {0}", data.TaxAmount);
                 strcmd.AppendFormat(", {0}", data.UnpaidAmount);
-                strcmd.AppendFormat(",'{0}'", data.Note);    
+                strcmd.AppendFormat(", {0}", SeparateString(data.Note));
                 strcmd.AppendFormat(", {0}", data.AssignedFlg);
                 strcmd.AppendFormat(", {0}", data.InvoiceNo);
 
@@ -223,7 +223,7 @@
                 strcmd.AppendFormat(" RemoveNo = {0}", data.RemoveNo);
                 strcmd.AppendFormat(", RemoveDate = {0}", data.RemoveDate);
                 strcmd.AppendFormat(", RemovePersonCode = {0}", data.RemovePersonCode);
-                strcmd.AppendFormat(", RemoveComment = '{0}'", data.RemoveComment);
+                strcmd.AppendFormat(", RemoveComment = {0}", SeparateString(data.RemoveComment));
 
                 strcmd.AppendFormat(", ReqConstructionCode = {0}", data.ReqConstructionCode);
                 strcmd.AppendFormat(", OrderNo = {0}", data.OrderNo);
@@ -231,15 +231,15 @@
 
                 strcmd.AppendFormat(", OrderersDivision = {0}", data.OrderersDivision);
                 strcmd.AppendFormat(", OrderersCode = {0}", data.OrderersCode);
-                strcmd.AppendFormat(", OrderersName = '{0}'", data.OrderersName);
+                strcmd.AppendFormat(", OrderersName = {0}", SeparateString(data.OrderersName));
 
 
-                strcmd.AppendFormat(", ReqConstructionName = '{0}'", data.ReqConstructionName);
+                strcmd.AppendFormat(", ReqConstructionName = {0}", SeparateString(data.ReqConstructionName));
                 strcmd.AppendFormat(", RequestTotalAmount = {0}", data.RequestTotalAmount);
                 strcmd.AppendFormat(", RequestAmount = {0}", data.RequestAmount);
                 strcmd.AppendFormat(", TaxAmount = {0}", data.TaxAmount);
                 strcmd.AppendFormat(", UnpaidAmount = {0}", data.UnpaidAmount);
-                strcmd.AppendFormat(", Note = '{0}'", data.Note);
+                strcmd.AppendFormat(", Note = {0}", SeparateString(data.Note));
                 
                 strcmd.AppendFormat(", AssignedFlg = {0}", data.AssignedFlg);
                 strcmd.AppendFormat(", InvoiceNo = {0}", data.InvoiceNo);
Index: trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IORequestData.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IORequestData.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IORequestData.cs	(revision 484)
@@ -170,24 +170,24 @@
                 strcmd.Append("INSERT INTO RequestData");
                 strcmd.Append(" VALUES (");
 
-                strcmd.AppendFormat(" {0}", data.RequestNo.ToString());
+                strcmd.AppendFormat(" {0}", data.RequestNo);
 
-                strcmd.AppendFormat(", {0}", data.MainConstructionCode.ToString());
-                strcmd.AppendFormat(", '{0}'", data.ConstructionName.ToString());
+                strcmd.AppendFormat(", {0}", data.MainConstructionCode);
+                strcmd.AppendFormat(", {0}", SeparateString(data.ConstructionName));
 
-                strcmd.AppendFormat(", {0}", data.ContractAmount.ToString());
-                strcmd.AppendFormat(", {0}", data.PaidAmount.ToString());
-                strcmd.AppendFormat(", {0}", data.RequestAmount0.ToString());
-                strcmd.AppendFormat(", {0}", data.RequestAmount1.ToString());
-                strcmd.AppendFormat(", {0}", data.RequestAmount2.ToString());
-                strcmd.AppendFormat(", {0}", data.RequestAmount3.ToString());
-                strcmd.AppendFormat(", {0}", data.RequestAmount4.ToString());
-                strcmd.AppendFormat(", {0}", data.RequestAmount5.ToString());
-                strcmd.AppendFormat(", {0}", data.RequestAmount6.ToString());
-                strcmd.AppendFormat(", {0}", data.UnclaimedAmount.ToString());
-                strcmd.AppendFormat(", {0}", data.UnpaidAmount.ToString());
-                strcmd.AppendFormat(", {0}", data.TaxAmount.ToString());
-                strcmd.AppendFormat(", '{0}'", data.Note.ToString());
+                strcmd.AppendFormat(", {0}", data.ContractAmount);
+                strcmd.AppendFormat(", {0}", data.PaidAmount);
+                strcmd.AppendFormat(", {0}", data.RequestAmount0);
+                strcmd.AppendFormat(", {0}", data.RequestAmount1);
+                strcmd.AppendFormat(", {0}", data.RequestAmount2);
+                strcmd.AppendFormat(", {0}", data.RequestAmount3);
+                strcmd.AppendFormat(", {0}", data.RequestAmount4);
+                strcmd.AppendFormat(", {0}", data.RequestAmount5);
+                strcmd.AppendFormat(", {0}", data.RequestAmount6);
+                strcmd.AppendFormat(", {0}", data.UnclaimedAmount);
+                strcmd.AppendFormat(", {0}", data.UnpaidAmount);
+                strcmd.AppendFormat(", {0}", data.TaxAmount);
+                strcmd.AppendFormat(", {0}", SeparateString(data.Note));
 
                 strcmd.Append(", NOW()");
                 strcmd.Append(", NOW()");
@@ -222,22 +222,22 @@
 
                 strcmd.Append(" SET");
 
-                strcmd.AppendFormat(" ConstructionName = '{0}'", data.ConstructionName.ToString());
-                strcmd.AppendFormat(",ContractAmount = {0}", data.ContractAmount.ToString());
-                strcmd.AppendFormat(",PaidAmount = {0}", data.PaidAmount.ToString());
+                strcmd.AppendFormat(" ConstructionName = {0}", SeparateString(data.ConstructionName));
+                strcmd.AppendFormat(",ContractAmount = {0}", data.ContractAmount);
+                strcmd.AppendFormat(",PaidAmount = {0}", data.PaidAmount);
 
-                strcmd.AppendFormat(",RequestAmount0 = {0}", data.RequestAmount0.ToString());
-                strcmd.AppendFormat(",RequestAmount1 = {0}", data.RequestAmount1.ToString());
-                strcmd.AppendFormat(",RequestAmount2 = {0}", data.RequestAmount2.ToString());
-                strcmd.AppendFormat(",RequestAmount3 = {0}", data.RequestAmount3.ToString());
-                strcmd.AppendFormat(",RequestAmount4 = {0}", data.RequestAmount4.ToString());
-                strcmd.AppendFormat(",RequestAmount5 = {0}", data.RequestAmount5.ToString());
-                strcmd.AppendFormat(",RequestAmount6 = {0}", data.RequestAmount6.ToString());
+                strcmd.AppendFormat(",RequestAmount0 = {0}", data.RequestAmount0);
+                strcmd.AppendFormat(",RequestAmount1 = {0}", data.RequestAmount1);
+                strcmd.AppendFormat(",RequestAmount2 = {0}", data.RequestAmount2);
+                strcmd.AppendFormat(",RequestAmount3 = {0}", data.RequestAmount3);
+                strcmd.AppendFormat(",RequestAmount4 = {0}", data.RequestAmount4);
+                strcmd.AppendFormat(",RequestAmount5 = {0}", data.RequestAmount5);
+                strcmd.AppendFormat(",RequestAmount6 = {0}", data.RequestAmount6);
 
-                strcmd.AppendFormat(",UnclaimedAmount = {0}", data.UnclaimedAmount.ToString());
-                strcmd.AppendFormat(",UnpaidAmount = {0}", data.UnpaidAmount.ToString());
-                strcmd.AppendFormat(",TaxAmount = {0}", data.TaxAmount.ToString());
-                strcmd.AppendFormat(",Note = '{0}'", data.Note.ToString());
+                strcmd.AppendFormat(",UnclaimedAmount = {0}", data.UnclaimedAmount);
+                strcmd.AppendFormat(",UnpaidAmount = {0}", data.UnpaidAmount);
+                strcmd.AppendFormat(",TaxAmount = {0}", data.TaxAmount);
+                strcmd.AppendFormat(",Note = {0}", SeparateString(data.Note));
 
                 strcmd.Append(", UpdateDate = NOW()");
 
Index: trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IORequestDataDetail.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IORequestDataDetail.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IORequestDataDetail.cs	(revision 484)
@@ -191,15 +191,15 @@
 
                 strcmd.Append(" SET");
 
-                strcmd.AppendFormat(" ConstructionKind = '{0}'", data.ConstructionKind.ToString());
-                strcmd.AppendFormat(",RequestAmount = {0}", data.RequestAmount.ToString());
-                strcmd.AppendFormat(",TaxAmount = {0}", data.TaxAmount.ToString());
+                strcmd.AppendFormat(" ConstructionKind = {0}", data.ConstructionKind);
+                strcmd.AppendFormat(",RequestAmount = {0}", data.RequestAmount);
+                strcmd.AppendFormat(",TaxAmount = {0}", data.TaxAmount);
 
                 strcmd.Append(", UpdateDate = NOW()");
 
-                strcmd.AppendFormat(" Where RequestNo = {0}", data.RequestNo.ToString());
-                strcmd.AppendFormat("  And MainConstructionCode = {0}", data.MainConstructionCode.ToString());
-                strcmd.AppendFormat("  And ConstructionCode = {0} ", data.ConstructionCode.ToString());
+                strcmd.AppendFormat(" Where RequestNo = {0}", data.RequestNo);
+                strcmd.AppendFormat("  And MainConstructionCode = {0}", data.MainConstructionCode);
+                strcmd.AppendFormat("  And ConstructionCode = {0} ", data.ConstructionCode);
                 strcmd.Append(AddSQLString);
 
                 if (!ExecuteNonQuery(strcmd.ToString(), bConnect)) return false;
Index: trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IORequestHead.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IORequestHead.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IORequestHead.cs	(revision 484)
@@ -69,17 +69,17 @@
 
         #endregion
 
-        #region SELECT　SQL作成
+        #region テーブルのフィールドリストを作成する
         /// <summary>
-        /// SQL作成
+        /// テーブルのフィールドリストを作成する
         /// </summary>
-        private string CreateSelectSQL()
+        /// <returns></returns>
+        public static string CreateFieldNameList(string strAlias = "")
         {
             StringBuilder strcmd = new StringBuilder();
             try
             {
-                strcmd.Append("SELECT ");
-
+                strcmd.Append(" ");
                 bool bColFirst = true;
                 string strWork = string.Empty;
                 foreach (var gender in Enum.GetValues(typeof(NameColumn)))
@@ -88,21 +88,40 @@
                     if (!bColFirst) strcmd.Append(",");
                     if (strWork.Equals("EntryDate") || strWork.Equals("UpdateDate"))
                     {
-                        strcmd.AppendFormat(" DATE_FORMAT({0}, '%Y/%m/%d %H:%i:%s')", strWork);
+                        strcmd.AppendFormat(" DATE_FORMAT({0}{1}, '%Y/%m/%d %H:%i:%s') As {1}", strAlias, strWork);
                     }
                     else if (strWork.Equals("BillingDate") || strWork.Equals("BillConfirmDate"))
                     {
-                        strcmd.AppendFormat(" DATE_FORMAT({0}, '%Y/%m/%d')", strWork);
+                        strcmd.AppendFormat(" DATE_FORMAT({0}{1}, '%Y/%m/%d') As {1}", strAlias, strWork);
                     }
                     else
                     {
-                        strcmd.AppendFormat(" {0}", strWork);
+                        strcmd.AppendFormat(" {0}{1}", strAlias, strWork);
                     }
                     bColFirst = false;
                 }
 
-                strcmd.Append(" FROM RequestHead");
+                return strcmd.ToString();
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("システムエラー：{0}：{1}：{2}", CommonMotions.GetMethodName(2), ex.Message, strcmd.ToString());
+                return string.Empty;
+            }
+        }
+        #endregion
 
+        #region SELECT　SQL作成
+        /// <summary>
+        /// SQL作成
+        /// </summary>
+        private string CreateSelectSQL()
+        {
+            StringBuilder strcmd = new StringBuilder();
+            try
+            {
+                strcmd.AppendFormat("SELECT {0} FROM RequestHead", CreateFieldNameList());
+
                 return strcmd.ToString();
             }
             catch (Exception ex)
@@ -215,26 +234,26 @@
                 }
                 strcmd.Append(") VALUES (");
 
-                strcmd.AppendFormat(" {0}", data.RequestNo.ToString());
+                strcmd.AppendFormat(" {0}", data.RequestNo);
 
-                strcmd.AppendFormat(", {0}", data.ReqConstructionCode.ToString());
-                strcmd.AppendFormat(", {0}", data.OrderNo.ToString());
+                strcmd.AppendFormat(", {0}", data.ReqConstructionCode);
+                strcmd.AppendFormat(", {0}", data.OrderNo);
 
-                strcmd.AppendFormat(", {0}", data.RequestMonth.ToString());
-                strcmd.AppendFormat(", {0}", data.OrderersDivision.ToString());
-                strcmd.AppendFormat(", {0}", data.OrderersCode.ToString());
-                strcmd.AppendFormat(", '{0}'", data.OrderersName.ToString());
-                strcmd.AppendFormat(", '{0}'", data.ReqConstructionName.ToString());
-                strcmd.AppendFormat(", {0}", data.RequestTotalAmount.ToString());
-                strcmd.AppendFormat(", {0}", data.RequestAmount.ToString());
-                strcmd.AppendFormat(", {0}", data.TaxAmount.ToString());
-                strcmd.AppendFormat(", {0}", data.UnpaidAmount.ToString());
-                strcmd.AppendFormat(", '{0}'", data.Note.ToString());    
-                strcmd.AppendFormat(", {0}", data.AssignedFlg.ToString());
-                strcmd.AppendFormat(", {0}", data.InvoiceNo.ToString());
+                strcmd.AppendFormat(", {0}", data.RequestMonth);
+                strcmd.AppendFormat(", {0}", data.OrderersDivision);
+                strcmd.AppendFormat(", {0}", data.OrderersCode);
+                strcmd.AppendFormat(", {0}", SeparateString(data.OrderersName));
+                strcmd.AppendFormat(", {0}", SeparateString(data.ReqConstructionName));
+                strcmd.AppendFormat(", {0}", data.RequestTotalAmount);
+                strcmd.AppendFormat(", {0}", data.RequestAmount);
+                strcmd.AppendFormat(", {0}", data.TaxAmount);
+                strcmd.AppendFormat(", {0}", data.UnpaidAmount);
+                strcmd.AppendFormat(", {0}", SeparateString(data.Note));    
+                strcmd.AppendFormat(", {0}", data.AssignedFlg);
+                strcmd.AppendFormat(", {0}", data.InvoiceNo);
                 strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d')", data.BillingDate.ToShortDateString());
                 strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d')", data.BillConfirmDate.ToShortDateString());
-                strcmd.AppendFormat(", {0}", data.DeleteFlg.ToString());
+                strcmd.AppendFormat(", {0}", data.DeleteFlg);
 
                 strcmd.Append(", NOW()");
                 strcmd.Append(", NOW()");
@@ -280,26 +299,26 @@
                     if (bDataFirst) strcmd.Append(" (");
                     else strcmd.Append(", (");
 
-                    strcmd.AppendFormat(" {0}", work.RequestNo.ToString());
+                    strcmd.AppendFormat(" {0}", work.RequestNo);
 
-                    strcmd.AppendFormat(", {0}", work.ReqConstructionCode.ToString());
-                    strcmd.AppendFormat(", {0}", work.OrderNo.ToString());
+                    strcmd.AppendFormat(", {0}", work.ReqConstructionCode);
+                    strcmd.AppendFormat(", {0}", work.OrderNo);
 
-                    strcmd.AppendFormat(", {0}", work.RequestMonth.ToString());
-                    strcmd.AppendFormat(", {0}", work.OrderersDivision.ToString());
-                    strcmd.AppendFormat(", {0}", work.OrderersCode.ToString());
-                    strcmd.AppendFormat(", '{0}'", work.OrderersName.ToString());
-                    strcmd.AppendFormat(", '{0}'", work.ReqConstructionName.ToString());
-                    strcmd.AppendFormat(", {0}", work.RequestTotalAmount.ToString());
-                    strcmd.AppendFormat(", {0}", work.RequestAmount.ToString());
-                    strcmd.AppendFormat(", {0}", work.TaxAmount.ToString());
-                    strcmd.AppendFormat(", {0}", work.UnpaidAmount.ToString());
-                    strcmd.AppendFormat(", '{0}'", work.Note.ToString());
-                    strcmd.AppendFormat(", {0}", work.AssignedFlg.ToString());
-                    strcmd.AppendFormat(", {0}", work.InvoiceNo.ToString());
+                    strcmd.AppendFormat(", {0}", work.RequestMonth);
+                    strcmd.AppendFormat(", {0}", work.OrderersDivision);
+                    strcmd.AppendFormat(", {0}", work.OrderersCode);
+                    strcmd.AppendFormat(", {0}", SeparateString(work.OrderersName));
+                    strcmd.AppendFormat(", {0}", SeparateString(work.ReqConstructionName));
+                    strcmd.AppendFormat(", {0}", work.RequestTotalAmount);
+                    strcmd.AppendFormat(", {0}", work.RequestAmount);
+                    strcmd.AppendFormat(", {0}", work.TaxAmount);
+                    strcmd.AppendFormat(", {0}", work.UnpaidAmount);
+                    strcmd.AppendFormat(", {0}", SeparateString(work.Note));
+                    strcmd.AppendFormat(", {0}", work.AssignedFlg);
+                    strcmd.AppendFormat(", {0}", work.InvoiceNo);
                     strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d')", work.BillingDate.ToShortDateString());
                     strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d')", work.BillConfirmDate.ToShortDateString());
-                    strcmd.AppendFormat(", {0}", work.DeleteFlg.ToString());
+                    strcmd.AppendFormat(", {0}", work.DeleteFlg);
 
                     strcmd.Append(", NOW()");
                     strcmd.Append(", NOW()");
@@ -338,27 +357,27 @@
 
                 strcmd.Append(" SET");
 
-                strcmd.AppendFormat(" ReqConstructionCode = {0}", data.ReqConstructionCode.ToString());
-                strcmd.AppendFormat(",OrderNo = {0}", data.OrderNo.ToString());
-                strcmd.AppendFormat(",RequestMonth = {0}", data.RequestMonth.ToString());
+                strcmd.AppendFormat(" ReqConstructionCode = {0}", data.ReqConstructionCode);
+                strcmd.AppendFormat(",OrderNo = {0}", data.OrderNo);
+                strcmd.AppendFormat(",RequestMonth = {0}", data.RequestMonth);
 
-                strcmd.AppendFormat(",OrderersDivision = {0}", data.OrderersDivision.ToString());
-                strcmd.AppendFormat(",OrderersCode = {0}", data.OrderersCode.ToString());
-                strcmd.AppendFormat(",OrderersName = '{0}'", data.OrderersName.ToString());
+                strcmd.AppendFormat(",OrderersDivision = {0}", data.OrderersDivision);
+                strcmd.AppendFormat(",OrderersCode = {0}", data.OrderersCode);
+                strcmd.AppendFormat(",OrderersName = {0}", SeparateString(data.OrderersName));
 
 
-                strcmd.AppendFormat(",ReqConstructionName = '{0}'", data.ReqConstructionName.ToString());
-                strcmd.AppendFormat(",RequestTotalAmount = {0}", data.RequestTotalAmount.ToString());
-                strcmd.AppendFormat(",RequestAmount = {0}", data.RequestAmount.ToString());
-                strcmd.AppendFormat(",TaxAmount = {0}", data.TaxAmount.ToString());
-                strcmd.AppendFormat(",UnpaidAmount = {0}", data.UnpaidAmount.ToString());
-                strcmd.AppendFormat(",Note = '{0}'", data.Note.ToString());
+                strcmd.AppendFormat(",ReqConstructionName = {0}", SeparateString(data.ReqConstructionName));
+                strcmd.AppendFormat(",RequestTotalAmount = {0}", data.RequestTotalAmount);
+                strcmd.AppendFormat(",RequestAmount = {0}", data.RequestAmount);
+                strcmd.AppendFormat(",TaxAmount = {0}", data.TaxAmount);
+                strcmd.AppendFormat(",UnpaidAmount = {0}", data.UnpaidAmount);
+                strcmd.AppendFormat(",Note = {0}", SeparateString(data.Note));
                 
-                strcmd.AppendFormat(",AssignedFlg = {0}", data.AssignedFlg.ToString());
-                strcmd.AppendFormat(",InvoiceNo = {0}", data.InvoiceNo.ToString());
+                strcmd.AppendFormat(",AssignedFlg = {0}", data.AssignedFlg);
+                strcmd.AppendFormat(",InvoiceNo = {0}", data.InvoiceNo);
                 strcmd.AppendFormat(",BillingDate = STR_TO_DATE('{0}','%Y/%m/%d')", data.BillingDate.ToShortDateString());
                 strcmd.AppendFormat(",BillConfirmDate = STR_TO_DATE('{0}','%Y/%m/%d')", data.BillConfirmDate.ToShortDateString());
-                strcmd.AppendFormat(",DeleteFlg = {0}", data.DeleteFlg.ToString());
+                strcmd.AppendFormat(",DeleteFlg = {0}", data.DeleteFlg);
 
                 strcmd.Append(", UpdateDate = NOW()");
 
@@ -437,10 +456,10 @@
                         strcmd.AppendFormat(" OrderersCode = {0}", (int)value);
                         break;
                     case (int)NameColumn.OrderersName:
-                        strcmd.AppendFormat(" OrderersName = '{0}'", value.ToString());
+                        strcmd.AppendFormat(" OrderersName = {0}", SeparateString(value.ToString()));
                         break;
                     case (int)NameColumn.ReqConstructionName:
-                        strcmd.AppendFormat(" ReqConstructionName = '{0}'", value.ToString());
+                        strcmd.AppendFormat(" ReqConstructionName = {0}", SeparateString(value.ToString()));
                         break;
                     case (int)NameColumn.RequestTotalAmount:
                         strcmd.AppendFormat(" RequestTotalAmount = {0}", (long)value);
@@ -455,7 +474,7 @@
                         strcmd.AppendFormat(" UnpaidAmount = {0}", (long)value);
                         break;
                     case (int)NameColumn.Note:
-                        strcmd.AppendFormat(" Note = '{0}'", value.ToString());
+                        strcmd.AppendFormat(" Note = {0}", SeparateString(value.ToString()));
                         break;
                     case (int)NameColumn.AssignedFlg:
                         strcmd.AppendFormat(" AssignedFlg = {0}", (long)value);
Index: trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IORequestOrderDate.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IORequestOrderDate.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IORequestOrderDate.cs	(revision 484)
@@ -53,6 +53,48 @@
 
         #endregion
 
+        #region テーブルのフィールドリストを作成する
+        /// <summary>
+        /// テーブルのフィールドリストを作成する
+        /// </summary>
+        /// <returns></returns>
+        public static string CreateFieldNameList(string strAlias = "")
+        {
+            StringBuilder strcmd = new StringBuilder();
+            try
+            {
+                strcmd.Append(" ");
+                bool bColFirst = true;
+                string strWork = string.Empty;
+                foreach (var gender in Enum.GetValues(typeof(TableColumn)))
+                {
+                    strWork = gender.ToString();
+                    if (!bColFirst) strcmd.Append(",");
+                    if (strWork.Equals("EntryDate") || strWork.Equals("UpdateDate"))
+                    {
+                        strcmd.AppendFormat(" DATE_FORMAT({0}{1}, '%Y/%m/%d %H:%i:%s') As {1}", strAlias, strWork);
+                    }
+                    else if (strWork.Equals("SendDate"))
+                    {
+                        strcmd.AppendFormat(" DATE({0}{1}) As {1}", strAlias, strWork);
+                    }
+                    else
+                    {
+                        strcmd.AppendFormat(" {0}{1}", strAlias, strWork);
+                    }
+                    bColFirst = false;
+                }
+
+                return strcmd.ToString();
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("システムエラー：{0}：{1}：{2}", CommonMotions.GetMethodName(2), ex.Message, strcmd.ToString());
+                return string.Empty;
+            }
+        }
+        #endregion
+
         #region 請求書日付データ検索文字列作成
         /// <summary>
         /// 請求書日付データ検索文字列作成
@@ -61,16 +103,17 @@
         private string CreateSelectSQL()
         {
             StringBuilder strcmd = new StringBuilder();
+            try
+            {
+                strcmd.AppendFormat("SELECT {0} FROM RequestOrderDate", CreateFieldNameList());
 
-            strcmd.Append("SELECT");
-            strcmd.Append(" ConstructionCode");                                  // 工事番号
-            strcmd.Append(", InvoiceNo");                                        // 請求書No
-            strcmd.Append(", DATE_FORMAT(SendDate, '%Y/%m/%d')");                // 請求書発給郵送日
-            strcmd.Append(", DATE_FORMAT(EntryDate, '%Y/%m/%d %H:%i:%s')");
-            strcmd.Append(", DATE_FORMAT(UpdateDate, '%Y/%m/%d %H:%i:%s')");
-            strcmd.Append(" FROM RequestOrderDate");
-
-            return strcmd.ToString();
+                return strcmd.ToString();
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("システムエラー：{0}：{1}：{2}", CommonMotions.GetMethodName(2), ex.Message, strcmd.ToString());
+                return string.Empty;
+            }
         }
         #endregion
 
Index: trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOSFPData.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOSFPData.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOSFPData.cs	(revision 484)
@@ -201,7 +201,7 @@
                     strcmd.AppendFormat(", {0}", work.DataCount);
                     strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.RequestDate);
                     strcmd.AppendFormat(", {0}", work.PersonCode);
-                    strcmd.AppendFormat(",'{0}'", work.StringValue);
+                    strcmd.AppendFormat(", {0}", SeparateString(work.StringValue));
                     strcmd.AppendFormat(", {0}", work.OrderNo);
 
                     strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.EntryDate);
@@ -252,7 +252,7 @@
                 strcmd.AppendFormat(", {0}", work.DataCount);
                 strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.RequestDate);
                 strcmd.AppendFormat(", {0}", work.PersonCode);
-                strcmd.AppendFormat(",'{0}'", work.StringValue);
+                strcmd.AppendFormat(", {0}", SeparateString(work.StringValue));
                 strcmd.AppendFormat(", {0}", work.OrderNo);
 
                 strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.EntryDate);
@@ -292,7 +292,7 @@
                 strcmd.AppendFormat(", DataCount = {0}", data.DataCount);
                 strcmd.AppendFormat(", RequestDate = STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", data.RequestDate);
                 strcmd.AppendFormat(", PersonCode = {0}", data.PersonCode);
-                strcmd.AppendFormat(", StringValue = '{0}'", data.StringValue);
+                strcmd.AppendFormat(", StringValue = {0}", SeparateString(data.StringValue));
                 strcmd.AppendFormat(", OrderNo = {0}", data.OrderNo);
 
                 strcmd.Append(", UpdateDate = NOW()");
Index: trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOSalesGraphData.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOSalesGraphData.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOSalesGraphData.cs	(revision 484)
@@ -16,7 +16,7 @@
 namespace ProcessManagement.DB.IOAccess
 {
     /// <summary>
-    /// 行動予定アクセスクラス
+    /// 売上グラフデータアクセスクラス
     /// </summary>
     public class IOSalesGraphData : MySqlProcess
     {
@@ -29,7 +29,7 @@
 
         #region 定数
         /// <summary>
-        /// 行動予定フィールド並び
+        /// 売上グラフデータフィールド並び
         /// </summary>
         public enum NameColumn
         {
@@ -61,10 +61,10 @@
 
         #region パブリックメソッド
         /// <summary>
-        /// 行動予定検索
+        /// 売上グラフデータ検索
         /// </summary>
         /// <param name="AddSQLString">検索条件SQL文字列</param>
-        /// <param name="data">行動予定データ</param>
+        /// <param name="data">売上グラフデータデータ</param>
         /// <returns>true：成功 false：失敗</returns>
         public bool SelectAction(string AddSQLString, ref List<SalesGraphData> data, bool bConnect = true)
         {
@@ -112,9 +112,9 @@
         }
 
         /// <summary>
-        /// 行動予定追加
+        /// 売上グラフデータ追加
         /// </summary>
-        /// <param name="data">行動予定データ</param>
+        /// <param name="data">売上グラフデータデータ</param>
         /// <returns>true：成功 false：失敗</returns>
         public bool InsertOneAction(SalesGraphData data, bool bConnect = true)
         {
@@ -136,7 +136,7 @@
                 strcmd.AppendFormat(",{0}", data.ConstructionPeriod.ToString());
                 strcmd.AppendFormat(",DATE_FORMAT('{0}','%Y/%m/%d')", data.SalesDataDays.ToShortDateString());
                 strcmd.AppendFormat(",{0}", data.DisplayOrder.ToString());
-                strcmd.AppendFormat(",'{0}'", data.DataName);
+                strcmd.AppendFormat(",{0}", SeparateString(data.DataName));
                 strcmd.AppendFormat(",{0}", data.SalesAmount.ToString());
                 strcmd.AppendFormat(",{0}", data.AdministrativeExpense.ToString());
                 strcmd.AppendFormat(",{0}", data.GrossProfit.ToString());
@@ -182,7 +182,7 @@
                     strcmd.AppendFormat(",{0}", work.ConstructionPeriod.ToString());
                     strcmd.AppendFormat(",DATE_FORMAT('{0}','%Y/%m/%d')", work.SalesDataDays.ToShortDateString());
                     strcmd.AppendFormat(",{0}", work.DisplayOrder.ToString());
-                    strcmd.AppendFormat(",'{0}'", work.DataName);
+                    strcmd.AppendFormat(",{0}", SeparateString(work.DataName));
                     strcmd.AppendFormat(",{0}", work.SalesAmount.ToString());
                     strcmd.AppendFormat(",{0}", work.AdministrativeExpense.ToString());
                     strcmd.AppendFormat(",{0}", work.GrossProfit.ToString());
@@ -207,10 +207,10 @@
         }
 
         /// <summary>
-        /// 行動予定更新
+        /// 売上グラフデータ更新
         /// </summary>
         /// <param name="AddSQLString">更新条件SQL文字列</param>
-        /// <param name="data">行動予定データ</param>
+        /// <param name="data">売上グラフデータデータ</param>
         /// <returns>true：成功 false：失敗</returns>
         public bool UpdateAction(string AddSQLString, SalesGraphData data, bool bConnect = true)
         {
@@ -226,7 +226,7 @@
                 strcmd.AppendFormat(",ConstructionPeriod = {0}", data.ConstructionPeriod.ToString());
                 strcmd.AppendFormat(",SalesDataDays = STR_TO_DATE('{0}','%Y/%m/%d')", data.SalesDataDays.ToShortDateString());
                 strcmd.AppendFormat(",DisplayOrder = {0}", data.DisplayOrder.ToString());
-                strcmd.AppendFormat(",DataName = '{0}'", data.DataName);
+                strcmd.AppendFormat(",DataName = {0}", SeparateString(data.DataName));
                 strcmd.AppendFormat(",SalesAmount = {0}", data.SalesAmount.ToString());
                 strcmd.AppendFormat(",AdministrativeExpense = {0}", data.AdministrativeExpense.ToString());
                 strcmd.AppendFormat(",GrossProfit = {0}", data.GrossProfit.ToString());
@@ -248,10 +248,10 @@
 
 
         /// <summary>
-        /// 行動予定削除
+        /// 売上グラフデータ削除
         /// </summary>
         /// <param name="AddSQLString">削除条件SQL文字列</param>
-        /// <param name="data">行動予定データ</param>
+        /// <param name="data">売上グラフデータデータ</param>
         /// <returns>true：成功 false：失敗</returns>
         public bool DeleteAction(string AddSQLString, bool bConnect = true)
         {
@@ -287,10 +287,10 @@
                 wrk.SalesDataDays = DateTime.Parse(objwrk[(int)NameColumn.SalesDataDays].ToString());
                 wrk.DisplayOrder = int.Parse(objwrk[(int)NameColumn.DisplayOrder].ToString());
                 wrk.DataName = objwrk[(int)NameColumn.DataName].ToString();
-                wrk.SalesAmount = int.Parse(objwrk[(int)NameColumn.SalesAmount].ToString());
-                wrk.AdministrativeExpense = int.Parse(objwrk[(int)NameColumn.AdministrativeExpense].ToString());
-                wrk.GrossProfit = int.Parse(objwrk[(int)NameColumn.GrossProfit].ToString());
-                wrk.NetIncome = int.Parse(objwrk[(int)NameColumn.NetIncome].ToString());
+                wrk.SalesAmount = long.Parse(objwrk[(int)NameColumn.SalesAmount].ToString());
+                wrk.AdministrativeExpense = long.Parse(objwrk[(int)NameColumn.AdministrativeExpense].ToString());
+                wrk.GrossProfit = long.Parse(objwrk[(int)NameColumn.GrossProfit].ToString());
+                wrk.NetIncome = long.Parse(objwrk[(int)NameColumn.NetIncome].ToString());
 
                 wrk.EntryDate = DateTime.Parse(objwrk[(int)NameColumn.ENTRYDATE].ToString());
                 wrk.UpdateDate = DateTime.Parse(objwrk[(int)NameColumn.UPDATEDATE].ToString());
Index: trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOSubConMailQueue.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOSubConMailQueue.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOSubConMailQueue.cs	(revision 484)
@@ -199,15 +199,15 @@
                 }
                 strcmd.Append(") VALUES (");
 
-                strcmd.AppendFormat("  {0}", data.SeqNo);           // 連番
-                strcmd.AppendFormat(", {0}", data.CompanyCode);     // 協力会社コード
-                strcmd.AppendFormat(", {0}", data.MailDelivery);    // 送信先設定番号
-                strcmd.AppendFormat(", '{0}'", data.Argument0);     // メール挿入文字０
-                strcmd.AppendFormat(", '{0}'", data.Argument1);     // メール挿入文字１
-                strcmd.AppendFormat(", '{0}'", data.Argument2);     // メール挿入文字２
-                strcmd.AppendFormat(", '{0}'", data.Argument3);     // メール挿入文字３
-                strcmd.AppendFormat(", '{0}'", data.Argument4);     // メール挿入文字４
-                strcmd.AppendFormat(", {0}", data.Status);          // ステータス
+                strcmd.AppendFormat("  {0}", data.SeqNo);                       // 連番
+                strcmd.AppendFormat(", {0}", data.CompanyCode);                 // 協力会社コード
+                strcmd.AppendFormat(", {0}", data.MailDelivery);                // 送信先設定番号
+                strcmd.AppendFormat(", {0}", SeparateString(data.Argument0));   // メール挿入文字０
+                strcmd.AppendFormat(", {0}", SeparateString(data.Argument1));   // メール挿入文字１
+                strcmd.AppendFormat(", {0}", SeparateString(data.Argument2));   // メール挿入文字２
+                strcmd.AppendFormat(", {0}", SeparateString(data.Argument3));   // メール挿入文字３
+                strcmd.AppendFormat(", {0}", SeparateString(data.Argument4));   // メール挿入文字４
+                strcmd.AppendFormat(", {0}", data.Status);                      // ステータス
 
                 strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", data.EntryDate);
                 strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", data.UpdateDate);
@@ -253,15 +253,15 @@
                     if (bDataFirst) strcmd.Append(" (");
                     else strcmd.Append(", (");
 
-                    strcmd.AppendFormat("  {0}", work.SeqNo);           // 連番
-                    strcmd.AppendFormat(", {0}", work.CompanyCode);     // 協力会社コード
-                    strcmd.AppendFormat(", {0}", work.MailDelivery);    // 送信先設定番号
-                    strcmd.AppendFormat(", '{0}'", work.Argument0);     // メール挿入文字０
-                    strcmd.AppendFormat(", '{0}'", work.Argument1);     // メール挿入文字１
-                    strcmd.AppendFormat(", '{0}'", work.Argument2);     // メール挿入文字２
-                    strcmd.AppendFormat(", '{0}'", work.Argument3);     // メール挿入文字３
-                    strcmd.AppendFormat(", '{0}'", work.Argument4);     // メール挿入文字４
-                    strcmd.AppendFormat(", {0}", work.Status);          // ステータス
+                    strcmd.AppendFormat("  {0}", work.SeqNo);                       // 連番
+                    strcmd.AppendFormat(", {0}", work.CompanyCode);                 // 協力会社コード
+                    strcmd.AppendFormat(", {0}", work.MailDelivery);                // 送信先設定番号
+                    strcmd.AppendFormat(", {0}", SeparateString(work.Argument0));   // メール挿入文字０
+                    strcmd.AppendFormat(", {0}", SeparateString(work.Argument1));   // メール挿入文字１
+                    strcmd.AppendFormat(", {0}", SeparateString(work.Argument2));   // メール挿入文字２
+                    strcmd.AppendFormat(", {0}", SeparateString(work.Argument3));   // メール挿入文字３
+                    strcmd.AppendFormat(", {0}", SeparateString(work.Argument4));   // メール挿入文字４
+                    strcmd.AppendFormat(", {0}", work.Status);                      // ステータス
 
                     strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.EntryDate);
                     strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.UpdateDate);
@@ -298,15 +298,15 @@
 
                 strcmd.Append(" SET");
 
-                strcmd.AppendFormat(" SeqNo = {0}", data.SeqNo);                    // 連番
-                strcmd.AppendFormat(", CompanyCode = {0}", data.CompanyCode);       // 協力会社コード
-                strcmd.AppendFormat(", MailDelivery = {0}", data.MailDelivery);     // 送信先設定番号
-                strcmd.AppendFormat(", Argument0 = '{0}'", data.Argument0);         // メール挿入文字０
-                strcmd.AppendFormat(", Argument1 = '{0}'", data.Argument1);         // メール挿入文字１
-                strcmd.AppendFormat(", Argument2 = '{0}'", data.Argument2);         // メール挿入文字２
-                strcmd.AppendFormat(", Argument3 = '{0}'", data.Argument3);         // メール挿入文字３
-                strcmd.AppendFormat(", Argument4 = '{0}'", data.Argument4);         // メール挿入文字４
-                strcmd.AppendFormat(", Status = {0}", data.Status);                 // ステータス
+                strcmd.AppendFormat(" SeqNo = {0}", data.SeqNo);                                // 連番
+                strcmd.AppendFormat(", CompanyCode = {0}", data.CompanyCode);                   // 協力会社コード
+                strcmd.AppendFormat(", MailDelivery = {0}", data.MailDelivery);                 // 送信先設定番号
+                strcmd.AppendFormat(", Argument0 = {0}", SeparateString(data.Argument0));       // メール挿入文字０
+                strcmd.AppendFormat(", Argument1 = {0}", SeparateString(data.Argument1));       // メール挿入文字１
+                strcmd.AppendFormat(", Argument2 = {0}", SeparateString(data.Argument2));       // メール挿入文字２
+                strcmd.AppendFormat(", Argument3 = {0}", SeparateString(data.Argument3));       // メール挿入文字３
+                strcmd.AppendFormat(", Argument4 = {0}", SeparateString(data.Argument4));       // メール挿入文字４
+                strcmd.AppendFormat(", Status = {0}", data.Status);                             // ステータス
 
                 strcmd.Append(", UpdateDate = NOW()");
                 strcmd.Append(AddSQLString);
Index: trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOSubConstrJobItemRegist.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOSubConstrJobItemRegist.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOSubConstrJobItemRegist.cs	(revision 484)
@@ -55,6 +55,48 @@
 
         #endregion
 
+        #region テーブルのフィールドリストを作成する
+        /// <summary>
+        /// テーブルのフィールドリストを作成する
+        /// </summary>
+        /// <returns></returns>
+        public static string CreateFieldNameList(string strAlias = "")
+        {
+            StringBuilder strcmd = new StringBuilder();
+            try
+            {
+                strcmd.Append(" ");
+                bool bColFirst = true;
+                string strWork = string.Empty;
+                foreach (var gender in Enum.GetValues(typeof(TableColumn)))
+                {
+                    strWork = gender.ToString();
+                    if (!bColFirst) strcmd.Append(",");
+                    if (strWork.Equals("EntryDate") || strWork.Equals("UpdateDate"))
+                    {
+                        strcmd.AppendFormat(" DATE_FORMAT({0}{1}, '%Y/%m/%d %H:%i:%s') As {1}", strAlias, strWork);
+                    }
+                    else if (strWork.Equals("CreateDate"))
+                    {
+                        strcmd.AppendFormat(" DATE({0}{1}) As {1}", strAlias, strWork);
+                    }
+                    else
+                    {
+                        strcmd.AppendFormat(" {0}{1}", strAlias, strWork);
+                    }
+                    bColFirst = false;
+                }
+
+                return strcmd.ToString();
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("システムエラー：{0}：{1}：{2}", CommonMotions.GetMethodName(2), ex.Message, strcmd.ToString());
+                return string.Empty;
+            }
+        }
+        #endregion
+
         #region 協力業者施工工種登録申請データ検索SQL作成
         /// <summary>
         /// 協力業者施工工種登録申請データ検索SQL作成
@@ -64,19 +106,18 @@
         /// <returns>true：成功 false：失敗</returns>
         private string CreateSelectSQL()
         {
-            // SQL作成（DateTime型が変換できないのでCharに変換しておく）
             StringBuilder strcmd = new StringBuilder();
-            strcmd.Append("SELECT");
-            strcmd.Append("  PersonCode");
-            strcmd.Append(", DATE_FORMAT(CreateDate,'%Y/%m/%d')");
-            strcmd.Append(", SeqNo");
-            strcmd.Append(", DisplayOrder");
-            strcmd.Append(", ItemCode");
-            strcmd.Append(", DATE_FORMAT(EntryDate, '%Y/%m/%d %H:%i:%s')");
-            strcmd.Append(", DATE_FORMAT(UpdateDate, '%Y/%m/%d %H:%i:%s')");
-            strcmd.Append(" FROM SubConstrJobItemRegist");
+            try
+            {
+                strcmd.AppendFormat("SELECT {0} FROM SubConstrJobItemRegist", CreateFieldNameList());
 
-            return strcmd.ToString();
+                return strcmd.ToString();
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("システムエラー：{0}：{1}：{2}", CommonMotions.GetMethodName(2), ex.Message, strcmd.ToString());
+                return string.Empty;
+            }
         }
         #endregion
 
Index: trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOSubConstrJobLinkRegist.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOSubConstrJobLinkRegist.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOSubConstrJobLinkRegist.cs	(revision 484)
@@ -55,6 +55,48 @@
 
         #endregion
 
+        #region テーブルのフィールドリストを作成する
+        /// <summary>
+        /// テーブルのフィールドリストを作成する
+        /// </summary>
+        /// <returns></returns>
+        public static string CreateFieldNameList(string strAlias = "")
+        {
+            StringBuilder strcmd = new StringBuilder();
+            try
+            {
+                strcmd.Append(" ");
+                bool bColFirst = true;
+                string strWork = string.Empty;
+                foreach (var gender in Enum.GetValues(typeof(TableColumn)))
+                {
+                    strWork = gender.ToString();
+                    if (!bColFirst) strcmd.Append(",");
+                    if (strWork.Equals("EntryDate") || strWork.Equals("UpdateDate"))
+                    {
+                        strcmd.AppendFormat(" DATE_FORMAT({0}{1}, '%Y/%m/%d %H:%i:%s') As {1}", strAlias, strWork);
+                    }
+                    else if (strWork.Equals("CreateDate"))
+                    {
+                        strcmd.AppendFormat(" DATE({0}{1}) As {1}", strAlias, strWork);
+                    }
+                    else
+                    {
+                        strcmd.AppendFormat(" {0}{1}", strAlias, strWork);
+                    }
+                    bColFirst = false;
+                }
+
+                return strcmd.ToString();
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("システムエラー：{0}：{1}：{2}", CommonMotions.GetMethodName(2), ex.Message, strcmd.ToString());
+                return string.Empty;
+            }
+        }
+        #endregion
+
         #region 協力業者職種リンク登録申請データ検索SQL作成
         /// <summary>
         /// 協力業者職種リンク登録申請データ検索作成
@@ -62,19 +104,18 @@
         /// <returns></returns>
         private string CreateSelectSQL()
         {
-            // SQL作成（DateTime型が変換できないのでCharに変換しておく）
             StringBuilder strcmd = new StringBuilder();
-            strcmd.Append("SELECT");
-            strcmd.Append("  PersonCode");
-            strcmd.Append(", DATE_FORMAT(CreateDate,'%Y/%m/%d')");
-            strcmd.Append(", SeqNo");
-            strcmd.Append(", DisplayOrder");
-            strcmd.Append(", JobCategoryCode");
-            strcmd.Append(", DATE_FORMAT(EntryDate, '%Y/%m/%d %H:%i:%s')");
-            strcmd.Append(", DATE_FORMAT(UpdateDate, '%Y/%m/%d %H:%i:%s')");
-            strcmd.Append(" FROM SubConstrJobLinkRegist");
+            try
+            {
+                strcmd.AppendFormat("SELECT {0} FROM SubConstrJobLinkRegist", CreateFieldNameList());
 
-            return strcmd.ToString();
+                return strcmd.ToString();
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("システムエラー：{0}：{1}：{2}", CommonMotions.GetMethodName(2), ex.Message, strcmd.ToString());
+                return string.Empty;
+            }
         }
         #endregion
 
Index: trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOSubConstrRegist.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOSubConstrRegist.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOSubConstrRegist.cs	(revision 484)
@@ -77,6 +77,48 @@
 
         #endregion
 
+        #region テーブルのフィールドリストを作成する
+        /// <summary>
+        /// テーブルのフィールドリストを作成する
+        /// </summary>
+        /// <returns></returns>
+        public static string CreateFieldNameList(string strAlias = "")
+        {
+            StringBuilder strcmd = new StringBuilder();
+            try
+            {
+                strcmd.Append(" ");
+                bool bColFirst = true;
+                string strWork = string.Empty;
+                foreach (var gender in Enum.GetValues(typeof(TableColumn)))
+                {
+                    strWork = gender.ToString();
+                    if (!bColFirst) strcmd.Append(",");
+                    if (strWork.Equals("EntryDate") || strWork.Equals("UpdateDate"))
+                    {
+                        strcmd.AppendFormat(" DATE_FORMAT({0}{1}, '%Y/%m/%d %H:%i:%s') As {1}", strAlias, strWork);
+                    }
+                    else if (strWork.Equals("CreateDate") || strWork.Equals("StartDate"))
+                    {
+                        strcmd.AppendFormat(" DATE_FORMAT({0}{1}, '%Y/%m/%d') As {1}", strAlias, strWork);
+                    }
+                    else
+                    {
+                        strcmd.AppendFormat(" {0}{1}", strAlias, strWork);
+                    }
+                    bColFirst = false;
+                }
+
+                return strcmd.ToString();
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("システムエラー：{0}：{1}：{2}", CommonMotions.GetMethodName(2), ex.Message, strcmd.ToString());
+                return string.Empty;
+            }
+        }
+        #endregion
+
         #region 協力業者登録申請データ検索文字列作成
         /// <summary>
         /// 協力業者登録申請データ検索文字列作成
@@ -87,33 +129,17 @@
         private string CreateSelectSQL()
         {
             StringBuilder strcmd = new StringBuilder();
+            try
+            {
+                strcmd.AppendFormat("SELECT {0} FROM SubConstrRegist", CreateFieldNameList());
 
-            strcmd.Append("SELECT");
-
-            bool bColFirst = true;
-            string strWork = string.Empty;
-            foreach (var gender in Enum.GetValues(typeof(TableColumn)))
+                return strcmd.ToString();
+            }
+            catch (Exception ex)
             {
-                strWork = gender.ToString();
-                if (!bColFirst) strcmd.Append(",");
-                if (strWork.Equals("EntryDate") || strWork.Equals("UpdateDate"))
-                {
-                    strcmd.AppendFormat(" DATE_FORMAT({0}, '%Y/%m/%d %H:%i:%s')", strWork);
-                }
-                else if (strWork.Equals("CreateDate") || strWork.Equals("StartDate"))
-                {
-                    strcmd.AppendFormat(" DATE_FORMAT({0}, '%Y/%m/%d')", strWork);
-                }
-                else
-                {
-                    strcmd.AppendFormat(" {0}", strWork);
-                }
-                bColFirst = false;
+                logger.ErrorFormat("システムエラー：{0}：{1}：{2}", CommonMotions.GetMethodName(2), ex.Message, strcmd.ToString());
+                return string.Empty;
             }
-
-            strcmd.Append(" FROM SubConstrRegist");
-
-            return strcmd.ToString();
         }
         #endregion
 
@@ -229,23 +255,23 @@
                 strcmd.AppendFormat(", {0}", data.SourceCode);
                 strcmd.AppendFormat(", {0}", data.PetitionPeriod);
 
-                strcmd.AppendFormat(", '{0}'", data.CorporateStatusName);
+                strcmd.AppendFormat(", {0}", SeparateString(data.CorporateStatusName));
                 strcmd.AppendFormat(", {0}", data.CorporateStatusPoint);
-                strcmd.AppendFormat(", '{0}'", data.CompanyName);
-                strcmd.AppendFormat(", '{0}'", data.CEOPositionName);
-                strcmd.AppendFormat(", '{0}'", data.CEOName);
-                strcmd.AppendFormat(", '{0}'", data.ContactPersonName);
-                strcmd.AppendFormat(", '{0}'", data.ZipCode);
-                strcmd.AppendFormat(", '{0}'", data.Address1);
-                strcmd.AppendFormat(", '{0}'", data.Address2);
-                strcmd.AppendFormat(", '{0}'", data.Address3);
-                strcmd.AppendFormat(", '{0}'", data.CellPhoneNumber);
-                strcmd.AppendFormat(", '{0}'", data.MailAddress);
-                strcmd.AppendFormat(", '{0}'", data.PhoneNumber);
-                strcmd.AppendFormat(", '{0}'", data.FaxNumber);
-                strcmd.AppendFormat(", '{0}'", data.JapaneseSyllabary);
+                strcmd.AppendFormat(", {0}", SeparateString(data.CompanyName));
+                strcmd.AppendFormat(", {0}", SeparateString(data.CEOPositionName));
+                strcmd.AppendFormat(", {0}", SeparateString(data.CEOName));
+                strcmd.AppendFormat(", {0}", SeparateString(data.ContactPersonName));
+                strcmd.AppendFormat(", {0}", SeparateString(data.ZipCode));
+                strcmd.AppendFormat(", {0}", SeparateString(data.Address1));
+                strcmd.AppendFormat(", {0}", SeparateString(data.Address2));
+                strcmd.AppendFormat(", {0}", SeparateString(data.Address3));
+                strcmd.AppendFormat(", {0}", SeparateString(data.CellPhoneNumber));
+                strcmd.AppendFormat(", {0}", SeparateString(data.MailAddress));
+                strcmd.AppendFormat(", {0}", SeparateString(data.PhoneNumber));
+                strcmd.AppendFormat(", {0}", SeparateString(data.FaxNumber));
+                strcmd.AppendFormat(", {0}", SeparateString(data.JapaneseSyllabary));
                 strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d')", data.StartDate.ToShortDateString());
-                strcmd.AppendFormat(", '{0}'", data.Note);
+                strcmd.AppendFormat(", {0}", SeparateString(data.Note));
                 strcmd.AppendFormat(", {0} ", data.labourKind);
                 strcmd.AppendFormat(", {0}", data.OrderDate);
                 strcmd.AppendFormat(", {0}", data.OrderNo);
@@ -301,23 +327,23 @@
                     strcmd.AppendFormat(", {0}", work.SourceCode);
                     strcmd.AppendFormat(", {0}", work.PetitionPeriod);
 
-                    strcmd.AppendFormat(", '{0}'", work.CorporateStatusName);
+                    strcmd.AppendFormat(", {0}", SeparateString(work.CorporateStatusName));
                     strcmd.AppendFormat(", {0}", work.CorporateStatusPoint);
-                    strcmd.AppendFormat(", '{0}'", work.CompanyName);
-                    strcmd.AppendFormat(", '{0}'", work.CEOPositionName);
-                    strcmd.AppendFormat(", '{0}'", work.CEOName);
-                    strcmd.AppendFormat(", '{0}'", work.ContactPersonName);
-                    strcmd.AppendFormat(", '{0}'", work.ZipCode);
-                    strcmd.AppendFormat(", '{0}'", work.Address1);
-                    strcmd.AppendFormat(", '{0}'", work.Address2);
-                    strcmd.AppendFormat(", '{0}'", work.Address3);
-                    strcmd.AppendFormat(", '{0}'", work.CellPhoneNumber);
-                    strcmd.AppendFormat(", '{0}'", work.MailAddress);
-                    strcmd.AppendFormat(", '{0}'", work.PhoneNumber);
-                    strcmd.AppendFormat(", '{0}'", work.FaxNumber);
-                    strcmd.AppendFormat(", '{0}'", work.JapaneseSyllabary);
+                    strcmd.AppendFormat(", {0}", SeparateString(work.CompanyName));
+                    strcmd.AppendFormat(", {0}", SeparateString(work.CEOPositionName));
+                    strcmd.AppendFormat(", {0}", SeparateString(work.CEOName));
+                    strcmd.AppendFormat(", {0}", SeparateString(work.ContactPersonName));
+                    strcmd.AppendFormat(", {0}", SeparateString(work.ZipCode));
+                    strcmd.AppendFormat(", {0}", SeparateString(work.Address1));
+                    strcmd.AppendFormat(", {0}", SeparateString(work.Address2));
+                    strcmd.AppendFormat(", {0}", SeparateString(work.Address3));
+                    strcmd.AppendFormat(", {0}", SeparateString(work.CellPhoneNumber));
+                    strcmd.AppendFormat(", {0}", SeparateString(work.MailAddress));
+                    strcmd.AppendFormat(", {0}", SeparateString(work.PhoneNumber));
+                    strcmd.AppendFormat(", {0}", SeparateString(work.FaxNumber));
+                    strcmd.AppendFormat(", {0}", SeparateString(work.JapaneseSyllabary));
                     strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d')", work.StartDate.ToShortDateString());
-                    strcmd.AppendFormat(", '{0}'", work.Note);
+                    strcmd.AppendFormat(", {0}", SeparateString(work.Note));
                     strcmd.AppendFormat(", {0} ", work.labourKind.ToString());
                     strcmd.AppendFormat(", {0}", work.OrderDate);
                     strcmd.AppendFormat(", {0}", work.OrderNo);
@@ -365,23 +391,23 @@
                 strcmd.AppendFormat(", SourceCode = {0}", data.SourceCode);
                 strcmd.AppendFormat(", PetitionPeriod = {0}", data.PetitionPeriod);
 
-                strcmd.AppendFormat(", CorporateStatusName = '{0}'", data.CorporateStatusName);
+                strcmd.AppendFormat(", CorporateStatusName = {0}", SeparateString(data.CorporateStatusName));
                 strcmd.AppendFormat(", CorporateStatusPoint = {0}", data.CorporateStatusPoint);
-                strcmd.AppendFormat(", CompanyName = '{0}'", data.CompanyName);
-                strcmd.AppendFormat(", CEOPositionName = '{0}'", data.CEOPositionName);
-                strcmd.AppendFormat(", CEOName = '{0}'", data.CEOName);
-                strcmd.AppendFormat(", ContactPersonName = '{0}'", data.ContactPersonName);
-                strcmd.AppendFormat(", ZipCode = '{0}'", data.ZipCode);
-                strcmd.AppendFormat(", Address1 = '{0}'", data.Address1);
-                strcmd.AppendFormat(", Address2 = '{0}'", data.Address2);
-                strcmd.AppendFormat(", Address3 = '{0}'", data.Address3);
-                strcmd.AppendFormat(", CellPhoneNumber = '{0}'", data.CellPhoneNumber);
-                strcmd.AppendFormat(", MailAddress = '{0}'", data.MailAddress);
-                strcmd.AppendFormat(", PhoneNumber = '{0}'", data.PhoneNumber);
-                strcmd.AppendFormat(", FaxNumber = '{0}'", data.FaxNumber);
-                strcmd.AppendFormat(", JapaneseSyllabary = '{0}'", data.JapaneseSyllabary);
+                strcmd.AppendFormat(", CompanyName = {0}", SeparateString(data.CompanyName));
+                strcmd.AppendFormat(", CEOPositionName = {0}", SeparateString(data.CEOPositionName));
+                strcmd.AppendFormat(", CEOName = {0}", SeparateString(data.CEOName));
+                strcmd.AppendFormat(", ContactPersonName = {0}", SeparateString(data.ContactPersonName));
+                strcmd.AppendFormat(", ZipCode = {0}", SeparateString(data.ZipCode));
+                strcmd.AppendFormat(", Address1 = {0}", SeparateString(data.Address1));
+                strcmd.AppendFormat(", Address2 = {0}", SeparateString(data.Address2));
+                strcmd.AppendFormat(", Address3 = {0}", SeparateString(data.Address3));
+                strcmd.AppendFormat(", CellPhoneNumber = {0}", SeparateString(data.CellPhoneNumber));
+                strcmd.AppendFormat(", MailAddress = {0}", SeparateString(data.MailAddress));
+                strcmd.AppendFormat(", PhoneNumber = {0}", SeparateString(data.PhoneNumber));
+                strcmd.AppendFormat(", FaxNumber = {0}", SeparateString(data.FaxNumber));
+                strcmd.AppendFormat(", JapaneseSyllabary = {0}", SeparateString(data.JapaneseSyllabary));
                 strcmd.AppendFormat(", StartDate = STR_TO_DATE('{0}','%Y/%m/%d')", data.StartDate.ToShortDateString());
-                strcmd.AppendFormat(", Note = '{0}'", data.Note);
+                strcmd.AppendFormat(", Note = {0}", SeparateString(data.Note));
                 strcmd.AppendFormat(", labourKind = {0}", data.labourKind);
                 strcmd.AppendFormat(", OrderDate = {0}", data.OrderDate);
                 strcmd.AppendFormat(", OrderNo = {0}", data.OrderNo);
@@ -466,55 +492,55 @@
                         strcmd.AppendFormat(", PetitionPeriod = {0}", (int)value);
                         break;
                     case (int)TableColumn.CorporateStatusName:
-                        strcmd.AppendFormat(" CorporateStatusName = '{0}'", value.ToString());
+                        strcmd.AppendFormat(" CorporateStatusName = {0}", SeparateString(value.ToString()));
                         break;
                     case (int)TableColumn.CorporateStatusPoint:
                         strcmd.AppendFormat(" CorporateStatusPoint = {0}", (int)value);
                         break;
                     case (int)TableColumn.CompanyName:
-                        strcmd.AppendFormat(" CompanyName = '{0}'", value.ToString());
+                        strcmd.AppendFormat(" CompanyName = {0}", SeparateString(value.ToString()));
                         break;
                     case (int)TableColumn.CEOPositionName:
-                        strcmd.AppendFormat(" CEOPositionName = '{0}'", value.ToString());
+                        strcmd.AppendFormat(" CEOPositionName = {0}", SeparateString(value.ToString()));
                         break;
                     case (int)TableColumn.CEOName:
-                        strcmd.AppendFormat(" CEOName = '{0}'", value.ToString());
+                        strcmd.AppendFormat(" CEOName = {0}", SeparateString(value.ToString()));
                         break;
                     case (int)TableColumn.ContactPersonName:
-                        strcmd.AppendFormat(" ContactPersonName = '{0}'", value.ToString());
+                        strcmd.AppendFormat(" ContactPersonName = {0}", SeparateString(value.ToString()));
                         break;
                     case (int)TableColumn.ZipCode:
-                        strcmd.AppendFormat(" ZipCode = '{0}'", value.ToString());
+                        strcmd.AppendFormat(" ZipCode = {0}", SeparateString(value.ToString()));
                         break;
                     case (int)TableColumn.Address1:
-                        strcmd.AppendFormat(" Address1 = '{0}'", value.ToString());
+                        strcmd.AppendFormat(" Address1 = {0}", SeparateString(value.ToString()));
                         break;
                     case (int)TableColumn.Address2:
-                        strcmd.AppendFormat(" Address2 = '{0}'", value.ToString());
+                        strcmd.AppendFormat(" Address2 = {0}", SeparateString(value.ToString()));
                         break;
                     case (int)TableColumn.Address3:
-                        strcmd.AppendFormat(" Address3 = '{0}'", value.ToString());
+                        strcmd.AppendFormat(" Address3 = {0}", SeparateString(value.ToString()));
                         break;
                     case (int)TableColumn.CellPhoneNumber:
-                        strcmd.AppendFormat(" CellPhoneNumber = '{0}'", value.ToString());
+                        strcmd.AppendFormat(" CellPhoneNumber = {0}", SeparateString(value.ToString()));
                         break;
                     case (int)TableColumn.MailAddress:
-                        strcmd.AppendFormat(" MailAddress = '{0}'", value.ToString());
+                        strcmd.AppendFormat(" MailAddress = {0}", SeparateString(value.ToString()));
                         break;
                     case (int)TableColumn.PhoneNumber:
-                        strcmd.AppendFormat(" PhoneNumber = '{0}'", value.ToString());
+                        strcmd.AppendFormat(" PhoneNumber = {0}", SeparateString(value.ToString()));
                         break;
                     case (int)TableColumn.FaxNumber:
-                        strcmd.AppendFormat(" FaxNumber = '{0}'", value.ToString());
+                        strcmd.AppendFormat(" FaxNumber = {0}", SeparateString(value.ToString()));
                         break;
                     case (int)TableColumn.JapaneseSyllabary:
-                        strcmd.AppendFormat(" JapaneseSyllabary = '{0}'", value.ToString());
+                        strcmd.AppendFormat(" JapaneseSyllabary = {0}", SeparateString(value.ToString()));
                         break;
                     case (int)TableColumn.StartDate:
                         strcmd.AppendFormat(" StartDate = STR_TO_DATE('{0}','%Y/%m/%d')", ((DateTime)value).ToShortDateString());
                         break;
                     case (int)TableColumn.Note:
-                        strcmd.AppendFormat(" Note = '{0}'", value.ToString());
+                        strcmd.AppendFormat(" Note = {0}", SeparateString(value.ToString()));
                         break;
                     case (int)TableColumn.labourKind:
                         strcmd.AppendFormat(" labourKind = {0}", ((int)value).ToString());
Index: trunk/src/ProcessManagement/ProcessManagement/DB/MySql/MySqlProcess.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/DB/MySql/MySqlProcess.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/DB/MySql/MySqlProcess.cs	(revision 484)
@@ -12,6 +12,7 @@
 using log4net.Appender;
 using log4net.Repository.Hierarchy;
 
+using ProcessManagement.Common;
 using ProcessManagement.DB.Core;
 
 namespace ProcessManagement.DB.MySql
@@ -21,6 +22,11 @@
     /// </summary>
     public class MySqlProcess : ABaseDBProcess
     {
+        #region ログ使用定義
+        //log4netログを使用する
+        private static readonly log4net.ILog logger = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
+        #endregion
+
         #region コンストラクタ
         /// <summary>
         /// コンストラクタ。
@@ -33,6 +39,8 @@
         #endregion
 
         #region メソッド
+
+        #region Connectionを取得。
         /// <summary>
         /// Connectionを取得。
         /// </summary>
@@ -42,7 +50,66 @@
         {
             return new MySqlConnection(connectionString);
         }
+        #endregion
 
-        #endregion 
+        #region 文字列に対象キャラクタがあれば文字列結合関数にして返す
+        /// <summary>
+        /// 文字列に対象キャラクタがあれば文字列結合関数にして返す
+        /// </summary>
+        /// <returns></returns>
+        public string SeparateString(string TargetString)
+        {
+            try
+            {
+                // 対象キャラクタが無ければそのまま返す
+                if (TargetString.IndexOf("\'") < 0 && TargetString.IndexOf(",") < 0)
+                {
+                    return string.Format("'{0}'", TargetString);
+                }
+
+                StringBuilder strRet = new StringBuilder();
+                string[] strSplit = TargetString.Replace("\n","\\n").Split(',');
+                bool bFirst = true;
+                foreach (string CurSep in strSplit)
+                {
+                    if (strRet.Length > 0) strRet.Append(",");
+                    if (CurSep.Length == 0)
+                    {
+                        // 分割文字列が０の場合
+                        strRet.Append("','");
+                    }
+                    else
+                    {
+                        // 最初の区切り以外分割時には先頭にカンマ区切り
+                        if (!bFirst) strRet.Append("','");
+
+                        string[] strSplit2 = CurSep.Split('\'');
+                        foreach (string CurSep2 in strSplit2)
+                        {
+                            if (strRet.Length > 0) strRet.Append(",");
+                            if (CurSep2.Length == 0)
+                            {
+                                strRet.Append("'\\''");
+                            }
+                            else
+                            {
+                                strRet.AppendFormat("'{0}'", CurSep2);
+                            }
+                        }
+                    }
+                    bFirst = false;
+                }
+
+                return string.Format("CONCAT({0})", strRet.ToString());
+            }
+            catch (System.Exception ex)
+            {
+                logger.ErrorFormat("システムエラー：{0}：{1}", CommonMotions.GetMethodName(), ex.Message);
+                return TargetString;
+            }
+        }
+        #endregion
+
+        #endregion
     }
 }
Index: trunk/src/ProcessManagement/ProcessManagement/DataModel/BillingCostDataLink.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/DataModel/BillingCostDataLink.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/DataModel/BillingCostDataLink.cs	(revision 484)
@@ -9,22 +9,41 @@
     public class BillingCostDataLink
     {
         #region 定数
-
+        public enum LinkTypeDef
+        {
+            /// <summary>
+            /// 0:リンク無
+            /// </summary>
+            None = 0,
+            /// <summary>
+            /// 1;担当者購入品
+            /// </summary>
+            PersonCost,
+            /// <summary>
+            /// 2:部署出納
+            /// </summary>
+            DepAccount,
+        }
         #endregion
 
         #region メンバ変数
-        private int m_CompanyCode = 0;                  // 協力会社コード
-        private int m_TargetDate = 0;                   // 対象年月
-        private int m_SeqNoB = 0;                       // 連番
-        private int m_LineCount = 0;                    // 行番号
-        private int m_LabourKind = 0;                   // 支払業者区分
-        private int m_YearNumber = 0;                   // 年度
-        private int m_CostType = 0;                     // 出納タイプフラグ
-        private int m_TargetType = 0;                   // 先コードタイプ
-        private int m_TargetCode = 0;                   // 先コード
-        private int m_SeqNoC = 0;                       // データ番号
-        private DateTime m_EntryDate = DateTime.Now;    // 登録日付
-        private DateTime m_UpdateDate = DateTime.Now;   // 更新日付
+        private int m_CompanyCode = 0;                      // 協力会社コード
+        private int m_TargetDate = 0;                       // 対象年月
+        private int m_SeqNoB = 0;                           // 連番
+        private int m_LineCount = 0;                        // 行番号
+        private int m_LabourKind = 0;                       // 支払業者区分
+        private int m_LinkType = 0;                         // リンク先データタイプ
+        private int m_YearNumber = 0;                       // 年度
+        private int m_CostType = 0;                         // 出納タイプフラグ
+        private int m_TargetType = 0;                       // 先コードタイプ
+        private int m_TargetCode = 0;                       // 先コード
+        private int m_SeqNoC = 0;                           // データ番号
+        private int m_PersonCode = 0;                       // 担当者コード
+        private DateTime m_ActionDate = DateTime.MinValue;  // 対象日付
+        private int m_DataType = 0;                         // データ区分
+        private int m_DataAddCount = 0;                     // データ追加番号
+        private DateTime m_EntryDate = DateTime.Now;        // 登録日付
+        private DateTime m_UpdateDate = DateTime.Now;       // 更新日付
         #endregion
 
         #region コンストラクタ
@@ -76,6 +95,15 @@
         }
 
         /// <summary>
+        /// リンク先データタイプ
+        /// </summary>
+        public int LinkType
+        {
+            get { return m_LinkType; }
+            set { m_LinkType = value; }
+        }
+
+        /// <summary>
         /// 年度
         /// </summary>
         public int YearNumber
@@ -117,6 +145,39 @@
         }
 
         /// <summary>
+        /// 担当者コード
+        /// </summary>
+        public int PersonCode
+        {
+            get { return m_PersonCode; }
+            set { m_PersonCode = value; }
+        }
+        /// <summary>
+        /// 対象日付
+        /// </summary>
+        public DateTime ActionDate
+        {
+            get { return m_ActionDate; }
+            set { m_ActionDate = value; }
+        }
+        /// <summary>
+        /// データ区分
+        /// </summary>
+        public int DataType
+        {
+            get { return m_DataType; }
+            set { m_DataType = value; }
+        }
+        /// <summary>
+        /// データ追加番号
+        /// </summary>
+        public int DataAddCount
+        {
+            get { return m_DataAddCount; }
+            set { m_DataAddCount = value; }
+        }
+
+        /// <summary>
         /// 登録日付
         /// </summary>
         public DateTime EntryDate
Index: trunk/src/ProcessManagement/ProcessManagement/DataModel/CostDataOfCompensation.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/DataModel/CostDataOfCompensation.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/DataModel/CostDataOfCompensation.cs	(revision 484)
@@ -53,11 +53,11 @@
             /// </summary>
             Type2,
             /// <summary>
-            /// 3:台帳閉鎖工事
+            /// 3:自社工事
             /// </summary>
             Type3,
             /// <summary>
-            /// 4:自社工事
+            /// 4:台帳閉鎖工事
             /// </summary>
             Type4,
             /// <summary>
@@ -108,6 +108,7 @@
         private int         m_FromCodeType = 0;                 // 相手先コードタイプ
         private int         m_FromCode = 0;                     // 相手先コード
         private DateTime    m_SendDate = DateTime.Now;          // 対象日付
+        private int         m_LinkCode = 0;                     // リンク先工事コード
 
         private decimal     m_EntryPrice = 0;                   // 金額（税抜）
         private decimal     m_EntryTax = 0;                     // 金額（税込）
@@ -198,6 +199,14 @@
             set { m_SendDate = value; }
         }
         /// <summary>
+        /// リンク先工事コード
+        /// </summary>
+        public int LinkCode
+        {
+            get { return m_LinkCode; }
+            set { m_LinkCode = value; }
+        }
+        /// <summary>
         /// 金額（税抜）
         /// </summary>
         public decimal EntryPrice
@@ -276,8 +285,8 @@
                         decWork = -1;
                         break;
                     case (int)CostTypeDef.Type2: // 購入
-                    case (int)CostTypeDef.Type3: // 台帳閉鎖工事
-                    case (int)CostTypeDef.Type4: // 自社工事
+                    case (int)CostTypeDef.Type3: // 自社工事
+                    case (int)CostTypeDef.Type4: // 台帳閉鎖工事
                     case (int)CostTypeDef.Type5: // 瑕疵工事
                         break;
                 }
@@ -291,8 +300,8 @@
                     case (int)CostTypeDef.Type6: // 販売
                         break;
                     case (int)CostTypeDef.Type2: // 購入
-                    case (int)CostTypeDef.Type3: // 台帳閉鎖工事
-                    case (int)CostTypeDef.Type4: // 自社工事
+                    case (int)CostTypeDef.Type3: // 自社工事
+                    case (int)CostTypeDef.Type4: // 台帳閉鎖工事
                     case (int)CostTypeDef.Type5: // 瑕疵工事
                         decWork = -1;
                         break;
Index: trunk/src/ProcessManagement/ProcessManagement/DataModel/CostDataOfPerson.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/DataModel/CostDataOfPerson.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/DataModel/CostDataOfPerson.cs	(revision 484)
@@ -48,8 +48,30 @@
         /// </summary>
         public static readonly string[] DataNoStrArrary = new string[] { "", "交　通　費", "購入品費", "車両リース代", "駐車場・資材置き場代", "宿　泊　費", "処　分　費" };
         #endregion
+
+        #region 支払方法種別
+        /// <summary>
+        /// 支払方法種別
+        /// </summary>
+        public enum PaymentTypeDef
+        {
+            /// <summary>
+            /// 個人クレジット
+            /// </summary>
+            PersonalCredit = 0,
+            /// <summary>
+            /// 現金
+            /// </summary>
+            Cash,
+            /// <summary>
+            /// 法人クレジット
+            /// </summary>
+            CorporateCredit,
+        }
         #endregion
 
+        #endregion
+
         #region メンバ変数
         /// <summary>
         /// 担当者コード
Index: trunk/src/ProcessManagement/ProcessManagement/DataModel/DailyDataConstruction.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/DataModel/DailyDataConstruction.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/DataModel/DailyDataConstruction.cs	(revision 484)
@@ -12,17 +12,17 @@
     {
         #region メンバ変数
         /// <summary>
-        /// 作成者コード
+        /// 工事番号
         /// </summary>
-        private int m_PersonCode = 0;
+        private int m_ConstructionCode = 0;
         /// <summary>
         /// 日報作成日
         /// </summary>
         private DateTime m_DailyDataDate = DateTime.MinValue;
         /// <summary>
-        /// 工事番号
+        /// 作成者コード
         /// </summary>
-        private int m_ConstructionCode = 0;
+        private int m_PersonCode = 0;
         /// <summary>
         /// 天気
         /// </summary>
@@ -39,12 +39,12 @@
 
         #region プロパティ
         /// <summary>
-        /// 作成者コード
+        /// 工事番号
         /// </summary>
-        public int PersonCode
+        public int ConstructionCode
         {
-            get { return m_PersonCode; }
-            set { m_PersonCode = value; }
+            get { return m_ConstructionCode; }
+            set { m_ConstructionCode = value; }
         }
         /// <summary>
         /// 日報作成日
@@ -55,12 +55,12 @@
             set { m_DailyDataDate = value; }
         }
         /// <summary>
-        /// 工事番号
+        /// 作成者コード
         /// </summary>
-        public int ConstructionCode
+        public int PersonCode
         {
-            get { return m_ConstructionCode; }
-            set { m_ConstructionCode = value; }
+            get { return m_PersonCode; }
+            set { m_PersonCode = value; }
         }
         /// <summary>
         /// 天気
Index: trunk/src/ProcessManagement/ProcessManagement/DataModel/DailyDataDetail.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/DataModel/DailyDataDetail.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/DataModel/DailyDataDetail.cs	(revision 484)
@@ -12,17 +12,17 @@
     {
         #region メンバ変数
         /// <summary>
-        /// 作成者コード
+        /// 工事番号
         /// </summary>
-        private int m_PersonCode = 0;
+        private int m_ConstructionCode = 0;
         /// <summary>
         /// 日報作成日
         /// </summary>
         private DateTime m_DailyDataDate = DateTime.Now;
         /// <summary>
-        /// 工事番号
+        /// 作成者コード
         /// </summary>
-        private int m_ConstructionCode = 0;
+        private int m_PersonCode = 0;
         /// <summary>
         /// 明細行番号
         /// </summary>
@@ -67,12 +67,12 @@
 
         #region プロパティ
         /// <summary>
-        /// 作成者コード
+        /// 工事番号
         /// </summary>
-        public int PersonCode
+        public int ConstructionCode
         {
-            get { return m_PersonCode; }
-            set { m_PersonCode = value; }
+            get { return m_ConstructionCode; }
+            set { m_ConstructionCode = value; }
         }
         /// <summary>
         /// 日報作成日
@@ -83,12 +83,12 @@
             set { m_DailyDataDate = value; }
         }
         /// <summary>
-        /// 工事番号
+        /// 作成者コード
         /// </summary>
-        public int ConstructionCode
+        public int PersonCode
         {
-            get { return m_ConstructionCode; }
-            set { m_ConstructionCode = value; }
+            get { return m_PersonCode; }
+            set { m_PersonCode = value; }
         }
         /// <summary>
         /// 明細行番号
Index: trunk/src/ProcessManagement/ProcessManagement/DataModel/DailyDataField.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/DataModel/DailyDataField.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/DataModel/DailyDataField.cs	(revision 484)
@@ -12,17 +12,17 @@
     {
         #region メンバ変数
         /// <summary>
-        /// 作成者コード
+        /// 工事番号
         /// </summary>
-        private int m_PersonCode = 0;
+        private int m_ConstructionCode = 0;
         /// <summary>
         /// 日報作成日
         /// </summary>
         private DateTime m_DailyDataDate = DateTime.MinValue;
         /// <summary>
-        /// 工事番号
+        /// 作成者コード
         /// </summary>
-        private int m_ConstructionCode = 0;
+        private int m_PersonCode = 0;
         /// <summary>
         /// 明細行番号
         /// </summary>
@@ -47,12 +47,12 @@
 
         #region プロパティ
         /// <summary>
-        /// 作成者コード
+        /// 工事番号
         /// </summary>
-        public int PersonCode
+        public int ConstructionCode
         {
-            get { return m_PersonCode; }
-            set { m_PersonCode = value; }
+            get { return m_ConstructionCode; }
+            set { m_ConstructionCode = value; }
         }
         /// <summary>
         /// 日報作成日
@@ -63,12 +63,12 @@
             set { m_DailyDataDate = value; }
         }
         /// <summary>
-        /// 工事番号
+        /// 作成者コード
         /// </summary>
-        public int ConstructionCode
+        public int PersonCode
         {
-            get { return m_ConstructionCode; }
-            set { m_ConstructionCode = value; }
+            get { return m_PersonCode; }
+            set { m_PersonCode = value; }
         }
         /// <summary>
         /// 明細行番号
Index: trunk/src/ProcessManagement/ProcessManagement/DataModel/DailyDataMaterials.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/DataModel/DailyDataMaterials.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/DataModel/DailyDataMaterials.cs	(revision 484)
@@ -12,17 +12,17 @@
     {
         #region メンバ変数
         /// <summary>
-        /// 作成者コード
+        /// 工事番号
         /// </summary>
-        private int m_PersonCode = 0;
+        private int m_ConstructionCode = 0;
         /// <summary>
         /// 日報作成日
         /// </summary>
         private DateTime m_DailyDataDate = DateTime.MinValue;
         /// <summary>
-        /// 工事番号
+        /// 作成者コード
         /// </summary>
-        private int m_ConstructionCode = 0;
+        private int m_PersonCode = 0;
         /// <summary>
         /// 明細行番号
         /// </summary>
@@ -59,12 +59,12 @@
 
         #region プロパティ
         /// <summary>
-        /// 作成者コード
+        /// 工事番号
         /// </summary>
-        public int PersonCode
+        public int ConstructionCode
         {
-            get { return m_PersonCode; }
-            set { m_PersonCode = value; }
+            get { return m_ConstructionCode; }
+            set { m_ConstructionCode = value; }
         }
         /// <summary>
         /// 日報作成日
@@ -75,12 +75,12 @@
             set { m_DailyDataDate = value; }
         }
         /// <summary>
-        /// 工事番号
+        /// 作成者コード
         /// </summary>
-        public int ConstructionCode
+        public int PersonCode
         {
-            get { return m_ConstructionCode; }
-            set { m_ConstructionCode = value; }
+            get { return m_PersonCode; }
+            set { m_PersonCode = value; }
         }
         /// <summary>
         /// 明細行番号
Index: trunk/src/ProcessManagement/ProcessManagement/DataModel/DailyDataSubcontractors.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/DataModel/DailyDataSubcontractors.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/DataModel/DailyDataSubcontractors.cs	(revision 484)
@@ -12,17 +12,17 @@
     {
         #region メンバ変数
         /// <summary>
-        /// 作成者コード
+        /// 工事番号
         /// </summary>
-        private int m_PersonCode = 0;
+        private int m_ConstructionCode = 0;
         /// <summary>
         /// 日報作成日
         /// </summary>
         private DateTime m_DailyDataDate = DateTime.MinValue;
         /// <summary>
-        /// 工事番号
+        /// 作成者コード
         /// </summary>
-        private int m_ConstructionCode = 0;
+        private int m_PersonCode = 0;
         /// <summary>
         /// 明細行番号
         /// </summary>
@@ -47,12 +47,12 @@
 
         #region プロパティ
         /// <summary>
-        /// 作成者コード
+        /// 工事番号
         /// </summary>
-        public int PersonCode
+        public int ConstructionCode
         {
-            get { return m_PersonCode; }
-            set { m_PersonCode = value; }
+            get { return m_ConstructionCode; }
+            set { m_ConstructionCode = value; }
         }
         /// <summary>
         /// 日報作成日
@@ -63,12 +63,12 @@
             set { m_DailyDataDate = value; }
         }
         /// <summary>
-        /// 工事番号
+        /// 作成者コード
         /// </summary>
-        public int ConstructionCode
+        public int PersonCode
         {
-            get { return m_ConstructionCode; }
-            set { m_ConstructionCode = value; }
+            get { return m_PersonCode; }
+            set { m_PersonCode = value; }
         }
         /// <summary>
         /// 明細行番号
Index: trunk/src/ProcessManagement/ProcessManagement/DataModel/DailyDataVehicles.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/DataModel/DailyDataVehicles.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/DataModel/DailyDataVehicles.cs	(revision 484)
@@ -12,17 +12,17 @@
     {
         #region メンバ変数
         /// <summary>
-        /// 作成者コード
+        /// 工事番号
         /// </summary>
-        private int m_PersonCode = 0;
+        private int m_ConstructionCode = 0;
         /// <summary>
         /// 日報作成日
         /// </summary>
         private DateTime m_DailyDataDate = DateTime.MinValue;
         /// <summary>
-        /// 工事番号
+        /// 作成者コード
         /// </summary>
-        private int m_ConstructionCode = 0;
+        private int m_PersonCode = 0;
         /// <summary>
         /// 明細行番号
         /// </summary>
@@ -63,12 +63,12 @@
 
         #region プロパティ
         /// <summary>
-        /// 作成者コード
+        /// 工事番号
         /// </summary>
-        public int PersonCode
+        public int ConstructionCode
         {
-            get { return m_PersonCode; }
-            set { m_PersonCode = value; }
+            get { return m_ConstructionCode; }
+            set { m_ConstructionCode = value; }
         }
         /// <summary>
         /// 日報作成日
@@ -79,12 +79,12 @@
             set { m_DailyDataDate = value; }
         }
         /// <summary>
-        /// 工事番号
+        /// 作成者コード
         /// </summary>
-        public int ConstructionCode
+        public int PersonCode
         {
-            get { return m_ConstructionCode; }
-            set { m_ConstructionCode = value; }
+            get { return m_PersonCode; }
+            set { m_PersonCode = value; }
         }
         /// <summary>
         /// 明細行番号
Index: trunk/src/ProcessManagement/ProcessManagement/DataModel/OrderersMaster.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/DataModel/OrderersMaster.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/DataModel/OrderersMaster.cs	(revision 484)
@@ -52,6 +52,7 @@
         private string      m_Address3 = string.Empty;	        // 住所3
         private string      m_PhoneNumber = string.Empty;	    // 電話番号
         private string      m_FaxNumber = string.Empty;	        // FAX番号
+        private string      m_JapaneseSyllabary = string.Empty;	// 50音読み
         private string      m_MailAddress = string.Empty;	    // メールアドレス
         private string      m_note = string.Empty;	            // 備考
         private int         m_PersonCode = 0;                   // 登録担当者コード
@@ -194,6 +195,14 @@
             get { return m_FaxNumber; }
         }
         /// <summary>
+        /// 50音読み
+        /// </summary>
+        public string JapaneseSyllabary
+        {
+            get { return m_JapaneseSyllabary; }
+            set { m_JapaneseSyllabary = value; }
+        }
+        /// <summary>
         /// メールアドレス
         /// </summary>
         public string MailAddress
Index: trunk/src/ProcessManagement/ProcessManagement/DataModel/OrdersPriceData.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/DataModel/OrdersPriceData.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/DataModel/OrdersPriceData.cs	(revision 484)
@@ -18,10 +18,10 @@
         private DateTime    m_ChangeDate = DateTime.MinValue;           // 変更日
         private int         m_ChangePersonCode = 0;                     // 変更者コード
         private string      m_ChangePersonName = string.Empty;          // 変更者名
-        private int         m_BeforeValue = 0;	                        // 変更前税抜受注金額
-        private int         m_BeforeValueInTax = 0;                     //　〃　税込受注金額
-        private int         m_AfterValue = 0;                           // 変更後税抜受注金額
-        private int         m_AfterValueInTax = 0;                      // 　〃　税込受注金額
+        private long        m_BeforeValue = 0;	                        // 変更前税抜受注金額
+        private long        m_BeforeValueInTax = 0;                     //　〃　税込受注金額
+        private long        m_AfterValue = 0;                           // 変更後税抜受注金額
+        private long        m_AfterValueInTax = 0;                      // 　〃　税込受注金額
         private string      m_ChangeComment = string.Empty;             // 変更理由
 
         private DateTime    m_EntryDate = DateTime.Now;                 // 登録日付
@@ -76,7 +76,7 @@
         /// <summary>
         /// 変更前税抜受注金額
         /// </summary>
-        public int BeforeValue
+        public long BeforeValue
         {
             get { return m_BeforeValue; }
             set { m_BeforeValue = value; }
@@ -84,7 +84,7 @@
         /// <summary>
         /// 変更前税込受注金額
         /// </summary>
-        public int BeforeValueInTax
+        public long BeforeValueInTax
         {
             get { return m_BeforeValueInTax; }
             set { m_BeforeValueInTax = value; }
@@ -92,7 +92,7 @@
         /// <summary>
         /// 変更後税抜受注金額
         /// </summary>
-        public int AfterValue
+        public long AfterValue
         {
             get { return m_AfterValue; }
             set { m_AfterValue = value; }
@@ -100,7 +100,7 @@
         /// <summary>
         /// 変更後税込受注金額
         /// </summary>
-        public int AfterValueInTax
+        public long AfterValueInTax
         {
             get { return m_AfterValueInTax; }
             set { m_AfterValueInTax = value; }
Index: trunk/src/ProcessManagement/ProcessManagement/DataModel/PersonExpensesCost.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/DataModel/PersonExpensesCost.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/DataModel/PersonExpensesCost.cs	(revision 484)
@@ -30,11 +30,11 @@
         /// <summary>
         /// 経費金額
         /// </summary>
-        private int[] m_CostValue = new int[CostDataOfPerson.DataNoStrArrary.Length];
+        private long[] m_CostValue = new long[CostDataOfPerson.DataNoStrArrary.Length];
         #endregion
 
         #region コンストラクタ
-        public PersonExpensesCost(int DepartmentCode, int PersonCode, DateTime StartDate, DateTime CompDate, int[] CostValue)
+        public PersonExpensesCost(int DepartmentCode, int PersonCode, DateTime StartDate, DateTime CompDate, long[] CostValue)
         {
             m_DepartmentCode = DepartmentCode;
             m_PersonCode = PersonCode;
@@ -80,7 +80,7 @@
         /// <summary>
         /// 経費金額
         /// </summary>
-        public int[] CostValue
+        public long[] CostValue
         {
             get { return m_CostValue; }
             set { m_CostValue = value; }
Index: trunk/src/ProcessManagement/ProcessManagement/DataModel/SalaryClass.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/DataModel/SalaryClass.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/DataModel/SalaryClass.cs	(revision 484)
@@ -22,7 +22,7 @@
         /// <summary>
         /// 給与金額
         /// </summary>
-        private int m_SalaryValue = 0;
+        private long m_SalaryValue = 0;
         /// <summary>
         /// 開始日付
         /// </summary>
@@ -34,7 +34,7 @@
         #endregion
 
         #region コンストラクタ
-        public SalaryClass(int DepartmentCode, int PersonCode, int SalaryValue, DateTime StartDate, DateTime CompDate)
+        public SalaryClass(int DepartmentCode, int PersonCode, long SalaryValue, DateTime StartDate, DateTime CompDate)
         {
             m_DepartmentCode = DepartmentCode;
             m_PersonCode = PersonCode;
@@ -64,7 +64,7 @@
         /// <summary>
         /// 給与金額
         /// </summary>
-        public int SalaryValue
+        public long SalaryValue
         {
             get { return m_SalaryValue; }
             set { m_SalaryValue = value; }
Index: trunk/src/ProcessManagement/ProcessManagement/DataModel/SalesGraphData.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/DataModel/SalesGraphData.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/DataModel/SalesGraphData.cs	(revision 484)
@@ -16,10 +16,10 @@
         private DateTime    m_SalesDataDays = DateTime.MinValue;        // 売上年月
         private int         m_DisplayOrder = 0;                         // 表示順
         private string      m_DataName = string.Empty;	                // データ表示名称
-        private int         m_SalesAmount = 0;	                        // 売上データ
-        private int         m_AdministrativeExpense = 0;                // 販管・部署経費
-        private int         m_GrossProfit = 0;                          // 粗利益
-        private int         m_NetIncome = 0;                            // 純利益(損益)
+        private long        m_SalesAmount = 0;	                        // 売上データ
+        private long        m_AdministrativeExpense = 0;                // 販管・部署経費
+        private long        m_GrossProfit = 0;                          // 粗利益
+        private long        m_NetIncome = 0;                            // 純利益(損益)
         private DateTime    m_EntryDate = DateTime.Now;                 // 登録日付
         private DateTime    m_UpdateDate = DateTime.Now;                // 更新日付
         #endregion
@@ -71,7 +71,7 @@
         /// <summary>
         /// 売上データ
         /// </summary>
-        public int SalesAmount
+        public long SalesAmount
         {
             get { return m_SalesAmount; }
             set { m_SalesAmount = value; }
@@ -79,7 +79,7 @@
         /// <summary>
         /// 販管・部署経費
         /// </summary>
-        public int AdministrativeExpense
+        public long AdministrativeExpense
         {
             get { return m_AdministrativeExpense; }
             set { m_AdministrativeExpense = value; }
@@ -87,7 +87,7 @@
         /// <summary>
         /// 粗利益
         /// </summary>
-        public int GrossProfit
+        public long GrossProfit
         {
             get { return m_GrossProfit; }
             set { m_GrossProfit = value; }
@@ -95,7 +95,7 @@
         /// <summary>
         /// 純利益(損益)
         /// </summary>
-        public int NetIncome
+        public long NetIncome
         {
             get { return m_NetIncome; }
             set { m_NetIncome = value; }
Index: trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ApprovalScreen/FrmApprovalScreenAuxiliary.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ApprovalScreen/FrmApprovalScreenAuxiliary.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ApprovalScreen/FrmApprovalScreenAuxiliary.cs	(revision 484)
@@ -1841,7 +1841,7 @@
                 StringBuilder strSQL = new StringBuilder();
                 strSQL.Append("Select * From");
 
-                strSQL.Append(" (SELECT *");
+                strSQL.AppendFormat(" (SELECT {0}", IOProcessApprovalComment.CreateFieldNameList());
                 strSQL.Append(" FROM processapprovalcomment AS m");
                 strSQL.Append(" WHERE NOT EXISTS(");
                 strSQL.Append("           SELECT 1 FROM processapprovalcomment AS s");
Index: trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/AverageScore/FrmAverageScore.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/AverageScore/FrmAverageScore.cs	(nonexistent)
+++ trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/AverageScore/FrmAverageScore.cs	(revision 484)
@@ -0,0 +1,448 @@
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Text;
+using System.Windows.Forms;
+using System.Threading.Tasks;
+using System.Diagnostics;
+using System.Linq;
+
+using log4net;
+using log4net.Appender;
+using log4net.Repository.Hierarchy;
+
+using ProcessManagement.Common;
+using ProcessManagement.DB.IOAccess;
+using ProcessManagement.DataModel;
+using ProcessManagement.DB.Core;
+using ProcessManagement.Forms.CustomControls;
+using ProcessManagement.Forms.ControlsAction;
+using ProcessManagement.Forms.SubForms;
+//*---------------------------- �]���_�m�F��� --------------------------------*
+//  2020/06/06  Ver1.0.0.0      Create Source           
+//
+//
+//
+//*----------------------------------------------------------------------------*
+namespace ProcessManagement.Forms.DataEntry
+{
+    public partial class FrmAverageScore : Form
+    {
+        #region �g�p��`
+        //log4net���O���g�p����
+        private static readonly log4net.ILog logger = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
+        #endregion
+
+        #region �萔
+
+        #region �O���b�h�\����
+        /// <summary>
+        /// �O���b�h�\����
+        /// </summary>
+        private enum DispGrid
+        {
+            DivisionCode = 0,
+            OrderCode,
+            ManCode,
+            ConstrCode,
+            No,
+            ManName1,
+            ManAvgScore1,
+            DiviName,
+            DiviAvgScore,
+            OrderName,
+            OrderAvgScore,
+            ManName2,
+            ManAvgScore2,
+            ConstrName,
+            ConstScore,
+        }
+        #endregion
+
+        #region �O���b�h�f�t�H���g�s��
+        /// <summary>
+        /// �O���b�h�f�t�H���g�s��
+        /// </summary>
+        private static int s_RowDefault = 20;
+        #endregion
+
+        #endregion
+
+        #region �ϐ�
+
+        /// <summary>
+        /// �A�N�Z�X�����t���O
+        /// </summary>
+        private bool m_EditLock = false;
+
+        /// <summary>
+        /// �N�����v���Z�X�ԍ�
+        /// </summary>
+        private int m_PrevProcessNo = 0;
+
+        #endregion
+
+        #region �v���p�e�B
+
+        #region �A�N�Z�X�����t���O
+        /// <summary>
+        /// �A�N�Z�X�����t���O
+        /// </summary>
+        public bool EditLock
+        {
+            get { return m_EditLock; }
+            set { m_EditLock = value; }
+        }
+        #endregion
+
+        #region �N�����v���Z�X�ԍ�
+        /// <summary>
+        /// �N�����v���Z�X�ԍ�
+        /// </summary>
+        public int PrevProcessNo
+        {
+            get { return m_PrevProcessNo; }
+            set { m_PrevProcessNo = value; }
+        }
+        #endregion
+
+        #endregion
+
+        #region �R���X�g���N�^
+        public FrmAverageScore()
+        {
+            InitializeComponent();
+        }
+        #endregion
+        #region �f�X�g���N�^
+        ~FrmAverageScore()
+        {
+            try
+            {
+                GC.Collect();
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("�V�X�e���G���[�F{0}�F{1}", CommonMotions.GetMethodName(), ex.Message);
+            }
+        }
+        #endregion
+
+        #region �~�{�^��
+        /// <summary>
+        /// �~�{�^����������
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        private void FrmAverageScore_FormClosing(object sender, FormClosingEventArgs e)
+        {
+            try
+            {
+                // ��C�Ƀ��j���[�ւɖ߂�
+                ClsExcute.ClearProcess();
+            }
+            catch (System.Exception ex)
+            {
+                logger.ErrorFormat("�V�X�e���G���[�F{0}�F{1}", CommonMotions.GetMethodName(), ex.Message);
+            }
+        }
+        #endregion
+
+        #region �t�H�[�����[�h
+        /// <summary>
+        /// �����t�H�[�����[�h
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        private void FrmDepartmentCost_Load(object sender, EventArgs e)
+        {
+            // �����敪�R���{�{�b�N�X�֕������Z�b�g����
+            SetcmbDivision();
+        }
+        #endregion
+
+        #region �t�H�[�����[�h������
+        /// <summary>
+        /// �t�H�[�����[�h������
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        private async void FrmAverageScore_Shown(object sender, EventArgs e)
+        {
+            await Task.Delay(100);
+
+            // �t�H�[�����[�h���̏���
+            InitFormLoad();
+        }
+        #endregion
+
+        #region �I���{�^��
+        /// <summary>
+        /// �I���{�^���N���b�N
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        private void btnEnd_Click(object sender, EventArgs e)
+        {
+            try
+            {
+                this.Close();
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("�V�X�e���G���[�F{0}�F{1}", CommonMotions.GetMethodName(), ex.Message);
+            }
+        }
+        #endregion
+
+        #region Entry�L�[�ł̈ړ�����
+        /// <summary>
+        /// Entry�L�[�ł̈ړ�����
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        private void FrmAverageScore_KeyDown(object sender, KeyEventArgs e)
+        {
+            try
+            {
+                //Enter�L�[��������Ă��邩�m�F
+                //Alt��Ctrl�L�[��������Ă��鎞�͖�������
+                if ((e.KeyCode == Keys.Enter) && !e.Alt && !e.Control)
+                {
+                    //��������Tab�L�[�������ꂽ���̂悤�ɂ���
+                    //Shift��������Ă��鎞�͑O�̃R���g���[���̃t�H�[�J�X���ړ�
+                    this.ProcessTabKey(!e.Shift);
+
+                    e.Handled = true;
+                    //.NET Framework 2.0�ȍ~
+                    e.SuppressKeyPress = true;
+                }
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("�V�X�e���G���[�F{0}�F{1}", CommonMotions.GetMethodName(), ex.Message);
+            }
+        }
+        #endregion
+
+        #region �I���Z���̐��l�v�Z
+        /// <summary>
+        /// �I�𒆂̃Z���l���v�Z���ĕ\������
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        private void dgvAverage_MouseUp(object sender, MouseEventArgs e)
+        {
+            try
+            {
+                DataGridViewEX dgv = (DataGridViewEX)sender;
+                lblCellTotal.Text = string.Empty;
+
+                double dTotal = 0;
+                int DataCnt = 0;
+                int NumericCnt = 0;
+                foreach (DataGridViewCell c in dgv.SelectedCells)
+                {
+                    if (CommonMotions.chkObjectIsNull(dgv.Rows[c.RowIndex].Cells[c.ColumnIndex])) continue;
+                    if (CommonMotions.chkCellBlank(dgv.Rows[c.RowIndex].Cells[c.ColumnIndex].Value)) continue;
+
+                    //Console.WriteLine("{0}, {1}", c.ColumnIndex, c.RowIndex);
+                    DataCnt++;
+                    dTotal += CommonMotions.cnvDouble(dgv.Rows[c.RowIndex].Cells[c.ColumnIndex].Value);
+                    if (CommonMotions.chkNumeric(dgv.Rows[c.RowIndex].Cells[c.ColumnIndex].Value)) NumericCnt++;
+                }
+                if (DataCnt <= 1 || NumericCnt == 0) return;
+                string strTotal = CommonMotions.cnvTruncate(dTotal).ToString("#,0");
+                if (dTotal - System.Math.Floor(dTotal) != 0) strTotal = dTotal.ToString("#,0.00");
+
+                string strwrkData = string.Format(CommonDefine.s_CalculateCellFormat,
+                                                    CommonMotions.cnvTruncate(dTotal / (double)NumericCnt).ToString("#,0"),
+                                                    DataCnt.ToString("#,0"),
+                                                    strTotal);
+                lblCellTotal.Text = strwrkData;
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("�V�X�e���G���[�F{0}�F{1}", CommonMotions.GetMethodName(), ex.Message);
+            }
+        }
+        #endregion
+
+        #region �����敪�R���{�{�b�N�X�ύX
+        /// <summary>
+        /// �����敪�R���{�{�b�N�X�ύX
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        private void cmbDivision_TextChanged(object sender, EventArgs e)
+        {
+            // �R���{�{�b�N�X�C�x���g����
+            CmbEventControl(false);
+            // �R���g���[���I�𐧌�
+            EnableControl(false);
+
+            // �����҃R���{�{�b�N�X�֕������Z�b�g����
+            SetcmbCode();
+
+            // �f�[�^�\��
+            DataDisplay();
+
+            // �R���{�{�b�N�X�C�x���g����
+            CmbEventControl(true);
+            // �R���g���[���I�𐧌�
+            EnableControl(true);
+        }
+        #endregion
+
+        #region �����҃R���{�{�b�N�X�ύX
+        /// <summary>
+        /// �����҃R���{�{�b�N�X�ύX
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        private void cmbCode_TextChanged(object sender, EventArgs e)
+        {
+            // �R���{�{�b�N�X�C�x���g����
+            CmbEventControl(false);
+            // �R���g���[���I�𐧌�
+            EnableControl(false);
+
+            // �f�[�^�\��
+            DataDisplay();
+
+            // �R���{�{�b�N�X�C�x���g����
+            CmbEventControl(true);
+            // �R���g���[���I�𐧌�
+            EnableControl(true);
+        }
+        #endregion
+
+        #region �����E�S���ҕ\���I��
+        /// <summary>
+        /// �����E�S���ҕ\���I��
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        private void radioButton1_CheckedChanged(object sender, EventArgs e)
+        {
+            // �R���{�{�b�N�X�C�x���g����
+            CmbEventControl(false);
+            // �R���g���[���I�𐧌�
+            EnableControl(false);
+
+            // �O���b�h�̕\���J�����𐧌䂷��
+            GridColumnsControl();
+
+            // �f�[�^�\��
+            DataDisplay();
+
+            // �R���{�{�b�N�X�C�x���g����
+            CmbEventControl(true);
+            // �R���g���[���I�𐧌�
+            EnableControl(true);
+        }
+        #endregion
+
+        #region �Ώ۔N�x�\���I��
+        /// <summary>
+        /// �Ώ۔N�x�\���I��
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        private void radioButton3_CheckedChanged(object sender, EventArgs e)
+        {
+            // �R���{�{�b�N�X�C�x���g����
+            CmbEventControl(false);
+            // �R���g���[���I�𐧌�
+            EnableControl(false);
+
+            // �����敪�R���{�{�b�N�X�֕������Z�b�g����
+            SetcmbDivision();
+
+            // �f�[�^�\��
+            DataDisplay();
+
+            // �R���{�{�b�N�X�C�x���g����
+            CmbEventControl(true);
+            // �R���g���[���I�𐧌�
+            EnableControl(true);
+        }
+        #endregion
+
+        #region �ŐV��Ԃ֍ĕ`��
+        /// <summary>
+        /// �ŐV��Ԃ֍ĕ`��
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        private void btnDataUpDate_Click(object sender, EventArgs e)
+        {
+            // �R���{�{�b�N�X�C�x���g����
+            CmbEventControl(false);
+            // �R���g���[���I�𐧌�
+            EnableControl(false);
+
+            // �f�[�^�\��
+            DataDisplay();
+
+            // �R���{�{�b�N�X�C�x���g����
+            CmbEventControl(true);
+            // �R���g���[���I�𐧌�
+            EnableControl(true);
+        }
+        #endregion
+
+        #region �w���v�{�^��
+        private FrmHelp helpfrm = null;
+        /// <summary>
+        /// �w���v�{�^��
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        private void btnHelp_Click(object sender, EventArgs e)
+        {
+            try
+            {
+                if (helpfrm != null) return;
+
+                helpfrm = new FrmHelp();
+                helpfrm.FormClosed += new FormClosedEventHandler(FrmHelp_FormClosed);
+
+                helpfrm.ProcessNo = (int)ClsExcute.MaintenanceExecuteNo.AverageScore;
+                helpfrm.Show(this);
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("�V�X�e���G���[�F�F{0}�F{1}", CommonMotions.GetMethodName(), ex.Message);
+                helpfrm.Dispose();
+                helpfrm = null;
+            }
+        }
+        #endregion
+
+        #region �w���v�t�H�[���N���[�Y
+        /// <summary>
+        /// �w���v�t�H�[���N���[�Y
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        private void FrmHelp_FormClosed(object sender, FormClosedEventArgs e)
+        {
+            try
+            {
+                helpfrm.Dispose();
+                helpfrm = null;
+                GC.Collect();
+                this.Activate();
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("�V�X�e���G���[�F�F{0}�F{1}", CommonMotions.GetMethodName(), ex.Message);
+            }
+        }
+        #endregion
+    }
+}
\ No newline at end of file
Index: trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/AverageScore/FrmAverageScore.designer.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/AverageScore/FrmAverageScore.designer.cs	(nonexistent)
+++ trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/AverageScore/FrmAverageScore.designer.cs	(revision 484)
@@ -0,0 +1,622 @@
+﻿namespace ProcessManagement.Forms.DataEntry
+{
+    partial class FrmAverageScore
+    {
+        /// <summary>
+        /// 必要なデザイナ変数です。
+        /// </summary>
+        private System.ComponentModel.IContainer components = null;
+
+        /// <summary>
+        /// 使用中のリソースをすべてクリーンアップします。
+        /// </summary>
+        /// <param name="disposing">マネージ リソースが破棄される場合 true、破棄されない場合は false です。</param>
+        protected override void Dispose(bool disposing)
+        {
+            if (disposing && (components != null))
+            {
+                components.Dispose();
+            }
+            base.Dispose(disposing);
+        }
+
+        #region Windows フォーム デザイナで生成されたコード
+
+        /// <summary>
+        /// デザイナ サポートに必要なメソッドです。このメソッドの内容を
+        /// コード エディタで変更しないでください。
+        /// </summary>
+        private void InitializeComponent()
+        {
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle43 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle44 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle56 = 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();
+            this.btnEnd = new System.Windows.Forms.Button();
+            this.label1 = new System.Windows.Forms.Label();
+            this.ProgressBar = new System.Windows.Forms.ProgressBar();
+            this.btnOtherProc = new System.Windows.Forms.Button();
+            this.btnHelp = new System.Windows.Forms.Button();
+            this.groupBoxEx2 = new ProcessManagement.Forms.CustomControls.GroupBoxEx();
+            this.groupBoxEx3 = new ProcessManagement.Forms.CustomControls.GroupBoxEx();
+            this.radioButton1 = new System.Windows.Forms.RadioButton();
+            this.radioButton2 = new System.Windows.Forms.RadioButton();
+            this.label9 = new System.Windows.Forms.Label();
+            this.cmbDivision = new ProcessManagement.Forms.CustomControls.ComboBoxEX();
+            this.cmbCode = new ProcessManagement.Forms.CustomControls.ComboBoxEX();
+            this.label10 = new System.Windows.Forms.Label();
+            this.groupBoxEx1 = new ProcessManagement.Forms.CustomControls.GroupBoxEx();
+            this.dgvAverage = new ProcessManagement.Forms.CustomControls.DataGridViewEX();
+            this.Column1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.Column2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.Column3 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.Column13 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.Column4 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.Column5 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.Column6 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.Column7 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.Column8 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.Column9 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.Column10 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.Column15 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.Column14 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.Column11 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.Column12 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.lblCellTotal = new System.Windows.Forms.Label();
+            this.groupBoxEx4 = new ProcessManagement.Forms.CustomControls.GroupBoxEx();
+            this.radioButton3 = new System.Windows.Forms.RadioButton();
+            this.radioButton4 = new System.Windows.Forms.RadioButton();
+            this.btnDataUpDate = new System.Windows.Forms.Button();
+            this.groupBoxEx2.SuspendLayout();
+            this.groupBoxEx3.SuspendLayout();
+            this.groupBoxEx1.SuspendLayout();
+            ((System.ComponentModel.ISupportInitialize)(this.dgvAverage)).BeginInit();
+            this.groupBoxEx4.SuspendLayout();
+            this.SuspendLayout();
+            // 
+            // btnEnd
+            // 
+            this.btnEnd.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
+            this.btnEnd.BackColor = System.Drawing.Color.Blue;
+            this.btnEnd.ForeColor = System.Drawing.Color.White;
+            this.btnEnd.Location = new System.Drawing.Point(1150, 650);
+            this.btnEnd.Name = "btnEnd";
+            this.btnEnd.Size = new System.Drawing.Size(120, 30);
+            this.btnEnd.TabIndex = 8;
+            this.btnEnd.Text = "終　了";
+            this.btnEnd.UseVisualStyleBackColor = false;
+            this.btnEnd.Click += new System.EventHandler(this.btnEnd_Click);
+            // 
+            // label1
+            // 
+            this.label1.Anchor = System.Windows.Forms.AnchorStyles.Top;
+            this.label1.BackColor = System.Drawing.Color.LawnGreen;
+            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(440, 10);
+            this.label1.Name = "label1";
+            this.label1.Size = new System.Drawing.Size(400, 20);
+            this.label1.TabIndex = 6;
+            this.label1.Text = "公 共 工 事 評 価 点 一 覧";
+            this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
+            // 
+            // ProgressBar
+            // 
+            this.ProgressBar.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
+            this.ProgressBar.Location = new System.Drawing.Point(10, 649);
+            this.ProgressBar.Name = "ProgressBar";
+            this.ProgressBar.Size = new System.Drawing.Size(1134, 30);
+            this.ProgressBar.TabIndex = 30;
+            this.ProgressBar.Visible = false;
+            // 
+            // btnOtherProc
+            // 
+            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);
+            this.btnOtherProc.Location = new System.Drawing.Point(7, 649);
+            this.btnOtherProc.Name = "btnOtherProc";
+            this.btnOtherProc.Size = new System.Drawing.Size(160, 30);
+            this.btnOtherProc.TabIndex = 119;
+            this.btnOtherProc.TabStop = false;
+            this.btnOtherProc.Text = "他の画面へ";
+            this.btnOtherProc.UseVisualStyleBackColor = false;
+            this.btnOtherProc.Visible = false;
+            // 
+            // btnHelp
+            // 
+            this.btnHelp.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+            this.btnHelp.BackColor = System.Drawing.Color.Black;
+            this.btnHelp.Font = new System.Drawing.Font("MS UI Gothic", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
+            this.btnHelp.ForeColor = System.Drawing.Color.White;
+            this.btnHelp.Location = new System.Drawing.Point(1249, 0);
+            this.btnHelp.Name = "btnHelp";
+            this.btnHelp.Size = new System.Drawing.Size(30, 30);
+            this.btnHelp.TabIndex = 125;
+            this.btnHelp.TabStop = false;
+            this.btnHelp.Text = "？";
+            this.btnHelp.UseVisualStyleBackColor = false;
+            this.btnHelp.Click += new System.EventHandler(this.btnHelp_Click);
+            // 
+            // groupBoxEx2
+            // 
+            this.groupBoxEx2.BackColor = System.Drawing.Color.WhiteSmoke;
+            this.groupBoxEx2.BorderColor = System.Drawing.Color.White;
+            this.groupBoxEx2.Controls.Add(this.btnDataUpDate);
+            this.groupBoxEx2.Controls.Add(this.groupBoxEx4);
+            this.groupBoxEx2.Controls.Add(this.groupBoxEx3);
+            this.groupBoxEx2.Controls.Add(this.label9);
+            this.groupBoxEx2.Controls.Add(this.cmbDivision);
+            this.groupBoxEx2.Controls.Add(this.cmbCode);
+            this.groupBoxEx2.Controls.Add(this.label10);
+            this.groupBoxEx2.ForeColor = System.Drawing.Color.Black;
+            this.groupBoxEx2.Location = new System.Drawing.Point(10, 40);
+            this.groupBoxEx2.Name = "groupBoxEx2";
+            this.groupBoxEx2.Size = new System.Drawing.Size(1260, 80);
+            this.groupBoxEx2.TabIndex = 129;
+            this.groupBoxEx2.TabStop = false;
+            // 
+            // groupBoxEx3
+            // 
+            this.groupBoxEx3.BackColor = System.Drawing.Color.Brown;
+            this.groupBoxEx3.BorderColor = System.Drawing.Color.Maroon;
+            this.groupBoxEx3.Controls.Add(this.radioButton1);
+            this.groupBoxEx3.Controls.Add(this.radioButton2);
+            this.groupBoxEx3.Location = new System.Drawing.Point(30, 43);
+            this.groupBoxEx3.Name = "groupBoxEx3";
+            this.groupBoxEx3.Size = new System.Drawing.Size(360, 30);
+            this.groupBoxEx3.TabIndex = 49;
+            this.groupBoxEx3.TabStop = false;
+            // 
+            // radioButton1
+            // 
+            this.radioButton1.AutoSize = true;
+            this.radioButton1.Checked = true;
+            this.radioButton1.ForeColor = System.Drawing.Color.WhiteSmoke;
+            this.radioButton1.Location = new System.Drawing.Point(40, 6);
+            this.radioButton1.Name = "radioButton1";
+            this.radioButton1.Size = new System.Drawing.Size(127, 19);
+            this.radioButton1.TabIndex = 48;
+            this.radioButton1.TabStop = true;
+            this.radioButton1.Text = "発注者別表示";
+            this.radioButton1.UseVisualStyleBackColor = true;
+            this.radioButton1.CheckedChanged += new System.EventHandler(this.radioButton1_CheckedChanged);
+            // 
+            // radioButton2
+            // 
+            this.radioButton2.AutoSize = true;
+            this.radioButton2.ForeColor = System.Drawing.Color.WhiteSmoke;
+            this.radioButton2.Location = new System.Drawing.Point(191, 6);
+            this.radioButton2.Name = "radioButton2";
+            this.radioButton2.Size = new System.Drawing.Size(127, 19);
+            this.radioButton2.TabIndex = 47;
+            this.radioButton2.Text = "担当者別表示";
+            this.radioButton2.UseVisualStyleBackColor = true;
+            // 
+            // label9
+            // 
+            this.label9.BackColor = System.Drawing.Color.LawnGreen;
+            this.label9.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
+            this.label9.CausesValidation = false;
+            this.label9.Font = new System.Drawing.Font("ＭＳ 明朝", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
+            this.label9.Location = new System.Drawing.Point(30, 10);
+            this.label9.Name = "label9";
+            this.label9.Size = new System.Drawing.Size(120, 27);
+            this.label9.TabIndex = 45;
+            this.label9.Text = "発注区分";
+            this.label9.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
+            // 
+            // cmbDivision
+            // 
+            this.cmbDivision.BackColor = System.Drawing.Color.White;
+            this.cmbDivision.DisplayMember = "Value";
+            this.cmbDivision.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+            this.cmbDivision.DropDownWidth = 500;
+            this.cmbDivision.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
+            this.cmbDivision.Font = new System.Drawing.Font("ＭＳ 明朝", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
+            this.cmbDivision.FormattingEnabled = true;
+            this.cmbDivision.Location = new System.Drawing.Point(158, 11);
+            this.cmbDivision.Name = "cmbDivision";
+            this.cmbDivision.Size = new System.Drawing.Size(460, 24);
+            this.cmbDivision.TabIndex = 43;
+            this.cmbDivision.ValueMember = "Key";
+            // 
+            // cmbCode
+            // 
+            this.cmbCode.BackColor = System.Drawing.Color.White;
+            this.cmbCode.DisplayMember = "Value";
+            this.cmbCode.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+            this.cmbCode.DropDownWidth = 500;
+            this.cmbCode.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
+            this.cmbCode.Font = new System.Drawing.Font("ＭＳ 明朝", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
+            this.cmbCode.FormattingEnabled = true;
+            this.cmbCode.Location = new System.Drawing.Point(770, 11);
+            this.cmbCode.Name = "cmbCode";
+            this.cmbCode.Size = new System.Drawing.Size(460, 24);
+            this.cmbCode.TabIndex = 44;
+            this.cmbCode.ValueMember = "Key";
+            // 
+            // label10
+            // 
+            this.label10.BackColor = System.Drawing.Color.LawnGreen;
+            this.label10.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
+            this.label10.CausesValidation = false;
+            this.label10.Font = new System.Drawing.Font("ＭＳ 明朝", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
+            this.label10.Location = new System.Drawing.Point(642, 10);
+            this.label10.Name = "label10";
+            this.label10.Size = new System.Drawing.Size(120, 27);
+            this.label10.TabIndex = 46;
+            this.label10.Text = "発　注　者";
+            this.label10.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
+            // 
+            // groupBoxEx1
+            // 
+            this.groupBoxEx1.Anchor = System.Windows.Forms.AnchorStyles.Top;
+            this.groupBoxEx1.BackColor = System.Drawing.Color.WhiteSmoke;
+            this.groupBoxEx1.BorderColor = System.Drawing.Color.White;
+            this.groupBoxEx1.Controls.Add(this.dgvAverage);
+            this.groupBoxEx1.Controls.Add(this.lblCellTotal);
+            this.groupBoxEx1.ForeColor = System.Drawing.Color.Black;
+            this.groupBoxEx1.Location = new System.Drawing.Point(10, 126);
+            this.groupBoxEx1.Name = "groupBoxEx1";
+            this.groupBoxEx1.Size = new System.Drawing.Size(1260, 514);
+            this.groupBoxEx1.TabIndex = 127;
+            this.groupBoxEx1.TabStop = false;
+            // 
+            // dgvAverage
+            // 
+            this.dgvAverage.AllowUserToAddRows = false;
+            this.dgvAverage.AllowUserToDeleteRows = false;
+            this.dgvAverage.AllowUserToResizeRows = false;
+            dataGridViewCellStyle43.BackColor = System.Drawing.Color.Honeydew;
+            this.dgvAverage.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle43;
+            this.dgvAverage.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
+            | System.Windows.Forms.AnchorStyles.Left) 
+            | System.Windows.Forms.AnchorStyles.Right)));
+            this.dgvAverage.BackgroundColor = System.Drawing.Color.White;
+            this.dgvAverage.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
+            dataGridViewCellStyle44.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
+            dataGridViewCellStyle44.BackColor = System.Drawing.SystemColors.Control;
+            dataGridViewCellStyle44.Font = new System.Drawing.Font("ＭＳ 明朝", 11.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
+            dataGridViewCellStyle44.ForeColor = System.Drawing.SystemColors.WindowText;
+            dataGridViewCellStyle44.SelectionBackColor = System.Drawing.SystemColors.Highlight;
+            dataGridViewCellStyle44.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
+            dataGridViewCellStyle44.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
+            this.dgvAverage.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle44;
+            this.dgvAverage.ColumnHeadersHeight = 40;
+            this.dgvAverage.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing;
+            this.dgvAverage.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
+            this.Column1,
+            this.Column2,
+            this.Column3,
+            this.Column13,
+            this.Column4,
+            this.Column5,
+            this.Column6,
+            this.Column7,
+            this.Column8,
+            this.Column9,
+            this.Column10,
+            this.Column15,
+            this.Column14,
+            this.Column11,
+            this.Column12});
+            dataGridViewCellStyle56.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
+            dataGridViewCellStyle56.BackColor = System.Drawing.SystemColors.Window;
+            dataGridViewCellStyle56.Font = new System.Drawing.Font("ＭＳ 明朝", 11.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
+            dataGridViewCellStyle56.ForeColor = System.Drawing.Color.Black;
+            dataGridViewCellStyle56.SelectionBackColor = System.Drawing.Color.LightSeaGreen;
+            dataGridViewCellStyle56.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
+            dataGridViewCellStyle56.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
+            this.dgvAverage.DefaultCellStyle = dataGridViewCellStyle56;
+            this.dgvAverage.EditMode = System.Windows.Forms.DataGridViewEditMode.EditOnEnter;
+            this.dgvAverage.EnableHeadersVisualStyles = false;
+            this.dgvAverage.Location = new System.Drawing.Point(10, 6);
+            this.dgvAverage.Name = "dgvAverage";
+            this.dgvAverage.RowHeadersVisible = false;
+            this.dgvAverage.RowHeadersWidth = 20;
+            this.dgvAverage.RowHeadersWidthSizeMode = System.Windows.Forms.DataGridViewRowHeadersWidthSizeMode.DisableResizing;
+            this.dgvAverage.RowTemplate.Height = 24;
+            this.dgvAverage.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.CellSelect;
+            this.dgvAverage.Size = new System.Drawing.Size(1240, 474);
+            this.dgvAverage.TabIndex = 129;
+            // 
+            // Column1
+            // 
+            this.Column1.HeaderText = "発注者区分";
+            this.Column1.Name = "Column1";
+            this.Column1.ReadOnly = true;
+            this.Column1.Visible = false;
+            // 
+            // Column2
+            // 
+            this.Column2.HeaderText = "発注者番号";
+            this.Column2.Name = "Column2";
+            this.Column2.ReadOnly = true;
+            this.Column2.Visible = false;
+            // 
+            // Column3
+            // 
+            this.Column3.HeaderText = "担当者番号";
+            this.Column3.Name = "Column3";
+            this.Column3.ReadOnly = true;
+            this.Column3.Visible = false;
+            // 
+            // Column13
+            // 
+            this.Column13.HeaderText = "工事番号";
+            this.Column13.Name = "Column13";
+            this.Column13.ReadOnly = true;
+            this.Column13.Visible = false;
+            // 
+            // Column4
+            // 
+            dataGridViewCellStyle45.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
+            dataGridViewCellStyle45.Font = new System.Drawing.Font("Century", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+            dataGridViewCellStyle45.ForeColor = System.Drawing.Color.Black;
+            this.Column4.DefaultCellStyle = dataGridViewCellStyle45;
+            this.Column4.HeaderText = "№";
+            this.Column4.Name = "Column4";
+            this.Column4.ReadOnly = true;
+            this.Column4.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
+            this.Column4.Width = 60;
+            // 
+            // Column5
+            // 
+            dataGridViewCellStyle46.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
+            this.Column5.DefaultCellStyle = dataGridViewCellStyle46;
+            this.Column5.HeaderText = "担当者名";
+            this.Column5.Name = "Column5";
+            this.Column5.ReadOnly = true;
+            this.Column5.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
+            this.Column5.Visible = false;
+            this.Column5.Width = 160;
+            // 
+            // Column6
+            // 
+            dataGridViewCellStyle47.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
+            dataGridViewCellStyle47.Font = new System.Drawing.Font("Century", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+            this.Column6.DefaultCellStyle = dataGridViewCellStyle47;
+            this.Column6.HeaderText = "担当者\n別平均点";
+            this.Column6.Name = "Column6";
+            this.Column6.ReadOnly = true;
+            this.Column6.Resizable = System.Windows.Forms.DataGridViewTriState.False;
+            this.Column6.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
+            this.Column6.Visible = false;
+            // 
+            // Column7
+            // 
+            dataGridViewCellStyle48.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
+            this.Column7.DefaultCellStyle = dataGridViewCellStyle48;
+            this.Column7.HeaderText = "発注者区分";
+            this.Column7.Name = "Column7";
+            this.Column7.ReadOnly = true;
+            this.Column7.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
+            this.Column7.Width = 200;
+            // 
+            // Column8
+            // 
+            dataGridViewCellStyle49.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
+            dataGridViewCellStyle49.Font = new System.Drawing.Font("Century", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+            this.Column8.DefaultCellStyle = dataGridViewCellStyle49;
+            this.Column8.HeaderText = "発注区分\n別平均点";
+            this.Column8.Name = "Column8";
+            this.Column8.ReadOnly = true;
+            this.Column8.Resizable = System.Windows.Forms.DataGridViewTriState.False;
+            this.Column8.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
+            // 
+            // Column9
+            // 
+            dataGridViewCellStyle50.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
+            this.Column9.DefaultCellStyle = dataGridViewCellStyle50;
+            this.Column9.HeaderText = "発注者名";
+            this.Column9.Name = "Column9";
+            this.Column9.ReadOnly = true;
+            this.Column9.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
+            this.Column9.Width = 200;
+            // 
+            // Column10
+            // 
+            dataGridViewCellStyle51.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
+            dataGridViewCellStyle51.Font = new System.Drawing.Font("Century", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+            this.Column10.DefaultCellStyle = dataGridViewCellStyle51;
+            this.Column10.HeaderText = "発注者\n別平均点";
+            this.Column10.Name = "Column10";
+            this.Column10.ReadOnly = true;
+            this.Column10.Resizable = System.Windows.Forms.DataGridViewTriState.False;
+            this.Column10.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
+            // 
+            // Column15
+            // 
+            dataGridViewCellStyle52.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
+            this.Column15.DefaultCellStyle = dataGridViewCellStyle52;
+            this.Column15.HeaderText = "担当者名";
+            this.Column15.Name = "Column15";
+            this.Column15.ReadOnly = true;
+            this.Column15.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
+            this.Column15.Width = 160;
+            // 
+            // Column14
+            // 
+            dataGridViewCellStyle53.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
+            dataGridViewCellStyle53.Font = new System.Drawing.Font("Century", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+            this.Column14.DefaultCellStyle = dataGridViewCellStyle53;
+            this.Column14.HeaderText = "担当者\n別平均点";
+            this.Column14.Name = "Column14";
+            this.Column14.ReadOnly = true;
+            this.Column14.Resizable = System.Windows.Forms.DataGridViewTriState.False;
+            this.Column14.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
+            // 
+            // Column11
+            // 
+            dataGridViewCellStyle54.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
+            this.Column11.DefaultCellStyle = dataGridViewCellStyle54;
+            this.Column11.HeaderText = "工事名";
+            this.Column11.Name = "Column11";
+            this.Column11.ReadOnly = true;
+            this.Column11.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
+            this.Column11.Width = 200;
+            // 
+            // Column12
+            // 
+            dataGridViewCellStyle55.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
+            dataGridViewCellStyle55.Font = new System.Drawing.Font("Century", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+            dataGridViewCellStyle55.ForeColor = System.Drawing.Color.Black;
+            this.Column12.DefaultCellStyle = dataGridViewCellStyle55;
+            this.Column12.HeaderText = "工事\n別平均点";
+            this.Column12.Name = "Column12";
+            this.Column12.ReadOnly = true;
+            this.Column12.Resizable = System.Windows.Forms.DataGridViewTriState.False;
+            this.Column12.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
+            // 
+            // lblCellTotal
+            // 
+            this.lblCellTotal.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
+            this.lblCellTotal.AutoSize = true;
+            this.lblCellTotal.BackColor = System.Drawing.Color.Transparent;
+            this.lblCellTotal.Font = new System.Drawing.Font("ＭＳ Ｐ明朝", 9.75F, System.Drawing.FontStyle.Bold);
+            this.lblCellTotal.ForeColor = System.Drawing.Color.Black;
+            this.lblCellTotal.Location = new System.Drawing.Point(160, 494);
+            this.lblCellTotal.Name = "lblCellTotal";
+            this.lblCellTotal.Size = new System.Drawing.Size(0, 13);
+            this.lblCellTotal.TabIndex = 128;
+            // 
+            // groupBoxEx4
+            // 
+            this.groupBoxEx4.BackColor = System.Drawing.Color.DarkGreen;
+            this.groupBoxEx4.BorderColor = System.Drawing.Color.ForestGreen;
+            this.groupBoxEx4.Controls.Add(this.radioButton3);
+            this.groupBoxEx4.Controls.Add(this.radioButton4);
+            this.groupBoxEx4.Location = new System.Drawing.Point(414, 43);
+            this.groupBoxEx4.Name = "groupBoxEx4";
+            this.groupBoxEx4.Size = new System.Drawing.Size(360, 30);
+            this.groupBoxEx4.TabIndex = 50;
+            this.groupBoxEx4.TabStop = false;
+            // 
+            // radioButton3
+            // 
+            this.radioButton3.AutoSize = true;
+            this.radioButton3.Checked = true;
+            this.radioButton3.ForeColor = System.Drawing.Color.WhiteSmoke;
+            this.radioButton3.Location = new System.Drawing.Point(40, 6);
+            this.radioButton3.Name = "radioButton3";
+            this.radioButton3.Size = new System.Drawing.Size(93, 19);
+            this.radioButton3.TabIndex = 48;
+            this.radioButton3.TabStop = true;
+            this.radioButton3.Text = "過去５年";
+            this.radioButton3.UseVisualStyleBackColor = true;
+            this.radioButton3.CheckedChanged += new System.EventHandler(this.radioButton3_CheckedChanged);
+            // 
+            // radioButton4
+            // 
+            this.radioButton4.AutoSize = true;
+            this.radioButton4.ForeColor = System.Drawing.Color.WhiteSmoke;
+            this.radioButton4.Location = new System.Drawing.Point(191, 6);
+            this.radioButton4.Name = "radioButton4";
+            this.radioButton4.Size = new System.Drawing.Size(59, 19);
+            this.radioButton4.TabIndex = 47;
+            this.radioButton4.Text = "全て";
+            this.radioButton4.UseVisualStyleBackColor = true;
+            // 
+            // btnDataUpDate
+            // 
+            this.btnDataUpDate.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+            this.btnDataUpDate.BackColor = System.Drawing.Color.SpringGreen;
+            this.btnDataUpDate.Font = new System.Drawing.Font("ＭＳ 明朝", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
+            this.btnDataUpDate.ForeColor = System.Drawing.Color.Black;
+            this.btnDataUpDate.Location = new System.Drawing.Point(1110, 43);
+            this.btnDataUpDate.Name = "btnDataUpDate";
+            this.btnDataUpDate.Size = new System.Drawing.Size(120, 30);
+            this.btnDataUpDate.TabIndex = 98;
+            this.btnDataUpDate.Text = "最新状態に更新";
+            this.btnDataUpDate.UseVisualStyleBackColor = false;
+            this.btnDataUpDate.Click += new System.EventHandler(this.btnDataUpDate_Click);
+            // 
+            // FrmAverageScore
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
+            this.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
+            this.BackColor = System.Drawing.Color.Black;
+            this.ClientSize = new System.Drawing.Size(1280, 687);
+            this.Controls.Add(this.groupBoxEx2);
+            this.Controls.Add(this.groupBoxEx1);
+            this.Controls.Add(this.btnHelp);
+            this.Controls.Add(this.btnOtherProc);
+            this.Controls.Add(this.label1);
+            this.Controls.Add(this.btnEnd);
+            this.Controls.Add(this.ProgressBar);
+            this.Font = new System.Drawing.Font("ＭＳ 明朝", 11.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
+            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Fixed3D;
+            this.KeyPreview = true;
+            this.MaximizeBox = false;
+            this.MinimizeBox = false;
+            this.Name = "FrmAverageScore";
+            this.ShowIcon = false;
+            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
+            this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.FrmAverageScore_FormClosing);
+            this.Load += new System.EventHandler(this.FrmDepartmentCost_Load);
+            this.Shown += new System.EventHandler(this.FrmAverageScore_Shown);
+            this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.FrmAverageScore_KeyDown);
+            this.groupBoxEx2.ResumeLayout(false);
+            this.groupBoxEx3.ResumeLayout(false);
+            this.groupBoxEx3.PerformLayout();
+            this.groupBoxEx1.ResumeLayout(false);
+            this.groupBoxEx1.PerformLayout();
+            ((System.ComponentModel.ISupportInitialize)(this.dgvAverage)).EndInit();
+            this.groupBoxEx4.ResumeLayout(false);
+            this.groupBoxEx4.PerformLayout();
+            this.ResumeLayout(false);
+
+        }
+
+        #endregion
+
+        private System.Windows.Forms.Button btnEnd;
+        private System.Windows.Forms.Label label1;
+        private System.Windows.Forms.ProgressBar ProgressBar;
+        private System.Windows.Forms.Button btnOtherProc;
+        private System.Windows.Forms.Button btnHelp;
+        private CustomControls.GroupBoxEx groupBoxEx1;
+        private System.Windows.Forms.Label lblCellTotal;
+        private CustomControls.GroupBoxEx groupBoxEx2;
+        private CustomControls.GroupBoxEx groupBoxEx3;
+        private System.Windows.Forms.RadioButton radioButton1;
+        private System.Windows.Forms.RadioButton radioButton2;
+        private System.Windows.Forms.Label label9;
+        private CustomControls.ComboBoxEX cmbDivision;
+        private CustomControls.ComboBoxEX cmbCode;
+        private System.Windows.Forms.Label label10;
+        private CustomControls.DataGridViewEX dgvAverage;
+        private System.Windows.Forms.DataGridViewTextBoxColumn Column1;
+        private System.Windows.Forms.DataGridViewTextBoxColumn Column2;
+        private System.Windows.Forms.DataGridViewTextBoxColumn Column3;
+        private System.Windows.Forms.DataGridViewTextBoxColumn Column13;
+        private System.Windows.Forms.DataGridViewTextBoxColumn Column4;
+        private System.Windows.Forms.DataGridViewTextBoxColumn Column5;
+        private System.Windows.Forms.DataGridViewTextBoxColumn Column6;
+        private System.Windows.Forms.DataGridViewTextBoxColumn Column7;
+        private System.Windows.Forms.DataGridViewTextBoxColumn Column8;
+        private System.Windows.Forms.DataGridViewTextBoxColumn Column9;
+        private System.Windows.Forms.DataGridViewTextBoxColumn Column10;
+        private System.Windows.Forms.DataGridViewTextBoxColumn Column15;
+        private System.Windows.Forms.DataGridViewTextBoxColumn Column14;
+        private System.Windows.Forms.DataGridViewTextBoxColumn Column11;
+        private System.Windows.Forms.DataGridViewTextBoxColumn Column12;
+        private CustomControls.GroupBoxEx groupBoxEx4;
+        private System.Windows.Forms.RadioButton radioButton3;
+        private System.Windows.Forms.RadioButton radioButton4;
+        private System.Windows.Forms.Button btnDataUpDate;
+    }
+}
\ No newline at end of file
Index: trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/AverageScore/FrmAverageScore.resx
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/AverageScore/FrmAverageScore.resx	(nonexistent)
+++ trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/AverageScore/FrmAverageScore.resx	(revision 484)
@@ -0,0 +1,165 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <metadata name="lblCellTotal.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="Column1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="Column2.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="Column3.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="Column13.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="Column4.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="Column5.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="Column6.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="Column7.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="Column8.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="Column9.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="Column10.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="Column11.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="Column12.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="lblCellTotal.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+</root>
\ No newline at end of file
Index: trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/AverageScore/FrmAverageScoreAux.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/AverageScore/FrmAverageScoreAux.cs	(nonexistent)
+++ trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/AverageScore/FrmAverageScoreAux.cs	(revision 484)
@@ -0,0 +1,1007 @@
+﻿using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Text;
+using System.Windows.Forms;
+using System.Threading.Tasks;
+using System.Diagnostics;
+using System.Linq;
+
+using log4net;
+using log4net.Appender;
+using log4net.Repository.Hierarchy;
+
+using ProcessManagement.Common;
+using ProcessManagement.DB.IOAccess;
+using ProcessManagement.DataModel;
+using ProcessManagement.DB.Core;
+using ProcessManagement.Forms.CustomControls;
+using ProcessManagement.Forms.ControlsAction;
+using ProcessManagement.Forms.SubForms;
+
+namespace ProcessManagement.Forms.DataEntry
+{
+    partial class FrmAverageScore
+    {
+        #region フォームロード時の処理
+        /// <summary>
+        /// フォームロード時の処理
+        /// </summary>
+        private void InitFormLoad()
+        {
+            try
+            {
+                // コントロール選択制御
+                EnableControl(false);
+
+                // データ表示
+                DataDisplay();
+
+                // コンボボックスイベント制御
+                CmbEventControl(true);
+                // コントロール選択制御
+                EnableControl(true);
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("システムエラー：{0}：{1}", CommonMotions.GetMethodName(), ex.Message);
+            }
+        }
+        #endregion
+
+        #region コンボボックスイベント制御
+        /// <summary>
+        /// コンボボックスイベント制御
+        /// </summary>
+        private void CmbEventControl(bool bOn)
+        {
+            try
+            {
+                if (bOn)
+                {
+                    cmbDivision.TextChanged += new EventHandler(cmbDivision_TextChanged);
+                    cmbCode.TextChanged += new EventHandler(cmbCode_TextChanged);
+                }
+                else
+                {
+                    cmbDivision.TextChanged -= new EventHandler(cmbDivision_TextChanged);
+                    cmbCode.TextChanged -= new EventHandler(cmbCode_TextChanged);
+                }
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("システムエラー：{0}：{1}", CommonMotions.GetMethodName(), ex.Message);
+            }
+        }
+        #endregion
+
+        #region コントロール選択制御
+        /// <summary>
+        /// コントロール選択制御
+        /// </summary>
+        /// <param name="bOn"></param>
+        private void EnableControl(bool bOn)
+        {
+            try
+            {
+                cmbDivision.Enabled = bOn;
+                cmbCode.Enabled = bOn;
+                btnOtherProc.Enabled = bOn;
+                btnEnd.Enabled = bOn;
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("システムエラー：{0}：{1}", CommonMotions.GetMethodName(), ex.Message);
+            }
+        }
+        #endregion
+
+        #region グリッドの表示カラムを制御する
+        /// <summary>
+        /// グリッドの表示カラムを制御する
+        /// </summary>
+        private void GridColumnsControl()
+        {
+            try
+            {
+                DataGridView dgv = dgvAverage;
+
+                bool[] bSet = new bool[] { false, true };
+                if (radioButton2.Checked)
+                {
+                    bSet[0] = true;
+                    bSet[1] = false;
+                }
+
+                dgv.Columns[(int)DispGrid.ManName1].Visible = bSet[0];
+                dgv.Columns[(int)DispGrid.ManAvgScore1].Visible = bSet[0];
+                dgv.Columns[(int)DispGrid.ManName2].Visible = bSet[1];
+                dgv.Columns[(int)DispGrid.ManAvgScore2].Visible = bSet[1];
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("システムエラー：{0}：{1}", CommonMotions.GetMethodName(), ex.Message);
+            }
+        }
+        #endregion
+
+        #region 当期より5年前の4月1日を返す
+        /// <summary>
+        /// 当期より5年前の4月1日を返す
+        /// </summary>
+        /// <returns></returns>
+        private DateTime Before5Year()
+        {
+            try
+            {
+                DateTime dtSt = DateTime.Today;
+                // 公共事業年度は固定で4/1よりの今期より5年前までを対象
+                if (DateTime.Today.Month < 4)
+                    dtSt = new DateTime(DateTime.Today.Year, 3, 31);
+                else
+                    dtSt = new DateTime((DateTime.Today.Year + 1), 3, 31);
+                dtSt = dtSt.AddYears(-5);
+
+                return dtSt;
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("システムエラー：{0}：{1}", CommonMotions.GetMethodName(), ex.Message);
+                return DateTime.Today;
+            }
+        }
+        #endregion
+
+        #region 評価点０を除外する
+        /// <summary>
+        /// 評価点０を除外する
+        /// </summary>
+        /// <returns></returns>
+        private string ZeroExclude()
+        {
+            try
+            {
+                return " And Calc.EvaluationScore > 0";
+                //return string.Empty;
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("システムエラー：{0}：{1}", CommonMotions.GetMethodName(), ex.Message);
+                return string.Empty;
+            }
+        }
+        #endregion
+
+        #region 選択条件により５年間選択のＳＱＬを返す
+        /// <summary>
+        /// 選択条件により５年間選択のＳＱＬを返す
+        /// </summary>
+        /// <returns></returns>
+        private string SetBeforeYear()
+        {
+            try
+            {
+                string strRet = string.Empty;
+                if (radioButton3.Checked)
+                {
+                    // 当期より5年前の4月1日を返す
+                    DateTime dtSt = Before5Year();
+                    strRet = string.Format(" And '{0}' <= DATE(Calc.OrderDate)", dtSt.ToShortDateString());
+                }
+                return strRet;
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("システムエラー：{0}：{1}", CommonMotions.GetMethodName(), ex.Message);
+                return string.Empty;
+            }
+        }
+        #endregion
+
+        #region 発注区分コンボボックスをセットする
+        /// <summary>
+        /// 発注区分コンボボックスへ文字をセットする
+        /// </summary>
+        private void SetcmbDivision()
+        {
+            IOMDivision DiviDB = new IOMDivision();
+            try
+            {
+                // 区分マスタを検索する
+                StringBuilder strSQL = new StringBuilder();
+                strSQL.Append(" SELECT");
+                strSQL.Append(" Distinct Division.NameCode");
+                strSQL.Append(" , Division.NameString");
+                strSQL.Append(" FROM DivisionMaster As Division");
+                strSQL.Append(" Inner Join orderersmaster As Orders");
+                strSQL.AppendFormat("  On Orders.OrderCotegory = Division.NameCode");
+                strSQL.Append(" Inner Join constructionbaseinfo As Calc");
+                strSQL.Append("        On Calc.OrderersDivision = Orders.OrderCotegory");
+                strSQL.Append("        And Calc.OrderersCode = Orders.OrderersCode");
+                // 条件により当期より5年前をセット
+                strSQL.Append(SetBeforeYear());
+                // 評価点０を除外する
+                strSQL.Append(ZeroExclude());
+
+                strSQL.Append(" Inner Join constructiontypemaster As Type");
+                strSQL.Append("        On Type.TypeCode = Calc.ConstructionType");
+                strSQL.AppendFormat("  And Type.PublicFlg = {0}", (int)ConstructionTypeMaster.PublicFlgDef.Community);
+                strSQL.Append(" Where");
+                strSQL.AppendFormat(" Division.DivisionCode = {0}", (int)DivisionMaster.DivisionMasterCodeDef.OrderDivision);
+                strSQL.Append(" Order By Division.NameCode");
+
+                ArrayList arList = new ArrayList();
+                if (!DiviDB.ExecuteReader(strSQL.ToString(), ref arList)) return;
+
+                List<KeyValuePair<int, string>> DataList = new List<KeyValuePair<int, string>>();
+                DataList.Add(new KeyValuePair<int, string>(0, ""));
+
+                foreach (object[] work in arList)
+                {
+                    int NameCode = CommonMotions.cnvInt(work[0]);
+                    string NameString = CommonMotions.cnvString(work[1]);
+                    KeyValuePair<int, string> keyval = new KeyValuePair<int, string>(NameCode, NameString);
+
+                    DataList.Add(keyval);
+                }
+
+                this.cmbDivision.DataSource = null;
+                this.cmbDivision.Items.Clear();
+                this.cmbDivision.Text = "";
+
+                // コンボボックス初期表示
+                ComboBoxAction.InitDataSetCombBox(cmbDivision, DataList);
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("システムエラー：{0}：{1}", CommonMotions.GetMethodName(), ex.Message);
+            }
+            finally
+            {
+                DiviDB.close(); DiviDB = null;
+            }
+        }
+        #endregion
+
+        #region 発注者コンボボックスをセットする
+        /// <summary>
+        /// 発注者コンボボックスへ文字をセットする
+        /// </summary>
+        private void SetcmbCode()
+        {
+            IOMOrderers OrderDB = new IOMOrderers();
+            try
+            {
+                int nDivixionCode = CommonMotions.cnvInt(cmbDivision.SelectedValue);
+                StringBuilder strSQL = new StringBuilder();
+                strSQL.Append("SELECT Distinct Orders.OrderersCode");
+                strSQL.Append(", Concat(Orders.OrderersName1, ' ', Orders.OrderersName2)");
+                strSQL.Append(" FROM orderersmaster As Orders");
+                strSQL.Append(" Inner Join constructionbaseinfo As Calc");
+                strSQL.Append("        On Calc.OrderersDivision = Orders.OrderCotegory");
+                strSQL.Append("        And Calc.OrderersCode = Orders.OrderersCode");
+                // 条件により当期より5年前をセット
+                strSQL.Append(SetBeforeYear());
+                // 評価点０を除外する
+                strSQL.Append(ZeroExclude());
+
+                strSQL.Append(" Inner Join constructiontypemaster As Type");
+                strSQL.Append("        On Type.TypeCode = Calc.ConstructionType");
+                strSQL.AppendFormat("  And Type.PublicFlg = {0}", (int)ConstructionTypeMaster.PublicFlgDef.Community);
+                strSQL.Append(" Where");
+                strSQL.AppendFormat(" Orders.OrderCotegory = {0}", nDivixionCode);
+                strSQL.Append(" Order By Orders.OrderersCode");
+  
+                // 発注者マスタ読込
+                ArrayList workList = new ArrayList();
+                if (!OrderDB.ExecuteReader(strSQL.ToString(), ref workList)) return;
+
+                List<KeyValuePair<int, string>> DataList = new List<KeyValuePair<int, string>>();
+                DataList.Add(new KeyValuePair<int, string>(0, ""));
+
+                foreach (object[] work in workList)
+                {
+                    int OrderersCode = CommonMotions.cnvInt(work[0]);
+                    string NameString = CommonMotions.cnvString(work[1]);
+                    KeyValuePair<int, string> keyval = new KeyValuePair<int, string>(OrderersCode, NameString);
+
+                    DataList.Add(keyval);
+                }
+
+                cmbCode.DataSource = null;
+                cmbCode.Items.Clear();
+                cmbCode.Text = "";
+
+                // コンボボックス初期表示
+                ComboBoxAction.InitDataSetCombBox(cmbCode, DataList);
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("システムエラー：{0}：{1}", CommonMotions.GetMethodName(), ex.Message);
+            }
+            finally
+            {
+                OrderDB.close(); OrderDB = null;
+            }
+        }
+        #endregion
+
+        #region データ表示
+        /// <summary>
+        /// 集計エリア位置
+        /// </summary>
+        private enum SumArea
+        {
+            Person = 0,
+            Division,
+            Order,
+        }
+        /// <summary>
+        /// データ表示
+        /// </summary>
+        private void DataDisplay()
+        {
+            DataGridView dgv = dgvAverage;
+            try
+            {
+                dgv.Rows.Clear();
+
+                // 表示データ
+                ArrayList ScoreData = new ArrayList();
+
+                // データ読込み
+                if (!ReadTable(ref ScoreData)) return;
+
+                int nNo = 0;
+                int nArrayCnt = Enum.GetNames(typeof(SumArea)).Length;
+
+                int[] BreakKey = new int[nArrayCnt];
+                decimal[] SumScore = new decimal[nArrayCnt];
+                int[] ScoreCount = new int[nArrayCnt];
+
+                int[] GetCode = new int[nArrayCnt];
+                string[] GetName = new string[nArrayCnt];
+
+                foreach (object[] ObjRec in ScoreData)
+                {
+                    GetCode[(int)SumArea.Person] = CommonMotions.cnvInt(ObjRec[(int)GetDataOrder.ConstrManCode]);
+                    GetCode[(int)SumArea.Division] = CommonMotions.cnvInt(ObjRec[(int)GetDataOrder.DivisionCode]);
+                    GetCode[(int)SumArea.Order] = CommonMotions.cnvInt(ObjRec[(int)GetDataOrder.OrderersCode]);
+
+                    GetName[(int)SumArea.Person] = CommonMotions.cnvString(ObjRec[(int)GetDataOrder.ManName]);
+                    GetName[(int)SumArea.Division] = CommonMotions.cnvString(ObjRec[(int)GetDataOrder.DivisionName]);
+                    GetName[(int)SumArea.Order] = CommonMotions.cnvString(ObjRec[(int)GetDataOrder.OrderersName]);
+
+                    int nConstrCode = CommonMotions.cnvInt(ObjRec[(int)GetDataOrder.ConstrCode]);
+                    string strConstrName = CommonMotions.cnvString(ObjRec[(int)GetDataOrder.ConstrName]);
+                    decimal decScore = CommonMotions.cnvDecimal(ObjRec[(int)GetDataOrder.EvaluationScore]);
+
+                    int nIndex = dgv.Rows.Add(1);
+                    DataGridViewRow CurRow = dgv.Rows[nIndex];
+
+                    // 表示コントロールブレイク処理
+                    CtrlBrkProc(nIndex, GetName, GetCode, ref BreakKey);
+
+                    // データセット
+                    CurRow.Cells[(int)DispGrid.DivisionCode].Value = GetCode[(int)SumArea.Division];
+                    CurRow.Cells[(int)DispGrid.OrderCode].Value = GetCode[(int)SumArea.Order];
+                    CurRow.Cells[(int)DispGrid.ManCode].Value = GetCode[(int)SumArea.Person];
+                    CurRow.Cells[(int)DispGrid.ConstrCode].Value = nConstrCode;
+
+                    CurRow.Cells[(int)DispGrid.No].Value = ++nNo;
+                    CurRow.Cells[(int)DispGrid.ConstrName].Value = strConstrName;
+                    CurRow.Cells[(int)DispGrid.ConstScore].Value = decScore.ToString("0.0");
+                }
+
+                // 最終平均値セット
+                if (ScoreData.Count > 0)
+                {
+                    int DivisionKey = BreakKey[(int)SumArea.Division];
+                    int OrderKey = BreakKey[(int)SumArea.Order];
+                    int PersonKey = BreakKey[(int)SumArea.Person];
+                    DataGridViewRow PersonRow = dgv.Rows
+                                                .Cast<DataGridViewRow>()
+                                                .Where(x => CommonMotions.cnvInt(x.Cells[(int)DispGrid.DivisionCode].Value) == DivisionKey
+                                                            && CommonMotions.cnvInt(x.Cells[(int)DispGrid.OrderCode].Value) == OrderKey
+                                                            && CommonMotions.cnvInt(x.Cells[(int)DispGrid.ManCode].Value) == PersonKey)
+                                                .First();
+                    // 担当者平均点表示
+                    CtrlBrkProcType1Person(PersonRow.Index, GetName, ref GetCode, ref BreakKey, true);
+
+                    DataGridViewRow OrderRow = dgv.Rows
+                                                .Cast<DataGridViewRow>()
+                                                .Where(x => CommonMotions.cnvInt(x.Cells[(int)DispGrid.DivisionCode].Value) == DivisionKey
+                                                            && CommonMotions.cnvInt(x.Cells[(int)DispGrid.OrderCode].Value) == OrderKey)
+                                                .First();
+                    // 発注者平均区分表示
+                    CtrlBrkProcType1Order(OrderRow.Index, GetName, ref GetCode, ref BreakKey, true);
+
+                    DataGridViewRow DiviRow = dgv.Rows
+                                                .Cast<DataGridViewRow>()
+                                                .Where(x => CommonMotions.cnvInt(x.Cells[(int)DispGrid.DivisionCode].Value) == DivisionKey)
+                                                .First();
+                    // 発注者平均区分表示
+                    CtrlBrkProcType1Division(DiviRow.Index, GetName, ref GetCode, ref BreakKey, true);
+                }
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("システムエラー：{0}：{1}", CommonMotions.GetMethodName(), ex.Message);
+            }
+            finally
+            {
+                if (dgv.RowCount < s_RowDefault)
+                {
+                    dgv.RowCount += (s_RowDefault - dgv.RowCount);
+                }
+            }
+        }
+        #endregion
+
+        #region データ読込み
+        /// <summary>
+        /// データ読込み
+        /// </summary>
+        /// <returns></returns>
+        private bool ReadTable(ref ArrayList ScoreData)
+        {
+            IOAllFreeSQL FreeDB = new IOAllFreeSQL();
+            try
+            {
+                ScoreData.Clear();
+
+                StringBuilder strSQL = new StringBuilder();
+                strSQL.Append(CreateSQLString());
+
+                if (!FreeDB.ExecuteReader(strSQL.ToString(), ref ScoreData)) return false;
+
+                return true;
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("システムエラー：{0}：{1}", CommonMotions.GetMethodName(), ex.Message);
+                return false;
+            }
+            finally
+            {
+                FreeDB.close(); FreeDB = null;
+            }
+        }
+        #endregion
+
+        #region 読込データ並び
+        /// <summary>
+        /// 読込データ並び
+        /// </summary>
+        private enum GetDataOrder
+        {
+            ConstrManCode = 0,
+            ManName,
+            ManDispOrder,
+            DivisionCode,
+            DivisionName,
+            DivisionDispOrder,
+            OrderersCode,
+            OrderersName,
+            OrdersDispOrder,
+            ConstrCode,
+            ConstrName,
+            EvaluationScore,
+        }
+        #endregion
+
+        #region データ取得SQL作成
+        /// <summary>
+        /// データ取得SQL作成
+        /// </summary>
+        /// <returns></returns>
+        private string CreateSQLString()
+        {
+            try
+            {
+                StringBuilder strSQL = new StringBuilder();
+                strSQL.Append("Select");
+                strSQL.Append(" Calc.ConstructionPersonCode");
+                strSQL.Append(", Man.PersonName");
+                strSQL.Append(", Man.DisplayOrder");
+                strSQL.Append(", Calc.OrderersDivision");
+                strSQL.Append(", Division.NameString");
+                strSQL.Append(", Division.DisplayOrder");
+                strSQL.Append(", Calc.OrderersCode");
+                strSQL.Append(", CONCAT(Orders.OrderersName1, ' ', Orders.OrderersName2)");
+                strSQL.Append(", Orders.DisplayOrder");
+                strSQL.Append(", Calc.ConstructionCode");
+                strSQL.Append(", ConstrName.DetailString");
+                strSQL.Append(", Calc.EvaluationScore");
+                strSQL.Append(" From constructionbaseinfo As Calc");
+                strSQL.Append("      Inner Join constructiontypemaster As Type");
+                strSQL.Append("            On Type.TypeCode = Calc.ConstructionType");
+                strSQL.AppendFormat("      And Type.PublicFlg = {0}", (int)ConstructionTypeMaster.PublicFlgDef.Community);
+                strSQL.Append("      Inner Join divisionmaster As Division");
+                strSQL.AppendFormat("      On Division.DivisionCode = {0}", (int)DivisionMaster.DivisionMasterCodeDef.OrderDivision);
+                strSQL.Append("            And Division.NameCode = Calc.OrderersDivision");
+                strSQL.Append("      Inner Join orderersmaster As Orders");
+                strSQL.Append("            On Orders.OrderCotegory = Division.NameCode");
+                strSQL.Append("            And Orders.OrderersCode = Calc.OrderersCode");
+                strSQL.Append("      Inner Join personinchargemaster As Man");
+                strSQL.Append("            On Man.PersonCode = Calc.ConstructionPersonCode");
+                strSQL.AppendFormat("      And Man.DeleteFlg = {0}", (int)CommonDefine.DataDeleteDef.Exists);
+                strSQL.Append("      Inner Join constructionbaseinfodetail As ConstrName");
+                strSQL.Append("            On ConstrName.ConstructionCode = Calc.ConstructionCode");
+                strSQL.AppendFormat("      And ConstrName.DetailNo = {0}", (int)ConstructionBaseInfoDetail.DataNoDef.ConstructionName);
+                strSQL.Append(" Where");
+                strSQL.AppendFormat(" Calc.TyingFlg != {0}", (int)ConstructionBaseInfo.TyingFlgDef.Tying);
+                // 条件により当期より5年前をセット
+                strSQL.Append(SetBeforeYear());
+                // 評価点０を除外する
+                strSQL.Append(ZeroExclude());
+
+                int iStatus = CommonDefine.ProjectsStatus.First(x => x.Value.Equals("非 受 注")).Key;
+                strSQL.Append(" And");
+                strSQL.AppendFormat(" Calc.ConstructionStatusFlg != {0}", iStatus);
+
+                // 発注者区分がある場合
+                if (cmbDivision.Text.Length > 0)
+                {
+                    strSQL.AppendFormat(" And Division.NameCode = {0}", cmbDivision.SelectedValue);
+                }
+                // 発注者がある場合
+                if (cmbCode.Text.Length > 0)
+                {
+                    strSQL.AppendFormat(" And Orders.OrderersCode = {0}", cmbCode.SelectedValue);
+                }
+
+                // 発注区分・担当者によって並びを変える
+                if (radioButton1.Checked)
+                {
+                    strSQL.Append(" Order By");
+                    strSQL.Append("      Division.DisplayOrder");
+                    strSQL.Append("      , Orders.DisplayOrder");
+                    strSQL.Append("      , Man.DisplayOrder");
+                    strSQL.Append("      , Calc.OrderDate");
+                }
+                else
+                {
+                    strSQL.Append(" Order By");
+                    strSQL.Append("        Man.DisplayOrder");
+                    strSQL.Append("      , Division.DisplayOrder");
+                    strSQL.Append("      , Orders.DisplayOrder");
+                    strSQL.Append("      , Calc.OrderDate");
+                }
+
+                return strSQL.ToString();
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("システムエラー：{0}：{1}", CommonMotions.GetMethodName(), ex.Message);
+                return string.Empty;
+            }
+        }
+        #endregion
+
+        #region 表示コントロールブレイク処理
+        /// <summary>
+        /// 表示コントロールブレイク処理
+        /// </summary>
+        private void CtrlBrkProc(int nIndex, string[] GetName, int[] GetCode, ref int[] BreakKey)
+        {
+            try
+            {
+                if (radioButton1.Checked)
+                {
+                    CtrlBrkProcType1(nIndex, GetName, ref GetCode, ref BreakKey);
+                }
+                else
+                {
+                    CtrlBrkProcType2(nIndex, GetName, ref GetCode, ref BreakKey);
+                }
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("システムエラー：{0}：{1}", CommonMotions.GetMethodName(), ex.Message);
+            }
+        }
+        #endregion
+
+        #region 発注者別コントロールブレイク
+        /// <summary>
+        /// 発注者別コントロールブレイク
+        /// </summary>
+        private void CtrlBrkProcType1(int nIndex, string[] GetName, ref int[] GetCode, ref int[] BreakKey)
+        {
+            try
+            {
+                bool[] bExecute = new bool[] { false, false, false };
+                // ブレイク条件の上から比較する
+                if(GetCode[(int)SumArea.Division] != BreakKey[(int)SumArea.Division])
+                {
+                    bExecute[0] = true;
+                    bExecute[1] = true;
+                    bExecute[2] = true;
+                }
+                else if (GetCode[(int)SumArea.Order] != BreakKey[(int)SumArea.Order])
+                {
+                    bExecute[0] = true;
+                    bExecute[1] = true;
+                }
+                else if (GetCode[(int)SumArea.Person] != BreakKey[(int)SumArea.Person])
+                {
+                    bExecute[0] = true;
+                }
+
+                // 担当者平均点表示
+                if (bExecute[0]) CtrlBrkProcType1Person(nIndex, GetName, ref GetCode, ref BreakKey);
+
+                // 発注者平均区分表示
+                if (bExecute[1]) CtrlBrkProcType1Order(nIndex, GetName, ref GetCode, ref BreakKey);
+
+                // 発注者平均区分表示
+                if (bExecute[2]) CtrlBrkProcType1Division(nIndex, GetName, ref GetCode, ref BreakKey);
+
+                // ----- 新キーセット
+                if (bExecute[0]) BreakKey[(int)SumArea.Person] = GetCode[(int)SumArea.Person];
+
+                if (bExecute[1]) BreakKey[(int)SumArea.Order] = GetCode[(int)SumArea.Order];
+
+                if (bExecute[2]) BreakKey[(int)SumArea.Division] = GetCode[(int)SumArea.Division];
+
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("システムエラー：{0}：{1}", CommonMotions.GetMethodName(), ex.Message);
+            }
+        }
+        #endregion
+
+        #region 発注区分別コントロールブレイク発注区分平均点表示
+        /// <summary>
+        /// 発注区分別コントロールブレイク発注者平均区分表示
+        /// </summary>
+        private void CtrlBrkProcType1Division(int nIndex, string[] GetName, ref int[] GetCode, ref int[] BreakKey, bool bLast = false)
+        {
+            DataGridView dgv = dgvAverage;
+            try
+            {
+                // 先頭は抜ける
+                if (!bLast && nIndex < 1) return;
+
+                // ----- 発注区分平均値
+                int DivisionKey = BreakKey[(int)SumArea.Division];
+                DataGridViewRow DiviRow = dgv.Rows
+                                            .Cast<DataGridViewRow>()
+                                            .Where(x => CommonMotions.cnvInt(x.Cells[(int)DispGrid.DivisionCode].Value) == DivisionKey)
+                                            .First();
+                if (DiviRow == null) return;
+
+                // 発注区分平均値セット
+                double dAvgDivi = dgv.Rows
+                                .Cast<DataGridViewRow>()
+                                .Where(x => CommonMotions.cnvInt(x.Cells[(int)DispGrid.DivisionCode].Value) == DivisionKey)
+                                .Average(y => CommonMotions.cnvDouble(y.Cells[(int)DispGrid.ConstScore].Value));
+
+                // 発注区分平均値セット
+                DiviRow.Cells[(int)DispGrid.DiviAvgScore].Value = dAvgDivi.ToString("0.0");
+
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("システムエラー：{0}：{1}", CommonMotions.GetMethodName(), ex.Message);
+            }
+            finally
+            {
+                if (nIndex >= 0)
+                {
+
+                    // 名前のセット
+                    DataGridViewRow CurRow = dgv.Rows[nIndex];
+                    CurRow.Cells[(int)DispGrid.DiviName].Value = GetName[(int)SumArea.Division];
+                }
+            }
+        }
+        #endregion
+
+        #region 発注者別コントロールブレイク発注者平均点表示
+        /// <summary>
+        /// 発注者別コントロールブレイク発注者平均点表示
+        /// </summary>
+        private void CtrlBrkProcType1Order(int nIndex, string[] GetName, ref int[] GetCode, ref int[] BreakKey, bool bLast = false)
+        {
+            DataGridView dgv = dgvAverage;
+            try
+            {
+                // 先頭は抜ける
+                if (!bLast && nIndex < 1) return;
+
+                // ----- 発注者平均値
+                int DivisionKey = BreakKey[(int)SumArea.Division];
+                int OrderKey = BreakKey[(int)SumArea.Order];
+                DataGridViewRow OrderRow = dgv.Rows
+                                            .Cast<DataGridViewRow>()
+                                            .Where(x => CommonMotions.cnvInt(x.Cells[(int)DispGrid.DivisionCode].Value) == DivisionKey
+                                                        && CommonMotions.cnvInt(x.Cells[(int)DispGrid.OrderCode].Value) == OrderKey)
+                                            .First();
+                if (OrderRow == null) return;
+
+                // 発注者平均値セット
+                double dAvgOrder = dgv.Rows
+                                .Cast<DataGridViewRow>()
+                                .Where(x => CommonMotions.cnvInt(x.Cells[(int)DispGrid.DivisionCode].Value) == DivisionKey
+                                            && CommonMotions.cnvInt(x.Cells[(int)DispGrid.OrderCode].Value) == OrderKey)
+                                .Average(y => CommonMotions.cnvDouble(y.Cells[(int)DispGrid.ConstScore].Value));
+
+                // 発注者平均値セット
+                OrderRow.Cells[(int)DispGrid.OrderAvgScore].Value = dAvgOrder.ToString("0.0");
+
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("システムエラー：{0}：{1}", CommonMotions.GetMethodName(), ex.Message);
+            }
+            finally
+            {
+                if (nIndex >= 0)
+                {
+                    // 名前のセット
+                    DataGridViewRow CurRow = dgv.Rows[nIndex];
+                    CurRow.Cells[(int)DispGrid.OrderName].Value = GetName[(int)SumArea.Order];
+                }
+            }
+        }
+        #endregion
+
+        #region 発注者別コントロールブレイク担当者平均点表示
+        /// <summary>
+        /// 発注者別コントロールブレイク担当者平均点表示
+        /// </summary>
+        private void CtrlBrkProcType1Person(int nIndex, string[] GetName, ref int[] GetCode, ref int[] BreakKey, bool bLast = false)
+        {
+            DataGridView dgv = dgvAverage;
+            try
+            {
+                // 先頭は抜ける
+                if (!bLast && nIndex < 1) return;
+
+                // ----- 担当者平均値
+                int DivisionKey = BreakKey[(int)SumArea.Division];
+                int OrderKey = BreakKey[(int)SumArea.Order];
+                int PersonKey = BreakKey[(int)SumArea.Person];
+                DataGridViewRow PersonRow = dgv.Rows
+                                            .Cast<DataGridViewRow>()
+                                            .Where(x => CommonMotions.cnvInt(x.Cells[(int)DispGrid.DivisionCode].Value) == DivisionKey
+                                                        && CommonMotions.cnvInt(x.Cells[(int)DispGrid.OrderCode].Value) == OrderKey
+                                                        && CommonMotions.cnvInt(x.Cells[(int)DispGrid.ManCode].Value) == PersonKey)
+                                            .First();
+                if (PersonRow == null) return;
+
+                // 担当者者平均値セット
+                double dAvgPerson = dgv.Rows
+                                .Cast<DataGridViewRow>()
+                                .Where(x => CommonMotions.cnvInt(x.Cells[(int)DispGrid.DivisionCode].Value) == DivisionKey
+                                            && CommonMotions.cnvInt(x.Cells[(int)DispGrid.OrderCode].Value) == OrderKey
+                                            && CommonMotions.cnvInt(x.Cells[(int)DispGrid.ManCode].Value) == PersonKey)
+                                .Average(y => CommonMotions.cnvDouble(y.Cells[(int)DispGrid.ConstScore].Value));
+
+                // 発注者平均値セット
+                PersonRow.Cells[(int)DispGrid.ManAvgScore1].Value = dAvgPerson.ToString("0.0");
+                PersonRow.Cells[(int)DispGrid.ManAvgScore2].Value = dAvgPerson.ToString("0.0");
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("システムエラー：{0}：{1}", CommonMotions.GetMethodName(), ex.Message);
+            }
+            finally
+            {
+                if (nIndex >= 0)
+                {
+                    // 名前のセット
+                    DataGridViewRow CurRow = dgv.Rows[nIndex];
+                    CurRow.Cells[(int)DispGrid.ManName1].Value = GetName[(int)SumArea.Person];
+                    CurRow.Cells[(int)DispGrid.ManName2].Value = GetName[(int)SumArea.Person];
+                }
+            }
+        }
+        #endregion
+
+        #region 担当者者別コントロールブレイク
+        /// <summary>
+        /// 担当者者別コントロールブレイク
+        /// </summary>
+        private void CtrlBrkProcType2(int nIndex, string[] GetName, ref int[] GetCode, ref int[] BreakKey)
+        {
+            try
+            {
+                bool[] bExecute = new bool[] { false, false, false };
+                // ブレイク条件の上から比較する
+                if (GetCode[(int)SumArea.Person] != BreakKey[(int)SumArea.Person])
+                {
+                    bExecute[0] = true;
+                    bExecute[1] = true;
+                    bExecute[2] = true;
+                }
+                else if (GetCode[(int)SumArea.Division] != BreakKey[(int)SumArea.Division])
+                {
+                    bExecute[0] = true;
+                    bExecute[1] = true;
+                }
+                else if (GetCode[(int)SumArea.Order] != BreakKey[(int)SumArea.Order])
+                {
+                    bExecute[0] = true;
+                }
+
+                // 発注者平均区分表示
+                if (bExecute[0]) CtrlBrkProcType2Division(nIndex, GetName, ref GetCode, ref BreakKey);
+
+                // 発注者平均区分表示
+                if (bExecute[1]) CtrlBrkProcType2Order(nIndex, GetName, ref GetCode, ref BreakKey);
+
+                // 担当者平均点表示
+                if (bExecute[2]) CtrlBrkProcType2Person(nIndex, GetName, ref GetCode, ref BreakKey);
+
+                // ----- 新キーセット
+                if (bExecute[0]) BreakKey[(int)SumArea.Division] = GetCode[(int)SumArea.Division];
+
+                if (bExecute[1]) BreakKey[(int)SumArea.Order] = GetCode[(int)SumArea.Order];
+
+                if (bExecute[2]) BreakKey[(int)SumArea.Person] = GetCode[(int)SumArea.Person];
+
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("システムエラー：{0}：{1}", CommonMotions.GetMethodName(), ex.Message);
+            }
+        }
+        #endregion
+
+        #region 担当者者別コントロールブレイク担当者平均点表示
+        /// <summary>
+        /// 担当者者別コントロールブレイク担当者平均点表示
+        /// </summary>
+        private void CtrlBrkProcType2Person(int nIndex, string[] GetName, ref int[] GetCode, ref int[] BreakKey, bool bLast = false)
+        {
+            DataGridView dgv = dgvAverage;
+            try
+            {
+                // 先頭は抜ける
+                if (!bLast && nIndex < 1) return;
+
+                // ----- 担当者平均値
+                int PersonKey = BreakKey[(int)SumArea.Person];
+                DataGridViewRow PersonRow = dgv.Rows
+                                            .Cast<DataGridViewRow>()
+                                            .Where(x => CommonMotions.cnvInt(x.Cells[(int)DispGrid.ManCode].Value) == PersonKey)
+                                            .First();
+                if (PersonRow == null) return;
+
+                // 担当者者平均値セット
+                double dAvgPerson = dgv.Rows
+                                .Cast<DataGridViewRow>()
+                                .Where(x => CommonMotions.cnvInt(x.Cells[(int)DispGrid.ManCode].Value) == PersonKey)
+                                .Average(y => CommonMotions.cnvDouble(y.Cells[(int)DispGrid.ConstScore].Value));
+
+                // 発注者平均値セット
+                PersonRow.Cells[(int)DispGrid.ManAvgScore1].Value = dAvgPerson.ToString("0.0");
+                PersonRow.Cells[(int)DispGrid.ManAvgScore2].Value = dAvgPerson.ToString("0.0");
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("システムエラー：{0}：{1}", CommonMotions.GetMethodName(), ex.Message);
+            }
+            finally
+            {
+                if (nIndex >= 0)
+                {
+                    // 名前のセット
+                    DataGridViewRow CurRow = dgv.Rows[nIndex];
+                    CurRow.Cells[(int)DispGrid.ManName1].Value = GetName[(int)SumArea.Person];
+                    CurRow.Cells[(int)DispGrid.ManName2].Value = GetName[(int)SumArea.Person];
+                }
+            }
+        }
+        #endregion
+
+        #region 発注区分別コントロールブレイク発注区分平均点表示
+        /// <summary>
+        /// 発注区分別コントロールブレイク発注者平均区分表示
+        /// </summary>
+        private void CtrlBrkProcType2Division(int nIndex, string[] GetName, ref int[] GetCode, ref int[] BreakKey, bool bLast = false)
+        {
+            DataGridView dgv = dgvAverage;
+            try
+            {
+                // 先頭は抜ける
+                if (!bLast && nIndex < 1) return;
+
+                // ----- 発注区分平均値
+                int PersonKey = BreakKey[(int)SumArea.Person];
+                int DivisionKey = BreakKey[(int)SumArea.Division];
+                DataGridViewRow DiviRow = dgv.Rows
+                                            .Cast<DataGridViewRow>()
+                                            .Where(x => CommonMotions.cnvInt(x.Cells[(int)DispGrid.ManCode].Value) == PersonKey
+                                                        && CommonMotions.cnvInt(x.Cells[(int)DispGrid.DivisionCode].Value) == DivisionKey)
+                                            .First();
+                if (DiviRow == null) return;
+
+                // 発注区分平均値セット
+                double dAvgDivi = dgv.Rows
+                                .Cast<DataGridViewRow>()
+                                .Where(x => CommonMotions.cnvInt(x.Cells[(int)DispGrid.ManCode].Value) == PersonKey
+                                            && CommonMotions.cnvInt(x.Cells[(int)DispGrid.DivisionCode].Value) == DivisionKey)
+                                .Average(y => CommonMotions.cnvDouble(y.Cells[(int)DispGrid.ConstScore].Value));
+
+                // 発注区分平均値セット
+                DiviRow.Cells[(int)DispGrid.DiviAvgScore].Value = dAvgDivi.ToString("0.0");
+
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("システムエラー：{0}：{1}", CommonMotions.GetMethodName(), ex.Message);
+            }
+            finally
+            {
+                if (nIndex >= 0)
+                {
+
+                    // 名前のセット
+                    DataGridViewRow CurRow = dgv.Rows[nIndex];
+                    CurRow.Cells[(int)DispGrid.DiviName].Value = GetName[(int)SumArea.Division];
+                }
+            }
+        }
+        #endregion
+
+        #region 担当者者別コントロールブレイク発注者平均点表示
+        /// <summary>
+        /// 担当者者別コントロールブレイク発注者平均点表示
+        /// </summary>
+        private void CtrlBrkProcType2Order(int nIndex, string[] GetName, ref int[] GetCode, ref int[] BreakKey, bool bLast = false)
+        {
+            DataGridView dgv = dgvAverage;
+            try
+            {
+                // 先頭は抜ける
+                if (!bLast && nIndex < 1) return;
+
+                // ----- 発注者平均値
+                int PersonKey = BreakKey[(int)SumArea.Person];
+                int DivisionKey = BreakKey[(int)SumArea.Division];
+                int OrderKey = BreakKey[(int)SumArea.Order];
+                DataGridViewRow OrderRow = dgv.Rows
+                                            .Cast<DataGridViewRow>()
+                                            .Where(x => CommonMotions.cnvInt(x.Cells[(int)DispGrid.ManCode].Value) == PersonKey
+                                                        && CommonMotions.cnvInt(x.Cells[(int)DispGrid.DivisionCode].Value) == DivisionKey
+                                                        && CommonMotions.cnvInt(x.Cells[(int)DispGrid.OrderCode].Value) == OrderKey)
+                                            .First();
+                if (OrderRow == null) return;
+
+                // 発注者平均値セット
+                double dAvgOrder = dgv.Rows
+                                .Cast<DataGridViewRow>()
+                                .Where(x => CommonMotions.cnvInt(x.Cells[(int)DispGrid.ManCode].Value) == PersonKey
+                                            && CommonMotions.cnvInt(x.Cells[(int)DispGrid.DivisionCode].Value) == DivisionKey
+                                            && CommonMotions.cnvInt(x.Cells[(int)DispGrid.OrderCode].Value) == OrderKey)
+                                .Average(y => CommonMotions.cnvDouble(y.Cells[(int)DispGrid.ConstScore].Value));
+
+                // 発注者平均値セット
+                OrderRow.Cells[(int)DispGrid.OrderAvgScore].Value = dAvgOrder.ToString("0.0");
+
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("システムエラー：{0}：{1}", CommonMotions.GetMethodName(), ex.Message);
+            }
+            finally
+            {
+                if (nIndex >= 0)
+                {
+                    // 名前のセット
+                    DataGridViewRow CurRow = dgv.Rows[nIndex];
+                    CurRow.Cells[(int)DispGrid.OrderName].Value = GetName[(int)SumArea.Order];
+                }
+            }
+        }
+        #endregion
+    }
+}
Index: trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstractionList/FrmConstructionListAuxiliary.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstractionList/FrmConstructionListAuxiliary.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstractionList/FrmConstructionListAuxiliary.cs	(revision 484)
@@ -1461,8 +1461,12 @@
                 DataGridViewEX dgv = dgvMaster;
                 ProgressBar.Maximum = arData.Count;
 
+                int DataCount = arData.Cast<object[]>().GroupBy(x => CommonMotions.cnvInt(x[(int)GetData.CONSTRUCTIONSTATUSFLG])).Count();
+                DataGridViewRow[] DataRowSet = new DataGridViewRow[arData.Count + (DataCount - 1)];
+
                 // �f�[�^�\��
-                int ino = 1;
+                int ino = 0;
+                int iy = 0;
                 int StatusFlg = -1;
                 bool initFlg = true;
                 string strStatus = string.Empty;
@@ -1482,7 +1486,12 @@
                     {
                         StatusFlg = nWorkFlg;
                         strStatus = CommonDefine.ProjectsStatus[StatusFlg];
-                        if (!initFlg) dgv.Rows.Add(1);
+                        if (!initFlg)
+                        {
+                            DataGridViewRow EmptyRow = new DataGridViewRow();
+                            EmptyRow.CreateCells(dgv);
+                            DataRowSet[iy++] = EmptyRow;
+                        }
                         initFlg = false;
                     }
 
@@ -1497,10 +1506,10 @@
                     else
                         nYear = CommonMotions.cnvInt(objwrk[(int)GetData.CONSTRUCTIONYEAR]);
 
-                    int RowCnt = dgv.Rows.Add(1);
-                    DataGridViewRow CurRow = dgv.Rows[RowCnt];
+                    DataGridViewRow CurRow = new DataGridViewRow();
+                    CurRow.CreateCells(dgv);
 
-                    CurRow.Cells[(int)DispColumn.No].Value = (ino++);
+                    CurRow.Cells[(int)DispColumn.No].Value = (++ino);
                     CurRow.Cells[(int)DispColumn.SalesDepartment].Value = strSalesDepName;
                     CurRow.Cells[(int)DispColumn.SalesPerson].Value = strSalesName;
                     CurRow.Cells[(int)DispColumn.ConstructionDepartment].Value = strConstDepName;
@@ -1515,10 +1524,14 @@
                     // �Z���F��ς���
                     CellColorChenge(CurRow, objwrk);
 
+                    DataRowSet[iy++] = CurRow;
+
                     // ProgressBar�̒l��ύX����
                     ProgressBar.Value = (ino - 1);
                     ProgressBar.Update();
                 }
+                // �O���b�h�Z�b�g
+                dgv.Rows.AddRange(DataRowSet);
 
                 // ProgressBar�̒l��ύX����
                 ProgressBar.Value = ProgressBar.Maximum;
@@ -1824,10 +1837,13 @@
                     btnStageUp.Visible = false;
 
                 // �H�����ȊO�̓R�s�[�{�^����\�����Ȃ�
-                if (m_ExecuteFlg == (int)ClsExcute.ProcessExecuteNo.ConstructionBaseInfo)
-                    btnDataCopy.Visible = true;
-                else
-                    btnDataCopy.Visible = false;
+                if (!bDisp)
+                {
+                    if (m_ExecuteFlg == (int)ClsExcute.ProcessExecuteNo.ConstructionBaseInfo)
+                        btnDataCopy.Visible = true;
+                    else
+                        btnDataCopy.Visible = false;
+                }
 
                 this.Update();
             }
Index: trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionBaseInfo/FrmConstructionBaseInfo.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionBaseInfo/FrmConstructionBaseInfo.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionBaseInfo/FrmConstructionBaseInfo.cs	(revision 484)
@@ -404,6 +404,10 @@
             /// 88:�c�ƕ��S���҃R�[�h
             /// </summary>
             SalesSubPersonCode,
+            /// <summary>
+            /// 89:�����H���]���_
+            /// </summary>
+            EvaluationScore,
         }
         #endregion
 
@@ -721,7 +725,7 @@
                         {false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false},     // 86:��������������
                         {false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false},     // 87:�c�ƕ��S������
                         {false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false},     // 88:�c�ƕ��S���҃R�[�h
-
+                        {false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false},     // 89:�����H���]���_
         };
         #endregion
 
@@ -840,6 +844,7 @@
                         { false, false, false, false, false, false, false, false, false, true,  false, false, false, false, false, false, false, false},    // 86:��������������
                         { true,  false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false},    // 87:�c�ƕ��S������
                         { true,  false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false},    // 88:�c�ƕ��S���҃R�[�h
+                        { false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false},    // 89:�����H���]���_
 
                         //  0      1      2      3      4      5      6      7      8      9     10      11     12     13     14     15     16     17
                         { true,  false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false},    // �y�ŏI�z+ 1:����Ńt���O
@@ -2275,5 +2280,18 @@
             SetProgressRateColor(sender);
         }
         #endregion
+
+        #region �ߋ��f�[�^�{�^������
+        /// <summary>
+        /// �ߋ��f�[�^�{�^������
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        private void btnOldYear_Click(object sender, EventArgs e)
+        {
+            /// �ߋ��P�O�N�܂ŔN���Z�b�g����
+            SetOldYear();
+        }
+        #endregion
     }
 }
\ No newline at end of file
Index: trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionBaseInfo/FrmConstructionBaseInfo.designer.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionBaseInfo/FrmConstructionBaseInfo.designer.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionBaseInfo/FrmConstructionBaseInfo.designer.cs	(revision 484)
@@ -191,6 +191,9 @@
             this.label21 = new System.Windows.Forms.Label();
             this.label40 = new System.Windows.Forms.Label();
             this.panel8 = new System.Windows.Forms.Panel();
+            this.label123 = new System.Windows.Forms.Label();
+            this.label122 = new System.Windows.Forms.Label();
+            this.label111 = new System.Windows.Forms.Label();
             this.label118 = new System.Windows.Forms.Label();
             this.label120 = new System.Windows.Forms.Label();
             this.label117 = new System.Windows.Forms.Label();
@@ -244,6 +247,7 @@
             this.trkProgress = new System.Windows.Forms.TrackBar();
             this.numProgress = new System.Windows.Forms.NumericUpDown();
             this.groupBoxEx1 = new ProcessManagement.Forms.CustomControls.GroupBoxEx();
+            this.btnOldYear = new System.Windows.Forms.Button();
             this.btnApprovalList = new System.Windows.Forms.Button();
             this.rdbStatusHikitugiFlg = new System.Windows.Forms.RadioButton();
             this.lblConstructionCodelabel = new System.Windows.Forms.Label();
@@ -2287,6 +2291,9 @@
             | System.Windows.Forms.AnchorStyles.Right)));
             this.panel8.BackColor = System.Drawing.Color.LawnGreen;
             this.panel8.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
+            this.panel8.Controls.Add(this.label123);
+            this.panel8.Controls.Add(this.label122);
+            this.panel8.Controls.Add(this.label111);
             this.panel8.Controls.Add(this.label118);
             this.panel8.Controls.Add(this.label120);
             this.panel8.Controls.Add(this.label117);
@@ -2316,6 +2323,40 @@
             this.panel8.Size = new System.Drawing.Size(650, 994);
             this.panel8.TabIndex = 180;
             // 
+            // label123
+            // 
+            this.label123.AutoSize = true;
+            this.label123.Font = new System.Drawing.Font("ＭＳ 明朝", 15.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
+            this.label123.Location = new System.Drawing.Point(338, 719);
+            this.label123.Name = "label123";
+            this.label123.Size = new System.Drawing.Size(33, 21);
+            this.label123.TabIndex = 194;
+            this.label123.Text = "点";
+            // 
+            // label122
+            // 
+            this.label122.BackColor = System.Drawing.Color.White;
+            this.label122.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
+            this.label122.Font = new System.Drawing.Font("Century", 26.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+            this.label122.Location = new System.Drawing.Point(210, 700);
+            this.label122.Name = "label122";
+            this.label122.Size = new System.Drawing.Size(120, 40);
+            this.label122.TabIndex = 193;
+            this.label122.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
+            // 
+            // label111
+            // 
+            this.label111.BackColor = System.Drawing.Color.DarkBlue;
+            this.label111.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
+            this.label111.Font = new System.Drawing.Font("ＭＳ 明朝", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
+            this.label111.ForeColor = System.Drawing.Color.White;
+            this.label111.Location = new System.Drawing.Point(2, 705);
+            this.label111.Name = "label111";
+            this.label111.Size = new System.Drawing.Size(200, 30);
+            this.label111.TabIndex = 192;
+            this.label111.Text = "公共工事評価点";
+            this.label111.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
+            // 
             // label118
             // 
             this.label118.BackColor = System.Drawing.Color.White;
@@ -2976,6 +3017,7 @@
             // 
             this.groupBoxEx1.Anchor = System.Windows.Forms.AnchorStyles.Top;
             this.groupBoxEx1.BorderColor = System.Drawing.Color.White;
+            this.groupBoxEx1.Controls.Add(this.btnOldYear);
             this.groupBoxEx1.Controls.Add(this.btnApprovalList);
             this.groupBoxEx1.Controls.Add(this.rdbStatusHikitugiFlg);
             this.groupBoxEx1.Controls.Add(this.lblConstructionCodelabel);
@@ -2996,6 +3038,21 @@
             this.groupBoxEx1.TabIndex = 98;
             this.groupBoxEx1.TabStop = false;
             // 
+            // btnOldYear
+            // 
+            this.btnOldYear.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+            this.btnOldYear.BackColor = System.Drawing.Color.LightGray;
+            this.btnOldYear.Font = new System.Drawing.Font("ＭＳ 明朝", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
+            this.btnOldYear.Location = new System.Drawing.Point(760, 9);
+            this.btnOldYear.Name = "btnOldYear";
+            this.btnOldYear.Size = new System.Drawing.Size(120, 30);
+            this.btnOldYear.TabIndex = 144;
+            this.btnOldYear.TabStop = false;
+            this.btnOldYear.Text = "過去データ";
+            this.btnOldYear.UseVisualStyleBackColor = false;
+            this.btnOldYear.Visible = false;
+            this.btnOldYear.Click += new System.EventHandler(this.btnOldYear_Click);
+            // 
             // btnApprovalList
             // 
             this.btnApprovalList.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
@@ -3016,7 +3073,7 @@
             this.rdbStatusHikitugiFlg.BackColor = System.Drawing.Color.Transparent;
             this.rdbStatusHikitugiFlg.Font = new System.Drawing.Font("ＭＳ 明朝", 11.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
             this.rdbStatusHikitugiFlg.ForeColor = System.Drawing.Color.White;
-            this.rdbStatusHikitugiFlg.Location = new System.Drawing.Point(811, 15);
+            this.rdbStatusHikitugiFlg.Location = new System.Drawing.Point(900, 15);
             this.rdbStatusHikitugiFlg.Name = "rdbStatusHikitugiFlg";
             this.rdbStatusHikitugiFlg.Size = new System.Drawing.Size(212, 19);
             this.rdbStatusHikitugiFlg.TabIndex = 86;
@@ -3562,6 +3619,7 @@
             // comboBoxEX5
             // 
             this.comboBoxEX5.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+            this.comboBoxEX5.DropDownWidth = 500;
             this.comboBoxEX5.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
             this.comboBoxEX5.FormattingEnabled = true;
             this.comboBoxEX5.Location = new System.Drawing.Point(129, 754);
@@ -3573,6 +3631,7 @@
             // comboBoxEX1
             // 
             this.comboBoxEX1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+            this.comboBoxEX1.DropDownWidth = 500;
             this.comboBoxEX1.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
             this.comboBoxEX1.FormattingEnabled = true;
             this.comboBoxEX1.Location = new System.Drawing.Point(129, 724);
@@ -3584,6 +3643,7 @@
             // cmbSalesSubPerson
             // 
             this.cmbSalesSubPerson.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+            this.cmbSalesSubPerson.DropDownWidth = 500;
             this.cmbSalesSubPerson.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
             this.cmbSalesSubPerson.FormattingEnabled = true;
             this.cmbSalesSubPerson.Location = new System.Drawing.Point(384, 754);
@@ -3595,6 +3655,7 @@
             // cmbSalesPerson
             // 
             this.cmbSalesPerson.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+            this.cmbSalesPerson.DropDownWidth = 500;
             this.cmbSalesPerson.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
             this.cmbSalesPerson.FormattingEnabled = true;
             this.cmbSalesPerson.Location = new System.Drawing.Point(384, 724);
@@ -3606,6 +3667,7 @@
             // cmbConstructionType
             // 
             this.cmbConstructionType.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+            this.cmbConstructionType.DropDownWidth = 600;
             this.cmbConstructionType.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
             this.cmbConstructionType.FormattingEnabled = true;
             this.cmbConstructionType.Location = new System.Drawing.Point(129, 602);
@@ -3625,6 +3687,7 @@
             "合資会社",
             "合同会社"});
             this.cmbOrdersDivision.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+            this.cmbOrdersDivision.DropDownWidth = 600;
             this.cmbOrdersDivision.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
             this.cmbOrdersDivision.Font = new System.Drawing.Font("ＭＳ 明朝", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
             this.cmbOrdersDivision.FormattingEnabled = true;
@@ -3639,6 +3702,7 @@
             this.cmbDisplayOrderers.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
             | System.Windows.Forms.AnchorStyles.Right)));
             this.cmbDisplayOrderers.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+            this.cmbDisplayOrderers.DropDownWidth = 600;
             this.cmbDisplayOrderers.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
             this.cmbDisplayOrderers.FormattingEnabled = true;
             this.cmbDisplayOrderers.Location = new System.Drawing.Point(129, 184);
@@ -3811,6 +3875,7 @@
             // comboBoxEX4
             // 
             this.comboBoxEX4.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+            this.comboBoxEX4.DropDownWidth = 500;
             this.comboBoxEX4.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
             this.comboBoxEX4.Font = new System.Drawing.Font("ＭＳ 明朝", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
             this.comboBoxEX4.FormattingEnabled = true;
@@ -3823,6 +3888,7 @@
             // comboBoxEX3
             // 
             this.comboBoxEX3.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+            this.comboBoxEX3.DropDownWidth = 500;
             this.comboBoxEX3.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
             this.comboBoxEX3.Font = new System.Drawing.Font("ＭＳ 明朝", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
             this.comboBoxEX3.FormattingEnabled = true;
@@ -3835,6 +3901,7 @@
             // cmbConstrSubPerson
             // 
             this.cmbConstrSubPerson.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+            this.cmbConstrSubPerson.DropDownWidth = 500;
             this.cmbConstrSubPerson.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
             this.cmbConstrSubPerson.Font = new System.Drawing.Font("ＭＳ 明朝", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
             this.cmbConstrSubPerson.FormattingEnabled = true;
@@ -3958,6 +4025,7 @@
             // cmbConstrInst
             // 
             this.cmbConstrInst.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+            this.cmbConstrInst.DropDownWidth = 500;
             this.cmbConstrInst.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
             this.cmbConstrInst.Font = new System.Drawing.Font("ＭＳ 明朝", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
             this.cmbConstrInst.FormattingEnabled = true;
@@ -3970,6 +4038,7 @@
             // comboBoxEX2
             // 
             this.comboBoxEX2.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+            this.comboBoxEX2.DropDownWidth = 500;
             this.comboBoxEX2.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
             this.comboBoxEX2.Font = new System.Drawing.Font("ＭＳ 明朝", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
             this.comboBoxEX2.FormattingEnabled = true;
@@ -3982,6 +4051,7 @@
             // cmbConstrPerson
             // 
             this.cmbConstrPerson.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+            this.cmbConstrPerson.DropDownWidth = 500;
             this.cmbConstrPerson.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
             this.cmbConstrPerson.Font = new System.Drawing.Font("ＭＳ 明朝", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
             this.cmbConstrPerson.FormattingEnabled = true;
@@ -4366,6 +4436,7 @@
             this.pnlFluctuation.ResumeLayout(false);
             this.pnlFluctuation.PerformLayout();
             this.panel8.ResumeLayout(false);
+            this.panel8.PerformLayout();
             this.panel9.ResumeLayout(false);
             this.panel9.PerformLayout();
             this.pnlProgress.ResumeLayout(false);
@@ -4673,5 +4744,9 @@
         private System.Windows.Forms.TrackBar trkProgress;
         private System.Windows.Forms.NumericUpDown numProgress;
         private System.Windows.Forms.RadioButton rdbStatus17;
+        private System.Windows.Forms.Label label122;
+        private System.Windows.Forms.Label label111;
+        private System.Windows.Forms.Label label123;
+        private System.Windows.Forms.Button btnOldYear;
     }
 }
\ No newline at end of file
Index: trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionBaseInfo/FrmConstructionBaseInfoAuxiliary.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionBaseInfo/FrmConstructionBaseInfoAuxiliary.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionBaseInfo/FrmConstructionBaseInfoAuxiliary.cs	(revision 484)
@@ -1373,7 +1373,39 @@
             {
                 logger.ErrorFormat("�V�X�e���G���[�F{0}�F{1}", CommonMotions.GetMethodName(), ex.Message);
             }
+        }
+        #endregion
 
+        #region �R���{�{�b�N�X�փf�[�^���Z�b�g����i�������̓f�[�^�����j
+        /// <summary>
+        /// �R���{�{�b�N�X�փf�[�^���Z�b�g����i�������̓f�[�^�����j
+        /// </summary>
+        private void SetComobBoxValue(ComboBox box, int nKey)
+        {
+            try
+            {
+                // �w��L�[�����邩�̃`�F�b�N
+                bool bReturn = false;
+                for (int ix = 0; ix < box.Items.Count; ix++)
+                {
+                    if (CommonMotions.cnvInt(box.Items[ix]) == nKey)
+                    {   // ����ΑI���L�[�փZ�b�g���Ĕ�����
+                        bReturn = true;
+                    }
+                }
+                if (bReturn) return;
+
+                // �����ꍇ�͒ǉ�����
+                box.Items.Add(nKey);
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("�V�X�e���G���[�F{0}�F{1}", CommonMotions.GetMethodName(), ex.Message);
+            }
+            finally
+            {
+                box.SelectedItem = nKey;
+            }
         }
         #endregion
 
@@ -1404,8 +1436,10 @@
 
                 // �f�[�^�\��
                 m_DspCtrl[(int)DspCnt.ConstructionCode].Text = CommonMotions.cnvStringCodeFromInt(worklist[0].ConstructionCode, "-", 8);                    // �H���R�[�h
-                m_DspCtrl[(int)DspCnt.ConstructionYear].Text = worklist[0].ConstructionYear.ToString();                                                     // �H���N�x
-                m_DspCtrl[(int)DspCnt.ConstructionPeriod].Text = worklist[0].ConstructionPeriod.ToString();                                                 // �H����
+                // �H���N�x
+                SetComobBoxValue(cmbConstructionYear, worklist[0].ConstructionYear);
+                // �H����
+                SetComobBoxValue(cmbConstructionPeriod, worklist[0].ConstructionPeriod);
 
                 // �����͔N�x�ōăZ�b�g
                 SetDepartmentCombbox();
@@ -1702,6 +1736,9 @@
                 lblJointLabel.Visible = false;
                 if (worklist[0].JoinFlg != 0) lblJointLabel.Visible = true;
 
+                // �����H���͕]���_��\������
+                SetEvaluationScore(worklist[0].ConstructionType, worklist[0].EvaluationScore);
+
                 m_bChengeAns = false;
 
                 return true;
@@ -1718,6 +1755,43 @@
         }
         #endregion
 
+        #region �����H���]���_���Z�b�g����
+        /// <summary>
+        /// �����H���]���_���Z�b�g����
+        /// </summary>
+        private void SetEvaluationScore(int ConstrType, decimal EvaluationScore)
+        {
+            IOMConstructionType TypeDB = new IOMConstructionType();
+            bool bVisible = true;
+            try
+            {
+                StringBuilder strSQL = new StringBuilder();
+                strSQL.Append(TypeDB.CreatePrimarykeyString(ConstrType));
+                strSQL.AppendFormat(" And PublicFlg = {0}", (int)ConstructionTypeMaster.PublicFlgDef.Community);
+                List<ConstructionTypeMaster> List = new List<ConstructionTypeMaster>();
+                if (!TypeDB.SelectAction(strSQL.ToString(), ref List) || List.Count < 1)
+                {
+                    bVisible = false;
+                    return;
+                }
+                // �����H���]���_�Z�b�g
+                if (EvaluationScore > 0)
+                    m_DspCtrl[(int)DspCnt.EvaluationScore].Text = EvaluationScore.ToString("0.00");
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("�V�X�e���G���[�F{0}�F{1}", CommonMotions.GetMethodName(), ex.Message);
+            }
+            finally
+            {
+                TypeDB.close(); TypeDB = null;
+                label111.Visible = bVisible;
+                label122.Visible = bVisible;
+                label123.Visible = bVisible;
+            }
+        }
+        #endregion
+
         #region �����敪���̃Z�b�g
         /// <summary>
         /// �����敪���̃Z�b�g
@@ -2516,6 +2590,8 @@
                 int nTargetCount = GetTargetYear();
                 CommonMotions.CreateManCombBoxSQL(ref strSQL, nTargetCount, DepartmentCode, 0, m_bNewData);
 
+                strSQL.Replace("Select", "Select A.PersonCode, A.PersonName,");
+
                 // �S���҃}�X�^�Ǎ�
                 ArrayList workList = new ArrayList();
                 if (!picDB.ExecuteReader(strSQL.ToString(), ref workList)) return false;
@@ -2529,12 +2605,12 @@
                     CheckArrayInPersonCode(picDB, PersonCode, workList, ref DataList);
                 }
 
-
                 PersonInChargeMaster workRec = new PersonInChargeMaster();
                 foreach (object[] work in workList)
                 {
-                    picDB.Reader2Struct(work, ref workRec);
-                    KeyValuePair<int, string> keyval = new KeyValuePair<int, string>(workRec.PersonCode, workRec.PersonName);
+                    int nPersonCode = CommonMotions.cnvInt(work[0]);
+                    string strPersonName = CommonMotions.cnvString(work[1]);
+                    KeyValuePair<int, string> keyval = new KeyValuePair<int, string>(nPersonCode, strPersonName);
 
                     DataList.Add(keyval);
                 }
@@ -2629,13 +2705,12 @@
             {
                 // �ΏۃR�[�h�����f�[�^�����邩
                 int TergetPerson = 0;
-                PersonInChargeMaster wrkRec = new PersonInChargeMaster();
                 foreach (object[] wrkObj in GetList)
                 {
-                    picDB.Reader2Struct(wrkObj, ref wrkRec);
-                    if (wrkRec.PersonCode == PersonCode)
+                    int nPersonCode = CommonMotions.cnvInt(wrkObj[0]);
+                    if (nPersonCode == PersonCode)
                     {
-                        TergetPerson = wrkRec.PersonCode;
+                        TergetPerson = nPersonCode;
                         break;
                     }
                 }
@@ -2645,7 +2720,7 @@
                 StringBuilder strSQL = new StringBuilder();
                 strSQL.AppendFormat(" Where PersonCode = {0}", TergetPerson);
 
-                wrkRec = new PersonInChargeMaster();
+                PersonInChargeMaster wrkRec = new PersonInChargeMaster();
                 if (!picDB.SelectAction(strSQL.ToString(), ref wrkRec)) return;
 
                 DataList.Add(new KeyValuePair<int, string>(wrkRec.PersonCode, wrkRec.PersonName));
@@ -3220,11 +3295,9 @@
 
                 // �����Z�b�g�i-2�N�`+2�N�j->�i-1�N�`+1�N�j
                 int NowPeriod = CommonMotions.SystemMasterData.BusinessPeriod;
-                //if (NowPeriod > 2) cmbConstructionPeriod.Items.Add((NowPeriod - 2).ToString());
                 if (NowPeriod > 1) cmbConstructionPeriod.Items.Add((NowPeriod - 1).ToString());
                 int nIndex = cmbConstructionPeriod.Items.Add(NowPeriod.ToString());
                 cmbConstructionPeriod.Items.Add((NowPeriod + 1).ToString());
-                //cmbConstructionPeriod.Items.Add((NowPeriod + 2).ToString());
 
                 // ���G�Z�b�g
                 cmbConstructionPeriod.SelectedIndex = nIndex;
@@ -3237,6 +3310,65 @@
         }
         #endregion
 
+        #region �ߋ��P�O�N�܂ŔN���Z�b�g����
+        /// <summary>
+        /// �ߋ��P�O�N�܂ŔN���Z�b�g����
+        /// </summary>
+        private void SetOldYear()
+        {
+            try
+            {
+                // ----- �c�Ɗ��R���{�{�b�N�X
+                List<KeyValuePair<int, string>> PeriodList = new List<KeyValuePair<int, string>>();
+                PeriodList.Add(new KeyValuePair<int, string>(0, ""));
+
+                int nNow = CommonMotions.SystemMasterData.BusinessPeriod;
+                for (int iy = 0; iy < 10; iy++)
+                {
+                    KeyValuePair<int, string> keyval = new KeyValuePair<int, string>((nNow - iy), (nNow - iy).ToString());
+
+                    PeriodList.Add(keyval);
+                }
+
+                this.cmbConstructionPeriod.DataSource = null;
+                this.cmbConstructionPeriod.Items.Clear();
+                this.cmbConstructionPeriod.Text = "";
+
+                // �R���{�{�b�N�X�����\��
+                ComboBoxAction.InitDataSetCombBox(cmbConstructionPeriod, PeriodList);
+
+                // ���G�Z�b�g
+                cmbConstructionPeriod.SelectedValue = nNow;
+
+                // ----- �H���N�x�R���{�{�b�N�X
+                List<KeyValuePair<int, string>> YearList = new List<KeyValuePair<int, string>>();
+                YearList.Add(new KeyValuePair<int, string>(0, ""));
+
+                nNow = CommonMotions.SystemMasterData.ConstrYear;
+                for (int iy = 0; iy < 10; iy++)
+                {
+                    KeyValuePair<int, string> keyval = new KeyValuePair<int, string>((nNow - iy), (nNow - iy).ToString());
+
+                    YearList.Add(keyval);
+                }
+
+                this.cmbConstructionYear.DataSource = null;
+                this.cmbConstructionYear.Items.Clear();
+                this.cmbConstructionYear.Text = "";
+
+                // �R���{�{�b�N�X�����\��
+                ComboBoxAction.InitDataSetCombBox(cmbConstructionYear, YearList);
+
+                // ���G�Z�b�g
+                cmbConstructionYear.SelectedValue = nNow;
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("�V�X�e���G���[�F{0}�F{1}", CommonMotions.GetMethodName(), ex.Message);
+            }
+        }
+        #endregion
+
         #region �H����ʋ敪�R���{�{�b�N�X�Z�b�g
         /// <summary>
         /// �H����ʋ敪�R���{�{�b�N�X�Z�b�g
@@ -5971,6 +6103,7 @@
             m_DspCtrl[(int)DspCnt.RevCompleteDate] = textBoxEX9;                                 // 86:��������������
             m_DspCtrl[(int)DspCnt.SalesSubDepartment] = comboBoxEX5;                             // 87:�c�ƕ��S������
             m_DspCtrl[(int)DspCnt.SalesSubPersonCode] = cmbSalesSubPerson;                       // 88:�c�ƕ��S���҃R�[�h
+            m_DspCtrl[(int)DspCnt.EvaluationScore] = label122;                                   // 89:�����H���]���_
         }
         #endregion
 
@@ -6202,6 +6335,18 @@
                 {
                     pnlCtl.Enabled = FieldLockMap[dispCnt + 5, nStatusCount];   // �y�ŏI�z+ 6:�����敪
                 }
+
+                // �ߋ��̃f�[�^�N����\������{�^��
+                if (m_DspCtrl[(int)DspCnt.ConstructionYear].Enabled
+                    || m_DspCtrl[(int)DspCnt.ConstructionPeriod].Enabled)
+                {
+                    btnOldYear.Visible = true;
+                }
+                else
+                {
+                    btnOldYear.Visible = false;
+                }
+
             }
             catch (Exception ex)
             {
@@ -7027,6 +7172,9 @@
                 }
 
                 // ----- �V�X�e����l�ɂ��I��
+                // �ߋ��̃f�[�^�N����\������{�^���̈ʒu���Z�b�g����
+                btnOldYear.Location = new Point(label2.Location.X
+                                                , btnOldYear.Location.Y);
                 // �����E�N�x���̑I��
                 if (CommonMotions.BasePeriodYear())
                 {
Index: trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionJoin/FrmConstructionJoinAuxiliary.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionJoin/FrmConstructionJoinAuxiliary.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionJoin/FrmConstructionJoinAuxiliary.cs	(revision 484)
@@ -1391,7 +1391,7 @@
                 // 工事日報データ更新
                 StringBuilder WorkSQL = new StringBuilder();
                 WorkSQL.Append(strSelSQL.ToString());
-                WorkSQL.Append(" ORDER BY DAILYDATADATE, CONSTRUCTIONCODE");
+                WorkSQL.Append(" ORDER BY CONSTRUCTIONCODE, DAILYDATADATE");
 
                 List<DailyDataConstruction> DailyList = new List<DailyDataConstruction>();
                 if (!DailyData1.SelectAction(WorkSQL.ToString(), ref DailyList, false))
@@ -1405,7 +1405,7 @@
                 foreach (DailyDataConstruction CurRec in DailyList)
                 {
                     if (BreakDate.Date == CurRec.DailyDataDate.Date) continue;
-                    if (!DailyData1.UpdateFeild(CurRec.PersonCode, CurRec.DailyDataDate, CurRec.ConstructionCode,
+                    if (!DailyData1.UpdateFeild(CurRec.ConstructionCode, CurRec.DailyDataDate, CurRec.PersonCode,
                                                     (int)IODailyDataConstruction.TableColumn.ConstructionCode, m_ConstructionCode, false))
                     {
                         DailyData1.rollback();
@@ -1421,7 +1421,7 @@
                 // 工事日報データ (明細)
                 WorkSQL.Clear();
                 WorkSQL.Append(strSelSQL.ToString());
-                WorkSQL.Append(" ORDER BY PersonCode, DailyDataDate, ConstructionCode, SeqNo");
+                WorkSQL.Append(" ORDER BY ConstructionCode, DailyDataDate, PersonCode, SeqNo");
 
                 List<DailyDataDetail> DetailList = new List<DailyDataDetail>();
                 if (!DailyData2.SelectAction(WorkSQL.ToString(), ref DetailList, false))
@@ -1450,7 +1450,7 @@
                 // 工事日報データ (車両)
                 WorkSQL.Clear();
                 WorkSQL.Append(strSelSQL.ToString());
-                WorkSQL.Append(" ORDER BY PersonCode, DailyDataDate, ConstructionCode, SeqNo");
+                WorkSQL.Append(" ORDER BY ConstructionCode, DailyDataDate, PersonCode, SeqNo");
 
                 List<DailyDataVehicles> VehiclesList = new List<DailyDataVehicles>();
                 if (!DailyData3.SelectAction(WorkSQL.ToString(), ref VehiclesList, false))
@@ -1477,7 +1477,7 @@
                 // 工事日報データ (資材)
                 WorkSQL.Clear();
                 WorkSQL.Append(strSelSQL.ToString());
-                WorkSQL.Append(" ORDER BY PersonCode, DailyDataDate, ConstructionCode, SeqNo");
+                WorkSQL.Append(" ORDER BY ConstructionCode, DailyDataDate, PersonCode, SeqNo");
 
                 List<DailyDataMaterials> MaterialsList = new List<DailyDataMaterials>();
                 if (!DailyData4.SelectAction(WorkSQL.ToString(), ref MaterialsList, false))
@@ -1506,7 +1506,7 @@
                 // 工事日報データ (協力業者指示)
                 WorkSQL.Clear();
                 WorkSQL.Append(strSelSQL.ToString());
-                WorkSQL.Append(" ORDER BY PersonCode, DailyDataDate, ConstructionCode, SeqNo");
+                WorkSQL.Append(" ORDER BY ConstructionCode, DailyDataDate, PersonCode, SeqNo");
 
                 List<DailyDataSubcontractors> subcontrList = new List<DailyDataSubcontractors>();
                 if (!DailyData5.SelectAction(WorkSQL.ToString(), ref subcontrList, false))
@@ -1533,7 +1533,7 @@
                 // 工事日報データ (現場巡回)
                 WorkSQL.Clear();
                 WorkSQL.Append(strSelSQL.ToString());
-                WorkSQL.Append(" ORDER BY PersonCode, DailyDataDate, ConstructionCode, SeqNo");
+                WorkSQL.Append(" ORDER BY ConstructionCode, DailyDataDate, PersonCode, SeqNo");
 
                 List<DailyDataField> FieldList = new List<DailyDataField>();
                 if (!DailyData6.SelectAction(WorkSQL.ToString(), ref FieldList, false))
Index: trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionLedger/FrmConstructionLedger.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionLedger/FrmConstructionLedger.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionLedger/FrmConstructionLedger.cs	(revision 484)
@@ -701,6 +701,13 @@
         }
 
         /// <summary>
+        /// �H���S���҃R�[�h
+        /// </summary>
+        public int ConstrManCode
+        {
+            get { return m_ConstructionBaseInfo.ConstructionPersonCode; }
+        }
+        /// <summary>
         /// �I���{�^������
         /// </summary>
         public DialogResult EndButton
Index: trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionLedger/FrmConstructionLedgerAuxiliary.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionLedger/FrmConstructionLedgerAuxiliary.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionLedger/FrmConstructionLedgerAuxiliary.cs	(revision 484)
@@ -3884,7 +3884,7 @@
 
                 // 工事詳細台帳明細データを読み込む
                 strcmd.Append("SELECT");
-                strcmd.Append("  A.*");
+                strcmd.AppendFormat(" {0}", IOConstructionLedgerDetail.CreateFieldNameList("A."));
 
                 strcmd.Append(", B.TARGETMONTH");
                 strcmd.Append(", B.PAYMENTAMOUNT");
@@ -6979,7 +6979,8 @@
                         break;
                     default:
                         // その他 入力範囲以外は計算しない
-                        if (ColumnIndex < (int)GridColumn.Payment || TotalPoint <= ColumnIndex) break;
+                        if (ColumnIndex < (int)GridColumn.Payment) break;
+                        if (TotalPoint <= ColumnIndex && ColumnIndex != (dgv.ColumnCount + (int)ColPayTotal.PaymentBurdens)) break;
 
                         CurRow.Cells[ColumnIndex].Value = CommonMotions.cnvLong(CurRow.Cells[ColumnIndex].Value).ToString("#,0");
                         break;
Index: trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionLedgerList/CommonLedgerData.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionLedgerList/CommonLedgerData.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionLedgerList/CommonLedgerData.cs	(revision 484)
@@ -480,7 +480,7 @@
                     KeyValuePair<int, long> CurValuePair = SalDataList.Find(x => x.Key == nKeyCode);
 
                     // 配列セット
-                    ArrarySalary.Add(new SalaryClass(nDepartmentCode, nPersonCode, (int)CurValuePair.Value, stDate, edDate));
+                    ArrarySalary.Add(new SalaryClass(nDepartmentCode, nPersonCode, CurValuePair.Value, stDate, edDate));
                 }
             }
             catch (Exception ex)
@@ -591,7 +591,7 @@
                 if (!CostDB.ExecuteReader(strSQL.ToString(), ref arList)) return;
 
                 // データセット
-                int[] GetCostVal = new int[CostDataOfPerson.DataNoStrArrary.Length];
+                long[] GetCostVal = new long[CostDataOfPerson.DataNoStrArrary.Length];
                 foreach (SalaryClass CurData in ArrarySalary)
                 {
                     Array.Clear(GetCostVal, 0, GetCostVal.Length);
@@ -613,7 +613,7 @@
                                                             , CurData.PersonCode
                                                             , CurData.StartDate
                                                             , CurData.CompDate
-                                                            , new int[] { GetCostVal[0],            // Dummy
+                                                            , new long[] { GetCostVal[0],            // Dummy
                                                                             GetCostVal[1], GetCostVal[2], GetCostVal[3],
                                                                             GetCostVal[4], GetCostVal[5], GetCostVal[6] }));
                 }
Index: trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionLedgerList/FrmConstructionLedgerListAuxiliary.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionLedgerList/FrmConstructionLedgerListAuxiliary.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionLedgerList/FrmConstructionLedgerListAuxiliary.cs	(revision 484)
@@ -689,12 +689,12 @@
         /// <param name="dtStartArray"></param>
         /// <param name="dtCompArray"></param>
         /// <returns></returns>
-        private int SetOtherCost(DateTime dtDefaultStart, DateTime dtDefaultEnd, ArrayList TargetList, IOCostDataOfPerson CostDB, List<PersonExpensesCost> ArraryCost)
+        private long SetOtherCost(DateTime dtDefaultStart, DateTime dtDefaultEnd, ArrayList TargetList, IOCostDataOfPerson CostDB, List<PersonExpensesCost> ArraryCost)
         {
             try
             {
                 int ArrayCount = CostDataOfPerson.DataNoStrArrary.Length;
-                int[] CostValue = new int[ArrayCount];
+                long[] CostValue = new long[ArrayCount];
                 // �\���G���A�N���A
                 Array.Clear(CostValue, 0, CostValue.Length);
 
@@ -715,7 +715,7 @@
 
                 // ----- �o��̏W�v
                 DataGridViewEX dgv = dgvMaster;
-                int SumData = 0;
+                long SumData = 0;
                 for (int i = 1; i < CostDataOfPerson.DataNoStrArrary.Length; i++)
                 {
                     // �s�쐬
@@ -1153,7 +1153,7 @@
                 SetPayrollData(TargetList, dtDefaultStart, dtDefaultEnd, SalaryDB, LedgerDB, ArrarySalary);
 
                 // ----- �o���\������
-                int Expenses = SetOtherCost(dtDefaultStart, dtDefaultEnd, TargetList, CostDB, ArraryCost);
+                long Expenses = SetOtherCost(dtDefaultStart, dtDefaultEnd, TargetList, CostDB, ArraryCost);
 
                 // ProgressBar�̒l��ύX����
                 prgber.Value++;
@@ -1466,8 +1466,8 @@
                         bDisp[2] = true;
                         break;
                     case (int)CostDataOfCompensation.CostTypeDef.Type2:     // 2:�w��
-                    case (int)CostDataOfCompensation.CostTypeDef.Type3:     // 3:�䒠���H��
-                    case (int)CostDataOfCompensation.CostTypeDef.Type4:     // 4:���ЍH��
+                    case (int)CostDataOfCompensation.CostTypeDef.Type3:     // 3:���ЍH��
+                    case (int)CostDataOfCompensation.CostTypeDef.Type4:     // 4:�䒠���H��
                     case (int)CostDataOfCompensation.CostTypeDef.Type5:     // 5:���r�H��
                         break;
                     case (int)CostDataOfCompensation.CostTypeDef.Type6:     // 6:�̔�
@@ -1596,7 +1596,7 @@
                 if (GetDepartmentCode() < 1) return;
 
                 strSQL.Append("SELECT");
-                strSQL.Append(" A.*");
+                strSQL.AppendFormat(" {0}", IOCostDataOfCompensation.CreateFieldNameList("A."));
                 strSQL.Append(" FROM costdataofcompensation As A");
                 strSQL.Append("  Inner Join constructionbaseinfo As B");
                 strSQL.Append("        On B.ConstructionCode = A.TargetCode");
@@ -1640,7 +1640,7 @@
                 if (nPersonCode < 1) return;
 
                 strSQL.Append("SELECT");
-                strSQL.Append(" A.*");
+                strSQL.AppendFormat(" {0}", IOCostDataOfCompensation.CreateFieldNameList("A."));
                 strSQL.Append(" FROM costdataofcompensation As A");
                 strSQL.Append("  Inner Join constructionbaseinfo As B");
                 strSQL.Append("        On B.ConstructionCode = A.TargetCode");
Index: trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionSplit/FrmConstructionSplitAuxiliary.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionSplit/FrmConstructionSplitAuxiliary.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionSplit/FrmConstructionSplitAuxiliary.cs	(revision 484)
@@ -775,15 +775,26 @@
             try
             {
                 // バックアップを取る
-                string strSQL = "INSERT INTO BK_ESTIMATEDATA SELECT NOW(), A.* FROM ESTIMATEDATA A";
-                strSQL += string.Format(" WHERE A.CONSTRUCTIONCODE = {0}", m_SelectionCode);
-                if (!EstimateDB.ExecuteNonQuery(strSQL, false)) return false;
+                StringBuilder strSQL = new StringBuilder();
+                strSQL.Append("INSERT INTO BK_ESTIMATEDATA");
+                strSQL.AppendFormat(" SELECT NOW(), {0} FROM ESTIMATEDATA A"
+                                                            , IOEstimateData.CreateFieldNameList("A."));
+                strSQL.AppendFormat(" WHERE A.CONSTRUCTIONCODE = {0}", m_SelectionCode);
+                if (!EstimateDB.ExecuteNonQuery(strSQL.ToString(), false)) return false;
 
-                strSQL = strSQL.Replace("ESTIMATEDATA", "ESTIMATEDATABODY");
-                if (!EstimateBDB.ExecuteNonQuery(strSQL, false)) return false;
+                strSQL.Clear();
+                strSQL.Append("INSERT INTO BK_ESTIMATEDATABODY");
+                strSQL.AppendFormat(" SELECT NOW(), {0} FROM ESTIMATEDATABODY A"
+                                                            , IOEstimateDataBody.CreateFieldNameList("A."));
+                strSQL.AppendFormat(" WHERE A.CONSTRUCTIONCODE = {0}", m_SelectionCode);
+                if (!EstimateBDB.ExecuteNonQuery(strSQL.ToString(), false)) return false;
 
-                strSQL = strSQL.Replace("ESTIMATEDATABODY", "ESTIMATEDATADETAIL");
-                if (!EstimateDDB.ExecuteNonQuery(strSQL, false)) return false;
+                strSQL.Clear();
+                strSQL.Append("INSERT INTO BK_ESTIMATEDATADETAIL");
+                strSQL.AppendFormat(" SELECT NOW(), {0} FROM ESTIMATEDATADETAIL A"
+                                                            , IOEstimateDataDetail.CreateFieldNameList("A."));
+                strSQL.AppendFormat(" WHERE A.CONSTRUCTIONCODE = {0}", m_SelectionCode);
+                if (!EstimateDDB.ExecuteNonQuery(strSQL.ToString(), false)) return false;
 
                 // 不要なデータを削除する
                 string strDelSource = string.Format(" WHERE CONSTRUCTIONCODE = {0} AND COMPONENTCODE > 0 AND (", m_SelectionCode);
Index: trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/CostomerRegist/FrmCostomerRegistAuxiliary.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/CostomerRegist/FrmCostomerRegistAuxiliary.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/CostomerRegist/FrmCostomerRegistAuxiliary.cs	(revision 484)
@@ -529,11 +529,12 @@
             {
                 // 発注者マスタ取得
                 StringBuilder strSQL = new StringBuilder();
-                strSQL.Append("Select A.*, B.PersonName From costomerregist As A");
-                strSQL.Append(" Inner Join personinchargemaster As B");
-                strSQL.Append("    On B.PersonCode = A.CreatePersonCode");
+                strSQL.AppendFormat("Select {0}", IOCostomerRegist.CreateFieldNameList("A."));
+                strSQL.Append("           , B.PersonName From costomerregist As A");
+                strSQL.Append("                          Inner Join personinchargemaster As B");
+                strSQL.Append("                                On B.PersonCode = A.CreatePersonCode");
                 strSQL.AppendFormat(" WHERE CreatePersonCode = {0}", m_PersonCode);
-                strSQL.AppendFormat(" AND CreateDate = {0}", m_CreateDate);
+                strSQL.AppendFormat(" AND DATE(CreateDate) = '{0}'", m_CreateDate.ToShortDateString());
                 strSQL.AppendFormat(" AND SeqNo = {0}", m_SeqNo);
 
                 ArrayList arList = new ArrayList();
Index: trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/DRConstruction/FrmDRConstruction.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/DRConstruction/FrmDRConstruction.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/DRConstruction/FrmDRConstruction.cs	(revision 484)
@@ -271,7 +271,7 @@
         /// <summary>
         /// �S���҃R�[�h
         /// </summary>
-        private int m_PersonCode = 0;
+        private int m_PersonCode = CommonMotions.LoginUserData.PersonCode;
 
         /// <summary>
         /// �H���R�[�h
Index: trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/DRConstruction/FrmDRConstructionAuxiliary.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/DRConstruction/FrmDRConstructionAuxiliary.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/DRConstruction/FrmDRConstructionAuxiliary.cs	(revision 484)
@@ -712,7 +712,7 @@
                 m_DspControl[(int)DspCtrlName.ConstName].Text = BaseDetailRec.DetailString;
 
                 // 日報データを取得する
-                strSQL = DailyDB.CreatePrimarykeyString(m_PersonCode, GetTargetToday(), m_ConstructionCode);
+                strSQL = DailyDB.CreatePrimarykeyString(m_ConstructionCode, GetTargetToday());
                 DailyDataConstruction DailyDataRec = new DailyDataConstruction();
                 DailyDB.SelectAction(strSQL, ref DailyDataRec);
                 
@@ -875,14 +875,33 @@
                 strSQL.Append(", A.COMPANYCODE");
                 strSQL.Append(", C.COMPANYNAME");
                 strSQL.Append(", A.TODAYHEADCOUNT");
-                strSQL.Append(", A.TOTALHEADCOUNT");
+                //strSQL.Append(", A.TOTALHEADCOUNT");
+                strSQL.Append(", IfNull(D.TOTACOUNT, 0)");
                 strSQL.Append(", A.TODAYWORK");
                 strSQL.Append(", A.NEXTDAYWORK");
                 strSQL.Append(", A.NEXTDAYHEADCOUNT");
-                strSQL.Append(" FROM DAILYDATADETAIL A");
-                strSQL.Append(" LEFT JOIN SUBCONTRACTORJOBCATEGORY B ON A.JOBCATEGORYCODE = B.JOBCATEGORYCODE");
-                strSQL.Append(" LEFT JOIN SUBCONTRACTORMASTER C ON A.COMPANYCODE = C.COMPANYCODE");
-                strSQL.Append(DetailDB.CreatePrimarykeyString(m_PersonCode, GetTargetToday(), m_ConstructionCode, 0));
+                strSQL.Append(" FROM DAILYDATADETAIL As A");
+
+                strSQL.Append(" LEFT JOIN SUBCONTRACTORJOBCATEGORY As B ON A.JOBCATEGORYCODE = B.JOBCATEGORYCODE");
+
+                strSQL.Append(" LEFT JOIN SUBCONTRACTORMASTER As C ON A.COMPANYCODE = C.COMPANYCODE");
+
+                strSQL.Append(" LEFT JOIN (Select DD.ConstructionCode");
+                strSQL.Append("                 , DD.JobCategoryCode");
+                strSQL.Append("                 , DD.CompanyCode");
+                strSQL.Append("                 , SUM(DD.TodayHeadCount) As TOTACOUNT");
+                strSQL.Append("            From DAILYDATADETAIL As DD");
+                strSQL.AppendFormat("      Where DATE (DD.DailyDataDate) <= '{0}'", GetTargetToday().ToShortDateString());
+                strSQL.Append("            Group By DD.ConstructionCode");
+                strSQL.Append("                   , DD.JobCategoryCode");
+                strSQL.Append("                   , DD.CompanyCode) As D");
+                strSQL.Append("      On D.ConstructionCode = A.ConstructionCode");
+                strSQL.Append("      And D.JobCategoryCode = A.JobCategoryCode");
+                strSQL.Append("      And D.CompanyCode = A.CompanyCode");
+
+                strSQL.Append(" WHERE");
+                strSQL.AppendFormat(" A.ConstructionCode = {0}", m_ConstructionCode);
+                strSQL.AppendFormat(" AND DATE(A.DailyDataDate) = '{0}'", GetTargetToday().ToShortDateString());
                 strSQL.Append(" ORDER BY A.SEQNO");
                 ArrayList arList = new ArrayList();
                 if (!DetailDB.ExecuteReader(strSQL.ToString(), ref arList) || arList.Count == 0)
@@ -942,17 +961,6 @@
                     CurRow.Cells[(int)DispGridColumn1.NextdayWork].Value = CommonMotions.cnvString(RecData[7]);
                     CurRow.Cells[(int)DispGridColumn1.NextdayHeadCount].Value = CommonMotions.cnvDouble(RecData[8]).ToString(sFormat[2]);
 
-                    //dgv.Rows.Add((ino++),
-                    //                CommonMotions.cnvInt(RecData[0]),
-                    //                CommonMotions.cnvString(RecData[1]),
-                    //                iCompany,
-                    //                strCompany,
-                    //                CommonMotions.cnvDouble(RecData[4]).ToString(sFormat[0]),
-                    //                CommonMotions.cnvDouble(RecData[5]).ToString(sFormat[1]),
-                    //                CommonMotions.cnvString(RecData[6]),
-                    //                CommonMotions.cnvString(RecData[7]),
-                    //                CommonMotions.cnvDouble(RecData[8]).ToString(sFormat[2]));
-
                     CurRow.Cells[(int)DispGridColumn1.JobCategoryName].ToolTipText = CommonMotions.cnvString(RecData[1]);
                     CurRow.Cells[(int)DispGridColumn1.CompanyName].ToolTipText = CommonMotions.cnvString(RecData[3]);
                     CurRow.Cells[(int)DispGridColumn1.TodayWork].ToolTipText = CommonMotions.cnvString(RecData[6]);
@@ -1009,7 +1017,7 @@
                 strSQL.Append(" FROM DAILYDATADETAIL A");
                 strSQL.Append(" LEFT JOIN SUBCONTRACTORJOBCATEGORY B ON A.JOBCATEGORYCODE = B.JOBCATEGORYCODE");
                 strSQL.Append(" LEFT JOIN SUBCONTRACTORMASTER C ON A.COMPANYCODE = C.COMPANYCODE");
-                strSQL.Append(DetailDB.CreatePrimarykeyString(m_PersonCode, MaxDate, m_ConstructionCode, 0));
+                strSQL.Append(DetailDB.CreatePrimarykeyString(m_ConstructionCode, MaxDate));
                 strSQL.Append(" ORDER BY A.SEQNO");
                 if (!DetailDB.ExecuteReader(strSQL.ToString(), ref DispList) || DispList.Count == 0) return false;
 
@@ -1073,7 +1081,7 @@
 
                 // 明細データ取得
                 StringBuilder strSQL = new StringBuilder();
-                strSQL.Append(VehiclesDB.CreatePrimarykeyString(m_PersonCode, GetTargetToday(), m_ConstructionCode, 0));
+                strSQL.Append(VehiclesDB.CreatePrimarykeyString(m_ConstructionCode, GetTargetToday()));
                 strSQL.Append(" ORDER BY SEQNO");
                 List<DailyDataVehicles> VehiclesList = new List<DailyDataVehicles>();
                 if (!VehiclesDB.SelectAction(strSQL.ToString(), ref VehiclesList) || VehiclesList.Count == 0)
@@ -1087,16 +1095,6 @@
                 int ino = 1;
                 foreach (DailyDataVehicles RecData in VehiclesList)
                 {
-                    //dgv.Rows.Add((ino++),
-                    //                RecData.Model,
-                    //                RecData.Performance,
-                    //                RecData.Owner,
-                    //                RecData.Driver,
-                    //                RecData.StartWorkingTime.ToShortTimeString(),
-                    //                "～",
-                    //                RecData.EndWorkingTime.ToShortTimeString());
-
-                    //int CurRowCnt = dgv.RowCount - 1;
                     int nRowIndex = dgv.Rows.Add(1);
                     DataGridViewRow CurRow = dgv.Rows[nRowIndex];
 
@@ -1176,7 +1174,7 @@
 
                 // 明細データ取得
                 StringBuilder strSQL = new StringBuilder();
-                strSQL.Append(MaterialsDB.CreatePrimarykeyString(m_PersonCode, GetTargetToday(), m_ConstructionCode, 0));
+                strSQL.Append(MaterialsDB.CreatePrimarykeyString(m_ConstructionCode, GetTargetToday()));
                 strSQL.Append(" ORDER BY SEQNO");
                 List<DailyDataMaterials> MaterialsList = new List<DailyDataMaterials>();
                 if (!MaterialsDB.SelectAction(strSQL.ToString(), ref MaterialsList) || MaterialsList.Count == 0)
@@ -1190,15 +1188,6 @@
                 int ino = 1;
                 foreach (DailyDataMaterials RecData in MaterialsList)
                 {
-                    //dgv.Rows.Add((ino++),
-                    //                RecData.Materials,
-                    //                RecData.Quantity,
-                    //                RecData.Production,
-                    //                RecData.Delivery,
-                    //                RecData.QualityControl);
-
-                    //int CurRowCnt = dgv.RowCount - 1;
-
                     int nRowIndex = dgv.Rows.Add(1);
                     DataGridViewRow CurRow = dgv.Rows[nRowIndex];
 
@@ -1247,7 +1236,7 @@
 
                 // 明細データ取得
                 StringBuilder strSQL = new StringBuilder();
-                strSQL.Append(SubcontractorsDB.CreatePrimarykeyString(m_PersonCode, GetTargetToday(), m_ConstructionCode, 0));
+                strSQL.Append(SubcontractorsDB.CreatePrimarykeyString(m_ConstructionCode, GetTargetToday()));
                 strSQL.Append(" ORDER BY SEQNO");
                 List<DailyDataSubcontractors> SubcontractorsList = new List<DailyDataSubcontractors>();
                 if (!SubcontractorsDB.SelectAction(strSQL.ToString(), ref SubcontractorsList) || SubcontractorsList.Count == 0)
@@ -1261,12 +1250,6 @@
                 int ino = 1;
                 foreach (DailyDataSubcontractors RecData in SubcontractorsList)
                 {
-                    //dgv.Rows.Add((ino++),
-                    //            RecData.Attendee,
-                    //            RecData.ContentsText);
-
-                    //int CurRowCnt = dgv.RowCount - 1;
-
                     int nRowIndex = dgv.Rows.Add(1);
                     DataGridViewRow CurRow = dgv.Rows[nRowIndex];
 
@@ -1310,7 +1293,7 @@
 
                 // 明細データ取得
                 StringBuilder strSQL = new StringBuilder();
-                strSQL.Append(FieldDB.CreatePrimarykeyString(m_PersonCode, GetTargetToday(), m_ConstructionCode, 0));
+                strSQL.Append(FieldDB.CreatePrimarykeyString(m_ConstructionCode, GetTargetToday()));
                 strSQL.Append(" ORDER BY SEQNO");
                 List<DailyDataField> SubcontractorsList = new List<DailyDataField>();
                 FieldDB.SelectAction(strSQL.ToString(), ref SubcontractorsList);
@@ -1625,7 +1608,7 @@
 
 
                 // 検索文字列作成
-                string strSQL = ReportDB.CreatePrimarykeyString(m_PersonCode, CreateDate, m_ConstructionCode);
+                string strSQL = ReportDB.CreatePrimarykeyString(m_ConstructionCode, CreateDate);
 
                 List<DailyDataConstruction> workList = new List<DailyDataConstruction>();
                 if (!ReportDB.SelectAction(strSQL, ref workList, false))
@@ -1678,7 +1661,7 @@
             {
                 // まず削除する
                 DateTime CreateDate = GetTargetToday();
-                string DelSQL = DetailDB.CreatePrimarykeyString(m_PersonCode, CreateDate, m_ConstructionCode, 0);
+                string DelSQL = DetailDB.CreatePrimarykeyString(m_ConstructionCode, CreateDate);
                 DetailDB.DeleteAction(DelSQL, false);
 
                 DataGridViewEX dgv = m_DgvArray[(int)DataGridDefine.Detail];
@@ -1714,7 +1697,7 @@
                     // 当日以降の累計人数を更新する
                     if (!ReCalcTotalHeadCount(DetailDB, DataRec.JobCategoryCode, DataRec.CompanyCode, DataRec.TotalHeadCount))
                     {
-                        MessageBox.Show("日報データ(明細)登録：登録２に失敗しました。", "登録エラー", MessageBoxButtons.OK, MessageBoxIcon.Error);
+                        MessageBox.Show("日報データ(明細)登録：更新に失敗しました。", "登録エラー", MessageBoxButtons.OK, MessageBoxIcon.Error);
                         return false;
                     }
                 }
@@ -1740,7 +1723,7 @@
             {
                 // まず削除する
                 DateTime CreateDate = GetTargetToday();
-                string DelSQL = VehiclesDB.CreatePrimarykeyString(m_PersonCode, CreateDate, m_ConstructionCode, 0);
+                string DelSQL = VehiclesDB.CreatePrimarykeyString(m_ConstructionCode, CreateDate);
                 VehiclesDB.DeleteAction(DelSQL, false);
 
                 DataGridViewEX dgv = m_DgvArray[(int)DataGridDefine.Vehicles];
@@ -1797,7 +1780,7 @@
             {
                 // まず削除する
                 DateTime CreateDate = GetTargetToday();
-                string DelSQL = MaterialsDB.CreatePrimarykeyString(m_PersonCode, CreateDate, m_ConstructionCode, 0);
+                string DelSQL = MaterialsDB.CreatePrimarykeyString(m_ConstructionCode, CreateDate);
                 MaterialsDB.DeleteAction(DelSQL, false);
 
                 DataGridViewEX dgv = m_DgvArray[(int)DataGridDefine.Materials];
@@ -1850,7 +1833,7 @@
             {
                 // まず削除する
                 DateTime CreateDate = GetTargetToday();
-                string DelSQL = SubcontractorsDB.CreatePrimarykeyString(m_PersonCode, CreateDate, m_ConstructionCode, 0);
+                string DelSQL = SubcontractorsDB.CreatePrimarykeyString(m_ConstructionCode, CreateDate);
                 SubcontractorsDB.DeleteAction(DelSQL, false);
 
                 DataGridViewEX dgv = m_DgvArray[(int)DataGridDefine.Subcontractors];
@@ -1900,7 +1883,7 @@
             {
                 // まず削除する
                 DateTime CreateDate = GetTargetToday();
-                string DelSQL = FieldDB.CreatePrimarykeyString(m_PersonCode, CreateDate, m_ConstructionCode, 0);
+                string DelSQL = FieldDB.CreatePrimarykeyString(m_ConstructionCode, CreateDate);
                 FieldDB.DeleteAction(DelSQL, false);
 
                 DataGridViewEX dgv = m_DgvArray[(int)DataGridDefine.Field];
@@ -2569,7 +2552,7 @@
                 DateTime CreateDate = GetTargetToday();
 
                 // 検索文字列作成
-                string strSQL = ReportDB.CreatePrimarykeyString(m_PersonCode, CreateDate, m_ConstructionCode);
+                string strSQL = ReportDB.CreatePrimarykeyString(m_ConstructionCode, CreateDate);
 
                 List<DailyDataConstruction> workList = new List<DailyDataConstruction>();
                 if (!ReportDB.SelectAction(strSQL, ref workList, false))
@@ -2614,7 +2597,7 @@
             {
                 // まず削除する
                 DateTime CreateDate = GetTargetToday();
-                string strSQL = DetailDB.CreatePrimarykeyString(m_PersonCode, CreateDate, m_ConstructionCode, 0);
+                string strSQL = DetailDB.CreatePrimarykeyString(m_ConstructionCode, CreateDate);
                 List<DailyDataDetail> workList = new List<DailyDataDetail>();
                 if (!DetailDB.SelectAction(strSQL, ref workList, false))
                 {
@@ -2658,7 +2641,7 @@
             {
                 // まず削除する
                 DateTime CreateDate = GetTargetToday();
-                string strSQL = VehiclesDB.CreatePrimarykeyString(m_PersonCode, CreateDate, m_ConstructionCode, 0);
+                string strSQL = VehiclesDB.CreatePrimarykeyString(m_ConstructionCode, CreateDate);
                 List<DailyDataVehicles> workList = new List<DailyDataVehicles>();
                 if (!VehiclesDB.SelectAction(strSQL, ref workList, false))
                 {
@@ -2702,7 +2685,7 @@
             {
                 // まず削除する
                 DateTime CreateDate = GetTargetToday();
-                string strSQL = MaterialsDB.CreatePrimarykeyString(m_PersonCode, CreateDate, m_ConstructionCode, 0);
+                string strSQL = MaterialsDB.CreatePrimarykeyString(m_ConstructionCode, CreateDate);
                 MaterialsDB.DeleteAction(strSQL, false);
 
                 List<DailyDataMaterials> workList = new List<DailyDataMaterials>();
@@ -2748,7 +2731,7 @@
             {
                 // まず削除する
                 DateTime CreateDate = GetTargetToday();
-                string strSQL = SubcontractorsDB.CreatePrimarykeyString(m_PersonCode, CreateDate, m_ConstructionCode, 0);
+                string strSQL = SubcontractorsDB.CreatePrimarykeyString(m_ConstructionCode, CreateDate);
                 SubcontractorsDB.DeleteAction(strSQL, false);
 
                 List<DailyDataSubcontractors> workList = new List<DailyDataSubcontractors>();
@@ -2794,7 +2777,7 @@
             {
                 // まず削除する
                 DateTime CreateDate = GetTargetToday();
-                string strSQL = FieldDB.CreatePrimarykeyString(m_PersonCode, CreateDate, m_ConstructionCode, 0);
+                string strSQL = FieldDB.CreatePrimarykeyString(m_ConstructionCode, CreateDate);
                 FieldDB.DeleteAction(strSQL, false);
 
                 List<DailyDataField> workList = new List<DailyDataField>();
@@ -2880,19 +2863,22 @@
                     case (int)ReadData.Final:
                         strSQL.Append("SELECT MAX(DAILYDATADATE) FROM DAILYDATACONSTRUCTION");
                         break;
+                    default:
+                        break;
                 }
 
                 strSQL.AppendFormat(" WHERE CONSTRUCTIONCODE = {0}", m_ConstructionCode);
-                strSQL.AppendFormat(" And PersonCode = {0}", m_PersonCode);
 
                 switch (ReadPoint)
                 {
                     case (int)ReadData.Previous:
-                        strSQL.AppendFormat(" AND DATE(DAILYDATADATE) < STR_TO_DATE('{0}','%Y/%m/%d')", dTPCreateDate.Value.ToShortDateString());
+                        strSQL.AppendFormat(" AND DATE(DAILYDATADATE) < '{0}'", dTPCreateDate.Value.ToShortDateString());
                         break;
                     case (int)ReadData.Next:
-                        strSQL.AppendFormat(" AND DATE(DAILYDATADATE) > STR_TO_DATE('{0}','%Y/%m/%d')", dTPCreateDate.Value.ToShortDateString());
+                        strSQL.AppendFormat(" AND DATE(DAILYDATADATE) > '{0}'", dTPCreateDate.Value.ToShortDateString());
                         break;
+                    default:
+                        break;
                 }
 
                 ArrayList arList = new ArrayList();
@@ -3117,16 +3103,15 @@
             {
                 if (!TotalFlg && (JobCode == 0 || CompanyCode == 0)) return 0;
 
-                string strSQL = "SELECT SUM(TODAYHEADCOUNT) FROM DAILYDATADETAIL";
-                strSQL += string.Format(" WHERE PersonCode = {0}", m_PersonCode);
-                strSQL += string.Format(" AND ConstructionCode = {0}", m_ConstructionCode);
-                if (JobCode != 0) strSQL += string.Format(" AND JobCategoryCode = {0}", JobCode);
-                if (CompanyCode != 0) strSQL += string.Format(" AND CompanyCode = {0}", CompanyCode);
-                //strSQL += string.Format(" AND TO_CHAR(DailyDataDate, 'YYYY/MM/DD') < '{0}'", GetTargetToday().ToShortDateString());
-                strSQL += string.Format(" AND DATE_FORMAT(DailyDataDate, '%Y/%m/%d') < '{0}'", GetTargetToday().ToShortDateString());
+                StringBuilder strSQL = new StringBuilder();
+                strSQL.Append("SELECT SUM(TODAYHEADCOUNT) FROM DAILYDATADETAIL");
+                strSQL.AppendFormat(" WHERE ConstructionCode = {0}", m_ConstructionCode);
+                strSQL.AppendFormat(" AND DATE(DailyDataDate) < '{0}'", GetTargetToday().ToShortDateString());
+                if (JobCode != 0) strSQL.AppendFormat(" AND JobCategoryCode = {0}", JobCode);
+                if (CompanyCode != 0) strSQL.AppendFormat(" AND CompanyCode = {0}", CompanyCode);
 
                 ArrayList arList = new ArrayList();
-                DetailDB.ExecuteReader(strSQL, ref arList);
+                DetailDB.ExecuteReader(strSQL.ToString(), ref arList);
                 object[] wrkobj = (object[])arList[0];
 
                 return CommonMotions.cnvDouble(wrkobj[0]);
@@ -3178,37 +3163,36 @@
                 DateTime StartDate = GetTargetToday();
 
                 // 動作SQL作成
-                //string strSQL = "SELECT TO_CHAR(DailyDataDate, 'YYYY/MM/DD') FROM DAILYDATADETAIL";
-                string strSQL = "SELECT DATE_FORMAT(DailyDataDate, '%Y/%m/%d'), TODAYHEADCOUNT FROM DAILYDATADETAIL";
-
+                StringBuilder strSQL = new StringBuilder();
+                strSQL.Append("SELECT DATE(DailyDataDate), TODAYHEADCOUNT FROM DAILYDATADETAIL");
                 // 検索条件SQL作成
-                string strWhere = string.Empty;
-                strWhere = string.Format(" WHERE PersonCode = {0}", m_PersonCode);
-                strWhere += string.Format(" AND ConstructionCode = {0}", m_ConstructionCode);
-                strWhere += string.Format(" AND JobCategoryCode = {0}", JobCode);
-                strWhere += string.Format(" AND CompanyCode = {0}", CompanyCode);
+                StringBuilder strWhere = new StringBuilder();
+                strWhere.AppendFormat(" WHERE ConstructionCode = {0}", m_ConstructionCode);
+                strWhere.AppendFormat(" AND JobCategoryCode = {0}", JobCode);
+                strWhere.AppendFormat(" AND CompanyCode = {0}", CompanyCode);
 
                 // 日付指定SQL作成
-                //string strDate = string.Format(" AND '{0}' < TO_CHAR(DailyDataDate, 'YYYY/MM/DD')", GetTargetToday().ToShortDateString());
                 string strDate = string.Format(" AND '{0}' < DATE_FORMAT(DailyDataDate, '%Y/%m/%d')", GetTargetToday().ToShortDateString());
                 // 検索文字列結合
-                strSQL += strWhere + strDate;
+                strSQL.Append(strWhere);
+                strSQL.AppendFormat(" AND '{0}' < DATE_FORMAT(DailyDataDate, '%Y/%m/%d')", GetTargetToday().ToShortDateString());
 
                 ArrayList TargetList = new ArrayList();
-                if (!DetailDB.ExecuteReader(strSQL, ref TargetList, false)) return false;
+                if (!DetailDB.ExecuteReader(strSQL.ToString(), ref TargetList, false)) return false;
                 if (TargetList.Count == 0) return true;
 
-                string strUPDATE = string.Empty;
+                StringBuilder strUPDATE = new StringBuilder();
                 double dTotal = TotalVal;
                 // 更新固定文字列設定
                 foreach (object[] wrkobj in TargetList)
                 {
                     dTotal += CommonMotions.cnvDouble(wrkobj[1]);
-                    strUPDATE = string.Format("UPDATE DAILYDATADETAIL SET TOTALHEADCOUNT = {0}", dTotal);
-                    strUPDATE += strWhere;
-                    strUPDATE += string.Format(" AND DATE_FORMAT(DailyDataDate, '%Y/%m/%d') = '{0}'", CommonMotions.cnvString(wrkobj[0]));
+                    strUPDATE.Clear();
+                    strUPDATE.AppendFormat("UPDATE DAILYDATADETAIL SET TOTALHEADCOUNT = {0}", dTotal);
+                    strUPDATE.Append(strWhere.ToString());
+                    strUPDATE.AppendFormat(" AND DATE(DailyDataDate) = '{0}'", CommonMotions.cnvString(wrkobj[0]));
 
-                    if (!DetailDB.ExecuteNonQuery(strUPDATE, false)) return false;
+                    if (!DetailDB.ExecuteNonQuery(strUPDATE.ToString(), false)) return false;
                 }
 
                 return true;
@@ -3470,7 +3454,7 @@
             {
                 // 日報データが無い場合は登録する
                 DateTime dtWrk = CommonMotions.cnvDate(dTPCreateDate.Text);
-                string strSQL = ConstDB.CreatePrimarykeyString(m_PersonCode, dtWrk, m_ConstructionCode);
+                string strSQL = ConstDB.CreatePrimarykeyString(m_ConstructionCode, dtWrk);
                 DailyDataConstruction DataRec = new DailyDataConstruction();
                 if (!ConstDB.SelectAction(strSQL, ref DataRec)) m_bChengeAns = true;
 
@@ -3520,7 +3504,7 @@
             {
                 // 日報データが無い場合は登録する
                 DateTime dtWrk = CommonMotions.cnvDate(dTPCreateDate.Text);
-                string strSQL = ConstDB.CreatePrimarykeyString(m_PersonCode, dtWrk, m_ConstructionCode);
+                string strSQL = ConstDB.CreatePrimarykeyString(m_ConstructionCode, dtWrk);
                 DailyDataConstruction DataRec = new DailyDataConstruction();
                 if (!ConstDB.SelectAction(strSQL, ref DataRec)) m_bChengeAns = true;
 
@@ -3825,7 +3809,6 @@
                     m_SelectSaveExcel = frm.SelectPath;
                 }
 
-
                 // 印刷プロセス数取得
                 m_ProcessCount = GetProcessCount() + 2;       // 枚数＋ＥＸＣＥＬオブジェクト取得(2)
                 PrintProgress.Visible = true;
Index: trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/DRConstruction/PrintFormat.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/DRConstruction/PrintFormat.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/DRConstruction/PrintFormat.cs	(revision 484)
@@ -143,12 +143,9 @@
             {
                 // 工事日報データ取得
                 string strSQL = string.Format(" WHERE CONSTRUCTIONCODE = {0}", m_ConstructionCode);
-                strSQL += string.Format(" AND PERSONCODE = {0}", m_PersonCode);
                 // 印刷範囲が指定されていた場合は日付指定
                 if (m_PrintRange == (int)FrmPrintConfirmation.PrintSelFlg.Range)
                 {
-                    //strSQL += string.Format(" AND (TO_DATE('{0}', 'YYYY/MM/DD') <= TRUNC(DailyDataDate)", m_PrintStartDate.ToShortDateString());
-                    //strSQL += string.Format(" AND TRUNC(DailyDataDate) <= TO_DATE('{0}', 'YYYY/MM/DD'))", m_PrintCompDate.ToShortDateString());
                     strSQL += string.Format(" AND (STR_TO_DATE('{0}', '%Y/%m/%d') <= DATE(DailyDataDate)", m_PrintStartDate.ToShortDateString());
                     strSQL += string.Format(" AND DATE(DailyDataDate) <= STR_TO_DATE('{0}', '%Y/%m/%d'))", m_PrintCompDate.ToShortDateString());
                 }
@@ -349,23 +346,22 @@
         {
             try
             {
-                string strSQL = "SELECT C.JOBCATEGORYNAME, B.COMPANYNAME, A.TODAYHEADCOUNT, A.TOTALHEADCOUNT,A.TODAYWORK, A.NEXTDAYWORK, A.NEXTDAYHEADCOUNT, A.COMPANYCODE";
-                strSQL += " FROM DAILYDATADETAIL A";
-                strSQL += " LEFT JOIN SUBCONTRACTORMASTER B ON B.COMPANYCODE = A.COMPANYCODE";
-                strSQL += " LEFT JOIN SUBCONTRACTORJOBCATEGORY C ON C.JOBCATEGORYCODE = A.JOBCATEGORYCODE";
-                strSQL += string.Format(" WHERE A.PersonCode = {0}",m_PersonCode);
-                //strSQL += string.Format(" AND A.DailyDataDate = TO_DATE('{0}','YYYY/MM/DD')", DailyRec.DailyDataDate.ToShortDateString());
-                strSQL += string.Format(" AND DATE(A.DailyDataDate) = STR_TO_DATE('{0}','%Y/%m/%d')", DailyRec.DailyDataDate.ToShortDateString());
-                strSQL += string.Format(" AND A.ConstructionCode = {0}",m_ConstructionCode);
-                strSQL += " ORDER BY A.SEQNO";
-                DailyDB.ExecuteReader(strSQL, ref DetailList);
+                StringBuilder strSQL = new StringBuilder();
+                strSQL.Append("SELECT C.JOBCATEGORYNAME, B.COMPANYNAME, A.TODAYHEADCOUNT, A.TOTALHEADCOUNT,A.TODAYWORK, A.NEXTDAYWORK, A.NEXTDAYHEADCOUNT, A.COMPANYCODE");
+                strSQL.Append(" FROM DAILYDATADETAIL A");
+                strSQL.Append(" LEFT JOIN SUBCONTRACTORMASTER B ON B.COMPANYCODE = A.COMPANYCODE");
+                strSQL.Append(" LEFT JOIN SUBCONTRACTORJOBCATEGORY C ON C.JOBCATEGORYCODE = A.JOBCATEGORYCODE");
+                strSQL.AppendFormat(" Where A.ConstructionCode = {0}", m_ConstructionCode);
+                strSQL.AppendFormat(" AND DATE(A.DailyDataDate) = STR_TO_DATE('{0}','%Y/%m/%d')", DailyRec.DailyDataDate.ToShortDateString());
+                strSQL.Append(" ORDER BY A.SEQNO");
+                DailyDB.ExecuteReader(strSQL.ToString(), ref DetailList);
 
-                strSQL = "SELECT SUM(TODAYHEADCOUNT) FROM DAILYDATADETAIL";
-                strSQL += string.Format(" WHERE PersonCode = {0}", m_PersonCode);
-                strSQL += string.Format(" AND ConstructionCode = {0}", m_ConstructionCode);
-                strSQL += string.Format(" AND DATE(DailyDataDate) <= STR_TO_DATE('{0}', '%Y/%m/%d')", DailyRec.DailyDataDate.ToShortDateString());
+                strSQL.Clear();
+                strSQL.Append("SELECT SUM(TODAYHEADCOUNT) FROM DAILYDATADETAIL");
+                strSQL.AppendFormat(" Where ConstructionCode = {0}", m_ConstructionCode);
+                strSQL.AppendFormat(" AND DATE(DailyDataDate) <= STR_TO_DATE('{0}', '%Y/%m/%d')", DailyRec.DailyDataDate.ToShortDateString());
                 ArrayList arList = new ArrayList();
-                DailyDB.ExecuteReader(strSQL, ref arList);
+                DailyDB.ExecuteReader(strSQL.ToString(), ref arList);
                 object[] wrkobj = (object[])arList[0];
 
                 TotalCount = CommonMotions.cnvInt(wrkobj[0]);
@@ -387,13 +383,10 @@
         {
             try
             {
-                //string strSQL = "SELECT A.MODEL, A.PERFORMANCE, A.OWNER, A.DRIVER, TO_CHAR(A.STARTWORKINGTIME, 'HH24:MI:SS'), TO_CHAR(A.ENDWORKINGTIME, 'HH24:MI:SS')";
                 string strSQL = "SELECT A.MODEL, A.PERFORMANCE, A.OWNER, A.DRIVER, DATE_FORMAT(A.STARTWORKINGTIME, '%H:%i:%'), DATE_FORMAT(A.ENDWORKINGTIME, '%H:%i:%')";
                 strSQL += " FROM DAILYDATAVEHICLES A";
-                strSQL += string.Format(" WHERE A.PersonCode = {0}", m_PersonCode);
-                //strSQL += string.Format(" AND A.DailyDataDate = TO_DATE('{0}','YYYY/MM/DD')", DailyRec.DailyDataDate.ToShortDateString());
+                strSQL += string.Format(" Where A.ConstructionCode = {0}", m_ConstructionCode);
                 strSQL += string.Format(" AND DATE(A.DailyDataDate) = STR_TO_DATE('{0}','%Y/%m/%d')", DailyRec.DailyDataDate.ToShortDateString());
-                strSQL += string.Format(" AND A.ConstructionCode = {0}", m_ConstructionCode);
                 strSQL += " ORDER BY A.SEQNO";
                 DailyDB.ExecuteReader(strSQL, ref VehiclesList);
 
@@ -417,10 +410,8 @@
             {
                 string strSQL = "SELECT A.MATERIALS, A.QUANTITY, A.PRODUCTION, A.DELIVERY, A.QUALITYCONTROL";
                 strSQL += " FROM DAILYDATAMATERIALS A";
-                strSQL += string.Format(" WHERE A.PersonCode = {0}", m_PersonCode);
-                //strSQL += string.Format(" AND A.DailyDataDate = TO_DATE('{0}','YYYY/MM/DD')", DailyRec.DailyDataDate.ToShortDateString());
+                strSQL += string.Format(" Where A.ConstructionCode = {0}", m_ConstructionCode);
                 strSQL += string.Format(" AND DATE(A.DailyDataDate) = STR_TO_DATE('{0}','%Y/%m/%d')", DailyRec.DailyDataDate.ToShortDateString());
-                strSQL += string.Format(" AND A.ConstructionCode = {0}", m_ConstructionCode);
                 strSQL += " ORDER BY A.SEQNO";
                 DailyDB.ExecuteReader(strSQL, ref MaterialsList);
 
@@ -444,10 +435,8 @@
             {
                 string strSQL = "SELECT A.ATTENDEE, A.CONTENTSTEXT";
                 strSQL += " FROM DAILYDATASUBCONTRACTORS A";
-                strSQL += string.Format(" WHERE A.PersonCode = {0}", m_PersonCode);
-                //strSQL += string.Format(" AND A.DailyDataDate = TO_DATE('{0}','YYYY/MM/DD')", DailyRec.DailyDataDate.ToShortDateString());
+                strSQL += string.Format(" Where A.ConstructionCode = {0}", m_ConstructionCode);
                 strSQL += string.Format(" AND DATE(A.DailyDataDate) = STR_TO_DATE('{0}','%Y/%m/%d')", DailyRec.DailyDataDate.ToShortDateString());
-                strSQL += string.Format(" AND A.ConstructionCode = {0}", m_ConstructionCode);
                 strSQL += " ORDER BY A.SEQNO";
                 DailyDB.ExecuteReader(strSQL, ref SubcontrList);
 
@@ -471,10 +460,8 @@
             {
                 string strSQL = "SELECT A.SEQNO, A.PATROLTIME, A.CONTENTSTEXT";
                 strSQL += " FROM DAILYDATAFIELD A";
-                strSQL += string.Format(" WHERE A.PersonCode = {0}", m_PersonCode);
-                //strSQL += string.Format(" AND A.DailyDataDate = TO_DATE('{0}','YYYY/MM/DD')", DailyRec.DailyDataDate.ToShortDateString());
+                strSQL += string.Format(" Where A.ConstructionCode = {0}", m_ConstructionCode);
                 strSQL += string.Format(" AND DATE(A.DailyDataDate) = STR_TO_DATE('{0}','%Y/%m/%d')", DailyRec.DailyDataDate.ToShortDateString());
-                strSQL += string.Format(" AND A.ConstructionCode = {0}", m_ConstructionCode);
                 strSQL += " ORDER BY A.SEQNO";
                 DailyDB.ExecuteReader(strSQL, ref FieldList);
 
Index: trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/DRList/FrmDRListAuxiliary.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/DRList/FrmDRListAuxiliary.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/DRList/FrmDRListAuxiliary.cs	(revision 484)
@@ -124,11 +124,6 @@
                 // ��t�ԍ��Z�b�g
                 ClsExcute.ProcControlPara[NowPoint].IntExecParameter.Add((int)CommonDefine.s_Default_OrderNo);
 
-                // �I���s�S���҃Z�b�g
-                int PersonCode = CommonMotions.cnvInt(dgvRow.Cells[(int)DispColumn.PersonCode].Value);
-                if (PersonCode == 0) return;
-                ClsExcute.ProcControlPara[NowPoint].IntExecParameter.Add(PersonCode);
-
                 // �I���s�쐬���Z�b�g
                 string CreateDate = CommonMotions.cnvString(dgvRow.Cells[(int)DispColumn.CreateDate].Value);
                 ClsExcute.ProcControlPara[NowPoint].StringExecParameter.Add(CreateDate);
@@ -265,11 +260,11 @@
                 strSub1.Append(", B.DETAILSTRING");
                 strSub1.Append(", C.PERSONCODE");
                 strSub1.Append(", C.PERSONNAME");
-                strSub1.Append(", ''");
+                strSub1.Append(", '' As DAILYDATADATE");
                 strSub1.Append(", D.DEPARTMENTCODE");
                 strSub1.Append(", D.DEPARTMENTSTRING");
-                strSub1.Append(", D.DISPLAYORDER");
-                strSub1.Append(", C.DISPLAYORDER");
+                strSub1.Append(", D.DISPLAYORDER As DepOrder");
+                strSub1.Append(", C.DISPLAYORDER As ManOrder");
 
                 // strSub1.Append(", E.COMPLATEFLG"); 2017/10/30 �䒠���o���ĂȂ��Ă����͂ł���悤�ɂ���
 
@@ -276,13 +271,25 @@
                 strSub1.Append(", 0");
                 strSub1.Append(", 0");
                 strSub1.Append(" FROM CONSTRUCTIONBASEINFO A");
-                strSub1.Append(", CONSTRUCTIONBASEINFODETAIL B");
-                strSub1.Append(", PERSONINCHARGEMASTER C");
-                strSub1.Append(", DEPARTMENTMASTER D");
 
+                strSub1.Append(" Inner Join CONSTRUCTIONBASEINFODETAIL B");
+                strSub1.Append("       On A.CONSTRUCTIONCODE = B.CONSTRUCTIONCODE");
+                strSub1.AppendFormat(" AND B.DETAILNO = {0}", (int)ConstructionBaseInfoDetail.DataNoDef.ConstructionName);
+
+                strSub1.Append(" Inner Join PERSONINCHARGEMASTER C");
+                strSub1.Append("       On A.CONSTRUCTIONPERSONCODE = C.PERSONCODE");
+
+                strSub1.Append(" Inner Join DEPARTMENTMASTER D");
+                strSub1.Append("       On C.DEPARTMENTCODE = D.DEPARTMENTCODE");
+
                 // strSub1.Append(", CONSTRUCTIONLEDGER E"); 2017/10/30 �䒠���o���ĂȂ��Ă����͂ł���悤�ɂ���
 
-                strSub1.Append(" WHERE NOT EXISTS (SELECT * FROM DAILYDATACONSTRUCTION Z WHERE Z.CONSTRUCTIONCODE = A.CONSTRUCTIONCODE AND Z.PERSONCODE = A.CONSTRUCTIONPERSONCODE)");
+                strSub1.Append(" WHERE");
+                if (CommonMotions.BasePeriodYear())
+                    strSub1.AppendFormat(" A.CONSTRUCTIONPERIOD = {0}", numUDConstPro.Value);
+                else
+                    strSub1.AppendFormat(" A.ConstructionYear = {0}", numUDConstPro.Value);
+
                 strSub1.AppendFormat(" And A.TyingFlg != {0}", (int)ConstructionBaseInfo.TyingFlgDef.Tying);
 
                 // �����m�F�ȍ~�͑ΏۊO
@@ -289,8 +296,12 @@
                 strSub1.AppendFormat(" AND (({0} <= A.CONSTRUCTIONSTATUSFLG And A.CONSTRUCTIONSTATUSFLG < {1})", nCodeStart, iCode);
                 // �����m�F��A7���Ԃ͓�����͉\�ɂ���
                 strSub1.AppendFormat(" OR (A.CONSTRUCTIONSTATUSFLG = {0}", iCode);
-                strSub1.AppendFormat(" AND STR_TO_DATE('{0}','%Y/%m/%d') <= DATE(A.BILLINGDATE)))", DateTime.Now.AddDays(-7).ToShortDateString());
+                strSub1.AppendFormat(" AND '{0}' <= DATE(A.BILLINGDATE)))", DateTime.Now.AddDays(-7).ToShortDateString());
 
+                strSub1.Append(" And NOT EXISTS");
+                strSub1.Append(" (SELECT * FROM DAILYDATACONSTRUCTION Z");
+                strSub1.Append("  WHERE Z.CONSTRUCTIONCODE = A.CONSTRUCTIONCODE)");
+
                 // �S���ґI��������ꍇ
                 if (PersonCode > 0)
                 {
@@ -299,9 +310,6 @@
                     strSub1.AppendFormat(" OR A.ConstrSubPersonCode = {0})", PersonCode);
                 }
 
-                strSub1.Append(" AND (A.CONSTRUCTIONCODE = B.CONSTRUCTIONCODE");
-                strSub1.AppendFormat(" AND B.DETAILNO = {0})", (int)ConstructionBaseInfoDetail.DataNoDef.ConstructionName);
-                strSub1.Append(" AND A.CONSTRUCTIONPERSONCODE = C.PERSONCODE");
                 // �����I�������鎞
                 if (DepartmentCode > 0)
                 {
@@ -310,12 +318,6 @@
                     strSub1.AppendFormat(" Or A.ConstrInstrDepCode = {0})", DepartmentCode);
                 }
 
-                if (CommonMotions.BasePeriodYear())
-                    strSub1.AppendFormat(" AND A.CONSTRUCTIONPERIOD = {0}", numUDConstPro.Value);
-                else
-                    strSub1.AppendFormat(" AND A.ConstructionYear = {0}", numUDConstPro.Value);
-
-                strSub1.Append(" AND C.DEPARTMENTCODE = D.DEPARTMENTCODE");
                 // strSub1.Append(" AND E.CONSTRUCTIONCODE = A.CONSTRUCTIONCODE"); 2017/10/30 �䒠���o���ĂȂ��Ă����͂ł���悤�ɂ���
                 // ���͂��ꂽ�H�����񂪂���H��
                 strSub2.Append(" UNION (SELECT");
@@ -323,37 +325,37 @@
                 strSub2.Append(", B.DETAILSTRING");
                 strSub2.Append(", D.PERSONCODE");
                 strSub2.Append(", D.PERSONNAME");
-                strSub2.Append(", MAX(DATE_FORMAT(C.DAILYDATADATE,'%Y/%m/%d'))");
+                strSub2.Append(", MAX(DATE(C.DAILYDATADATE)) As DAILYDATADATE");
                 strSub2.Append(", E.DEPARTMENTCODE");
                 strSub2.Append(", E.DEPARTMENTSTRING");
-                strSub2.Append(", E.DISPLAYORDER");
-                strSub2.Append(", D.DISPLAYORDER");
+                strSub2.Append(", E.DISPLAYORDER As DepOrder");
+                strSub2.Append(", D.DISPLAYORDER As ManOrder");
                 strSub2.Append(", 0");
                 strSub2.Append(", F.RowCnt");
 
                 //strSub2.Append(", F.COMPLATEFLG");
                 strSub2.Append(" FROM CONSTRUCTIONBASEINFO A");
-                strSub2.Append(", CONSTRUCTIONBASEINFODETAIL B");
+                strSub2.Append(" Inner Join CONSTRUCTIONBASEINFODETAIL B");
+                strSub2.Append("       On A.CONSTRUCTIONCODE = B.CONSTRUCTIONCODE");
+                strSub2.AppendFormat(" AND B.DETAILNO = {0}", (int)ConstructionBaseInfoDetail.DataNoDef.ConstructionName);
 
-                strSub2.Append(", DAILYDATACONSTRUCTION C");
-                strSub2.Append("  LEFT JOIN(Select DataCnt.ConstructionCode, Count(*) As RowCnt From DAILYDATACONSTRUCTION As DataCnt");
-                strSub2.Append("   Group by DataCnt.ConstructionCode Order By DataCnt.ConstructionCode) As F");
-                strSub2.Append(" ON F.ConstructionCode = C.ConstructionCode");
+                strSub2.Append(" Inner Join PERSONINCHARGEMASTER D");
+                strSub2.Append("       On D.PERSONCODE = A.ConstructionPersonCode");
+                strSub2.Append(" Inner Join DEPARTMENTMASTER E");
+                strSub2.Append("       On E.DEPARTMENTCODE = A.ConstrDepCode");
 
-                strSub2.Append(", PERSONINCHARGEMASTER D");
-                strSub2.Append(", DEPARTMENTMASTER E");
+                strSub2.Append(" Inner Join DAILYDATACONSTRUCTION C");
+                strSub2.Append("       On A.CONSTRUCTIONCODE = C.CONSTRUCTIONCODE");
 
+                strSub2.Append(" LEFT JOIN (Select DataCnt.ConstructionCode, Count(*) As RowCnt From DAILYDATACONSTRUCTION As DataCnt");
+                strSub2.Append("                    Group by DataCnt.ConstructionCode Order By DataCnt.ConstructionCode) As F");
+                strSub2.Append("       ON F.ConstructionCode = C.ConstructionCode");
+
                 if (CommonMotions.BasePeriodYear())
                     strSub2.AppendFormat(" WHERE A.CONSTRUCTIONPERIOD = {0}", numUDConstPro.Value);
                 else
                     strSub2.AppendFormat(" WHERE A.ConstructionYear = {0}", numUDConstPro.Value);
 
-                strSub2.Append(" AND (A.CONSTRUCTIONCODE = B.CONSTRUCTIONCODE");
-                strSub2.AppendFormat(" AND B.DETAILNO = {0})", (int)ConstructionBaseInfoDetail.DataNoDef.ConstructionName);
-                strSub2.Append(" AND A.CONSTRUCTIONCODE = C.CONSTRUCTIONCODE");
-                strSub2.Append(" AND C.PERSONCODE = D.PERSONCODE");
-                strSub2.Append(" AND D.DEPARTMENTCODE = E.DEPARTMENTCODE");
-
                 // �����I�������鎞
                 if (DepartmentCode > 0)
                 {
@@ -371,17 +373,9 @@
                 }
 
                 strSQL.Append(strSub1.ToString() + strSecurity.ToString() + strSub2.ToString() + strSecurity.ToString());
-                strSQL.Append(" GROUP BY A.CONSTRUCTIONCODE");
-                strSQL.Append(", B.DETAILSTRING");
-                strSQL.Append(", D.PERSONCODE");
-                strSQL.Append(", D.PERSONNAME");
-                strSQL.Append(", E.DEPARTMENTCODE");
-                strSQL.Append(", E.DEPARTMENTSTRING");
-                strSQL.Append(", E.DISPLAYORDER");
-                strSQL.Append(", D.DISPLAYORDER)");
-                //strSQL.Append(", F.COMPLATEFLG)");
+                strSQL.Append(" GROUP BY A.CONSTRUCTIONCODE)");
                 // Order by �t��
-                strSQL.Append(" ORDER BY 10 ASC, 8 ASC, 9 ASC, 6 ASC, 7 ASC, 3 ASC");
+                strSQL.Append(" ORDER BY DepOrder ASC, ManOrder ASC, ConstructionCode Desc");
 
             }
             catch (Exception ex)
Index: trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/DRWork/FrmDRWorkAuxiliary.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/DRWork/FrmDRWorkAuxiliary.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/DRWork/FrmDRWorkAuxiliary.cs	(revision 484)
@@ -439,7 +439,7 @@
 
                 strSQL.Append(" Group By D.PERSONCODE, t1.d, ifnull(D.SeqNo, 0)");
 
-                strSQL.Append(" ORDER BY t1.d, D.SEQNO");
+                strSQL.Append(" ORDER BY t1.d, D.StartTime");
 
             }
             catch (Exception ex)
Index: trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/DRWork/FrmDRWorkList.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/DRWork/FrmDRWorkList.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/DRWork/FrmDRWorkList.cs	(revision 484)
@@ -589,23 +589,25 @@
                     dtToday = dtSelectEnd;
                 }
 
-                strSQL.Append("                Left Join (Select * From attendancedailydata As LastDay");
-                strSQL.Append("                                    Inner Join (Select");
-                strSQL.Append("                                                   ManDB.PersonCode As ManNo");
-                strSQL.Append("                                                 , MAX(DATE (ManDB.AttendanceDate)) As ManDate");
-                strSQL.Append("                                                 , ManDB.SeqNo As ManSeq");
-                strSQL.Append("                                                From attendancedailydata As ManDB");
-                strSQL.AppendFormat("                                          Where ('{0}' <= DATE(AttendanceDate)", dtFirstDay.Date);
-                strSQL.AppendFormat("                                          And DATE(AttendanceDate) < '{0}')", dtToday.ToShortDateString());
-                strSQL.AppendFormat("                                          And Date(CompTime) != '{0}'", DateTime.MinValue.ToShortDateString());
-                strSQL.AppendFormat("                                          Group By PersonCode) As MaxDay");
-                strSQL.Append("                                           On MaxDay.ManNo = LastDay.PersonCode");
-                strSQL.Append("                                           And MaxDay.ManDate = DATE(LastDay.AttendanceDate)");
-                strSQL.Append("                                           And MaxDay.ManSeq = LastDay.SeqNo) As LastEntry");
+                strSQL.AppendFormat("          Left Join (Select {0}", IOAttendanceDailyData.CreateFieldNameList("LastDay."));
+                strSQL.Append("                                 , MaxDay.ManNo, MaxDay.ManDate, MaxDay.ManSeq");
+                strSQL.Append("                           From attendancedailydata As LastDay");
+                strSQL.Append("                           Inner Join (Select");
+                strSQL.Append("                                             ManDB.PersonCode As ManNo");
+                strSQL.Append("                                            , MAX(DATE (ManDB.AttendanceDate)) As ManDate");
+                strSQL.Append("                                            , ManDB.SeqNo As ManSeq");
+                strSQL.Append("                                        From attendancedailydata As ManDB");
+                strSQL.AppendFormat("                                  Where ('{0}' <= DATE(AttendanceDate)", dtFirstDay.Date);
+                strSQL.AppendFormat("                                  And DATE(AttendanceDate) < '{0}')", dtToday.ToShortDateString());
+                strSQL.AppendFormat("                                  And Date(CompTime) != '{0}'", DateTime.MinValue.ToShortDateString());
+                strSQL.AppendFormat("                                  Group By PersonCode) As MaxDay");
+                strSQL.Append("                                  On MaxDay.ManNo = LastDay.PersonCode");
+                strSQL.Append("                                  And MaxDay.ManDate = DATE(LastDay.AttendanceDate)");
+                strSQL.Append("                                  And MaxDay.ManSeq = LastDay.SeqNo) As LastEntry");
                 strSQL.Append("                      On LastEntry.PersonCode = A.PersonCode");
 
                 strSQL.Append("                Left Join (Select PersonCode, Count(*) As OverCnt From attendancedailydata As CheckDB");
-                strSQL.AppendFormat("                     Where DATE (AttendanceDate) < '{0}'", DateTime.Today.ToShortDateString());
+                strSQL.AppendFormat("                     Where DATE (AttendanceDate) < '{0}'", dtToday.ToShortDateString());
                 strSQL.AppendFormat("                       And (Date(StartTime) != '{0}'", DateTime.MinValue.ToShortDateString());
                 strSQL.AppendFormat("                       And Date(CompTime) != '{0}')", DateTime.MinValue.ToShortDateString());
                 strSQL.Append("                             And (Overtime > 0 And OvertimeWA = 0 And Length(WorkingComment) < 1)");
@@ -947,9 +949,10 @@
                 {
                     dtToday = dtSelectEnd;
                 }
+                int nPersonCode = CommonMotions.cnvInt(objRec[2]);
                 // ロック期限日付取得
-                DateTime dtCheckDate = CommonMotions.GetPrevBusinessDate(dtToday, 3);
-                DateTime dtCheckDate2 = CommonMotions.GetPrevBusinessDate(dtToday, 2);
+                DateTime dtCheckDate = CommonMotions.GetPrevBusinessDate(dtToday, 3, nPersonCode);
+                DateTime dtCheckDate2 = CommonMotions.GetPrevBusinessDate(dtToday, 2, nPersonCode);
 
                 DataGridViewCell ColHeader014 = CurRow.Cells[(int)DispColumn.Entry];            // 14:入力チェック
                 ColHeader014.Value = "〇";
Index: trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/DRWork/PrintOut.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/DRWork/PrintOut.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/DRWork/PrintOut.cs	(revision 484)
@@ -830,7 +830,7 @@
 
                 strSQL.Append(" Group By D.PERSONCODE, t1.d, ifnull(D.SeqNo, 0)");
 
-                strSQL.Append(" ORDER BY t1.d, D.SEQNO");
+                strSQL.Append(" ORDER BY t1.d, D.StartTime");
 
             }
             catch (Exception ex)
@@ -947,7 +947,10 @@
             try
             {
                 StringBuilder strSQL = new StringBuilder();
-                strSQL.Append("SELECT * FROM");
+                strSQL.Append("SELECT");
+                strSQL.Append(" t1.*");
+                strSQL.AppendFormat(", {0}", IOMHolidayCalender.CreateFieldNameList("C."));
+                strSQL.Append(" FROM");
 
                 strSQL.Append(" (SELECT");
                 strSQL.Append("     A1.years,");
@@ -961,7 +964,7 @@
                 strSQL.AppendFormat(" AND A2.month = {0}", WorktDate.Month);
                 strSQL.Append("       AND CAST(CONCAT(A1.years, '/', A2.month, '/', A3.days) as DATE) IS NOT NULL) t1");
 
-                strSQL.Append("  LEFT JOIN HOLIDAYCALENDERMASTER C ON C.HOLIDAY = t1.d");
+                strSQL.Append("  LEFT JOIN HOLIDAYCALENDERMASTER As C ON C.HOLIDAY = t1.d");
 
                 strSQL.Append(" ORDER BY t1.d");
                 ArrayList DataList = new ArrayList();
Index: trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/DepExpenssList/FrmDepExpenssListAuxiliary.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/DepExpenssList/FrmDepExpenssListAuxiliary.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/DepExpenssList/FrmDepExpenssListAuxiliary.cs	(revision 484)
@@ -1378,8 +1378,8 @@
                         bDisp[2] = true;
                         break;
                     case (int)CostDataOfCompensation.CostTypeDef.Type2:     // 2:�w��
-                    case (int)CostDataOfCompensation.CostTypeDef.Type3:     // 3:�䒠���H��
-                    case (int)CostDataOfCompensation.CostTypeDef.Type4:     // 4:���ЍH��
+                    case (int)CostDataOfCompensation.CostTypeDef.Type3:     // 3:���ЍH��
+                    case (int)CostDataOfCompensation.CostTypeDef.Type4:     // 4:�䒠���H��
                     case (int)CostDataOfCompensation.CostTypeDef.Type5:     // 5:���r�H��
                         break;
                     case (int)CostDataOfCompensation.CostTypeDef.Type6:     // 6:�̔�
@@ -1490,7 +1490,7 @@
                 if (GetDepartmentCode() < 1) return;
 
                 strSQL.Append("SELECT");
-                strSQL.Append(" A.*");
+                strSQL.AppendFormat(" {0}", IOCostDataOfCompensation.CreateFieldNameList("A."));
                 strSQL.Append(" FROM costdataofcompensation As A");
                 strSQL.Append("  Inner Join constructionbaseinfo As B");
                 strSQL.Append("        On B.ConstructionCode = A.TargetCode");
@@ -1810,7 +1810,7 @@
                 // �����R�[�h�擾
                 int DepartmentCode = GetDepartmentCode();
 
-                int TotalSalary = 0;        // ���^�ݐώ擾
+                long TotalSalary = 0;        // ���^�ݐώ擾
 
                 DateTime stDate = DateTime.Today;
                 DateTime edDate = DateTime.Today;
@@ -2031,6 +2031,7 @@
         }
         #endregion
 
+        #region �x�����쐬�G���A
         /// <summary>
         /// �x�����쐬�G���A
         /// </summary>
@@ -2120,7 +2121,7 @@
             }
         }
         #endregion
-
+        #endregion
         // ----------------- �f�o�b�O���W�b�N
 
         #region �H���䒠�����R�[�h�Z�b�g����
Index: trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/DepartmentCost/FrmDepCostDetail.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/DepartmentCost/FrmDepCostDetail.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/DepartmentCost/FrmDepCostDetail.cs	(revision 484)
@@ -494,7 +494,9 @@
                 decimal nNumYear = numUDConstPro.Value;
 
                 StringBuilder strSQL = new StringBuilder();
-                strSQL.Append("Select A.*, B.CompanyName, C.PersonName From costdataofcompensation As A");
+                strSQL.Append("Select");
+                strSQL.AppendFormat(" {0}", IOCostDataOfCompensation.CreateFieldNameList("A."));
+                strSQL.Append("     , B.CompanyName, C.PersonName From costdataofcompensation As A");
                 strSQL.Append("       Left Join(Select * From subcontractormaster As B1) As B");
                 strSQL.Append("            On B.CompanyCode = A.FromCode");
                 strSQL.Append("       Left Join personinchargemaster As C");
@@ -562,7 +564,7 @@
                 CostDB.close(); CostDB = null;
 
                 // �O���b�h�ɍs��\����t�ɃZ�b�g����
-                SetGridMaxRow();
+                //SetGridMaxRow();
 
                 ProgressBar.Value = ProgressBar.Maximum;
             }
@@ -689,13 +691,16 @@
                 bool bReturn = false;
                 switch (m_DispCost)
                 {
-                    case (int)CostDataOfCompensation.CostTypeDef.Type1:     // ��U
+                    case (int)CostDataOfCompensation.CostTypeDef.Type1:     // 1:��U
                         bReturn = true;
                         break;
 
-                    case (int)CostDataOfCompensation.CostTypeDef.Type2:     // �w���i
-                    case (int)CostDataOfCompensation.CostTypeDef.Type3:     // �H��
-                    case (int)CostDataOfCompensation.CostTypeDef.Type4:     // �̔�
+                    case (int)CostDataOfCompensation.CostTypeDef.Type2:     // 2:�w���i
+                    case (int)CostDataOfCompensation.CostTypeDef.Type3:     // 3:���ЍH��
+                    case (int)CostDataOfCompensation.CostTypeDef.Type4:     // 4:�䒠���H��
+                    case (int)CostDataOfCompensation.CostTypeDef.Type5:     // 5:���r�H��
+                    case (int)CostDataOfCompensation.CostTypeDef.Type6:     // 6:�̔�
+
                         // �����Ҍ����E����������
                         if (CommonMotions.LoginUserSecurity.SecRank == CommonDefine.SecurityRankList[FRank].Key
                             || CommonMotions.LoginUserSecurity.SecRank == CommonDefine.SecurityRankList[LRank].Key)
Index: trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/DepartmentCost/FrmDepartmentCostAux.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/DepartmentCost/FrmDepartmentCostAux.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/DepartmentCost/FrmDepartmentCostAux.cs	(revision 484)
@@ -1094,7 +1094,8 @@
                         strWork = CommonMotions.cnvString(CurCell.Value);
                         if ((m_DispCost == (int)CostDataOfCompensation.CostTypeDef.Type2
                             || m_DispCost == (int)CostDataOfCompensation.CostTypeDef.Type3
-                            || m_DispCost == (int)CostDataOfCompensation.CostTypeDef.Type4)
+                            || m_DispCost == (int)CostDataOfCompensation.CostTypeDef.Type4
+                            || m_DispCost == (int)CostDataOfCompensation.CostTypeDef.Type5)
                             && strWork.Length < 1)
                         {
                             ChgBackColor(nRowIndex, CurCell, true);
@@ -1851,6 +1852,7 @@
                 CurRec.FromCodeType = (int)CostDataOfCompensation.TargetTypeDef.Company;                            // �����R�[�h�^�C�v
                 CurRec.FromCode = nFromCode;                                                                        // �����R�[�h
                 CurRec.SendDate = CommonMotions.cnvDate(CurRow.Cells[(int)DispColDetail.SendDate].Value).Date;      // �Ώۓ��t
+                CurRec.LinkCode = 0;                                                                                // �����N��H���R�[�h
                 CurRec.EntryPrice = CommonMotions.cnvDecimal(CurRow.Cells[(int)DispColDetail.EntryPrice].Value);    // ���z�i�Ŕ��j
                 CurRec.EntryTax = CommonMotions.cnvDecimal(CurRow.Cells[(int)DispColDetail.EntryTax].Value);        // ���z�i�ō��j
                 CurRec.Content = CommonMotions.cnvString(CurRow.Cells[(int)DispColDetail.Content].Value);           // �x�����e
Index: trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/EstimateInput/FrmEstimateInputAuxiliary.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/EstimateInput/FrmEstimateInputAuxiliary.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/EstimateInput/FrmEstimateInputAuxiliary.cs	(revision 484)
@@ -4558,8 +4558,15 @@
                 // 積算見積データ取得
                 ArrayList LargeDataList = new ArrayList();
                 StringBuilder strSQL = new StringBuilder();
-                strSQL.Append("SELECT A.*, B.* FROM ESTIMATEDATA A LEFT JOIN COMPONENTMASTER B ON B.COMPONENTCODE = A.COMPONENTCODE");
-                strSQL.AppendFormat(" WHERE A.CONSTRUCTIONCODE = {0} ORDER BY A.LineCount", m_ConstructionCode);
+                strSQL.Append("SELECT");
+                strSQL.AppendFormat(" {0}",IOEstimateData.CreateFieldNameList("A."));
+                strSQL.AppendFormat(", {0}", IOMComponent.CreateFieldNameList("B."));
+                strSQL.Append(" FROM ESTIMATEDATA A");
+                strSQL.Append("      LEFT JOIN COMPONENTMASTER B");
+                strSQL.Append("           ON B.COMPONENTCODE = A.COMPONENTCODE");
+                strSQL.Append(" WHERE");
+                strSQL.AppendFormat(" A.CONSTRUCTIONCODE = {0}", m_ConstructionCode);
+                strSQL.Append(" ORDER BY A.LineCount");
                 if (!etDB.ExecuteReader(strSQL.ToString(), ref LargeDataList)) return false;
 
                 // データ無は表示せずに入力へ
@@ -4728,7 +4735,7 @@
                 // 積算見積ページデータ取得
                 StringBuilder strSQL = new StringBuilder();
                 strSQL.Append("SELECT");
-                strSQL.Append(" A.*");
+                strSQL.AppendFormat(" {0}", IOEstimateDataBody.CreateFieldNameList("A."));
                 strSQL.Append(", B.CNT");
                 strSQL.Append(", B.COMPONENTCODE");
                 strSQL.Append(" FROM");
@@ -4800,9 +4807,15 @@
 
                     // 積算見積データ取得
                     strSQL.Clear();
-                    strSQL.Append("SELECT A.*, B.*, C.COMPANYNAME FROM ESTIMATEDATADETAIL A");
-                    strSQL.Append(" LEFT JOIN CONSTRUCTIONITEMMASTER B ON B.ITEMCODE = A.ITEMCODE");
-                    strSQL.Append(" LEFT JOIN SUBCONTRACTORMASTER C ON C.COMPANYCODE = A.COMPANYCODE");
+                    strSQL.Append("SELECT");
+                    strSQL.AppendFormat(" {0}", IOEstimateDataDetail.CreateFieldNameList("A."));
+                    strSQL.AppendFormat(",{0}",IOMConstructionItem.CreateFieldNameList("B."));
+                    strSQL.Append(", C.COMPANYNAME");
+                    strSQL.Append(" FROM ESTIMATEDATADETAIL A");
+                    strSQL.Append(" LEFT JOIN CONSTRUCTIONITEMMASTER B");
+                    strSQL.Append("      ON B.ITEMCODE = A.ITEMCODE");
+                    strSQL.Append(" LEFT JOIN SUBCONTRACTORMASTER C");
+                    strSQL.Append("      ON C.COMPANYCODE = A.COMPANYCODE");
                     strSQL.AppendFormat(" WHERE A.CONSTRUCTIONCODE = {0} AND A.PAGECOUNT = {1}", MiddleList[ix].ConstructionCode, MiddleList[ix].PageCount);
                     strSQL.Append(" Order By A.PAGECOUNT, A.LINECOUNT");
                     ArrayList SmallDataList = new ArrayList();
@@ -5209,19 +5222,21 @@
                 strSQL.Append(", B.NegotiationPrice");
                 strSQL.Append(", B.GroupCount");
                 strSQL.Append(", B.LineCount");
-                strSQL.Append(" From (SELECT");
-                strSQL.Append("  AA.ConstructionCode");
-                strSQL.Append(", AA.ComponentCode");
-                strSQL.Append(", AA.CompanyCode");
-                strSQL.Append(", Sum(AA.LineTotal) As EstimateValue");
+                strSQL.Append(" From");
+                strSQL.Append(" (SELECT");
+                strSQL.Append("     AA.ConstructionCode");
+                strSQL.Append("    , AA.ComponentCode");
+                strSQL.Append("    , AA.CompanyCode");
+                strSQL.Append("    , Sum(AA.LineTotal) As EstimateValue");
                 strSQL.Append("  FROM estimatedatadetail AS AA");
-                strSQL.AppendFormat("  Where AA.ConstructionCode = {0}", m_ConstructionCode);
-                strSQL.Append("  And AA.CompanyCode > 0");
+                strSQL.Append("  Where");
+                strSQL.AppendFormat("  AA.ConstructionCode = {0}", m_ConstructionCode);
+                strSQL.Append("        And AA.CompanyCode > 0");
                 strSQL.Append("  Group By");
-                strSQL.Append("  AA.ConstructionCode");
-                strSQL.Append(", AA.ComponentCode");
-                strSQL.Append(", AA.CompanyCode) AS A");
-                strSQL.Append(" LEFT JOIN estimatebudgetdetail AS B");
+                strSQL.Append("      AA.ConstructionCode");
+                strSQL.Append("    , AA.ComponentCode");
+                strSQL.Append("    , AA.CompanyCode) AS A");
+                strSQL.Append("  LEFT JOIN estimatebudgetdetail AS B");
                 strSQL.Append("       On B.ConstructionCode = A.ConstructionCode");
                 strSQL.Append("       And B.ComponentCode = A.ComponentCode");
                 strSQL.Append("       And B.CompanyCode = A.CompanyCode");
Index: trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Proceedings/FrmProceedings.designer.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Proceedings/FrmProceedings.designer.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Proceedings/FrmProceedings.designer.cs	(revision 484)
@@ -983,7 +983,7 @@
             // 
             // btnCancel
             // 
-            this.btnCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
+            this.btnCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
             this.btnCancel.BackColor = System.Drawing.Color.Red;
             this.btnCancel.ForeColor = System.Drawing.Color.White;
             this.btnCancel.Location = new System.Drawing.Point(1107, 5);
Index: trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/PurchaseOrderEntry/FrmPurchaseOrderEntryAuxiliary.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/PurchaseOrderEntry/FrmPurchaseOrderEntryAuxiliary.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/PurchaseOrderEntry/FrmPurchaseOrderEntryAuxiliary.cs	(revision 484)
@@ -968,7 +968,7 @@
                 {
                     strSQL.Clear();
                     strSQL.Append("Select");
-                    strSQL.Append(" A.*");
+                    strSQL.AppendFormat(" {0}", IOPurchaseOrderDetail.CreateFieldNameList("A."));
                     strSQL.Append(", B.ExecutionAmount");
                     strSQL.Append(" From");
                     strSQL.Append(" purchaseorderdetail As A");
Index: trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/PurchaseOrderPrint/FrmPurchaseOrderPrintAuxiliary.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/PurchaseOrderPrint/FrmPurchaseOrderPrintAuxiliary.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/PurchaseOrderPrint/FrmPurchaseOrderPrintAuxiliary.cs	(revision 484)
@@ -211,7 +211,10 @@
             {
                 // 注文書データ読込
                 StringBuilder strSQL = new StringBuilder();
-                strSQL.Append("SELECT A.*, C.OrderNo FROM PURCHASEORDER A");
+                strSQL.Append("SELECT");
+                strSQL.AppendFormat(" {0}", IOPurchaseOrder.CreateFieldNameList("A."));
+                strSQL.Append(", C.OrderNo");
+                strSQL.Append(" FROM PURCHASEORDER A");
                 strSQL.Append(", PROCESSAPPROVALDETAIL B");
                 strSQL.Append(", PROCESSAPPROVAL C");
 
Index: trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/PurchaseOrderPrint/PrintFormat1.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/PurchaseOrderPrint/PrintFormat1.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/PurchaseOrderPrint/PrintFormat1.cs	(revision 484)
@@ -160,7 +160,13 @@
                 NameTable[3] = SalesRec.SealPrintName;
 
                 // 承認データ読込
-                string strSQLSeal = "SELECT * FROM PROCESSAPPROVAL A, PERSONINCHARGEMASTER B, SECURITYMASTER C";
+                string strSQLSeal = "SELECT";
+                strSQLSeal += string.Format(" {0}", IOProcessApproval.CreateFieldNameList("A."));
+                strSQLSeal += string.Format(",{0}", IOMPersonInCharge.CreateFieldNameList("B."));
+                strSQLSeal += string.Format(",{0}", IOMSecurity.CreateFieldNameList("C."));
+                strSQLSeal += " FROM PROCESSAPPROVAL As A";
+                strSQLSeal += "   , PERSONINCHARGEMASTER As B";
+                strSQLSeal += "   , SECURITYMASTER As C";
                 strSQLSeal += string.Format(" Where A.ConstructionCode = {0}", ConstructionCode.ToString());
                 strSQLSeal += string.Format(" And A.ApprovalCode = {0}", (int)ClsExcute.ApprovalListNo.PurchaseOrderEntryApproval);
                 strSQLSeal += string.Format(" AND A.ORDERNO = {0}", m_OrderNo);
Index: trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ReqBillingStatInput/FrmBillingStatInputAuxiliary.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ReqBillingStatInput/FrmBillingStatInputAuxiliary.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ReqBillingStatInput/FrmBillingStatInputAuxiliary.cs	(revision 484)
@@ -129,9 +129,15 @@
             {
                 StringBuilder strSQL = new StringBuilder();
 
-                strSQL.Append("Select * From");
-                strSQL.Append(" invoicedata as A");
-                strSQL.Append(" LEFT JOIN requesthead as B ON B.INVOICENO = A.INVOICENO");
+                strSQL.Append("Select");
+                strSQL.AppendFormat(" {0}", IOInvoiceData.CreateFieldNameList("A."));
+                strSQL.AppendFormat(",{0}", IORequestHead.CreateFieldNameList("B."));
+                strSQL.AppendFormat(",{0}", IOProcessApproval.CreateFieldNameList("C."));
+                strSQL.AppendFormat(",{0}", IORequestOrderDate.CreateFieldNameList("D."));
+                strSQL.AppendFormat(",{0}", IOConstructionBaseInfo.CreateFieldNameList("E."));
+                strSQL.Append(" From InvoiceData as A");
+                strSQL.Append(" LEFT JOIN requesthead as B");
+                strSQL.Append("      ON B.INVOICENO = A.INVOICENO");
                 strSQL.Append(" LEFT JOIN processapproval as C");
                 strSQL.Append("       ON C.ConstructionCode = B.REQCONSTRUCTIONCODE");
                 strSQL.AppendFormat(" AND C.ApprovalCode = {0}", (int)ClsExcute.ApprovalListNo.OrderRequestApproval);
Index: trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/ReqMessage/FrmReqMessageListAux.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/ReqMessage/FrmReqMessageListAux.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/ReqMessage/FrmReqMessageListAux.cs	(revision 484)
@@ -196,9 +196,13 @@
         {
             try
             {
-                strSQL.Append("Select A.*, B.DataCnt, C.PersonName, D.DepartmentString");
-                strSQL.Append("      From NotificationMessage As A");
-                strSQL.Append("           Left Join(Select BB.MessageDate, BB.SeqNo, Count(*) As DataCnt");
+                strSQL.Append("Select");
+                strSQL.AppendFormat(" {0}", IONotificationMessage.CreateFieldNameList("A."));
+                strSQL.Append(", B.DataCnt");
+                strSQL.Append(", C.PersonName");
+                strSQL.Append(", D.DepartmentString");
+                strSQL.Append("  From NotificationMessage As A");
+                strSQL.Append("      Left Join(Select BB.MessageDate, BB.SeqNo, Count(*) As DataCnt");
                 strSQL.Append("                            From notificationmessagebrowsing As BB");
                 strSQL.Append("                            Where BB.BrowsingFlag = 0");
                 strSQL.Append("                            Group by BB.MessageDate, BB.SeqNo) As B");
Index: trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/ReqMessage/FrmReqMsgWrtAux.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/ReqMessage/FrmReqMsgWrtAux.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/ReqMessage/FrmReqMsgWrtAux.cs	(revision 484)
@@ -338,7 +338,8 @@
             try
             {
                 StringBuilder strSQL = new StringBuilder();
-                strSQL.Append("Select A.*");
+                strSQL.Append("Select");
+                strSQL.AppendFormat(" {0}", IONotificationMessageSelect.CreateFieldNameList("A."));
                 strSQL.AppendFormat(", CASE WHEN A.CompanyCode = {0} THEN '{1}'", KindList[0].Key, KindList[0].Value);
                 strSQL.AppendFormat(" WHEN A.CompanyCode = {0} THEN '{1}'", KindList[1].Key, KindList[1].Value);
                 strSQL.AppendFormat(" WHEN A.CompanyCode = {0} THEN '{1}'", KindList[2].Key, KindList[2].Value);
@@ -396,10 +397,17 @@
             try
             {
                 StringBuilder strSQL = new StringBuilder();
-                strSQL.Append("Select A.*, B.CompanyName, B.labourKind From notificationmessagebrowsing As A");
-                strSQL.Append("                           Left Join subcontractormaster As B On B.CompanyCode = A.CompanyCode");
-                strSQL.AppendFormat(" Where DATE(A.MessageDate) = DATE('{0}')", m_DataCreateDate.ToShortDateString());
-                strSQL.AppendFormat(" And A.SeqNo = {0}", m_SeqNo);
+                strSQL.Append("Select");
+                strSQL.AppendFormat(" {0}", IONotificationMessageBrowsing.CreateFieldNameList("A."));
+                strSQL.Append(", B.CompanyName");
+                strSQL.Append(", B.labourKind");
+                strSQL.Append(" From notificationmessagebrowsing As A");
+                strSQL.Append("      Left Join subcontractormaster As B");
+                strSQL.Append("           On B.CompanyCode = A.CompanyCode");
+                strSQL.Append(" Where");
+                strSQL.AppendFormat(" DATE(A.MessageDate) = DATE('{0}')", m_DataCreateDate.ToShortDateString());
+                strSQL.Append(" And");
+                strSQL.AppendFormat(" A.SeqNo = {0}", m_SeqNo);
                 strSQL.Append(" Order By B.JapaneseSyllabary Asc");
 
                 ArrayList DataList = new ArrayList();
Index: trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/RequestPrint/FrmRequestPrintSelAux.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/RequestPrint/FrmRequestPrintSelAux.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/RequestPrint/FrmRequestPrintSelAux.cs	(revision 484)
@@ -127,12 +127,14 @@
             try
             {
                 StringBuilder sql = new StringBuilder();
-                sql.Append("SELECT InvData.* FROM InvoiceData As InvData");
-                sql.Append("                      Inner Join RequestHead As ReqHead");
-                sql.Append("                             On ReqHead.InvoiceNo = InvData.InvoiceNo");
-                sql.Append("                      Inner Join constructionbaseinfo As Base");
-                sql.Append("                             On Base.ConstructionCode = ReqHead.REQCONSTRUCTIONCODE");
-                sql.AppendFormat("                       And Base.BillingSplitFlg = {0}", m_ExecuteSubFlg);
+                sql.Append("SELECT");
+                sql.AppendFormat(" {0}", IOInvoiceData.CreateFieldNameList("InvData."));
+                sql.Append(" FROM InvoiceData As InvData");
+                sql.Append("      Inner Join RequestHead As ReqHead");
+                sql.Append("            On ReqHead.InvoiceNo = InvData.InvoiceNo");
+                sql.Append("      Inner Join constructionbaseinfo As Base");
+                sql.Append("            On Base.ConstructionCode = ReqHead.REQCONSTRUCTIONCODE");
+                sql.AppendFormat("      And Base.BillingSplitFlg = {0}", m_ExecuteSubFlg);
                 sql.AppendFormat(" WHERE InvData.OrderersDivision = {0}", m_nOrderersDivision);
                 sql.AppendFormat(" AND InvData.OrderersCode = {0} ", m_nOrderersCode);
                 sql.AppendFormat(" AND InvData.RequestMonth = {0} ", m_nRequestMonth);
@@ -176,19 +178,24 @@
             try
             {
                 StringBuilder sql = new StringBuilder();
-                sql.Append("Select A.* From RequestHead As A");
-                sql.Append("           Inner Join constructionbaseinfo As Base");
-                sql.Append("                  On Base.ConstructionCode = A.REQCONSTRUCTIONCODE");
+                sql.Append("Select");
+                sql.AppendFormat(" {0}", IORequestHead.CreateFieldNameList("A."));
+                sql.Append(" From RequestHead As A");
+                sql.Append("      Inner Join constructionbaseinfo As Base");
+                sql.Append("            On Base.ConstructionCode = A.REQCONSTRUCTIONCODE");
                 sql.AppendFormat("            And Base.BillingSplitFlg = {0}", m_ExecuteSubFlg);
-                sql.Append("           Inner Join processapproval As B");
-                sql.Append("                  On B.ConstructionCode = A.REQCONSTRUCTIONCODE");
-                sql.AppendFormat("            And B.ApprovalCode = {0}", (int)ClsExcute.ApprovalListNo.OrderRequestApproval);
-                sql.Append("                  And B.OrderNo = A.ORDERNO");
-                sql.AppendFormat("            And B.SeqNo = {0}", CommonDefine.s_Default_OrderNo);
-                sql.AppendFormat("            And B.ApprovalStatus = {0}", (int)CommonDefine.ApprovalStatus.Approval);
-                sql.AppendFormat("     Where A.RequestMonth = {0}", m_nRequestMonth);
-                sql.AppendFormat("     And A.OrderersDivision = {0}", m_nOrderersDivision);
-                sql.AppendFormat("     And A.OrderersCode = {0}", m_nOrderersCode);
+                sql.Append("      Inner Join processapproval As B");
+                sql.Append("            On B.ConstructionCode = A.REQCONSTRUCTIONCODE");
+                sql.AppendFormat("      And B.ApprovalCode = {0}", (int)ClsExcute.ApprovalListNo.OrderRequestApproval);
+                sql.Append("            And B.OrderNo = A.ORDERNO");
+                sql.AppendFormat("      And B.SeqNo = {0}", CommonDefine.s_Default_OrderNo);
+                sql.AppendFormat("     And B.ApprovalStatus = {0}", (int)CommonDefine.ApprovalStatus.Approval);
+                sql.Append(" Where");
+                sql.AppendFormat(" A.RequestMonth = {0}", m_nRequestMonth);
+                sql.Append(" And");
+                sql.AppendFormat(" A.OrderersDivision = {0}", m_nOrderersDivision);
+                sql.Append(" And");
+                sql.AppendFormat(" A.OrderersCode = {0}", m_nOrderersCode);
                 sql.Append(" Group By A.REQUESTNO");
                 sql.Append(" Order by A.INVOICENO ASC, A.REQUESTNO ASC, A.ReqConstructionCode Asc, a.OrderNo Asc");
 
@@ -1405,7 +1412,10 @@
                     int nReqNo = CommonMotions.cnvInt(CurRow.Cells[(int)DispColumn.RequestNo].Value);
 
                     // 入金データが存在するか確認する
-                    strSQL.Append("select * from depositdatadetail As A");
+                    strSQL.Append("Select");
+                    strSQL.AppendFormat(" {0}", IODepositDataDetail.CreateFieldNameList("A."));
+                    strSQL.AppendFormat(",{0}", IORequestHead.CreateFieldNameList("B."));
+                    strSQL.Append(" From depositdatadetail As A");
                     strSQL.Append(" Inner Join requesthead As B On B.REQUESTNO = A.REQUESTNO");
                     strSQL.AppendFormat(" Where A.ORDERERSDIVISION = {0}", m_nOrderersDivision);
                     strSQL.AppendFormat(" And A.ORDERERSCODE = {0}", m_nOrderersCode);
Index: trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/RequestPrintList/FrmReqPrintList.designer.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/RequestPrintList/FrmReqPrintList.designer.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/RequestPrintList/FrmReqPrintList.designer.cs	(revision 484)
@@ -28,16 +28,16 @@
         /// </summary>
         private void InitializeComponent()
         {
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle11 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle12 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle20 = 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 dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle10 = 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();
             this.btnEnd = new System.Windows.Forms.Button();
             this.label1 = new System.Windows.Forms.Label();
             this.btnDataUpDate = new System.Windows.Forms.Button();
@@ -257,21 +257,21 @@
             this.dgvEntry.AllowUserToDeleteRows = false;
             this.dgvEntry.AllowUserToResizeColumns = false;
             this.dgvEntry.AllowUserToResizeRows = false;
-            dataGridViewCellStyle11.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(255)))), ((int)(((byte)(192)))));
-            this.dgvEntry.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle11;
+            dataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(255)))), ((int)(((byte)(192)))));
+            this.dgvEntry.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1;
             this.dgvEntry.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
             | System.Windows.Forms.AnchorStyles.Left) 
             | System.Windows.Forms.AnchorStyles.Right)));
             this.dgvEntry.BackgroundColor = System.Drawing.Color.White;
             this.dgvEntry.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
-            dataGridViewCellStyle12.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
-            dataGridViewCellStyle12.BackColor = System.Drawing.SystemColors.Control;
-            dataGridViewCellStyle12.Font = new System.Drawing.Font("ＭＳ 明朝", 11.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
-            dataGridViewCellStyle12.ForeColor = System.Drawing.SystemColors.WindowText;
-            dataGridViewCellStyle12.SelectionBackColor = System.Drawing.SystemColors.Highlight;
-            dataGridViewCellStyle12.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
-            dataGridViewCellStyle12.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
-            this.dgvEntry.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle12;
+            dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
+            dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Control;
+            dataGridViewCellStyle2.Font = new System.Drawing.Font("ＭＳ 明朝", 11.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
+            dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.WindowText;
+            dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight;
+            dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
+            dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
+            this.dgvEntry.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2;
             this.dgvEntry.ColumnHeadersHeight = 24;
             this.dgvEntry.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing;
             this.dgvEntry.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
@@ -285,14 +285,14 @@
             this.Column7,
             this.Column8,
             this.Column9});
-            dataGridViewCellStyle20.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
-            dataGridViewCellStyle20.BackColor = System.Drawing.SystemColors.Window;
-            dataGridViewCellStyle20.Font = new System.Drawing.Font("ＭＳ 明朝", 11.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
-            dataGridViewCellStyle20.ForeColor = System.Drawing.SystemColors.ControlText;
-            dataGridViewCellStyle20.SelectionBackColor = System.Drawing.Color.LightSeaGreen;
-            dataGridViewCellStyle20.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
-            dataGridViewCellStyle20.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
-            this.dgvEntry.DefaultCellStyle = dataGridViewCellStyle20;
+            dataGridViewCellStyle10.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
+            dataGridViewCellStyle10.BackColor = System.Drawing.SystemColors.Window;
+            dataGridViewCellStyle10.Font = new System.Drawing.Font("ＭＳ 明朝", 11.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
+            dataGridViewCellStyle10.ForeColor = System.Drawing.SystemColors.ControlText;
+            dataGridViewCellStyle10.SelectionBackColor = System.Drawing.Color.LightSeaGreen;
+            dataGridViewCellStyle10.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
+            dataGridViewCellStyle10.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
+            this.dgvEntry.DefaultCellStyle = dataGridViewCellStyle10;
             this.dgvEntry.EditMode = System.Windows.Forms.DataGridViewEditMode.EditOnEnter;
             this.dgvEntry.EnableHeadersVisualStyles = false;
             this.dgvEntry.Location = new System.Drawing.Point(10, 103);
@@ -310,10 +310,10 @@
             // 
             // Column1
             // 
-            dataGridViewCellStyle13.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
-            dataGridViewCellStyle13.Font = new System.Drawing.Font("Century", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
-            dataGridViewCellStyle13.ForeColor = System.Drawing.Color.Black;
-            this.Column1.DefaultCellStyle = dataGridViewCellStyle13;
+            dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
+            dataGridViewCellStyle3.Font = new System.Drawing.Font("Century", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+            dataGridViewCellStyle3.ForeColor = System.Drawing.Color.Black;
+            this.Column1.DefaultCellStyle = dataGridViewCellStyle3;
             this.Column1.HeaderText = "№";
             this.Column1.Name = "Column1";
             this.Column1.ReadOnly = true;
@@ -322,10 +322,10 @@
             // 
             // Column2
             // 
-            dataGridViewCellStyle14.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
-            dataGridViewCellStyle14.Font = new System.Drawing.Font("Century", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
-            dataGridViewCellStyle14.ForeColor = System.Drawing.Color.Black;
-            this.Column2.DefaultCellStyle = dataGridViewCellStyle14;
+            dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
+            dataGridViewCellStyle4.Font = new System.Drawing.Font("Century", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+            dataGridViewCellStyle4.ForeColor = System.Drawing.Color.Black;
+            this.Column2.DefaultCellStyle = dataGridViewCellStyle4;
             this.Column2.HeaderText = "請求月";
             this.Column2.Name = "Column2";
             this.Column2.ReadOnly = true;
@@ -334,10 +334,10 @@
             // 
             // Column3
             // 
-            dataGridViewCellStyle15.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
-            dataGridViewCellStyle15.Font = new System.Drawing.Font("ＭＳ 明朝", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
-            dataGridViewCellStyle15.ForeColor = System.Drawing.Color.Black;
-            this.Column3.DefaultCellStyle = dataGridViewCellStyle15;
+            dataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
+            dataGridViewCellStyle5.Font = new System.Drawing.Font("ＭＳ 明朝", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+            dataGridViewCellStyle5.ForeColor = System.Drawing.Color.Black;
+            this.Column3.DefaultCellStyle = dataGridViewCellStyle5;
             this.Column3.HeaderText = "請求先名称";
             this.Column3.Name = "Column3";
             this.Column3.ReadOnly = true;
@@ -346,10 +346,10 @@
             // 
             // Column4
             // 
-            dataGridViewCellStyle16.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
-            dataGridViewCellStyle16.Font = new System.Drawing.Font("Century", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
-            dataGridViewCellStyle16.ForeColor = System.Drawing.Color.Black;
-            this.Column4.DefaultCellStyle = dataGridViewCellStyle16;
+            dataGridViewCellStyle6.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
+            dataGridViewCellStyle6.Font = new System.Drawing.Font("Century", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+            dataGridViewCellStyle6.ForeColor = System.Drawing.Color.Black;
+            this.Column4.DefaultCellStyle = dataGridViewCellStyle6;
             this.Column4.HeaderText = "未印刷";
             this.Column4.Name = "Column4";
             this.Column4.ReadOnly = true;
@@ -357,10 +357,10 @@
             // 
             // Column5
             // 
-            dataGridViewCellStyle17.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
-            dataGridViewCellStyle17.Font = new System.Drawing.Font("Century", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
-            dataGridViewCellStyle17.ForeColor = System.Drawing.Color.Black;
-            this.Column5.DefaultCellStyle = dataGridViewCellStyle17;
+            dataGridViewCellStyle7.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
+            dataGridViewCellStyle7.Font = new System.Drawing.Font("Century", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+            dataGridViewCellStyle7.ForeColor = System.Drawing.Color.Black;
+            this.Column5.DefaultCellStyle = dataGridViewCellStyle7;
             this.Column5.HeaderText = "印刷済";
             this.Column5.Name = "Column5";
             this.Column5.ReadOnly = true;
@@ -368,10 +368,10 @@
             // 
             // Column10
             // 
-            dataGridViewCellStyle18.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
-            dataGridViewCellStyle18.Font = new System.Drawing.Font("Century", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
-            dataGridViewCellStyle18.ForeColor = System.Drawing.Color.Black;
-            this.Column10.DefaultCellStyle = dataGridViewCellStyle18;
+            dataGridViewCellStyle8.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
+            dataGridViewCellStyle8.Font = new System.Drawing.Font("Century", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+            dataGridViewCellStyle8.ForeColor = System.Drawing.Color.Black;
+            this.Column10.DefaultCellStyle = dataGridViewCellStyle8;
             this.Column10.HeaderText = "未印刷金額(税抜)";
             this.Column10.Name = "Column10";
             this.Column10.ReadOnly = true;
@@ -380,10 +380,10 @@
             // 
             // Column6
             // 
-            dataGridViewCellStyle19.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
-            dataGridViewCellStyle19.Font = new System.Drawing.Font("Century", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
-            dataGridViewCellStyle19.ForeColor = System.Drawing.Color.Black;
-            this.Column6.DefaultCellStyle = dataGridViewCellStyle19;
+            dataGridViewCellStyle9.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
+            dataGridViewCellStyle9.Font = new System.Drawing.Font("Century", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+            dataGridViewCellStyle9.ForeColor = System.Drawing.Color.Black;
+            this.Column6.DefaultCellStyle = dataGridViewCellStyle9;
             this.Column6.HeaderText = "印刷済金額(税抜)";
             this.Column6.Name = "Column6";
             this.Column6.ReadOnly = true;
@@ -447,7 +447,6 @@
             this.Font = new System.Drawing.Font("ＭＳ 明朝", 11.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
             this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Fixed3D;
             this.KeyPreview = true;
-            this.MinimizeBox = false;
             this.Name = "FrmReqPrintList";
             this.ShowIcon = false;
             this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
Index: trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/RequestSumList/FrmReqSumList.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/RequestSumList/FrmReqSumList.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/RequestSumList/FrmReqSumList.cs	(revision 484)
@@ -81,35 +81,14 @@
                                                     };
         #endregion
 
-        #region �s��ʐF��`
-        /// <summary>
-        /// �s��ʐF��`
-        /// </summary>
-        private enum RowColorDef
-        {
-            /// <summary>
-            /// �P:�s���s
-            /// </summary>
-            UnKnown = 1,
-            /// <summary>
-            /// �Q�F�w���i
-            /// </summary>
-            PurchaseCost,
-            /// <summary>
-            /// �R�F�����o�[
-            /// </summary>
-            DepAccount,
-        }
-        #endregion
-
         #region �s��ʐF
         /// <summary>
         /// �s��ʐF
         /// </summary>
-        private Color[] m_RowBackColor = new Color[] { Color.White
-                                                        , Color.PeachPuff
-                                                        , Color.Turquoise
-                                                        , Color.LightSeaGreen };
+        private Color[] m_RowBackColor = new Color[] { Color.PeachPuff
+                                                        , Color.White
+                                                        , Color.LavenderBlush
+                                                        , Color.Azure };
         #endregion
 
         #region �s�\����`
@@ -262,6 +241,10 @@
             CostLinkKey3,
             CostLinkKey4,
             CostLinkKey5,
+            CostLinkKey6,
+            CostLinkKey7,
+            CostLinkKey8,
+            CostLinkKey9,
         }
         #endregion
 
@@ -308,90 +291,6 @@
         private Color[] HeaderColor = new Color[] { Color.Coral, Color.SkyBlue, Color.Yellow };
         #endregion
 
-        #region �擾����f�[�^����
-        /// <summary>
-        /// �擾����f�[�^����
-        /// </summary>
-        private enum GetDBDataDef
-        {
-            ExistsFlg = 0,
-            SeqNo,
-            LineCount,
-            CompanyCode,
-            CompanyName,
-            DisplayOrder,
-            Gojyuon,
-            ConstrCode,
-            FieldName,
-            BillPrice,
-            HighwPrice,
-            HardwPrice,
-            IndswasteTax,
-            UpdateDate,
-            Bikou,
-            KojiSeikyu,
-            KojiNebiki,
-            KojiSousai,
-            JikaiKurikosi,
-            KojiKosoku,
-            KojiKanamono,
-            KojiSannhaiZei,
-            CnstrPrice,
-            CnstrPriceExist,
-            ApprovalPersonCode,         // �\���S����
-            TantoNM,                    // �\���S���Җ�
-            ApprovalDate,               // �\�����t
-            ApprovalEndFlg,             // �ŏI���F�t���O
-            AppDepCode,                 // �\���ҕ���
-            SalesPersonCode,            // �c�ƒS����
-            ConstructionPersonCode,     // �H���S����
-            ConstrSubPersonCode,        // ���S����
-            ConstructionInstructor,     // �w����
-            ConstrDepCode,              // �H���S���ҕ����R�[�h
-            SalesDepCode,               // �c�ƒS���ҕ����R�[�h
-            AssistDepCode,              // ���S���ҕ����R�[�h
-            InstrDepCode,               // �w���������R�[�h
-            PurchaseOrderMailingDate,   // �������X����
-            PurchaseOrderReturnDate,    // �������ԑ���
-            PaData,                     // �\�Z�����݃t���O
-            ConstructionLedgerRowNo,    // �H���ڍב䒠�s�ԍ�
-            ConstructionLedgerDetailNo, // �H���ڍב䒠���הԍ�
-            ConstructionLedgerColNo,    // �H���ڍב䒠��ԍ�
-            DetailNameF,                // ���׍s���ږ���
-            DetailName,                 // ���׍s����
-            PApp_PersonCode,            // �S���ҏ��F�f�[�^�F�\���S���҃R�[�h
-            PApp_ApprovalCode,          // �S���ҏ��F�f�[�^�F���F�@�\�R�[�h
-            PApp_OrderNo,               // �S���ҏ��F�f�[�^�F��t�ԍ�
-            PApp_PersonCodeApproval,    // �S���ҏ��F�f�[�^�F���F�҃R�[�h
-            PApp_ApprovalStatus,        // �S���ҏ��F�f�[�^�F���F��ԃR�[�h
-            PApp_ApprovalDate,          // �S���ҏ��F�f�[�^�F���F���t
-            AppM_ApprovalCode,          // ���F�o�H�}�X�^�F���F�@�\�R�[�h
-            AppM_DepartmentCode,        // ���F�o�H�}�X�^�F�����R�[�h
-            AppM_SeqNo,                 // ���F�o�H�}�X�^�F���F����
-            AppM_DisplayOrder,          // ���F�o�H�}�X�^�F�\����
-            AppM_ApprovalPerson,        // ���F�o�H�}�X�^�F���F�҃R�[�h
-            AppPName_PersonName,        // �S���҃}�X�^�F���F�Җ�
-            AppM_ApprovalAuthority,     // ���F�o�H�}�X�^�F�ŏI���F�ҋ敪
-            MinLine,                    // �䒠�O���[�v�ŏ��s
-            CurrentLine,                // �䒠�̃J�����g�s
-            PetitionFlg,                // �\�����S���҃R�[�h
-            DeleteFlg,                  // �폜�t���O
-            ConstrPeriod,               // �H���N�x
-            LabourKind,                 // �x���敪
-            OrverFlg,                   // �x�����߃t���O
-            LinkDataType,               // �֘A�t���f�[�^�^�C�v
-            ExecSumVal,                 // �x�����v���z
-            ExecNowVal,                 // �����x���z
-            PurchaseVal,                // �������z
-            ExecutionAmount,            // �\�Z���s���z
-            YearNumber,                 // �N�x
-            CostType,                   // �o�[�^�C�v�t���O
-            TargetType,                 // �Ώې�R�[�h�^�C�v
-            TargetCode,                 // �Ώې�R�[�h
-            SeqNoC,                     // �f�[�^�ԍ�
-        }
-        #endregion
-
         #region �R���g���[���C�x���g��`
         /// <summary>
         /// �R���g���[���C�x���g��`
@@ -907,16 +806,26 @@
             dgv.CurrentCellDirtyStateChanged -= new System.EventHandler(dgvData_CurrentCellDirtyStateChanged);
             try
             {
-                // ���͋��R���{�{�b�N�X�R�~�b�g����Ă��Ȃ���΃R�~�b�g
-                if ((dgv.CurrentCell.ColumnIndex == (int)DispColumn.KyoryokuUmu
-                    || dgv.CurrentCell.ColumnIndex == (int)DispColumn.LabourKind)
-                    && dgv.IsCurrentCellDirty)
-                {
-                    //�R�~�b�g����
-                    dgv.CommitEdit(DataGridViewDataErrorContexts.Commit);
-                    dgv.EndEdit();
-                    m_bChengeAns = true;
-                }
+                // �ύX��������Ώ������Ȃ�
+                if (!dgv.IsCurrentCellDirty) return;
+
+                DataGridViewCell CurCell = dgv.CurrentCell;
+
+                // �ƎҎx���敪�E���͋��ȊO�͏������Ȃ�
+                if (CurCell.ColumnIndex != (int)DispColumn.KyoryokuUmu
+                    && CurCell.ColumnIndex != (int)DispColumn.LabourKind) return;
+
+                //�R�~�b�g����
+                dgv.CommitEdit(DataGridViewDataErrorContexts.Commit);
+                dgv.EndEdit();
+                m_bChengeAns = true;
+
+                // ���͋��݈̂ȉ�����������
+                if (CurCell.ColumnIndex != (int)DispColumn.KyoryokuUmu) return;
+
+                DataGridViewCellEventArgs Args = new DataGridViewCellEventArgs(CurCell.ColumnIndex, CurCell.RowIndex);
+                // �Z���l�ύX����
+                GridCellValueChanged((object)dgv, Args);
             }
             catch (System.Exception ex)
             {
@@ -924,7 +833,7 @@
             }
             finally
             {
-                dgvData.CurrentCellDirtyStateChanged += new System.EventHandler(dgvData_CurrentCellDirtyStateChanged);
+                dgv.CurrentCellDirtyStateChanged += new System.EventHandler(dgvData_CurrentCellDirtyStateChanged);
             }
         }
         #endregion
@@ -1209,7 +1118,8 @@
         /// <param name="e"></param>
         private void btnPurchase_Click(object sender, EventArgs e)
         {
-
+            // �S���ҍw���i�ݒ菈��
+            CostPersonExec();
         }
         #endregion
 
Index: trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/RequestSumList/FrmReqSumList.designer.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/RequestSumList/FrmReqSumList.designer.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/RequestSumList/FrmReqSumList.designer.cs	(revision 484)
@@ -105,6 +105,10 @@
             this.btnCsvOutput = new System.Windows.Forms.Button();
             this.lblEntryDateTo = new System.Windows.Forms.Label();
             this.panel4 = new System.Windows.Forms.Panel();
+            this.label16 = new System.Windows.Forms.Label();
+            this.label15 = new System.Windows.Forms.Label();
+            this.label14 = new System.Windows.Forms.Label();
+            this.label13 = new System.Windows.Forms.Label();
             this.lblCellTotal = new System.Windows.Forms.Label();
             this.btnHelp = new System.Windows.Forms.Button();
             this.btnDspInput = new System.Windows.Forms.Button();
@@ -251,6 +255,10 @@
             this.Column23 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.Column24 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.Column25 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.Column26 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.Column27 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.Column28 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.Column29 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.panel1.SuspendLayout();
             this.pnlApproval.SuspendLayout();
             this.pnlApprovalButton.SuspendLayout();
@@ -798,6 +806,10 @@
             | System.Windows.Forms.AnchorStyles.Left) 
             | System.Windows.Forms.AnchorStyles.Right)));
             this.panel4.BackColor = System.Drawing.Color.White;
+            this.panel4.Controls.Add(this.label16);
+            this.panel4.Controls.Add(this.label15);
+            this.panel4.Controls.Add(this.label14);
+            this.panel4.Controls.Add(this.label13);
             this.panel4.Controls.Add(this.lblCellTotal);
             this.panel4.Controls.Add(this.dgvData);
             this.panel4.Location = new System.Drawing.Point(5, 114);
@@ -805,6 +817,58 @@
             this.panel4.Size = new System.Drawing.Size(1330, 536);
             this.panel4.TabIndex = 100;
             // 
+            // label16
+            // 
+            this.label16.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
+            this.label16.BackColor = System.Drawing.Color.Azure;
+            this.label16.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
+            this.label16.Font = new System.Drawing.Font("ＭＳ Ｐゴシック", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
+            this.label16.Location = new System.Drawing.Point(1079, 516);
+            this.label16.Name = "label16";
+            this.label16.Size = new System.Drawing.Size(120, 17);
+            this.label16.TabIndex = 103;
+            this.label16.Text = "部署出納行";
+            this.label16.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
+            // 
+            // label15
+            // 
+            this.label15.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
+            this.label15.BackColor = System.Drawing.Color.LavenderBlush;
+            this.label15.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
+            this.label15.Font = new System.Drawing.Font("ＭＳ Ｐゴシック", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
+            this.label15.Location = new System.Drawing.Point(951, 516);
+            this.label15.Name = "label15";
+            this.label15.Size = new System.Drawing.Size(120, 17);
+            this.label15.TabIndex = 102;
+            this.label15.Text = "購入品行";
+            this.label15.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
+            // 
+            // label14
+            // 
+            this.label14.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
+            this.label14.BackColor = System.Drawing.Color.White;
+            this.label14.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
+            this.label14.Font = new System.Drawing.Font("ＭＳ Ｐゴシック", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
+            this.label14.Location = new System.Drawing.Point(823, 516);
+            this.label14.Name = "label14";
+            this.label14.Size = new System.Drawing.Size(120, 17);
+            this.label14.TabIndex = 101;
+            this.label14.Text = "台帳行";
+            this.label14.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
+            // 
+            // label13
+            // 
+            this.label13.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
+            this.label13.BackColor = System.Drawing.Color.PeachPuff;
+            this.label13.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
+            this.label13.Font = new System.Drawing.Font("ＭＳ Ｐゴシック", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
+            this.label13.Location = new System.Drawing.Point(1207, 516);
+            this.label13.Name = "label13";
+            this.label13.Size = new System.Drawing.Size(120, 17);
+            this.label13.TabIndex = 100;
+            this.label13.Text = "関連不明行";
+            this.label13.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
+            // 
             // lblCellTotal
             // 
             this.lblCellTotal.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
@@ -1165,7 +1229,11 @@
             this.Column22,
             this.Column23,
             this.Column24,
-            this.Column25});
+            this.Column25,
+            this.Column26,
+            this.Column27,
+            this.Column28,
+            this.Column29});
             dataGridViewCellStyle38.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
             dataGridViewCellStyle38.BackColor = System.Drawing.SystemColors.Window;
             dataGridViewCellStyle38.Font = new System.Drawing.Font("ＭＳ 明朝", 11.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
@@ -1496,7 +1564,7 @@
             // 
             dataGridViewCellStyle15.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
             this.dgvCompany024.DefaultCellStyle = dataGridViewCellStyle15;
-            this.dgvCompany024.HeaderText = "次回以降繰越";
+            this.dgvCompany024.HeaderText = "次回以降\n繰越";
             this.dgvCompany024.Name = "dgvCompany024";
             this.dgvCompany024.Resizable = System.Windows.Forms.DataGridViewTriState.False;
             this.dgvCompany024.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
@@ -2319,6 +2387,34 @@
             this.Column25.ReadOnly = true;
             this.Column25.Visible = false;
             // 
+            // Column26
+            // 
+            this.Column26.HeaderText = "購入品キー１";
+            this.Column26.Name = "Column26";
+            this.Column26.ReadOnly = true;
+            this.Column26.Visible = false;
+            // 
+            // Column27
+            // 
+            this.Column27.HeaderText = "購入品キー２";
+            this.Column27.Name = "Column27";
+            this.Column27.ReadOnly = true;
+            this.Column27.Visible = false;
+            // 
+            // Column28
+            // 
+            this.Column28.HeaderText = "購入品キー３";
+            this.Column28.Name = "Column28";
+            this.Column28.ReadOnly = true;
+            this.Column28.Visible = false;
+            // 
+            // Column29
+            // 
+            this.Column29.HeaderText = "購入品キー４";
+            this.Column29.Name = "Column29";
+            this.Column29.ReadOnly = true;
+            this.Column29.Visible = false;
+            // 
             // FrmReqSumList
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
@@ -2437,6 +2533,10 @@
         private System.Windows.Forms.Panel panel5;
         private System.Windows.Forms.Button btnAddCompany;
         private System.Windows.Forms.Button btnDelCompany;
+        private System.Windows.Forms.Label label13;
+        private System.Windows.Forms.Label label15;
+        private System.Windows.Forms.Label label14;
+        private System.Windows.Forms.Label label16;
         private System.Windows.Forms.DataGridViewTextBoxColumn dgvCompany001;
         private System.Windows.Forms.DataGridViewTextBoxColumn dgvCompany002;
         private System.Windows.Forms.DataGridViewTextBoxColumn dgvCompany003;
@@ -2562,5 +2662,9 @@
         private System.Windows.Forms.DataGridViewTextBoxColumn Column23;
         private System.Windows.Forms.DataGridViewTextBoxColumn Column24;
         private System.Windows.Forms.DataGridViewTextBoxColumn Column25;
+        private System.Windows.Forms.DataGridViewTextBoxColumn Column26;
+        private System.Windows.Forms.DataGridViewTextBoxColumn Column27;
+        private System.Windows.Forms.DataGridViewTextBoxColumn Column28;
+        private System.Windows.Forms.DataGridViewTextBoxColumn Column29;
     }
 }
\ No newline at end of file
Index: trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/RequestSumList/FrmReqSumList.resx
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/RequestSumList/FrmReqSumList.resx	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/RequestSumList/FrmReqSumList.resx	(revision 484)
@@ -198,4 +198,16 @@
   <metadata name="Column25.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
+  <metadata name="Column26.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="Column27.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="Column28.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="Column29.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
 </root>
\ No newline at end of file
Index: trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/RequestSumList/FrmReqSumListAux.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/RequestSumList/FrmReqSumListAux.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/RequestSumList/FrmReqSumListAux.cs	(revision 484)
@@ -910,7 +910,6 @@
                 if (DataRowState.Unchanged == nDataRowState)
                 {
                     CurRow.Cells[(int)DispColumn.RowState].Value = DataRowState.Modified;
-                    CurRow.Cells[(int)DispColumn.TantoShoninCode].Value = CurRow.Cells[(int)DispColumn.ConstrPerson].Value;
                 }
 
                 int Code_Column = 0;
@@ -1018,7 +1017,7 @@
             try
             {
                 int nLoginManNo = CommonMotions.LoginUserData.PersonCode;
-                string strLoginManName = CommonMotions.LoginUserData.PersonName;
+                string strLoginManName = CommonMotions.LoginUserData.SealPrintName;
                 // �Ǘ��҂͏������Ȃ�
                 if (nLoginManNo == CommonDefine.AdminCode) return;
 
@@ -1665,7 +1664,7 @@
                 int nTargetCount = GetTargetCount();
                 // �����}�X�^����������
                 StringBuilder strSQL = new StringBuilder();
-                CommonMotions.CreateDepCombBoxSQL(ref strSQL, nTargetCount);
+                CommonMotions.CreateDepCombBoxSQL(ref strSQL, nTargetCount, false, true);
 
                 // �����}�X�^�Ǎ�
                 ArrayList arList = new ArrayList();
@@ -2858,11 +2857,20 @@
                 DataGridViewEX dgv = dgvData;
                 DataGridViewRow CurRow = dgv.CurrentRow;
 
+                // ���̊֘A�t���f�[�^�͏������Ȃ�
+                int nLinkDataType = CommonMotions.cnvInt(CurRow.Cells[(int)DispColumn.LinkDataType].Value);
+                if (nLinkDataType != (int)BillingDataDetail.DataTypeDef.UnKnown
+                    && nLinkDataType != (int)BillingDataDetail.DataTypeDef.Ledger)
+                {
+                    MessageBox.Show("���̃f�[�^�Ɋ֘A�t������Ă��܂��B", "�ݒ�s��", MessageBoxButtons.OK, MessageBoxIcon.Error);
+                    return;
+                }
+
                 // ���F�ς݂͏������Ȃ�
                 int nApprovalEndFlg = CommonMotions.cnvInt(CurRow.Cells[(int)DispColumn.ApprovalEndFlg].Value);
                 if (nApprovalEndFlg == (int)PaymentDataDetail.ApprovalEndFlgDef.Approval)
                 {
-                    MessageBox.Show("���F�σf�[�^�͐ݒ�ł��܂���", "�ݒ�s��", MessageBoxButtons.OK, MessageBoxIcon.Error);
+                    MessageBox.Show("���F�σf�[�^�͐ݒ�ł��܂���B", "�ݒ�s��", MessageBoxButtons.OK, MessageBoxIcon.Error);
                     return;
                 }
 
@@ -2871,7 +2879,7 @@
                 int nConstrCode = CommonMotions.cnvInt(CurRow.Cells[(int)DispColumn.GenbaCode].Value);
                 if (nConstrCode < 1 || nCompanyCode < 1)
                 {
-                    MessageBox.Show("�ƎҁE����̐ݒ肪����Ă��܂���", "�ݒ�s��", MessageBoxButtons.OK, MessageBoxIcon.Error);
+                    MessageBox.Show("�ƎҁE����̐ݒ肪����Ă��܂���B", "�ݒ�s��", MessageBoxButtons.OK, MessageBoxIcon.Error);
                     return;
                 }
 
@@ -2928,7 +2936,7 @@
                 int nConstrCode = CommonMotions.cnvInt(CurRow.Cells[(int)DispColumn.GenbaCode].Value);
 
                 // �䒠�I��
-                int[] nRowCol = new int[2];
+                int[] nRowCol = new int[3];
                 if (nConstrCode < 1 || nCompanyCode < 1) return false;
 
                 // �ƎҁE�H�����ݒ�ς݂͑䒠���s��I��
@@ -2941,6 +2949,7 @@
                 // �䒠�I���s�̃Z�b�g
                 CurRow.Cells[(int)DispColumn.LedgerDetailNo].Value = nRowCol[0];
                 CurRow.Cells[(int)DispColumn.LedgerColNo].Value = nRowCol[1];
+                CurRow.Cells[(int)DispColumn.TantoShoninCode].Value = nRowCol[2];
 
                 // ���׍s���H���䒠�f�[�^�Ɗ֘A�t������Ă��邩�ŐF��ς���
                 SetLinkLedgerColor(CurRow);
@@ -3006,6 +3015,7 @@
                 // �I�𖳂��͏������Ȃ�
                 int nSelConstrCode = 0;
                 string sSelConstrName = string.Empty;
+                string sSelPrintName = string.Empty;
                 // �s���ȊO�͑I���f�[�^���擾����
                 if (!DialogResult.Yes.Equals(frm.EndButton))
                 {
@@ -3012,16 +3022,25 @@
                     // �I��l�Z�b�g
                     nSelConstrCode = frm.ConstructionCode;
                     sSelConstrName = frm.ConstructionName;
+                    sSelPrintName = frm.PersonName;
+                    nPersonCode = frm.PersonCode;
                 }
 
                 // �s���s��I�������ꍇ�͍H�����Z�b�g���Ĕ�����
+                int nLinkDataType = CommonMotions.cnvInt(CurRow.Cells[(int)DispColumn.LinkDataType].Value);
                 int nCurConstrCode = CommonMotions.cnvInt(CurRow.Cells[(int)DispColumn.GenbaCode].Value);
-                if (nCurConstrCode == 0 && nSelConstrCode > 0)
+                int nCurConstrDetail = CommonMotions.cnvInt(CurRow.Cells[(int)DispColumn.LedgerDetailNo].Value);
+                if ((nLinkDataType == (int)BillingDataDetail.DataTypeDef.UnKnown)
+                    || (nCurConstrCode == 0)
+                    || (nCurConstrCode > 0 && nCurConstrDetail < 1))
                 {
                     CurRow.Cells[(int)DispColumn.GenbaCode].Value = nSelConstrCode;
                     CurRow.Cells[(int)DispColumn.GenbaName].Value = sSelConstrName;
                     CurRow.Cells[(int)DispColumn.GenbaName].ToolTipText = sSelConstrName;
                     CurRow.Cells[(int)DispColumn.LinkDataType].Value = (int)BillingDataDetail.DataTypeDef.Ledger;
+                    CurRow.Cells[(int)DispColumn.TantoShoninCode].Value = sSelPrintName;
+                    CurRow.Cells[(int)DispColumn.TantoShoninCode].Value = nPersonCode;
+
                     if (cnvRowState(CurRow.Cells[(int)DispColumn.RowState].Value) == DataRowState.Unchanged)
                         CurRow.Cells[(int)DispColumn.RowState].Value = DataRowState.Modified;
 
@@ -3268,6 +3287,7 @@
                 // ���ׁE��ԍ��擾
                 nRowCol[0] = frmLedger.TargetDetailNo;
                 nRowCol[1] = frmLedger.TargetColumn;
+                nRowCol[2] = frmLedger.ConstrManCode;
 
                 return true;
             }
@@ -4352,14 +4372,14 @@
                     return false;
                 }
 
-                nSelCnt = 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) == (int)RowsTypeDef.����
-                                                                            && (CommonMotions.cnvInt(x.Cells[(int)DispColumn.LedgerDetailNo].Value) < 1
-                                                                                || CommonMotions.cnvInt(x.Cells[(int)DispColumn.LedgerColNo].Value) < 1))
+                int[] CheckCol = new int[] { (int)DispColumn.RowVisible, (int)DispColumn.RowType, (int)DispColumn.LinkDataType };
+                nSelCnt = dgv.Rows.Cast<DataGridViewRow>().Where(x => CommonMotions.cnvInt(x.Cells[CheckCol[0]].Value) == (int)RowVisibleDef.Visible
+                                                                            && CommonMotions.cnvInt(x.Cells[CheckCol[1]].Value) == (int)RowsTypeDef.����
+                                                                            && (CommonMotions.cnvInt(x.Cells[CheckCol[2]].Value) == (int)BillingDataDetail.DataTypeDef.UnKnown))
                                                                             .Count();
                 if (nSelCnt > 0)
                 {
-                    MessageBox.Show("�䒠�Ɋ֘A�t�����Ă��Ȃ��s������܂��B", "�I���G���[", MessageBoxButtons.OK, MessageBoxIcon.Error);
+                    MessageBox.Show("�\���f�[�^�ɕs���f�[�^�����݂��܂��B", "�I���G���[", MessageBoxButtons.OK, MessageBoxIcon.Error);
                     return false;
                 }
 
@@ -4910,6 +4930,94 @@
         }
         #endregion
 
+        #region �擾����f�[�^����
+        /// <summary>
+        /// �擾����f�[�^����
+        /// </summary>
+        private enum GetDBDataDef
+        {
+            ExistsFlg = 0,
+            SeqNo,
+            LineCount,
+            CompanyCode,
+            CompanyName,
+            DisplayOrder,
+            Gojyuon,
+            ConstrCode,
+            FieldName,
+            BillPrice,
+            HighwPrice,
+            HardwPrice,
+            IndswasteTax,
+            UpdateDate,
+            Bikou,
+            KojiSeikyu,
+            KojiNebiki,
+            KojiSousai,
+            JikaiKurikosi,
+            KojiKosoku,
+            KojiKanamono,
+            KojiSannhaiZei,
+            CnstrPrice,
+            CnstrPriceExist,
+            ApprovalPersonCode,         // �\���S����
+            TantoNM,                    // �\���S���Җ�
+            ApprovalDate,               // �\�����t
+            ApprovalEndFlg,             // �ŏI���F�t���O
+            AppDepCode,                 // �\���ҕ���
+            SalesPersonCode,            // �c�ƒS����
+            ConstructionPersonCode,     // �H���S����
+            ConstrSubPersonCode,        // ���S����
+            ConstructionInstructor,     // �w����
+            ConstrDepCode,              // �H���S���ҕ����R�[�h
+            SalesDepCode,               // �c�ƒS���ҕ����R�[�h
+            AssistDepCode,              // ���S���ҕ����R�[�h
+            InstrDepCode,               // �w���������R�[�h
+            PurchaseOrderMailingDate,   // �������X����
+            PurchaseOrderReturnDate,    // �������ԑ���
+            PaData,                     // �\�Z�����݃t���O
+            ConstructionLedgerRowNo,    // �H���ڍב䒠�s�ԍ�
+            ConstructionLedgerDetailNo, // �H���ڍב䒠���הԍ�
+            ConstructionLedgerColNo,    // �H���ڍב䒠��ԍ�
+            DetailNameF,                // ���׍s���ږ���
+            DetailName,                 // ���׍s����
+            PApp_PersonCode,            // �S���ҏ��F�f�[�^�F�\���S���҃R�[�h
+            PApp_ApprovalCode,          // �S���ҏ��F�f�[�^�F���F�@�\�R�[�h
+            PApp_OrderNo,               // �S���ҏ��F�f�[�^�F��t�ԍ�
+            PApp_PersonCodeApproval,    // �S���ҏ��F�f�[�^�F���F�҃R�[�h
+            PApp_ApprovalStatus,        // �S���ҏ��F�f�[�^�F���F��ԃR�[�h
+            PApp_ApprovalDate,          // �S���ҏ��F�f�[�^�F���F���t
+            AppM_ApprovalCode,          // ���F�o�H�}�X�^�F���F�@�\�R�[�h
+            AppM_DepartmentCode,        // ���F�o�H�}�X�^�F�����R�[�h
+            AppM_SeqNo,                 // ���F�o�H�}�X�^�F���F����
+            AppM_DisplayOrder,          // ���F�o�H�}�X�^�F�\����
+            AppM_ApprovalPerson,        // ���F�o�H�}�X�^�F���F�҃R�[�h
+            AppPName_PersonName,        // �S���҃}�X�^�F���F�Җ�
+            AppM_ApprovalAuthority,     // ���F�o�H�}�X�^�F�ŏI���F�ҋ敪
+            MinLine,                    // �䒠�O���[�v�ŏ��s
+            CurrentLine,                // �䒠�̃J�����g�s
+            PetitionFlg,                // �\�����S���҃R�[�h
+            DeleteFlg,                  // �폜�t���O
+            ConstrPeriod,               // �H���N�x
+            LabourKind,                 // �x���敪
+            OrverFlg,                   // �x�����߃t���O
+            LinkDataType,               // �֘A�t���f�[�^�^�C�v
+            ExecSumVal,                 // �x�����v���z
+            ExecNowVal,                 // �����x���z
+            PurchaseVal,                // �������z
+            ExecutionAmount,            // �\�Z���s���z
+            YearNumber,                 // �N�x
+            CostType,                   // �o�[�^�C�v�t���O
+            TargetType,                 // �Ώې�R�[�h�^�C�v
+            TargetCode,                 // �Ώې�R�[�h
+            SeqNoC,                     // �f�[�^�ԍ�
+            PersonCode,                 // �S���҃R�[�h
+            ActionDate,                 // �w����
+            DataType,                   // �f�[�^�敪
+            DataAddCount,               // �f�[�^�ԍ�
+        }
+        #endregion
+
         #region �O���b�h�\��
         private int m_BeforeDispRowIndex = -1;
         /// <summary>
@@ -5403,6 +5511,11 @@
                 CurRow.Cells[(int)DispColumn.CostLinkKey3].Value = CommonMotions.cnvInt(ObjCurRow[(int)GetDBDataDef.TargetType]);   // �Ώې�R�[�h�^�C�v
                 CurRow.Cells[(int)DispColumn.CostLinkKey4].Value = CommonMotions.cnvInt(ObjCurRow[(int)GetDBDataDef.TargetCode]);   // �Ώې�R�[�h
                 CurRow.Cells[(int)DispColumn.CostLinkKey5].Value = CommonMotions.cnvInt(ObjCurRow[(int)GetDBDataDef.SeqNoC]);       // �f�[�^�ԍ�
+                // �w���i�f�[�^�̃L�[���Z�b�g����
+                CurRow.Cells[(int)DispColumn.CostLinkKey6].Value = CommonMotions.cnvInt(ObjCurRow[(int)GetDBDataDef.PersonCode]);   // �S���҃R�[�h
+                CurRow.Cells[(int)DispColumn.CostLinkKey7].Value = CommonMotions.cnvInt(ObjCurRow[(int)GetDBDataDef.ActionDate]);   // �w����
+                CurRow.Cells[(int)DispColumn.CostLinkKey8].Value = CommonMotions.cnvInt(ObjCurRow[(int)GetDBDataDef.DataType]);     // �f�[�^�敪
+                CurRow.Cells[(int)DispColumn.CostLinkKey9].Value = CommonMotions.cnvInt(ObjCurRow[(int)GetDBDataDef.DataAddCount]); // �f�[�^�ԍ�
 
                 // �H���䒠�Ɗ֘A�t��������Ă��Ȃ��s�͐F��ς���
                 SetLinkLedgerColor(CurRow);
@@ -5439,36 +5552,20 @@
             {
                 int nLinkType = CommonMotions.cnvInt(CurRow.Cells[(int)DispColumn.LinkDataType].Value);
                 int DetailNo = CommonMotions.cnvInt(CurRow.Cells[(int)DispColumn.LedgerDetailNo].Value);
-                int SeqNoC = CommonMotions.cnvInt(CurRow.Cells[(int)DispColumn.CostLinkKey5].Value);
 
+                Color clrFore = RowDefaultColor[(int)RowsTypeDef.����, 0];
                 // �֘A�t����������ΐF��ς���
-                bool bReturn = true;
-                Color clrBack = m_RowBackColor[(int)RowColorDef.UnKnown];
+                Color clrBack = m_RowBackColor[nLinkType];
                 switch (nLinkType)
                 {
                     case (int)BillingDataDetail.DataTypeDef.Ledger:
                         // �䒠�f�[�^�͖��הԍ����`�F�b�N����
-                        if (DetailNo < 1) bReturn = false;
+                        if (DetailNo < 1)
+                            clrBack = m_RowBackColor[(int)BillingDataDetail.DataTypeDef.UnKnown];
                         break;
-                    case (int)BillingDataDetail.DataTypeDef.DepAccount:
-                        // �����o�[�͘A�Ԃ��`�F�b�N����
-                        //if (SeqNoC > 0)
-                        //{
-                            clrBack = Color.Azure;
-                        //}
-                        bReturn = false;
-                        break;
-                    case (int)BillingDataDetail.DataTypeDef.PurchaseCost:
-                        bReturn = false;
-                        break;
-                    default:
-                        bReturn = false;
-                        break;
                 }
-                if (bReturn) return;
 
                 // ----- �֘A�t����������Εs���F
-                Color clrFore = RowDefaultColor[(int)RowsTypeDef.����, 0];
                 for (int ix = (int)DispColumn.No; ix <= (int)DispColumn.OverValue; ix++)
                 {
                     CurRow.Cells[ix].Style.ForeColor = clrFore;
@@ -5724,6 +5821,10 @@
                 strSQL.Append("  , Bcl.TargetType");
                 strSQL.Append("  , Bcl.TargetCode");
                 strSQL.Append("  , Bcl.SeqNoC");
+                strSQL.Append("  , Bcl.PersonCode");
+                strSQL.Append("  , DATE(Bcl.ActionDate)");
+                strSQL.Append("  , Bcl.DataType");
+                strSQL.Append("  , Bcl.DataAddCount");
 
                 int DepartmentCode = GetDepartmentCode();       // �����̑I��
                 int PersonCode = GetConstrPersonCode();         // �c�ƒS���҂̑I��
@@ -5893,7 +5994,7 @@
 
                 int DefaultCol = ClsChangeLedgerData.GetLedgerColumnCount();
                 strSQL.Append("      Left Join (Select");
-                strSQL.Append("                      clex.*");
+                strSQL.AppendFormat("                {0}", IOConstructionLedgerExcute.CreateFieldNameList("clex."));
                 strSQL.Append("                 From constructionledgerexcute As clex");
                 strSQL.Append("                   Inner Join (Select");
                 strSQL.Append("                                    A.ConstructionCode");
@@ -5918,6 +6019,7 @@
                 strSQL.Append("         On TougetsuVal.ConstructionCode = Cld.ConstructionCode");
                 strSQL.Append("         And TougetsuVal.GroupCount = Cld.GroupCount");
                 strSQL.Append("         And TougetsuVal.LineCount = Cld.LineCount");
+
                 strSQL.Append("      Left Join billingcostdatalink As Bcl");
                 strSQL.Append("         On Bcl.CompanyCode = Bdd.COMPANYCODE");
                 strSQL.Append("         And Bcl.TargetDate = Bdd.TARGETDATE");
@@ -5925,6 +6027,17 @@
                 strSQL.Append("         And Bcl.LineCount = Bdd.LINECOUNT");
                 strSQL.Append("         And Bcl.LabourKind = Bdd.LABOURKIND");
 
+                int nTargetDate = CommonMotions.cnvInt(cmbTargetMonth.SelectedValue);
+                int nYear = CommonMotions.cnvTruncate(nTargetDate / 100);
+                int nMounth = nTargetDate - (nYear * 100);
+                DateTime FirstDate = new DateTime(nYear, nMounth, 1);
+                DateTime EndDate = FirstDate.EndOfMonth();
+                strSQL.Append("      Left Join (Select");
+                strSQL.AppendFormat("                  {0}", IOMChgChargeDep.CreateFieldNameList("ChgChargeDep."));
+                strSQL.Append("                          From ChgChargeDep");
+                strSQL.AppendFormat("                    Where (DATE (StartDate) <= '{0}'", EndDate);
+                strSQL.AppendFormat("                        And '{0}' <= DATE(CompDate))) As ChargeDep", EndDate);
+                strSQL.Append("            On ChargeDep.PersonCode = Picm.PersonCode");
 
                 strSQL.AppendFormat(" Where Bdd.TargetDate = {0} ", m_SelTargetDate);
                 strSQL.AppendFormat(" And Bdd.DELETEFLG = {0}", (int)CommonDefine.DataDeleteDef.Exists);
@@ -5938,20 +6051,14 @@
                 // ����SQL�̃Z�L�����e�B���蕔�����쐬����
                 CreateSecuritySQL(ref strSQL);
 
+                // �����E�S���҂��I������Ă���ꍇ
+                if (DepartmentCode > 0 || PersonCode > 0)
+                {
+                    strSQL.Append(GetDataManSQL(DepartmentCode, PersonCode));
+                }
+
                 if (NormalData)
                 {   // ----- �ʏ�I���f�[�^
-                    if (PersonCode > 0)
-                    {
-                        // �S���҂��I������Ă���ꍇ
-                        //strSQL.Append(GetBaseManSQL(DepartmentCode, PersonCode));
-                        strSQL.Append(GetDataManSQL(DepartmentCode, PersonCode));
-                    }
-                    else if (DepartmentCode > 0)
-                    {
-                        // �������I������Ă���ꍇ
-                        strSQL.Append(GetBaseDepartmentSQL(DepartmentCode));
-                    }
-
                     // �s����ǉ�����
                     strSQL.AppendFormat(" Or (Bdd.TargetDate = {0} ", m_SelTargetDate);
                     strSQL.AppendFormat(" And Bdd.LabourKind = {0}", m_Labourkind);
@@ -5960,7 +6067,6 @@
                 }
                 else
                 {   // ----- �\���Ώۃf�[�^
-                    strSQL.Append(GetDataManSQL(DepartmentCode, PersonCode));
 
                     strSQL.Append(" And (((Bdd.BILLPRICE != 0)");
                     strSQL.Append("  Or (Bdd.HIGHWPRICE != 0)");
@@ -6123,6 +6229,10 @@
                 strSQL.Append("  , 0 As TargetType");
                 strSQL.Append("  , 0 As TargetCode");
                 strSQL.Append("  , 0 As SeqNoC");
+                strSQL.Append("  , 0 As PersonCode");
+                strSQL.Append("  , 0 As ActionDate");
+                strSQL.Append("  , 0 As DataType");
+                strSQL.Append("  , 0 As DataAddCount");
 
                 strSQL.Append(" From ConstructionLedgerDetail as Cld ");
 
@@ -6208,7 +6318,7 @@
                 strSQL.Append("         And NowSumVal.LineCount = Cld.LineCount");
 
                 strSQL.Append("      Left Join (Select");
-                strSQL.Append("                      clex.*");
+                strSQL.AppendFormat("               {0}", IOConstructionLedgerExcute.CreateFieldNameList("clex."));
                 strSQL.Append("                 From constructionledgerexcute As clex");
                 strSQL.Append("                   Inner Join (Select");
                 strSQL.Append("                                    A.ConstructionCode");
@@ -6234,6 +6344,18 @@
                 strSQL.Append("                   And TougetsuVal.GroupCount = Cld.GroupCount");
                 strSQL.Append("                   And TougetsuVal.LineCount = Cld.LineCount");
 
+                int nTargetDate = CommonMotions.cnvInt(cmbTargetMonth.SelectedValue);
+                int nYear = CommonMotions.cnvTruncate(nTargetDate / 100);
+                int nMounth = nTargetDate - (nYear * 100);
+                DateTime FirstDate = new DateTime(nYear, nMounth, 1);
+                DateTime EndDate = FirstDate.EndOfMonth();
+                strSQL.Append("      Left Join (Select");
+                strSQL.AppendFormat("                  {0}", IOMChgChargeDep.CreateFieldNameList("ChgChargeDep."));
+                strSQL.Append("                          From ChgChargeDep");
+                strSQL.AppendFormat("                    Where (DATE (StartDate) <= '{0}'", EndDate);
+                strSQL.AppendFormat("                        And '{0}' <= DATE(CompDate))) As ChargeDep", EndDate);
+                strSQL.Append("            On ChargeDep.PersonCode = Picm.PersonCode");
+
                 strSQL.Append(" Where ");
                 strSQL.AppendFormat(" Cbi.ConstructionStatusFlg != {0}", nNotCode);
                 strSQL.AppendFormat("  And Cld.GroupCount = {0} ", (int)ConstructionLedgerDetail.GroupCountDef.ConstructionCosts);
@@ -6247,20 +6369,15 @@
                     strSQL.AppendFormat("  And Scm.LabourKind = {0}", m_Labourkind);
 
                 // ����SQL�̃Z�L�����e�B���蕔�����쐬����
-                CreateSecuritySQL(ref strSQL);
+                CreateSecuritySQL(ref strSQL, true);
 
                 int DepartmentCode = GetDepartmentCode();       // �����̑I��
                 int PersonCode = GetConstrPersonCode();         // �c�ƒS���҂̑I��
-                if (DepartmentCode > 0 && PersonCode > 0)
+                // �����E�S���҂��I������Ă���ꍇ
+                if (DepartmentCode > 0 || PersonCode > 0)
                 {
-                    // �S���҂��I������Ă���ꍇ
-                    strSQL.Append(GetBaseManSQL(DepartmentCode, PersonCode));
+                    strSQL.Append(GetDataManSQL(DepartmentCode, PersonCode, true));
                 }
-                else if (DepartmentCode > 0)
-                {
-                    // �������I������Ă���ꍇ
-                    strSQL.Append(GetBaseDepartmentSQL(DepartmentCode));
-                }
 
                 strSQL.Append("  And Not Exists(Select * From billingdatadetail As execDB");
                 strSQL.AppendFormat("                    Where execDB.TargetDate = {0}", m_SelTargetDate);
@@ -6304,7 +6421,7 @@
         /// <summary>
         /// ����SQL�̃Z�L�����e�B���蕔�����쐬����
         /// </summary>
-        private void CreateSecuritySQL(ref StringBuilder strSQL)
+        private void CreateSecuritySQL(ref StringBuilder strSQL, bool bNew = false)
         {
             try
             {
@@ -6325,49 +6442,63 @@
                 {
                     // �ꕔ�����L
                     // �@���Ǘ��ҁi�������̂݁j
-                    int iStatus = CommonDefine.ProjectsStatus.First(x => x.Value.Equals("���ϒ�o")).Key;
-                    int iStatus2 = CommonDefine.ProjectsStatus.First(x => x.Value.Equals("�������p")).Key;
+                    if (bNew)
+                    {
+                        // �c�ƒS������
+                        strSQL.AppendFormat(" And ((Cbi.SalesPersonCode = {0}", CommonMotions.LoginUserData.PersonCode);
+                        strSQL.Append("        Or Cbi.SalesDepCode");
+                        strSQL.Append("             IN (SELECT A1.DEPARTMENTCODE FROM PERSONDEPARTMENTMASTER A1");
+                        strSQL.AppendFormat("                   WHERE A1.PERSONCODE = {0}))", CommonMotions.LoginUserData.PersonCode);
+                        // �H���S������
+                        strSQL.AppendFormat("  Or ((Cbi.ConstructionPersonCode = {0}", CommonMotions.LoginUserData.PersonCode);
+                        strSQL.Append("           Or Cbi.ConstrDepCode");
+                        strSQL.Append("              IN (SELECT A2.DEPARTMENTCODE FROM PERSONDEPARTMENTMASTER A2");
+                        strSQL.AppendFormat("                    WHERE A2.PERSONCODE = {0}))", CommonMotions.LoginUserData.PersonCode);
+                        // �H�����S������
+                        strSQL.AppendFormat("  Or (Cbi.CONSTRSUBPERSONCODE = {0}", CommonMotions.LoginUserData.PersonCode);
+                        strSQL.Append("           Or Cbi.ConstrSubDepCode");
+                        strSQL.Append("              IN (SELECT A3.DEPARTMENTCODE FROM PERSONDEPARTMENTMASTER A3");
+                        strSQL.AppendFormat("                    WHERE A3.PERSONCODE = {0}))", CommonMotions.LoginUserData.PersonCode);
+                        // �w��������
+                        strSQL.AppendFormat("  Or (Cbi.ConstructionInstructor = {0}", CommonMotions.LoginUserData.PersonCode);
+                        strSQL.Append("           Or Cbi.ConstrInstrDepCode");
+                        strSQL.Append("              IN (SELECT A4.DEPARTMENTCODE FROM PERSONDEPARTMENTMASTER A4");
+                        strSQL.AppendFormat("                    WHERE A4.PERSONCODE = {0})))", CommonMotions.LoginUserData.PersonCode);
 
-                    strSQL.Append(" And (");
-
-                    strSQL.AppendFormat("(Cbi.SalesPersonCode = {0}", CommonMotions.LoginUserData.PersonCode);
-                    strSQL.Append("    Or Cbi.SalesDepCode IN(SELECT A1.DEPARTMENTCODE FROM PERSONDEPARTMENTMASTER A1");
-                    strSQL.AppendFormat("                   WHERE A1.PERSONCODE = {0}))", CommonMotions.LoginUserData.PersonCode);
-
-                    strSQL.AppendFormat(" Or (Cbi.ConstructionStatusFlg >= {0}", iStatus);
-
-                    strSQL.Append(" And (");
-                    strSQL.AppendFormat("(Cbi.ConstructionPersonCode = {0}", CommonMotions.LoginUserData.PersonCode);
-                    strSQL.Append("    Or Cbi.ConstrDepCode IN(SELECT A2.DEPARTMENTCODE FROM PERSONDEPARTMENTMASTER A2");
-                    strSQL.AppendFormat("                    WHERE A2.PERSONCODE = {0}))", CommonMotions.LoginUserData.PersonCode);
-
-                    strSQL.AppendFormat(" Or (Cbi.CONSTRSUBPERSONCODE = {0}", CommonMotions.LoginUserData.PersonCode);
-                    strSQL.Append("        Or Cbi.ConstrSubDepCode IN(SELECT A3.DEPARTMENTCODE FROM PERSONDEPARTMENTMASTER A3");
-                    strSQL.AppendFormat("                          WHERE A3.PERSONCODE = {0}))", CommonMotions.LoginUserData.PersonCode);
-
-                    strSQL.AppendFormat(" Or (Cbi.ConstructionInstructor = {0}", CommonMotions.LoginUserData.PersonCode);
-                    strSQL.Append("        Or Cbi.ConstrInstrDepCode IN(SELECT A4.DEPARTMENTCODE FROM PERSONDEPARTMENTMASTER A4");
-                    strSQL.AppendFormat("                          WHERE A4.PERSONCODE = {0}))", CommonMotions.LoginUserData.PersonCode);
-                    strSQL.Append("))");
-
-                    strSQL.AppendFormat(" Or (Cbi.ConstructionStatusFlg >= {0} And Cbi.ConstructionPersonCode = 0)", iStatus);          // �������͌��ϒ�o��ōH���S���҂������Ă��Ȃ��ꍇ�\��
-                    strSQL.AppendFormat(" Or (Cbi.ConstructionStatusFlg = {0}", iStatus2);                                            // �������p���͈��p�����̂��̂͌�����
-                    strSQL.AppendFormat(" And Cbi.TransferConstruction = {0}))", CommonMotions.LoginUserData.DepartmentCode);
+                        int iStatus = CommonDefine.ProjectsStatus.First(x => x.Value.Equals("���ϒ�o")).Key;
+                        int iStatus2 = CommonDefine.ProjectsStatus.First(x => x.Value.Equals("�������p")).Key;
+                        // �������͌��ϒ�o��ōH���S���҂������Ă��Ȃ��ꍇ�\���A�������p���͈��p�����̂��̂͌�����
+                        strSQL.AppendFormat(" Or (Cbi.ConstructionStatusFlg >= {0} And Cbi.ConstructionPersonCode = 0)", iStatus);
+                        strSQL.AppendFormat(" Or (Cbi.ConstructionStatusFlg = {0}", iStatus2);                                              
+                        strSQL.AppendFormat(" And Cbi.TransferConstruction = {0}))", CommonMotions.LoginUserData.DepartmentCode);
+                    }
+                    else
+                    {
+                        strSQL.Append("  And (Exists (Select * From PersonDepartmentMaster As A");
+                        strSQL.AppendFormat("                 Where PersonCode = {0}",CommonMotions.LoginUserData.PersonCode);
+                        strSQL.Append("                       And A.DepartmentCode In (Select DepartmentCode From ChgchargeDep As B");
+                        strSQL.AppendFormat("                                          Where PersonCode = Cbi.ConstructionPersonCode))");
+                        strSQL.AppendFormat("  Or (ifnull(Pdd.APPROVALPERSONCODE, 0) != {0}", CommonMotions.LoginUserData.PersonCode);
+                        strSQL.AppendFormat("      And Bdd.LinkDataType = {0}))", (int)BillingDataDetail.DataTypeDef.UnKnown);
+                    }
                 }
                 else if (CommonMotions.LoginUserSecurity.SecRange == CommonDefine.SecurityRangeList[None].Key)
                 {
                     // ��ʎg�p��
-                    int iStatus = CommonDefine.ProjectsStatus.First(x => x.Value.Equals("���ϒ�o")).Key;
-
-                    strSQL.AppendFormat(" And (Cbi.SalesPersonCode = {0}", CommonMotions.LoginUserData.PersonCode);
-
-                    strSQL.AppendFormat(" Or (Cbi.ConstructionStatusFlg > {0}", iStatus);
-
-                    strSQL.AppendFormat(" And (Cbi.ConstructionPersonCode = {0}", CommonMotions.LoginUserData.PersonCode);
-
-                    strSQL.AppendFormat(" Or Cbi.CONSTRSUBPERSONCODE = {0}", CommonMotions.LoginUserData.PersonCode);
-
-                    strSQL.AppendFormat(" Or Cbi.ConstructionInstructor = {0})))", CommonMotions.LoginUserData.PersonCode);
+                    if (bNew)
+                    {
+                        strSQL.AppendFormat(" And (Cbi.SalesPersonCode = {0}", CommonMotions.LoginUserData.PersonCode);
+                        strSQL.AppendFormat("    Or Cbi.ConstructionPersonCode = {0}", CommonMotions.LoginUserData.PersonCode);
+                        strSQL.AppendFormat("    Or Cbi.CONSTRSUBPERSONCODE = {0}", CommonMotions.LoginUserData.PersonCode);
+                        strSQL.AppendFormat("    Or Cbi.ConstructionInstructor = {0})", CommonMotions.LoginUserData.PersonCode);
+                    }
+                    else
+                    {
+                        strSQL.AppendFormat(" And (Cbi.ConstructionPersonCode = {0}", CommonMotions.LoginUserData.PersonCode);
+                        strSQL.AppendFormat("      Or (Pdd.APPROVALPERSONCODE = {0})", CommonMotions.LoginUserData.PersonCode);
+                        strSQL.AppendFormat("      Or (ifnull(Pdd.APPROVALPERSONCODE, 0) != {0}", CommonMotions.LoginUserData.PersonCode);
+                        strSQL.AppendFormat("          And Bdd.LinkDataType = {0}))", (int)BillingDataDetail.DataTypeDef.UnKnown);
+                    }
                 }
             }
             catch (Exception ex)
@@ -6377,114 +6508,52 @@
         }
         #endregion
 
-        #region �������I������Ă���ꍇ�A�H�������擾����
-        /// <summary>
-        /// �������I������Ă���ꍇ�A�H�������擾����
-        /// </summary>
-        /// <returns></returns>
-        private string GetBaseDepartmentSQL(int DepartmentCode)
-        {
-            try
-            {
-                StringBuilder strRet = new StringBuilder();
-
-                strRet.AppendFormat(" And (Cbi.ConstrDepCode = {0}", DepartmentCode);
-                strRet.AppendFormat(" Or Cbi.SalesDepCode = {0}", DepartmentCode);
-                strRet.AppendFormat(" Or Cbi.ConstrSubDepCode = {0}", DepartmentCode);
-                strRet.AppendFormat(" Or Cbi.ConstrInstrDepCode = {0})", DepartmentCode);
-
-                return strRet.ToString();
-            }
-            catch (Exception ex)
-            {
-                logger.ErrorFormat("�V�X�e���G���[�F{0}�F{1}", CommonMotions.GetMethodName(), ex.Message);
-                return string.Empty;
-            }
-        }
-        #endregion
-
-        #region �S���҂��I������Ă���ꍇ�A�H�������擾����
-        /// <summary>
-        /// �S���҂��I������Ă���ꍇ�A�H�������擾����
-        /// </summary>
-        /// <returns></returns>
-        private string GetBaseManSQL(int DepartmentCode, int PersonCode)
-        {
-            try
-            {
-                StringBuilder strRet = new StringBuilder();
-
-                strRet.Append(" And (");
-                strRet.Append(" (");
-                if (DepartmentCode > 0) strRet.AppendFormat(" Cbi.ConstrDepCode = {0} And", DepartmentCode);
-                strRet.AppendFormat(" Cbi.ConstructionPersonCode = {0}", PersonCode);
-                strRet.Append(")");
-
-                strRet.Append(" Or (");
-                if (DepartmentCode > 0) strRet.AppendFormat(" Cbi.SalesDepCode = {0} And", DepartmentCode);
-                strRet.AppendFormat(" Cbi.SalesPersonCode = {0}", PersonCode);
-                strRet.Append(")");
-
-                strRet.Append(" Or (");
-                if (DepartmentCode > 0) strRet.AppendFormat(" Cbi.ConstrSubDepCode = {0} And", DepartmentCode);
-                strRet.AppendFormat(" Cbi.ConstrSubPersonCode = {0}", PersonCode);
-                strRet.Append(")");
-
-                strRet.Append(" Or (");
-                if (DepartmentCode > 0) strRet.AppendFormat(" Cbi.ConstrInstrDepCode = {0} And ", DepartmentCode);
-                strRet.AppendFormat(" Cbi.ConstructionInstructor = {0}", PersonCode);
-                strRet.Append(")");
-
-                strRet.Append(")");
-
-                return strRet.ToString();
-            }
-            catch (Exception ex)
-            {
-                logger.ErrorFormat("�V�X�e���G���[�F{0}�F{1}", CommonMotions.GetMethodName(), ex.Message);
-                return string.Empty;
-            }
-        }
-        #endregion
-
         #region �S���҂��I������Ă���ꍇ�A�����f�[�^���擾����
         /// <summary>
         /// �S���҂��I������Ă���ꍇ�A�����f�[�^���擾����
         /// </summary>
         /// <returns></returns>
-        private string GetDataManSQL(int DepartmentCode, int PersonCode)
+        private string GetDataManSQL(int DepartmentCode, int PersonCode, bool bNew = false)
         {
             try
             {
                 StringBuilder strRet = new StringBuilder();
 
-                strRet.Append(" And ((");
-                strRet.Append(" (");
-                if (DepartmentCode > 0) strRet.AppendFormat(" Cbi.ConstrDepCode = {0} And", DepartmentCode);
-                strRet.AppendFormat(" Cbi.ConstructionPersonCode = {0}", PersonCode);
-                strRet.Append(")");
+                // �����E�S���Ґݒ薳�͏������Ȃ�
+                if (DepartmentCode < 1 && PersonCode < 1) return string.Empty;
 
-                strRet.Append(" Or (");
-                if (DepartmentCode > 0) strRet.AppendFormat(" Cbi.SalesDepCode = {0} And", DepartmentCode);
-                strRet.AppendFormat(" Cbi.SalesPersonCode = {0}", PersonCode);
-                strRet.Append(")");
+                if (DepartmentCode > 0 && PersonCode > 0)
+                {
+                    // �V�K�f�[�^�Ɗ����f�[�^�̓L�[�̌����ӏ����Ⴄ
+                    if (bNew)
+                    {
+                        strRet.AppendFormat(" And (((Cbi.ConstrDepCode = {0}", DepartmentCode);
+                        strRet.AppendFormat("        And Cbi.ConstructionPersonCode = {0})", PersonCode);
+                        strRet.AppendFormat("     Or (Cbi.SalesDepCode = {0}", DepartmentCode);
+                        strRet.AppendFormat("        And Cbi.SalesPersonCode = {0})", PersonCode);
+                        strRet.AppendFormat("     Or (Cbi.ConstrSubDepCode = {0}", DepartmentCode);
+                        strRet.AppendFormat("        And Cbi.ConstrSubPersonCode = {0})", PersonCode);
+                        strRet.AppendFormat("     Or (Cbi.ConstrInstrDepCode = {0}", DepartmentCode);
+                        strRet.AppendFormat("        And Cbi.ConstructionInstructor = {0}))", PersonCode);
+                        strRet.AppendFormat("   OR (ChargeDep.DepartmentCode = {0}", DepartmentCode);
+                        strRet.AppendFormat("       And ChargeDep.PersonCode = {0}", PersonCode);
+                        strRet.Append("             And ifnull(Cbi.ConstructionPersonCode, 0) = 0))");
+                    }
+                    else
+                    {
+                        strRet.AppendFormat(" And (Picm.DepartmentCode = {0}", DepartmentCode);
+                        strRet.AppendFormat(" And Picm.PERSONCODE = {0})", PersonCode);
+                    }
+                }
+                else
+                {
+                    strRet.AppendFormat(" And (((Cbi.ConstrDepCode = {0})", DepartmentCode);
+                    strRet.AppendFormat("     Or (Cbi.SalesDepCode = {0})", DepartmentCode);
+                    strRet.AppendFormat("     Or (Cbi.ConstrSubDepCode = {0})", DepartmentCode);
+                    strRet.AppendFormat("     Or (Cbi.ConstrInstrDepCode = {0}))", DepartmentCode);
+                    strRet.AppendFormat("   OR (ChargeDep.DepartmentCode = {0}))", DepartmentCode);
+                }
 
-                strRet.Append(" Or (");
-                if (DepartmentCode > 0) strRet.AppendFormat(" Cbi.ConstrSubDepCode = {0} And", DepartmentCode);
-                strRet.AppendFormat(" Cbi.ConstrSubPersonCode = {0}", PersonCode);
-                strRet.Append(")");
-
-                strRet.Append(" Or (");
-                if (DepartmentCode > 0) strRet.AppendFormat(" Cbi.ConstrInstrDepCode = {0} And ", DepartmentCode);
-                strRet.AppendFormat(" Cbi.ConstructionInstructor = {0}", PersonCode);
-                strRet.Append(")");
-                strRet.Append(")");
-
-                strRet.AppendFormat(" OR (Picm.DepartmentCode = {0}", DepartmentCode);
-                strRet.AppendFormat(" And Pdd.APPROVALPERSONCODE = {0}", PersonCode);
-                strRet.Append("       And ifnull(Cbi.ConstrDepCode, 0) < 1)");
-                strRet.Append(")");
-
                 return strRet.ToString();
             }
             catch (Exception ex)
@@ -6600,7 +6669,8 @@
                                         IOConstructionLedgerDetail IoDetail,
                                         IOConstructionLedgerExcute IoExec,
                                         IOCostDataOfCompensation CostDB,
-                                        IOBillingCostDataLink LinkDB)
+                                        IOBillingCostDataLink LinkDB,
+                                        IOCostDataOfPerson ManCostDB)
         {
             try
             {
@@ -6610,6 +6680,7 @@
                 IoExec.rollback();
                 CostDB.rollback();
                 LinkDB.rollback();
+                ManCostDB.rollback();
             }
             catch (System.Exception ex)
             {
@@ -7145,10 +7216,13 @@
                     }
                 }
 
-                // ���v�s�폜
-                foreach (DataGridViewRow r in TotalRows)
+                if (TotalRows != null)
                 {
-                    dgv.Rows.Remove(r);
+                    // ���v�s�폜
+                    foreach (DataGridViewRow r in TotalRows)
+                    {
+                        dgv.Rows.Remove(r);
+                    }
                 }
 
                 ResetNo();
@@ -7359,6 +7433,7 @@
             IOMSubContractor IoSub = new IOMSubContractor();
             IOCostDataOfCompensation CostDB = new IOCostDataOfCompensation();
             IOBillingCostDataLink LinkDB = new IOBillingCostDataLink();
+            IOCostDataOfPerson ManCostDB = new IOCostDataOfPerson();
 
             // �ΏۃO���b�h�擾
             DataGridViewEX dgv = dgvData;
@@ -7379,15 +7454,16 @@
                 IoSub.connect(); IoSub.beginTran();
                 CostDB.connect(); CostDB.beginTran();
                 LinkDB.connect(); LinkDB.beginTran();
+                ManCostDB.connect(); ManCostDB.beginTran();
 
-                 // �K�v�s���o�i���ׂŕύX���������s��Ώہj
-                 DataGridViewRow[] TargetRows = dgv.Rows.Cast<DataGridViewRow>()
-                                                        .Where(x => CommonMotions.cnvInt(x.Cells[(int)DispColumn.RowType].Value) == (int)RowsTypeDef.����
-                                                                    && CommonMotions.cnvInt(x.Cells[(int)DispColumn.RowState].Value) != (int)DataRowState.Unchanged)
-                                                        .OrderBy(y => y.Cells[(int)DispColumn.CompanyCode].Value)
-                                                        .ThenBy(y1 => y1.Cells[(int)DispColumn.SeqNo].Value)
-                                                        .ThenBy(y2 => y2.Cells[(int)DispColumn.LineCount].Value)
-                                                        .ToArray();
+                // �K�v�s���o�i���ׂŕύX���������s��Ώہj
+                DataGridViewRow[] TargetRows = dgv.Rows.Cast<DataGridViewRow>()
+                                                      .Where(x => CommonMotions.cnvInt(x.Cells[(int)DispColumn.RowType].Value) == (int)RowsTypeDef.����
+                                                                  && CommonMotions.cnvInt(x.Cells[(int)DispColumn.RowState].Value) != (int)DataRowState.Unchanged)
+                                                      .OrderBy(y => y.Cells[(int)DispColumn.CompanyCode].Value)
+                                                      .ThenBy(y1 => y1.Cells[(int)DispColumn.SeqNo].Value)
+                                                      .ThenBy(y2 => y2.Cells[(int)DispColumn.LineCount].Value)
+                                                      .ToArray();
                 // �O���[�s���O�������̂�߂�
                 SetGroupingNameReset(TargetRows);
 
@@ -7457,7 +7533,7 @@
 
                             // �����o�[�f�[�^�X�V�o�^
                             if (nLinkKey > 0)
-                                if (!ModCostdataOfCompensation(CostDB, LinkDB, CurRow, ref nErrCode))
+                                if (!ModCostdataOhter(CostDB, LinkDB, ManCostDB, CurRow, ref nErrCode))
                                     throw new Exception(CreateEntryErrorMsg(nErrCode, "�����o�[�f�[�^", "�X�V�o�^"));
                         }
                         else if (CurStatus == DataRowState.Modified)
@@ -7478,7 +7554,7 @@
 
                             // �����o�[�f�[�^�X�V�o�^
                             if (nLinkKey > 0)
-                                if (!ModCostdataOfCompensation(CostDB, LinkDB, CurRow, ref nErrCode))
+                                if (!ModCostdataOhter(CostDB, LinkDB, ManCostDB, CurRow, ref nErrCode))
                                     throw new Exception(CreateEntryErrorMsg(nErrCode, "�����o�[�f�[�^", "�X�V�o�^"));
                         }
                         else if (CurStatus == DataRowState.Deleted)
@@ -7499,7 +7575,7 @@
 
                             // �����o�[�f�[�^�폜
                             if (nLinkKey > 0)
-                                if(!DeleteCostdataOfCompensation(CostDB, LinkDB, CurRow, ref nErrCode))
+                                if(!DeleteCostdataOthter(CostDB, LinkDB, ManCostDB, CurRow, ref nErrCode))
                                     throw new Exception(CreateEntryErrorMsg(nErrCode, "�����o�[�f�[�^", "�폜�o�^"));
                         }
 
@@ -7526,7 +7602,7 @@
                 }
                 catch (Exception ex)
                 {
-                    DataEntryRollBack(IoBdD, IoPdD, IoDetail, IoExec, CostDB, LinkDB);
+                    DataEntryRollBack(IoBdD, IoPdD, IoDetail, IoExec, CostDB, LinkDB, ManCostDB);
                     MessageBox.Show(ex.Message, "�o�^�����G���[", MessageBoxButtons.OK, MessageBoxIcon.Error);
                     // �G���[���̓v���O���X�ύX
                     ProgressBarCtrl(false);
@@ -7554,6 +7630,7 @@
                 IoSub.close(); IoSub = null;
                 CostDB.commit(); CostDB.close(); CostDB = null;
                 LinkDB.commit(); LinkDB.close(); LinkDB = null;
+                ManCostDB.commit(); ManCostDB.close(); ManCostDB = null;
 
                 // �v���O���X�\������
                 if (!bLinking)
@@ -8629,97 +8706,89 @@
         }
         #endregion
 
-        #region �����o�[�f�[�^�X�V
+        #region �����o�[�E�w���i�f�[�^�X�V
         /// <summary>
-        /// �����o�[�f�[�^�X�V
+        /// �����o�[�E�w���i�f�[�^�X�V
         /// </summary>
-        private bool ModCostdataOfCompensation(IOCostDataOfCompensation CostDB
+        private bool ModCostdataOhter(IOCostDataOfCompensation CostDB
                                             , IOBillingCostDataLink LinkDB
+                                            , IOCostDataOfPerson ManCostDB
                                             , DataGridViewRow CurRow
                                             , ref int nErrorCode)
         {
             try
             {
+                int nLinkDataType = CommonMotions.cnvInt(CurRow.Cells[(int)DispColumn.LinkDataType].Value);
 
-                int nYearNumber = CommonMotions.cnvInt(CurRow.Cells[(int)DispColumn.CostLinkKey1].Value);       // �N�x
-                int nCostType = CommonMotions.cnvInt(CurRow.Cells[(int)DispColumn.CostLinkKey2].Value);         // �o�[�^�C�v�t���O
-                int nTargetType = CommonMotions.cnvInt(CurRow.Cells[(int)DispColumn.CostLinkKey3].Value);       // �Ώې�R�[�h�^�C�v
-                int nTargetCode = CommonMotions.cnvInt(CurRow.Cells[(int)DispColumn.CostLinkKey4].Value);       // �Ώې�R�[�h
-                int nSeqNoC = CommonMotions.cnvInt(CurRow.Cells[(int)DispColumn.CostLinkKey5].Value);           // �f�[�^�ԍ�
-
-                int nTargetDate = CommonMotions.cnvInt(cmbTargetMonth.SelectedValue);
-                int nYear = CommonMotions.cnvTruncate(nTargetDate / 100);
-                int nMounth = nTargetDate - (nYear * 100);
-                DateTime date = new DateTime(nYear, nMounth, 1);
-                DateTime TargetDate = date.EndOfMonth();                                                            // �Ώۓ��t
-                int TargetCompanyCode = CommonMotions.cnvInt(CurRow.Cells[(int)DispColumn.CompanyCode].Value);      // �Ώۑ�����ЃR�[�h
-                string TargetName = CommonMotions.cnvString(CurRow.Cells[(int)DispColumn.DetailName].Value);        // �ΏۍH���E�w���i����
-                decimal TargetValue = CommonMotions.cnvDecimal(CurRow.Cells[(int)DispColumn.KojiSeikyu].Value)      // �Ώۋ��z
-                                    + CommonMotions.cnvDecimal(CurRow.Cells[(int)DispColumn.KojiKosoku].Value)
-                                    + CommonMotions.cnvDecimal(CurRow.Cells[(int)DispColumn.KojiKanamono].Value)
-                                    + CommonMotions.cnvDecimal(CurRow.Cells[(int)DispColumn.KojiSannhaiZei].Value);
-                int nFromCode = CommonMotions.cnvInt(CurRow.Cells[(int)DispColumn.CompanyCode].Value);
-                decimal decEntryPrice = CommonMotions.cnvLong(CurRow.Cells[(int)DispColumn.KojiSeikyu].Value)           // �������z
-                                        + CommonMotions.cnvLong(CurRow.Cells[(int)DispColumn.KojiKosoku].Value)         // ������
-                                        + CommonMotions.cnvLong(CurRow.Cells[(int)DispColumn.KojiKanamono].Value)       // ������
-                                        + CommonMotions.cnvLong(CurRow.Cells[(int)DispColumn.KojiSannhaiZei].Value);    // �Y�p��
-                string strContent = CommonMotions.cnvString(CurRow.Cells[(int)DispColumn.DetailName].Value);
-                string strBikoComment = CommonMotions.cnvString(CurRow.Cells[(int)DispColumn.Bikou].Value);
-                double dTaxRate = 1.00 + (CommonMotions.SystemMasterData.ConsumptionTax / 100.0);
-
-                // ���z�������ꍇ�͍폜���ďI��
-                if (decEntryPrice < 1)
+                if (nLinkDataType == (int)BillingDataDetail.DataTypeDef.DepAccount)
                 {
-                    bool bRet = DeleteCostdataOfCompensation(CostDB, LinkDB, CurRow, ref nErrorCode);
-                    return bRet;
-                }
+                    // �����o�[�f�[�^�Z�b�g
+                    CostDataOfCompensation CostRec = new CostDataOfCompensation();
+                    SetCostDataOfCompensation(ref CostRec);
 
-                CostDataOfCompensation CostRec = new CostDataOfCompensation
-                {
-                    // �����o�[�f�[�^�쐬
-                    YearNumber = nYearNumber,                                               // �N�x
-                    CostType = nCostType,                                                   // �o�[�^�C�v�t���O
-                    TargetType = nTargetType,                                               // �Ώې�R�[�h�^�C�v
-                    TargetCode = nTargetCode,                                               // �Ώې�R�[�h
-                    SeqNo = nSeqNoC,                                                        // �f�[�^�ԍ�
-                    PersonCode = CommonMotions.LoginUserData.PersonCode,                    // �쐬�҃R�[�h
-                    FromCodeType = (int)CostDataOfCompensation.TargetTypeDef.Company,       // �o�[���R�[�h�^�C�v
-                    FromCode = nFromCode,                                                   // �o�[���R�[�h
-                    SendDate = TargetDate.Date,                                             // �Ώۓ��t
-                    EntryPrice = decEntryPrice,                                             // ���z�i�Ŕ��j	
-                    EntryTax = CommonMotions.cnvRound((double)decEntryPrice * dTaxRate),    // ���z�i�ō��j
-                    Content = strContent,                                                   // �x�����e
-                    BikoComment = strBikoComment,                                           // ���l
-                    LockFlg = (int)CostDataOfCompensation.LockFlgDef.Locked                 // �f�[�^���b�N
-                };
-                // �����o�[�f�[�^�쐬
-                StringBuilder strSQL = new StringBuilder();
-                strSQL.Append(CostDB.CreatePrimarykeyString(CostRec.YearNumber
-                                                            , CostRec.CostType
-                                                            , CostRec.TargetType
-                                                            , CostRec.TargetCode
-                                                            , CostRec.SeqNo));
-                List<CostDataOfCompensation> CostList = new List<CostDataOfCompensation>();
-                if (!CostDB.SelectAction(strSQL.ToString(), ref CostList, false))
-                {
-                    nErrorCode = (int)EntryErrorCode.AbNormal;
-                    return false;
-                }
-                if (CostList.Count < 1)
-                {
-                    if (!CostDB.InsertAction(CostRec, false))
+                    // �����o�[�f�[�^�o�^
+                    StringBuilder strSQL = new StringBuilder();
+                    strSQL.Append(CostDB.CreatePrimarykeyString(CostRec.YearNumber
+                                                                , CostRec.CostType
+                                                                , CostRec.TargetType
+                                                                , CostRec.TargetCode
+                                                                , CostRec.SeqNo));
+                    List<CostDataOfCompensation> CostList = new List<CostDataOfCompensation>();
+                    if (!CostDB.SelectAction(strSQL.ToString(), ref CostList, false))
                     {
                         nErrorCode = (int)EntryErrorCode.AbNormal;
                         return false;
                     }
+                    if (CostList.Count < 1)
+                    {
+                        if (!CostDB.InsertAction(CostRec, false))
+                        {
+                            nErrorCode = (int)EntryErrorCode.AbNormal;
+                            return false;
+                        }
+                    }
+                    else
+                    {
+                        if (!CostDB.UpdateAction(strSQL.ToString(), CostRec, false))
+                        {
+                            nErrorCode = (int)EntryErrorCode.AbNormal;
+                            return false;
+                        }
+                    }
                 }
-                else
+                else if (nLinkDataType == (int)BillingDataDetail.DataTypeDef.PurchaseCost)
                 {
-                    if (!CostDB.UpdateAction(strSQL.ToString(), CostRec, false))
+                    CostDataOfPerson ManCostRec = new CostDataOfPerson();
+                    SetCostDataOfPersonRowData(ref ManCostRec);
+
+                    // �w���i�f�[�^�o�^
+                    StringBuilder strSQL = new StringBuilder();
+                    strSQL.Append(ManCostDB.CreatePrimarykeyString(ManCostRec.PersonCode,
+                                                                    ManCostRec.ActionDate,
+                                                                    ManCostRec.DataType,
+                                                                    ManCostRec.DataAddCount));
+                    List<CostDataOfPerson> CostList = new List<CostDataOfPerson>();
+                    if (!ManCostDB.SelectAction(strSQL.ToString(), ref CostList, false))
                     {
                         nErrorCode = (int)EntryErrorCode.AbNormal;
                         return false;
                     }
+                    if (CostList.Count < 1)
+                    {
+                        if (!ManCostDB.InsertAction(ManCostRec, false))
+                        {
+                            nErrorCode = (int)EntryErrorCode.AbNormal;
+                            return false;
+                        }
+                    }
+                    else
+                    {
+                        if (!ManCostDB.UpdateAction(strSQL.ToString(), ManCostRec, false))
+                        {
+                            nErrorCode = (int)EntryErrorCode.AbNormal;
+                            return false;
+                        }
+                    }
                 }
 
                 return true;
@@ -8733,46 +8802,75 @@
         }
         #endregion
 
-        #region �����o�[�f�[�^�폜
+        #region �����o�[�E�w���i�f�[�^�폜
         /// <summary>
-        /// �����o�[�f�[�^�폜
+        /// �����o�[�E�w���i�f�[�^�폜
         /// </summary>
-        private bool DeleteCostdataOfCompensation(IOCostDataOfCompensation CostDB
+        private bool DeleteCostdataOthter(IOCostDataOfCompensation CostDB
                                             , IOBillingCostDataLink LinkDB
+                                            , IOCostDataOfPerson ManCostDB
                                             , DataGridViewRow CurRow
                                             , ref int nErrorCode)
         {
             try
             {
+                int nLinkDataType = CommonMotions.cnvInt(CurRow.Cells[(int)DispColumn.LinkDataType].Value);
+
+                StringBuilder strSQL = new StringBuilder();
+                if (nLinkDataType == (int)BillingDataDetail.DataTypeDef.DepAccount)
+                {
+                    // �����o�[�f�[�^�폜
+                    int nYearNumber = CommonMotions.cnvInt(CurRow.Cells[(int)DispColumn.CostLinkKey1].Value);       // �N�x
+                    int nCostType = CommonMotions.cnvInt(CurRow.Cells[(int)DispColumn.CostLinkKey2].Value);         // �o�[�^�C�v�t���O
+                    int nTargetType = CommonMotions.cnvInt(CurRow.Cells[(int)DispColumn.CostLinkKey3].Value);       // �Ώې�R�[�h�^�C�v
+                    int nTargetCode = CommonMotions.cnvInt(CurRow.Cells[(int)DispColumn.CostLinkKey4].Value);       // �Ώې�R�[�h
+                    int nSeqNoC = CommonMotions.cnvInt(CurRow.Cells[(int)DispColumn.CostLinkKey5].Value);           // �f�[�^�ԍ�
+                    strSQL.Append(CostDB.CreatePrimarykeyString(nYearNumber
+                                                                , nCostType
+                                                                , nTargetType
+                                                                , nTargetCode
+                                                                , nSeqNoC));
+                    if (!CostDB.DeleteAction(strSQL.ToString(), false))
+                    {
+                        nErrorCode = (int)EntryErrorCode.AbNormal;
+                        return false;
+                    }
+                }
+                else if (nLinkDataType == (int)BillingDataDetail.DataTypeDef.PurchaseCost)
+                {
+                    // �S���ҍw���i�f�[�^�폜
+                    int PersonCode = CommonMotions.cnvInt(CurRow.Cells[(int)DispColumn.CostLinkKey6].Value);        // �S���҃R�[�h
+                    DateTime ActionDate = CommonMotions.cnvDate(CurRow.Cells[(int)DispColumn.CostLinkKey7].Value);  // �w����
+                    int DataType = CommonMotions.cnvInt(CurRow.Cells[(int)DispColumn.CostLinkKey8].Value);          // �f�[�^�敪
+                    int DataAddCount = CommonMotions.cnvInt(CurRow.Cells[(int)DispColumn.CostLinkKey9].Value);      // �f�[�^�ԍ�
+                    strSQL.Append(ManCostDB.CreatePrimarykeyString(PersonCode,
+                                                                    ActionDate,
+                                                                    DataType,
+                                                                    DataAddCount));
+                    if(!ManCostDB.DeleteAction(strSQL.ToString(), false))
+                    {
+                        nErrorCode = (int)EntryErrorCode.AbNormal;
+                        return false;
+                    }
+                }
+                else
+                {
+                    // ��L�ȊO�͏������Ȃ�
+                    return true;
+                }
+
+                // �ƎҐ��������o�[�����N�f�[�^�폜
                 int nTargetDate = CommonMotions.cnvInt(cmbTargetMonth.SelectedValue);
-                int nYearNumber = CommonMotions.cnvInt(CurRow.Cells[(int)DispColumn.CostLinkKey1].Value);       // �N�x
-                int nCostType = CommonMotions.cnvInt(CurRow.Cells[(int)DispColumn.CostLinkKey2].Value);         // �o�[�^�C�v�t���O
-                int nTargetType = CommonMotions.cnvInt(CurRow.Cells[(int)DispColumn.CostLinkKey3].Value);       // �Ώې�R�[�h�^�C�v
-                int nTargetCode = CommonMotions.cnvInt(CurRow.Cells[(int)DispColumn.CostLinkKey4].Value);       // �Ώې�R�[�h
-                int nSeqNoC = CommonMotions.cnvInt(CurRow.Cells[(int)DispColumn.CostLinkKey5].Value);           // �f�[�^�ԍ�
                 int nFromCode = CommonMotions.cnvInt(CurRow.Cells[(int)DispColumn.CompanyCode].Value);
                 int nSeqNoB = CommonMotions.cnvInt(CurRow.Cells[(int)DispColumn.SeqNo].Value);
                 int nLineCount = CommonMotions.cnvInt(CurRow.Cells[(int)DispColumn.LineCount].Value);
                 int nLabourKind = CommonMotions.cnvInt(CurRow.Cells[(int)DispColumn.LabourKind].Value);
-
-                // �����o�[�f�[�^�쐬
-                StringBuilder strSQL = new StringBuilder();
-                strSQL.Append(CostDB.CreatePrimarykeyString(nYearNumber
-                                                            , nCostType
-                                                            , nTargetType
-                                                            , nTargetCode
-                                                            , nSeqNoC));
-                if (!CostDB.DeleteAction(strSQL.ToString(), false))
-                {
-                    nErrorCode = (int)EntryErrorCode.AbNormal;
-                    return false;
-                }
-
                 strSQL.Clear();
                 strSQL.Append(LinkDB.CreatePrimarykeyString(nFromCode
                                                             , nTargetDate
                                                             , nSeqNoB
-                                                            , nLineCount));
+                                                            , nLineCount
+                                                            , nLabourKind));
                 if (!LinkDB.DeleteAction(strSQL.ToString(), false))
                 {
                     nErrorCode = (int)EntryErrorCode.AbNormal;
@@ -8779,6 +8877,11 @@
                     return false;
                 }
 
+                // �O���b�h��̃f�[�^���N���A����
+                object[] SetValue = new object[13];
+                Array.Clear(SetValue, 0, SetValue.Length);
+                SetOutValueData(SetValue);
+
                 return true;
             }
             catch (System.Exception ex)
@@ -8831,6 +8934,9 @@
                 m_BeforeRowIndex = -1;
 
                 DataGridViewRow CurRow = dgv.CurrentRow;
+                // ���F�ς͏������Ȃ�
+                int nApproval = CommonMotions.cnvInt(CurRow.Cells[(int)DispColumn.ApprovalEndFlg].Value);
+                if (nApproval == (int)PaymentDataDetail.ApprovalEndFlgDef.Approval) return;
                 // ���׈ȊO�͏������Ȃ�
                 int nType = CommonMotions.cnvInt(CurRow.Cells[(int)DispColumn.RowType].Value);
                 if (nType != (int)RowsTypeDef.����) return;
@@ -8849,47 +8955,57 @@
                 int nConstrLedgerLineNo = CommonMotions.cnvInt(CurRow.Cells[(int)DispColumn.LedgerLineNo].Value);
                 int nConstrLedgerColNo = CommonMotions.cnvInt(CurRow.Cells[(int)DispColumn.LedgerColNo].Value);
                 int nConstrLedgerDetailNo = CommonMotions.cnvInt(CurRow.Cells[(int)DispColumn.LedgerDetailNo].Value);
+                int nLinkDataType = CommonMotions.cnvInt(CurRow.Cells[(int)DispColumn.LinkDataType].Value);
 
-                // �s���s�̂݁y�䒠�I���z�{�^��ON
-                if (nGenbaCode < 1
-                    || nConstrLedgerLineNo < 1
-                    || nConstrLedgerColNo < 1
-                    || nConstrLedgerDetailNo < 1)
+                if (nLinkDataType == (int)BillingDataDetail.DataTypeDef.UnKnown)
                 {
+                    // �s���s�͑S�I���{�^��ON
                     btnLinkLedger.Enabled = true;
                     btnPurchase.Enabled = true;
                     btnCostExpence.Enabled = true;
                 }
+                else if (nLinkDataType == (int)BillingDataDetail.DataTypeDef.Ledger)
+                {
+                    // �䒠�I�����L�[��񂪑���Ȃ��ꍇ
+                    if (nGenbaCode < 1 || nConstrLedgerLineNo < 1 || nConstrLedgerColNo < 1 || nConstrLedgerDetailNo < 1)
+                    {
+                        // �s���s�̂݁y�䒠�I���z�{�^��ON
+                        btnLinkLedger.Enabled = true;
+                    }
+                }
 
+                // �I���s�C���f�b�N�X�ޔ�
+                m_BeforeRowIndex = CurRow.Index;
+
+                // �ƎҖ��\�����̂ݎ����v�Z�{�^��ON
+                if (!rdbCompany.Checked) return;
+
+                // �ݒ�s����
                 int nCompanyCode = CommonMotions.cnvInt(CurRow.Cells[(int)DispColumn.CompanyCode].Value);
-                // �ƎҖ��\����
-                if (rdbCompany.Checked)
-                {
-                    // �ݒ�s����
-                    int RowIndex = SearchRowIndex((int)DispColumn.SubConstractorCode, nCompanyCode, RowsTypeDef.���v);
-                    if (RowIndex < 0) return;
+                int RowIndex = SearchRowIndex((int)DispColumn.SubConstractorCode, nCompanyCode, RowsTypeDef.���v);
+                if (RowIndex < 0) return;
 
-                    // ----- �����v�Z�{�^��On�̔���
-                    DataGridViewRow CalcRow = dgv.Rows[RowIndex];
-                    long[] nSomuArray = new long[4];
-                    nSomuArray[0] = CommonMotions.cnvInt(CalcRow.Cells[(int)DispColumn.SomuSeikyu].Value);
-                    nSomuArray[1] = CommonMotions.cnvInt(CalcRow.Cells[(int)DispColumn.SomuKosoku].Value);
-                    nSomuArray[2] = CommonMotions.cnvInt(CalcRow.Cells[(int)DispColumn.SomuKanamono].Value);
-                    nSomuArray[3] = CommonMotions.cnvInt(CalcRow.Cells[(int)DispColumn.SomuSannhaiZei].Value);
+                // ----- �����v�Z�{�^��On�̔���
+                DataGridViewRow CalcRow = dgv.Rows[RowIndex];
+                long[] nSomuArray = new long[4];
+                nSomuArray[0] = CommonMotions.cnvInt(CalcRow.Cells[(int)DispColumn.SomuSeikyu].Value);
+                nSomuArray[1] = CommonMotions.cnvInt(CalcRow.Cells[(int)DispColumn.SomuKosoku].Value);
+                nSomuArray[2] = CommonMotions.cnvInt(CalcRow.Cells[(int)DispColumn.SomuKanamono].Value);
+                nSomuArray[3] = CommonMotions.cnvInt(CalcRow.Cells[(int)DispColumn.SomuSannhaiZei].Value);
 
-                    long[] nKojiArray = new long[7];
-                    nKojiArray[1] = CommonMotions.cnvInt(CalcRow.Cells[(int)DispColumn.KojiSeikyu].Value);
-                    nKojiArray[2] = CommonMotions.cnvInt(CalcRow.Cells[(int)DispColumn.KojiNebiki].Value);
-                    nKojiArray[3] = CommonMotions.cnvInt(CalcRow.Cells[(int)DispColumn.KojiSousai].Value);
-                    nKojiArray[4] = CommonMotions.cnvInt(CalcRow.Cells[(int)DispColumn.KojiKosoku].Value);
-                    nKojiArray[5] = CommonMotions.cnvInt(CalcRow.Cells[(int)DispColumn.KojiKanamono].Value);
-                    nKojiArray[6] = CommonMotions.cnvInt(CalcRow.Cells[(int)DispColumn.KojiSannhaiZei].Value);
+                long[] nKojiArray = new long[7];
+                nKojiArray[1] = CommonMotions.cnvInt(CalcRow.Cells[(int)DispColumn.KojiSeikyu].Value);
+                nKojiArray[2] = CommonMotions.cnvInt(CalcRow.Cells[(int)DispColumn.KojiNebiki].Value);
+                nKojiArray[3] = CommonMotions.cnvInt(CalcRow.Cells[(int)DispColumn.KojiSousai].Value);
+                nKojiArray[4] = CommonMotions.cnvInt(CalcRow.Cells[(int)DispColumn.KojiKosoku].Value);
+                nKojiArray[5] = CommonMotions.cnvInt(CalcRow.Cells[(int)DispColumn.KojiKanamono].Value);
+                nKojiArray[6] = CommonMotions.cnvInt(CalcRow.Cells[(int)DispColumn.KojiSannhaiZei].Value);
 
-                    // �����v�Z�{�^��On
-                    if (nSomuArray.Sum() > 0 && nSomuArray.Sum() == nKojiArray.Sum()) btnAutoCalc.Enabled = true;
+                // �����v�Z�{�^��On
+                if (nSomuArray.Sum() > 0 && nSomuArray.Sum() == nKojiArray.Sum())
+                {
+                    btnAutoCalc.Enabled = true;
                 }
-
-                m_BeforeRowIndex = CurRow.Index;
             }
             catch (Exception ex)
             {
@@ -9015,7 +9131,17 @@
             FrmSelectTarget frm = new FrmSelectTarget();
             try
             {
-                DialogResult drRet = frm.ShowDialog();
+                DataGridViewRow CurRow = dgvData.CurrentRow;
+                // �ݒ肳��Ă���f�[�^�͑ΏۊO
+                int nLinkDataType = CommonMotions.cnvInt(CurRow.Cells[(int)DispColumn.LinkDataType].Value);
+                if(nLinkDataType != (int)BillingDataDetail.DataTypeDef.UnKnown)
+                {
+                    MessageBox.Show("�s���s�ȊO�͏����ł��܂���", "�I���G���[", MessageBoxButtons.OK, MessageBoxIcon.Error);
+                    return;
+                }
+
+                frm.Width = FrmSelectTarget.s_DispWidthDef[0];
+                DialogResult drRet = frm.ShowDialog(this);
                 if (drRet == DialogResult.Cancel) return;
 
                 int nCostType = frm.CostType;
@@ -9023,6 +9149,7 @@
                 int nTargetCode = (int)CostDataOfCompensation.OwnCompany;
                 if (nType == (int)CostDataOfCompensation.TargetTypeDef.Department)
                     nTargetCode = frm.SelectDepCode;
+                int nConstrCode = frm.ConstrCode;
 
                 // �����o�[�f�[�^�쐬
                 if (!CreateDepartmentCost(nCostType, nType, nTargetCode)) return;
@@ -9051,78 +9178,76 @@
             IOBillingDataDetail BillDB = new IOBillingDataDetail();
             IOPaymentDataDetail PayDB = new IOPaymentDataDetail();
             bool bRet = true;
+            object[] SetValue = new object[13];
             try
             {
-                CostDataOfCompensation CostRec = new CostDataOfCompensation();
-                BillingCostDataLink LinkRec = new BillingCostDataLink();
-                PaymentDataDetail PayRec = new PaymentDataDetail();
 
-                // �����o�[�f�[�^�Z�b�g
-                SetInitCostDatas(nCostType, nTargetType, nTargetCode, CostDB, PayDB, ref CostRec, ref LinkRec, ref PayRec);
-
                 CostDB.connect(); CostDB.beginTran();
                 LinkDB.connect(); LinkDB.beginTran();
                 BillDB.connect(); BillDB.beginTran();
                 PayDB.connect(); PayDB.beginTran();
 
-                 // �����o�[�f�[�^�쐬
-                 StringBuilder strSQL = new StringBuilder();
-                strSQL.Append(CostDB.CreatePrimarykeyString(CostRec.YearNumber
-                                                            , CostRec.CostType
-                                                            , CostRec.TargetType
-                                                            , CostRec.TargetCode
-                                                            , CostRec.SeqNo));
-                List<CostDataOfCompensation> CostList = new List<CostDataOfCompensation>();
-                if (!CostDB.SelectAction(strSQL.ToString(), ref CostList, false))
+                // �f�[�^�ԍ��Z�b�g
+                int nYearNumber = CommonMotions.GetPeriodYear();
+                StringBuilder strSQL = new StringBuilder();
+                strSQL.Append(CostDB.CreatePrimarykeyString(nYearNumber,
+                                                            nCostType,
+                                                            nTargetType,
+                                                            nTargetCode));
+                int nSeqNoC = CostDB.SelectMaxAddDataCount(strSQL.ToString(), false) + 1;
+
+
+                // �O���b�h�փf�[�^�Z�b�g
+                int nPersonCode = 0;
+                string strPersonName = string.Empty;
+                GetSelectPersonCode(ref nPersonCode, ref strPersonName);
+                SetValue[0] = (int)DataRowState.Modified;
+                SetValue[1] = (int)BillingDataDetail.DataTypeDef.DepAccount;
+                SetValue[2] = nPersonCode;
+                SetValue[3] = strPersonName;
+                SetValue[4] = nYearNumber;
+                SetValue[5] = nCostType;
+                SetValue[6] = nTargetType;
+                SetValue[7] = nTargetCode;
+                SetValue[8] = nSeqNoC;
+                SetValue[9] = 0;
+                SetValue[10] = 0;
+                SetValue[11] = 0;
+                SetValue[12] = 0;
+
+                // �O���b�h�֑I��l���Z�b�g����
+                SetOutValueData(SetValue);
+
+                CostDataOfCompensation CostRec = new CostDataOfCompensation();
+
+                // �����o�[�f�[�^�Z�b�g
+                SetCostDataOfCompensation(ref CostRec);
+
+                // �����o�[�f�[�^�쐬
+                if (!CostDB.InsertAction(CostRec, false))
                 {
+                    MessageBox.Show("�����o�[�f�[�^�쐬���s���܂����B"
+                                    , "�f�[�^�쐬�G���["
+                                    , MessageBoxButtons.OK
+                                    , MessageBoxIcon.Error);
                     bRet = false;
                     return bRet;
                 }
-                if (CostList.Count < 1)
-                {
-                    if(!CostDB.InsertAction(CostRec, false))
-                    {
-                        CostDB.rollback();
-                        LinkDB.rollback();
-                        BillDB.rollback();
-                        PayDB.rollback();
-                        MessageBox.Show("�����o�[�f�[�^�쐬���s���܂����B"
-                                        , "�f�[�^�쐬�G���["
-                                        , MessageBoxButtons.OK
-                                        , MessageBoxIcon.Error);
-                        bRet = false;
-                        return bRet;
-                    }
-                }
 
-                // �ƎҐ��������o�[�����N�f�[�^�쐬
-                strSQL.Clear();
-                strSQL.Append(LinkDB.CreatePrimarykeyString(LinkRec.CompanyCode
-                                                            ,LinkRec.TargetDate
-                                                            , LinkRec.SeqNoB
-                                                            , LinkRec.LineCount));
-                List<BillingCostDataLink> LinkList = new List<BillingCostDataLink>();
-                if (!LinkDB.SelectAction(strSQL.ToString(), ref LinkList, false))
+                // �O�������N�f�[�^�Z�b�g
+                BillingCostDataLink LinkRec = new BillingCostDataLink();
+                SetCostDataLink(ref LinkRec);
+
+                // �S���ҁE�w���i�f�[�^�쐬
+                if (!LinkDB.InsertAction(LinkRec, false))
                 {
+                    MessageBox.Show("�ƎҐ��������o�[�����N�f�[�^�쐬���s���܂����B"
+                                    , "�f�[�^�쐬�G���["
+                                    , MessageBoxButtons.OK
+                                    , MessageBoxIcon.Error);
                     bRet = false;
                     return bRet;
                 }
-                if (LinkList.Count < 1)
-                {
-                    if (!LinkDB.InsertAction(LinkRec, false))
-                    {
-                        CostDB.rollback();
-                        LinkDB.rollback();
-                        BillDB.rollback();
-                        PayDB.rollback();
-                        MessageBox.Show("�ƎҐ��������o�[�����N�f�[�^�쐬���s���܂����B"
-                                        , "�f�[�^�쐬�G���["
-                                        , MessageBoxButtons.OK
-                                        , MessageBoxIcon.Error);
-                        bRet = false;
-                        return bRet;
-                    }
-                }
 
                 // �������׃f�[�^�X�V
                 if(!BillDB.UpdateFeild(LinkRec.CompanyCode
@@ -9133,10 +9258,6 @@
                                         , (int)BillingDataDetail.DataTypeDef.DepAccount
                                         , false))
                 {
-                    CostDB.rollback();
-                    LinkDB.rollback();
-                    BillDB.rollback();
-                    PayDB.rollback();
                     MessageBox.Show("�������׃f�[�^�X�V���s���܂����B"
                                     , "�f�[�^�X�V�G���["
                                     , MessageBoxButtons.OK
@@ -9145,65 +9266,21 @@
                     return bRet;
                 }
 
+                // �x�����׃f�[�^���쐬����
+                DataGridView dgv = dgvData;
+                DataGridViewRow CurRow = dgv.CurrentRow;
+                int nSeqNoB = CommonMotions.cnvInt(CurRow.Cells[(int)DispColumn.SeqNo].Value);
+                int nLineCount = CommonMotions.cnvInt(CurRow.Cells[(int)DispColumn.LineCount].Value);
+                PaymentDataDetail PayRec = new PaymentDataDetail();
+                SetRow2PaymentDataDetail(CurRow, ref PayRec, nSeqNoB, nLineCount);
+
                 // �ƎҐ������׃f�[�^�쐬
-                strSQL.Clear();
-                strSQL.Append(PayDB.CreatePrimarykeyString(PayRec.CompanyCode
-                                                            , PayRec.TargetDate
-                                                            , PayRec.SeqNo
-                                                            , PayRec.LineCount
-                                                            , PayRec.LabourKind));
-                List<PaymentDataDetail> PayList = new List<PaymentDataDetail>();
-                if (!PayDB.SelectAction(strSQL.ToString(), ref PayList, false))
+                if (!UpdatePaymentDataDetail(PayDB, PayRec))
                 {
                     bRet = false;
                     return bRet;
                 }
-                if (PayList.Count < 1)
-                {
-                    if (!PayDB.InsertAction(PayRec, false))
-                    {
-                        CostDB.rollback();
-                        LinkDB.rollback();
-                        BillDB.rollback();
-                        PayDB.rollback();
-                        MessageBox.Show("�ƎҐ������׃f�[�^�쐬���s���܂����B"
-                                        , "�f�[�^�쐬�G���["
-                                        , MessageBoxButtons.OK
-                                        , MessageBoxIcon.Error);
-                        bRet = false;
-                        return bRet;
-                    }
-                }
-                else
-                {
-                    if (!PayDB.UpdateAction(strSQL.ToString(), PayRec, false))
-                    {
-                        MessageBox.Show("�ƎҐ������׃f�[�^�X�V���s���܂����B"
-                                        , "�f�[�^�X�V�G���["
-                                        , MessageBoxButtons.OK
-                                        , MessageBoxIcon.Error);
-                        bRet = false;
-                        return bRet;
-                    }
-                }
 
-                // �O���b�h�փf�[�^�Z�b�g
-                DataGridView dgv = dgvData;
-                DataGridViewRow CurRow = dgv.CurrentRow;
-
-                CurRow.Cells[(int)DispColumn.RowState].Value = (int)DataRowState.Modified;
-                CurRow.Cells[(int)DispColumn.LinkDataType].Value = (int)BillingDataDetail.DataTypeDef.DepAccount;
-                CurRow.Cells[(int)DispColumn.TantoShoninCode].Value = CommonMotions.LoginUserData.PersonCode;
-                CurRow.Cells[(int)DispColumn.TantoShonin].Value = CommonMotions.LoginUserData.PersonName;
-                CurRow.Cells[(int)DispColumn.CostLinkKey1].Value = CostRec.YearNumber;
-                CurRow.Cells[(int)DispColumn.CostLinkKey2].Value = CostRec.CostType;
-                CurRow.Cells[(int)DispColumn.CostLinkKey3].Value = CostRec.TargetType;
-                CurRow.Cells[(int)DispColumn.CostLinkKey4].Value = CostRec.TargetCode;
-                CurRow.Cells[(int)DispColumn.CostLinkKey5].Value = CostRec.SeqNo;
-
-                // ���׍s���H���䒠�f�[�^�Ɗ֘A�t������Ă��邩�ŐF��ς���
-                SetLinkLedgerColor(CurRow);
-
                 return bRet;
             }
             catch (System.Exception ex)
@@ -9216,6 +9293,9 @@
             {
                 if (!bRet)
                 {
+                    Array.Clear(SetValue, 0, SetValue.Length);
+                    SetOutValueData(SetValue);
+
                     CostDB.rollback();
                     LinkDB.rollback();
                     BillDB.rollback();
@@ -9234,33 +9314,129 @@
         }
         #endregion
 
-        #region �����o�[�f�[�^�Z�b�g
+        #region �O���b�h�֑I��l���Z�b�g����
         /// <summary>
-        /// �����o�[�f�[�^�Z�b�g
+        /// �O���b�h�֑I��l���Z�b�g����
         /// </summary>
-        private void SetInitCostDatas(int nCostType, int nTargetType, int nTargetCode
-                                        , IOCostDataOfCompensation CostDB
-                                        , IOPaymentDataDetail PayDB
-                                        , ref CostDataOfCompensation CostRec
-                                        , ref BillingCostDataLink LinkRec
-                                        , ref PaymentDataDetail PayRec)
+        private void SetOutValueData(object[] SetValue)
         {
             try
             {
+                // �O���b�h�փf�[�^�Z�b�g
                 DataGridView dgv = dgvData;
                 DataGridViewRow CurRow = dgv.CurrentRow;
 
+                // �ύX���̏ꍇ�̂ݏ�ԃZ�b�g
+                DataRowState nDataRowState = cnvRowState(CurRow.Cells[(int)DispColumn.RowState].Value);
+                if (nDataRowState == DataRowState.Unchanged)
+                {
+                    CurRow.Cells[(int)DispColumn.RowState].Value = SetValue[0];
+                }
+
+                // �֘A�t���^�C�v�Z�b�g
+                CurRow.Cells[(int)DispColumn.LinkDataType].Value = SetValue[1];
+
+                // �S���҃R�[�h�̓����Ă��Ȃ����̂̂݃Z�b�g
+                int nShoninCode = CommonMotions.cnvInt(CurRow.Cells[(int)DispColumn.TantoShoninCode].Value);
+                if (nShoninCode < 1)
+                {
+                    CurRow.Cells[(int)DispColumn.TantoShoninCode].Value = SetValue[2];
+                    CurRow.Cells[(int)DispColumn.TantoShonin].Value = SetValue[3];
+                }
+                // �L�[���ڃZ�b�g
+                CurRow.Cells[(int)DispColumn.CostLinkKey1].Value = SetValue[4];
+                CurRow.Cells[(int)DispColumn.CostLinkKey2].Value = SetValue[5];
+                CurRow.Cells[(int)DispColumn.CostLinkKey3].Value = SetValue[6];
+                CurRow.Cells[(int)DispColumn.CostLinkKey4].Value = SetValue[7];
+                CurRow.Cells[(int)DispColumn.CostLinkKey5].Value = SetValue[8];
+                CurRow.Cells[(int)DispColumn.CostLinkKey6].Value = SetValue[9];
+                CurRow.Cells[(int)DispColumn.CostLinkKey7].Value = SetValue[10];
+                CurRow.Cells[(int)DispColumn.CostLinkKey8].Value = SetValue[11];
+                CurRow.Cells[(int)DispColumn.CostLinkKey9].Value = SetValue[12];
+
+                // ���׍s���H���䒠�f�[�^�Ɗ֘A�t������Ă��邩�ŐF��ς���
+                SetLinkLedgerColor(CurRow);
+            }
+            catch (System.Exception ex)
+            {
+                logger.ErrorFormat("�V�X�e���G���[�F{0}�F{1}", CommonMotions.GetMethodName(), ex.Message);
+            }
+        }
+        #endregion
+
+        #region �ƎҎx�����׃f�[�^�o�^
+        /// <summary>
+        /// �ƎҎx�����׃f�[�^�o�^
+        /// </summary>
+        private bool UpdatePaymentDataDetail(IOPaymentDataDetail PayDB,
+                                                PaymentDataDetail PayRec)
+        {
+            try
+            {
+                // �ƎҎx�����׃f�[�^�o�^
+                StringBuilder strSQL = new StringBuilder();
+                strSQL.Append(PayDB.CreatePrimarykeyString(PayRec.CompanyCode
+                                                            , PayRec.TargetDate
+                                                            , PayRec.SeqNo
+                                                            , PayRec.LineCount
+                                                            , PayRec.LabourKind));
+                List<PaymentDataDetail> PayList = new List<PaymentDataDetail>();
+                if (!PayDB.SelectAction(strSQL.ToString(), ref PayList, false)) return false;
+
+                bool bRet = true;
+                if (PayList.Count < 1)
+                {
+                    bRet = PayDB.InsertAction(PayRec, false);
+                }
+                else
+                {
+                    bRet = PayDB.UpdateAction(strSQL.ToString(), PayRec, false);
+                }
+                if(!bRet)
+                {
+                    MessageBox.Show("�ƎҎx�����׃f�[�^�X�V���s���܂����B"
+                                    , "�f�[�^�X�V�G���["
+                                    , MessageBoxButtons.OK
+                                    , MessageBoxIcon.Error);
+                    return false;
+                }
+
+                return true;
+            }
+            catch (System.Exception ex)
+            {
+                logger.ErrorFormat("�V�X�e���G���[�F{0}�F{1}", CommonMotions.GetMethodName(), ex.Message);
+                return false;
+            }
+        }
+        #endregion
+
+        #region �����o�[�f�[�^�Z�b�g
+        /// <summary>
+        /// �����o�[�f�[�^�Z�b�g
+        /// </summary>
+        private void SetCostDataOfCompensation(ref CostDataOfCompensation CostRec)
+        {
+            try
+            {
                 int nTargetDate = CommonMotions.cnvInt(cmbTargetMonth.SelectedValue);
                 int nYear = CommonMotions.cnvTruncate(nTargetDate / 100);
                 int nMounth = nTargetDate - (nYear * 100);
                 DateTime date = new DateTime(nYear, nMounth, 1);
-                DateTime TargetDate = date.EndOfMonth();                               // �Ώۓ��t
-                int TargetCompanyCode = CommonMotions.cnvInt(CurRow.Cells[(int)DispColumn.CompanyCode].Value);      // �Ώۑ�����ЃR�[�h
-                string TargetName = CommonMotions.cnvString(CurRow.Cells[(int)DispColumn.DetailName].Value);        // �ΏۍH���E�w���i����
-                decimal TargetValue = CommonMotions.cnvDecimal(CurRow.Cells[(int)DispColumn.KojiSeikyu].Value)      // �Ώۋ��z
-                                    + CommonMotions.cnvDecimal(CurRow.Cells[(int)DispColumn.KojiKosoku].Value)
-                                    + CommonMotions.cnvDecimal(CurRow.Cells[(int)DispColumn.KojiKanamono].Value)
-                                    + CommonMotions.cnvDecimal(CurRow.Cells[(int)DispColumn.KojiSannhaiZei].Value);
+                DateTime TargetDate = date.EndOfMonth();
+
+                DataGridView dgv = dgvData;
+                DataGridViewRow CurRow = dgv.CurrentRow;
+
+                int nLinkDataType = CommonMotions.cnvInt(CurRow.Cells[(int)DispColumn.LinkDataType].Value);
+                int nConstrCode = CommonMotions.cnvInt(CurRow.Cells[(int)DispColumn.GenbaCode].Value);
+
+                int nYearNumber = CommonMotions.cnvInt(CurRow.Cells[(int)DispColumn.CostLinkKey1].Value);               // �N�x
+                int nCostType = CommonMotions.cnvInt(CurRow.Cells[(int)DispColumn.CostLinkKey2].Value);                 // �o�[�^�C�v�t���O
+                int nTargetType = CommonMotions.cnvInt(CurRow.Cells[(int)DispColumn.CostLinkKey3].Value);               // �Ώې�R�[�h�^�C�v
+                int nTargetCode = CommonMotions.cnvInt(CurRow.Cells[(int)DispColumn.CostLinkKey4].Value);               // �Ώې�R�[�h
+                int nSeqNoC = CommonMotions.cnvInt(CurRow.Cells[(int)DispColumn.CostLinkKey5].Value);                   // �f�[�^�ԍ�
+
                 int nFromCode = CommonMotions.cnvInt(CurRow.Cells[(int)DispColumn.CompanyCode].Value);
                 decimal decEntryPrice = CommonMotions.cnvLong(CurRow.Cells[(int)DispColumn.KojiSeikyu].Value)           // �������z
                                         + CommonMotions.cnvLong(CurRow.Cells[(int)DispColumn.KojiKosoku].Value)         // ������
@@ -9267,54 +9443,360 @@
                                         + CommonMotions.cnvLong(CurRow.Cells[(int)DispColumn.KojiKanamono].Value)       // ������
                                         + CommonMotions.cnvLong(CurRow.Cells[(int)DispColumn.KojiSannhaiZei].Value);    // �Y�p��
                 string strContent = CommonMotions.cnvString(CurRow.Cells[(int)DispColumn.DetailName].Value);
-                string strBikoComment = CommonMotions.cnvString(CurRow.Cells[(int)DispColumn.Bikou].Value);
-                double dTaxRate = (1.00 + CommonMotions.SystemMasterData.ConsumptionTax) / 100.0;
+                string strBikoComment = CommonMotions.cnvString(CurRow.Cells[(int)DispColumn.GenbaName].Value).Length > 0
+                                            ? CommonMotions.cnvString(CurRow.Cells[(int)DispColumn.GenbaName].Value)
+                                            : CommonMotions.cnvString(CurRow.Cells[(int)DispColumn.Bikou].Value);
+                double dTaxRate = 1.00 + (CommonMotions.SystemMasterData.ConsumptionTax / 100.0);
+                int nPersonCode = CommonMotions.cnvInt(CurRow.Cells[(int)DispColumn.CostLinkKey6].Value);
 
-                int nYearNumber = CommonMotions.GetPeriodYear();
-                StringBuilder strSQL = new StringBuilder();
-                strSQL.Append(CostDB.CreatePrimarykeyString(nYearNumber, nCostType, nTargetType, nTargetCode));
-                int nSeqNoC = CostDB.SelectMaxAddDataCount(strSQL.ToString()) + 1;
-
                 // �����o�[�f�[�^�쐬
-                CostRec.YearNumber = nYearNumber;                                                // �N�x
-                CostRec.CostType = nCostType;                                                   // �o�[�^�C�v�t���O
-                CostRec.TargetType = nTargetType;                                               // �Ώې�R�[�h�^�C�v
-                CostRec.TargetCode = nTargetCode;                                               // �Ώې�R�[�h
-                CostRec.SeqNo = nSeqNoC;                                                        // �f�[�^�ԍ�
-                CostRec.PersonCode = CommonMotions.LoginUserData.PersonCode;                    // �쐬�҃R�[�h
-                CostRec.FromCodeType = (int)CostDataOfCompensation.TargetTypeDef.Company;       // �o�[���R�[�h�^�C�v
-                CostRec.FromCode = nFromCode;                                                   // �o�[���R�[�h
-                CostRec.SendDate = TargetDate.Date;                                             // �Ώۓ��t
-                CostRec.EntryPrice = decEntryPrice;                                             // ���z�i�Ŕ��j	
-                CostRec.EntryTax = CommonMotions.cnvRound((double)decEntryPrice * dTaxRate);    // ���z�i�ō��j
-                CostRec.Content = strContent;                                                   // �x�����e
-                CostRec.BikoComment = strBikoComment;                                           // ���l
-                CostRec.LockFlg = (int)CostDataOfCompensation.LockFlgDef.Locked;                // �f�[�^���b�N
+                CostRec.YearNumber = nYearNumber;                                                       // �N�x
+                CostRec.CostType = nCostType;                                                           // �o�[�^�C�v�t���O
+                CostRec.TargetType = nTargetType;                                                       // �Ώې�R�[�h�^�C�v
+                CostRec.TargetCode = nTargetCode;                                                       // �Ώې�R�[�h
+                CostRec.SeqNo = nSeqNoC;                                                                // �f�[�^�ԍ�
+                CostRec.PersonCode = nPersonCode;                                                       // �쐬�҃R�[�h
+                CostRec.FromCodeType = (int)CostDataOfCompensation.TargetTypeDef.Company;               // �o�[���R�[�h�^�C�v
+                CostRec.FromCode = nFromCode;                                                           // �o�[���R�[�h
+                CostRec.SendDate = TargetDate.Date;                                                     // �Ώۓ��t
+                CostRec.EntryPrice = decEntryPrice;                                                     // ���z�i�Ŕ��j	
+                CostRec.EntryTax = CommonMotions.cnvRound((double)decEntryPrice * dTaxRate);            // ���z�i�ō��j
+                CostRec.Content = strContent;                                                           // �x�����e
+                CostRec.BikoComment = strBikoComment;                                                   // ���l
+                CostRec.LockFlg = (int)CostDataOfCompensation.LockFlgDef.Locked;                        // �f�[�^���b�N
 
+                // �����o�[�̑䒠���E���r�H���ȊO�͍H���ԍ������Ȃ�
+                if (nLinkDataType != (int)BillingDataDetail.DataTypeDef.DepAccount) return;
+                if (nCostType != (int)CostDataOfCompensation.CostTypeDef.Type4
+                    && nCostType != (int)CostDataOfCompensation.CostTypeDef.Type5) return;
+
+                CostRec.LinkCode = nConstrCode;                                                         // �����N��H���R�[�h
+            }
+            catch (System.Exception ex)
+            {
+                logger.ErrorFormat("�V�X�e���G���[�F{0}�F{1}", CommonMotions.GetMethodName(), ex.Message);
+            }
+        }
+        #endregion
+
+        #region �O�������N�f�[�^�Z�b�g
+        /// <summary>
+        /// �O�������N�f�[�^�Z�b�g
+        /// </summary>
+        private void SetCostDataLink(ref BillingCostDataLink LinkRec)
+        {
+            try
+            {
+                int nTargetDate = CommonMotions.cnvInt(cmbTargetMonth.SelectedValue);
+
+                DataGridView dgv = dgvData;
+                DataGridViewRow CurRow = dgv.CurrentRow;
+
+                int nFromCode = CommonMotions.cnvInt(CurRow.Cells[(int)DispColumn.CompanyCode].Value);
                 int nSeqNoB = CommonMotions.cnvInt(CurRow.Cells[(int)DispColumn.SeqNo].Value);
                 int nLineCount = CommonMotions.cnvInt(CurRow.Cells[(int)DispColumn.LineCount].Value);
                 int nLabourKind = CommonMotions.cnvInt(CurRow.Cells[(int)DispColumn.LabourKind].Value);
+                int nLinkDataType = CommonMotions.cnvInt(CurRow.Cells[(int)DispColumn.LinkDataType].Value);
+                int nYearNumber = CommonMotions.cnvInt(CurRow.Cells[(int)DispColumn.CostLinkKey1].Value);
+                int nCostType = CommonMotions.cnvInt(CurRow.Cells[(int)DispColumn.CostLinkKey2].Value);
+                int nTargetType = CommonMotions.cnvInt(CurRow.Cells[(int)DispColumn.CostLinkKey3].Value);
+                int nTargetCode = CommonMotions.cnvInt(CurRow.Cells[(int)DispColumn.CostLinkKey4].Value);
+                int nSeqNoC = CommonMotions.cnvInt(CurRow.Cells[(int)DispColumn.CostLinkKey5].Value);
+                int nPersonCode = CommonMotions.cnvInt(CurRow.Cells[(int)DispColumn.CostLinkKey6].Value);
+                DateTime dtActionDate = CommonMotions.cnvDate(CurRow.Cells[(int)DispColumn.CostLinkKey7].Value).Date;
+                int nDataType = CommonMotions.cnvInt(CurRow.Cells[(int)DispColumn.CostLinkKey8].Value);
+                int nDataAddCount = CommonMotions.cnvInt(CurRow.Cells[(int)DispColumn.CostLinkKey9].Value);
 
                 // �ƎҐ��������o�[�����N�f�[�^�쐬
-                LinkRec.CompanyCode = nFromCode;                                            // ���͉�ЃR�[�h 
-                LinkRec.TargetDate = nTargetDate;                                           // �Ώ۔N��
-                LinkRec.SeqNoB = nSeqNoB;                                                   // �A��
-                LinkRec.LineCount = nLineCount;                                             // �s�ԍ�
-                LinkRec.LabourKind = nLabourKind;                                           // �x�����ʏ�E��ԋ敪
-                LinkRec.YearNumber = nYearNumber;                                           // �N�x
-                LinkRec.CostType = nCostType;                                               // �o�[�^�C�v�t���O
-                LinkRec.TargetType = nTargetType;                                           // �Ώې�R�[�h�^�C�v
-                LinkRec.TargetCode = nTargetCode;                                           // �Ώې�R�[�h
-                LinkRec.SeqNoC = nSeqNoC;                                                   // �f�[�^�ԍ�
+                LinkRec.CompanyCode = nFromCode;                                                                        // ���͉�ЃR�[�h 
+                LinkRec.TargetDate = nTargetDate;                                                                       // �Ώ۔N��
+                LinkRec.SeqNoB = nSeqNoB;                                                                               // �A��
+                LinkRec.LineCount = nLineCount;                                                                         // �s�ԍ�
+                LinkRec.LabourKind = nLabourKind;                                                                       // �x�����ʏ�E��ԋ敪
+                LinkRec.LinkType = nLinkDataType;                                                                       // �����N�f�[�^�^�C�v
+                LinkRec.YearNumber = nYearNumber;                                                                       // �N�x
+                LinkRec.CostType = nCostType;                                                                           // �o�[�^�C�v�t���O
+                LinkRec.TargetType = nTargetType;                                                                       // �Ώې�R�[�h�^�C�v
+                LinkRec.TargetCode = nTargetCode;                                                                       // �Ώې�R�[�h
+                LinkRec.SeqNoC = nSeqNoC;                                                                               // �f�[�^�ԍ�
+                LinkRec.PersonCode = nPersonCode;                                                                       // �S���҃R�[�h
+                LinkRec.ActionDate = dtActionDate.Date;                                                                 // �Ώۓ��t
+                LinkRec.DataType = nDataType;                                                                           // �f�[�^�敪
+                LinkRec.DataAddCount = nDataAddCount;                                                                   // �f�[�^�ǉ��ԍ�
+            }
+            catch (System.Exception ex)
+            {
+                logger.ErrorFormat("�V�X�e���G���[�F{0}�F{1}", CommonMotions.GetMethodName(), ex.Message);
+            }
+        }
+        #endregion
 
-                // �x�����׃f�[�^�s���쐬����
+        #region �I�����ꂽ�S���ҁA�Ⴕ���̓��O�C���҂̒S���҂�Ԃ�
+        /// <summary>
+        /// �I�����ꂽ�S���ҁA�Ⴕ���̓��O�C���҂̒S���Ҕԍ���Ԃ�
+        /// </summary>
+        private void GetSelectPersonCode(ref int PersonCode, ref string PersonName)
+        {
+            IOMPersonInCharge ManDB = new IOMPersonInCharge();
+            try
+            {
+                PersonCode = GetConstrPersonCode();
+                PersonName = CommonMotions.LoginUserData.PersonName;
+
+                PersonCode = PersonCode > 0
+                                    ? PersonCode
+                                    : CommonMotions.LoginUserData.PersonCode;
+
+                StringBuilder strSQL = new StringBuilder();
+                strSQL.Append(ManDB.CreatePrimarykeyString(PersonCode));
+                List<PersonInChargeMaster> ManList = new List<PersonInChargeMaster>();
+                ManDB.SelectAction(strSQL.ToString(), ref ManList);
+                if (ManList.Count > 0) PersonName = ManList[0].SealPrintName;
+            }
+            catch (System.Exception ex)
+            {
+                logger.ErrorFormat("�V�X�e���G���[�F{0}�F{1}", CommonMotions.GetMethodName(), ex.Message);
+            }
+            finally
+            {
+                ManDB.close(); ManDB = null;
+            }
+        }
+        #endregion
+
+        #region �S���ҍw���i�ݒ菈��
+        /// <summary>
+        /// �S���ҍw���i�ݒ菈��
+        /// </summary>
+        private void CostPersonExec()
+        {
+            try
+            {
+                DataGridViewRow CurRow = dgvData.CurrentRow;
+                // �ݒ肳��Ă���f�[�^�͑ΏۊO
+                int nLinkDataType = CommonMotions.cnvInt(CurRow.Cells[(int)DispColumn.LinkDataType].Value);
+                if(nLinkDataType != (int)BillingDataDetail.DataTypeDef.UnKnown)
+                {
+                    MessageBox.Show("�s���s�ȊO�͏����ł��܂���", "�I���G���[", MessageBoxButtons.OK, MessageBoxIcon.Error);
+                    return;
+                }
+
+                // �����o�[�f�[�^�쐬
+                if (!CreatePersonCost()) return;
+
+                MessageBox.Show("�S���ҍw���i���ݒ肳��܂����B", "�ݒ芮��", MessageBoxButtons.OK, MessageBoxIcon.None);
+            }
+            catch (System.Exception ex)
+            {
+                logger.ErrorFormat("�V�X�e���G���[�F{0}�F{1}", CommonMotions.GetMethodName(), ex.Message);
+            }
+        }
+        #endregion
+
+        #region �S���ҁE�w���i�f�[�^�쐬
+        /// <summary>
+        /// �S���ҁE�w���i�f�[�^�쐬
+        /// </summary>
+        private bool CreatePersonCost()
+        {
+            IOCostDataOfPerson CostDB = new IOCostDataOfPerson();
+            IOPaymentDataDetail PayDB = new IOPaymentDataDetail();
+            IOBillingDataDetail BillDB = new IOBillingDataDetail();
+            IOBillingCostDataLink LinkDB = new IOBillingCostDataLink();
+            bool bRet = true;
+            object[] SetValue = new object[13];
+            try
+            {
+                int PersonCode = 0;
+                string PersonName = string.Empty;
+                GetSelectPersonCode(ref PersonCode, ref PersonName);
+
+                CostDB.connect(); CostDB.beginTran();
+                PayDB.connect(); PayDB.beginTran();
+                BillDB.connect(); BillDB.beginTran();
+                LinkDB.connect(); LinkDB.beginTran();
+
+                // ----- �V�K�L�[���Z�b�g����
+                // �Ώۓ����擾����
+                int nTargetDate = CommonMotions.cnvInt(cmbTargetMonth.SelectedValue);
+                int nYear = CommonMotions.cnvTruncate(nTargetDate / 100);
+                int nMounth = nTargetDate - (nYear * 100);
+                DateTime dtFirst = new DateTime(nYear, nMounth, 1);
+                DateTime dtEnd = dtFirst.EndOfMonth();
+
+                // �f�[�^�ԍ��E�`�[�ԍ����擾����
+                StringBuilder strSQL = new StringBuilder();
+                strSQL.Append(CostDB.CreatePrimarykeyString(PersonCode,
+                                                            dtEnd,
+                                                            (int)CostDataOfPerson.DataNoDef.Purchase));
+                int nAddcnt = CostDB.SelectMaxAddDataCount(strSQL.ToString(), false) + 1;
+
+                // �O���b�h�փf�[�^�Z�b�g
+                SetValue[0] = (int)DataRowState.Modified;
+                SetValue[1] = (int)BillingDataDetail.DataTypeDef.PurchaseCost;
+                SetValue[2] = PersonCode;
+                SetValue[3] = PersonName;
+                SetValue[4] = 0;
+                SetValue[5] = 0;
+                SetValue[6] = 0;
+                SetValue[7] = 0;
+                SetValue[8] = 0;
+                SetValue[9] = PersonCode;
+                SetValue[10] = dtEnd.Date;
+                SetValue[11] = (int)CostDataOfPerson.DataNoDef.Purchase;
+                SetValue[12] = nAddcnt;
+
+                // �O���b�h�֑I��l���Z�b�g����
+                SetOutValueData(SetValue);
+
+                // �f�[�^�Z�b�g
+                CostDataOfPerson NewRec = new CostDataOfPerson();
+                SetCostDataOfPersonRowData(ref NewRec);
+
+                // �S���Җ��o��f�[�^�쐬
+                if (!CostDB.InsertAction(NewRec, false))
+                {
+                    MessageBox.Show("�S���Җ��o��f�[�^�쐬�Ɏ��s���܂����B"
+                                    , "�f�[�^�쐬�G���["
+                                    , MessageBoxButtons.OK
+                                    , MessageBoxIcon.Error);
+                    bRet = false;
+                    return bRet;
+                }
+
+                // �O�������N�f�[�^�Z�b�g
+                BillingCostDataLink LinkRec = new BillingCostDataLink();
+                SetCostDataLink(ref LinkRec);
+
+                // �S���ҁE�w���i�f�[�^�쐬
+                if (!LinkDB.InsertAction(LinkRec, false))
+                {
+                    MessageBox.Show("�ƎҐ��������o�[�����N�f�[�^�쐬���s���܂����B"
+                                    , "�f�[�^�쐬�G���["
+                                    , MessageBoxButtons.OK
+                                    , MessageBoxIcon.Error);
+                    bRet = false;
+                    return bRet;
+                }
+
+                DataGridView dgv = dgvData;
+                DataGridViewRow CurRow = dgv.CurrentRow;
+                int nSeqNoB = CommonMotions.cnvInt(CurRow.Cells[(int)DispColumn.SeqNo].Value);
+                int nLineCount = CommonMotions.cnvInt(CurRow.Cells[(int)DispColumn.LineCount].Value);
+                // �������׃f�[�^�X�V
+                if (!BillDB.UpdateFeild(NewRec.SuppliersCode
+                                        , CommonMotions.cnvInt(cmbTargetMonth.SelectedValue)
+                                        , nSeqNoB
+                                        , nLineCount
+                                        , (int)IOBillingDataDetail.NameColumn.LinkDataType
+                                        , (int)BillingDataDetail.DataTypeDef.PurchaseCost
+                                        , false))
+                {
+                    MessageBox.Show("�������׃f�[�^�X�V���s���܂����B"
+                                    , "�f�[�^�X�V�G���["
+                                    , MessageBoxButtons.OK
+                                    , MessageBoxIcon.Error);
+                    bRet = false;
+                    return bRet;
+                }
+
+                // �x�����׃f�[�^���쐬����
+                PaymentDataDetail PayRec = new PaymentDataDetail();
                 SetRow2PaymentDataDetail(CurRow, ref PayRec, nSeqNoB, nLineCount);
+
+                // �ƎҐ������׃f�[�^�쐬
+                if (!UpdatePaymentDataDetail(PayDB, PayRec))
+                {
+                    bRet = false;
+                    return bRet;
+                }
+
+                return true;
             }
             catch (System.Exception ex)
             {
                 logger.ErrorFormat("�V�X�e���G���[�F{0}�F{1}", CommonMotions.GetMethodName(), ex.Message);
+                return false;
             }
+            finally
+            {
+                if (!bRet)
+                {
+                    Array.Clear(SetValue, 0, SetValue.Length);
+                    SetOutValueData(SetValue);
+
+                    PayDB.rollback();
+                    CostDB.rollback();
+                    BillDB.rollback();
+                    LinkDB.rollback();
+                }
+
+                CostDB.commit();
+                PayDB.commit();
+                BillDB.commit();
+                LinkDB.commit();
+
+                CostDB.close(); CostDB = null;
+                PayDB.close(); PayDB = null;
+                BillDB.close(); BillDB = null;
+                LinkDB.close(); LinkDB = null;
+            }
         }
         #endregion
+
+        #region �S���Җ��o��f�[�^���R�[�h�Z�b�g
+        /// <summary>
+        /// �S���Җ��o��f�[�^���R�[�h�Z�b�g
+        /// </summary>
+        private void SetCostDataOfPersonRowData(ref CostDataOfPerson NewRec)
+        {
+            try
+            {
+                // �Ώۓ����擾����
+                int nTargetDate = CommonMotions.cnvInt(cmbTargetMonth.SelectedValue);
+                int nYear = CommonMotions.cnvTruncate(nTargetDate / 100);
+                int nMounth = nTargetDate - (nYear * 100);
+
+                DataGridView dgv = dgvData;
+                DataGridViewRow CurRow = dgv.CurrentRow;
+
+                int nPersonCode= CommonMotions.cnvInt(CurRow.Cells[(int)DispColumn.CostLinkKey6].Value);
+                DateTime dtActionDate = CommonMotions.cnvDate(CurRow.Cells[(int)DispColumn.CostLinkKey7].Value).Date;
+                int nDataType = CommonMotions.cnvInt(CurRow.Cells[(int)DispColumn.CostLinkKey8].Value);
+                int nDataAddCount = CommonMotions.cnvInt(CurRow.Cells[(int)DispColumn.CostLinkKey9].Value);
+                int nConstrCode = CommonMotions.cnvInt(CurRow.Cells[(int)DispColumn.GenbaCode].Value);
+                int nCompanyCode = CommonMotions.cnvInt(CurRow.Cells[(int)DispColumn.CompanyCode].Value);
+                string strCompanyName = CommonMotions.cnvString(CurRow.Cells[(int)DispColumn.CompanyName].Value);
+                string strDetailName = CommonMotions.cnvString(CurRow.Cells[(int)DispColumn.GenbaName].Value).Length > 0
+                                        ? CommonMotions.cnvString(CurRow.Cells[(int)DispColumn.GenbaName].Value)
+                                        : CommonMotions.cnvString(CurRow.Cells[(int)DispColumn.Bikou].Value);
+                long lBillPrice = CommonMotions.cnvLong(CurRow.Cells[(int)DispColumn.SomuSeikyu].Value)
+                                + CommonMotions.cnvLong(CurRow.Cells[(int)DispColumn.SomuKosoku].Value)
+                                + CommonMotions.cnvLong(CurRow.Cells[(int)DispColumn.SomuKanamono].Value)
+                                + CommonMotions.cnvLong(CurRow.Cells[(int)DispColumn.SomuSannhaiZei].Value);
+                long lInTax = CommonMotions.cnvRound(lBillPrice * (1.00 + (CommonMotions.SystemMasterData.ConsumptionTax / 100.0)));
+
+                NewRec.PersonCode = nPersonCode;                                                // �S���҃R�[�h
+                NewRec.ActionDate = dtActionDate.Date;                                          // �Ώۓ��t
+                NewRec.DataType = nDataType;                                                    // �f�[�^���
+                NewRec.DataAddCount = nDataAddCount;                                            // �f�[�^�ǉ��ԍ�
+                NewRec.TargetMonth = string.Format("{0}/{1}", nYear, nMounth.ToString("00"));   // �Ώ۔N��
+                NewRec.ConstructionCode = nConstrCode;                                          // �H���R�[�h	
+                NewRec.SuppliersCode = nCompanyCode;                                            // �x����R�[�h
+                NewRec.SuppliersName = strCompanyName;                                          // �x���於��
+                NewRec.PaymentContent = strDetailName;                                          // �x�����e
+                NewRec.PaymentType = (int)CostDataOfPerson.PaymentTypeDef.Cash;                 // �x�����@�敪
+                NewRec.EntryPrice = lBillPrice;                                                 // ���z(�Ŕ�)
+                NewRec.EntryPriceInTax = lInTax;                                                // ���z(�ō�)
+                NewRec.ComplateFlg = 1;                                                         // �����ς݃t���O
+                NewRec.ApprovalFlg = 1;                                                         // ���F�t���O
+
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("�V�X�e���G���[�F{0}�F{1}", CommonMotions.GetMethodName(), ex.Message);
+            }
+        }
+        #endregion
     }
 }
Index: trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/RequestSumList/FrmSelectTarget.Designer.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/RequestSumList/FrmSelectTarget.Designer.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/RequestSumList/FrmSelectTarget.Designer.cs	(revision 484)
@@ -29,33 +29,57 @@
         private void InitializeComponent()
         {
             System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = 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();
             this.btnSelect = new System.Windows.Forms.Button();
             this.btnEnd = new System.Windows.Forms.Button();
+            this.groupBoxEx2 = new ProcessManagement.Forms.CustomControls.GroupBoxEx();
+            this.groupBoxEx3 = new ProcessManagement.Forms.CustomControls.GroupBoxEx();
+            this.cmbDepartment = new ProcessManagement.Forms.CustomControls.ComboBoxEX();
+            this.label5 = new System.Windows.Forms.Label();
+            this.label2 = new System.Windows.Forms.Label();
+            this.numUDConstPro = new System.Windows.Forms.NumericUpDown();
+            this.label4 = new System.Windows.Forms.Label();
+            this.label7 = new System.Windows.Forms.Label();
+            this.dataGridViewEX1 = new ProcessManagement.Forms.CustomControls.DataGridViewEX();
+            this.Column4 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.Column5 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.Column6 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.Column7 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.groupBoxEx1 = new ProcessManagement.Forms.CustomControls.GroupBoxEx();
+            this.RdoBtn2_3 = new System.Windows.Forms.RadioButton();
+            this.RdoBtn2_2 = new System.Windows.Forms.RadioButton();
+            this.RdoBtn2_1 = new System.Windows.Forms.RadioButton();
             this.groupBox1 = new ProcessManagement.Forms.CustomControls.GroupBoxEx();
             this.dgvMaster = new ProcessManagement.Forms.CustomControls.DataGridViewEX();
+            this.Column1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.Column2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.Column3 = new System.Windows.Forms.DataGridViewCheckBoxColumn();
             this.RdoBtn1_2 = new System.Windows.Forms.RadioButton();
             this.RdoBtn1_1 = new System.Windows.Forms.RadioButton();
-            this.groupBoxEx1 = new ProcessManagement.Forms.CustomControls.GroupBoxEx();
-            this.RdoBtn2_2 = new System.Windows.Forms.RadioButton();
-            this.RdoBtn2_1 = new System.Windows.Forms.RadioButton();
-            this.Column5 = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.Column3 = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.Column2 = new System.Windows.Forms.DataGridViewCheckBoxColumn();
-            this.RdoBtn2_3 = new System.Windows.Forms.RadioButton();
+            this.RdoBtn2_4 = new System.Windows.Forms.RadioButton();
+            this.groupBoxEx2.SuspendLayout();
+            this.groupBoxEx3.SuspendLayout();
+            ((System.ComponentModel.ISupportInitialize)(this.numUDConstPro)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.dataGridViewEX1)).BeginInit();
+            this.groupBoxEx1.SuspendLayout();
             this.groupBox1.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)(this.dgvMaster)).BeginInit();
-            this.groupBoxEx1.SuspendLayout();
             this.SuspendLayout();
             // 
             // btnSelect
             // 
+            this.btnSelect.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
             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(342, 460);
+            this.btnSelect.Location = new System.Drawing.Point(957, 502);
             this.btnSelect.Name = "btnSelect";
             this.btnSelect.Size = new System.Drawing.Size(120, 30);
             this.btnSelect.TabIndex = 3;
@@ -65,10 +89,11 @@
             // 
             // btnEnd
             // 
+            this.btnEnd.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
             this.btnEnd.BackColor = System.Drawing.Color.Blue;
             this.btnEnd.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(470, 460);
+            this.btnEnd.Location = new System.Drawing.Point(1085, 502);
             this.btnEnd.Name = "btnEnd";
             this.btnEnd.Size = new System.Drawing.Size(120, 30);
             this.btnEnd.TabIndex = 4;
@@ -76,6 +101,251 @@
             this.btnEnd.UseVisualStyleBackColor = false;
             this.btnEnd.Click += new System.EventHandler(this.btnEnd_Click);
             // 
+            // groupBoxEx2
+            // 
+            this.groupBoxEx2.BackColor = System.Drawing.Color.MintCream;
+            this.groupBoxEx2.BorderColor = System.Drawing.Color.Black;
+            this.groupBoxEx2.Controls.Add(this.groupBoxEx3);
+            this.groupBoxEx2.Controls.Add(this.dataGridViewEX1);
+            this.groupBoxEx2.Font = new System.Drawing.Font("ＭＳ Ｐ明朝", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
+            this.groupBoxEx2.ForeColor = System.Drawing.Color.Black;
+            this.groupBoxEx2.Location = new System.Drawing.Point(530, 10);
+            this.groupBoxEx2.Name = "groupBoxEx2";
+            this.groupBoxEx2.Size = new System.Drawing.Size(671, 490);
+            this.groupBoxEx2.TabIndex = 7;
+            this.groupBoxEx2.TabStop = false;
+            this.groupBoxEx2.Text = "対象工事";
+            // 
+            // groupBoxEx3
+            // 
+            this.groupBoxEx3.Anchor = System.Windows.Forms.AnchorStyles.Top;
+            this.groupBoxEx3.BackColor = System.Drawing.Color.WhiteSmoke;
+            this.groupBoxEx3.BorderColor = System.Drawing.Color.Black;
+            this.groupBoxEx3.Controls.Add(this.cmbDepartment);
+            this.groupBoxEx3.Controls.Add(this.label5);
+            this.groupBoxEx3.Controls.Add(this.label2);
+            this.groupBoxEx3.Controls.Add(this.numUDConstPro);
+            this.groupBoxEx3.Controls.Add(this.label4);
+            this.groupBoxEx3.Controls.Add(this.label7);
+            this.groupBoxEx3.ForeColor = System.Drawing.Color.White;
+            this.groupBoxEx3.Location = new System.Drawing.Point(24, 24);
+            this.groupBoxEx3.Name = "groupBoxEx3";
+            this.groupBoxEx3.Size = new System.Drawing.Size(630, 44);
+            this.groupBoxEx3.TabIndex = 10;
+            this.groupBoxEx3.TabStop = false;
+            // 
+            // cmbDepartment
+            // 
+            this.cmbDepartment.BackColor = System.Drawing.Color.White;
+            this.cmbDepartment.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+            this.cmbDepartment.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
+            this.cmbDepartment.FormattingEnabled = true;
+            this.cmbDepartment.Location = new System.Drawing.Point(416, 9);
+            this.cmbDepartment.Name = "cmbDepartment";
+            this.cmbDepartment.Size = new System.Drawing.Size(200, 27);
+            this.cmbDepartment.TabIndex = 41;
+            this.cmbDepartment.TextChanged += new System.EventHandler(this.cmbDepartment_TextChanged);
+            // 
+            // label5
+            // 
+            this.label5.BackColor = System.Drawing.Color.White;
+            this.label5.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
+            this.label5.Font = new System.Drawing.Font("ＭＳ 明朝", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
+            this.label5.ForeColor = System.Drawing.Color.Black;
+            this.label5.Location = new System.Drawing.Point(288, 10);
+            this.label5.Name = "label5";
+            this.label5.Size = new System.Drawing.Size(120, 25);
+            this.label5.TabIndex = 42;
+            this.label5.Text = "担当部署";
+            this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
+            // 
+            // label2
+            // 
+            this.label2.BackColor = System.Drawing.Color.White;
+            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(14, 10);
+            this.label2.Name = "label2";
+            this.label2.Size = new System.Drawing.Size(120, 25);
+            this.label2.TabIndex = 38;
+            this.label2.Text = "営業期";
+            this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
+            // 
+            // numUDConstPro
+            // 
+            this.numUDConstPro.BackColor = System.Drawing.Color.White;
+            this.numUDConstPro.Font = new System.Drawing.Font("ＭＳ 明朝", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
+            this.numUDConstPro.ForeColor = System.Drawing.Color.Black;
+            this.numUDConstPro.Location = new System.Drawing.Point(167, 11);
+            this.numUDConstPro.Name = "numUDConstPro";
+            this.numUDConstPro.ReadOnly = true;
+            this.numUDConstPro.Size = new System.Drawing.Size(80, 23);
+            this.numUDConstPro.TabIndex = 0;
+            this.numUDConstPro.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
+            this.numUDConstPro.ValueChanged += new System.EventHandler(this.numUDConstPro_ValueChanged);
+            // 
+            // label4
+            // 
+            this.label4.AutoSize = true;
+            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(247, 14);
+            this.label4.Name = "label4";
+            this.label4.Size = new System.Drawing.Size(25, 16);
+            this.label4.TabIndex = 0;
+            this.label4.Text = "期";
+            this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
+            // 
+            // label7
+            // 
+            this.label7.Font = new System.Drawing.Font("ＭＳ 明朝", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
+            this.label7.ForeColor = System.Drawing.Color.Black;
+            this.label7.Location = new System.Drawing.Point(142, 14);
+            this.label7.Name = "label7";
+            this.label7.Size = new System.Drawing.Size(25, 16);
+            this.label7.TabIndex = 0;
+            this.label7.Text = "第";
+            this.label7.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
+            // 
+            // dataGridViewEX1
+            // 
+            this.dataGridViewEX1.AllowUserToAddRows = false;
+            this.dataGridViewEX1.AllowUserToDeleteRows = false;
+            this.dataGridViewEX1.AllowUserToResizeRows = false;
+            dataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(255)))), ((int)(((byte)(192)))));
+            this.dataGridViewEX1.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1;
+            this.dataGridViewEX1.BackgroundColor = System.Drawing.Color.White;
+            this.dataGridViewEX1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
+            dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
+            dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Control;
+            dataGridViewCellStyle2.Font = new System.Drawing.Font("ＭＳ Ｐ明朝", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
+            dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.WindowText;
+            dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight;
+            dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
+            dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
+            this.dataGridViewEX1.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2;
+            this.dataGridViewEX1.ColumnHeadersHeight = 24;
+            this.dataGridViewEX1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing;
+            this.dataGridViewEX1.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
+            this.Column4,
+            this.Column5,
+            this.Column6,
+            this.Column7});
+            this.dataGridViewEX1.EnableHeadersVisualStyles = false;
+            this.dataGridViewEX1.Location = new System.Drawing.Point(10, 76);
+            this.dataGridViewEX1.Name = "dataGridViewEX1";
+            this.dataGridViewEX1.RowHeadersVisible = false;
+            this.dataGridViewEX1.RowHeadersWidth = 20;
+            this.dataGridViewEX1.RowHeadersWidthSizeMode = System.Windows.Forms.DataGridViewRowHeadersWidthSizeMode.DisableResizing;
+            this.dataGridViewEX1.RowTemplate.Height = 20;
+            this.dataGridViewEX1.Size = new System.Drawing.Size(650, 398);
+            this.dataGridViewEX1.TabIndex = 8;
+            // 
+            // Column4
+            // 
+            dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
+            this.Column4.DefaultCellStyle = dataGridViewCellStyle3;
+            this.Column4.Frozen = true;
+            this.Column4.HeaderText = "工事番号";
+            this.Column4.Name = "Column4";
+            this.Column4.ReadOnly = true;
+            this.Column4.Resizable = System.Windows.Forms.DataGridViewTriState.False;
+            this.Column4.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
+            this.Column4.Visible = false;
+            this.Column4.Width = 5;
+            // 
+            // Column5
+            // 
+            dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
+            dataGridViewCellStyle4.Font = new System.Drawing.Font("ＭＳ 明朝", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
+            this.Column5.DefaultCellStyle = dataGridViewCellStyle4;
+            this.Column5.Frozen = true;
+            this.Column5.HeaderText = "№";
+            this.Column5.Name = "Column5";
+            this.Column5.ReadOnly = true;
+            this.Column5.Resizable = System.Windows.Forms.DataGridViewTriState.False;
+            this.Column5.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
+            this.Column5.Width = 60;
+            // 
+            // Column6
+            // 
+            dataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
+            dataGridViewCellStyle5.Font = new System.Drawing.Font("ＭＳ 明朝", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
+            this.Column6.DefaultCellStyle = dataGridViewCellStyle5;
+            this.Column6.Frozen = true;
+            this.Column6.HeaderText = "工　　事　　名　　称";
+            this.Column6.Name = "Column6";
+            this.Column6.ReadOnly = true;
+            this.Column6.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
+            this.Column6.Width = 450;
+            // 
+            // Column7
+            // 
+            dataGridViewCellStyle6.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
+            this.Column7.DefaultCellStyle = dataGridViewCellStyle6;
+            this.Column7.Frozen = true;
+            this.Column7.HeaderText = "工事担当者";
+            this.Column7.Name = "Column7";
+            this.Column7.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
+            this.Column7.Width = 120;
+            // 
+            // groupBoxEx1
+            // 
+            this.groupBoxEx1.BackColor = System.Drawing.Color.WhiteSmoke;
+            this.groupBoxEx1.BorderColor = System.Drawing.Color.Black;
+            this.groupBoxEx1.Controls.Add(this.RdoBtn2_4);
+            this.groupBoxEx1.Controls.Add(this.RdoBtn2_3);
+            this.groupBoxEx1.Controls.Add(this.RdoBtn2_2);
+            this.groupBoxEx1.Controls.Add(this.RdoBtn2_1);
+            this.groupBoxEx1.Font = new System.Drawing.Font("ＭＳ Ｐ明朝", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
+            this.groupBoxEx1.ForeColor = System.Drawing.Color.Black;
+            this.groupBoxEx1.Location = new System.Drawing.Point(9, 10);
+            this.groupBoxEx1.Name = "groupBoxEx1";
+            this.groupBoxEx1.Size = new System.Drawing.Size(500, 190);
+            this.groupBoxEx1.TabIndex = 5;
+            this.groupBoxEx1.TabStop = false;
+            this.groupBoxEx1.Text = "出 納 科 目";
+            // 
+            // RdoBtn2_3
+            // 
+            this.RdoBtn2_3.AutoSize = true;
+            this.RdoBtn2_3.Font = new System.Drawing.Font("ＭＳ 明朝", 20.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
+            this.RdoBtn2_3.ForeColor = System.Drawing.Color.Black;
+            this.RdoBtn2_3.Location = new System.Drawing.Point(30, 104);
+            this.RdoBtn2_3.Name = "RdoBtn2_3";
+            this.RdoBtn2_3.Size = new System.Drawing.Size(364, 31);
+            this.RdoBtn2_3.TabIndex = 46;
+            this.RdoBtn2_3.Text = " 工　事（台帳閉鎖工事）";
+            this.RdoBtn2_3.UseVisualStyleBackColor = true;
+            this.RdoBtn2_3.CheckedChanged += new System.EventHandler(this.RdoBtn2_1_CheckedChanged);
+            // 
+            // RdoBtn2_2
+            // 
+            this.RdoBtn2_2.AutoSize = true;
+            this.RdoBtn2_2.Font = new System.Drawing.Font("ＭＳ 明朝", 20.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
+            this.RdoBtn2_2.ForeColor = System.Drawing.Color.Black;
+            this.RdoBtn2_2.Location = new System.Drawing.Point(30, 65);
+            this.RdoBtn2_2.Name = "RdoBtn2_2";
+            this.RdoBtn2_2.Size = new System.Drawing.Size(306, 31);
+            this.RdoBtn2_2.TabIndex = 46;
+            this.RdoBtn2_2.Text = " 工　事（自社工事）";
+            this.RdoBtn2_2.UseVisualStyleBackColor = true;
+            this.RdoBtn2_2.CheckedChanged += new System.EventHandler(this.RdoBtn2_1_CheckedChanged);
+            // 
+            // RdoBtn2_1
+            // 
+            this.RdoBtn2_1.AutoSize = true;
+            this.RdoBtn2_1.Font = new System.Drawing.Font("ＭＳ 明朝", 20.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
+            this.RdoBtn2_1.ForeColor = System.Drawing.Color.Black;
+            this.RdoBtn2_1.Location = new System.Drawing.Point(30, 26);
+            this.RdoBtn2_1.Name = "RdoBtn2_1";
+            this.RdoBtn2_1.Size = new System.Drawing.Size(190, 31);
+            this.RdoBtn2_1.TabIndex = 46;
+            this.RdoBtn2_1.Text = " 購　入　品";
+            this.RdoBtn2_1.UseVisualStyleBackColor = true;
+            this.RdoBtn2_1.CheckedChanged += new System.EventHandler(this.RdoBtn2_1_CheckedChanged);
+            // 
             // groupBox1
             // 
             this.groupBox1.BackColor = System.Drawing.Color.Snow;
@@ -85,9 +355,9 @@
             this.groupBox1.Controls.Add(this.RdoBtn1_1);
             this.groupBox1.Font = new System.Drawing.Font("ＭＳ Ｐ明朝", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
             this.groupBox1.ForeColor = System.Drawing.Color.Black;
-            this.groupBox1.Location = new System.Drawing.Point(10, 164);
+            this.groupBox1.Location = new System.Drawing.Point(9, 210);
             this.groupBox1.Name = "groupBox1";
-            this.groupBox1.Size = new System.Drawing.Size(580, 290);
+            this.groupBox1.Size = new System.Drawing.Size(500, 290);
             this.groupBox1.TabIndex = 1;
             this.groupBox1.TabStop = false;
             this.groupBox1.Text = "出 納 対 象";
@@ -100,31 +370,23 @@
             this.dgvMaster.AllowUserToResizeRows = false;
             this.dgvMaster.BackgroundColor = System.Drawing.Color.White;
             this.dgvMaster.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
-            dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
-            dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Control;
-            dataGridViewCellStyle1.Font = new System.Drawing.Font("ＭＳ Ｐ明朝", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
-            dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.WindowText;
-            dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight;
-            dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
-            dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
-            this.dgvMaster.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle1;
+            dataGridViewCellStyle7.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
+            dataGridViewCellStyle7.BackColor = System.Drawing.SystemColors.Control;
+            dataGridViewCellStyle7.Font = new System.Drawing.Font("ＭＳ Ｐ明朝", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
+            dataGridViewCellStyle7.ForeColor = System.Drawing.SystemColors.WindowText;
+            dataGridViewCellStyle7.SelectionBackColor = System.Drawing.SystemColors.Highlight;
+            dataGridViewCellStyle7.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
+            dataGridViewCellStyle7.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
+            this.dgvMaster.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle7;
             this.dgvMaster.ColumnHeadersHeight = 24;
             this.dgvMaster.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing;
             this.dgvMaster.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
-            this.Column5,
-            this.Column3,
-            this.Column2});
-            dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
-            dataGridViewCellStyle4.BackColor = System.Drawing.SystemColors.Window;
-            dataGridViewCellStyle4.Font = new System.Drawing.Font("ＭＳ 明朝", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
-            dataGridViewCellStyle4.ForeColor = System.Drawing.Color.Black;
-            dataGridViewCellStyle4.SelectionBackColor = System.Drawing.SystemColors.Highlight;
-            dataGridViewCellStyle4.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
-            dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
-            this.dgvMaster.DefaultCellStyle = dataGridViewCellStyle4;
+            this.Column1,
+            this.Column2,
+            this.Column3});
             this.dgvMaster.Enabled = false;
             this.dgvMaster.EnableHeadersVisualStyles = false;
-            this.dgvMaster.Location = new System.Drawing.Point(40, 105);
+            this.dgvMaster.Location = new System.Drawing.Point(20, 110);
             this.dgvMaster.MultiSelect = false;
             this.dgvMaster.Name = "dgvMaster";
             this.dgvMaster.RowHeadersVisible = false;
@@ -131,15 +393,48 @@
             this.dgvMaster.RowHeadersWidth = 20;
             this.dgvMaster.RowHeadersWidthSizeMode = System.Windows.Forms.DataGridViewRowHeadersWidthSizeMode.DisableResizing;
             this.dgvMaster.RowTemplate.Height = 24;
-            this.dgvMaster.Size = new System.Drawing.Size(500, 170);
+            this.dgvMaster.Size = new System.Drawing.Size(460, 170);
             this.dgvMaster.TabIndex = 46;
             // 
+            // Column1
+            // 
+            dataGridViewCellStyle8.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
+            this.Column1.DefaultCellStyle = dataGridViewCellStyle8;
+            this.Column1.Frozen = true;
+            this.Column1.HeaderText = "部署コード";
+            this.Column1.Name = "Column1";
+            this.Column1.ReadOnly = true;
+            this.Column1.Resizable = System.Windows.Forms.DataGridViewTriState.False;
+            this.Column1.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
+            this.Column1.Visible = false;
+            // 
+            // Column2
+            // 
+            dataGridViewCellStyle9.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
+            dataGridViewCellStyle9.Font = new System.Drawing.Font("ＭＳ Ｐゴシック", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
+            dataGridViewCellStyle9.ForeColor = System.Drawing.Color.Black;
+            this.Column2.DefaultCellStyle = dataGridViewCellStyle9;
+            this.Column2.Frozen = true;
+            this.Column2.HeaderText = "部　署　名　称";
+            this.Column2.Name = "Column2";
+            this.Column2.ReadOnly = true;
+            this.Column2.Resizable = System.Windows.Forms.DataGridViewTriState.False;
+            this.Column2.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
+            this.Column2.Width = 400;
+            // 
+            // Column3
+            // 
+            this.Column3.HeaderText = "";
+            this.Column3.Name = "Column3";
+            this.Column3.Resizable = System.Windows.Forms.DataGridViewTriState.True;
+            this.Column3.Width = 40;
+            // 
             // RdoBtn1_2
             // 
             this.RdoBtn1_2.AutoSize = true;
             this.RdoBtn1_2.Font = new System.Drawing.Font("ＭＳ 明朝", 21.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
             this.RdoBtn1_2.ForeColor = System.Drawing.Color.Black;
-            this.RdoBtn1_2.Location = new System.Drawing.Point(205, 24);
+            this.RdoBtn1_2.Location = new System.Drawing.Point(30, 25);
             this.RdoBtn1_2.Name = "RdoBtn1_2";
             this.RdoBtn1_2.Size = new System.Drawing.Size(171, 33);
             this.RdoBtn1_2.TabIndex = 45;
@@ -152,7 +447,7 @@
             this.RdoBtn1_1.AutoSize = true;
             this.RdoBtn1_1.Font = new System.Drawing.Font("ＭＳ 明朝", 21.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
             this.RdoBtn1_1.ForeColor = System.Drawing.Color.Black;
-            this.RdoBtn1_1.Location = new System.Drawing.Point(205, 64);
+            this.RdoBtn1_1.Location = new System.Drawing.Point(30, 72);
             this.RdoBtn1_1.Name = "RdoBtn1_1";
             this.RdoBtn1_1.Size = new System.Drawing.Size(171, 33);
             this.RdoBtn1_1.TabIndex = 45;
@@ -160,97 +455,26 @@
             this.RdoBtn1_1.UseVisualStyleBackColor = true;
             this.RdoBtn1_1.CheckedChanged += new System.EventHandler(this.radioButton1_CheckedChanged);
             // 
-            // groupBoxEx1
+            // RdoBtn2_4
             // 
-            this.groupBoxEx1.BackColor = System.Drawing.Color.WhiteSmoke;
-            this.groupBoxEx1.BorderColor = System.Drawing.Color.Black;
-            this.groupBoxEx1.Controls.Add(this.RdoBtn2_3);
-            this.groupBoxEx1.Controls.Add(this.RdoBtn2_2);
-            this.groupBoxEx1.Controls.Add(this.RdoBtn2_1);
-            this.groupBoxEx1.Font = new System.Drawing.Font("ＭＳ Ｐ明朝", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
-            this.groupBoxEx1.ForeColor = System.Drawing.Color.Black;
-            this.groupBoxEx1.Location = new System.Drawing.Point(9, 10);
-            this.groupBoxEx1.Name = "groupBoxEx1";
-            this.groupBoxEx1.Size = new System.Drawing.Size(581, 144);
-            this.groupBoxEx1.TabIndex = 5;
-            this.groupBoxEx1.TabStop = false;
-            this.groupBoxEx1.Text = "出 納 科 目";
+            this.RdoBtn2_4.AutoSize = true;
+            this.RdoBtn2_4.Font = new System.Drawing.Font("ＭＳ 明朝", 20.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
+            this.RdoBtn2_4.ForeColor = System.Drawing.Color.Black;
+            this.RdoBtn2_4.Location = new System.Drawing.Point(30, 143);
+            this.RdoBtn2_4.Name = "RdoBtn2_4";
+            this.RdoBtn2_4.Size = new System.Drawing.Size(306, 31);
+            this.RdoBtn2_4.TabIndex = 47;
+            this.RdoBtn2_4.Text = " 工　事（瑕疵工事）";
+            this.RdoBtn2_4.UseVisualStyleBackColor = true;
+            this.RdoBtn2_4.CheckedChanged += new System.EventHandler(this.RdoBtn2_1_CheckedChanged);
             // 
-            // RdoBtn2_2
-            // 
-            this.RdoBtn2_2.AutoSize = true;
-            this.RdoBtn2_2.Font = new System.Drawing.Font("ＭＳ 明朝", 20.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
-            this.RdoBtn2_2.ForeColor = System.Drawing.Color.Black;
-            this.RdoBtn2_2.Location = new System.Drawing.Point(110, 64);
-            this.RdoBtn2_2.Name = "RdoBtn2_2";
-            this.RdoBtn2_2.Size = new System.Drawing.Size(306, 31);
-            this.RdoBtn2_2.TabIndex = 46;
-            this.RdoBtn2_2.Text = " 工　事（自社工事）";
-            this.RdoBtn2_2.UseVisualStyleBackColor = true;
-            // 
-            // RdoBtn2_1
-            // 
-            this.RdoBtn2_1.AutoSize = true;
-            this.RdoBtn2_1.Font = new System.Drawing.Font("ＭＳ 明朝", 20.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
-            this.RdoBtn2_1.ForeColor = System.Drawing.Color.Black;
-            this.RdoBtn2_1.Location = new System.Drawing.Point(110, 24);
-            this.RdoBtn2_1.Name = "RdoBtn2_1";
-            this.RdoBtn2_1.Size = new System.Drawing.Size(190, 31);
-            this.RdoBtn2_1.TabIndex = 46;
-            this.RdoBtn2_1.Text = " 購　入　品";
-            this.RdoBtn2_1.UseVisualStyleBackColor = true;
-            // 
-            // Column5
-            // 
-            dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
-            this.Column5.DefaultCellStyle = dataGridViewCellStyle2;
-            this.Column5.Frozen = true;
-            this.Column5.HeaderText = "部署コード";
-            this.Column5.Name = "Column5";
-            this.Column5.ReadOnly = true;
-            this.Column5.Resizable = System.Windows.Forms.DataGridViewTriState.False;
-            this.Column5.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
-            this.Column5.Visible = false;
-            // 
-            // Column3
-            // 
-            dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
-            dataGridViewCellStyle3.Font = new System.Drawing.Font("ＭＳ Ｐゴシック", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
-            dataGridViewCellStyle3.ForeColor = System.Drawing.Color.Black;
-            this.Column3.DefaultCellStyle = dataGridViewCellStyle3;
-            this.Column3.Frozen = true;
-            this.Column3.HeaderText = "部　署　名　称";
-            this.Column3.Name = "Column3";
-            this.Column3.ReadOnly = true;
-            this.Column3.Resizable = System.Windows.Forms.DataGridViewTriState.False;
-            this.Column3.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
-            this.Column3.Width = 440;
-            // 
-            // Column2
-            // 
-            this.Column2.HeaderText = "";
-            this.Column2.Name = "Column2";
-            this.Column2.Resizable = System.Windows.Forms.DataGridViewTriState.True;
-            this.Column2.Width = 40;
-            // 
-            // RdoBtn2_3
-            // 
-            this.RdoBtn2_3.AutoSize = true;
-            this.RdoBtn2_3.Font = new System.Drawing.Font("ＭＳ 明朝", 20.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
-            this.RdoBtn2_3.ForeColor = System.Drawing.Color.Black;
-            this.RdoBtn2_3.Location = new System.Drawing.Point(110, 104);
-            this.RdoBtn2_3.Name = "RdoBtn2_3";
-            this.RdoBtn2_3.Size = new System.Drawing.Size(451, 31);
-            this.RdoBtn2_3.TabIndex = 46;
-            this.RdoBtn2_3.Text = " 工　事（台帳完了・瑕疵工事）";
-            this.RdoBtn2_3.UseVisualStyleBackColor = true;
-            // 
             // FrmSelectTarget
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
             this.BackColor = System.Drawing.Color.Black;
-            this.ClientSize = new System.Drawing.Size(600, 500);
+            this.ClientSize = new System.Drawing.Size(1214, 536);
+            this.Controls.Add(this.groupBoxEx2);
             this.Controls.Add(this.groupBoxEx1);
             this.Controls.Add(this.btnSelect);
             this.Controls.Add(this.btnEnd);
@@ -257,7 +481,7 @@
             this.Controls.Add(this.groupBox1);
             this.Font = new System.Drawing.Font("ＭＳ 明朝", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
             this.ForeColor = System.Drawing.Color.White;
-            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
+            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
             this.Margin = new System.Windows.Forms.Padding(4);
             this.MaximizeBox = false;
             this.MinimizeBox = false;
@@ -266,11 +490,16 @@
             this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
             this.Text = "対象選択";
             this.Shown += new System.EventHandler(this.FrmSelectTarget_Shown);
+            this.groupBoxEx2.ResumeLayout(false);
+            this.groupBoxEx3.ResumeLayout(false);
+            this.groupBoxEx3.PerformLayout();
+            ((System.ComponentModel.ISupportInitialize)(this.numUDConstPro)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.dataGridViewEX1)).EndInit();
+            this.groupBoxEx1.ResumeLayout(false);
+            this.groupBoxEx1.PerformLayout();
             this.groupBox1.ResumeLayout(false);
             this.groupBox1.PerformLayout();
             ((System.ComponentModel.ISupportInitialize)(this.dgvMaster)).EndInit();
-            this.groupBoxEx1.ResumeLayout(false);
-            this.groupBoxEx1.PerformLayout();
             this.ResumeLayout(false);
 
         }
@@ -286,9 +515,23 @@
         private CustomControls.GroupBoxEx groupBoxEx1;
         private System.Windows.Forms.RadioButton RdoBtn2_2;
         private System.Windows.Forms.RadioButton RdoBtn2_1;
+        private System.Windows.Forms.RadioButton RdoBtn2_3;
+        private CustomControls.GroupBoxEx groupBoxEx2;
+        private CustomControls.DataGridViewEX dataGridViewEX1;
+        private CustomControls.GroupBoxEx groupBoxEx3;
+        private CustomControls.ComboBoxEX cmbDepartment;
+        private System.Windows.Forms.Label label5;
+        private System.Windows.Forms.Label label2;
+        private System.Windows.Forms.NumericUpDown numUDConstPro;
+        private System.Windows.Forms.Label label4;
+        private System.Windows.Forms.Label label7;
+        private System.Windows.Forms.DataGridViewTextBoxColumn Column4;
         private System.Windows.Forms.DataGridViewTextBoxColumn Column5;
-        private System.Windows.Forms.DataGridViewTextBoxColumn Column3;
-        private System.Windows.Forms.DataGridViewCheckBoxColumn Column2;
-        private System.Windows.Forms.RadioButton RdoBtn2_3;
+        private System.Windows.Forms.DataGridViewTextBoxColumn Column6;
+        private System.Windows.Forms.DataGridViewTextBoxColumn Column7;
+        private System.Windows.Forms.DataGridViewTextBoxColumn Column1;
+        private System.Windows.Forms.DataGridViewTextBoxColumn Column2;
+        private System.Windows.Forms.DataGridViewCheckBoxColumn Column3;
+        private System.Windows.Forms.RadioButton RdoBtn2_4;
     }
 }
\ No newline at end of file
Index: trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/RequestSumList/FrmSelectTarget.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/RequestSumList/FrmSelectTarget.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/RequestSumList/FrmSelectTarget.cs	(revision 484)
@@ -7,6 +7,7 @@
 using System.Text;
 using System.Threading.Tasks;
 using System.Windows.Forms;
+using System.Collections;
 
 using log4net;
 using log4net.Appender;
@@ -36,6 +37,48 @@
         private static readonly log4net.ILog logger = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
         #endregion
 
+        #region 定数
+
+        #region デフォルト表示行数表示
+        /// <summary>
+        /// デフォルト表示行数表示
+        /// </summary>
+        public static int s_MaxInitLineCount = 16;
+        #endregion
+
+        #region 部署グリッド定義
+        /// <summary>
+        /// 部署グリッド定義
+        /// </summary>
+        private enum Grid1Column
+        {
+            DepartMentCode = 0,
+            DepartmentName,
+            Check,
+        }
+        #endregion
+
+        #region 工事一覧グリッド定義
+        /// <summary>
+        /// 工事一覧グリッド定義
+        /// </summary>
+        private enum Grid2Column
+        {
+            ConstrCode = 0,
+            No,
+            ConstrName,
+            PersonName,
+        }
+        #endregion
+
+        #region 画面幅定義
+        /// <summary>
+        /// 画面幅定義
+        /// </summary>
+        public static int[] s_DispWidthDef = new int[] { 534, 1230 };
+        #endregion
+        #endregion
+
         #region 変数
 
         /// <summary>
@@ -53,6 +96,10 @@
         /// </summary>
         private int m_SelectDepCode = 0;
 
+        /// <summary>
+        /// 選択工事番号
+        /// </summary>
+        private int m_ConstrCode = 0;
         #endregion
 
         #region プロパティ
@@ -84,6 +131,15 @@
             set { m_SelectDepCode = value; }
         }
 
+        /// <summary>
+        /// 選択工事番号
+        /// </summary>
+        public int ConstrCode
+        {
+            get { return m_ConstrCode; }
+            set { m_ConstrCode = value; }
+        }
+
         #endregion
 
         #region コンストラクタ
@@ -104,7 +160,10 @@
         /// <param name="e"></param>
         private void FrmSelectTarget_Shown(object sender, EventArgs e)
         {
-          // 部署表示
+            // フォーム初期サイズセット
+            this.Width = s_DispWidthDef[0];
+
+            // 部署表示
             SetDepartmentData();
         }
         #endregion
@@ -131,9 +190,15 @@
                 {
                     m_CostType = (int)CostDataOfCompensation.CostTypeDef.Type3;
                 }
-                else
+                else if (RdoBtn2_3.Checked || RdoBtn2_4.Checked)
                 {
-                    m_CostType = (int)CostDataOfCompensation.CostTypeDef.Type4;
+                    if (RdoBtn2_3.Checked)
+                        m_CostType = (int)CostDataOfCompensation.CostTypeDef.Type4;
+                    else
+                        m_CostType = (int)CostDataOfCompensation.CostTypeDef.Type5;
+
+                    DataGridViewRow CurRow = dataGridViewEX1.CurrentRow;
+                    m_ConstrCode = CommonMotions.cnvInt(CurRow.Cells[(int)Grid2Column.ConstrCode].Value);
                 }
 
                 // 出納分類
@@ -168,9 +233,9 @@
             {
                 int nDepCode = 0;
                 List<DataGridViewRow> RowList = dgvMaster.Rows.Cast<DataGridViewRow>()
-                                                            .Where(x => CommonMotions.cnvBool(x.Cells[2].Value))
+                                                            .Where(x => CommonMotions.cnvBool(x.Cells[(int)Grid1Column.Check].Value))
                                                             .ToList();
-                nDepCode = CommonMotions.cnvInt(RowList[0].Cells[0].Value);
+                nDepCode = CommonMotions.cnvInt(RowList[0].Cells[(int)Grid1Column.DepartMentCode].Value);
 
                 return nDepCode;
             }
@@ -235,6 +300,20 @@
                     return false;
                 }
 
+                // 工事選択チェック
+                if (RdoBtn2_3.Checked)
+                {
+                    int nIndex = dataGridViewEX1.CurrentRow.Index;
+                    if (nIndex < 0)
+                    {
+                        MessageBox.Show("台帳完了・瑕疵工事選択時は工事を選択してください。"
+                                        , "選択エラー"
+                                        , MessageBoxButtons.OK
+                                        , MessageBoxIcon.Error);
+                        return false;
+                    }
+                }
+
                 return true;
             }
             catch (Exception ex)
@@ -282,14 +361,14 @@
 
                 DataGridView dgv = dgvMaster;
                 dgv.Rows.Clear();
-                foreach(DepartmentMaster CurRec in DepList)
+                foreach (DepartmentMaster CurRec in DepList)
                 {
                     int nIndex = dgv.Rows.Add(1);
                     DataGridViewRow CurRow = dgv.Rows[nIndex];
 
-                    CurRow.Cells[0].Value = CurRec.DepartmentCode;
-                    CurRow.Cells[1].Value = CurRec.DepartmentString;
-                    CurRow.Cells[2].Value = false;
+                    CurRow.Cells[(int)Grid1Column.DepartMentCode].Value = CurRec.DepartmentCode;
+                    CurRow.Cells[(int)Grid1Column.DepartmentName].Value = CurRec.DepartmentString;
+                    CurRow.Cells[(int)Grid1Column.Check].Value = false;
                 }
             }
             catch (Exception ex)
@@ -298,17 +377,53 @@
             }
             finally
             {
-                DepDB.close();DepDB = null;
+                DepDB.close(); DepDB = null;
             }
         }
         #endregion
 
-        #region ラジオボタン選択変更
+        #region 出納科目ラジオボタン選択変更
         /// <summary>
-        /// ラジオボタン選択変更
+        /// 出納科目ラジオボタン選択変更
         /// </summary>
         /// <param name="sender"></param>
         /// <param name="e"></param>
+        private void RdoBtn2_1_CheckedChanged(object sender, EventArgs e)
+        {
+            try
+            {
+                if (RdoBtn2_3.Checked || RdoBtn2_4.Checked)
+                {
+                    this.Width = s_DispWidthDef[1];
+
+                    // 工事一覧初期表示
+                    InitConstruction();
+                }
+                else
+                {
+                    this.Width = s_DispWidthDef[1];
+                }
+
+                Point Po = Owner.Location;
+                Po.X += (Owner.Width - this.Width) / 2;
+                Po.Y += (Owner.Height - this.Height) / 2;
+                this.Location = Po;
+
+                this.Update();
+            }
+            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 radioButton1_CheckedChanged(object sender, EventArgs e)
         {
             if (RdoBtn1_1.Checked)
@@ -321,5 +436,231 @@
             }
         }
         #endregion
+
+        #region 年度変更
+        /// <summary>
+        /// 年度変更
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        private void numUDConstPro_ValueChanged(object sender, EventArgs e)
+        {
+            cmbDepartment.TextChanged -= new EventHandler(this.cmbDepartment_TextChanged);
+            try
+            {
+                // 部署コンボボックス初期表示
+                SetcmbDepartment();
+
+                // 一覧データ表示処理
+                DataDisplay();
+            }
+            catch (System.Exception ex)
+            {
+                logger.ErrorFormat("システムエラー：{0}：{1}", CommonMotions.GetMethodName(), ex.Message);
+            }
+            finally
+            {
+                cmbDepartment.TextChanged += new EventHandler(this.cmbDepartment_TextChanged);
+            }
+        }
+        #endregion
+
+        #region 部署変更
+        /// <summary>
+        /// 部署変更
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        private void cmbDepartment_TextChanged(object sender, EventArgs e)
+        {
+            // 一覧データ表示処理
+            DataDisplay();
+        }
+        #endregion
+
+        #region 工事一覧初期表示
+        /// <summary>
+        /// 工事一覧初期表示
+        /// </summary>
+        private void InitConstruction()
+        {
+            try
+            {
+                numUDConstPro.ValueChanged -= new EventHandler(numUDConstPro_ValueChanged);
+                cmbDepartment.TextChanged -= new EventHandler(this.cmbDepartment_TextChanged);
+
+                // 年度初期表示
+                SetInitnumUDConstPro();
+                // 部署コンボボックス初期表示
+                SetcmbDepartment();
+                // 一覧データ表示処理
+                DataDisplay();
+            }
+            catch (System.Exception ex)
+            {
+                logger.ErrorFormat("システムエラー：{0}：{1}", CommonMotions.GetMethodName(), ex.Message);
+            }
+            finally
+            {
+                numUDConstPro.ValueChanged += new EventHandler(numUDConstPro_ValueChanged);
+                cmbDepartment.TextChanged += new EventHandler(this.cmbDepartment_TextChanged);
+            }
+        }
+        #endregion
+
+        #region 対象年度初期セット
+        /// <summary>
+        /// 対象年度初期セット
+        /// </summary>
+        private void SetInitnumUDConstPro()
+        {
+            try
+            {
+                // 検索年度セット
+                // データにある事業期と現在の事業セット
+                int minval = 0;
+                int maxval = 0;
+                CommonMotions.GetPeriodYearMinMax(ref minval, ref maxval);
+
+                numUDConstPro.Minimum = minval;
+                numUDConstPro.Maximum = maxval;
+                numUDConstPro.Value = CommonMotions.GetPeriodYear();
+                CommonMotions.SetSerchTitle(label2, label7, numUDConstPro, label4);
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("システムエラー：{0}：{1}", CommonMotions.GetMethodName(), ex.Message);
+            }
+        }
+        #endregion
+
+        #region 部署コンボボックスをセットする
+        /// <summary>
+        /// 部署コンボボックスへ文字をセットする
+        /// </summary>
+        private void SetcmbDepartment()
+        {
+            IOMDepartment depDB = new IOMDepartment();
+            try
+            {
+                int nBeforeCode = CommonMotions.cnvInt(cmbDepartment.SelectedValue);
+
+                int nTargetCount = (int)numUDConstPro.Value;
+                // 部署マスタを検索する
+                StringBuilder strSQL = new StringBuilder();
+                CommonMotions.CreateDepCombBoxSQL(ref strSQL, nTargetCount, false, false);
+
+                // 部署マスタ読込
+                ArrayList arList = new ArrayList();
+                if (!depDB.ExecuteReader(strSQL.ToString(), ref arList)) return;
+
+                List<KeyValuePair<int, string>> ConstructionDataList = new List<KeyValuePair<int, string>>();
+                ConstructionDataList.Add(new KeyValuePair<int, string>(0, "　全　社　"));
+
+                foreach (object[] work in arList)
+                {
+                    KeyValuePair<int, string> keyval = new KeyValuePair<int, string>(CommonMotions.cnvInt(work[0])
+                                                                                    , CommonMotions.cnvString(work[1]));
+
+                    ConstructionDataList.Add(keyval);
+                }
+
+                cmbDepartment.DataSource = null;
+                cmbDepartment.Items.Clear();
+                cmbDepartment.Text = "";
+
+                // コンボボックス初期表示
+                ComboBoxAction.InitDataSetCombBox(cmbDepartment, ConstructionDataList);
+
+                cmbDepartment.SelectedValue = nBeforeCode;
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("システムエラー：{0}：{1}", CommonMotions.GetMethodName(), ex.Message);
+            }
+            finally
+            {
+                depDB.close(); depDB = null;
+            }
+        }
+        #endregion
+
+        #region 一覧データ表示処理
+        /// <summary>
+        /// 一覧データ表示処理
+        /// </summary>
+        private void DataDisplay()
+        {
+            IOAllFreeSQL FreeDB = new IOAllFreeSQL();
+            DataGridViewEX dgv = dataGridViewEX1;
+            try
+            {
+                dgv.Rows.Clear();
+                int nDepCode = CommonMotions.cnvInt(cmbDepartment.SelectedValue);
+
+                StringBuilder strSQL = new StringBuilder();
+                strSQL.Append("Select");
+                strSQL.Append("  A.ConstructionCode");
+                strSQL.Append(" , B.DetailString");
+                strSQL.Append(" , D.PersonName");
+                strSQL.Append(" From constructionbaseinfo As A");
+                strSQL.Append("      Inner Join constructionbaseinfodetail As B");
+                strSQL.Append("            On B.ConstructionCode = A.ConstructionCode");
+                strSQL.AppendFormat("      And B.DetailNo = {0}", (int)ConstructionBaseInfoDetail.DataNoDef.ConstructionName);
+                strSQL.Append("      Inner Join constructionledger As C");
+                strSQL.Append("            On C.ConstructionCode = A.ConstructionCode");
+                strSQL.AppendFormat("      And C.ComplateFlg = {0}", (int)ConstructionLedger.CompFlagDef.Complated);
+                strSQL.Append("      Inner Join personinchargemaster As D");
+                strSQL.Append("            On D.PersonCode = A.ConstructionPersonCode");
+                strSQL.Append(" Where");
+
+                if (CommonMotions.BasePeriodYear())
+                    strSQL.AppendFormat("  A.ConstructionPeriod = {0}", numUDConstPro.Value);
+                else
+                    strSQL.AppendFormat("  A.ConstructionYear = {0}", numUDConstPro.Value);
+
+                if (nDepCode > 0)
+                {
+                    strSQL.AppendFormat(" And A.ConstrDepCode = {0}", nDepCode);
+                }
+                strSQL.Append(" Order By A.LedgerComplateDate Desc");
+
+                ArrayList BaseList = new ArrayList();
+                if (!FreeDB.ExecuteReader(strSQL.ToString(), ref BaseList)) return;
+                if (BaseList.Count == 0) return;
+
+                // 要素表示
+                int ino = 1;
+                int iy = 0;
+                DataGridViewRow[] DataRow = new DataGridViewRow[BaseList.Count];
+                foreach (object[] wrk in BaseList)
+                {
+                    // データ編集
+                    DataGridViewRow CurRow = new DataGridViewRow();
+                    CurRow.CreateCells(dgv);
+
+                    CurRow.Cells[(int)Grid2Column.ConstrCode].Value = CommonMotions.cnvInt(wrk[0]);
+                    CurRow.Cells[(int)Grid2Column.No].Value = ino++;
+                    CurRow.Cells[(int)Grid2Column.ConstrName].Value = CommonMotions.cnvString(wrk[1]);
+                    CurRow.Cells[(int)Grid2Column.PersonName].Value = CommonMotions.cnvString(wrk[2]);
+
+                    CurRow.Cells[(int)Grid2Column.ConstrCode].ToolTipText = CommonMotions.cnvString(wrk[1]);
+
+                    DataRow[iy++] = CurRow;
+                }
+                dgv.Rows.AddRange(DataRow);
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("システムエラー：{0}：{1}", CommonMotions.GetMethodName(), ex.Message);
+            }
+            finally
+            {
+                FreeDB.close(); FreeDB = null;
+                if (s_MaxInitLineCount > dgv.Rows.Count)
+                    dgv.RowCount += (s_MaxInitLineCount - dgv.Rows.Count);
+            }
+        }
+        #endregion
     }
 }
Index: trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/RequestSumList/FrmSelectTarget.resx
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/RequestSumList/FrmSelectTarget.resx	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/RequestSumList/FrmSelectTarget.resx	(revision 484)
@@ -117,13 +117,25 @@
   <resheader name="writer">
     <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </resheader>
+  <metadata name="Column4.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
   <metadata name="Column5.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
-  <metadata name="Column3.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+  <metadata name="Column6.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
+  <metadata name="Column7.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="Column1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
   <metadata name="Column2.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
+  <metadata name="Column3.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
 </root>
\ No newline at end of file
Index: trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/SalesConfirm/FrmSalesConfirm.Designer.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/SalesConfirm/FrmSalesConfirm.Designer.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/SalesConfirm/FrmSalesConfirm.Designer.cs	(revision 484)
@@ -514,7 +514,7 @@
             this.comboBox4.BackColor = System.Drawing.Color.White;
             this.comboBox4.DisplayMember = "Value";
             this.comboBox4.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
-            this.comboBox4.DropDownWidth = 120;
+            this.comboBox4.DropDownWidth = 500;
             this.comboBox4.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
             this.comboBox4.Font = new System.Drawing.Font("ＭＳ 明朝", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
             this.comboBox4.FormattingEnabled = true;
@@ -529,7 +529,7 @@
             this.comboBox5.BackColor = System.Drawing.Color.White;
             this.comboBox5.DisplayMember = "Value";
             this.comboBox5.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
-            this.comboBox5.DropDownWidth = 120;
+            this.comboBox5.DropDownWidth = 500;
             this.comboBox5.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
             this.comboBox5.Font = new System.Drawing.Font("ＭＳ 明朝", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
             this.comboBox5.FormattingEnabled = true;
Index: trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/SalesConfirm/FrmSalesConfirm.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/SalesConfirm/FrmSalesConfirm.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/SalesConfirm/FrmSalesConfirm.cs	(revision 484)
@@ -467,9 +467,9 @@
         }
         #endregion
 
+        #region セル選択変更
         // セル選択行
         int m_BeforeGridRow = -1;
-        #region セル選択変更
         /// <summary>
         /// セル変更時行の色を変える
         /// </summary>
Index: trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/SelectPayment/FrmSelectPayment.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/SelectPayment/FrmSelectPayment.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/SelectPayment/FrmSelectPayment.cs	(revision 484)
@@ -208,6 +208,7 @@
             BillingSpritFlg,                                                    // 請求区分
             PersonName,                                                         // 担当者名
             DepartmentCode,                                                     // ■部署コード
+            JapaneseSyllabary,                                                  // ■発注者50音
         }
         #endregion
 
Index: trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/SelectPayment/FrmSelectPaymentAux.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/SelectPayment/FrmSelectPaymentAux.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/SelectPayment/FrmSelectPaymentAux.cs	(revision 484)
@@ -35,15 +35,10 @@
     {
         #region フォームロード時の処理
         /// <summary>
-        /// 初期ロード時フラグ
-        /// </summary>
-        private bool m_bInitLoad = false;
-        /// <summary>
         /// フォームロード時の処理
         /// </summary>
         private void InitFormLoad()
         {
-            m_bInitLoad = true;
             try
             {
                 // 対象月コンボBOX設定
@@ -99,7 +94,6 @@
             {
                 logger.ErrorFormat("システムエラー：{0}：{1}", CommonMotions.GetMethodName(), ex.Message);
             }
-            m_bInitLoad = false;
         }
         #endregion
 
@@ -244,7 +238,7 @@
                             case (int)DispColumn.DepositAmount:
                                 // ------ 入金金額（税抜）
                                 depositDetail.DepositAmount = amount;
-                                // 消費税額計算(値引き分も消費税対象とする)
+                                // 消費税額計算
                                 depositDetail.TaxAmount = CommonMotions.cnvRound(depositDetail.DepositAmount * dParcent);
                                 depositDetail.TaxAmount += CommonMotions.cnvRound(depositDetail.DiscountAmount * dParcent);
                                 break;
@@ -257,15 +251,12 @@
                                 // 入金金額（税抜）
                                 // 消費税額計算(入金金額（税込）-入金金額（税抜）)
                                 depositDetail.TaxAmount = CommonMotions.cnvRound((amount / (dParcent + 1.0)) * dParcent);
-                                depositDetail.DepositAmount = amount - (depositDetail.TaxAmount + depositDetail.DiscountAmount);
-                                depositDetail.DiscountAmount = amount - (depositDetail.TaxAmount + depositDetail.DepositAmount);
+                                depositDetail.DepositAmount = amount - depositDetail.TaxAmount;
+                                //depositDetail.DiscountAmount = amount - (depositDetail.TaxAmount + depositDetail.DepositAmount);
                                 break;
                             case (int)DispColumn.DiscountAmount:
                                 // ----- 値引金額
                                 depositDetail.DiscountAmount = amount;
-                                // 消費税額計算(値引き分も消費税対象とする)
-                                depositDetail.TaxAmount = CommonMotions.cnvRound(depositDetail.DepositAmount * dParcent);
-                                depositDetail.TaxAmount += CommonMotions.cnvRound(depositDetail.DiscountAmount * dParcent);
                                 break;
                             case (int)DispColumn.DetailCnstrPrice:                                  // 協力金
                                 // ----- 協力金
@@ -1245,8 +1236,9 @@
                                                             && x.OrderersCode == OrderCode
                                                             && x.DepositDetails[0].DepositMonth == DepositMonth
                                                             && x.DepositDetails[0].SeqNo == SeqNo)
-                                                .Sum(y => y.DepositDetails[0].TaxAmount - (CommonMotions.cnvRound((double)(y.DepositDetails[0].DiscountAmount)
-                                                                                            * (CommonMotions.AdaptationConsumptionTax(nParaDate) / 100.0))));
+                                                .Sum(y => y.DepositDetails[0].TaxAmount);
+                //.Sum(y => y.DepositDetails[0].TaxAmount - (CommonMotions.cnvRound((double)(y.DepositDetails[0].DiscountAmount)
+                //                                            * (CommonMotions.AdaptationConsumptionTax(nParaDate) / 100.0))));
 
                 // 消費税金額を加算
                 wrkPayTotal += wrkPayTotalTax;
@@ -1910,6 +1902,7 @@
                 sql.Append("   , NULL AS BILLINGSPLITFLG ");
                 sql.Append("   , NULL AS PERSONNAME ");
                 sql.Append("   , NULL AS DEPARTMENTCODE ");
+                sql.Append("   , O.JapaneseSyllabary As JAPANESESYLLABARY");
                 sql.Append("  FROM ");
                 sql.Append("   REQUESTHEAD AS H ");
                 sql.Append("  INNER JOIN ORDERERSMASTER AS O ");
@@ -1974,6 +1967,7 @@
                 sql.Append("   , CBI.BILLINGSPLITFLG ");
                 sql.Append("   , ifnull(PICM2.SEALPRINTNAME,PICM.SEALPRINTNAME) AS PERSONNAME ");
                 sql.Append("   , PICM.DEPARTMENTCODE ");
+                sql.Append("   , O.JapaneseSyllabary As JAPANESESYLLABARY");
                 sql.Append("  FROM ");
                 sql.Append("   REQUESTHEAD AS H");
 
@@ -2018,7 +2012,8 @@
                 sql.Append(" ) ");
 
                 sql.Append(" ORDER BY ");
-                sql.Append("  ORDERERSDIVISION ");
+                sql.Append("  JAPANESESYLLABARY");
+                sql.Append("  , ORDERERSDIVISION ");
                 sql.Append("  , ORDERERSCODE ");
                 sql.Append("  , KB ");
                 sql.Append("  , REQCONSTRUCTIONNAME");
@@ -2182,8 +2177,10 @@
                 int nSelYM = CommonMotions.cnvInt(cbTargetMonth.SelectedValue);
 
                 // 過去データの消込金額を入金金額より減算して消費税計算による公差の誤差以上を対象とする
-                stringBuilder.Append("Select A.*, B.SumVal");
-                stringBuilder.Append("    From DepositData As A");
+                stringBuilder.Append("Select");
+                stringBuilder.AppendFormat(" {0}", IODepositData.CreateFieldNameList("A."));
+                stringBuilder.Append(", B.SumVal");
+                stringBuilder.Append(" From DepositData As A");
 
                 stringBuilder.Append(" Left Join(Select SUM(BB.DEPOSITAMOUNT");
                 stringBuilder.Append("                    + BB.TAXAMOUNT");
@@ -2195,10 +2192,10 @@
                 stringBuilder.Append("           From depositdatadetail As BB");
                 stringBuilder.AppendFormat("     Where BB.TARGETDATE != {0}", nSelYM);
                 stringBuilder.Append("           Group by BB.ORDERERSDIVISION, BB.ORDERERSCODE, BB.DEPOSITMONTH, BB.SEQNO) As B");
-                stringBuilder.Append(" ON B.ORDERERSDIVISION = A.ORDERERSDIVISION");
-                stringBuilder.Append(" And B.ORDERERSCODE = A.ORDERERSCODE");
-                stringBuilder.Append(" And B.DEPOSITMONTH = A.TARGETDATE");
-                stringBuilder.Append(" And B.SEQNO = A.SEQNO");
+                stringBuilder.Append("     ON B.ORDERERSDIVISION = A.ORDERERSDIVISION");
+                stringBuilder.Append("     And B.ORDERERSCODE = A.ORDERERSCODE");
+                stringBuilder.Append("     And B.DEPOSITMONTH = A.TARGETDATE");
+                stringBuilder.Append("     And B.SEQNO = A.SEQNO");
 
                 // 残額があるもの
                 stringBuilder.Append(" Where ((A.REMAININGCLEARING < -1 Or 1 < A.REMAININGCLEARING)");
Index: trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/SalesGraphData/FrmSalesGraphData.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/SalesGraphData/FrmSalesGraphData.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/SalesGraphData/FrmSalesGraphData.cs	(revision 484)
@@ -625,16 +625,16 @@
                         switch (i)
                         {
                             case (int)DispColumn.Value1:
-                                agdWork.SalesAmount = CommonMotions.cnvInt(wrkStr);
+                                agdWork.SalesAmount = CommonMotions.cnvLong(wrkStr);
                                 break;
                             case (int)DispColumn.Value2:
-                                agdWork.AdministrativeExpense = CommonMotions.cnvInt(wrkStr);
+                                agdWork.AdministrativeExpense = CommonMotions.cnvLong(wrkStr);
                                 break;
                             case (int)DispColumn.Value3:
-                                agdWork.GrossProfit = CommonMotions.cnvInt(wrkStr);
+                                agdWork.GrossProfit = CommonMotions.cnvLong(wrkStr);
                                 break;
                             case (int)DispColumn.Value4:
-                                agdWork.NetIncome = CommonMotions.cnvInt(wrkStr);
+                                agdWork.NetIncome = CommonMotions.cnvLong(wrkStr);
                                 break;
                         }
                     }
Index: trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/SubConstrRegist/FrmSubConstrRegistAuxiliary.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/SubConstrRegist/FrmSubConstrRegistAuxiliary.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/SubConstrRegist/FrmSubConstrRegistAuxiliary.cs	(revision 484)
@@ -741,7 +741,12 @@
             {
                 // 協力会社マスタ取得
                 ArrayList crList = new ArrayList();
-                string strSQL = "SELECT A.*, B.PERSONNAME, C.DEPARTMENTSTRING, C.DEPARTMENTCODE FROM SUBCONSTRREGIST A";
+                string strSQL = "SELECT";
+                strSQL += string.Format("{0}", IOSubConstrRegist.CreateFieldNameList("A."));
+                strSQL += ", B.PERSONNAME";
+                strSQL += ", C.DEPARTMENTSTRING";
+                strSQL += ", C.DEPARTMENTCODE";
+                strSQL += " FROM SUBCONSTRREGIST A";
                 strSQL += " LEFT JOIN PERSONINCHARGEMASTER B ON B.PERSONCODE = A.PERSONCODE";
                 strSQL += " LEFT JOIN DEPARTMENTMASTER C ON C.DEPARTMENTCODE = B.DEPARTMENTCODE";
                 strSQL += string.Format(" WHERE A.PersonCode = {0}", m_PersonCode);
@@ -854,7 +859,11 @@
                 int ItemCnt = 0;
                 if (bDefault)
                 {
-                    ItemSQL = "SELECT A.*, B.ITEMNAME FROM SUBCONSTRJOBITEMREGIST A, SUBCONTRACTORITEMMASTER B";
+                    ItemSQL = "SELECT";
+                    ItemSQL += string.Format(" {0}", IOSubConstrJobItemRegist.CreateFieldNameList("A."));
+                    ItemSQL += ", B.ITEMNAME";
+                    ItemSQL += " FROM SUBCONSTRJOBITEMREGIST A";
+                    ItemSQL += "    , SUBCONTRACTORITEMMASTER B";
                     ItemSQL += jobItemDB.CreatePrimarykeyString(PersonCode, CreateDate, SeqNo, 0, "A");
 
                     CodeCnt = (int)IOSubConstrJobItemRegist.TableColumn.ItemCode;
@@ -862,7 +871,11 @@
                 }
                 else
                 {
-                    ItemSQL = "SELECT A.*, B.ITEMNAME FROM SUBCONTRACTORJOBITEM A, SUBCONTRACTORITEMMASTER B";
+                    ItemSQL = "SELECT";
+                    ItemSQL += string.Format(" {0}", IOMSubContractorJobItem.CreateFieldNameList("A."));
+                    ItemSQL += ", B.ITEMNAME";
+                    ItemSQL += " FROM SUBCONTRACTORJOBITEM A";
+                    ItemSQL += "    , SUBCONTRACTORITEMMASTER B";
                     ItemSQL += string.Format(" WHERE A.COMPANYCODE = {0}", PersonCode);
 
                     CodeCnt = (int)IOMSubContractorJobItem.NameColumn.ItemCode;
@@ -908,7 +921,11 @@
                 int JobCnt = 0;
                 if (bDefault)
                 {
-                    jobSQL = "SELECT A.*, B.JOBCATEGORYNAME FROM SUBCONSTRJOBLINKREGIST A, SUBCONTRACTORJOBCATEGORY B";
+                    jobSQL = "SELECT";
+                    jobSQL += string.Format(" {0}", IOSubConstrJobLinkRegist.CreateFieldNameList("A."));
+                    jobSQL += ", B.JOBCATEGORYNAME";
+                    jobSQL += " FROM SUBCONSTRJOBLINKREGIST A";
+                    jobSQL += "    , SUBCONTRACTORJOBCATEGORY B";
                     jobSQL += jobLinkDB.CreatePrimarykeyString(PersonCode, CreateDate, SeqNo, 0, "A");
 
                     CodeCnt = (int)IOSubConstrJobLinkRegist.TableColumn.JobCategoryCode;
@@ -916,7 +933,11 @@
                 }
                 else
                 {
-                    jobSQL = "SELECT A.*, B.JOBCATEGORYNAME FROM SUBCONTRACTORJOBLINK A, SUBCONTRACTORJOBCATEGORY B";
+                    jobSQL = "SELECT";
+                    jobSQL += string.Format(" {0}", IOMSubContractorJobLink.CreateFieldNameList("A."));
+                    jobSQL += ", B.JOBCATEGORYNAME";
+                    jobSQL += " FROM SUBCONTRACTORJOBLINK A";
+                    jobSQL += "    , SUBCONTRACTORJOBCATEGORY B";
                     jobSQL += string.Format(" WHERE A.COMPANYCODE = {0}", PersonCode);
 
                     CodeCnt = (int)IOMSubContractorJobLink.NameColumn.JobCategoryCode;
Index: trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/TAndPCosts/FrmTAndPCosts.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/TAndPCosts/FrmTAndPCosts.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/TAndPCosts/FrmTAndPCosts.cs	(revision 484)
@@ -178,27 +178,6 @@
         private static string[] s_DataTypeString = new string[] { "交通費", "購入品費", "車両リース代", "駐車場・資材置き場代", "宿泊費", "処分費" };
         #endregion
 
-        #region 支払方法種別
-        /// <summary>
-        /// 支払方法種別
-        /// </summary>
-        private enum PaymentType
-        {
-            /// <summary>
-            /// 個人クレジット
-            /// </summary>
-            PersonalCredit = 0,
-            /// <summary>
-            /// 現金
-            /// </summary>
-            Cash,
-            /// <summary>
-            /// 法人クレジット
-            /// </summary>
-            CorporateCredit,
-        }
-        #endregion
-
         #region 支払方法種別名
         /// <summary>
         /// 支払方法種別名
@@ -862,8 +841,8 @@
                 {
                     case (int)DispGridColumn.PaymentButton1:
                         // 個人クレジット
-                        dgvRow.Cells[nPaymentTypeCnt].Value = (int)PaymentType.PersonalCredit;
-                        dgvRow.Cells[nPaymentTypeNameCnt].Value = s_PaymentTypeString[(int)PaymentType.PersonalCredit];
+                        dgvRow.Cells[nPaymentTypeCnt].Value = (int)CostDataOfPerson.PaymentTypeDef.PersonalCredit;
+                        dgvRow.Cells[nPaymentTypeNameCnt].Value = s_PaymentTypeString[(int)CostDataOfPerson.PaymentTypeDef.PersonalCredit];
 
                         // 支払いタイプ選択処理
                         SetPayType(dgv, e.ColumnIndex);
@@ -870,8 +849,8 @@
                         break;
                     case (int)DispGridColumn.PaymentButton2:
                         // 現金
-                        dgvRow.Cells[nPaymentTypeCnt].Value = (int)PaymentType.Cash;
-                        dgvRow.Cells[nPaymentTypeNameCnt].Value = s_PaymentTypeString[(int)PaymentType.Cash];
+                        dgvRow.Cells[nPaymentTypeCnt].Value = (int)CostDataOfPerson.PaymentTypeDef.Cash;
+                        dgvRow.Cells[nPaymentTypeNameCnt].Value = s_PaymentTypeString[(int)CostDataOfPerson.PaymentTypeDef.Cash];
 
                         // 支払いタイプ選択処理
                         SetPayType(dgv, e.ColumnIndex);
@@ -878,8 +857,8 @@
                         break;
                     case (int)DispGridColumn.PaymentButton3:
                         // 法人クレジット
-                        dgvRow.Cells[nPaymentTypeCnt].Value = (int)PaymentType.CorporateCredit;
-                        dgvRow.Cells[nPaymentTypeNameCnt].Value = s_PaymentTypeString[(int)PaymentType.CorporateCredit];
+                        dgvRow.Cells[nPaymentTypeCnt].Value = (int)CostDataOfPerson.PaymentTypeDef.CorporateCredit;
+                        dgvRow.Cells[nPaymentTypeNameCnt].Value = s_PaymentTypeString[(int)CostDataOfPerson.PaymentTypeDef.CorporateCredit];
 
                         // 支払いタイプ選択処理
                         SetPayType(dgv, e.ColumnIndex);
Index: trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/TAndPCosts/FrmTAndPCostsAuxiliary.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/TAndPCosts/FrmTAndPCostsAuxiliary.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/TAndPCosts/FrmTAndPCostsAuxiliary.cs	(revision 484)
@@ -831,7 +831,7 @@
                 // グリッドクリア
                 dgv.Rows.Clear();
                 // 合計クリア
-                for (int i = (int)PaymentType.PersonalCredit; i <= (int)PaymentType.CorporateCredit; i++)
+                for (int i = (int)CostDataOfPerson.PaymentTypeDef.PersonalCredit; i <= (int)CostDataOfPerson.PaymentTypeDef.CorporateCredit; i++)
                 {
                     m_label_TabTotal[TargetTab, i].Text = "0";
                 }
@@ -1589,23 +1589,23 @@
                     int DataType = CommonMotions.cnvInt(wrkRow.Cells[(int)DispGridColumn.PaymentType].Value);
                     switch (DataType)
                     {
-                        case (int)PaymentType.PersonalCredit:
+                        case (int)CostDataOfPerson.PaymentTypeDef.PersonalCredit:
                             // 個人クレジット
                             Total1 += CommonMotions.cnvInt(wrkRow.Cells[(int)DispGridColumn.EntryPrice].Value);
                             break;
-                        case (int)PaymentType.Cash:
+                        case (int)CostDataOfPerson.PaymentTypeDef.Cash:
                             // 現金
                             Total2 += CommonMotions.cnvInt(wrkRow.Cells[(int)DispGridColumn.EntryPrice].Value);
                             break;
-                        case (int)PaymentType.CorporateCredit:
+                        case (int)CostDataOfPerson.PaymentTypeDef.CorporateCredit:
                             /// 法人クレジット
                             Total3 += CommonMotions.cnvInt(wrkRow.Cells[(int)DispGridColumn.EntryPrice].Value);
                             break;
                     }
                 }
-                m_label_TabTotal[CurTabCnt, (int)PaymentType.PersonalCredit].Text = Total1.ToString("#,0");
-                m_label_TabTotal[CurTabCnt, (int)PaymentType.Cash].Text = Total2.ToString("#,0");
-                m_label_TabTotal[CurTabCnt, (int)PaymentType.CorporateCredit].Text = Total3.ToString("#,0");
+                m_label_TabTotal[CurTabCnt, (int)CostDataOfPerson.PaymentTypeDef.PersonalCredit].Text = Total1.ToString("#,0");
+                m_label_TabTotal[CurTabCnt, (int)CostDataOfPerson.PaymentTypeDef.Cash].Text = Total2.ToString("#,0");
+                m_label_TabTotal[CurTabCnt, (int)CostDataOfPerson.PaymentTypeDef.CorporateCredit].Text = Total3.ToString("#,0");
             }
             catch (Exception ex)
             {
Index: trunk/src/ProcessManagement/ProcessManagement/Forms/Master/ComponentLink/FrmComponentLink.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/Forms/Master/ComponentLink/FrmComponentLink.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/Forms/Master/ComponentLink/FrmComponentLink.cs	(revision 484)
@@ -779,7 +779,9 @@
                 // 作業名称取得クラス領域
                 // 作業名称取得SQL
                 StringBuilder strSql = new StringBuilder();
-                strSql.Append("SELECT * From componentmaster As A");
+                strSql.Append("SELECT");
+                strSql.AppendFormat(" {0}, B.*", IOMComponent.CreateFieldNameList("A."));
+                strSql.Append(" From componentmaster As A");
                 strSql.Append(" Left Join(Select");
                 strSql.Append("            BB.ComponentCode");
                 strSql.Append("          , Count(*) As LinkCount");
Index: trunk/src/ProcessManagement/ProcessManagement/Forms/Master/EvalScore/FrmEvalScore.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/Forms/Master/EvalScore/FrmEvalScore.cs	(nonexistent)
+++ trunk/src/ProcessManagement/ProcessManagement/Forms/Master/EvalScore/FrmEvalScore.cs	(revision 484)
@@ -0,0 +1,424 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Windows.Forms;
+using System.Collections;
+using System.Diagnostics;
+using System.Threading;
+using System.Threading.Tasks;
+
+using log4net;
+using log4net.Appender;
+using log4net.Repository.Hierarchy;
+
+using ProcessManagement.Common;
+using ProcessManagement.DB.IOAccess;
+using ProcessManagement.DataModel;
+using ProcessManagement.DB.Core;
+using ProcessManagement.Forms.DataEntry;
+using ProcessManagement.Forms.SubForms;
+using ProcessManagement.Forms.CustomControls;
+using ProcessManagement.Forms.ControlsAction;
+//*------------------------ 評価点数登録画面 ----------------------------------*
+//  2020/06/01  Ver1.0.0.0      Create Source           
+//
+//
+//
+//*----------------------------------------------------------------------------*
+namespace ProcessManagement.Forms.Master
+{
+    public partial class FrmEvalScore : Form
+    {
+        #region 使用定義
+        //log4netログを使用する
+        private static readonly log4net.ILog logger = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
+        #endregion
+
+        #region 定数
+
+        /// <summary>
+        /// グリッド行数
+        /// </summary>
+        private const int s_GridMaxLine = 15;
+
+        #region 表示グリッドカラム
+        /// <summary>
+        /// 表示グリッドカラム
+        /// </summary>
+        private enum GridColumn
+        {
+            ConstrCode = 0,
+            No,
+            ConstrName,
+            PersonName,
+            Score,
+        }
+        #endregion
+
+        #endregion
+
+        #region 変数
+        /// <summary>
+        /// 初期時フラグ
+        /// </summary>
+        //private bool m_bInitFlg = true;
+
+        /// <summary>
+        /// フィールド値変化フラグ
+        /// </summary>
+        private bool m_bChengeAns = false;
+
+        /// <summary>
+        /// 参照フラグ
+        /// </summary>
+        private bool m_EditLock = false;
+        #endregion
+
+        #region プロパティ
+
+        /// <summary>
+        /// 参照フラグ
+        /// </summary>
+        public bool EditLock
+        {
+            get { return m_EditLock; }
+            set { m_EditLock = value; }
+        }
+        #endregion
+
+        #region コンストラクタ
+        public FrmEvalScore()
+        {
+            InitializeComponent();
+        }
+        #endregion
+        #region デストラクタ
+        ~FrmEvalScore()
+        {
+            try
+            {
+                GC.Collect();
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("システムエラー：{0}：{1}", CommonMotions.GetMethodName(), ex.Message);
+            }
+        }
+        #endregion
+
+        #region 初期フォームロード
+        /// <summary>
+        /// 初期フォームロード
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        private void FrmEvalScore_Load(object sender, EventArgs e)
+        {
+
+            // フラグ初期化
+            m_bChengeAns = false;
+        }
+        #endregion
+
+        #region フォームロード処理
+        /// <summary>
+        /// フォームロード処理
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        private async void FrmEvalScore_Shown(object sender, EventArgs e)
+        {
+            await Task.Delay(100);
+            // フォームロード時の処理
+            InitFormLoad();
+        }
+        #endregion
+
+        #region Entryキーでの移動処理
+        /// <summary>
+        /// Entryキーでの移動処理
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        private void FrmEvalScore_KeyDown(object sender, KeyEventArgs e)
+        {
+            try
+            {
+                //AltかCtrlキーが押されている時は無視する
+                if (e.Alt || e.Control) return;
+
+                //Enterキーが押されているか確認
+                if (e.KeyCode == Keys.Enter)
+                {
+                    //あたかもTabキーが押されたかのようにする。
+                    // Shiftが押されている時は前のコントロールへフォーカスを移動
+                    this.ProcessTabKey(!e.Shift);
+
+                    e.Handled = true;
+                    //.NET Framework 2.0以降
+                    e.SuppressKeyPress = true;
+                }
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("システムエラー：{0}：{1}", CommonMotions.GetMethodName(), ex.Message);
+            }
+        }
+        #endregion
+
+        #region 入力開始処理
+        /// <summary>
+        /// 入力開始処理
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        private void textBox1_Enter(object sender, EventArgs e)
+        {
+            textBox1.SelectAll();
+        }
+        #endregion
+
+        #region 入力終了後処理
+        /// <summary>
+        /// 入力終了後処理
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        private void textBox1_Validated(object sender, EventArgs e)
+        {
+            // 入力後処理
+            ValidatedProc();
+        }
+        #endregion
+
+        #region ×ボタン押下処理
+        /// <summary>
+        /// ×ボタン押下処理
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        private void FrmEvalScore_FormClosing(object sender, FormClosingEventArgs e)
+        {
+            if (m_bChengeAns)
+            {
+                if (MessageBox.Show("データに変更があります、登録せずに終了してよろしいでしょうか？", "終了確認"
+                                , MessageBoxButtons.YesNo, MessageBoxIcon.Warning) == DialogResult.No)
+                {
+                    e.Cancel = true;
+                    return;
+                }
+            }
+            // 前プロセスに戻る
+            ClsExcute.BackProcess();
+        }
+        #endregion
+
+        #region 終了ボタンクリック
+        /// 終了ボタンクリック
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        private void btnEnd_Click(object sender, EventArgs e)
+        {
+            this.Close();
+        }
+        #endregion
+
+        #region 登録ボタン押下
+        /// <summary>
+        /// 登録ボタン押下
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        private void btnDataEntry_Click(object sender, EventArgs e)
+        {
+            try
+            {
+                // データ登録処理
+                if (!DataEntryProcess()) return;
+
+                // 変更フラグクリア
+                m_bChengeAns = false;
+
+                CommonMotions.EntryEndMessage("期限登録データ");
+
+                // データ表示
+                DspGridData();
+            }
+            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 btnDataDelete_Click(object sender, EventArgs e)
+        {
+            IOMTerm tmDB = new IOMTerm();
+            try
+            {
+                if (MessageBox.Show("表示中のデータを削除します。", "削除確認"
+                    , MessageBoxButtons.YesNo, MessageBoxIcon.Information) != DialogResult.Yes) return;
+
+                CommonMotions.RemoveEndMessage("期限登録データ");
+
+                // 変更フラグクリア
+                m_bChengeAns = false;
+            }
+            catch (System.Exception ex)
+            {
+                logger.ErrorFormat("システムエラー：{0}：{1}", CommonMotions.GetMethodName(), ex.Message);
+            }
+            finally
+            {
+                tmDB.close();
+                tmDB = null;
+            }
+        }
+        #endregion
+
+        #region 営業期コンボボックス変更
+        /// <summary>
+        /// 営業期変更
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        private void numUDConstPro_ValueChanged(object sender, EventArgs e)
+        {
+            SetControlEvent(false);
+
+            SetcmbDivision();
+            SetcmbOrders();
+
+            // データ表示
+            DspGridData();
+
+            SetControlEvent(true);
+        }
+        #endregion
+
+        #region 発注者区分コンボボックス変更
+        /// <summary>
+        /// 発注者区分コンボボックス変更
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        private void cmbDivision_TextChanged(object sender, EventArgs e)
+        {
+            try
+            {
+                SetControlEvent(false);
+
+                // 発注者のセット
+                SetcmbOrders();
+
+                // データ表示
+                DspGridData();
+
+                SetControlEvent(true);
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("システムエラー：{0}：{1}", CommonMotions.GetMethodName(), ex.Message);
+            }
+        }
+        #endregion
+
+        #region 発注者コンボボックス変更
+        /// <summary>
+        /// 発注者コンボボックス変更
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        private void cmbConstructionPerson_TextChanged(object sender, EventArgs e)
+        {
+            try
+            {
+                SetControlEvent(false);
+
+                // データ表示
+                DspGridData();
+
+                SetControlEvent(true);
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("システムエラー：{0}：{1}", CommonMotions.GetMethodName(), ex.Message);
+            }
+        }
+        #endregion
+
+        #region ヘルプボタン
+        private FrmHelp helpfrm = null;
+        /// <summary>
+        /// ヘルプボタン
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        private void btnHelp_Click(object sender, EventArgs e)
+        {
+            try
+            {
+                if (helpfrm != null) return;
+
+                helpfrm = new FrmHelp();
+                helpfrm.FormClosed += new FormClosedEventHandler(FrmHelp_FormClosed);
+
+                helpfrm.ProcessNo = (int)ClsExcute.MaintenanceExecuteNo.EvalScore;
+                helpfrm.Show(this);
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("システムエラー：：{0}：{1}", CommonMotions.GetMethodName(), ex.Message);
+                helpfrm.Dispose();
+                helpfrm = null;
+            }
+        }
+        #endregion
+
+        #region ヘルプフォームクローズ
+        /// <summary>
+        /// ヘルプフォームクローズ
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        private void FrmHelp_FormClosed(object sender, FormClosedEventArgs e)
+        {
+            try
+            {
+                helpfrm.Dispose();
+                helpfrm = null;
+                GC.Collect();
+                this.Activate();
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("システムエラー：：{0}：{1}", CommonMotions.GetMethodName(), ex.Message);
+            }
+        }
+        #endregion
+
+        #region グリッドダブルクリック
+        /// <summary>
+        /// グリッドダブルクリック
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        private void dataGridViewEX1_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
+        {
+            // グリッド選択データセット
+            SetSelectData();
+        }
+        #endregion
+    }
+}
\ No newline at end of file
Index: trunk/src/ProcessManagement/ProcessManagement/Forms/Master/EvalScore/FrmEvalScore.designer.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/Forms/Master/EvalScore/FrmEvalScore.designer.cs	(nonexistent)
+++ trunk/src/ProcessManagement/ProcessManagement/Forms/Master/EvalScore/FrmEvalScore.designer.cs	(revision 484)
@@ -0,0 +1,550 @@
+﻿namespace ProcessManagement.Forms.Master
+{
+    partial class FrmEvalScore
+    {
+        /// <summary>
+        /// 必要なデザイナ変数です。
+        /// </summary>
+        private System.ComponentModel.IContainer components = null;
+
+        /// <summary>
+        /// 使用中のリソースをすべてクリーンアップします。
+        /// </summary>
+        /// <param name="disposing">マネージ リソースが破棄される場合 true、破棄されない場合は false です。</param>
+        protected override void Dispose(bool disposing)
+        {
+            if (disposing && (components != null))
+            {
+                components.Dispose();
+            }
+            base.Dispose(disposing);
+        }
+
+        #region Windows フォーム デザイナで生成されたコード
+
+        /// <summary>
+        /// デザイナ サポートに必要なメソッドです。このメソッドの内容を
+        /// コード エディタで変更しないでください。
+        /// </summary>
+        private void InitializeComponent()
+        {
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle 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();
+            this.btnDataEntry = new System.Windows.Forms.Button();
+            this.btnEnd = new System.Windows.Forms.Button();
+            this.label1 = new System.Windows.Forms.Label();
+            this.btnHelp = new System.Windows.Forms.Button();
+            this.groupBoxEx3 = new ProcessManagement.Forms.CustomControls.GroupBoxEx();
+            this.label5 = new System.Windows.Forms.Label();
+            this.label4 = new System.Windows.Forms.Label();
+            this.textBox1 = new System.Windows.Forms.TextBox();
+            this.label2 = new System.Windows.Forms.Label();
+            this.groupBox1 = new ProcessManagement.Forms.CustomControls.GroupBoxEx();
+            this.groupBoxEx1 = new ProcessManagement.Forms.CustomControls.GroupBoxEx();
+            this.label3 = new System.Windows.Forms.Label();
+            this.cmbOrders = new System.Windows.Forms.ComboBox();
+            this.label12 = new System.Windows.Forms.Label();
+            this.cmbDivision = new System.Windows.Forms.ComboBox();
+            this.label6 = new System.Windows.Forms.Label();
+            this.numUDConstPro = new System.Windows.Forms.NumericUpDown();
+            this.label8 = new System.Windows.Forms.Label();
+            this.label11 = new System.Windows.Forms.Label();
+            this.label9 = new System.Windows.Forms.Label();
+            this.label10 = new System.Windows.Forms.Label();
+            this.groupBoxEx2 = new ProcessManagement.Forms.CustomControls.GroupBoxEx();
+            this.dataGridViewEX1 = new ProcessManagement.Forms.CustomControls.DataGridViewEX();
+            this.Column1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.Column2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.Column3 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.Column4 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.Column5 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.groupBoxEx3.SuspendLayout();
+            this.groupBox1.SuspendLayout();
+            this.groupBoxEx1.SuspendLayout();
+            ((System.ComponentModel.ISupportInitialize)(this.numUDConstPro)).BeginInit();
+            this.groupBoxEx2.SuspendLayout();
+            ((System.ComponentModel.ISupportInitialize)(this.dataGridViewEX1)).BeginInit();
+            this.SuspendLayout();
+            // 
+            // btnDataEntry
+            // 
+            this.btnDataEntry.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | 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(838, 650);
+            this.btnDataEntry.Name = "btnDataEntry";
+            this.btnDataEntry.Size = new System.Drawing.Size(120, 30);
+            this.btnDataEntry.TabIndex = 3;
+            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.Bottom | System.Windows.Forms.AnchorStyles.Right)));
+            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(1090, 650);
+            this.btnEnd.Name = "btnEnd";
+            this.btnEnd.Size = new System.Drawing.Size(120, 30);
+            this.btnEnd.TabIndex = 4;
+            this.btnEnd.Text = "終　了";
+            this.btnEnd.UseVisualStyleBackColor = false;
+            this.btnEnd.Click += new System.EventHandler(this.btnEnd_Click);
+            // 
+            // label1
+            // 
+            this.label1.Anchor = System.Windows.Forms.AnchorStyles.Top;
+            this.label1.BackColor = System.Drawing.Color.Khaki;
+            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(360, 10);
+            this.label1.Name = "label1";
+            this.label1.Size = new System.Drawing.Size(500, 20);
+            this.label1.TabIndex = 5;
+            this.label1.Text = "工 事 成 績 評 価 点 数 登 録";
+            this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
+            // 
+            // btnHelp
+            // 
+            this.btnHelp.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+            this.btnHelp.BackColor = System.Drawing.Color.Black;
+            this.btnHelp.Font = new System.Drawing.Font("MS UI Gothic", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
+            this.btnHelp.ForeColor = System.Drawing.Color.White;
+            this.btnHelp.Location = new System.Drawing.Point(1189, 0);
+            this.btnHelp.Name = "btnHelp";
+            this.btnHelp.Size = new System.Drawing.Size(30, 30);
+            this.btnHelp.TabIndex = 117;
+            this.btnHelp.TabStop = false;
+            this.btnHelp.Text = "？";
+            this.btnHelp.UseVisualStyleBackColor = false;
+            this.btnHelp.Click += new System.EventHandler(this.btnHelp_Click);
+            // 
+            // groupBoxEx3
+            // 
+            this.groupBoxEx3.Anchor = System.Windows.Forms.AnchorStyles.Bottom;
+            this.groupBoxEx3.BackColor = System.Drawing.Color.MintCream;
+            this.groupBoxEx3.BorderColor = System.Drawing.Color.Black;
+            this.groupBoxEx3.Controls.Add(this.label5);
+            this.groupBoxEx3.Controls.Add(this.label4);
+            this.groupBoxEx3.Controls.Add(this.textBox1);
+            this.groupBoxEx3.Controls.Add(this.label2);
+            this.groupBoxEx3.Font = new System.Drawing.Font("ＭＳ Ｐ明朝", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
+            this.groupBoxEx3.ForeColor = System.Drawing.Color.Black;
+            this.groupBoxEx3.Location = new System.Drawing.Point(10, 485);
+            this.groupBoxEx3.Name = "groupBoxEx3";
+            this.groupBoxEx3.Size = new System.Drawing.Size(1200, 150);
+            this.groupBoxEx3.TabIndex = 2;
+            this.groupBoxEx3.TabStop = false;
+            this.groupBoxEx3.Text = "対象工事";
+            // 
+            // label5
+            // 
+            this.label5.BackColor = System.Drawing.Color.Black;
+            this.label5.ForeColor = System.Drawing.Color.White;
+            this.label5.Location = new System.Drawing.Point(15, 116);
+            this.label5.Name = "label5";
+            this.label5.Size = new System.Drawing.Size(59, 15);
+            this.label5.TabIndex = 0;
+            this.label5.Visible = false;
+            // 
+            // label4
+            // 
+            this.label4.BackColor = System.Drawing.Color.White;
+            this.label4.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
+            this.label4.Font = new System.Drawing.Font("ＭＳ Ｐ明朝", 20.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
+            this.label4.Location = new System.Drawing.Point(465, 85);
+            this.label4.Name = "label4";
+            this.label4.Size = new System.Drawing.Size(130, 40);
+            this.label4.TabIndex = 0;
+            this.label4.Text = "評価点数";
+            this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
+            // 
+            // textBox1
+            // 
+            this.textBox1.Font = new System.Drawing.Font("Century", 27.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+            this.textBox1.Location = new System.Drawing.Point(615, 79);
+            this.textBox1.MaxLength = 5;
+            this.textBox1.Name = "textBox1";
+            this.textBox1.Size = new System.Drawing.Size(120, 52);
+            this.textBox1.TabIndex = 0;
+            this.textBox1.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
+            this.textBox1.Enter += new System.EventHandler(this.textBox1_Enter);
+            this.textBox1.Validated += new System.EventHandler(this.textBox1_Validated);
+            // 
+            // label2
+            // 
+            this.label2.BackColor = System.Drawing.Color.White;
+            this.label2.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
+            this.label2.Location = new System.Drawing.Point(40, 30);
+            this.label2.Name = "label2";
+            this.label2.Size = new System.Drawing.Size(1140, 30);
+            this.label2.TabIndex = 0;
+            this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
+            // 
+            // groupBox1
+            // 
+            this.groupBox1.Anchor = System.Windows.Forms.AnchorStyles.Top;
+            this.groupBox1.BackColor = System.Drawing.Color.MintCream;
+            this.groupBox1.BorderColor = System.Drawing.Color.White;
+            this.groupBox1.Controls.Add(this.groupBoxEx1);
+            this.groupBox1.ForeColor = System.Drawing.Color.White;
+            this.groupBox1.Location = new System.Drawing.Point(10, 40);
+            this.groupBox1.Name = "groupBox1";
+            this.groupBox1.Size = new System.Drawing.Size(1200, 55);
+            this.groupBox1.TabIndex = 0;
+            this.groupBox1.TabStop = false;
+            // 
+            // groupBoxEx1
+            // 
+            this.groupBoxEx1.BackColor = System.Drawing.Color.WhiteSmoke;
+            this.groupBoxEx1.BorderColor = System.Drawing.Color.Black;
+            this.groupBoxEx1.Controls.Add(this.label3);
+            this.groupBoxEx1.Controls.Add(this.cmbOrders);
+            this.groupBoxEx1.Controls.Add(this.label12);
+            this.groupBoxEx1.Controls.Add(this.cmbDivision);
+            this.groupBoxEx1.Controls.Add(this.label6);
+            this.groupBoxEx1.Controls.Add(this.numUDConstPro);
+            this.groupBoxEx1.Controls.Add(this.label8);
+            this.groupBoxEx1.Controls.Add(this.label11);
+            this.groupBoxEx1.Controls.Add(this.label9);
+            this.groupBoxEx1.Controls.Add(this.label10);
+            this.groupBoxEx1.Location = new System.Drawing.Point(10, 7);
+            this.groupBoxEx1.Name = "groupBoxEx1";
+            this.groupBoxEx1.Size = new System.Drawing.Size(1180, 44);
+            this.groupBoxEx1.TabIndex = 0;
+            this.groupBoxEx1.TabStop = false;
+            // 
+            // label3
+            // 
+            this.label3.BackColor = System.Drawing.Color.White;
+            this.label3.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
+            this.label3.ForeColor = System.Drawing.Color.Black;
+            this.label3.Location = new System.Drawing.Point(739, 9);
+            this.label3.Name = "label3";
+            this.label3.Size = new System.Drawing.Size(110, 27);
+            this.label3.TabIndex = 61;
+            this.label3.Text = "発注者名";
+            this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
+            // 
+            // cmbOrders
+            // 
+            this.cmbOrders.AutoCompleteCustomSource.AddRange(new string[] {
+            "株式会社",
+            "有限会社",
+            "合名会社",
+            "合資会社",
+            "合同会社"});
+            this.cmbOrders.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+            this.cmbOrders.DropDownWidth = 500;
+            this.cmbOrders.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
+            this.cmbOrders.Font = new System.Drawing.Font("ＭＳ 明朝", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
+            this.cmbOrders.FormattingEnabled = true;
+            this.cmbOrders.Location = new System.Drawing.Point(857, 9);
+            this.cmbOrders.Name = "cmbOrders";
+            this.cmbOrders.Size = new System.Drawing.Size(300, 27);
+            this.cmbOrders.TabIndex = 60;
+            this.cmbOrders.TabStop = false;
+            // 
+            // label12
+            // 
+            this.label12.BackColor = System.Drawing.Color.White;
+            this.label12.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
+            this.label12.ForeColor = System.Drawing.Color.Black;
+            this.label12.Location = new System.Drawing.Point(297, 9);
+            this.label12.Name = "label12";
+            this.label12.Size = new System.Drawing.Size(110, 27);
+            this.label12.TabIndex = 59;
+            this.label12.Text = "発注者区分";
+            this.label12.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
+            // 
+            // cmbDivision
+            // 
+            this.cmbDivision.AutoCompleteCustomSource.AddRange(new string[] {
+            "株式会社",
+            "有限会社",
+            "合名会社",
+            "合資会社",
+            "合同会社"});
+            this.cmbDivision.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+            this.cmbDivision.DropDownWidth = 500;
+            this.cmbDivision.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
+            this.cmbDivision.Font = new System.Drawing.Font("ＭＳ 明朝", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
+            this.cmbDivision.FormattingEnabled = true;
+            this.cmbDivision.Location = new System.Drawing.Point(415, 9);
+            this.cmbDivision.Name = "cmbDivision";
+            this.cmbDivision.Size = new System.Drawing.Size(300, 27);
+            this.cmbDivision.TabIndex = 0;
+            this.cmbDivision.TabStop = false;
+            // 
+            // label6
+            // 
+            this.label6.BackColor = System.Drawing.Color.White;
+            this.label6.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
+            this.label6.Font = new System.Drawing.Font("ＭＳ 明朝", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
+            this.label6.ForeColor = System.Drawing.Color.Black;
+            this.label6.Location = new System.Drawing.Point(23, 10);
+            this.label6.Name = "label6";
+            this.label6.Size = new System.Drawing.Size(120, 25);
+            this.label6.TabIndex = 57;
+            this.label6.Text = "営業期";
+            this.label6.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
+            // 
+            // numUDConstPro
+            // 
+            this.numUDConstPro.BackColor = System.Drawing.Color.White;
+            this.numUDConstPro.Font = new System.Drawing.Font("ＭＳ 明朝", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
+            this.numUDConstPro.ForeColor = System.Drawing.Color.Black;
+            this.numUDConstPro.Location = new System.Drawing.Point(176, 11);
+            this.numUDConstPro.Name = "numUDConstPro";
+            this.numUDConstPro.ReadOnly = true;
+            this.numUDConstPro.Size = new System.Drawing.Size(80, 23);
+            this.numUDConstPro.TabIndex = 0;
+            this.numUDConstPro.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
+            // 
+            // label8
+            // 
+            this.label8.AutoSize = true;
+            this.label8.Font = new System.Drawing.Font("ＭＳ 明朝", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
+            this.label8.ForeColor = System.Drawing.Color.Black;
+            this.label8.Location = new System.Drawing.Point(256, 14);
+            this.label8.Name = "label8";
+            this.label8.Size = new System.Drawing.Size(25, 16);
+            this.label8.TabIndex = 55;
+            this.label8.Text = "期";
+            this.label8.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
+            // 
+            // label11
+            // 
+            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(151, 14);
+            this.label11.Name = "label11";
+            this.label11.Size = new System.Drawing.Size(25, 16);
+            this.label11.TabIndex = 56;
+            this.label11.Text = "第";
+            this.label11.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
+            // 
+            // label9
+            // 
+            this.label9.Font = new System.Drawing.Font("ＭＳ 明朝", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
+            this.label9.ForeColor = System.Drawing.Color.Black;
+            this.label9.Location = new System.Drawing.Point(-307, 14);
+            this.label9.Name = "label9";
+            this.label9.Size = new System.Drawing.Size(25, 16);
+            this.label9.TabIndex = 49;
+            this.label9.Text = "第";
+            this.label9.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
+            // 
+            // label10
+            // 
+            this.label10.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(192)))));
+            this.label10.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
+            this.label10.Font = new System.Drawing.Font("ＭＳ 明朝", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
+            this.label10.ForeColor = System.Drawing.Color.Black;
+            this.label10.Location = new System.Drawing.Point(-161, 10);
+            this.label10.Name = "label10";
+            this.label10.Size = new System.Drawing.Size(120, 25);
+            this.label10.TabIndex = 47;
+            this.label10.Text = "部　　署";
+            this.label10.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
+            // 
+            // groupBoxEx2
+            // 
+            this.groupBoxEx2.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
+            | System.Windows.Forms.AnchorStyles.Left) 
+            | System.Windows.Forms.AnchorStyles.Right)));
+            this.groupBoxEx2.BackColor = System.Drawing.Color.MintCream;
+            this.groupBoxEx2.BorderColor = System.Drawing.Color.Black;
+            this.groupBoxEx2.Controls.Add(this.dataGridViewEX1);
+            this.groupBoxEx2.Font = new System.Drawing.Font("ＭＳ Ｐ明朝", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
+            this.groupBoxEx2.ForeColor = System.Drawing.Color.Black;
+            this.groupBoxEx2.Location = new System.Drawing.Point(10, 103);
+            this.groupBoxEx2.Name = "groupBoxEx2";
+            this.groupBoxEx2.Size = new System.Drawing.Size(1200, 374);
+            this.groupBoxEx2.TabIndex = 1;
+            this.groupBoxEx2.TabStop = false;
+            // 
+            // dataGridViewEX1
+            // 
+            this.dataGridViewEX1.AllowUserToAddRows = false;
+            this.dataGridViewEX1.AllowUserToDeleteRows = false;
+            this.dataGridViewEX1.AllowUserToResizeRows = false;
+            dataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(255)))), ((int)(((byte)(192)))));
+            this.dataGridViewEX1.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1;
+            this.dataGridViewEX1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
+            | System.Windows.Forms.AnchorStyles.Left) 
+            | System.Windows.Forms.AnchorStyles.Right)));
+            this.dataGridViewEX1.BackgroundColor = System.Drawing.Color.White;
+            this.dataGridViewEX1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
+            dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
+            dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Control;
+            dataGridViewCellStyle2.Font = new System.Drawing.Font("ＭＳ Ｐ明朝", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
+            dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.WindowText;
+            dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight;
+            dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
+            dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
+            this.dataGridViewEX1.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2;
+            this.dataGridViewEX1.ColumnHeadersHeight = 30;
+            this.dataGridViewEX1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing;
+            this.dataGridViewEX1.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
+            this.Column1,
+            this.Column2,
+            this.Column3,
+            this.Column4,
+            this.Column5});
+            this.dataGridViewEX1.EnableHeadersVisualStyles = false;
+            this.dataGridViewEX1.Location = new System.Drawing.Point(10, 10);
+            this.dataGridViewEX1.Name = "dataGridViewEX1";
+            this.dataGridViewEX1.RowHeadersVisible = false;
+            this.dataGridViewEX1.RowHeadersWidth = 20;
+            this.dataGridViewEX1.RowHeadersWidthSizeMode = System.Windows.Forms.DataGridViewRowHeadersWidthSizeMode.DisableResizing;
+            this.dataGridViewEX1.RowTemplate.Height = 20;
+            this.dataGridViewEX1.RowTemplate.Resizable = System.Windows.Forms.DataGridViewTriState.False;
+            this.dataGridViewEX1.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
+            this.dataGridViewEX1.Size = new System.Drawing.Size(1180, 352);
+            this.dataGridViewEX1.TabIndex = 0;
+            this.dataGridViewEX1.CellDoubleClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridViewEX1_CellDoubleClick);
+            // 
+            // Column1
+            // 
+            dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
+            this.Column1.DefaultCellStyle = dataGridViewCellStyle3;
+            this.Column1.Frozen = true;
+            this.Column1.HeaderText = "工事番号";
+            this.Column1.Name = "Column1";
+            this.Column1.ReadOnly = true;
+            this.Column1.Resizable = System.Windows.Forms.DataGridViewTriState.False;
+            this.Column1.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
+            this.Column1.Visible = false;
+            this.Column1.Width = 5;
+            // 
+            // Column2
+            // 
+            dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
+            dataGridViewCellStyle4.Font = new System.Drawing.Font("ＭＳ 明朝", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
+            dataGridViewCellStyle4.ForeColor = System.Drawing.Color.Black;
+            this.Column2.DefaultCellStyle = dataGridViewCellStyle4;
+            this.Column2.Frozen = true;
+            this.Column2.HeaderText = "№";
+            this.Column2.Name = "Column2";
+            this.Column2.ReadOnly = true;
+            this.Column2.Resizable = System.Windows.Forms.DataGridViewTriState.False;
+            this.Column2.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
+            this.Column2.Width = 80;
+            // 
+            // Column3
+            // 
+            dataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
+            dataGridViewCellStyle5.Font = new System.Drawing.Font("ＭＳ 明朝", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
+            dataGridViewCellStyle5.ForeColor = System.Drawing.Color.Black;
+            this.Column3.DefaultCellStyle = dataGridViewCellStyle5;
+            this.Column3.HeaderText = "工　　事　　名　　称";
+            this.Column3.Name = "Column3";
+            this.Column3.ReadOnly = true;
+            this.Column3.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
+            this.Column3.Width = 740;
+            // 
+            // Column4
+            // 
+            dataGridViewCellStyle6.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
+            dataGridViewCellStyle6.ForeColor = System.Drawing.Color.Black;
+            this.Column4.DefaultCellStyle = dataGridViewCellStyle6;
+            this.Column4.HeaderText = "工事担当者";
+            this.Column4.Name = "Column4";
+            this.Column4.ReadOnly = true;
+            this.Column4.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
+            this.Column4.Width = 200;
+            // 
+            // Column5
+            // 
+            dataGridViewCellStyle7.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
+            dataGridViewCellStyle7.Font = new System.Drawing.Font("Century", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+            dataGridViewCellStyle7.ForeColor = System.Drawing.Color.Black;
+            this.Column5.DefaultCellStyle = dataGridViewCellStyle7;
+            this.Column5.HeaderText = "評価点";
+            this.Column5.Name = "Column5";
+            this.Column5.ReadOnly = true;
+            this.Column5.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
+            this.Column5.Width = 140;
+            // 
+            // FrmEvalScore
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
+            this.AutoSize = true;
+            this.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
+            this.BackColor = System.Drawing.Color.Black;
+            this.ClientSize = new System.Drawing.Size(1220, 691);
+            this.Controls.Add(this.groupBoxEx3);
+            this.Controls.Add(this.groupBox1);
+            this.Controls.Add(this.groupBoxEx2);
+            this.Controls.Add(this.btnHelp);
+            this.Controls.Add(this.label1);
+            this.Controls.Add(this.btnDataEntry);
+            this.Controls.Add(this.btnEnd);
+            this.Font = new System.Drawing.Font("ＭＳ 明朝", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
+            this.ForeColor = System.Drawing.Color.White;
+            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Fixed3D;
+            this.KeyPreview = true;
+            this.MaximizeBox = false;
+            this.MinimizeBox = false;
+            this.Name = "FrmEvalScore";
+            this.ShowIcon = false;
+            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
+            this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.FrmEvalScore_FormClosing);
+            this.Load += new System.EventHandler(this.FrmEvalScore_Load);
+            this.Shown += new System.EventHandler(this.FrmEvalScore_Shown);
+            this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.FrmEvalScore_KeyDown);
+            this.groupBoxEx3.ResumeLayout(false);
+            this.groupBoxEx3.PerformLayout();
+            this.groupBox1.ResumeLayout(false);
+            this.groupBoxEx1.ResumeLayout(false);
+            this.groupBoxEx1.PerformLayout();
+            ((System.ComponentModel.ISupportInitialize)(this.numUDConstPro)).EndInit();
+            this.groupBoxEx2.ResumeLayout(false);
+            ((System.ComponentModel.ISupportInitialize)(this.dataGridViewEX1)).EndInit();
+            this.ResumeLayout(false);
+
+        }
+
+        #endregion
+
+        private System.Windows.Forms.Button btnDataEntry;
+        private System.Windows.Forms.Button btnEnd;
+        private System.Windows.Forms.Label label1;
+        private System.Windows.Forms.Button btnHelp;
+        private CustomControls.GroupBoxEx groupBoxEx2;
+        private CustomControls.DataGridViewEX dataGridViewEX1;
+        private CustomControls.GroupBoxEx groupBox1;
+        private CustomControls.GroupBoxEx groupBoxEx1;
+        private System.Windows.Forms.Label label9;
+        private System.Windows.Forms.Label label10;
+        private System.Windows.Forms.Label label6;
+        private System.Windows.Forms.NumericUpDown numUDConstPro;
+        private System.Windows.Forms.Label label8;
+        private System.Windows.Forms.Label label11;
+        private CustomControls.GroupBoxEx groupBoxEx3;
+        private System.Windows.Forms.Label label4;
+        private System.Windows.Forms.TextBox textBox1;
+        private System.Windows.Forms.Label label2;
+        private System.Windows.Forms.Label label12;
+        private System.Windows.Forms.ComboBox cmbDivision;
+        private System.Windows.Forms.Label label3;
+        private System.Windows.Forms.ComboBox cmbOrders;
+        private System.Windows.Forms.Label label5;
+        private System.Windows.Forms.DataGridViewTextBoxColumn Column1;
+        private System.Windows.Forms.DataGridViewTextBoxColumn Column2;
+        private System.Windows.Forms.DataGridViewTextBoxColumn Column3;
+        private System.Windows.Forms.DataGridViewTextBoxColumn Column4;
+        private System.Windows.Forms.DataGridViewTextBoxColumn Column5;
+    }
+}
\ No newline at end of file
Index: trunk/src/ProcessManagement/ProcessManagement/Forms/Master/EvalScore/FrmEvalScore.resx
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/Forms/Master/EvalScore/FrmEvalScore.resx	(nonexistent)
+++ trunk/src/ProcessManagement/ProcessManagement/Forms/Master/EvalScore/FrmEvalScore.resx	(revision 484)
@@ -0,0 +1,135 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <metadata name="Column1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="Column2.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="Column3.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="Column4.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="Column5.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+</root>
\ No newline at end of file
Index: trunk/src/ProcessManagement/ProcessManagement/Forms/Master/EvalScore/FrmEvalScoreAux.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/Forms/Master/EvalScore/FrmEvalScoreAux.cs	(nonexistent)
+++ trunk/src/ProcessManagement/ProcessManagement/Forms/Master/EvalScore/FrmEvalScoreAux.cs	(revision 484)
@@ -0,0 +1,727 @@
+﻿using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Windows.Forms;
+using System.Collections;
+using System.Diagnostics;
+using System.Threading;
+
+using log4net;
+using log4net.Appender;
+using log4net.Repository.Hierarchy;
+
+using ProcessManagement.Common;
+using ProcessManagement.DB.IOAccess;
+using ProcessManagement.DataModel;
+using ProcessManagement.DB.Core;
+using ProcessManagement.Forms.DataEntry;
+using ProcessManagement.Forms.SubForms;
+using ProcessManagement.Forms.CustomControls;
+using ProcessManagement.Forms.ControlsAction;
+
+namespace ProcessManagement.Forms.Master
+{
+    partial class FrmEvalScore
+    {
+
+        #region フォームロード時の処理
+        private bool bNotCtrlFlg = true;
+        /// <summary>
+        /// フォームロード時の処理
+        /// </summary>
+        private void InitFormLoad()
+        {
+            try
+            {
+                bNotCtrlFlg = true;
+
+                // コンボボックスセット
+                SetInitnumUDConstPro();
+                SetcmbDivision();
+                SetcmbOrders();
+
+                // グリッド表示
+                DspGridData();
+
+                bNotCtrlFlg = false;
+
+                // 参照時はデータ変更させない
+                if (m_EditLock)
+                {
+                    ExecReadOnly();
+                }
+
+                // コントロールイベント制御処理
+                SetControlEvent(true);
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("システムエラー：{0}：{1}", CommonMotions.GetMethodName(), ex.Message);
+            }
+        }
+        #endregion
+
+        #region 参照時ロック処理
+        /// <summary>
+        /// 参照時ロック処理
+        /// </summary>
+        private void ExecReadOnly()
+        {
+            try
+            {
+                textBox1.Enabled = false;
+                btnDataEntry.Visible = false;
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("システムエラー：{0}：{1}", CommonMotions.GetMethodName(), ex.Message);
+            }
+        }
+        #endregion
+
+        #region コントロールイベント制御処理
+        /// <summary>
+        /// コントロールイベント制御処理
+        /// </summary>
+        private void SetControlEvent(bool bCtrl)
+        {
+            try
+            {
+                if (bNotCtrlFlg) return;
+
+                if (bCtrl)
+                {
+                    numUDConstPro.ValueChanged += new EventHandler(numUDConstPro_ValueChanged);
+                    cmbDivision.TextChanged += new EventHandler(cmbDivision_TextChanged);
+                    cmbOrders.TextChanged += new EventHandler(cmbConstructionPerson_TextChanged);
+                }
+                else
+                {
+                    numUDConstPro.ValueChanged -= new EventHandler(numUDConstPro_ValueChanged);
+                    cmbDivision.TextChanged -= new EventHandler(cmbDivision_TextChanged);
+                    cmbOrders.TextChanged -= new EventHandler(cmbConstructionPerson_TextChanged);
+                }
+
+                numUDConstPro.Enabled = bCtrl;
+                cmbDivision.Enabled = bCtrl;
+                cmbOrders.Enabled = bCtrl;
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("システムエラー：{0}：{1}", CommonMotions.GetMethodName(), ex.Message);
+            }
+        }
+        #endregion
+
+        #region 対象年度初期セット
+        /// <summary>
+        /// 対象年度初期セット
+        /// </summary>
+        private void SetInitnumUDConstPro()
+        {
+            try
+            {
+                // 検索年度セット
+                // データにある事業期と現在の事業セット
+                int minval = 0;
+                int maxval = 0;
+                CommonMotions.GetPeriodYearMinMax(ref minval, ref maxval);
+
+                numUDConstPro.Minimum = minval;
+                numUDConstPro.Maximum = maxval;
+                numUDConstPro.Value = CommonMotions.GetPeriodYear();
+
+                CommonMotions.SetSerchTitle(label6, label11, numUDConstPro, label8);
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("システムエラー：{0}：{1}", CommonMotions.GetMethodName(), ex.Message);
+            }
+        }
+        #endregion
+
+        #region 発注者区分コンボボックスセット
+        /// <summary>
+        /// 発注者区分コンボボックスセット
+        /// </summary>
+        private void SetcmbDivision()
+        {
+            IOMDivision dvDB = new IOMDivision();
+            try
+            {
+                int nBeforeCode = CommonMotions.cnvInt(cmbDivision.SelectedValue);
+
+                // ValueからKeyを検索
+                int nDivisionCode = (int)DivisionMaster.DivisionMasterCodeDef.OrderDivision;
+                StringBuilder strSQL = new StringBuilder();
+                strSQL.Append("Select");
+                strSQL.AppendFormat(" {0}", IOMDivision.CreateFieldNameList("A."));
+                strSQL.Append(" From divisionmaster As A");
+                strSQL.Append("      Inner Join constructionbaseinfo As B");
+                strSQL.Append("            On B.OrderersDivision = A.NameCode");
+                if (CommonMotions.BasePeriodYear())
+                    strSQL.AppendFormat("  And B.ConstructionPeriod = {0}", numUDConstPro.Value);
+                else
+                    strSQL.AppendFormat("  And B.ConstructionYear = {0}", numUDConstPro.Value);
+
+                strSQL.Append("      Inner Join constructiontypemaster As C");
+                strSQL.Append("            On C.TypeCode = B.ConstructionType");
+                strSQL.AppendFormat("      And C.PublicFlg = {0}", (int)ConstructionTypeMaster.PublicFlgDef.Community);
+                strSQL.AppendFormat(" Where A.DivisionCode = {0}", nDivisionCode);
+                strSQL.AppendFormat(" And A.DeleteFlg = {0}", (int)CommonDefine.DataDeleteDef.Exists);
+                strSQL.Append("       Group By A.NameCode");
+                strSQL.Append("       Order by A.DisplayOrder");
+
+                ArrayList bvList = new ArrayList();
+                if (!dvDB.ExecuteReader(strSQL.ToString(), ref bvList)) return;
+                if (bvList.Count < 1) return;
+
+                List<KeyValuePair<int, string>> DataList = new List<KeyValuePair<int, string>>();
+                DataList.Add(new KeyValuePair<int, string>(0, ""));
+
+                // データ表示
+                DivisionMaster master = new DivisionMaster();
+                foreach(object[] ObjRec in bvList)
+                {
+                    dvDB.Reader2Struct(ObjRec, ref master);
+
+                    KeyValuePair<int, string> keyval = new KeyValuePair<int, string>(master.NameCode, master.NameString);
+
+                    DataList.Add(keyval);
+                }
+
+                cmbDivision.DataSource = null;
+                cmbDivision.Items.Clear();
+                cmbDivision.Text = "";
+
+                // コンボボックス初期表示
+                ComboBoxAction.InitDataSetCombBox(cmbDivision, DataList);
+
+                cmbDivision.SelectedValue = nBeforeCode;
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("システムエラー：{0}：{1}", CommonMotions.GetMethodName(), ex.Message);
+            }
+            finally
+            {
+                dvDB.close(); dvDB = null;
+            }
+        }
+        #endregion
+
+        #region 発注者コンボボックスをセットする
+        /// <summary>
+        /// 発注者者コンボボックスへ文字をセットする
+        /// </summary>
+        private void SetcmbOrders()
+        {
+            // 発注者クラス
+            IOMOrderers orDB = new IOMOrderers();
+            try
+            {
+                int nBeforeCode = CommonMotions.cnvInt(cmbOrders.SelectedValue);
+                int nDivisionCode = CommonMotions.cnvInt(cmbDivision.SelectedValue);
+
+                // 発注者取得SQL
+                StringBuilder strSQL = new StringBuilder();
+                strSQL.Append("Select");
+                strSQL.AppendFormat(" {0}", IOMOrderers.CreateFieldNameList("A."));
+                strSQL.Append(" From orderersmaster As A");
+                strSQL.Append("      Inner Join constructionbaseinfo As B");
+                strSQL.Append("            On B.OrderersDivision = A.OrderCotegory");
+                strSQL.Append("            And B.OrderersCode = A.OrderersCode");
+                if (CommonMotions.BasePeriodYear())
+                    strSQL.AppendFormat("  And B.ConstructionPeriod = {0}", numUDConstPro.Value);
+                else
+                    strSQL.AppendFormat("  And B.ConstructionYear = {0}", numUDConstPro.Value);
+
+                strSQL.Append("      Inner Join constructiontypemaster As C");
+                strSQL.Append("            On C.TypeCode = B.ConstructionType");
+                strSQL.AppendFormat("      And C.PublicFlg = {0}", (int)ConstructionTypeMaster.PublicFlgDef.Community);
+                strSQL.AppendFormat(" Where A.OrderCotegory = {0}", nDivisionCode);
+                strSQL.AppendFormat(" And A.DeleteFlg = {0}", (int)CommonDefine.DataDeleteDef.Exists);
+                strSQL.Append("       Group By A.OrderersCode");
+                strSQL.Append("       Order by A.DisplayOrder");
+
+                // 作業名称取得
+                ArrayList wrk = new ArrayList();
+                if (!orDB.ExecuteReader(strSQL.ToString(), ref wrk)) return;
+                if (wrk.Count < 1) return;
+
+                List<KeyValuePair<int, string>> DataList = new List<KeyValuePair<int, string>>();
+                OrderersMaster master = new OrderersMaster();
+                DataList.Add(new KeyValuePair<int, string>(0, ""));
+             
+                // データ表示
+                foreach (object[] ObjRec in wrk)
+                {
+                    orDB.Reader2Struct(ObjRec, ref master);
+
+                    // 発注者名を法人格を含めて連結する
+                    string wrkDisp = CommonMotions.OrderersNameUnion(master);
+
+                    KeyValuePair<int, string> keyval = new KeyValuePair<int, string>(master.OrderersCode, wrkDisp);
+
+                    DataList.Add(keyval);
+                }
+
+                cmbOrders.DataSource = null;
+                cmbOrders.Items.Clear();
+                cmbOrders.Text = "";
+
+                // コンボボックス初期表示
+                ComboBoxAction.InitDataSetCombBox(cmbOrders, DataList);
+
+                cmbOrders.SelectedValue = nBeforeCode;
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("システムエラー：{0}：{1}", CommonMotions.GetMethodName(), ex.Message);
+            }
+            finally
+            {
+                orDB.close(); orDB = null;
+            }
+        }
+        #endregion
+
+        #region 発注者区分コンボより発注者区分コードを取得する
+        /// <summary>
+        /// 発注者区分コンボより担当者コードを取得する
+        /// </summary>
+        /// <returns></returns>
+        private int GetDivisionCode()
+        {
+            try
+            {
+                return CommonMotions.cnvInt(cmbDivision.SelectedValue);
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("システムエラー：{0}", ex.Message);
+                return 0;
+            }
+        }
+        #endregion
+
+        #region 発注者コンボより発注者者コードを取得する
+        /// <summary>
+        /// 発注者コンボより担当者コードを取得する
+        /// </summary>
+        /// <returns></returns>
+        private int GetOrdersCode()
+        {
+            try
+            {
+                return CommonMotions.cnvInt(cmbOrders.SelectedValue);
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("システムエラー：{0}", ex.Message);
+                return 0;
+            }
+        }
+        #endregion
+
+        #region グリッドデータ表示
+        /// <summary>
+        /// グリッドデータ表示
+        /// </summary>
+        private void DspGridData()
+        {
+            IOAllFreeSQL FreeDB = new IOAllFreeSQL();
+            try
+            {
+                // 入力フィールドクリア
+                ClearFeild();
+
+                ArrayList BaseList = new ArrayList();
+                // 表示データをＤＢより取得する
+                GetDisplayData(ref BaseList);
+
+                // データをグリッドへセットする
+                SetGridData(BaseList);
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("システムエラー：{0}：{1}", CommonMotions.GetMethodName(), ex.Message);
+            }
+            finally
+            {
+                FreeDB.close(); FreeDB = null;
+            }
+        }
+        #endregion
+
+        #region 入力フィールドクリア
+        /// <summary>
+        /// 入力フィールドクリア
+        /// </summary>
+        private void ClearFeild()
+        {
+            try
+            {
+                label2.Text = string.Empty;
+                textBox1.Text = string.Empty;
+                label5.Text = string.Empty;
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("システムエラー：{0}：{1}", CommonMotions.GetMethodName(), ex.Message);
+            }
+        }
+        #endregion
+
+        #region 表示データをＤＢより取得する
+        /// <summary>
+        /// 表示データをＤＢより取得する
+        /// </summary>
+        private void GetDisplayData(ref ArrayList BaseList)
+        {
+            IOAllFreeSQL FreeDB = new IOAllFreeSQL();
+            try
+            {
+                // ----- 検索条件作成
+                StringBuilder strSQL = new StringBuilder();
+                strSQL.Append("Select");
+                strSQL.Append(" A.ConstructionCode");
+                strSQL.Append(", B.DetailString");
+                strSQL.Append(", C.PersonName");
+                strSQL.Append(", A.EvaluationScore");
+
+                strSQL.Append("  From constructionbaseinfo As A");
+
+                strSQL.Append("  Inner Join constructionbaseinfodetail As B");
+                strSQL.Append("        On B.ConstructionCode = A.ConstructionCode");
+                strSQL.AppendFormat("  And B.DetailNo = {0}", (int)ConstructionBaseInfoDetail.DataNoDef.ConstructionName);
+
+                strSQL.Append("  Inner Join personinchargemaster As C");
+                strSQL.Append("        On C.PersonCode = A.ConstructionPersonCode");
+
+                strSQL.Append("  Inner Join constructiontypemaster As D");
+                strSQL.Append("        On D.TypeCode = A.ConstructionType");
+                strSQL.AppendFormat("  And D.PublicFlg = {0}", (int)ConstructionTypeMaster.PublicFlgDef.Community);
+
+                strSQL.Append(" Where ");
+                if (CommonMotions.BasePeriodYear())
+                    strSQL.AppendFormat(" A.ConstructionPeriod = {0}", numUDConstPro.Value);
+                else
+                    strSQL.AppendFormat(" A.ConstructionYear = {0}", numUDConstPro.Value);
+
+                // 増減工事の子工事は対象外
+                strSQL.Append(" And");
+                strSQL.AppendFormat(" A.TyingFlg != {0}", (int)ConstructionBaseInfo.TyingFlgDef.Tying);
+
+                // 非受注以外
+                int iStatus = CommonDefine.ProjectsStatus.First(x => x.Value.Equals("非 受 注")).Key;
+                strSQL.Append(" And");
+                strSQL.AppendFormat(" A.ConstructionStatusFlg != {0}", iStatus);
+
+                // 発注者区分が選択されている場合
+                strSQL.Append(GetDivisionString());
+
+                // 発注者が選択されている場合
+                strSQL.Append(GetOrdersString());
+
+                strSQL.Append(" Group By A.ConstructionCode");
+                strSQL.Append(" Order By A.ConstructionCompletionDate Desc");
+
+                BaseList.Clear();
+                if (!FreeDB.ExecuteReader(strSQL.ToString(), ref BaseList)) return;
+                if (BaseList.Count < 1) return;
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("システムエラー：{0}：{1}", CommonMotions.GetMethodName(), ex.Message);
+            }
+            finally
+            {
+                FreeDB.close(); FreeDB = null;
+            }
+        }
+        #endregion
+
+        #region 発注者区分が選択されている場合
+        /// <summary>
+        /// 発注者が選択されている場合
+        /// </summary>
+        /// <returns></returns>
+        private string GetDivisionString()
+        {
+            try
+            {
+                StringBuilder strRet = new StringBuilder();
+
+                // 発注者区分の選択
+                int DivisionCode = GetDivisionCode();
+                if (DivisionCode < 1) return strRet.ToString();
+
+                strRet.AppendFormat(" AND A.OrderersDivision = {0}", DivisionCode);
+
+                return strRet.ToString();
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("システムエラー：{0}：{1}", CommonMotions.GetMethodName(), ex.Message);
+                return string.Empty;
+            }
+        }
+        #endregion
+
+        #region 発注者が選択されている場合
+        /// <summary>
+        /// 発注者が選択されている場合
+        /// </summary>
+        /// <returns></returns>
+        private string GetOrdersString()
+        {
+            try
+            {
+                StringBuilder strRet = new StringBuilder();
+
+                // 発注者が選択されている場合
+                int OrdersCode = GetOrdersCode();
+                if (OrdersCode < 1) return strRet.ToString();
+
+                strRet.AppendFormat(" AND A.OrderersCode = {0}", OrdersCode);
+
+                return strRet.ToString();
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("システムエラー：{0}：{1}", CommonMotions.GetMethodName(), ex.Message);
+                return string.Empty;
+            }
+        }
+        #endregion
+
+        #region データをグリッドへセットする
+        /// <summary>
+        /// データをグリッドへセットする
+        /// </summary>
+        private void SetGridData(ArrayList BaseList)
+        {
+            try
+            {
+                DataGridView dgv = dataGridViewEX1;
+                DataGridViewRow[] DataRow = new DataGridViewRow[BaseList.Count];
+
+                int nRowPosition = dgv.FirstDisplayedScrollingRowIndex;
+
+                int iy = 0;
+                foreach (object[] CurRec in BaseList)
+                {
+                    DataGridViewRow GridRow = new DataGridViewRow();
+                    GridRow.CreateCells(dgv);
+
+                    GridRow.Cells[(int)GridColumn.ConstrCode].Value = CurRec[0];
+                    GridRow.Cells[(int)GridColumn.No].Value = ++iy;
+                    GridRow.Cells[(int)GridColumn.ConstrName].Value = CurRec[1];
+                    GridRow.Cells[(int)GridColumn.PersonName].Value = CurRec[2];
+                    decimal decVal = CommonMotions.cnvDecimal(CurRec[3]);
+                    if (decVal != 0)
+                    {
+                        GridRow.Cells[(int)GridColumn.Score].Value = CommonMotions.cnvDecimal(CurRec[3]).ToString("0.00");
+                    }
+                    else
+                    {
+                        GridRow.Cells[(int)GridColumn.Score].Value = string.Empty;
+                    }
+
+                    DataRow[(iy - 1)] = GridRow;
+                }
+
+                dgv.Rows.Clear();
+                dgv.Rows.AddRange(DataRow);
+
+                if (nRowPosition > 0) dgv.FirstDisplayedScrollingRowIndex = nRowPosition;
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("システムエラー：{0}：{1}", CommonMotions.GetMethodName(), ex.Message);
+            }
+        }
+        #endregion
+
+        #region グリッド選択データセット
+        /// <summary>
+        /// グリッド選択データセット
+        /// </summary>
+        private void SetSelectData()
+        {
+            try
+            {
+                DataGridView dgv = dataGridViewEX1;
+                DataGridViewRow SelRow = dgv.CurrentRow;
+
+                label5.Text = CommonMotions.cnvInt(SelRow.Cells[(int)GridColumn.ConstrCode].Value).ToString();
+                label2.Text = CommonMotions.cnvString(SelRow.Cells[(int)GridColumn.ConstrName].Value);
+                textBox1.Text = CommonMotions.cnvDecimal(SelRow.Cells[(int)GridColumn.Score].Value).ToString("0.00");
+                textBox1.Focus();
+                textBox1.SelectAll();
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("システムエラー：{0}：{1}", CommonMotions.GetMethodName(), ex.Message);
+            }
+        }
+        #endregion
+
+        #region データ登録処理
+        /// <summary>
+        /// データ登録処理
+        /// </summary>
+        /// <returns></returns>
+        private bool DataEntryProcess()
+        {
+            IOConstructionBaseInfo BaseDB = new IOConstructionBaseInfo();
+            try
+            {
+                //データチェック
+                if (!DispFeildCheck()) return false;
+
+                if (MessageBox.Show("表示中のデータを登録します。", "登録確認"
+                    , MessageBoxButtons.YesNo, MessageBoxIcon.Information) != DialogResult.Yes) return false;
+
+
+                int nConstrCode = CommonMotions.cnvInt(label5.Text);
+                decimal nScore = CommonMotions.cnvDecimal(textBox1.Text);
+
+                StringBuilder strSQL = new StringBuilder();
+
+                strSQL.Append("Update constructionbaseinfo As A");
+                strSQL.AppendFormat(" Set EvaluationScore = {0}", nScore);
+                strSQL.AppendFormat(" Where A.ConstructionCode = {0}", nConstrCode);
+                strSQL.Append("       Or A.ConstructionCode in (Select B.FluctuationCode From constructionlink As B");
+                strSQL.AppendFormat("                           Where B.ConstructionCode = {0})", nConstrCode);
+
+                if(!BaseDB.ExecuteNonQuery(strSQL.ToString()))
+                {
+                    MessageBox.Show("工事情報更新に失敗しました。"
+                                        , "更新エラー"
+                                        , MessageBoxButtons.OK
+                                        , MessageBoxIcon.Information);
+                    return false;
+                }
+
+                // 入力フィールドクリア
+                ClearFeild();
+
+                return true;
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("システムエラー：{0}：{1}", CommonMotions.GetMethodName(), ex.Message);
+                return false;
+            }
+            finally
+            {
+                BaseDB.close(); BaseDB = null;
+            }
+        }
+        #endregion
+
+        #region データチェック
+        /// <summary>
+        /// データチェック
+        /// </summary>
+        /// <returns></returns>
+        private bool DispFeildCheck()
+        {
+            try
+            {
+                bool bRet = true;
+                string[] ErrMsg = new string[2];
+                decimal decVal = CommonMotions.cnvDecimal(textBox1.Text);
+
+                if (label5.Text.Length < 1)
+                {
+                    // 選択チェック
+                    ErrMsg[0] = "工事が選択されていません。";
+                    ErrMsg[1] = "選択エラー";
+                    bRet = false;
+                }
+                else if (!CommonMotions.chkNumeric(textBox1.Text))
+                {
+                    // 数字チェック
+                    ErrMsg[0] = "評価点が正しく入力されていません。";
+                    ErrMsg[1] = "入力エラー";
+                    bRet = false;
+                }
+                else if (decVal < 0 || 100 < decVal)
+                {
+                    // 範囲チェック
+                    ErrMsg[0] = "評価点は０～１００の範囲で入力してください。";
+                    ErrMsg[1] = "入力エラー";
+                    bRet = false;
+                }
+
+                if (!bRet)
+                {
+                    MessageBox.Show(ErrMsg[0]
+                                        , ErrMsg[1]
+                                        , MessageBoxButtons.OK
+                                        , MessageBoxIcon.Information);
+                }
+
+                return bRet;
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("システムエラー：{0}：{1}", CommonMotions.GetMethodName(), ex.Message);
+                return false;
+            }
+        }
+        #endregion
+
+        #region 入力後処理
+        /// <summary>
+        /// 入力後処理
+        /// </summary>
+        private void ValidatedProc()
+        {
+            try
+            {
+                bool bRet = true;
+                string[] ErrMsg = new string[2];
+                decimal decVal = CommonMotions.cnvDecimal(textBox1.Text);
+
+                if (!CommonMotions.chkNumeric(textBox1.Text))
+                {
+                    // 数字チェック
+                    ErrMsg[0] = "評価点が正しく入力されていません。";
+                    ErrMsg[1] = "入力エラー";
+                    bRet = false;
+                }
+                else if (decVal < 0 || 100 < decVal)
+                {
+                    // 範囲チェック
+                    ErrMsg[0] = "評価点は０～１００の範囲で入力してください。";
+                    ErrMsg[1] = "入力エラー";
+                    bRet = false;
+                }
+
+                if (!bRet)
+                {
+                    MessageBox.Show(ErrMsg[0]
+                                        , ErrMsg[1]
+                                        , MessageBoxButtons.OK
+                                        , MessageBoxIcon.Information);
+                    return;
+                }
+
+                textBox1.Text = decVal.ToString("0.00");
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("システムエラー：{0}：{1}", CommonMotions.GetMethodName(), ex.Message);
+            }
+        }
+        #endregion
+    }
+}
Index: trunk/src/ProcessManagement/ProcessManagement/Forms/Master/Orderer/FrmOrderers.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/Forms/Master/Orderer/FrmOrderers.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/Forms/Master/Orderer/FrmOrderers.cs	(revision 484)
@@ -54,13 +54,18 @@
         /// 備考
         /// </summary>
         private const int s_NoteLength = 300;
+        /// <summary>
+        /// 50音読み
+        /// </summary>
+        private const int s_JapaneseSyllabaryLength = 2;
 
         /// <summary>
         /// 表示順番
         /// </summary>
-        private enum DispListColumn
+        private enum DispGridCol
         {
             DISPLAY_ORDER = 0,
+            ORDERERS_DIVISION,
             ORDERERS_CODE,
             ORDERERS_NAME,
         }
@@ -88,6 +93,7 @@
             MailAddress,
             EntryPerson,
             EntryDate,
+            JapaneseSyllabary,
         }
         #endregion
 
@@ -273,13 +279,15 @@
             SetcmbCorporateStatusCombBox();
             // 発注者区分コンボボックスセット
             SetcmbDivisionCombBox();
-            
-            // 初期表示
-            // DispGridData();
+            // 50音順セット
+            SetcmbcmbJapaneseSyllabary();
 
             // クリア
             ClearDisplay();
 
+            // 初期表示
+            DispGridData();
+
             // 参照時はデータ変更させない
             if (m_EditLock)
             {
@@ -335,6 +343,9 @@
                 // 表示行退避
                 int iIndex = dgvMaster.FirstDisplayedScrollingRowIndex;
 
+                // 50音順セット
+                SetcmbcmbJapaneseSyllabary();
+
                 // データ一覧再表示
                 DispGridData();
 
@@ -452,11 +463,15 @@
                     return;
                 }
             }
-            if (dgvMaster.Rows.Count < 1) return;
-            if (dgvMaster.CurrentRow.Index < 0) return;
+
+            DataGridView dgv = dgvMaster;
+            DataGridViewRow CurRow = dgv.CurrentRow;
+
+            if (dgvMaster.RowCount < 1) return;
+            if (CurRow.Index < 0) return;
             // 空白行は処理しない
-            if (CommonMotions.chkObjectIsNull(dgvMaster.CurrentRow.Cells[(int)DispListColumn.ORDERERS_CODE].Value) ||
-                CommonMotions.cnvString(dgvMaster.CurrentRow.Cells[(int)DispListColumn.ORDERERS_CODE].Value).Length == 0)
+            if (CommonMotions.chkObjectIsNull(CurRow.Cells[(int)DispGridCol.ORDERERS_CODE].Value) ||
+                CommonMotions.cnvString(CurRow.Cells[(int)DispGridCol.ORDERERS_CODE].Value).Length == 0)
             {
                 // クリア
                 ClearDisplay();
@@ -463,7 +478,8 @@
                 return;
             }
 
-            m_OrderersCode = CommonMotions.cnvInt(dgvMaster.CurrentRow.Cells[(int)DispListColumn.ORDERERS_CODE].Value);
+            m_DivisionCode = CommonMotions.cnvInt(CurRow.Cells[(int)DispGridCol.ORDERERS_DIVISION].Value);
+            m_OrderersCode = CommonMotions.cnvInt(CurRow.Cells[(int)DispGridCol.ORDERERS_CODE].Value);
 
             // クリア
             ClearDisplay();
@@ -498,19 +514,32 @@
         /// </summary>
         /// <param name="sender"></param>
         /// <param name="e"></param>
-        private void dgvMaster_CellClick(object sender, DataGridViewCellEventArgs e)
+        private void dgvMaster_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
         {
-            
-            DataGridViewEX dgv =(DataGridViewEX)sender;
+            try
+            {
+                DataGridViewEX dgv = (DataGridViewEX)sender;
+                DataGridViewRow CurRow = dgv.CurrentRow;
 
-            if (CommonMotions.chkCellBlank(dgv.CurrentRow.Cells[(int)DispListColumn.ORDERERS_CODE].Value)) return;
+                int nGridList = (int)DispGridCol.ORDERERS_CODE;
+                if (CommonMotions.chkCellBlank(CurRow.Cells[nGridList].Value)) return;
 
-            // 現在表示データが選択データと同じならば処理しない
-            if (m_dispControl[(int)DispCtrl.OrderersCode].Text.Equals(CommonMotions.cnvString(dgv.CurrentRow.Cells[(int)DispListColumn.ORDERERS_CODE].Value)))
-                return;
+                // 現在表示データが選択データと同じならば処理しない
+                int nCtrlPoint = (int)DispCtrl.OrderersCode;
+                if (m_dispControl[nCtrlPoint].Text.Equals(CommonMotions.cnvString(CurRow.Cells[nGridList].Value)))
+                    return;
 
-            // 行選択時処理
-            DataSelectRow();
+                // 選択行の発注者区分をコンボへセットする
+                int nDivision = CommonMotions.cnvInt(CurRow.Cells[(int)DispGridCol.ORDERERS_DIVISION].Value);
+                cmbDivision.SelectedValue = nDivision;
+
+                // 行選択時処理
+                DataSelectRow();
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("システムエラー：{0}：{1}", CommonMotions.GetMethodName(), ex.Message);
+            }
         }
         #endregion
 
@@ -661,7 +690,7 @@
         private void btnDispUp_Click(object sender, EventArgs e)
         {
             // グリッドアップキー処理
-            dgvMaster.GridRowUpAction((int)DispListColumn.ORDERERS_CODE, (int)DispListColumn.ORDERERS_NAME);
+            dgvMaster.GridRowUpAction((int)DispGridCol.ORDERERS_CODE, (int)DispGridCol.ORDERERS_NAME);
 
             m_bChengeAns = true;
         }
@@ -676,7 +705,7 @@
         private void btnDispDown_Click(object sender, EventArgs e)
         {
             // グリッドダウンキー処理
-            dgvMaster.GridRowDownAction((int)DispListColumn.ORDERERS_CODE, (int)DispListColumn.ORDERERS_NAME);
+            dgvMaster.GridRowDownAction((int)DispGridCol.ORDERERS_CODE, (int)DispGridCol.ORDERERS_NAME);
 
             m_bChengeAns = true;
         }
@@ -701,6 +730,31 @@
         }
         #endregion
 
+        #region 50音順コンボ変更時イベント
+        /// <summary>
+        /// 50音順コンボ変更時イベント
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        private void cmbJapaneseSyllabary_TextChanged(object sender, EventArgs e)
+        {
+            try
+            {
+                if (m_bInitChangeOff) return;
+
+                // クリア
+                ClearDisplay();
+
+                // データ表示
+                DispGridData();
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("システムエラー：{0}：{1}", CommonMotions.GetMethodName(), ex.Message);
+            }
+        }
+        #endregion
+
         #region 法人格radioButton変化有
         /// <summary>
         /// 法人格radioButton変化有
@@ -745,6 +799,7 @@
             m_dispControl[(int)DispCtrl.MailAddress] =txtInput15;
             m_dispControl[(int)DispCtrl.EntryPerson] = lblEntryPerson;
             m_dispControl[(int)DispCtrl.EntryDate] = lblEntryDate;
+            m_dispControl[(int)DispCtrl.JapaneseSyllabary] = txtInput13;
 
         }
         #endregion
@@ -859,6 +914,10 @@
                 if (m_dispControl[(int)DispCtrl.FaxNumber].Text.Length != 0) iLength++;
                 bRet &= CommonMotions.DispFieldPhoneNumberCheck(m_dispControl[(int)DispCtrl.FaxNumber]);
 
+                // 50音読み
+                if (m_dispControl[(int)DispCtrl.JapaneseSyllabary].Text.Length != 0) iLength++;
+                bRet &= CommonMotions.DispFieldLengthCheck(m_dispControl[(int)DispCtrl.JapaneseSyllabary], s_JapaneseSyllabaryLength);
+
                 // メールアドレス
                 if (m_dispControl[(int)DispCtrl.MailAddress].Text.Length != 0) iLength++;
                 bRet &= CommonMotions.DispFieldLengthCheck(m_dispControl[(int)DispCtrl.MailAddress], 256);
@@ -897,22 +956,27 @@
             IOMOrderers orDB = new IOMOrderers();
             try
             {
-                //// 一括処理なので接続を行う
-                orDB.connect();
-                orDB.beginTran();
+                /// 一括処理なので接続を行う
+                orDB.connect(); orDB.beginTran();
 
+                DataGridView dgv = dgvMaster;
+                DataGridViewRow CurRow = dgv.CurrentRow;
+                int nDivisionCode = cmbDivision.Text.Length > 0
+                                        ? CommonMotions.cnvInt(cmbDivision.SelectedValue)
+                                        : CommonMotions.cnvInt(CurRow.Cells[(int)DispGridCol.ORDERERS_DIVISION].Value);
                 // 表示順を更新する
+                if (cmbDivision.Text.Length < 1) goto ExecEntry;    // 区分選択無しは表示順をクリアしない
                 int rowcout = 1;
                 foreach (DataGridViewRow wrkRow in dgvMaster.Rows)
                 {
                     // 名前無は処理しない
-                    if (CommonMotions.chkObjectIsNull(wrkRow.Cells[(int)DispListColumn.ORDERERS_NAME].Value)) continue;
+                    if (CommonMotions.chkObjectIsNull(wrkRow.Cells[(int)DispGridCol.ORDERERS_NAME].Value)) continue;
 
                     OrderersMaster cwrow = new OrderersMaster();
 
                     // 検索文字列作成
-                    string SQLRow = orDB.CreatePrimarykeyString(CommonMotions.cnvInt(cmbDivision.SelectedValue.ToString()),
-                                                CommonMotions.cnvInt(wrkRow.Cells[(int)DispListColumn.ORDERERS_CODE].Value));
+                    int nOrdewrsCode = CommonMotions.cnvInt(wrkRow.Cells[(int)DispGridCol.ORDERERS_CODE].Value);
+                    string SQLRow = orDB.CreatePrimarykeyString(nDivisionCode, nOrdewrsCode);
 
                     // データ取得
                     if (!orDB.SelectAction(SQLRow, ref cwrow, false)) break;
@@ -923,11 +987,14 @@
                     rowcout++;
                 }
 
+                // 登録開始
+                ExecEntry:
+
                 OrderersMaster work = new OrderersMaster();
                 List<OrderersMaster> workList = new List<OrderersMaster>();
 
                 // 発注者区分
-                work.OrderCotegory = CommonMotions.cnvInt(cmbChangeOrdersDivision.SelectedValue.ToString());
+                work.OrderCotegory = nDivisionCode;
                 // 発注者コード
                 work.OrderersCode = CommonMotions.cnvInt(m_dispControl[(int)DispCtrl.OrderersCode].Text);
                 // 表示順
@@ -985,6 +1052,10 @@
                 if (m_dispControl[(int)DispCtrl.FaxNumber].Text.Length != 0)
                     work.FaxNumber = m_dispControl[(int)DispCtrl.FaxNumber].Text;
 
+                // 50音読み
+                if (m_dispControl[(int)DispCtrl.JapaneseSyllabary].Text.Length != 0)
+                    work.JapaneseSyllabary = m_dispControl[(int)DispCtrl.JapaneseSyllabary].Text;
+
                 // メールアドレス
                 if (m_dispControl[(int)DispCtrl.MailAddress].Text.Length != 0)
                     work.MailAddress = m_dispControl[(int)DispCtrl.MailAddress].Text;
@@ -994,7 +1065,7 @@
                     work.Note = m_dispControl[(int)DispCtrl.Note].Text;
 
                 // 発注者マスタ現在データ存在確認
-                string strWhere = orDB.CreatePrimarykeyString(CommonMotions.cnvInt(cmbDivision.SelectedValue.ToString()), work.OrderersCode);
+                string strWhere = orDB.CreatePrimarykeyString(work.OrderCotegory, work.OrderersCode);
 
                 if (!orDB.SelectAction(strWhere, ref workList, false))
                 {
@@ -1008,18 +1079,24 @@
                 int iChange = CommonMotions.cnvInt(cmbChangeOrdersDivision.SelectedValue);
                 if (iDivision != iChange)
                 {
-                    // 変更前発注者コード取得
+                    // 旧発注者コードセット
                     int[] nNameCode = new int[] { work.OrderersCode, 0 };
 
-                    string strMaxCount = orDB.CreatePrimarykeyString(work.OrderCotegory);
+                    // 検索SQL作成
+                    string strMaxCount = orDB.CreatePrimarykeyString(iChange);
+
                     // 移動先キーセット
                     work.OrderersCode = orDB.SelectMaxOrderersCodeCount(strMaxCount, false) + 1;
+                    
                     // 移動先表示順セット
                     work.DisplayOrder = orDB.GetMaxDisplayOrder(strMaxCount, false) + 1;
 
-                    // 発注者マスタを参照しているデータの更新
+                    // 新旧区分セット
                     int[] nDivision = new int[] { iDivision, iChange };
+                    // 新発注者コードセット
                     nNameCode[(int)DataTimeDef.NewTime] = work.OrderersCode;
+
+                    // 発注者マスタを参照しているデータの更新
                     if (!ChangeReferDivision(nDivision, nNameCode))
                     {
                         orDB.rollback();
@@ -1026,6 +1103,8 @@
                         MessageBox.Show("参照データ更新に失敗しました。", "登録エラー", MessageBoxButtons.OK, MessageBoxIcon.Error);
                         return false;
                     }
+                    // 新区分セット
+                    work.OrderCotegory = iChange;
                 }
 
                 if (workList.Count == 0)
@@ -1096,10 +1175,15 @@
                 List<OrderersMaster> wrk = new List<OrderersMaster>();
                 // 発注者取得SQL
                 StringBuilder strSql = new StringBuilder();
-                strSql.Append(orDB.CreatePrimarykeyString(CommonMotions.cnvInt(cmbDivision.SelectedValue.ToString())));
-                strSql.AppendFormat(" And DeleteFlg = {0} Order By DisplayOrder ASC", (int)CommonDefine.DataDeleteDef.Exists);
+                strSql.AppendFormat(" Where DeleteFlg = {0}", (int)CommonDefine.DataDeleteDef.Exists);
+                strSql.Append(GetSqlFromcmbDivision());
+                strSql.Append(GetSqlFromcmbJapaneseSyllabary());
+                strSql.Append(" Order By JapaneseSyllabary ASC, DisplayOrder ASC");
+
+                DataGridView dgv = dgvMaster;
                 // グリッドの行を0に戻す
-                dgvMaster.Rows.Clear();
+                dgv.Rows.Clear();
+
                 // 作業名称取得
                 if (!orDB.SelectAction(strSql.ToString(), ref wrk)) return false;
 
@@ -1110,12 +1194,15 @@
                     // 発注者名を法人格を含めて連結する
                     string wrkDisp = CommonMotions.OrderersNameUnion(work);
 
-                    dgvMaster.Rows.Add((ino++)
-                                        , work.OrderersCode
-                                        , wrkDisp
-                                        );
+                    int nIndex = dgv.Rows.Add(1);
+                    DataGridViewRow CurRow = dgv.Rows[nIndex];
+                    CurRow.Cells[(int)DispGridCol.DISPLAY_ORDER].Value = (ino++);
+                    CurRow.Cells[(int)DispGridCol.ORDERERS_DIVISION].Value = work.OrderCotegory;
+                    CurRow.Cells[(int)DispGridCol.ORDERERS_CODE].Value = work.OrderersCode;
+                    CurRow.Cells[(int)DispGridCol.ORDERERS_NAME].Value = wrkDisp;
 
                 }
+
                 // 表示行が足りない場合は追加する
                 if (dgvMaster.Rows.Count <= CommonDefine.s_MaxInitLineCountMastamente)
                 {
@@ -1147,6 +1234,60 @@
         }
         #endregion
 
+        #region 発注区分コンボボックスよりSQLを作成する
+        /// <summary>
+        /// 発注区分コンボボックスよりSQLを作成する
+        /// </summary>
+        /// <returns></returns>
+        private string GetSqlFromcmbDivision()
+        {
+            try
+            {
+                if (CommonMotions.cnvString(cmbDivision.Text).Length < 1) return string.Empty;
+
+                int Value = CommonMotions.cnvInt(cmbDivision.SelectedValue);
+                if (Value < 1) return string.Empty;
+
+                StringBuilder strSQL = new StringBuilder();
+                strSQL.AppendFormat(" And OrderCotegory = {0}", Value);
+
+                return strSQL.ToString();
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("システムエラー：{0}：{1}", CommonMotions.GetMethodName(), ex.Message);
+                return string.Empty;
+            }
+        }
+        #endregion
+
+        #region 50音順コンボボックスよりSQLを作成する
+        /// <summary>
+        ///  50音順コンボボックスよりSQLを作成する
+        /// </summary>
+        /// <returns></returns>
+        private string GetSqlFromcmbJapaneseSyllabary()
+        {
+            try
+            {
+                if (CommonMotions.cnvString(cmbJapaneseSyllabary.Text).Length < 1) return string.Empty;
+
+                string Value = CommonMotions.cnvString(cmbJapaneseSyllabary.SelectedValue);
+                if (Value.Length == 0) return string.Empty;
+
+                StringBuilder strSQL = new StringBuilder();
+                strSQL.AppendFormat(" And JapaneseSyllabary = '{0}'", Value);
+
+                return strSQL.ToString();
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("システムエラー：{0}：{1}", CommonMotions.GetMethodName(), ex.Message);
+                return string.Empty;
+            }
+        }
+        #endregion
+
         #region 更新データ表示処理
         /// <summary>
         /// 更新データ表示処理
@@ -1160,15 +1301,17 @@
             IOMPersonInCharge ManDB = new IOMPersonInCharge();
             try
             {
-                // 発注者マスタ取得クラス領域
-                OrderersMaster odRec = new OrderersMaster();
+                DataGridView dgv = dgvMaster;
+                DataGridViewRow CurRow = dgv.CurrentRow;
 
                 // 発注者マスタ取得SQL
-                int nDivi = CommonMotions.cnvInt(cmbDivision.SelectedValue);
+                int nDivi = CommonMotions.cnvInt(CurRow.Cells[(int)DispGridCol.ORDERERS_DIVISION].Value);
+                int nCode = CommonMotions.cnvInt(CurRow.Cells[(int)DispGridCol.ORDERERS_CODE].Value);
                 StringBuilder strSql = new StringBuilder();
-                strSql.Append(odDB.CreatePrimarykeyString(nDivi, m_OrderersCode));
+                strSql.Append(odDB.CreatePrimarykeyString(nDivi, nCode));
 
                 // 発注者マスタ取得
+                OrderersMaster odRec = new OrderersMaster();
                 if (!odDB.SelectAction(strSql.ToString(), ref odRec)) return false;
 
                 PersonInChargeMaster ManRec = new PersonInChargeMaster();
@@ -1203,6 +1346,7 @@
                 m_dispControl[(int)DispCtrl.Address3].Text = odRec.Address3.ToString();
                 m_dispControl[(int)DispCtrl.PhoneNumber].Text = odRec.PhoneNumber.ToString();
                 m_dispControl[(int)DispCtrl.FaxNumber].Text = odRec.FaxNumber.ToString();
+                m_dispControl[(int)DispCtrl.JapaneseSyllabary].Text = odRec.JapaneseSyllabary;
                 m_dispControl[(int)DispCtrl.MailAddress].Text = odRec.MailAddress.ToString();
                 m_dispControl[(int)DispCtrl.Note].Text = odRec.Note.ToString();
                 m_dispControl[(int)DispCtrl.EntryDate].Text = odRec.EntryDate.ToShortDateString();
@@ -1293,6 +1437,8 @@
                 List<KeyValuePair<int, string>> DataList = new List<KeyValuePair<int, string>>();
                 List<KeyValuePair<int, string>> ChangeList = new List<KeyValuePair<int, string>>();
                 // データ表示
+                DataList.Add(new KeyValuePair<int, string>(0, ""));
+                ChangeList.Add(new KeyValuePair<int, string>(0, ""));
                 for (int i = 0; i < bvList.Count; i++)
                 {
                     KeyValuePair<int, string> keyval = new KeyValuePair<int, string>(bvList[i].NameCode, bvList[i].NameString);
@@ -1316,6 +1462,50 @@
         }
         #endregion
 
+        #region 協力会社50音順コンボボックスセット
+        /// <summary>
+        /// 協力会社50音順コンボボックスセット
+        /// </summary>
+        private void SetcmbcmbJapaneseSyllabary()
+        {
+            IOMOrderers OrderDB = new IOMOrderers();
+            try
+            {
+                cmbJapaneseSyllabary.DataSource = null;
+                cmbJapaneseSyllabary.Items.Clear();
+                cmbJapaneseSyllabary.Text = "";
+
+                StringBuilder strSQL = new StringBuilder();
+                strSQL.Append("Select Distinct JapaneseSyllabary From orderersmaster");
+                strSQL.Append(" WHERE Length(JapaneseSyllabary) > 0");
+                strSQL.AppendFormat(" AND DELETEFLG = {0}", (int)CommonDefine.DataDeleteDef.Exists);
+                strSQL.Append(" Order By JapaneseSyllabary");
+                ArrayList arData = new ArrayList();
+                if (!OrderDB.ExecuteReader(strSQL.ToString(), ref arData)) return;
+                if (arData.Count == 0) return;
+
+                // データセット
+                List<KeyValuePair<string, string>> DataList = new List<KeyValuePair<string, string>>();
+                DataList.Add(new KeyValuePair<string, string>("", ""));
+                foreach (object[] objwrk in arData)
+                {
+                    KeyValuePair<string, string> keyval = new KeyValuePair<string, string>(objwrk[0].ToString(), objwrk[0].ToString());
+                    DataList.Add(keyval);
+                }
+                // コンボボックス初期表示
+                ComboBoxAction.InitDataSetCombBox(cmbJapaneseSyllabary, DataList);
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("システムエラー：{0}：{1}", CommonMotions.GetMethodName(), ex.Message);
+            }
+            finally
+            {
+                OrderDB.close(); OrderDB = null;
+            }
+        }
+        #endregion
+
         #region 参照時ロック処理
         /// <summary>
         /// 参照時ロック処理
Index: trunk/src/ProcessManagement/ProcessManagement/Forms/Master/Orderer/FrmOrderers.designer.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/Forms/Master/Orderer/FrmOrderers.designer.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/Forms/Master/Orderer/FrmOrderers.designer.cs	(revision 484)
@@ -43,11 +43,16 @@
             this.btnDispDown = new System.Windows.Forms.Button();
             this.btnDispUp = new System.Windows.Forms.Button();
             this.panel2 = new System.Windows.Forms.Panel();
+            this.cmbJapaneseSyllabary = new System.Windows.Forms.ComboBox();
+            this.label23 = new System.Windows.Forms.Label();
             this.btnSelect = new System.Windows.Forms.Button();
             this.label18 = new System.Windows.Forms.Label();
             this.btnHelp = new System.Windows.Forms.Button();
             this.panel3 = new System.Windows.Forms.Panel();
             this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
+            this.label24 = new System.Windows.Forms.Label();
+            this.txtInput13 = new System.Windows.Forms.TextBox();
+            this.label22 = new System.Windows.Forms.Label();
             this.txtInput15 = new System.Windows.Forms.TextBox();
             this.label20 = new System.Windows.Forms.Label();
             this.textBox2 = new System.Windows.Forms.TextBox();
@@ -94,10 +99,9 @@
             this.lblEntryPerson = new System.Windows.Forms.Label();
             this.dgvMaster = new ProcessManagement.Forms.CustomControls.DataGridViewEX();
             this.Column1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.Column4 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.Column2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.Column3 = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.label23 = new System.Windows.Forms.Label();
-            this.cmbJapaneseSyllabary = new System.Windows.Forms.ComboBox();
             this.panel2.SuspendLayout();
             this.panel3.SuspendLayout();
             this.tableLayoutPanel1.SuspendLayout();
@@ -182,6 +186,7 @@
             "合資会社",
             "合同会社"});
             this.cmbDivision.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+            this.cmbDivision.DropDownWidth = 500;
             this.cmbDivision.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
             this.cmbDivision.Font = new System.Drawing.Font("ＭＳ 明朝", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
             this.cmbDivision.FormattingEnabled = true;
@@ -267,6 +272,31 @@
             this.panel2.Size = new System.Drawing.Size(540, 70);
             this.panel2.TabIndex = 24;
             // 
+            // cmbJapaneseSyllabary
+            // 
+            this.cmbJapaneseSyllabary.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+            this.cmbJapaneseSyllabary.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
+            this.cmbJapaneseSyllabary.Font = new System.Drawing.Font("ＭＳ 明朝", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
+            this.cmbJapaneseSyllabary.FormattingEnabled = true;
+            this.cmbJapaneseSyllabary.Location = new System.Drawing.Point(137, 35);
+            this.cmbJapaneseSyllabary.Name = "cmbJapaneseSyllabary";
+            this.cmbJapaneseSyllabary.Size = new System.Drawing.Size(100, 27);
+            this.cmbJapaneseSyllabary.TabIndex = 25;
+            this.cmbJapaneseSyllabary.TabStop = false;
+            this.cmbJapaneseSyllabary.TextChanged += new System.EventHandler(this.cmbJapaneseSyllabary_TextChanged);
+            // 
+            // label23
+            // 
+            this.label23.BackColor = System.Drawing.Color.White;
+            this.label23.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
+            this.label23.ForeColor = System.Drawing.Color.Black;
+            this.label23.Location = new System.Drawing.Point(20, 35);
+            this.label23.Name = "label23";
+            this.label23.Size = new System.Drawing.Size(110, 27);
+            this.label23.TabIndex = 24;
+            this.label23.Text = "50音順";
+            this.label23.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
+            // 
             // btnSelect
             // 
             this.btnSelect.BackColor = System.Drawing.Color.Green;
@@ -325,27 +355,30 @@
             this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 150F));
             this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 90F));
             this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 400F));
-            this.tableLayoutPanel1.Controls.Add(this.txtInput15, 1, 15);
-            this.tableLayoutPanel1.Controls.Add(this.label20, 0, 15);
-            this.tableLayoutPanel1.Controls.Add(this.textBox2, 1, 7);
+            this.tableLayoutPanel1.Controls.Add(this.label24, 2, 6);
+            this.tableLayoutPanel1.Controls.Add(this.txtInput13, 1, 6);
+            this.tableLayoutPanel1.Controls.Add(this.label22, 0, 6);
+            this.tableLayoutPanel1.Controls.Add(this.txtInput15, 1, 17);
+            this.tableLayoutPanel1.Controls.Add(this.label20, 0, 17);
+            this.tableLayoutPanel1.Controls.Add(this.textBox2, 1, 9);
             this.tableLayoutPanel1.Controls.Add(this.panel5, 1, 3);
             this.tableLayoutPanel1.Controls.Add(this.label11, 0, 3);
             this.tableLayoutPanel1.Controls.Add(this.cmbCorporateStatus, 1, 2);
             this.tableLayoutPanel1.Controls.Add(this.label16, 0, 2);
-            this.tableLayoutPanel1.Controls.Add(this.label5, 0, 9);
-            this.tableLayoutPanel1.Controls.Add(this.txtInput03, 1, 9);
-            this.tableLayoutPanel1.Controls.Add(this.btnSerchZip, 2, 9);
-            this.tableLayoutPanel1.Controls.Add(this.label6, 0, 10);
-            this.tableLayoutPanel1.Controls.Add(this.label8, 0, 13);
-            this.tableLayoutPanel1.Controls.Add(this.txtInput09, 2, 12);
-            this.tableLayoutPanel1.Controls.Add(this.txtInput06, 1, 13);
-            this.tableLayoutPanel1.Controls.Add(this.label9, 0, 14);
-            this.tableLayoutPanel1.Controls.Add(this.txtInput07, 1, 14);
-            this.tableLayoutPanel1.Controls.Add(this.txtInput04, 2, 10);
-            this.tableLayoutPanel1.Controls.Add(this.txtInput05, 2, 11);
-            this.tableLayoutPanel1.Controls.Add(this.label3, 1, 10);
-            this.tableLayoutPanel1.Controls.Add(this.label4, 1, 11);
-            this.tableLayoutPanel1.Controls.Add(this.label10, 1, 12);
+            this.tableLayoutPanel1.Controls.Add(this.label5, 0, 11);
+            this.tableLayoutPanel1.Controls.Add(this.txtInput03, 1, 11);
+            this.tableLayoutPanel1.Controls.Add(this.btnSerchZip, 2, 11);
+            this.tableLayoutPanel1.Controls.Add(this.label6, 0, 12);
+            this.tableLayoutPanel1.Controls.Add(this.label8, 0, 15);
+            this.tableLayoutPanel1.Controls.Add(this.txtInput09, 2, 14);
+            this.tableLayoutPanel1.Controls.Add(this.txtInput06, 1, 15);
+            this.tableLayoutPanel1.Controls.Add(this.label9, 0, 16);
+            this.tableLayoutPanel1.Controls.Add(this.txtInput07, 1, 16);
+            this.tableLayoutPanel1.Controls.Add(this.txtInput04, 2, 12);
+            this.tableLayoutPanel1.Controls.Add(this.txtInput05, 2, 13);
+            this.tableLayoutPanel1.Controls.Add(this.label3, 1, 12);
+            this.tableLayoutPanel1.Controls.Add(this.label4, 1, 13);
+            this.tableLayoutPanel1.Controls.Add(this.label10, 1, 14);
             this.tableLayoutPanel1.Controls.Add(this.label2, 0, 4);
             this.tableLayoutPanel1.Controls.Add(this.txtInput01, 1, 4);
             this.tableLayoutPanel1.Controls.Add(this.txtInput02, 1, 5);
@@ -353,20 +386,20 @@
             this.tableLayoutPanel1.Controls.Add(this.lblOrderersCode, 1, 0);
             this.tableLayoutPanel1.Controls.Add(this.label14, 0, 1);
             this.tableLayoutPanel1.Controls.Add(this.panel1, 1, 1);
-            this.tableLayoutPanel1.Controls.Add(this.label15, 0, 6);
-            this.tableLayoutPanel1.Controls.Add(this.label17, 0, 7);
-            this.tableLayoutPanel1.Controls.Add(this.textBox1, 1, 6);
-            this.tableLayoutPanel1.Controls.Add(this.label7, 0, 17);
-            this.tableLayoutPanel1.Controls.Add(this.txtInput08, 1, 17);
-            this.tableLayoutPanel1.Controls.Add(this.cmbChangeOrdersDivision, 1, 24);
-            this.tableLayoutPanel1.Controls.Add(this.label13, 0, 24);
-            this.tableLayoutPanel1.Controls.Add(this.label19, 0, 21);
-            this.tableLayoutPanel1.Controls.Add(this.label21, 0, 22);
-            this.tableLayoutPanel1.Controls.Add(this.lblEntryDate, 1, 22);
-            this.tableLayoutPanel1.Controls.Add(this.lblEntryPerson, 1, 21);
+            this.tableLayoutPanel1.Controls.Add(this.label15, 0, 8);
+            this.tableLayoutPanel1.Controls.Add(this.label17, 0, 9);
+            this.tableLayoutPanel1.Controls.Add(this.textBox1, 1, 8);
+            this.tableLayoutPanel1.Controls.Add(this.label7, 0, 19);
+            this.tableLayoutPanel1.Controls.Add(this.txtInput08, 1, 19);
+            this.tableLayoutPanel1.Controls.Add(this.cmbChangeOrdersDivision, 1, 26);
+            this.tableLayoutPanel1.Controls.Add(this.label13, 0, 26);
+            this.tableLayoutPanel1.Controls.Add(this.label19, 0, 23);
+            this.tableLayoutPanel1.Controls.Add(this.label21, 0, 24);
+            this.tableLayoutPanel1.Controls.Add(this.lblEntryDate, 1, 24);
+            this.tableLayoutPanel1.Controls.Add(this.lblEntryPerson, 1, 23);
             this.tableLayoutPanel1.Location = new System.Drawing.Point(1, 1);
             this.tableLayoutPanel1.Name = "tableLayoutPanel1";
-            this.tableLayoutPanel1.RowCount = 25;
+            this.tableLayoutPanel1.RowCount = 27;
             this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 30F));
             this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 30F));
             this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 30F));
@@ -392,15 +425,54 @@
             this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 30F));
             this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 30F));
             this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 30F));
-            this.tableLayoutPanel1.Size = new System.Drawing.Size(590, 750);
+            this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 30F));
+            this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 30F));
+            this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
+            this.tableLayoutPanel1.Size = new System.Drawing.Size(590, 810);
             this.tableLayoutPanel1.TabIndex = 2;
             // 
+            // label24
+            // 
+            this.label24.Anchor = System.Windows.Forms.AnchorStyles.Left;
+            this.label24.BackColor = System.Drawing.Color.Transparent;
+            this.label24.Font = new System.Drawing.Font("ＭＳ 明朝", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
+            this.label24.ForeColor = System.Drawing.Color.Red;
+            this.label24.Location = new System.Drawing.Point(243, 183);
+            this.label24.Name = "label24";
+            this.label24.Size = new System.Drawing.Size(258, 24);
+            this.label24.TabIndex = 119;
+            this.label24.Text = "例）あかさ・・・ABC・・・123など";
+            this.label24.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
+            // 
+            // txtInput13
+            // 
+            this.txtInput13.Anchor = System.Windows.Forms.AnchorStyles.Left;
+            this.txtInput13.ImeMode = System.Windows.Forms.ImeMode.On;
+            this.txtInput13.Location = new System.Drawing.Point(153, 183);
+            this.txtInput13.MaxLength = 2;
+            this.txtInput13.Name = "txtInput13";
+            this.txtInput13.Size = new System.Drawing.Size(80, 23);
+            this.txtInput13.TabIndex = 119;
+            // 
+            // label22
+            // 
+            this.label22.Anchor = System.Windows.Forms.AnchorStyles.Left;
+            this.label22.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(128)))));
+            this.label22.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
+            this.label22.ForeColor = System.Drawing.Color.Black;
+            this.label22.Location = new System.Drawing.Point(3, 183);
+            this.label22.Name = "label22";
+            this.label22.Size = new System.Drawing.Size(144, 24);
+            this.label22.TabIndex = 119;
+            this.label22.Text = "50音順読み";
+            this.label22.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
+            // 
             // txtInput15
             // 
             this.txtInput15.Anchor = System.Windows.Forms.AnchorStyles.Left;
             this.tableLayoutPanel1.SetColumnSpan(this.txtInput15, 2);
             this.txtInput15.ImeMode = System.Windows.Forms.ImeMode.Disable;
-            this.txtInput15.Location = new System.Drawing.Point(153, 453);
+            this.txtInput15.Location = new System.Drawing.Point(153, 513);
             this.txtInput15.MaxLength = 257;
             this.txtInput15.Name = "txtInput15";
             this.txtInput15.Size = new System.Drawing.Size(430, 23);
@@ -413,7 +485,7 @@
             this.label20.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(128)))));
             this.label20.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
             this.label20.ForeColor = System.Drawing.Color.Black;
-            this.label20.Location = new System.Drawing.Point(3, 453);
+            this.label20.Location = new System.Drawing.Point(3, 513);
             this.label20.Name = "label20";
             this.label20.Size = new System.Drawing.Size(144, 24);
             this.label20.TabIndex = 49;
@@ -425,7 +497,7 @@
             this.textBox2.Anchor = System.Windows.Forms.AnchorStyles.Left;
             this.tableLayoutPanel1.SetColumnSpan(this.textBox2, 2);
             this.textBox2.ImeMode = System.Windows.Forms.ImeMode.On;
-            this.textBox2.Location = new System.Drawing.Point(153, 213);
+            this.textBox2.Location = new System.Drawing.Point(153, 273);
             this.textBox2.MaxLength = 60;
             this.textBox2.Name = "textBox2";
             this.textBox2.Size = new System.Drawing.Size(430, 23);
@@ -536,7 +608,7 @@
             this.label5.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(128)))));
             this.label5.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
             this.label5.ForeColor = System.Drawing.Color.Black;
-            this.label5.Location = new System.Drawing.Point(3, 272);
+            this.label5.Location = new System.Drawing.Point(3, 332);
             this.label5.Name = "label5";
             this.label5.Size = new System.Drawing.Size(144, 25);
             this.label5.TabIndex = 34;
@@ -547,7 +619,7 @@
             // 
             this.txtInput03.Anchor = System.Windows.Forms.AnchorStyles.Left;
             this.txtInput03.ImeMode = System.Windows.Forms.ImeMode.Disable;
-            this.txtInput03.Location = new System.Drawing.Point(153, 273);
+            this.txtInput03.Location = new System.Drawing.Point(153, 333);
             this.txtInput03.MaxLength = 8;
             this.txtInput03.Name = "txtInput03";
             this.txtInput03.Size = new System.Drawing.Size(84, 23);
@@ -559,7 +631,7 @@
             this.btnSerchZip.Anchor = System.Windows.Forms.AnchorStyles.Left;
             this.btnSerchZip.BackColor = System.Drawing.Color.Brown;
             this.btnSerchZip.ForeColor = System.Drawing.Color.White;
-            this.btnSerchZip.Location = new System.Drawing.Point(243, 273);
+            this.btnSerchZip.Location = new System.Drawing.Point(243, 333);
             this.btnSerchZip.Name = "btnSerchZip";
             this.btnSerchZip.Size = new System.Drawing.Size(120, 23);
             this.btnSerchZip.TabIndex = 36;
@@ -574,7 +646,7 @@
             this.label6.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(128)))));
             this.label6.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
             this.label6.ForeColor = System.Drawing.Color.Black;
-            this.label6.Location = new System.Drawing.Point(3, 302);
+            this.label6.Location = new System.Drawing.Point(3, 362);
             this.label6.Name = "label6";
             this.label6.Size = new System.Drawing.Size(144, 25);
             this.label6.TabIndex = 37;
@@ -587,7 +659,7 @@
             this.label8.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(128)))));
             this.label8.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
             this.label8.ForeColor = System.Drawing.Color.Black;
-            this.label8.Location = new System.Drawing.Point(3, 392);
+            this.label8.Location = new System.Drawing.Point(3, 452);
             this.label8.Name = "label8";
             this.label8.Size = new System.Drawing.Size(144, 25);
             this.label8.TabIndex = 40;
@@ -598,7 +670,7 @@
             // 
             this.txtInput09.Anchor = System.Windows.Forms.AnchorStyles.Left;
             this.txtInput09.ImeMode = System.Windows.Forms.ImeMode.On;
-            this.txtInput09.Location = new System.Drawing.Point(243, 363);
+            this.txtInput09.Location = new System.Drawing.Point(243, 423);
             this.txtInput09.MaxLength = 60;
             this.txtInput09.Name = "txtInput09";
             this.txtInput09.Size = new System.Drawing.Size(340, 23);
@@ -610,7 +682,7 @@
             this.txtInput06.Anchor = System.Windows.Forms.AnchorStyles.Left;
             this.tableLayoutPanel1.SetColumnSpan(this.txtInput06, 2);
             this.txtInput06.ImeMode = System.Windows.Forms.ImeMode.Disable;
-            this.txtInput06.Location = new System.Drawing.Point(153, 393);
+            this.txtInput06.Location = new System.Drawing.Point(153, 453);
             this.txtInput06.MaxLength = 13;
             this.txtInput06.Name = "txtInput06";
             this.txtInput06.Size = new System.Drawing.Size(150, 23);
@@ -623,7 +695,7 @@
             this.label9.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(128)))));
             this.label9.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
             this.label9.ForeColor = System.Drawing.Color.Black;
-            this.label9.Location = new System.Drawing.Point(3, 422);
+            this.label9.Location = new System.Drawing.Point(3, 482);
             this.label9.Name = "label9";
             this.label9.Size = new System.Drawing.Size(144, 25);
             this.label9.TabIndex = 42;
@@ -635,7 +707,7 @@
             this.txtInput07.Anchor = System.Windows.Forms.AnchorStyles.Left;
             this.tableLayoutPanel1.SetColumnSpan(this.txtInput07, 2);
             this.txtInput07.ImeMode = System.Windows.Forms.ImeMode.Disable;
-            this.txtInput07.Location = new System.Drawing.Point(153, 423);
+            this.txtInput07.Location = new System.Drawing.Point(153, 483);
             this.txtInput07.MaxLength = 13;
             this.txtInput07.Name = "txtInput07";
             this.txtInput07.Size = new System.Drawing.Size(150, 23);
@@ -646,7 +718,7 @@
             // 
             this.txtInput04.Anchor = System.Windows.Forms.AnchorStyles.Left;
             this.txtInput04.ImeMode = System.Windows.Forms.ImeMode.On;
-            this.txtInput04.Location = new System.Drawing.Point(243, 303);
+            this.txtInput04.Location = new System.Drawing.Point(243, 363);
             this.txtInput04.MaxLength = 60;
             this.txtInput04.Name = "txtInput04";
             this.txtInput04.Size = new System.Drawing.Size(340, 23);
@@ -657,7 +729,7 @@
             // 
             this.txtInput05.Anchor = System.Windows.Forms.AnchorStyles.Left;
             this.txtInput05.ImeMode = System.Windows.Forms.ImeMode.On;
-            this.txtInput05.Location = new System.Drawing.Point(243, 333);
+            this.txtInput05.Location = new System.Drawing.Point(243, 393);
             this.txtInput05.MaxLength = 60;
             this.txtInput05.Name = "txtInput05";
             this.txtInput05.Size = new System.Drawing.Size(340, 23);
@@ -670,7 +742,7 @@
             this.label3.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(128)))));
             this.label3.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
             this.label3.ForeColor = System.Drawing.Color.Black;
-            this.label3.Location = new System.Drawing.Point(153, 302);
+            this.label3.Location = new System.Drawing.Point(153, 362);
             this.label3.Name = "label3";
             this.label3.Size = new System.Drawing.Size(84, 25);
             this.label3.TabIndex = 37;
@@ -683,7 +755,7 @@
             this.label4.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(128)))));
             this.label4.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
             this.label4.ForeColor = System.Drawing.Color.Black;
-            this.label4.Location = new System.Drawing.Point(153, 332);
+            this.label4.Location = new System.Drawing.Point(153, 392);
             this.label4.Name = "label4";
             this.label4.Size = new System.Drawing.Size(84, 25);
             this.label4.TabIndex = 37;
@@ -696,7 +768,7 @@
             this.label10.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(128)))));
             this.label10.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
             this.label10.ForeColor = System.Drawing.Color.Black;
-            this.label10.Location = new System.Drawing.Point(153, 362);
+            this.label10.Location = new System.Drawing.Point(153, 422);
             this.label10.Name = "label10";
             this.label10.Size = new System.Drawing.Size(84, 25);
             this.label10.TabIndex = 37;
@@ -823,7 +895,7 @@
             this.label15.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(128)))));
             this.label15.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
             this.label15.ForeColor = System.Drawing.Color.Black;
-            this.label15.Location = new System.Drawing.Point(3, 182);
+            this.label15.Location = new System.Drawing.Point(3, 242);
             this.label15.Name = "label15";
             this.label15.Size = new System.Drawing.Size(144, 25);
             this.label15.TabIndex = 30;
@@ -836,7 +908,7 @@
             this.label17.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(128)))));
             this.label17.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
             this.label17.ForeColor = System.Drawing.Color.Black;
-            this.label17.Location = new System.Drawing.Point(3, 212);
+            this.label17.Location = new System.Drawing.Point(3, 272);
             this.label17.Name = "label17";
             this.label17.Size = new System.Drawing.Size(144, 25);
             this.label17.TabIndex = 30;
@@ -848,7 +920,7 @@
             this.textBox1.Anchor = System.Windows.Forms.AnchorStyles.Left;
             this.tableLayoutPanel1.SetColumnSpan(this.textBox1, 2);
             this.textBox1.ImeMode = System.Windows.Forms.ImeMode.On;
-            this.textBox1.Location = new System.Drawing.Point(153, 183);
+            this.textBox1.Location = new System.Drawing.Point(153, 243);
             this.textBox1.MaxLength = 60;
             this.textBox1.Name = "textBox1";
             this.textBox1.Size = new System.Drawing.Size(430, 23);
@@ -861,7 +933,7 @@
             this.label7.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(128)))));
             this.label7.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
             this.label7.ForeColor = System.Drawing.Color.Black;
-            this.label7.Location = new System.Drawing.Point(3, 512);
+            this.label7.Location = new System.Drawing.Point(3, 572);
             this.label7.Name = "label7";
             this.label7.Size = new System.Drawing.Size(144, 25);
             this.label7.TabIndex = 44;
@@ -873,7 +945,7 @@
             this.txtInput08.Anchor = System.Windows.Forms.AnchorStyles.Left;
             this.tableLayoutPanel1.SetColumnSpan(this.txtInput08, 2);
             this.txtInput08.ImeMode = System.Windows.Forms.ImeMode.On;
-            this.txtInput08.Location = new System.Drawing.Point(153, 513);
+            this.txtInput08.Location = new System.Drawing.Point(153, 573);
             this.txtInput08.MaxLength = 300;
             this.txtInput08.Multiline = true;
             this.txtInput08.Name = "txtInput08";
@@ -896,7 +968,7 @@
             this.cmbChangeOrdersDivision.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
             this.cmbChangeOrdersDivision.Font = new System.Drawing.Font("ＭＳ 明朝", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
             this.cmbChangeOrdersDivision.FormattingEnabled = true;
-            this.cmbChangeOrdersDivision.Location = new System.Drawing.Point(153, 723);
+            this.cmbChangeOrdersDivision.Location = new System.Drawing.Point(153, 783);
             this.cmbChangeOrdersDivision.Name = "cmbChangeOrdersDivision";
             this.cmbChangeOrdersDivision.Size = new System.Drawing.Size(430, 24);
             this.cmbChangeOrdersDivision.TabIndex = 13;
@@ -907,7 +979,7 @@
             this.label13.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(128)))));
             this.label13.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
             this.label13.ForeColor = System.Drawing.Color.Black;
-            this.label13.Location = new System.Drawing.Point(3, 722);
+            this.label13.Location = new System.Drawing.Point(3, 782);
             this.label13.Name = "label13";
             this.label13.Size = new System.Drawing.Size(144, 25);
             this.label13.TabIndex = 44;
@@ -920,7 +992,7 @@
             this.label19.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(128)))));
             this.label19.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
             this.label19.ForeColor = System.Drawing.Color.Black;
-            this.label19.Location = new System.Drawing.Point(3, 632);
+            this.label19.Location = new System.Drawing.Point(3, 692);
             this.label19.Name = "label19";
             this.label19.Size = new System.Drawing.Size(144, 25);
             this.label19.TabIndex = 44;
@@ -933,7 +1005,7 @@
             this.label21.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(128)))));
             this.label21.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
             this.label21.ForeColor = System.Drawing.Color.Black;
-            this.label21.Location = new System.Drawing.Point(3, 662);
+            this.label21.Location = new System.Drawing.Point(3, 722);
             this.label21.Name = "label21";
             this.label21.Size = new System.Drawing.Size(144, 25);
             this.label21.TabIndex = 44;
@@ -947,7 +1019,7 @@
             this.lblEntryDate.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
             this.tableLayoutPanel1.SetColumnSpan(this.lblEntryDate, 2);
             this.lblEntryDate.ForeColor = System.Drawing.Color.Black;
-            this.lblEntryDate.Location = new System.Drawing.Point(153, 662);
+            this.lblEntryDate.Location = new System.Drawing.Point(153, 722);
             this.lblEntryDate.Name = "lblEntryDate";
             this.lblEntryDate.Size = new System.Drawing.Size(150, 25);
             this.lblEntryDate.TabIndex = 44;
@@ -960,7 +1032,7 @@
             this.lblEntryPerson.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
             this.tableLayoutPanel1.SetColumnSpan(this.lblEntryPerson, 2);
             this.lblEntryPerson.ForeColor = System.Drawing.Color.Black;
-            this.lblEntryPerson.Location = new System.Drawing.Point(153, 633);
+            this.lblEntryPerson.Location = new System.Drawing.Point(153, 693);
             this.lblEntryPerson.Name = "lblEntryPerson";
             this.lblEntryPerson.Size = new System.Drawing.Size(200, 23);
             this.lblEntryPerson.TabIndex = 44;
@@ -985,6 +1057,7 @@
             this.dgvMaster.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing;
             this.dgvMaster.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
             this.Column1,
+            this.Column4,
             this.Column2,
             this.Column3});
             this.dgvMaster.EditMode = System.Windows.Forms.DataGridViewEditMode.EditProgrammatically;
@@ -997,11 +1070,11 @@
             this.dgvMaster.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
             this.dgvMaster.Size = new System.Drawing.Size(540, 530);
             this.dgvMaster.TabIndex = 11;
-            this.dgvMaster.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvMaster_CellClick);
+            this.dgvMaster.CellDoubleClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvMaster_CellDoubleClick);
             // 
             // Column1
             // 
-            dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
+            dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
             dataGridViewCellStyle2.Font = new System.Drawing.Font("ＭＳ 明朝", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
             this.Column1.DefaultCellStyle = dataGridViewCellStyle2;
             this.Column1.Frozen = true;
@@ -1012,6 +1085,14 @@
             this.Column1.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
             this.Column1.Width = 80;
             // 
+            // Column4
+            // 
+            this.Column4.Frozen = true;
+            this.Column4.HeaderText = "発注者区分";
+            this.Column4.Name = "Column4";
+            this.Column4.ReadOnly = true;
+            this.Column4.Visible = false;
+            // 
             // Column2
             // 
             this.Column2.Frozen = true;
@@ -1032,32 +1113,6 @@
             this.Column3.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
             this.Column3.Width = 420;
             // 
-            // label23
-            // 
-            this.label23.BackColor = System.Drawing.Color.White;
-            this.label23.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
-            this.label23.ForeColor = System.Drawing.Color.Black;
-            this.label23.Location = new System.Drawing.Point(20, 35);
-            this.label23.Name = "label23";
-            this.label23.Size = new System.Drawing.Size(110, 27);
-            this.label23.TabIndex = 24;
-            this.label23.Text = "50音順";
-            this.label23.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
-            this.label23.Visible = false;
-            // 
-            // cmbJapaneseSyllabary
-            // 
-            this.cmbJapaneseSyllabary.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
-            this.cmbJapaneseSyllabary.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
-            this.cmbJapaneseSyllabary.Font = new System.Drawing.Font("ＭＳ 明朝", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
-            this.cmbJapaneseSyllabary.FormattingEnabled = true;
-            this.cmbJapaneseSyllabary.Location = new System.Drawing.Point(137, 35);
-            this.cmbJapaneseSyllabary.Name = "cmbJapaneseSyllabary";
-            this.cmbJapaneseSyllabary.Size = new System.Drawing.Size(100, 27);
-            this.cmbJapaneseSyllabary.TabIndex = 25;
-            this.cmbJapaneseSyllabary.TabStop = false;
-            this.cmbJapaneseSyllabary.Visible = false;
-            // 
             // FrmOrderers
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
@@ -1075,9 +1130,9 @@
             this.Controls.Add(this.lblEditMode);
             this.Controls.Add(this.dgvMaster);
             this.Controls.Add(this.label1);
-            this.Controls.Add(this.btnDataDelete);
             this.Controls.Add(this.btnDataEntry);
             this.Controls.Add(this.btnEnd);
+            this.Controls.Add(this.btnDataDelete);
             this.Controls.Add(this.btnSelect);
             this.Font = new System.Drawing.Font("ＭＳ 明朝", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
             this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Fixed3D;
@@ -1116,9 +1171,6 @@
         private System.Windows.Forms.Button btnDispUp;
         private System.Windows.Forms.Label label12;
         private System.Windows.Forms.ComboBox cmbDivision;
-        private System.Windows.Forms.DataGridViewTextBoxColumn Column1;
-        private System.Windows.Forms.DataGridViewTextBoxColumn Column2;
-        private System.Windows.Forms.DataGridViewTextBoxColumn Column3;
         private System.Windows.Forms.Panel panel2;
         private System.Windows.Forms.Button btnSelect;
         private System.Windows.Forms.Label label18;
@@ -1171,5 +1223,12 @@
         private System.Windows.Forms.Label lblEntryPerson;
         private System.Windows.Forms.Label label23;
         private System.Windows.Forms.ComboBox cmbJapaneseSyllabary;
+        private System.Windows.Forms.Label label22;
+        private System.Windows.Forms.TextBox txtInput13;
+        private System.Windows.Forms.Label label24;
+        private System.Windows.Forms.DataGridViewTextBoxColumn Column1;
+        private System.Windows.Forms.DataGridViewTextBoxColumn Column4;
+        private System.Windows.Forms.DataGridViewTextBoxColumn Column2;
+        private System.Windows.Forms.DataGridViewTextBoxColumn Column3;
     }
 }
\ No newline at end of file
Index: trunk/src/ProcessManagement/ProcessManagement/Forms/Master/Orderer/FrmOrderers.resx
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/Forms/Master/Orderer/FrmOrderers.resx	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/Forms/Master/Orderer/FrmOrderers.resx	(revision 484)
@@ -120,6 +120,9 @@
   <metadata name="Column1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
+  <metadata name="Column4.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
   <metadata name="Column2.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
Index: trunk/src/ProcessManagement/ProcessManagement/Forms/Master/PersonInCharge/FrmPersonInCharge.designer.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/Forms/Master/PersonInCharge/FrmPersonInCharge.designer.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/Forms/Master/PersonInCharge/FrmPersonInCharge.designer.cs	(revision 484)
@@ -775,7 +775,7 @@
             this.cmbLedgerFlg.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
             this.cmbLedgerFlg.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
             this.cmbLedgerFlg.FormattingEnabled = true;
-            this.cmbLedgerFlg.Location = new System.Drawing.Point(153, 1197);
+            this.cmbLedgerFlg.Location = new System.Drawing.Point(153, 1195);
             this.cmbLedgerFlg.Name = "cmbLedgerFlg";
             this.cmbLedgerFlg.Size = new System.Drawing.Size(144, 24);
             this.cmbLedgerFlg.TabIndex = 25;
@@ -864,7 +864,7 @@
             this.cmbSecManage.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
             this.cmbSecManage.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
             this.cmbSecManage.FormattingEnabled = true;
-            this.cmbSecManage.Location = new System.Drawing.Point(153, 1302);
+            this.cmbSecManage.Location = new System.Drawing.Point(153, 1300);
             this.cmbSecManage.Name = "cmbSecManage";
             this.cmbSecManage.Size = new System.Drawing.Size(294, 24);
             this.cmbSecManage.TabIndex = 28;
@@ -1298,7 +1298,7 @@
             this.cmbRefDepartment.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
             this.cmbRefDepartment.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
             this.cmbRefDepartment.FormattingEnabled = true;
-            this.cmbRefDepartment.Location = new System.Drawing.Point(7, 1547);
+            this.cmbRefDepartment.Location = new System.Drawing.Point(7, 1545);
             this.cmbRefDepartment.Name = "cmbRefDepartment";
             this.cmbRefDepartment.Size = new System.Drawing.Size(590, 24);
             this.cmbRefDepartment.TabIndex = 31;
@@ -1423,7 +1423,7 @@
             this.cmbDepartment.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
             this.cmbDepartment.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
             this.cmbDepartment.FormattingEnabled = true;
-            this.cmbDepartment.Location = new System.Drawing.Point(153, 777);
+            this.cmbDepartment.Location = new System.Drawing.Point(153, 775);
             this.cmbDepartment.Name = "cmbDepartment";
             this.cmbDepartment.Size = new System.Drawing.Size(444, 24);
             this.cmbDepartment.TabIndex = 20;
@@ -1973,7 +1973,7 @@
             this.cmbWorkingType.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
             this.cmbWorkingType.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
             this.cmbWorkingType.FormattingEnabled = true;
-            this.cmbWorkingType.Location = new System.Drawing.Point(153, 1652);
+            this.cmbWorkingType.Location = new System.Drawing.Point(153, 1650);
             this.cmbWorkingType.Name = "cmbWorkingType";
             this.cmbWorkingType.Size = new System.Drawing.Size(444, 24);
             this.cmbWorkingType.TabIndex = 34;
@@ -2143,7 +2143,6 @@
             this.rdbMode2.TabIndex = 21;
             this.rdbMode2.Text = "削除一覧";
             this.rdbMode2.UseVisualStyleBackColor = true;
-            this.rdbMode2.CheckedChanged += new System.EventHandler(this.rdbMode_CheckedChanged);
             // 
             // rdbMode1
             // 
Index: trunk/src/ProcessManagement/ProcessManagement/Forms/Master/PersonInCharge/FrmPersonInChargeAuxiliary.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/Forms/Master/PersonInCharge/FrmPersonInChargeAuxiliary.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/Forms/Master/PersonInCharge/FrmPersonInChargeAuxiliary.cs	(revision 484)
@@ -808,7 +808,8 @@
                 tableLayoutPanel1.VerticalScroll.Value = 0;
 
                 // 担当者マスタ取得SQL
-                string strSql = "SELECT A.*, B.SECNAME, B.SECRANK, B.SECRANGE FROM PERSONINCHARGEMASTER A";
+                string strSql = string.Format("SELECT {0}", IOMPersonInCharge.CreateFieldNameList("A."));
+                strSql += ", B.SECNAME, B.SECRANK, B.SECRANGE FROM PERSONINCHARGEMASTER A";
                 strSql += " LEFT JOIN SECURITYMASTER B ON B.SECCODE = A.SECCODE";
                 strSql += string.Format(" Where A.PersonCode = {0}", m_PersonCode);
                 ArrayList arList = new ArrayList();
Index: trunk/src/ProcessManagement/ProcessManagement/Forms/Master/Security/FrmSecurityAuxiliary.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/Forms/Master/Security/FrmSecurityAuxiliary.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/Forms/Master/Security/FrmSecurityAuxiliary.cs	(revision 484)
@@ -645,8 +645,7 @@
                 // 起動対象マスタ取得
                 StringBuilder strSQL = new StringBuilder();
                 strSQL.Append("SELECT");
-                //strSQL.Append(CreateFeildSQL("A."));
-                strSQL.Append(" A.*");
+                strSQL.AppendFormat(" {0}", IOMSecurity.CreateFieldNameList("A."));
                 strSQL.Append(", B.EXECCODE");
                 strSQL.Append(", B.EDITFLG");
                 strSQL.Append(" FROM SECURITYMASTER A");
Index: trunk/src/ProcessManagement/ProcessManagement/Forms/Master/SubContractor/FrmSubContractorAuxiliary.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/Forms/Master/SubContractor/FrmSubContractorAuxiliary.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/Forms/Master/SubContractor/FrmSubContractorAuxiliary.cs	(revision 484)
@@ -2366,7 +2366,9 @@
 
                 StringBuilder strSQL = new StringBuilder();
                 strSQL.Append("Select Distinct JapaneseSyllabary From SubContractorMaster");
-                strSQL.AppendFormat(" WHERE DELETEFLG = {0} Order By JapaneseSyllabary", (int)CommonDefine.DataDeleteDef.Exists);
+                strSQL.Append(" WHERE Length(JapaneseSyllabary) > 0");
+                strSQL.AppendFormat(" And DELETEFLG = {0}", (int)CommonDefine.DataDeleteDef.Exists);
+                strSQL.Append(" Order By JapaneseSyllabary");
                 ArrayList arData = new ArrayList();
                 if (!sbDB.ExecuteReader(strSQL.ToString(), ref arData)) return;
                 if (arData.Count == 0) return;
Index: trunk/src/ProcessManagement/ProcessManagement/Forms/SubForms/FrmComponentDiag.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/Forms/SubForms/FrmComponentDiag.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/Forms/SubForms/FrmComponentDiag.cs	(revision 484)
@@ -389,7 +389,7 @@
                 else
                 {
                     strSQL.Append("Select");
-                    strSQL.Append(" A.*");
+                    strSQL.AppendFormat(" {0}",IOMComponent.CreateFieldNameList("A."));
                     strSQL.Append(", B.TypeCode");
                     strSQL.Append(", C.NameString");
                     strSQL.Append(" From componentmaster AS A");
Index: trunk/src/ProcessManagement/ProcessManagement/Forms/SubForms/FrmConstructionDiag.Designer.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/Forms/SubForms/FrmConstructionDiag.Designer.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/Forms/SubForms/FrmConstructionDiag.Designer.cs	(revision 484)
@@ -47,6 +47,8 @@
             this.Column2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.Column4 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.Column6 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.Column9 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.Column10 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             ((System.ComponentModel.ISupportInitialize)(this.dgvMaster)).BeginInit();
             this.SuspendLayout();
             // 
@@ -117,7 +119,9 @@
             this.Column7,
             this.Column2,
             this.Column4,
-            this.Column6});
+            this.Column6,
+            this.Column9,
+            this.Column10});
             this.dgvMaster.EnableHeadersVisualStyles = false;
             this.dgvMaster.Location = new System.Drawing.Point(12, 8);
             this.dgvMaster.Name = "dgvMaster";
@@ -214,6 +218,18 @@
             this.Column6.ReadOnly = true;
             this.Column6.Visible = false;
             // 
+            // Column9
+            // 
+            this.Column9.HeaderText = "担当者コード";
+            this.Column9.Name = "Column9";
+            this.Column9.Visible = false;
+            // 
+            // Column10
+            // 
+            this.Column10.HeaderText = "担当名";
+            this.Column10.Name = "Column10";
+            this.Column10.Visible = false;
+            // 
             // FrmConstructionDiag
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
@@ -253,5 +269,7 @@
         private System.Windows.Forms.DataGridViewTextBoxColumn Column2;
         private System.Windows.Forms.DataGridViewTextBoxColumn Column4;
         private System.Windows.Forms.DataGridViewTextBoxColumn Column6;
+        private System.Windows.Forms.DataGridViewTextBoxColumn Column9;
+        private System.Windows.Forms.DataGridViewTextBoxColumn Column10;
     }
 }
\ No newline at end of file
Index: trunk/src/ProcessManagement/ProcessManagement/Forms/SubForms/FrmConstructionDiag.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/Forms/SubForms/FrmConstructionDiag.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/Forms/SubForms/FrmConstructionDiag.cs	(revision 484)
@@ -34,10 +34,12 @@
             DispConstructionCode,
             ConstructionYear,
             ConstructionName,
-            ConstructionPersonName,
+            ConstrPersonName,
             ConstructionCode,
             OrderersDivision,
             OrderersCode,
+            PersonCode,
+            PersonName,
         }
 
         /// <summary>
@@ -110,6 +112,11 @@
         private int m_PersonCode = 0;
 
         /// <summary>
+        /// 担当者名
+        /// </summary>
+        private string m_PersonName = string.Empty;
+
+        /// <summary>
         /// 検索先担当者位置
         /// </summary>
         private int m_PersonCharge = 0;
@@ -170,6 +177,15 @@
         }
 
         /// <summary>
+        /// 担当者名
+        /// </summary>
+        public string PersonName
+        {
+            get { return m_PersonName; }
+            set { m_PersonName = value; }
+        }
+
+        /// <summary>
         /// 工事番号
         /// </summary>
         public int ConstructionCode
@@ -398,6 +414,10 @@
                 m_ConstructionCode = CommonMotions.cnvInt(dgvRow.Cells[(int)DispGridCol.ConstructionCode].Value);
                 // 工事名称取得
                 m_ConstructionName = CommonMotions.cnvString(dgvRow.Cells[(int)DispGridCol.ConstructionName].Value);
+                // 工事担当者名
+                m_PersonName = CommonMotions.cnvString(dgvRow.Cells[(int)DispGridCol.PersonName].Value);
+                // 工事担当者コード
+                m_PersonCode = CommonMotions.cnvInt(dgvRow.Cells[(int)DispGridCol.PersonCode].Value);
 
                 if (m_ProcessNo == (int)ClsExcute.ProcessExecuteNo.OrderJoin)
                 {
@@ -488,10 +508,12 @@
                     CurRow.Cells[(int)DispGridCol.DispConstructionCode].Value = EditConstructionCode;
                     CurRow.Cells[(int)DispGridCol.ConstructionYear].Value = CommonMotions.cnvInt(wrk[5]);
                     CurRow.Cells[(int)DispGridCol.ConstructionName].Value = CommonMotions.cnvString(wrk[1]);
-                    CurRow.Cells[(int)DispGridCol.ConstructionPersonName].Value = CommonMotions.cnvString(wrk[4]);
+                    CurRow.Cells[(int)DispGridCol.ConstrPersonName].Value = CommonMotions.cnvString(wrk[4]);
                     CurRow.Cells[(int)DispGridCol.ConstructionCode].Value = ConstructionCode;
                     CurRow.Cells[(int)DispGridCol.OrderersDivision].Value = iData[0];
                     CurRow.Cells[(int)DispGridCol.OrderersCode].Value = iData[1];
+                    CurRow.Cells[(int)DispGridCol.PersonCode].Value = CommonMotions.cnvString(wrk[6]);
+                    CurRow.Cells[(int)DispGridCol.PersonName].Value = CommonMotions.cnvString(wrk[7]);
 
                     dgv.Rows[i++].Cells[(int)DispGridCol.ConstructionName].ToolTipText = CommonMotions.cnvString(wrk[1]);
                 }
@@ -531,6 +553,8 @@
                     strSQL.Append(", A.ConstructionPeriod");
                 else
                     strSQL.Append(", A.ConstructionYear");
+                strSQL.Append(", D.PERSONCODE");
+                strSQL.Append(", D.SealPrintName");
                 strSQL.Append(" FROM");
                 strSQL.Append(" CONSTRUCTIONBASEINFO A");
                 strSQL.Append(" INNER JOIN CONSTRUCTIONBASEINFODETAIL B");
@@ -649,6 +673,8 @@
                 strSQL.Append("    , ''");
                 strSQL.Append("    , UNI.PERSONNAME");
                 strSQL.Append("    , UNI.ConstrYear");
+                strSQL.Append("    , UNI.PERSONCODE");
+                strSQL.Append("    , UNI.PRINTNAME");
                 strSQL.Append(" FROM (SELECT");
                 strSQL.Append("            A1.CONSTRUCTIONCODE AS CONSTRUCTIONCODE");
                 strSQL.Append("          , B1.DETAILSTRING AS DETAILSTRING");
@@ -658,6 +684,8 @@
                     strSQL.Append("      , A1.ConstructionPeriod As ConstrYear");
                 else
                     strSQL.Append("      , A1.ConstructionYear As ConstrYear");
+                strSQL.Append("          , P1.PERSONCODE AS PERSONCODE");
+                strSQL.Append("          , P1.SealPrintName AS PRINTNAME");
                 strSQL.Append("       FROM CONSTRUCTIONBASEINFO A1");
                 strSQL.Append("       INNER JOIN CONSTRUCTIONBASEINFODETAIL B1");
                 strSQL.Append("             ON A1.CONSTRUCTIONCODE = B1.CONSTRUCTIONCODE");
@@ -691,6 +719,8 @@
                     strSQL.Append("               , A2.ConstructionPeriod As ConstrYear");
                 else
                     strSQL.Append("               , A2.ConstructionYear As ConstrYear");
+                strSQL.Append("                   , P2.PERSONCODE AS PERSONCODE");
+                strSQL.Append("                   , P2.SealPrintName AS PRINTNAME");
                 strSQL.Append("                FROM CONSTRUCTIONBASEINFO A2");
                 strSQL.Append("                INNER JOIN CONSTRUCTIONBASEINFODETAIL B2");
                 strSQL.Append("                      ON A2.CONSTRUCTIONCODE = B2.CONSTRUCTIONCODE");
@@ -744,6 +774,8 @@
                 strSQL.Append("    , ''");
                 strSQL.Append("    , UNI.PERSONNAME");
                 strSQL.Append("    , UNI.ConstrYear");
+                strSQL.Append("    , UNI.PERSONCODE");
+                strSQL.Append("    , UNI.SealPrintName");
                 strSQL.Append(" FROM (SELECT");
                 strSQL.Append("            A1.CONSTRUCTIONCODE AS CONSTRUCTIONCODE");
                 strSQL.Append("          , B1.DETAILSTRING AS DETAILSTRING");
@@ -753,6 +785,8 @@
                     strSQL.Append("      , A1.ConstructionPeriod As ConstrYear");
                 else
                     strSQL.Append("      , A1.ConstructionYear As ConstrYear");
+                strSQL.Append("          , P1.PersonCode AS PERSONCODE");
+                strSQL.Append("          , P1.SealPrintName AS SealPrintName");
                 strSQL.Append("       FROM CONSTRUCTIONBASEINFO A1");
                 strSQL.Append("       INNER JOIN CONSTRUCTIONBASEINFODETAIL B1");
                 strSQL.Append("             ON A1.CONSTRUCTIONCODE = B1.CONSTRUCTIONCODE");
@@ -786,6 +820,8 @@
                     strSQL.Append("               , A2.ConstructionPeriod As ConstrYear");
                 else
                     strSQL.Append("               , A2.ConstructionYear As ConstrYear");
+                strSQL.Append("                   , P2.PERSONCODE AS PERSONCODE");
+                strSQL.Append("                   , P2.SealPrintName AS SealPrintName");
                 strSQL.Append("                FROM CONSTRUCTIONBASEINFO A2");
                 strSQL.Append("                INNER JOIN CONSTRUCTIONBASEINFODETAIL B2");
                 strSQL.Append("                      ON A2.CONSTRUCTIONCODE = B2.CONSTRUCTIONCODE");
@@ -842,6 +878,8 @@
                     strSQL.Append(" , A.ConstructionPeriod");
                 else
                     strSQL.Append(" , A.ConstructionYear");
+                strSQL.Append("     , C.PERSONCODE");
+                strSQL.Append("     , C.SealPrintName");
                 strSQL.Append(" FROM CONSTRUCTIONBASEINFO A");
                 strSQL.Append("    , CONSTRUCTIONBASEINFODETAIL B");
                 strSQL.Append("    , PERSONINCHARGEMASTER C");
@@ -913,7 +951,9 @@
                     string strdtEnd = CommonMotions.GetOpeningEndDate(nTargetYear, false).ToShortDateString();
 
                     StringBuilder strChgDep = new StringBuilder();
-                    strChgDep.Append(" (Select * From chgchargedep As H");
+                    strChgDep.Append(" (Select");
+                    strChgDep.AppendFormat(" {0}", IOMChgChargeDep.CreateFieldNameList("H."));
+                    strChgDep.Append(" From chgchargedep As H");
                     strChgDep.AppendFormat(" Where (DATE(H.StartDate) <= DATE('{0}')", strdtEnd);
                     strChgDep.AppendFormat(" And DATE('{0}') <= DATE(H.CompDate)))", strdtStart);
 
Index: trunk/src/ProcessManagement/ProcessManagement/Forms/SubForms/FrmConstructionDiag.resx
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/Forms/SubForms/FrmConstructionDiag.resx	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/Forms/SubForms/FrmConstructionDiag.resx	(revision 484)
@@ -141,4 +141,10 @@
   <metadata name="Column6.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
+  <metadata name="Column9.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="Column10.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
 </root>
\ No newline at end of file
Index: trunk/src/ProcessManagement/ProcessManagement/Forms/SubForms/FrmSubconstractorDiag.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/Forms/SubForms/FrmSubconstractorDiag.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/Forms/SubForms/FrmSubconstractorDiag.cs	(revision 484)
@@ -851,7 +851,11 @@
                 ArrayList isdList = new ArrayList();
                 // SQL作成増減工事を含む履歴を表示する
                 StringBuilder strSQL = new StringBuilder();
-                strSQL.Append("Select B.*, A.DataType, A.InputCode From inputsearchlogdata As A");
+                strSQL.Append("Select");
+                strSQL.AppendFormat(" {0}", IOMSubContractor.CreateFieldNameList("B."));
+                strSQL.Append(", A.DataType");
+                strSQL.Append(", A.InputCode");
+                strSQL.Append(" From inputsearchlogdata As A");
                 strSQL.Append(" Inner Join subcontractormaster As B On B.CompanyCode = A.InputCode");
 
                 strSQL.AppendFormat(" Where TRUNCATE((A.ConstructionCode / 100), 0) = {0}"
Index: trunk/src/ProcessManagement/ProcessManagement/Forms/SubForms/FrmValueOfOrder.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/Forms/SubForms/FrmValueOfOrder.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/Forms/SubForms/FrmValueOfOrder.cs	(revision 484)
@@ -587,11 +587,11 @@
                 PriceRec.ChangePersonCode = CommonMotions.LoginUserData.PersonCode;
                 PriceRec.ChangePersonName = CommonMotions.LoginUserData.PersonName;
 
-                PriceRec.BeforeValue = CommonMotions.cnvInt(lbl001.Text);
-                PriceRec.BeforeValueInTax = CommonMotions.cnvInt(lbl002.Text);
+                PriceRec.BeforeValue = CommonMotions.cnvLong(lbl001.Text);
+                PriceRec.BeforeValueInTax = CommonMotions.cnvLong(lbl002.Text);
 
-                PriceRec.AfterValue = CommonMotions.cnvInt(textBox001.Text);
-                PriceRec.AfterValueInTax = CommonMotions.cnvInt(textBox002.Text);
+                PriceRec.AfterValue = CommonMotions.cnvLong(textBox001.Text);
+                PriceRec.AfterValueInTax = CommonMotions.cnvLong(textBox002.Text);
                 PriceRec.ChangeComment = CommonMotions.cnvString(textBox003.Text);
 
                 if (!PriceDB.InsertAction(PriceRec, false))
Index: trunk/src/ProcessManagement/ProcessManagement/Forms/ZMenu/FrmMenu.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/Forms/ZMenu/FrmMenu.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/Forms/ZMenu/FrmMenu.cs	(revision 484)
@@ -520,9 +520,9 @@
                                                                     (int)ClsExcute.MaintenanceExecuteNo.MaterialKind,
                                                                     (int)ClsExcute.MaintenanceExecuteNo.MaterialItem
                                                                 },
-                                                                { (int)ClsExcute.MaintenanceExecuteNo.BankBusinessDay,
+                                                                { (int)ClsExcute.MaintenanceExecuteNo.AverageScore,
+                                                                    (int)ClsExcute.MaintenanceExecuteNo.EvalScore,
                                                                     0,
-                                                                    0,
                                                                     (int)ClsExcute.MaintenanceExecuteNo.SalesConfirm
                                                                 },
         };
Index: trunk/src/ProcessManagement/ProcessManagement/Forms/ZMenu/FrmMenuAuxiliary.cs
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/Forms/ZMenu/FrmMenuAuxiliary.cs	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/Forms/ZMenu/FrmMenuAuxiliary.cs	(revision 484)
@@ -2405,7 +2405,7 @@
         /// <summary>
         /// 掲示板データセット
         /// </summary>
-        private void SetMessageBoardGrid(MessageBoardData wrkRow, int exeflg, string TergetName)
+        private void SetMessageBoardGrid(MessageBoardData wrkRow, int exeflg, string TergetName, bool Browsing)
         {
             try
             {
@@ -2415,11 +2415,10 @@
                 string strDateTime = string.Format("{0} {1}:{2}", wrkRow.WritingDate.ToShortDateString()
                                                                 , wrkRow.WritingDate.Hour.ToString("00")
                                                                 , wrkRow.WritingDate.Minute.ToString("00"));
-                int cnt = 0;
+                int cnt = dgv.Rows.Add(1);
+                DataGridViewRow CurRow = dgv.Rows[cnt];
                 if (exeflg == (int)TabNameEnum.MessageBoard)
                 {
-                    cnt = dgv.Rows.Add(1);
-                    DataGridViewRow CurRow = dgv.Rows[cnt];
                     CurRow.Cells[(int)MessageGridCount.RecordNumber].Value = wrkRow.RecordNumber;
                     CurRow.Cells[(int)MessageGridCount.BranchNumber].Value = wrkRow.BranchNumber;
                     CurRow.Cells[(int)MessageGridCount.FromName].Value = wrkRow.FromName;
@@ -2436,8 +2435,6 @@
                 }
                 else
                 {
-                    cnt = dgv.Rows.Add(1);
-                    DataGridViewRow CurRow = dgv.Rows[cnt];
                     CurRow.Cells[(int)MessageGridCount2.RecordNumber].Value = wrkRow.RecordNumber;
                     CurRow.Cells[(int)MessageGridCount2.BranchNumber].Value = wrkRow.BranchNumber;
                     CurRow.Cells[(int)MessageGridCount2.FromName].Value = wrkRow.FromName;
@@ -2467,6 +2464,20 @@
                     Color tmpcolor = ColorTranslator.FromHtml(wrkRow.BackColor);
                     dgv.Rows[cnt].Cells[(int)MessageGridCount.ToName].Style.BackColor = tmpcolor;
                 }
+
+                // 未読時は以下を処理しない
+                if (!Browsing) return;
+
+                // 既読時文字色変更
+                if (exeflg == (int)TabNameEnum.MessageBoard)
+                {
+                    CurRow.Cells[(int)MessageGridCount.MessageTitle].Style.ForeColor = Color.LightGray;
+                }
+                else
+                {
+                    CurRow.Cells[(int)MessageGridCount2.MessageTitle].Style.ForeColor = Color.LightGray;
+                    CurRow.Cells[(int)MessageGridCount2.MessageContent].Style.ForeColor = Color.LightGray;
+                }
             }
             catch (Exception ex)
             {
@@ -2484,15 +2495,22 @@
             try
             {
                 strSQL.Append("SELECT");
-                strSQL.Append(" A.*");
+                strSQL.AppendFormat(" {0}", IOMessageBoardData.CreateFieldNameList("A."));
                 strSQL.Append(", B.TONAME");
                 strSQL.Append(", B.TOCODE");
+                strSQL.Append(", DATE(C.BrowsingDate)");
                 strSQL.Append(" FROM");
-                strSQL.Append(" MESSAGEBOARDDATA A");
-                strSQL.Append(" INNER JOIN MESSAGEBOARDTERGET B");
+                strSQL.Append(" MESSAGEBOARDDATA As A");
+
+                strSQL.Append(" INNER JOIN MESSAGEBOARDTERGET As B");
                 strSQL.Append("        ON B.RECORDNUMBER = A.RECORDNUMBER");
                 strSQL.Append("        AND B.BRANCHNUMBER = A.BRANCHNUMBER");
 
+                strSQL.Append(" LEFT JOIN MESSAGEBROWSINGHISTORY As C");
+                strSQL.Append("       On C.RecordNumber = A.RecordNumber");
+                strSQL.Append("       And C.BranchNumber = A.BranchNumber");
+                strSQL.AppendFormat(" And C.BrowsingCode = {0}", CommonMotions.LoginUserData.PersonCode);
+
                 strSQL.Append(" Where");
                 switch (exeflg)
                 {
@@ -2737,6 +2755,8 @@
 
                 // 掲示板データフィールド数取得
                 int ToNameCnt = Enum.GetNames(typeof(IOMessageBoardData.ColumnCnt)).Length;
+                int ToCodeCnt = ToNameCnt + 1;
+                int nBrowsingDate = ToCodeCnt + 1;
                 // 部署引継色を文字列で取得
                 string cBackColor = String.Format("0x{0:X2}{1:X2}{2:X2}", CommonDefine.s_SuccessionBackColor.R
                                                         , CommonDefine.s_SuccessionBackColor.G
@@ -2750,6 +2770,7 @@
                 mbdDB.Reader2Struct(firstRec, ref wrkRow);
                 StringBuilder TergetName = new StringBuilder();
                 List<int> TergetCode = new List<int>();
+                bool bBrowsing = false;
                 foreach (object[] DataRec in mbdData)
                 {
                     // 同じメッセージならば相手先を結合する
@@ -2759,7 +2780,12 @@
                     {
                         if (TergetName.Length != 0) TergetName.Append(",");
                         TergetName.Append(CommonMotions.cnvString(DataRec[ToNameCnt]));
-                        TergetCode.Add(CommonMotions.cnvInt(DataRec[ToNameCnt + 1]));
+                        TergetCode.Add(CommonMotions.cnvInt(DataRec[ToCodeCnt]));
+                        // 閲覧日付確認
+                        if (CommonMotions.cnvDate(DataRec[nBrowsingDate]) == DateTime.MinValue.Date)
+                            bBrowsing = false;
+                        else
+                            bBrowsing = true;
                         continue;
                     }
 
@@ -2774,14 +2800,6 @@
                             bool bMatch = false;
                             int nDataCnt = TergetCode.Where(x => x == CommonMotions.LoginUserData.PersonCode).Count();
                             if (nDataCnt > 0) bMatch = true;
-                            //foreach (int CurCode in TergetCode)
-                            //{
-                            //    if (CurCode == CommonMotions.LoginUserData.PersonCode)
-                            //    {
-                            //        bMatch = true;
-                            //        break;
-                            //    }
-                            //}
                             // 書込み者がログイン者
                             if (wrkRow.FromCode == CommonMotions.LoginUserData.PersonCode) bMatch = true;
 
@@ -2791,7 +2809,7 @@
                     }
 
                     // データセット
-                    SetMessageBoardGrid(wrkRow, exeflg, TergetName.ToString());
+                    SetMessageBoardGrid(wrkRow, exeflg, TergetName.ToString(), bBrowsing);
                     nProgCount++;
 
                 AfterSet:
@@ -2805,7 +2823,12 @@
                     TergetName.Clear();
                     TergetCode.Clear();
                     TergetName.Append(CommonMotions.cnvString(DataRec[ToNameCnt]));
-                    TergetCode.Add(CommonMotions.cnvInt(DataRec[ToNameCnt+1]));
+                    TergetCode.Add(CommonMotions.cnvInt(DataRec[ToCodeCnt]));
+                    // 閲覧日付確認
+                    if (CommonMotions.cnvDate(DataRec[nBrowsingDate]) == DateTime.MinValue.Date)
+                        bBrowsing = false;
+                    else
+                        bBrowsing = true;
 
                     // ProgressBarの値を変更する
                     prgber.Value = nProgCount;
@@ -2815,7 +2838,7 @@
                 if (TergetName.Length != 0)
                 {
                     // データセット
-                    SetMessageBoardGrid(wrkRow, exeflg, TergetName.ToString());
+                    SetMessageBoardGrid(wrkRow, exeflg, TergetName.ToString(), bBrowsing);
                 }
 
                 // ProgressBarの値を変更する
@@ -4175,8 +4198,8 @@
                 strSQL.Append(", A.ENDDATE");
                 strSQL.Append(", G.APPROVALCODE");
                 strSQL.Append(", IFNULL(G.APPROVALSTATUS, -1)");
-                strSQL.Append(", A.*");
-                strSQL.Append(", Btbl.*");
+                strSQL.AppendFormat(", {0}", IOConstructionBaseInfo.CreateFieldNameList("A."));
+                strSQL.AppendFormat(", {0}", IOPeriodAvoidance.CreateFieldNameList("Btbl."));
                 strSQL.Append(" FROM CONSTRUCTIONBASEINFO A");
 
                 // 工事検索時は検索画面の値をセットする
@@ -4448,8 +4471,8 @@
                 strSQL.Append(", A.ENDDATE");
                 strSQL.Append(", G.APPROVALCODE");
                 strSQL.Append(", IFNULL(G.APPROVALSTATUS, -1)");
-                strSQL.Append(", A.*");
-                strSQL.Append(", Btbl.*");
+                strSQL.AppendFormat(", {0}", IOConstructionBaseInfo.CreateFieldNameList("A."));
+                strSQL.AppendFormat(", {0}", IOPeriodAvoidance.CreateFieldNameList("Btbl."));
                 strSQL.Append(" FROM CONSTRUCTIONBASEINFO A");
 
                 // 工事検索時は検索画面の値をセットする
@@ -4701,8 +4724,18 @@
                 else
                     strSQL.Append(", A.ConstructionYear");
 
-                strSQL.Append(", B.DETAILNO, B.DETAILSTRING, A.ConstructionStatusFlg,");
-                strSQL.Append(" A.EstimatesSubmitDeadline, C.PERSONNAME, D.PERSONNAME, A.STARTDATE, A.ENDDATE, G.APPROVALCODE, IFNULL(G.APPROVALSTATUS, -1), A.*, Btbl.*");
+                strSQL.Append(", B.DETAILNO");
+                strSQL.Append(", B.DETAILSTRING");
+                strSQL.Append(", A.ConstructionStatusFlg");
+                strSQL.Append(", A.EstimatesSubmitDeadline");
+                strSQL.Append(", C.PERSONNAME");
+                strSQL.Append(", D.PERSONNAME");
+                strSQL.Append(", A.STARTDATE");
+                strSQL.Append(", A.ENDDATE");
+                strSQL.Append(", G.APPROVALCODE");
+                strSQL.Append(", IFNULL(G.APPROVALSTATUS, -1)");
+                strSQL.AppendFormat(", {0}", IOConstructionBaseInfo.CreateFieldNameList("A."));
+                strSQL.AppendFormat(", {0}", IOPeriodAvoidance.CreateFieldNameList("Btbl."));
                 strSQL.Append(" FROM CONSTRUCTIONBASEINFO A");
 
                 // 工事検索時は検索画面の値をセットする
@@ -4989,8 +5022,8 @@
                 strSQL.Append(", D.DepartmentCode");
                 strSQL.Append(", G.APPROVALCODE");
                 strSQL.Append(", IFNULL(G.APPROVALSTATUS, -1)");
-                strSQL.Append(", A.*");
-                strSQL.Append(", Btbl.*");
+                strSQL.AppendFormat(", {0}", IOConstructionBaseInfo.CreateFieldNameList("A."));
+                strSQL.AppendFormat(", {0}", IOPeriodAvoidance.CreateFieldNameList("Btbl."));
                 strSQL.Append(" FROM CONSTRUCTIONBASEINFO AS A");
 
                 // 工事検索時は検索画面の値をセットする
@@ -5610,9 +5643,21 @@
                 else
                     strSQL1.Append(", A.ConstructionYear");
 
-                strSQL1.Append(", B.DETAILNO, B.DETAILSTRING, A.ConstructionStatusFlg,");
-                strSQL1.Append(" A.EstimatesSubmitDeadline, C.PERSONNAME, D.PERSONNAME, E.PERSONNAME, F.PERSONNAME, D.DepartmentCode,");
-                strSQL1.Append(" G.APPROVALCODE, IFNULL(G.APPROVALSTATUS, -1), TRUNCATE(A.ConstructionCode / 100, 0), MOD(A.ConstructionCode ,100), A.*, Btbl.*");
+                strSQL1.Append(", B.DETAILNO");
+                strSQL1.Append(", B.DETAILSTRING");
+                strSQL1.Append(", A.ConstructionStatusFlg");
+                strSQL1.Append(", A.EstimatesSubmitDeadline");
+                strSQL1.Append(", C.PERSONNAME");
+                strSQL1.Append(", D.PERSONNAME");
+                strSQL1.Append(", E.PERSONNAME");
+                strSQL1.Append(", F.PERSONNAME");
+                strSQL1.Append(", D.DepartmentCode");
+                strSQL1.Append(", G.APPROVALCODE");
+                strSQL1.Append(", IFNULL(G.APPROVALSTATUS, -1)");
+                strSQL1.Append(", TRUNCATE(A.ConstructionCode / 100, 0)");
+                strSQL1.Append(", MOD(A.ConstructionCode ,100)");
+                strSQL1.AppendFormat(", {0}", IOConstructionBaseInfo.CreateFieldNameList("A."));
+                strSQL1.AppendFormat(", {0}", IOPeriodAvoidance.CreateFieldNameList("Btbl."));
 
                 strSQL1.Append(" FROM CONSTRUCTIONBASEINFO A");
 
@@ -6015,7 +6060,8 @@
                 strSQL.Append(", B.DETAILSTRING");
                 strSQL.Append(", A.ConstructionStatusFlg");
                 strSQL.Append(", A.EstimatesSubmitDeadline");
-                strSQL.Append(", C.PERSONNAME, A.* ");
+                strSQL.Append(", C.PERSONNAME");
+                strSQL.AppendFormat(", {0} ", IOConstructionBaseInfo.CreateFieldNameList("A."));
                 strSQL.Append(" FROM CONSTRUCTIONBASEINFO A");
 
                 // 工事検索時は検索画面の値をセットする
@@ -6286,7 +6332,8 @@
                 strSQL.Append(", A.ConstructionCompletionDate");
                 strSQL.Append(", C.PERSONNAME");
                 strSQL.Append(", D.PERSONNAME");
-                strSQL.Append(", A.*, Btbl.*");
+                strSQL.AppendFormat(", {0}", IOConstructionBaseInfo.CreateFieldNameList("A."));
+                strSQL.AppendFormat(", {0}", IOPeriodAvoidance.CreateFieldNameList("Btbl."));
                 strSQL.Append(" FROM CONSTRUCTIONBASEINFO A");
                 strSQL.Append(" LEFT JOIN  PERSONINCHARGEMASTER D");
                 strSQL.Append(" ON D.PERSONCODE = A.CONSTRUCTIONPERSONCODE");
Index: trunk/src/ProcessManagement/ProcessManagement/OperationManual/137.pdf
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: trunk/src/ProcessManagement/ProcessManagement/OperationManual/137.pdf
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/OperationManual/137.pdf	(nonexistent)
+++ trunk/src/ProcessManagement/ProcessManagement/OperationManual/137.pdf	(revision 484)

Property changes on: trunk/src/ProcessManagement/ProcessManagement/OperationManual/137.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: trunk/src/ProcessManagement/ProcessManagement/OperationManual/138.pdf
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: trunk/src/ProcessManagement/ProcessManagement/OperationManual/138.pdf
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/OperationManual/138.pdf	(nonexistent)
+++ trunk/src/ProcessManagement/ProcessManagement/OperationManual/138.pdf	(revision 484)

Property changes on: trunk/src/ProcessManagement/ProcessManagement/OperationManual/138.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: trunk/src/ProcessManagement/ProcessManagement/ProcessManagement.csproj
===================================================================
--- trunk/src/ProcessManagement/ProcessManagement/ProcessManagement.csproj	(revision 483)
+++ trunk/src/ProcessManagement/ProcessManagement/ProcessManagement.csproj	(revision 484)
@@ -362,6 +362,15 @@
     <Compile Include="Forms\DataEntry\ApprovalScreen\FrmInputDate.Designer.cs">
       <DependentUpon>FrmInputDate.cs</DependentUpon>
     </Compile>
+    <Compile Include="Forms\DataEntry\AverageScore\FrmAverageScoreAux.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="Forms\DataEntry\AverageScore\FrmAverageScore.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="Forms\DataEntry\AverageScore\FrmAverageScore.designer.cs">
+      <DependentUpon>FrmAverageScore.cs</DependentUpon>
+    </Compile>
     <Compile Include="Forms\DataEntry\ConstructionBaseInfo\DataChange.cs">
       <SubType>Form</SubType>
     </Compile>
@@ -1047,6 +1056,15 @@
     <Compile Include="Forms\Master\Department\FrmDepartmentAux.cs">
       <SubType>Form</SubType>
     </Compile>
+    <Compile Include="Forms\Master\EvalScore\FrmEvalScoreAux.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="Forms\Master\EvalScore\FrmEvalScore.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="Forms\Master\EvalScore\FrmEvalScore.designer.cs">
+      <DependentUpon>FrmEvalScore.cs</DependentUpon>
+    </Compile>
     <Compile Include="Forms\Master\Material\MaterialItemsMaster\FrmMaterialItemsMaster.cs">
       <SubType>Form</SubType>
     </Compile>
@@ -1754,6 +1772,9 @@
     <EmbeddedResource Include="Forms\DataEntry\ApprovalScreen\FrmInputDate.resx">
       <DependentUpon>FrmInputDate.cs</DependentUpon>
     </EmbeddedResource>
+    <EmbeddedResource Include="Forms\DataEntry\AverageScore\FrmAverageScore.resx">
+      <DependentUpon>FrmAverageScore.cs</DependentUpon>
+    </EmbeddedResource>
     <EmbeddedResource Include="Forms\DataEntry\ConstructionBaseInfo\FrmBillDateInfo.resx">
       <DependentUpon>FrmBillDateInfo.cs</DependentUpon>
     </EmbeddedResource>
@@ -1934,6 +1955,9 @@
     <EmbeddedResource Include="Forms\Master\CompTypeLink\FrmCompTypeLink.resx">
       <DependentUpon>FrmCompTypeLink.cs</DependentUpon>
     </EmbeddedResource>
+    <EmbeddedResource Include="Forms\Master\EvalScore\FrmEvalScore.resx">
+      <DependentUpon>FrmEvalScore.cs</DependentUpon>
+    </EmbeddedResource>
     <EmbeddedResource Include="Forms\Master\Material\MaterialItemsMaster\FrmMaterialItemsMaster.resx">
       <DependentUpon>FrmMaterialItemsMaster.cs</DependentUpon>
     </EmbeddedResource>
@@ -2389,6 +2413,12 @@
     <None Include="OperationManual\136.pdf">
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </None>
+    <None Include="OperationManual\137.pdf">
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </None>
+    <None Include="OperationManual\138.pdf">
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </None>
     <None Include="OperationManual\14.pdf">
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </None>
