Index: branches/src/ProcessManagement/ProcessManagement/Common/CommonMotions.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Common/CommonMotions.cs	(revision 334)
+++ branches/src/ProcessManagement/ProcessManagement/Common/CommonMotions.cs	(revision 335)
@@ -2780,6 +2780,7 @@
             try
             {
 
+                DateTime dtDefaultStart = CommonMotions.GetOpeningEndDate(TargetYear, true);
                 DateTime dtDefaultEnd = CommonMotions.GetOpeningEndDate(TargetYear, false);
 
                 StringBuilder strSQL = new StringBuilder();
@@ -2794,6 +2795,7 @@
                 strSQL.Append(" constructionbaseinfo As Base");
                 strSQL.Append(" Inner Join constructionledger As Ledger");
                 strSQL.Append("       On Ledger.ConstructionCode = Base.ConstructionCode");
+                strSQL.AppendFormat("  And DATE('{0}') <= DATE(Ledger.ConstructionEnd)", dtDefaultStart.ToShortDateString());
                 strSQL.Append(" Inner Join constructionledgerdetail As LDetail");
                 strSQL.Append("       On LDetail.ConstructionCode = Base.ConstructionCode");
                 strSQL.AppendFormat(" And LDetail.GroupCount = {0}", (int)FrmConstructionLedger.DataGroup.Payroll);
Index: branches/src/ProcessManagement/ProcessManagement/Common/CommonVersion.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Common/CommonVersion.cs	(revision 334)
+++ branches/src/ProcessManagement/ProcessManagement/Common/CommonVersion.cs	(revision 335)
@@ -14,7 +14,7 @@
         /// <summary>
         /// 本体バージョン
         /// </summary>
-        public static int s_SystemVersion = 167;
+        public static int s_SystemVersion = 170;
 
         /// <summary>
         /// コピー・環境バージョン
Index: branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionLedger/FrmConstructionLedgerAuxiliary.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionLedger/FrmConstructionLedgerAuxiliary.cs	(revision 334)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionLedger/FrmConstructionLedgerAuxiliary.cs	(revision 335)
@@ -494,9 +494,6 @@
                 m_DspLabelCtrl[(int)DspLblCtrlName.ConstructionType].Text = ctypeRec.NameString;                                                // 工事種別
                 m_HeaderToolTip.SetToolTip(m_DspLabelCtrl[(int)DspLblCtrlName.ConstructionType], ctypeRec.NameString);
 
-                // 支払枠を作成する
-                CreatePaymentColumns();
-
                 // 入力完了タイトルセット（初期は入力中をデフォルト表示）
                 lblComplate.Text = s_ComplateString[(int)ConstructionLedger.CompFlagDef.Operateing];
                 ToolTip comptip = new ToolTip();
@@ -879,7 +876,7 @@
         /// <summary>
         /// 支払欄カラムを作成する
         /// </summary>
-        private void CreatePaymentColumns()
+        private void CreatePaymentColumns(ArrayList DetailList)
         {
             try
             {
@@ -888,18 +885,48 @@
 
                 DataGridView dgv = dgvAllDisplay;
 
-                // 支払欄数取得
-                int ColumnCount = CommonMotions.cnvRoundUp(CommonMotions.cnvDouble(m_DspLabelCtrl[(int)DspLblCtrlName.BetweenTimes].Text));
+                //// 支払欄数取得
+                //int ColumnCount = CommonMotions.cnvRoundUp(CommonMotions.cnvDouble(m_DspLabelCtrl[(int)DspLblCtrlName.BetweenTimes].Text));
+                //// 実際の工期より3カ月入力欄を伸ばす
+                //ColumnCount += 3;
+
+                //// 支払いデータより最大カラム数を取得する
+                //int ExecDataColCnt = GetMaxExecuteColumn();
+                //// 比較して大きい方を使用する
+                //if (ExecDataColCnt > ColumnCount) ColumnCount = ExecDataColCnt;
+
+                // 読込データより最小・最大年月を取得する
+                int nDetailCnt = Enum.GetNames(typeof(IOConstructionLedgerDetail.TableColumn)).Length;
+                DateTime dtTitileMin = DateTime.MaxValue.Date;
+                DateTime dtTitileMax = CommonMotions.cnvDate(m_DspLabelCtrl[(int)DspLblCtrlName.CompleteDate].Text);
+                foreach (object[] objData in DetailList)
+                {
+                    DateTime wrkDate = CommonMotions.cnvDate(objData[nDetailCnt]).Date;
+                    if (wrkDate == DateTime.MinValue) continue;
+                    // 最小値
+                    if (wrkDate.Date < dtTitileMin.Date)
+                    {
+                        dtTitileMin = CommonMotions.cnvDate(objData[nDetailCnt]);
+                    }
+                    // 最大値
+                    if (wrkDate.Date > dtTitileMax.Date)
+                    {
+                        dtTitileMax = CommonMotions.cnvDate(objData[nDetailCnt]);
+                    }
+                }
+                // 最小の年月をセットする
+                DateTime dtTitleDate = CommonMotions.cnvDate(m_DspLabelCtrl[(int)DspLblCtrlName.StartingDate].Text);
+                if (dtTitileMin < dtTitleDate)
+                {
+                    dtTitleDate = dtTitileMin;
+                }
+                // 期間を計算する
+                TimeSpan tsWork = dtTitileMax.Date - dtTitleDate.Date;
+                int ColumnCount = tsWork.GetTimeSpanMonths() + 1;
                 // 実際の工期より3カ月入力欄を伸ばす
                 ColumnCount += 3;
 
-                // 支払いデータより最大カラム数を取得する
-                int ExecDataColCnt = GetMaxExecuteColumn();
-                // 比較して大きい方を使用する
-                if (ExecDataColCnt > ColumnCount) ColumnCount = ExecDataColCnt;
-
                 // 月毎支払欄作成
-                DateTime dtTitleDate = CommonMotions.cnvDate(m_DspLabelCtrl[(int)DspLblCtrlName.StartingDate].Text);
                 m_GridPaymentColList = new DataGridViewColumn[ColumnCount];
                 m_GridPaymentCellStyleList = new DataGridViewCellStyle[ColumnCount];
                 for (int i = 0; i < ColumnCount; i++)
@@ -2750,33 +2777,6 @@
                 // 工事詳細台帳明細データを読み込む
                 strcmd.Append("SELECT");
                 strcmd.Append("  A.*");
-                //strcmd.Append("  A.ConstructionCode");	        // 工事コード
-                //strcmd.Append(", A.GroupCount");               // グループ番号
-                //strcmd.Append(", A.LineCount");                // 行番号
-                //strcmd.Append(", A.ComponentCode");            // 構成キー
-                //strcmd.Append(", A.ItemCode");		           // 工種キー
-                //strcmd.Append(", A.FirstString");              // 項目名称
-                //strcmd.Append(", A.SecondString");             // 工事内容
-                //strcmd.Append(", A.CompanyType");              // 協力会社コードタイプ
-                //strcmd.Append(", A.CompanyCode");              // 協力会社コード
-                //strcmd.Append(", A.CompanyName");              // 協力会社名称
-                //strcmd.Append(", A.EstimatePrice");            // 予算（見積）金額
-                //strcmd.Append(", A.ExecutionAmount");          // 実行金額
-                //strcmd.Append(", A.AmountConfigRate");         // 金額構成率
-                //strcmd.Append(", A.PaymentBurden");            // 支払補填額
-                //strcmd.Append(", A.FixDataFlg");               // 固定データフラグ
-                //strcmd.Append(", A.IndependentFlg");           // 独立データフラグ
-                //strcmd.Append(", A.FluctuationFlg");           // 増減データフラグ
-                //strcmd.Append(", A.SalaryFlg");                // 給与振分区分
-                //strcmd.Append(", A.SalaryDays");               // 給与振分日数
-                //strcmd.Append(", A.OperatingFlg");             // 担当中フラグ
-                //strcmd.Append(", A.SourceCode");               // 元工事番号
-                //strcmd.Append(", A.JoinTitleFlg");             // 工事名称タイトル
-                //strcmd.Append(", A.SalaryOnRegist");           // 登録時月額給与
-                //strcmd.Append(", A.PurchaseOrderFlg");         // 注文書発行フラグ
-                //strcmd.Append(", A.DetailCount");              // 明細番号
-                //strcmd.Append(", DATE_FORMAT(A.EntryDate, '%Y/%m/%d %H:%i:%s')");
-                //strcmd.Append(", DATE_FORMAT(A.UpdateDate, '%Y/%m/%d %H:%i:%s')");
 
                 strcmd.Append(", B.TARGETMONTH");
                 strcmd.Append(", B.PAYMENTAMOUNT");
@@ -2831,6 +2831,9 @@
                 if (!ProAppDB.SelectAction(strApp, ref ProAppList)) NoneApp = true;
                 if (ProAppList.ApprovalStatus != (int)CommonDefine.ApprovalStatus.Approval) NoneApp = true;
 
+                // 支払枠（列）を作成する
+                CreatePaymentColumns(DetailList);
+
                 // グリッド行削除
                 dgvAllDisplay.Rows.Clear();
 
@@ -2850,7 +2853,7 @@
                     object[] objCurRec = (object[])DetailList[iy];
                     DetailDB.Reader2Struct(objCurRec, ref DetailRec);
 
-                    // ------ 読み飛ばしデータ(2016/10/20　作成されていないかったデータ行を作成するようにした)
+                    // ------ 読み飛ばしデータ(2016/10/20　作成されていないかったデータ行をループ外で作成するようにした)
                     // 純利益は読み込まない
                     if (DetailRec.GroupCount == (int)DataGroup.NetIncome) continue;
                     // 合計金額は読み込まない
@@ -3023,14 +3026,6 @@
                     switch (DetailRec.GroupCount)
                     {
                         case (int)DataGroup.ConstructionCosts:       // 施工費
-                            // 施工費・購入品の固定項目以外の行は名称等を編集出来る
-                            //if (DetailRec.FixDataFlg != 1)
-                            //{
-                            //    for (int i = (int)GridColumn.ItemName; i <= (int)GridColumn.CompanyName; i++)
-                            //    {
-                            //        CurRow.Cells[i].ReadOnly = false;
-                            //    }
-                            //}
                             break;
 
                         case (int)DataGroup.Assistant:               // 副担当
Index: branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionLedgerList/CreateLedgerSQL.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionLedgerList/CreateLedgerSQL.cs	(revision 334)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionLedgerList/CreateLedgerSQL.cs	(revision 335)
@@ -108,6 +108,11 @@
                 DateTime dtDefaultStart = CommonMotions.GetOpeningEndDate(BusinessPeriod, true);
                 DateTime dtDefaultEnd = CommonMotions.GetOpeningEndDate(BusinessPeriod, false);
 
+                int nPrevYear = (BusinessPeriod - 1);
+                if (nPrevYear < 0) nPrevYear = 0;
+                DateTime dtPrevStart = CommonMotions.GetOpeningEndDate(nPrevYear, true);
+                DateTime dtNextEnd = CommonMotions.GetOpeningEndDate((BusinessPeriod + 1), false);
+
                 strSQL.Append("Select");
                 strSQL.Append(" DepHis.DepartmentCode");
                 strSQL.Append(", Person.PersonCode");
@@ -129,7 +134,7 @@
                 strSQL.AppendFormat(" AND (DATE('{0}') <= DATE(DepHis.CompDate)", dtDefaultStart.ToShortDateString());
                 strSQL.AppendFormat(" OR DATE('{0}') = DATE(DepHis.CompDate)))", DateTime.MinValue.ToShortDateString());
 
-                // 今期の開始終了
+                // 今期の開始終了（工事開始年月日が先期開始年月日以降を検索する）
                 strSQL.Append(" Left Join");
                 strSQL.Append("      (Select LDetail.CompanyCode As PersonCode");
                 strSQL.Append("            , MIN(Ledger.ConstructionStart) As SDate");
@@ -137,6 +142,7 @@
                 strSQL.Append("       From constructionledgerdetail As LDetail");
                 strSQL.Append("            Inner Join constructionledger As Ledger");
                 strSQL.Append("                  On Ledger.ConstructionCode = LDetail.ConstructionCode");
+                strSQL.AppendFormat("             And DATE('{0}') <= DATE(Ledger.Constructionstart)", dtPrevStart.ToShortDateString());
                 strSQL.Append("            Inner Join constructionbaseinfo As Base");
                 strSQL.Append("                  On Base.ConstructionCode = LDetail.ConstructionCode");
                 strSQL.AppendFormat("            And Base.ConstructionStatusFlg <> {0}", NotOrder);
@@ -150,7 +156,7 @@
                 strSQL.Append("       ) As Detail");
                 strSQL.Append(" ON Detail.PersonCode = Person.PersonCode");
 
-                // 来季の開始終了
+                // 来季の開始終了（工事開始年月日が今期開始年月日以降を検索する）
                 strSQL.Append(" Left Join");
                 strSQL.Append("      (Select LDetail2.CompanyCode As PersonCode");
                 strSQL.Append("            , MIN(Ledger2.ConstructionStart) As SDate");
@@ -158,6 +164,7 @@
                 strSQL.Append("       From constructionLedgerdetail As LDetail2");
                 strSQL.Append("            Inner Join constructionLedger As Ledger2");
                 strSQL.Append("                  On Ledger2.ConstructionCode = LDetail2.ConstructionCode");
+                strSQL.AppendFormat("             And DATE('{0}') <= DATE(Ledger2.Constructionstart)", dtDefaultStart.ToShortDateString());
                 strSQL.Append("            Inner Join constructionbaseinfo As Base");
                 strSQL.Append("                  On Base.ConstructionCode = LDetail2.ConstructionCode");
                 strSQL.AppendFormat("            And Base.ConstructionStatusFlg <> {0}", NotOrder);
@@ -225,6 +232,7 @@
                 DateTime DspSTDate = DateTime.MaxValue;
                 DateTime DspEdDate = DateTime.MinValue;
 
+
                 // 給与を集計する
                 foreach (object[] ObjRec in TargetList)
                 {
Index: branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionLedgerList/FrmConstructionLedgerListAuxiliary.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionLedgerList/FrmConstructionLedgerListAuxiliary.cs	(revision 334)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionLedgerList/FrmConstructionLedgerListAuxiliary.cs	(revision 335)
@@ -1062,10 +1062,10 @@
                 // �����v
                 TotalArea[(int)DispColumn.NetProfit] -= Expenses;                   // �����v-�o��
                 
-                if (Auxiliary < 0)
+                //if (Auxiliary < 0)
                     TotalArea[(int)DispColumn.NetProfit] += Auxiliary;              // �����v+�⏕�l����
-                else
-                    TotalArea[(int)DispColumn.NetProfit] -= Auxiliary;              // �����v-�⏕�l����(�l����{�ɂȂ����ꍇ�͂��������)
+                //else
+                //    TotalArea[(int)DispColumn.NetProfit] -= Auxiliary;              // �����v-�⏕�l����(�l����{�ɂȂ����ꍇ�͂��������)
 
                 // ----- �����v�s�\��
                 dgv.Rows.Add();       // ��s
Index: branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/EstimateInput/FrmEstimateInputAuxiliary.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/EstimateInput/FrmEstimateInputAuxiliary.cs	(revision 334)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/EstimateInput/FrmEstimateInputAuxiliary.cs	(revision 335)
@@ -4203,6 +4203,12 @@
                 TergetCell.Value = "";
                 TergetCodeCell.Value = "0";
 
+                //DataGridView dgv = dgvEntryData;
+                //foreach (DataGridViewCell c in dgv.SelectedCells)
+                //{
+                //    dgv[c.ColumnIndex, c.RowIndex].Value = string.Empty;
+                //}
+
                 m_bChengeAns = true;
             }
             catch (System.Exception ex)
Index: branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/RequestEntry/FrmReqEntPrtOut.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/RequestEntry/FrmReqEntPrtOut.cs	(revision 334)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/RequestEntry/FrmReqEntPrtOut.cs	(nonexistent)
@@ -1,1421 +0,0 @@
-﻿using System;
-using System.Collections;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Data;
-using System.Drawing;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using System.Windows.Forms;
-
-using ProcessManagement.Common;
-using ProcessManagement.DataModel;
-using ProcessManagement.DB;
-using ProcessManagement.DB.IOAccess;
-using ProcessManagement.Forms.SubForms;
-using ProcessManagement.Forms.ControlsAction;
-
-
-namespace ProcessManagement.Forms.DataEntry
-{
-    public partial class FrmRequestPrintSel
-    {
-        #region 定数
-
-        /// <summary>
-        /// Excelテンプレートファイル名
-        /// </summary>
-        //private static string s_ExcelRequestSheetFileName = @"\RequestSheet.xlsx";
-        private static string s_ExcelRequestSheetFileName = CommonDefine.s_ExcelOriginalFileName;
-
-        /// <summary>
-        /// デスクトップフォルダ名
-        /// </summary>
-        private static string s_ExecCurrentDirName = System.Environment.GetFolderPath(Environment.SpecialFolder.DesktopDirectory);
-
-        /// <summary>
-        /// シート名称カウント
-        /// </summary>
-        enum enumSheetName
-        {
-            Cover = 0,
-            List,
-            Detail,
-        }
-
-        /// <summary>
-        /// Excel シート名称
-        /// </summary>
-        private static readonly Dictionary<enumSheetName, string> s_DicSheetName = new Dictionary<enumSheetName, string>()
-        {
-            { enumSheetName.Cover, "請求書（表紙）" },
-            { enumSheetName.List, "請求書（一覧）" },
-            { enumSheetName.Detail, "請求書（内訳）" },
-        };
-
-        /// <summary>
-        /// 図形置き場シート
-        /// </summary>
-        private const string s_shapeSheetName = "図形シート";
-        /// <summary>
-        /// 図形名称
-        /// </summary>
-        private const string s_shapeName = "EstimateSeal1";                                    // 積算見積表紙判子
-        /// <summary>
-        /// 図形サイズ【縦・横】（図形名称順）
-        /// </summary>
-        private static float[,] s_ShapeSize = new float[1, 2] { { 25.51f, 25.51f } };         // 積算見積表紙判子
-        /// <summary>
-        /// 積算見積表紙判子フォントサイズ
-        /// </summary>
-        private static float[] s_EstimateSeal1FontSize = { 16f, 8f, 8f, 8f, 6f };
-        /// <summary>
-        /// 表紙判子位置(Key:X Value:Y)
-        /// </summary>
-        private static float[,] s_CoverSealPoint = new float[4, 2] {{592.50f, 555.25f},    // 社長
-                                                                    {657.25f, 555.25f},    // 所属長
-                                                                    {721.00f, 555.25f},    // 営業
-                                                                    {784.00f, 555.25f} };  // 担当
-
-        #endregion
-
-        #region 変数
-
-        /// <summary>
-        /// Excel印刷クラスオブジェクト
-        /// </summary>
-        private UsedExcel m_UsedExcel = null;
-
-        /// <summary>
-        /// 保存時Excelパス
-        /// </summary>
-        private string m_SelectSaveExcel = "";
-
-        /// <summary>
-        /// 請求書データ
-        /// </summary>
-        private InvoiceData m_InvData = new InvoiceData();
-
-        /// <summary>
-        /// 請求データ
-        /// </summary>
-        private Dictionary<int, List<RequestData>> m_dicReqData = new Dictionary<int, List<RequestData>>();
-
-        /// <summary>
-        /// 工事基本情報データ
-        /// </summary>
-        private Dictionary<int, ConstructionBaseInfo> m_dicConstructionBaseInfo = new Dictionary<int, ConstructionBaseInfo>();
-
-        /// <summary>
-        /// 日付印刷
-        /// </summary>
-        private bool m_bDatePrintFlg = true;
-
-        /// <summary>
-        /// 印刷日付
-        /// </summary>
-        private DateTime m_bDatePrintOut = DateTime.Now;
-
-        #endregion
-
-        #region プロパティ
-
-        /// <summary>
-        /// 日付印刷フラグ
-        /// </summary>
-        public bool DatePrintFlg
-        {
-            get { return m_bDatePrintFlg; }
-            set { m_bDatePrintFlg = value; }
-        }
-
-        /// <summary>
-        /// 印刷日付
-        /// </summary>
-        public DateTime DatePrintOut
-        {
-            get { return m_bDatePrintOut; }
-            set { m_bDatePrintOut = value; }
-        }
-
-        #endregion
-
-        #region 請求書データの取得
-        /// <summary>
-        /// 請求書データの取得
-        /// </summary>
-        private bool GetInvoiceData()
-        {
-            IOInvoiceData ioInvData = new IOInvoiceData();
-            IORequestHead ioReqHead = new IORequestHead();
-            IORequestData ioReqData = new IORequestData();
-
-            try
-            {
-                string sql = "";
-
-                // 請求書データの取得
-                sql = ioInvData.CreatePrimarykeyString(m_nInvoiceNo);
-                if (ioInvData.SelectAction(sql, ref m_InvData) == false)
-                {
-                    return false;
-                }
-
-                // 請求ヘッダの取得
-                m_lstReqHead.Clear();
-                sql = string.Format(" WHERE InvoiceNo = {0} ORDER BY ReqConstructionCode", m_nInvoiceNo);
-                if (ioReqHead.SelectAction(sql, ref m_lstReqHead) == false)
-                {
-                    return false;
-                }
-
-                foreach (RequestHead ReqHead in m_lstReqHead)
-                {
-                    // 請求ヘッダの取得
-                    sql = string.Format(" WHERE RequestNo = {0} ORDER BY MainConstructionCode", ReqHead.RequestNo);
-                    List<RequestData> lstReqData = new List<RequestData>();
-                    if (ioReqData.SelectAction(sql, ref lstReqData) == false)
-                    {
-                        return false;
-                    }
-
-                    m_dicReqData.Add(ReqHead.RequestNo, lstReqData);
-
-                }
-
-                return true;
-            }
-            catch (Exception ex)
-            {
-                logger.ErrorFormat("システムエラー：{0}：{1}", CommonMotions.GetMethodName(), ex.Message);
-
-                return false;
-            }
-            finally
-            {
-                ioInvData.close();
-                ioInvData = null;
-                ioReqHead.close();
-                ioReqHead = null;
-                ioReqData.close();
-                ioReqData = null;
-            }
-
-        }
-        #endregion
-
-        #region 工事基本情報の追加
-        private void AddConstructionBaseInfoDic(ConstructionBaseInfo Info)
-        {
-            ConstructionBaseInfo wrk = null;
-
-            if (m_dicConstructionBaseInfo.TryGetValue(Info.ConstructionCode, out wrk) == false)
-            {
-                m_dicConstructionBaseInfo.Add(Info.ConstructionCode, Info);
-            }
-        }
-        #endregion
-
-        #region 工事基本情報の取得
-        /// <summary>
-        /// 工事基本情報の取得
-        /// </summary>
-        private bool GetMainConstructionBaseInfo()
-        {
-            IOConstructionBaseInfo ioInfo = new IOConstructionBaseInfo();
-
-            foreach (RequestHead ReqHead in m_lstReqHead)
-            {
-                string sql = ioInfo.CreatePrimarykeyString(ReqHead.ReqConstructionCode);
-                ConstructionBaseInfo info = new ConstructionBaseInfo();
-                if (ioInfo.SelectAction(sql, ref info) == false)
-                {
-                    return false;
-                }
-
-                AddConstructionBaseInfoDic(info);
-            }
-
-            List<int> lstKey = new List<int>(m_dicReqData.Keys);
-            try
-            {
-                foreach (int nRequestNo in lstKey)
-                {
-                    List<RequestData> lstReqData = null;
-
-                    if (m_dicReqData.TryGetValue(nRequestNo, out lstReqData) == false)
-                    {
-                        return false;
-                    }
-
-                    foreach (RequestData ReqData in lstReqData)
-                    {
-                        string sql = ioInfo.CreatePrimarykeyString(ReqData.MainConstructionCode);
-                        ConstructionBaseInfo info = new ConstructionBaseInfo();
-                        if (ioInfo.SelectAction(sql, ref info) == false)
-                        {
-                            return false;
-                        }
-
-                        AddConstructionBaseInfoDic(info);
-                    }
-
-                }
-
-                return true;
-            }
-            catch (Exception ex)
-            {
-                logger.ErrorFormat("システムエラー：{0}：{1}", CommonMotions.GetMethodName(), ex.Message);
-
-                return false;
-            }
-            finally
-            {
-                ioInfo.close();
-                ioInfo = null;
-            }
-
-        }
-        #endregion
-
-        #region DBアクセス処理
-        #region 請求データ取得
-        /// <summary>
-        /// 請求データ取得
-        /// </summary>
-        /// <param name="constCode">本工事番号</param>
-        /// <param name="data"></param>
-        /// <returns></returns>
-        private bool GetRequestData(int constCode, ref RequestData data)
-        {
-            //var cbDB = new IORequestData();
-            try
-            {
-                //// 請求データ取得クラス領域
-                //var wrk = new List<RequestData>();
-
-                //// 請求データ取得SQL
-                //string strSQL = cbDB.CreateSubkeyString(constCode);
-
-                //// 請求データ取得
-                //if (!cbDB.SelectAction(strSQL, ref wrk)) return false;
-
-                //if (wrk.Count != 1) return false;
-
-                //data = wrk[0];
-            }
-            catch (Exception ex)
-            {
-                logger.ErrorFormat("システムエラー：{0}：{1}", CommonMotions.GetMethodName(), ex.Message);
-                return false;
-            }
-            finally
-            {
-                //cbDB.close(); cbDB = null;
-            }
-
-            return true;
-        }
-        #endregion
-
-        #region 請求書合計データ取得
-        /// <summary>
-        /// 請求書合計データ取得
-        /// </summary>
-        /// <param name="requestNo"></param>
-        /// <param name="datas"></param>
-        /// <returns></returns>
-        //private bool GetRequestTotalData(int requestNo, ref List<RequestTotalData> datas)
-        //{
-        //    var cbDB = new IORequestTotalData();
-        //    try
-        //    {
-        //        // 請求書合計データ取得クラス領域
-        //        var wrk = new List<RequestTotalData>();
-
-        //        // 請求書合計データ取得SQL
-        //        string strSQL = cbDB.CreatePrimarykeyString(requestNo);
-
-        //        // ソート条件追加
-        //        strSQL += " ORDER BY REQUESTNO, ORDERNO";
-
-        //        // 請求書合計データ取得
-        //        if (!cbDB.SelectAction(strSQL, ref wrk)) return false;
-
-        //        // 請求書合計データ取得クラス領域
-        //        datas = wrk;
-
-        //    }
-        //    catch (Exception ex)
-        //    {
-        //        logger.ErrorFormat("システムエラー：{0}：{1}", CommonMotions.GetMethodName(), ex.Message);
-        //        return false;
-        //    }
-        //    finally
-        //    {
-        //        cbDB.close(); cbDB = null;
-        //    }
-        //    return true;
-        //}
-
-        #endregion
-
-        #region 請求明細データ取得
-        /// <summary>
-        /// 請求明細データ取得
-        /// </summary>
-        /// <param name="requestNo"></param>
-        /// <param name="datas"></param>
-        /// <returns></returns>
-        private bool GetRequestDataDetail(int requestNo, ref Dictionary<int, Dictionary<int, RequestDataDetail>> datas)
-        {
-            var cbDB = new IORequestDataDetail();
-            try
-            {
-                //// 請求明細データ取得クラス領域
-                //var wrk = new List<RequestDataDetail>();
-
-                //// 請求明細データ取得SQL
-                //string strSQL = cbDB.CreatePrimarykeyString(requestNo);
-
-                //// 請求明細データ取得
-                //if (!cbDB.SelectAction(strSQL, ref wrk)) return false;
-
-                //foreach (var record in wrk)
-                //{
-                //    if (!datas.ContainsKey(record.ConstructionCode))
-                //        datas[record.ConstructionCode] = new Dictionary<int, RequestDataDetail>();
-                //    datas[record.ConstructionCode][record.OrderNo] = record;
-                //}
-            }
-            catch (Exception ex)
-            {
-                logger.ErrorFormat("システムエラー：{0}：{1}", CommonMotions.GetMethodName(), ex.Message);
-                return false;
-            }
-            finally
-            {
-                cbDB.close(); cbDB = null;
-            }
-            return true;
-        }
-        #endregion
-
-        #region 工事基本情報取得
-        /// <summary>
-        /// 工事基本情報取得
-        /// </summary>
-        /// <param name="constructionCode"></param>
-        /// <param name="data"></param>
-        /// <returns></returns>
-        private bool GetConstructionBaseInfo(int constructionCode, ref ConstructionBaseInfo data)
-        {
-            var cbDB = new IOConstructionBaseInfo();
-            try
-            {
-                // 工事基本情報取得クラス領域
-                var wrk = new ConstructionBaseInfo();
-
-                // 工事基本情報取得SQL
-                string strSQL = cbDB.CreatePrimarykeyString(constructionCode);
-
-                // 工事基本情報取得
-                if (!cbDB.SelectAction(strSQL, ref wrk)) return false;
-
-                // 工事基本情報取得クラス領域
-                data = wrk;
-
-            }
-            catch (Exception ex)
-            {
-                logger.ErrorFormat("システムエラー：{0}：{1}", CommonMotions.GetMethodName(), ex.Message);
-                return false;
-            }
-            finally
-            {
-                cbDB.close(); cbDB = null;
-            }
-            return true;
-        }
-        #endregion
-
-        #region 結合親工事番号の取得
-        private int GetJoinParentConstructionCode(int nConstructionCode)
-        {
-            int nParentCode = -1;
-            IOConstructionLink ioLink = new IOConstructionLink();
-
-            try
-            {
-                string sql = string.Format(" WHERE FluctuationCode = {0} AND LinkType = 1 ", nConstructionCode);
-                List<ConstructionLink> lstWork = new List<ConstructionLink>();
-
-                if (ioLink.SelectAction(sql, ref lstWork) == false)
-                {
-                    return nParentCode;
-                }
-
-                foreach (ConstructionLink Link in lstWork)
-                {
-                    nParentCode = Link.ConstructionCode;
-                    break;
-                }
-                return nParentCode;
-            }
-            catch (Exception ex)
-            {
-                logger.ErrorFormat("システムエラー：{0}：{1}", CommonMotions.GetMethodName(), ex.Message);
-                return -1;
-            }
-            finally
-            {
-                ioLink.close();
-                ioLink = null;
-            }
-
-        }
-        #endregion
-
-        #region 工事基本情報明細
-        /// <summary>
-        /// 工事基本情報明細を工事基本情報明細テーブルから工事番号をキーに取得する関数
-        /// </summary>
-        /// <param name="datas"></param>
-        /// <returns></returns>
-        private bool GetConstructionBaseInfoDetail(List<int> lstConstCode, ref Dictionary<int, Dictionary<int, string>> datas)
-        {
-            var sbDB = new IOConstructionBaseInfoDetail();
-            try
-            {
-                // 工事基本情報明細取得クラス領域
-                var wrk = new List<ConstructionBaseInfoDetail>();
-
-                // 工事基本情報明細取得SQL
-                string strSQL = " Where ConstructionCode in ( ";
-                foreach (int constCode in lstConstCode)
-                {
-                    strSQL += string.Format((lstConstCode.IndexOf(constCode) == 0) ? " {0}" : ", {0}", constCode);
-                }
-                strSQL += " )";
-
-                // 工事基本情報明細取得
-                if (!sbDB.SelectAction(strSQL, ref wrk)) return false;
-
-                datas.Clear();
-
-                foreach (var record in wrk)
-                {
-                    if (!datas.ContainsKey(record.ConstructionCode))
-                        datas[record.ConstructionCode] = new Dictionary<int, string>();
-                    datas[record.ConstructionCode][record.DetailNo] = record.DetailString;
-                }
-
-            }
-            catch (Exception ex)
-            {
-                logger.ErrorFormat("システムエラー：{0}：{1}", CommonMotions.GetMethodName(), ex.Message);
-                return false;
-            }
-            finally
-            {
-                sbDB.close();
-                sbDB = null;
-            }
-
-            return true;
-        }
-        #endregion
-
-        #region 工事増減情報取得
-        /// <summary>
-        /// 工事増減情報取得
-        /// </summary>
-        /// <param name="constructionCode"></param>
-        /// <param name="datas"></param>
-        /// <returns></returns>
-        private bool GetConstructionLink(int constructionCode, ref List<int> datas)
-        {
-            var sbDB = new IOConstructionLink();
-            try
-            {
-                // 工事増減情報取得クラス領域
-                var wrk = new List<ConstructionLink>();
-
-                // 工事増減情報取得SQL
-                string strSQL = sbDB.CreatePrimarykeyString(constructionCode);
-
-                // ソート条件追加
-                strSQL += " ORDER BY FLUCTUATIONCODE";
-
-                // 工事増減情報取得
-                if (!sbDB.SelectAction(strSQL, ref wrk)) return false;
-
-                foreach (var record in wrk)
-                {
-                    datas.Add(record.FluctuationCode);
-                }
-            }
-            catch (Exception ex)
-            {
-                logger.ErrorFormat("システムエラー：{0}：{1}", CommonMotions.GetMethodName(), ex.Message);
-                return false;
-            }
-            finally
-            {
-                sbDB.close();
-                sbDB = null;
-            }
-
-            return true;
-        }
-        #endregion
-
-        #region 工事詳細台帳データ取得
-        /// <summary>
-        /// 工事詳細台帳データ取得
-        /// </summary>
-        /// <param name="constructionCode"></param>
-        /// <param name="data"></param>
-        /// <returns></returns>
-        private bool GetConstructionLedger(int constructionCode, ref ConstructionLedger data)
-        {
-            var sbDB = new IOConstructionLedger();
-            try
-            {
-                // 工事詳細台帳データ取得クラス領域
-                var wrk = new ConstructionLedger();
-
-                // 工事詳細台帳データ取得SQL
-                string strSQL = sbDB.CreatePrimarykeyString(constructionCode);
-
-                // 工事詳細台帳データ取得
-                if (!sbDB.SelectAction(strSQL, ref wrk)) return false;
-
-                data = wrk;
-
-            }
-            catch (Exception ex)
-            {
-                logger.ErrorFormat("システムエラー：{0}：{1}", CommonMotions.GetMethodName(), ex.Message);
-                return false;
-            }
-            finally
-            {
-                sbDB.close();
-                sbDB = null;
-            }
-
-            return true;
-        }
-        #endregion
-        #endregion
-
-        #region 印刷メイン
-        /// <summary>
-        /// 印刷メイン
-        /// </summary>
-        /// <param name="bPrint">true:印刷のみ,false:保存のみ</param>
-        public void PrintMain(bool bPrint)
-        {
-            try
-            {
-                // 印刷クラス
-                m_UsedExcel = new UsedExcel();
-
-                // エクセルブックオープン
-                if (!m_UsedExcel.ExcelBookOpen(System.Environment.CurrentDirectory + s_ExcelRequestSheetFileName))
-                {
-                    return;
-                }
-
-                // 表紙印刷
-                CommonDefine.RetunAnswer rtAns = PrintCover();
-                if (rtAns != CommonDefine.RetunAnswer.Answer0)
-                {
-                    return;
-                }
-
-                // 一覧印刷
-                rtAns = PrintList();
-                if (rtAns != CommonDefine.RetunAnswer.Answer0)
-                {
-                    return;
-                }
-
-                int no = 1;
-                foreach (RequestHead ReqHead in m_lstReqHead)
-                {
-                    List<RequestData> lstReqData = null;
-                    if (m_dicReqData.TryGetValue(ReqHead.RequestNo, out lstReqData) == false)
-                    {
-                        return;
-                    }
-
-                    foreach (RequestData ReqData in lstReqData)
-                    {
-                        ConstructionBaseInfo Info = null;
-
-                        if (m_dicConstructionBaseInfo.TryGetValue(ReqData.MainConstructionCode, out Info) == false)
-                        {
-                            return;
-                        }
-
-                        long lRequestAmount = ReqData.RequestAmount0;
-                        lRequestAmount += ReqData.RequestAmount1;
-                        lRequestAmount += ReqData.RequestAmount2;
-                        lRequestAmount += ReqData.RequestAmount3;
-                        lRequestAmount += ReqData.RequestAmount4;
-                        lRequestAmount += ReqData.RequestAmount5;
-                        lRequestAmount += ReqData.RequestAmount6;
-                        lRequestAmount += ReqData.UnpaidAmount;
-
-                        if (lRequestAmount == 0)
-                        {
-                            continue;
-                        }
-
-                        rtAns = PrintDetail(no, ReqHead, ReqData, Info);
-                        if (rtAns != CommonDefine.RetunAnswer.Answer0)
-                        {
-                            return;
-                        }
-                    }
-
-                }
-
-                if (bPrint)
-                {
-                    // 印刷処理
-                    m_UsedExcel.ExcelSheetPrint();
-                }
-                else
-                {
-                    // 保存処理
-                    SaveExcelFile();
-                }
-            }
-            catch (System.Exception ex)
-            {
-                logger.ErrorFormat("システムエラー：{0}：{1}", CommonMotions.GetMethodName(), ex.Message);
-            }
-            finally
-            {
-                // Excel開放
-                if (m_UsedExcel != null)
-                {
-                    m_UsedExcel.ExcelBookClose();
-                }
-                m_UsedExcel = null;
-
-                // ガーベージコレクト
-                GC.Collect();
-            }
-
-        }
-        #endregion
-
-        #region Excelファイル保存処理
-        /// <summary>
-        /// Excelファイル保存処理
-        /// </summary>
-        private void SaveExcelFile()
-        {
-            try
-            {
-                string filePath = @m_SelectSaveExcel;
-
-                // ファイルパスの存在をチェック
-                if (CommonMotions.ChkDirPath(filePath, true))
-                {
-                    // ファイル名を作成
-                    string wrkFile = m_InvData.RequestName + "様 請求書";
-
-                    // ファイル名に使用できない文字を取り除く
-                    foreach (var badCh in m_UsedExcel.ExcelBadCharcter)
-                    {
-                        wrkFile = wrkFile.Replace(badCh, "");
-                    }
-
-                    // ファイル名作成
-                    filePath += @"\" + @wrkFile;
-
-                    // ファイル保存
-                    m_UsedExcel.SaveSwitch = true;
-                    m_UsedExcel.ExcelSaveBook(filePath);
-
-                }
-            }
-            catch (System.Exception ex)
-            {
-                logger.ErrorFormat("システムエラー：{0}：{1}", CommonMotions.GetMethodName(), ex.Message);
-            }
-
-        }
-        #endregion
-
-        #region エリアスを付けた担当者マスタのフィールド文を作成する
-        /// <summary>
-        /// エリアスを付けた担当者マスタのフィールド文を作成する
-        /// </summary>
-        /// <param name="Alias"></param>
-        /// <param name="strSQL"></param>
-        private string CreatePersonSQL(string Alias)
-        {
-            try
-            {
-                StringBuilder strcmd = new StringBuilder();
-
-                bool bColFirst = true;
-                string strWork = string.Empty;
-                foreach (var gender in Enum.GetValues(typeof(IOMPersonInCharge.ColumnCnt)))
-                {
-                    strWork = gender.ToString();
-                    if (!bColFirst) strcmd.Append(", ");
-                    if (strWork.Equals("StartDate") || strWork.Equals("EndDate"))
-                    {
-                        strcmd.AppendFormat(" DATE_FORMAT({0}{1}, '%Y/%m/%d')", Alias, strWork);
-                    }
-                    else if (strWork.Equals("EntryDate") || strWork.Equals("UpdateDate"))
-                    {
-                        strcmd.AppendFormat(" DATE_FORMAT({0}{1}, '%Y/%m/%d %H:%i:%s')", Alias, strWork);
-                    }
-                    else
-                    {
-                        strcmd.AppendFormat(" {0}{1}", Alias, strWork);
-                    }
-                    bColFirst = false;
-                }
-
-                return strcmd.ToString();
-            }
-            catch (Exception ex)
-            {
-                logger.ErrorFormat("システムエラー：{0}：{1}", CommonMotions.GetMethodName(), ex.Message);
-                return string.Empty;
-            }
-        }
-        #endregion
-
-        #region 表紙印鑑表示
-        /// <summary>
-        ///  表紙印鑑表示
-        /// </summary>
-        private void PrintCoverSeal(int PersonCode)
-        {
-            IOMPersonInCharge picDB = new IOMPersonInCharge();
-            IOProcessApproval paDB = new IOProcessApproval();
-            try
-            {
-                ArrayList arlist = new ArrayList();
-
-                // 承認データ読込
-                StringBuilder strSQLSeal = new StringBuilder();
-                strSQLSeal.Append("SELECT");
-                strSQLSeal.Append(CreatePersonSQL("B."));
-                strSQLSeal.Append(", C.SECRANK FROM PROCESSAPPROVAL A, PERSONINCHARGEMASTER B, SECURITYMASTER C");
-                strSQLSeal.Append(paDB.CreatePrimarykeyString(m_lstReqHead[0].ReqConstructionCode, (int)ClsExcute.ApprovalListNo.OrderBillingApproval, m_lstReqHead[0].OrderNo));
-                strSQLSeal.Append(" AND A.PERSONCODE = B.PERSONCODE");
-                strSQLSeal.Append(" AND C.SECCODE = B.SECCODE");
-                strSQLSeal.Append(" Order By C.SecRank ASC");
-                if (!paDB.ExecuteReader(strSQLSeal.ToString(), ref arlist)) return;
-
-                // 印刷テーブル作成
-                int[] PorsonCode = new int[4] { 0, 0, 0, 0 };
-                List<string> NameTable = new List<string>();
-                for (int i = 0; i < PorsonCode.Length; i++) NameTable.Add("");
-                string[] OrderOfPrecedenceTable = new string[4];
-
-                int PersonDataCnt = Enum.GetNames(typeof(IOMPersonInCharge.ColumnCnt)).Length;
-                // 承認データより担当者その他を取得する
-                for (int i = 0; i < arlist.Count; i++)
-                {
-                    // エクセルの枠より多い場合は処理を抜ける
-                    if (i > 3) break;
-
-                    object[] readObj = (object[])arlist[i];
-                    PersonInChargeMaster PersonRec = new PersonInChargeMaster();
-                    picDB.Reader2Struct(readObj, ref PersonRec);
-
-                    // セキュリティデータチェック
-                    int SecRank = CommonMotions.cnvInt(readObj[PersonDataCnt]);
-                    int SRank = (int)CommonDefine.SecurityRankPos.SpecialAuthority;     // 特別権限
-                    int FRank = (int)CommonDefine.SecurityRankPos.FreeAuthority;        // 統括者権限
-                    int LRank = (int)CommonDefine.SecurityRankPos.LimitedAuthority;     // 所属長権限
-
-                    // 担当者以外は役職がある
-                    if (SecRank == CommonDefine.SecurityRankList[SRank].Key
-                        || SecRank == CommonDefine.SecurityRankList[FRank].Key
-                        || SecRank == CommonDefine.SecurityRankList[LRank].Key)
-                    {
-                        // コードと名前と役職を取得する
-                        PorsonCode[i] = PersonRec.PersonCode;
-                        NameTable[i] = PersonRec.SealPrintName;
-                        // 7文字以上は文字が見えないので省略
-                        if (PersonRec.DisplayString.Length > 7)
-                        {
-                            OrderOfPrecedenceTable[i] = PersonRec.DisplayString.Substring(0, 7);
-                        }
-                        else if (PersonRec.DisplayString.Length < 1)
-                        {
-                            OrderOfPrecedenceTable[i] = "担　当";
-                        }
-                        else
-                        {
-                            OrderOfPrecedenceTable[i] = PersonRec.DisplayString;
-                        }
-                    }
-                    else
-                    {   // 担当者
-                        // コードと名前を取得する
-                        PorsonCode[3] = PersonRec.PersonCode;
-                        NameTable[3] = PersonRec.SealPrintName;
-                        OrderOfPrecedenceTable[3] = "担　当";
-                    }
-                }
-                // テーブル内に同じコードが無いか後から調べる
-                for (int i = 0; i < PorsonCode.Length - 1; i++)
-                {
-                    if (PorsonCode[i] == 0) continue;
-                    for (int ii = 0; ii < PorsonCode.Length; ii++)
-                    {
-                        if (i == ii) continue;
-                        if (PorsonCode[i] != PorsonCode[ii]) continue;
-
-                        PorsonCode[ii] = 0;
-                        NameTable[ii] = string.Empty;
-                        OrderOfPrecedenceTable[ii] = string.Empty;
-                        break;
-                    }
-                }
-
-                // 印鑑を描画する
-                OfficeShapeDefine shapedef = new OfficeShapeDefine();
-                shapedef.ShapeSheetName = s_shapeSheetName;     // 図形シート名称
-                shapedef.ShapeName = s_shapeName;               // 図形名称
-                shapedef.ShapeWidth = s_ShapeSize[0, 0];        // 図形描画サイズ Width
-                shapedef.ShapeHeight = s_ShapeSize[0, 1];       // 図形描画サイズ Height
-
-                for (int i = 0; i < 4; i++)
-                {
-                    // 
-                    if (PorsonCode[i] != 0)
-                    {
-                        shapedef.ShapeDrowPointX = s_CoverSealPoint[i, 0];          // 図形描画位置 X
-                        shapedef.ShapeDrowPointY = s_CoverSealPoint[i, 1];          // 図形描画位置 Y
-                        shapedef.DrowText = NameTable[i];                           // 描画文字列
-                        int ifontSize = NameTable[i].Length - 1;
-                        if (ifontSize > 4) ifontSize = 4;
-                        shapedef.FontSize = s_EstimateSeal1FontSize[ifontSize];     // フォントサイズ
-                        // 図形描画
-                        m_UsedExcel.ExcelCopyShape(shapedef);
-                    }
-                    // 役職を印字する(M～)
-                    int orgNumber = 11 + i;
-                    string strAlpha = CommonMotions.cnvNumberToAlphaCharacter(orgNumber);
-                    m_UsedExcel.ExcelCellSet(string.Format("{0}25", strAlpha), OrderOfPrecedenceTable[i]);
-                }
-            }
-            catch (Exception ex)
-            {
-                logger.ErrorFormat("システムエラー：{0}：{1}", CommonMotions.GetMethodName(), ex.Message);
-            }
-            finally
-            {
-                paDB.close(); paDB = null;
-                picDB.close(); picDB = null;
-            }
-        }
-        #endregion
-
-        #region 請求書(表紙)作成
-        /// <summary>
-        /// 請求書(表紙)作成
-        /// </summary>
-        /// <returns></returns>
-        private CommonDefine.RetunAnswer PrintCover()
-        {
-            try
-            {
-                //// 請求書表紙シートの取得
-                m_UsedExcel.ExcelSheetGet(s_DicSheetName[enumSheetName.Cover]);
-
-                //// 請求書No(4行目 N列)
-                string strInvNo = (m_InvData.InvoiceNo / 1000).ToString();
-                strInvNo += "-";
-                strInvNo += (m_InvData.InvoiceNo % 1000).ToString("00");
-
-                ExcelPrintData InvNoData = new ExcelPrintData();
-                InvNoData.AddPrintData("N", 3, strInvNo).ExcelCellSet(m_UsedExcel);
-
-
-                //// ③ 請求日(5行目 M列)
-                if (m_bDatePrintFlg == true)
-                {
-                    ExcelPrintData reqDate = new ExcelPrintData();
-                    reqDate.AddPrintData("M", 4, m_bDatePrintOut.ToString("yyyy/MM/dd")).ExcelCellSet(m_UsedExcel);
-                }
-                else
-                {
-                    ExcelPrintData reqDate = new ExcelPrintData();
-                    reqDate.AddPrintData("M", 4, "　　年　　月　　日").ExcelCellSet(m_UsedExcel);
-                }
-
-                //// ④ 請求先名称(9行目 C列)
-                ExcelPrintData nameData = new ExcelPrintData();
-                string str = m_InvData.RequestName + "　様";
-                nameData.AddPrintData("C", 8, str).ExcelCellSet(m_UsedExcel);
-
-                //// ⑤ 請求金額(13行目 C列)
-                ExcelPrintData priceData = new ExcelPrintData();
-                priceData.AddPrintData("C", 12, m_InvData.TotalAmount.ToString("#,0")).ExcelCellSet(m_UsedExcel);
-
-                //// ⑥ 消費税(14行目 C列)
-                ExcelPrintData taxData = new ExcelPrintData();
-                taxData.AddPrintData("C", 13, m_InvData.TaxAmount.ToString("#,0")).ExcelCellSet(m_UsedExcel);
-
-                //// 工事名(16行目 D列)
-                //                ExcelPrintData cnstnameData = new ExcelPrintData();
-                //                cnstnameData.AddPrintData("D", 15, m_lstReqHead[0].ReqConstructionName).ExcelCellSet(m_UsedExcel);
-
-                //// 会社名
-                string strCompany = CommonMotions.SystemMasterData.CompanyName1;
-                if (CommonMotions.SystemMasterData.CompanyName2 != string.Empty)
-                {
-                    strCompany += "　" + CommonMotions.SystemMasterData.CompanyName2;
-                }
-
-                // 代表者名
-                string strPresident = string.Format("{0} {1}", CommonMotions.SystemMasterData.CEOPositionName.Trim()
-                                                                , CommonMotions.SystemMasterData.CEOName.Trim());
-
-                //// 郵便番号
-                string strZip = "〒" + CommonMotions.SystemMasterData.ZipCode;
-
-                //// 住所
-                string strAddr = CommonMotions.SystemMasterData.Address1;
-                if (CommonMotions.SystemMasterData.Address2 != string.Empty)
-                {
-                    strAddr += CommonMotions.SystemMasterData.Address2;
-                }
-                if (CommonMotions.SystemMasterData.Address3 != string.Empty)
-                {
-                    strAddr += CommonMotions.SystemMasterData.Address3;
-                }
-
-                //// TEL/FAX
-
-                string strTelFax = "";
-
-                if (CommonMotions.SystemMasterData.PhoneNumber != string.Empty)
-                {
-                    strTelFax = "TEL " + CommonMotions.SystemMasterData.PhoneNumber + "(代)";
-                }
-                if (CommonMotions.SystemMasterData.FaxNumber != string.Empty)
-                {
-                    if (strTelFax.Length > 0)
-                    {
-                        strTelFax += " ";
-                    }
-                    strTelFax += "FAX " + CommonMotions.SystemMasterData.FaxNumber;
-                }
-                //// URL
-                string strUrl = CommonMotions.SystemMasterData.HomePageURL;
-
-                ExcelPrintData companyData = new ExcelPrintData();
-                companyData.AddPrintData("L", 17, strCompany);                              // 会社名(18行目 L列)           
-                companyData.AddPrintData("L", 18, strPresident);                            // 代表者名(19行目 L列)           
-                companyData.AddPrintData("L", 19, strZip);                                  // 郵便番号(20行目 L列) 
-                companyData.AddPrintData("L", 20, strAddr);                                 // 住所(21行目 L列)           
-                companyData.AddPrintData("L", 21, strTelFax);                               // TEL/FAX(22行目 L列)           
-                companyData.AddPrintData("L", 22, strUrl);                                  // URL(23行目 L列)           
-                companyData.ExcelCellSet(m_UsedExcel);
-
-                ExcelPrintData commentData = new ExcelPrintData();
-                commentData.AddPrintData("C", 17, m_InvData.Comment1);                              // コメント1(18行目 C列)           
-                commentData.AddPrintData("C", 18, m_InvData.Comment2);                              // コメント2(19行目 C列)           
-                commentData.AddPrintData("C", 19, m_InvData.Comment3);                              // コメント3(20行目 C列)           
-                commentData.AddPrintData("C", 20, m_InvData.Comment4);                              // コメント4(21行目 C列)           
-                commentData.AddPrintData("C", 21, m_InvData.Comment5);                              // コメント5(22行目 C列)           
-                commentData.ExcelCellSet(m_UsedExcel);
-
-                ConstructionBaseInfo Info = null;
-                m_dicConstructionBaseInfo.TryGetValue(m_lstReqHead[0].ReqConstructionCode, out Info);
-
-                // 印鑑描画
-                PrintCoverSeal(Info.ConstructionPersonCode);
-
-                return CommonDefine.RetunAnswer.Answer0;
-            }
-            catch (Exception ex)
-            {
-                logger.ErrorFormat("システムエラー：{0}：{1}", CommonMotions.GetMethodName(), ex.Message);
-                return CommonDefine.RetunAnswer.Answer1;
-            }
-        }
-        #endregion
-
-        #region 請求書(一覧)作成
-        /// <summary>
-        /// 請求書(一覧)作成
-        /// </summary>
-        /// <returns></returns>
-        private CommonDefine.RetunAnswer PrintList()
-        {
-            try
-            {
-                int trow = 4;
-                ExcelPrintData ExcelPrnData = null;
-
-                //// 請求書表紙シートの取得
-                m_UsedExcel.ExcelSheetGet(s_DicSheetName[enumSheetName.List]);
-
-                List<int> lstKey = new List<int>(m_dicReqData.Keys);
-
-                foreach (int nReqNo in lstKey)
-                {
-                    List<RequestData> lstData = null;
-
-                    if (m_dicReqData.TryGetValue(nReqNo, out lstData) == false)
-                    {
-                        continue;
-                    }
-
-                    foreach (RequestData ReqData in lstData)
-                    {
-                        ConstructionBaseInfo Info = null;
-
-                        if (m_dicConstructionBaseInfo.TryGetValue(ReqData.MainConstructionCode, out Info) == false)
-                        {
-                            continue;
-                        }
-
-                        string strname = (ReqData.MainConstructionCode / 100).ToString();
-                        strname += "-";
-                        strname += (ReqData.MainConstructionCode % 100).ToString("00");
-                        strname += "\r\n";
-                        strname += ReqData.ConstructionName;
-
-                        ExcelPrnData = new ExcelPrintData();
-                        ExcelPrnData.AddPrintData("B", trow, strname);             // 工事件名
-                        ExcelPrnData.AddPrintData("C", trow, string.Format("{0}年{1}月{2}日"
-                                                                        , Info.ConstructionPeriodStart.Year
-                                                                        , Info.ConstructionPeriodStart.Month.ToString("00")
-                                                                        , Info.ConstructionPeriodStart.Day.ToString("00")));    // 工期開始
-
-                        string EndDate = string.Empty;
-                        string DateDescription = string.Empty;
-                        if (Info.RevCompleteDate != DateTime.MinValue)
-                        {   // 検査是正完了日
-                            EndDate = string.Format("{0}年{1}月{2}日"
-                                                                    , Info.RevCompleteDate.Year
-                                                                    , Info.RevCompleteDate.Month.ToString("00")
-                                                                    , Info.RevCompleteDate.Day.ToString("00"));
-                            DateDescription = "（現場是正完了日）";
-                        }
-                        else
-                        {   // 請求確認日
-                            EndDate = string.Format("{0}年{1}月{2}日"
-                                                                    , Info.BillingDate.Year
-                                                                    , Info.BillingDate.Month.ToString("00")
-                                                                    , Info.BillingDate.Day.ToString("00"));
-                            DateDescription = "（請求書確認日）";
-                        }
-                        ExcelPrnData.AddPrintData("C", trow + 1, string.Format("～ {0}", EndDate));                 // 工期終了
-                        ExcelPrnData.AddPrintData("C", trow + 2, DateDescription);                                  // 終了日説明
-
-                        long lAmount = ReqData.RequestAmount0;
-                        lAmount += ReqData.RequestAmount1;
-                        lAmount += ReqData.RequestAmount2;
-                        lAmount += ReqData.RequestAmount3;
-                        lAmount += ReqData.RequestAmount4;
-                        lAmount += ReqData.RequestAmount5;
-                        lAmount += ReqData.RequestAmount6;
-                        lAmount += ReqData.TaxAmount;
-                        lAmount += ReqData.UnpaidAmount;
-
-                        ExcelPrnData.AddPrintData("D", trow, lAmount.ToString("#,0"));                                  // 請求金額
-
-                        ExcelPrnData.AddPrintData("E", trow, ReqData.Note);                                             // 備考
-                        ExcelPrnData.ExcelCellSet(m_UsedExcel);
-
-                        trow += 3;
-
-                    }
-                }
-
-                return CommonDefine.RetunAnswer.Answer0;
-            }
-            catch (Exception ex)
-            {
-                logger.ErrorFormat("システムエラー：{0}：{1}", CommonMotions.GetMethodName(), ex.Message);
-                return CommonDefine.RetunAnswer.Answer1;
-            }
-        }
-        #endregion
-
-        #region 請求書(内訳)作成
-        /// <summary>
-        /// 請求書(内訳)作成
-        /// </summary>
-        /// <param name="dicReqDetail"></param>
-        /// <param name="constLedger"></param>
-        /// <param name="lstConstLink"></param>
-        /// <returns></returns>
-        private CommonDefine.RetunAnswer PrintDetail(int no, RequestHead ReqHead, RequestData ReqData, ConstructionBaseInfo Info)
-        {
-            try
-            {
-                // 請求書内訳シートの取得
-                m_UsedExcel.ExcelSheetGet(s_DicSheetName[enumSheetName.Detail]);
-
-                ExcelPrintData ExcelPrnData = null;
-
-                // ------------------------------- 工事名 -------------------------------
-                // ① 工事件名
-                ExcelPrnData = new ExcelPrintData();
-                ExcelPrnData.AddPrintData("C", 2, ReqData.ConstructionName).ExcelCellSet(m_UsedExcel);
-
-                // ------------------------------- 請負金額 -------------------------------
-                ExcelPrnData = new ExcelPrintData();
-                ExcelPrnData.AddPrintData("A", 5, no.ToString());
-                ExcelPrnData.AddPrintData("G", 5, ReqData.ContractAmount.ToString("#,0"));
-                ExcelPrnData.ExcelCellSet(m_UsedExcel);
-
-                // ------------------------------- 前回ご請求分 -------------------------------
-                // 分割払いの場合
-                if (Info.BillingSplitFlg == (int)ConstructionBaseInfo.BillingSplitFlgDef.SplitBilling)
-                {
-                    ExcelPrnData = new ExcelPrintData();
-                    ExcelPrnData.AddPrintData("B", 7, "前回ご請求済分");
-                    ExcelPrnData.AddPrintData("C", 7, "前回請求書参照※増減補正済み");
-                    ExcelPrnData.AddPrintData("D", 7, "1");
-                    ExcelPrnData.AddPrintData("E", 7, "式");
-                    ExcelPrnData.AddPrintData("G", 7, ReqData.PaidAmount.ToString("#,0"));
-                    ExcelPrnData.ExcelCellSet(m_UsedExcel);
-                }
-
-                long lTotalAmount = 0;
-
-                // ------------------------------- 見積金額（本工事） -------------------------------
-                ExcelPrnData = new ExcelPrintData();
-                ExcelPrnData.AddPrintData("G", 9, ReqData.RequestAmount0.ToString("#,0"));
-                ExcelPrnData.ExcelCellSet(m_UsedExcel);
-
-                lTotalAmount += ReqData.RequestAmount0;
-
-                // ------------------------------- 見積金額（増減工事） -------------------------------
-                long[] lAmount = new long[] { ReqData.RequestAmount1, ReqData.RequestAmount2, ReqData.RequestAmount3, ReqData.RequestAmount4, ReqData.RequestAmount5, ReqData.RequestAmount6 };
-                string[] strTitle = new string[] { "増減工事１", "増減工事２", "増減工事３", "増減工事４", "増減工事５", "増減工事６" };
-
-                for (int i = 0; i < 6; i++)
-                {
-                    if (lAmount[i] > 0)
-                    {
-                        ExcelPrnData = new ExcelPrintData();
-                        ExcelPrnData.AddPrintData("B", 10 + i, strTitle[i]);
-                        ExcelPrnData.AddPrintData("C", 10 + i, "追加増減見積もり参照");
-                        ExcelPrnData.AddPrintData("D", 10 + i, "1");
-                        ExcelPrnData.AddPrintData("E", 10 + i, "式");
-                        ExcelPrnData.AddPrintData("G", 10 + i, lAmount[i].ToString("#,0"));
-                        ExcelPrnData.ExcelCellSet(m_UsedExcel);
-
-                        lTotalAmount += lAmount[i];
-                    }
-                }
-
-                // ------------------------------- 今回ご請求分 -------------------------------
-                ExcelPrnData = new ExcelPrintData();
-                ExcelPrnData.AddPrintData("G", 17, lTotalAmount.ToString("#,0"));
-                ExcelPrnData.ExcelCellSet(m_UsedExcel);
-
-                // ------------------------------- 請負金額残金 -------------------------------
-                // 分割払いの場合
-                if (Info.BillingSplitFlg == (int)ConstructionBaseInfo.BillingSplitFlgDef.SplitBilling)
-                {
-                    ExcelPrnData = new ExcelPrintData();
-                    ExcelPrnData.AddPrintData("B", 19, "請負金額残金");
-                    ExcelPrnData.AddPrintData("D", 19, "1");
-                    ExcelPrnData.AddPrintData("E", 19, "式");
-                    ExcelPrnData.AddPrintData("G", 19, ReqData.UnclaimedAmount.ToString("#,0"));
-                    ExcelPrnData.ExcelCellSet(m_UsedExcel);
-                }
-
-                // ------------------------------- 未入金分 -------------------------------
-                if (ReqData.UnpaidAmount > 0)
-                {
-                    ExcelPrnData = new ExcelPrintData();
-                    ExcelPrnData.AddPrintData("B", 21, "未入金分");
-                    ExcelPrnData.AddPrintData("G", 21, ReqData.UnpaidAmount.ToString("#,0"));
-                    ExcelPrnData.ExcelCellSet(m_UsedExcel);
-
-                    lTotalAmount += ReqData.UnpaidAmount;
-                }
-
-                // ------------------------------- 小計 -------------------------------
-                ExcelPrnData = new ExcelPrintData();
-                ExcelPrnData.AddPrintData("G", 23, lTotalAmount.ToString("#,0"));
-                ExcelPrnData.ExcelCellSet(m_UsedExcel);
-
-                // ------------------------------- 消費税 -------------------------------
-                ExcelPrnData = new ExcelPrintData();
-                ExcelPrnData.AddPrintData("C", 24, string.Format("{0}%", CommonMotions.SystemMasterData.ConsumptionTax));
-                ExcelPrnData.AddPrintData("G", 24, ReqData.TaxAmount.ToString("#,0"));
-                ExcelPrnData.ExcelCellSet(m_UsedExcel);
-                lTotalAmount += ReqData.TaxAmount;
-
-                // ------------------------------- 税込金額合計 -------------------------------
-                ExcelPrnData = new ExcelPrintData();
-                ExcelPrnData.AddPrintData("G", 25, lTotalAmount.ToString("#,0"));
-                ExcelPrnData.ExcelCellSet(m_UsedExcel);
-
-                return CommonDefine.RetunAnswer.Answer0;
-            }
-            catch (Exception ex)
-            {
-                logger.ErrorFormat("システムエラー：{0}：{1}", CommonMotions.GetMethodName(), ex.Message);
-                return CommonDefine.RetunAnswer.Answer1;
-            }
-
-        }
-        #endregion
-
-        #region Excelデータ出力用内部クラス定義
-        /// <summary>
-        /// Excelデータ出力用内部クラス定義
-        /// </summary>
-        private class ExcelPrintData
-        {
-            // Excelデータ保持用用ディクショナリ
-            private Dictionary<int, Dictionary<int, object>> m_DicPrintData = new Dictionary<int, Dictionary<int, object>>();
-
-            // Excelカラム名取得用
-            private static char[] s_Asc = { 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z' };
-
-            private int m_RowMin = int.MaxValue;
-            private int m_RowMax = int.MinValue;
-            private int m_ColMin = int.MaxValue;
-            private int m_ColMax = int.MinValue;
-
-            /// <summary>
-            /// エクセルカラム名とインデックス番号のディクショナリ
-            /// </summary>
-            private static Dictionary<string, int> s_IndexOfExcelColumn = InitDicColumnIndex();
-
-            /// <summary>
-            /// Excelカラムインデックスディクショナリ作成メソッド
-            /// </summary>
-            /// <returns></returns>
-            private static Dictionary<string, int> InitDicColumnIndex()
-            {
-                var result = new Dictionary<string, int>();
-
-                for (int indx = 0; indx < 256; indx++)
-                {
-                    string res = GetColumnString(indx);
-
-                    result.Add(res, indx);
-
-                }
-                return result;
-            }
-
-            /// <summary>
-            /// カラム英字名を取得
-            /// </summary>
-            /// <param name="colIndex"></param>
-            /// <returns></returns>
-            private static string GetColumnString(int colIndex)
-            {
-                string res = "";
-
-                int court = colIndex;
-                while (court >= s_Asc.Count())
-                {
-                    res = s_Asc[court % s_Asc.Count()] + res;
-                    court = (int)Math.Truncate((double)court / (double)s_Asc.Count() - 1);
-                }
-                res = s_Asc[court % s_Asc.Count()] + res;
-
-                return res;
-            }
-
-            #region データ追加
-            /// <summary>
-            /// データ追加
-            /// </summary>
-            /// <param name="colName">カラム名文字(※ "A", "B", 等...</param>
-            /// <param name="rowNo">行インデックス番号 0オリジン</param>
-            /// <param name="data">出力データオブジェクト</param>
-            /// <returns></returns>
-            public ExcelPrintData AddPrintData(string colName, int rowNo, object data)
-            {
-                return AddPrintData(s_IndexOfExcelColumn[colName], rowNo, data);
-            }
-            #endregion
-
-            #region データ追加
-            /// <summary>
-            /// データ追加
-            /// </summary>
-            /// <param name="colIndex">カラムインデックス 0オリジン</param>
-            /// <param name="rowNo">行インデックス番号 0オリジン</param>
-            /// <param name="data">出力データオブジェクト</param>
-            /// <returns></returns>
-            public ExcelPrintData AddPrintData(int colIndex, int rowNo, object data)
-            {
-                if (!m_DicPrintData.ContainsKey(rowNo))
-                    m_DicPrintData[rowNo] = new Dictionary<int, object>();
-
-                m_DicPrintData[rowNo][colIndex] = data;
-
-                if (m_RowMin > rowNo) m_RowMin = rowNo;
-                if (m_RowMax < rowNo) m_RowMax = rowNo;
-                if (m_ColMin > colIndex) m_ColMin = colIndex;
-                if (m_ColMax < colIndex) m_ColMax = colIndex;
-
-                return this;
-            }
-            #endregion
-
-            #region UsedExcelオブジェクトにデータをセットする
-            /// <summary>
-            /// UsedExcelオブジェクトにデータをセットする
-            /// </summary>
-            /// <param name="usedExcel">UsedExcelオブジェクト(シート取得済みであること)</param>
-            public void ExcelCellSet(UsedExcel usedExcel)
-            {
-                if (m_RowMin == int.MaxValue ||
-                    m_RowMax == int.MinValue ||
-                    m_ColMin == int.MaxValue ||
-                    m_ColMax == int.MinValue)
-                {
-                    return;
-                }
-
-                // オブジェクト配列を宣言
-                object[,] objCells = new object[m_RowMax - m_RowMin + 1, m_ColMax - m_ColMin + 1];
-
-                // 配列にデータを移し替える
-                foreach (int row in m_DicPrintData.Keys)
-                {
-                    foreach (int col in m_DicPrintData[row].Keys)
-                    {
-                        objCells[row - m_RowMin, col - m_ColMin] = m_DicPrintData[row][col];
-                    }
-                }
-
-                // セル名を取得
-                string startCell = GetColumnString(m_ColMin) + string.Format("{0}", m_RowMin + 1);
-                string endCell = GetColumnString(m_ColMax) + string.Format("{0}", m_RowMax + 1);
-
-                // セルにセット
-                usedExcel.ExcelCellSet(startCell, objCells, endCell);
-
-            }
-            #endregion
-        }
-        #endregion
-    }
-}
Index: branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/RequestEntry/FrmRequestPrint.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/RequestEntry/FrmRequestPrint.cs	(revision 334)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/RequestEntry/FrmRequestPrint.cs	(revision 335)
@@ -36,37 +36,6 @@
             radioButtonC1,
             radioButtonC2,
         }
-
-        /// <summary>
-        /// Excelテンプレートファイル名
-        /// </summary>
-        //private static string s_ExcelRequestSheetFileName = @"\RequestSheet.xlsx";
-        private static string s_ExcelRequestSheetFileName = CommonDefine.s_ExcelOriginalFileName;
-
-        /// <summary>
-        /// デスクトップフォルダ名
-        /// </summary>
-        private static string s_ExecCurrentDirName = System.Environment.GetFolderPath(Environment.SpecialFolder.DesktopDirectory);
-
-        /// <summary>
-        /// シート名称カウント
-        /// </summary>
-        enum enumSheetName
-        {
-            Cover = 0,
-            List,
-            Detail,
-        }
-
-        /// <summary>
-        /// Excel シート名称
-        /// </summary>
-        private static readonly Dictionary<enumSheetName,string> s_DicSheetName = new Dictionary<enumSheetName, string>()
-        {
-            { enumSheetName.Cover, "請求書（表紙）" },
-            { enumSheetName.List, "請求書（一覧）" },
-            { enumSheetName.Detail, "請求書（内訳）" },
-        };
         #endregion
 
         #region 変数
@@ -125,39 +94,19 @@
         private RequestData m_RequestData = new RequestData();
 
         /// <summary>
-        /// 請求合計データ
-        /// </summary>
-//        private List<RequestTotalData> m_LstRequestTotalData = new List<RequestTotalData>();
-
-        /// <summary>
         /// ツールチップ
         /// </summary>
         private ToolTip ToolTip1 = new ToolTip();
 
         /// <summary>
-        /// Excel印刷クラスオブジェクト
-        /// </summary>
-        //private UsedExcel m_UsedExcel = null;
-
-        /// <summary>
-        /// 保存時Excelパス
-        /// </summary>
-        private string m_SelectSaveExcel = "";
-
-        /// <summary>
         /// 請求書No
         /// </summary>
         private int m_nInvoiceNo = 0;
 
-        ///// <summary>
-        ///// 請求書データ
-        ///// </summary>
-        //private InvoiceData m_InvData = new InvoiceData();
-
         /// <summary>
-        /// 請求書ヘッダ
+        /// コメントデータ
         /// </summary>
-        //private List<RequestHead> m_lstReqHead = new List<RequestHead>();
+        private string[] m_CommentData = new string[5];
 
         /// <summary>
         /// 請求データ
@@ -180,29 +129,6 @@
         private bool m_ParentEnd = false;
         // *-----* 共通処理設定 *-----*
 
-        /// <summary>
-        /// 図形置き場シート
-        /// </summary>
-        private const string s_shapeSheetName = "図形シート";
-        /// <summary>
-        /// 図形名称
-        /// </summary>
-        private const string s_shapeName = "EstimateSeal1";                                    // 積算見積表紙判子
-        /// <summary>
-        /// 図形サイズ【縦・横】（図形名称順）
-        /// </summary>
-        private static float[,] s_ShapeSize = new float[1, 2] { { 25.51f, 25.51f } };         // 積算見積表紙判子
-        /// <summary>
-        /// 積算見積表紙判子フォントサイズ
-        /// </summary>
-        private static float[] s_EstimateSeal1FontSize = { 16f, 8f, 8f, 8f, 6f };
-        /// <summary>
-        /// 表紙判子位置(Key:X Value:Y)
-        /// </summary>
-        private static float[,] s_CoverSealPoint = new float[4, 2] {{592.50f, 555.25f},    // 社長
-                                                                    {657.25f, 555.25f},    // 所属長
-                                                                    {721.00f, 555.25f},    // 営業
-                                                                    {784.00f, 555.25f} };  // 担当
         #endregion
 
         #region プロパティ
@@ -215,6 +141,9 @@
             set { m_ConstructionCode = value; }
         }
 
+        /// <summary>
+        /// 請求番号
+        /// </summary>
         public int RequestNo
         {
             get { return m_RequestNo; }
@@ -239,7 +168,7 @@
         }
 
         /// <summary>
-        /// 設計書No
+        /// 請求書No
         /// </summary>
         public int InvoiceNo
         {
@@ -247,6 +176,15 @@
             set { m_nInvoiceNo = value; }
         }
 
+        /// <summary>
+        /// コメントデータ
+        /// </summary>
+        public string[] CommentData
+        {
+            get { return m_CommentData; }
+            set { m_CommentData = value; }
+        }
+
         // *-----* 共通処理設定 *-----*
         /// <summary>
         /// サブフォームフラグ
@@ -331,32 +269,32 @@
         /// </summary>
         /// <param name="sender"></param>
         /// <param name="e"></param>
-        //private async void btnExecProc1_Click(object sender, EventArgs e)
         private void btnExecProc1_Click(object sender, EventArgs e)
         {
-            // 状態確認
-            if (!StatusChange()) return;
+            try
+            {
+                // 状態確認
+                if (!StatusChange()) return;
 
-            // 日付印刷をしない
-            if (rdNoPrint.Checked) m_bDatePrintFlg = false;
+                // 日付印刷をしない
+                if (rdNoPrint.Checked) m_bDatePrintFlg = false;
 
-            // 選択日付取得
-            m_ExcuteDate = dateTimePicker1.Value;
+                // 選択日付取得
+                m_ExcuteDate = dateTimePicker1.Value;
 
-            // 請求書データの反映
-            EntryInvoiceData();
+                // コメントを画面より取り込む
+                SetCommentData();
 
-            // 工事基本情報を更新する
-            UpdateConstructionBaseInfo();
-
-            //await Task.Run(() =>
-            //{
-            //    // 印刷処理
-            //    PrintMain(true);
-            //});
-
-            DialogResult = DialogResult.Yes;
-            this.Close();
+                DialogResult = DialogResult.Yes;
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("システムエラー：{0}：{1}", CommonMotions.GetMethodName(), ex.Message);
+            }
+            finally
+            {
+                this.Close();
+            }
         }
         #endregion
 
@@ -366,43 +304,54 @@
         /// </summary>
         /// <param name="sender"></param>
         /// <param name="e"></param>
-        //private async void btnExecProc2_Click(object sender, EventArgs e)
         private void btnExecProc2_Click(object sender, EventArgs e)
         {
-            // 保存先指定ダイアログの表示
-            FrmSaveFilePath frm = new FrmSaveFilePath();
-            frm.SaveType = (int)CommonDefine.SaveFileType.ExcelFile;
-            frm.ShowDialog(this);
-            if (frm.EndButton == DialogResult.Cancel)
+            try
             {
-                return;
-            }
-            m_SelectSaveExcel = frm.SelectPath;
+                // 状態確認
+                if (!StatusChange()) return;
 
-            // 状態確認
-            if (!StatusChange()) return;
+                // 日付印刷をしない
+                if (rdNoPrint.Checked) m_bDatePrintFlg = false;
 
-            // 日付印刷をしない
-            if (rdNoPrint.Checked) m_bDatePrintFlg = false;
-            
-            // 選択日付取得
-            m_ExcuteDate = dateTimePicker1.Value;
+                // 選択日付取得
+                m_ExcuteDate = dateTimePicker1.Value;
 
-            // 請求書データの反映
-            EntryInvoiceData();
+                // コメントを画面より取り込む
+                SetCommentData();
 
-            // 工事基本情報を更新する
-            UpdateConstructionBaseInfo();
+                DialogResult = DialogResult.No;
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("システムエラー：{0}：{1}", CommonMotions.GetMethodName(), ex.Message);
+            }
+            finally
+            {
+                this.Close();
+            }
+        }
+        #endregion
 
-            // 非同期で印刷処理を実行する
-            //await Task.Run(() =>
-            //{
-            //    // 印刷処理
-            //    PrintMain(false);
-            //});
-
-            DialogResult = DialogResult.Yes;
-            this.Close();
+        #region コメントを画面より取り込む
+        /// <summary>
+        /// コメントを画面より取り込む
+        /// </summary>
+        private void SetCommentData()
+        {
+            try
+            {
+                Array.Clear(m_CommentData, 0, m_CommentData.Length);
+                m_CommentData[0] = txtComment1.Text;
+                m_CommentData[1] = txtComment2.Text;
+                m_CommentData[2] = txtComment3.Text;
+                m_CommentData[3] = txtComment4.Text;
+                m_CommentData[4] = txtComment5.Text;
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("システムエラー：{0}：{1}", CommonMotions.GetMethodName(), ex.Message);
+            }
         }
         #endregion
 
@@ -507,13 +456,9 @@
                 bool bRet = true;
 
                 InvoiceData InvData = new InvoiceData();
-                List<RequestHead> lstReqHead = new List<RequestHead>();
                 // 請求書データの取得
-                if (!GetInvoiceData(ref InvData, ref lstReqHead)) return false;
+                if (!GetInvoiceData(ref InvData)) return false;
 
-                // 本工事の工事情報の取得
-                if (!GetMainConstructionBaseInfo(lstReqHead)) return false;
-
                 if (InvData.RequestDate == DateTime.MinValue)
                 {
                     // 初期時間セット
@@ -567,50 +512,22 @@
         }
         #endregion
 
-        #region 請求金額退避エリア
-        /// <summary>
-        /// 請求金額退避エリア
-        /// </summary>
-        private long m_lTotalAmount = 0;    // 合計金額
-        private long m_lTaxAmount = 0;      // 合計税金
-        #endregion
-
         #region 請求書データの取得
         /// <summary>
         /// 請求書データの取得
         /// </summary>
-        private bool GetInvoiceData(ref InvoiceData InvData, ref List<RequestHead> lstReqHead)
+        private bool GetInvoiceData(ref InvoiceData InvData)
         {
             IOInvoiceData ioInvData = new IOInvoiceData();
-            IORequestHead ioReqHead = new IORequestHead();
-            IORequestData ioReqData = new IORequestData();
 
             try
             {
-                string sql = "";
+                StringBuilder sql = new StringBuilder();
 
                 // 請求書データの取得
-                sql = ioInvData.CreatePrimarykeyString(m_nInvoiceNo);
-                if (!ioInvData.SelectAction(sql, ref InvData)) return false;
+                sql.Append(ioInvData.CreatePrimarykeyString(m_nInvoiceNo));
+                if (!ioInvData.SelectAction(sql.ToString(), ref InvData)) return false;
 
-                // 請求ヘッダの取得
-                sql = string.Format(" WHERE InvoiceNo = {0} ORDER BY ReqConstructionCode", m_nInvoiceNo);
-                if (!ioReqHead.SelectAction(sql, ref lstReqHead)) return false;
-
-                foreach (RequestHead ReqHead in lstReqHead)
-                {
-                    // 請求ヘッダの取得
-                    sql = string.Format(" WHERE RequestNo = {0} ORDER BY MainConstructionCode", ReqHead.RequestNo);
-                    List<RequestData> lstReqData = new List<RequestData>();
-                    if (!ioReqData.SelectAction(sql, ref lstReqData)) return false;
-
-                    m_dicReqData.Add(ReqHead.RequestNo, lstReqData);
-
-                    // 請求金額集計
-                    m_lTotalAmount += ReqHead.RequestTotalAmount;
-                    m_lTaxAmount += ReqHead.TaxAmount;
-                }
-
                 return true;
             }
             catch (Exception ex)
@@ -622,1125 +539,9 @@
             finally
             {
                 ioInvData.close(); ioInvData = null;
-                ioReqHead.close(); ioReqHead = null;
-                ioReqData.close(); ioReqData = null;
             }
 
         }
         #endregion
-
-        #region 工事基本情報の追加
-        /// <summary>
-        /// 工事基本情報の追加
-        /// </summary>
-        /// <param name="Info"></param>
-        private void AddConstructionBaseInfoDic(ConstructionBaseInfo Info)
-        {
-            ConstructionBaseInfo wrk = null;
-
-            if (!m_dicConstructionBaseInfo.TryGetValue(Info.ConstructionCode, out wrk))
-            {
-                m_dicConstructionBaseInfo.Add(Info.ConstructionCode, Info);
-            }
-        }
-        #endregion
-
-        #region 工事基本情報の取得
-        /// <summary>
-        /// 工事基本情報の取得
-        /// </summary>
-        private bool GetMainConstructionBaseInfo(List<RequestHead> lstReqHead)
-        {
-            IOConstructionBaseInfo ioInfo = new IOConstructionBaseInfo();
-
-            try
-            {
-                foreach (RequestHead ReqHead in lstReqHead)
-                {
-                    string sql = ioInfo.CreatePrimarykeyString(ReqHead.ReqConstructionCode);
-                    ConstructionBaseInfo info = new ConstructionBaseInfo();
-                    if (!ioInfo.SelectAction(sql, ref info)) return false;
-
-                    AddConstructionBaseInfoDic(info);
-                }
-
-                List<int> lstKey = new List<int>(m_dicReqData.Keys);
-                foreach (int nRequestNo in lstKey)
-                {
-                    List<RequestData> lstReqData = null;
-
-                    if (!m_dicReqData.TryGetValue(nRequestNo, out lstReqData)) return false;
-
-                    foreach (RequestData ReqData in lstReqData)
-                    {
-                        string sql = ioInfo.CreatePrimarykeyString(ReqData.MainConstructionCode);
-                        ConstructionBaseInfo info = new ConstructionBaseInfo();
-                        if (!ioInfo.SelectAction(sql, ref info)) return false;
-
-                        AddConstructionBaseInfoDic(info);
-                    }
-                }
-
-                return true;
-            }
-            catch (Exception ex)
-            {
-                logger.ErrorFormat("システムエラー：{0}：{1}", CommonMotions.GetMethodName(), ex.Message);
-                return false;
-            }
-            finally
-            {
-                ioInfo.close(); ioInfo = null;
-            }
-
-        }
-        #endregion
-
-        #region 請求書データの反映
-        /// <summary>
-        /// 請求書データの反映
-        /// </summary>
-        /// <returns></returns>
-        private bool EntryInvoiceData()
-        {
-            IOInvoiceData ioInvData = new IOInvoiceData();
-
-            try
-            {
-                InvoiceData invoiceData = new InvoiceData();
-
-                StringBuilder sql = new StringBuilder();
-                sql.Append(ioInvData.CreatePrimarykeyString(m_nInvoiceNo));
-                if (!ioInvData.SelectAction(sql.ToString(), ref invoiceData)) return false;
-
-                invoiceData.TotalAmount = m_lTotalAmount;
-                invoiceData.TaxAmount = m_lTaxAmount;
-                invoiceData.RequestDate = m_ExcuteDate;
-
-                invoiceData.Comment1 = txtComment1.Text;
-                invoiceData.Comment2 = txtComment2.Text;
-                invoiceData.Comment3 = txtComment3.Text;
-                invoiceData.Comment4 = txtComment4.Text;
-                invoiceData.Comment5 = txtComment5.Text;
-
-                invoiceData.CompleteFlg = 1;
-
-                return ioInvData.UpdateAction(sql.ToString(), invoiceData);
-            }
-            catch (Exception ex)
-            {
-                logger.ErrorFormat("システムエラー：{0}：{1}", CommonMotions.GetMethodName(), ex.Message);
-
-                return false;
-            }
-            finally
-            {
-                ioInvData.close();                ioInvData = null;
-            }
-        }
-        
-        #endregion
-
-        #region 工事データ更新
-        /// <summary>
-        /// 工事基本情報を更新する
-        /// </summary>
-        /// <returns></returns>
-        private bool UpdateConstructionBaseInfo()
-        {
-
-            IOConstructionBaseInfo ioInfo = new IOConstructionBaseInfo();
-            IOConstructionProgressDate ioPrgDate = new IOConstructionProgressDate();
-
-            List<int> lstKeyInfo = new List<int>(m_dicConstructionBaseInfo.Keys);
-
-            Dictionary<int, int> dicCodeWork = new Dictionary<int, int>();
-
-            // トランザクション開始
-            ioInfo.beginTran();
-            ioPrgDate.beginTran();
-
-            string sql = "";
-
-            try
-            {
-                foreach (int nConstructionCode in lstKeyInfo)
-                {
-                    int nOldStatus = 0;
-                    ConstructionBaseInfo Info = null;
-
-                    // 工事基本情報の取得
-                    if (!m_dicConstructionBaseInfo.TryGetValue(nConstructionCode, out Info))
-                    {
-                        ioInfo.rollback();
-                        ioPrgDate.rollback();
-                        return false;
-                    }
-
-                    nOldStatus = Info.ConstructionStatusFlg;
-
-                    // 工事状態が「請求準備」ではない場合は対象外
-                    if (nOldStatus != (int)CommonDefine.StatNumArray.Status9) continue;
-
-                    // 工事基本情報で請求一括でない場合は対象外
-                    if (Info.BillingSplitFlg != (int)ConstructionBaseInfo.BillingSplitFlgDef.AllOnBilling) continue;
-
-                    // 工事状態フラグを「請求確認」に変更
-                    Info.ConstructionStatusFlg = (int)CommonDefine.StatNumArray.Status10;
-
-                    // 工事基本情報を更新
-                    sql = ioInfo.CreatePrimarykeyString(nConstructionCode);
-                    if (!ioInfo.UpdateAction(sql, Info, false))
-                    {
-                        ioInfo.rollback();
-                        ioPrgDate.rollback();
-                        return false;
-                    }
-
-                    // 既にデータが存在しないか一度検索しておく
-                    sql = ioPrgDate.CreatePrimarykeyString(nConstructionCode, Info.ConstructionStatusFlg);
-                    List<ConstructionProgressDate> lstPrgDate = new List<ConstructionProgressDate>();
-                    if (!ioPrgDate.SelectAction(sql, ref lstPrgDate, false))
-                    {
-                        ioInfo.rollback();
-                        ioPrgDate.rollback();
-                        return false;
-                    }
-
-                    // データがある場合は、当該データを削除する
-                    if (lstPrgDate.Count > 0)
-                    {
-                        // 該当データを削除
-                        sql = ioPrgDate.CreatePrimarykeyString(nConstructionCode, Info.ConstructionStatusFlg);
-                        if (!ioPrgDate.DeleteAction(sql, false))
-                        {
-                            ioInfo.rollback();
-                            ioPrgDate.rollback();
-                            return false;
-                        }
-                    }
-
-                    // 案件進捗日付データの構築
-                    ConstructionProgressDate PrgDate = new ConstructionProgressDate();
-
-                    // 案件進捗日付データの設定
-                    PrgDate.ConstructionCode = nConstructionCode;
-                    PrgDate.ConstructionStatusFlg = (int)CommonDefine.StatNumArray.Status10;
-                    PrgDate.PreviousStatusFlg = nOldStatus;
-                    PrgDate.ChangeDate = DateTime.Now;
-                    PrgDate.ChangePersonCode = CommonMotions.LoginUserData.PersonCode;
-
-                    // 案件進捗日付データを挿入
-                    if (!ioPrgDate.InsertAction(PrgDate, false))
-                    {
-                        ioInfo.rollback();
-                        ioPrgDate.rollback();
-                        return false;
-                    }
-
-                    // 対象工事が結合（子）工事の場合
-                    if (Info.JoinFlg == (int)ConstructionBaseInfo.JoinFlgDef.JoinChildren)
-                    {
-                        // 結合（親）工事番号の取得
-                        int nParentCode = GetJoinParentConstructionCode(nConstructionCode);
-
-                        int nChildCode = 0;
-
-                        // 親工事番号が登録されていない場合は登録する
-                        if (!dicCodeWork.TryGetValue(nParentCode, out nChildCode))
-                        {
-                            // 結合（親）の工事状態を更新するために工事番号を退避
-                            dicCodeWork.Add(nParentCode, nConstructionCode);
-                        }
-                    }
-
-                }
-
-                List<int> lstKeyLink = new List<int>(dicCodeWork.Keys);
-
-                foreach (int nParentCode in lstKeyLink)
-                {
-                    int nChildCode = 0;
-
-                    if (dicCodeWork.TryGetValue(nParentCode, out nChildCode))
-                    {
-                        // 結合（親）の工事状態を変更
-                        ClsChangeBaseInfoData.SetParentConstrStatus(ioInfo, nChildCode);
-                    }
-                }
-
-                // DBコミット
-                ioInfo.commit();
-                ioPrgDate.commit();
-
-                return true;
-            }
-            catch (Exception ex)
-            {
-                logger.ErrorFormat("システムエラー：{0}：{1}", CommonMotions.GetMethodName(), ex.Message);
-                return false;
-            }
-            finally
-            {
-                ioInfo.close(); 
-                ioInfo = null;
-                ioPrgDate.close();
-                ioPrgDate = null;
-            }
-        }
-
-        #endregion
-
-        #region DBアクセス処理
-
-        #region 結合親工事番号の取得
-        /// <summary>
-        /// 結合親工事番号の取得
-        /// </summary>
-        /// <param name="nConstructionCode"></param>
-        /// <returns></returns>
-        private int GetJoinParentConstructionCode(int nConstructionCode)
-        {
-            int nParentCode = -1;
-            IOConstructionLink ioLink = new IOConstructionLink();
-
-            try
-            {
-                string sql = string.Format(" WHERE FluctuationCode = {0} AND LinkType = 1 ", nConstructionCode);
-                List<ConstructionLink> lstWork = new List<ConstructionLink>();
-
-                if (ioLink.SelectAction(sql, ref lstWork) == false)
-                {
-                    return nParentCode;
-                }
-
-                foreach (ConstructionLink Link in lstWork)
-                {
-                    nParentCode = Link.ConstructionCode;
-                    break;
-                }
-                return nParentCode;
-            }
-            catch (Exception ex)
-            {
-                logger.ErrorFormat("システムエラー：{0}：{1}", CommonMotions.GetMethodName(), ex.Message);
-                return -1;
-            }
-            finally
-            {
-                ioLink.close(); 
-                ioLink = null;
-            }
-
-        }
-        #endregion
-        #endregion
-
-//        #region 印刷メイン
-//        /// <summary>
-//        /// 印刷メイン
-//        /// </summary>
-//        /// <param name="bPrint">true:印刷のみ,false:保存のみ</param>
-//        public void PrintMain(bool bPrint)
-//        {
-//            try
-//            {
-//                // 印刷クラス
-//                m_UsedExcel = new UsedExcel();
-
-//                // エクセルブックオープン
-//                if (!m_UsedExcel.ExcelBookOpen(System.Environment.CurrentDirectory + s_ExcelRequestSheetFileName))
-//                {
-//                    return;
-//                }
-
-//                // 表紙印刷
-//                CommonDefine.RetunAnswer rtAns = PrintCover();
-//                if (rtAns != CommonDefine.RetunAnswer.Answer0)
-//                {
-//                    return;
-//                }
-
-//                // 一覧印刷
-//                rtAns = PrintList();
-//                if (rtAns != CommonDefine.RetunAnswer.Answer0)
-//                {
-//                    return;
-//                }
-
-//                int no = 1;
-//                foreach (RequestHead ReqHead in m_lstReqHead)
-//                {
-//                    List<RequestData> lstReqData = null;
-//                    if (m_dicReqData.TryGetValue(ReqHead.RequestNo, out lstReqData) == false)
-//                    {
-//                        return;
-//                    }
-
-//                    foreach (RequestData ReqData in lstReqData)
-//                    {
-//                        ConstructionBaseInfo Info = null;
-
-//                        if (m_dicConstructionBaseInfo.TryGetValue(ReqData.MainConstructionCode, out Info) == false)
-//                        {
-//                            return;
-//                        }
-
-//                        long lRequestAmount = ReqData.RequestAmount0;
-//                        lRequestAmount += ReqData.RequestAmount1;
-//                        lRequestAmount += ReqData.RequestAmount2;
-//                        lRequestAmount += ReqData.RequestAmount3;
-//                        lRequestAmount += ReqData.RequestAmount4;
-//                        lRequestAmount += ReqData.RequestAmount5;
-//                        lRequestAmount += ReqData.RequestAmount6;
-//                        lRequestAmount += ReqData.UnpaidAmount;
-
-//                        if (lRequestAmount == 0)
-//                        {
-//                            continue;
-//                        }
-
-//                        rtAns = PrintDetail( no, ReqHead, ReqData, Info );
-//                        if (rtAns != CommonDefine.RetunAnswer.Answer0)
-//                        {
-//                            return;
-//                        }
-//                    }
-
-//                }
-
-//                if (bPrint)
-//                {
-//                    // 印刷処理
-//                    m_UsedExcel.ExcelSheetPrint();
-//                }
-//                else
-//                {
-//                    // 保存処理
-//                    SaveExcelFile();
-//                }
-//            }
-//            catch (System.Exception ex)
-//            {
-//                logger.ErrorFormat("システムエラー：{0}：{1}", CommonMotions.GetMethodName(), ex.Message);
-//            }
-//            finally
-//            {
-//                // Excel開放
-//                if (m_UsedExcel != null)
-//                {
-//                    m_UsedExcel.ExcelBookClose();
-//                }
-//                m_UsedExcel = null;
-
-//                // ガーベージコレクト
-//                GC.Collect();
-//            }
-
-//        }
-//        #endregion
-
-//        #region Excelファイル保存処理
-//        /// <summary>
-//        /// Excelファイル保存処理
-//        /// </summary>
-//        private void SaveExcelFile()
-//        {
-//            try
-//            {
-//                string filePath = @m_SelectSaveExcel;
-
-//                // ファイルパスの存在をチェック
-//                if (CommonMotions.ChkDirPath(filePath, true))
-//                {
-//                    // ファイル名を作成
-//                    string wrkFile = m_InvData.RequestName + "様 請求書";
-
-//                    // ファイル名に使用できない文字を取り除く
-//                    foreach (var badCh in m_UsedExcel.ExcelBadCharcter)
-//                    {
-//                        wrkFile = wrkFile.Replace(badCh, "");
-//                    }
-
-//                    // ファイル名作成
-//                    filePath += @"\" + @wrkFile;
-
-//                    // ファイル保存
-//                    m_UsedExcel.SaveSwitch = true;
-//                    m_UsedExcel.ExcelSaveBook(filePath);
-
-//                }
-//            }
-//            catch (System.Exception ex)
-//            {
-//                logger.ErrorFormat("システムエラー：{0}：{1}", CommonMotions.GetMethodName(), ex.Message);
-//            }
-
-//        }
-//        #endregion
-
-//        #region エリアスを付けた担当者マスタのフィールド文を作成する
-//        /// <summary>
-//        /// エリアスを付けた担当者マスタのフィールド文を作成する
-//        /// </summary>
-//        /// <param name="Alias"></param>
-//        /// <param name="strSQL"></param>
-//        private string CreatePersonSQL(string Alias)
-//        {
-//            try
-//            {
-//                StringBuilder strcmd = new StringBuilder();
-
-//                bool bColFirst = true;
-//                string strWork = string.Empty;
-//                foreach (var gender in Enum.GetValues(typeof(IOMPersonInCharge.ColumnCnt)))
-//                {
-//                    strWork = gender.ToString();
-//                    if (!bColFirst) strcmd.Append(", ");
-//                    if (strWork.Equals("StartDate") || strWork.Equals("EndDate"))
-//                    {
-//                        strcmd.AppendFormat(" DATE_FORMAT({0}{1}, '%Y/%m/%d')", Alias, strWork);
-//                    }
-//                    else if (strWork.Equals("EntryDate") || strWork.Equals("UpdateDate"))
-//                    {
-//                        strcmd.AppendFormat(" DATE_FORMAT({0}{1}, '%Y/%m/%d %H:%i:%s')", Alias, strWork);
-//                    }
-//                    else
-//                    {
-//                        strcmd.AppendFormat(" {0}{1}", Alias, strWork);
-//                    }
-//                    bColFirst = false;
-//                }
-
-//                return strcmd.ToString();
-//            }
-//            catch (Exception ex)
-//            {
-//                logger.ErrorFormat("システムエラー：{0}：{1}", CommonMotions.GetMethodName(), ex.Message);
-//                return string.Empty;
-//            }
-//        }
-//        #endregion
-
-//        #region 表紙印鑑表示
-//        /// <summary>
-//        ///  表紙印鑑表示
-//        /// </summary>
-//        private void PrintCoverSeal(int PersonCode)
-//        {
-//            IOMPersonInCharge picDB = new IOMPersonInCharge();
-//            IOProcessApproval paDB = new IOProcessApproval();
-//            try
-//            {
-//                ArrayList arlist = new ArrayList();
-
-//                // 承認データ読込
-//                StringBuilder strSQLSeal = new StringBuilder();
-//                strSQLSeal.Append("SELECT");
-//                strSQLSeal.Append(CreatePersonSQL("B."));
-//                strSQLSeal.Append(", C.SECRANK FROM PROCESSAPPROVAL A, PERSONINCHARGEMASTER B, SECURITYMASTER C");
-//                strSQLSeal.Append(paDB.CreatePrimarykeyString(m_lstReqHead[0].ReqConstructionCode, (int)ClsExcute.ApprovalListNo.OrderBillingApproval, m_lstReqHead[0].OrderNo));
-//                strSQLSeal.Append(" AND A.PERSONCODE = B.PERSONCODE");
-//                strSQLSeal.Append(" AND C.SECCODE = B.SECCODE");
-//                strSQLSeal.Append(" Order By C.SecRank ASC");
-//                if (!paDB.ExecuteReader(strSQLSeal.ToString(), ref arlist)) return;
-
-//                // 印刷テーブル作成
-//                int[] PorsonCode = new int[4] { 0, 0, 0, 0 };
-//                List<string> NameTable = new List<string>();
-//                for (int i = 0; i < PorsonCode.Length; i++) NameTable.Add("");
-//                string[] OrderOfPrecedenceTable = new string[4];
-
-//                int PersonDataCnt = Enum.GetNames(typeof(IOMPersonInCharge.ColumnCnt)).Length;
-//                // 承認データより担当者その他を取得する
-//                for (int i = 0; i < arlist.Count; i++)
-//                {
-//                    // エクセルの枠より多い場合は処理を抜ける
-//                    if (i > 3) break;
-
-//                    object[] readObj = (object[])arlist[i];
-//                    PersonInChargeMaster PersonRec = new PersonInChargeMaster();
-//                    picDB.Reader2Struct(readObj, ref PersonRec);
-
-//                    // セキュリティデータチェック
-//                    int SecRank = CommonMotions.cnvInt(readObj[PersonDataCnt]);
-//                    int SRank = (int)CommonDefine.SecurityRankPos.SpecialAuthority;     // 特別権限
-//                    int FRank = (int)CommonDefine.SecurityRankPos.FreeAuthority;        // 統括者権限
-//                    int LRank = (int)CommonDefine.SecurityRankPos.LimitedAuthority;     // 所属長権限
-
-//                    // 担当者以外は役職がある
-//                    if (SecRank == CommonDefine.SecurityRankList[SRank].Key
-//                        || SecRank == CommonDefine.SecurityRankList[FRank].Key
-//                        || SecRank == CommonDefine.SecurityRankList[LRank].Key)
-//                    {
-//                        // コードと名前と役職を取得する
-//                        PorsonCode[i] = PersonRec.PersonCode;
-//                        NameTable[i] = PersonRec.SealPrintName;
-//                        // 7文字以上は文字が見えないので省略
-//                        if (PersonRec.DisplayString.Length > 7)
-//                        {
-//                            OrderOfPrecedenceTable[i] = PersonRec.DisplayString.Substring(0, 7);
-//                        }
-//                        else if (PersonRec.DisplayString.Length < 1)
-//                        {
-//                            OrderOfPrecedenceTable[i] = "担　当";
-//                        }
-//                        else
-//                        {
-//                            OrderOfPrecedenceTable[i] = PersonRec.DisplayString;
-//                        }
-//                    }
-//                    else
-//                    {   // 担当者
-//                        // コードと名前を取得する
-//                        PorsonCode[3] = PersonRec.PersonCode;
-//                        NameTable[3] = PersonRec.SealPrintName;
-//                        OrderOfPrecedenceTable[3] = "担　当";
-//                    }
-//                }
-//                // テーブル内に同じコードが無いか後から調べる
-//                for (int i = 0; i < PorsonCode.Length - 1; i++)
-//                {
-//                    if (PorsonCode[i] == 0) continue;
-//                    for (int ii = 0; ii < PorsonCode.Length; ii++)
-//                    {
-//                        if (i == ii) continue;
-//                        if (PorsonCode[i] != PorsonCode[ii]) continue;
-
-//                        PorsonCode[ii] = 0;
-//                        NameTable[ii] = string.Empty;
-//                        OrderOfPrecedenceTable[ii] = string.Empty;
-//                        break;
-//                    }
-//                }
-
-//                // 印鑑を描画する
-//                OfficeShapeDefine shapedef = new OfficeShapeDefine();
-//                shapedef.ShapeSheetName = s_shapeSheetName;     // 図形シート名称
-//                shapedef.ShapeName = s_shapeName;               // 図形名称
-//                shapedef.ShapeWidth = s_ShapeSize[0, 0];        // 図形描画サイズ Width
-//                shapedef.ShapeHeight = s_ShapeSize[0, 1];       // 図形描画サイズ Height
-
-//                for (int i = 0; i < 4; i++)
-//                {
-//                    // 
-//                    if (PorsonCode[i] != 0)
-//                    {
-//                        shapedef.ShapeDrowPointX = s_CoverSealPoint[i, 0];          // 図形描画位置 X
-//                        shapedef.ShapeDrowPointY = s_CoverSealPoint[i, 1];          // 図形描画位置 Y
-//                        shapedef.DrowText = NameTable[i];                           // 描画文字列
-//                        int ifontSize = NameTable[i].Length - 1;
-//                        if (ifontSize > 4) ifontSize = 4;
-//                        shapedef.FontSize = s_EstimateSeal1FontSize[ifontSize];     // フォントサイズ
-//                        // 図形描画
-//                        m_UsedExcel.ExcelCopyShape(shapedef);
-//                    }
-//                    // 役職を印字する(M～)
-//                    int orgNumber = 11 + i;
-//                    string strAlpha = CommonMotions.cnvNumberToAlphaCharacter(orgNumber);
-//                    m_UsedExcel.ExcelCellSet(string.Format("{0}25", strAlpha), OrderOfPrecedenceTable[i]);
-//                }
-//            }
-//            catch (Exception ex)
-//            {
-//                logger.ErrorFormat("システムエラー：{0}：{1}", CommonMotions.GetMethodName(), ex.Message);
-//            }
-//            finally
-//            {
-//                paDB.close(); paDB = null;
-//                picDB.close(); picDB = null;
-//            }
-//        }
-//        #endregion
-
-//        #region 請求書(表紙)作成
-//        /// <summary>
-//        /// 請求書(表紙)作成
-//        /// </summary>
-//        /// <returns></returns>
-//        private CommonDefine.RetunAnswer PrintCover()
-//        {
-//            try
-//            {
-//                //// 請求書表紙シートの取得
-//                m_UsedExcel.ExcelSheetGet(s_DicSheetName[enumSheetName.Cover]);
-
-//                //// 請求書No(4行目 N列)
-//                string strInvNo = (m_InvData.InvoiceNo / 1000).ToString();
-//                strInvNo += "-";
-//                strInvNo += (m_InvData.InvoiceNo % 1000).ToString("00");
-
-//                ExcelPrintData InvNoData = new ExcelPrintData();
-//                InvNoData.AddPrintData("N", 3, strInvNo).ExcelCellSet(m_UsedExcel);
-
-
-//                //// ③ 請求日(5行目 M列)
-//                if (m_bDatePrintFlg == true)
-//                {
-//                    ExcelPrintData reqDate = new ExcelPrintData();
-//                    reqDate.AddPrintData("M", 4, dateTimePicker1.Value.ToString("yyyy/MM/dd")).ExcelCellSet(m_UsedExcel);
-//                }
-//                else
-//                {
-//                    ExcelPrintData reqDate = new ExcelPrintData();
-//                    reqDate.AddPrintData("M", 4, "　　年　　月　　日").ExcelCellSet(m_UsedExcel);
-//                }
-
-//                //// ④ 請求先名称(9行目 C列)
-//                ExcelPrintData nameData = new ExcelPrintData();
-//                string str = m_InvData.RequestName + "　様";
-//                nameData.AddPrintData("C", 8, str).ExcelCellSet(m_UsedExcel);
-
-//                //// ⑤ 請求金額(13行目 C列)
-//                ExcelPrintData priceData = new ExcelPrintData();
-//                priceData.AddPrintData("C", 12, m_InvData.TotalAmount.ToString("#,0")).ExcelCellSet(m_UsedExcel);
-
-//                //// ⑥ 消費税(14行目 C列)
-//                ExcelPrintData taxData = new ExcelPrintData();
-//                taxData.AddPrintData("C", 13, m_InvData.TaxAmount.ToString("#,0")).ExcelCellSet(m_UsedExcel);
-
-//                //// 工事名(16行目 D列)
-////                ExcelPrintData cnstnameData = new ExcelPrintData();
-////                cnstnameData.AddPrintData("D", 15, m_lstReqHead[0].ReqConstructionName).ExcelCellSet(m_UsedExcel);
-
-//                //// 会社名
-//                string strCompany = CommonMotions.SystemMasterData.CompanyName1;
-//                if( CommonMotions.SystemMasterData.CompanyName2 != string.Empty )
-//                {
-//                    strCompany += "　"　+ CommonMotions.SystemMasterData.CompanyName2;
-//                }
-
-//                // 代表者名
-//                string strPresident = string.Format("{0} {1}", CommonMotions.SystemMasterData.CEOPositionName.Trim()
-//                                                                , CommonMotions.SystemMasterData.CEOName.Trim());
-
-//                //// 郵便番号
-//                string strZip = "〒" + CommonMotions.SystemMasterData.ZipCode;
-
-//                //// 住所
-//                string strAddr = CommonMotions.SystemMasterData.Address1;
-//                if( CommonMotions.SystemMasterData.Address2 != string.Empty)
-//                {
-//                    strAddr += CommonMotions.SystemMasterData.Address2;
-//                }
-//                if( CommonMotions.SystemMasterData.Address3 != string.Empty){
-//                    strAddr += CommonMotions.SystemMasterData.Address3;
-//                }
-
-//                //// TEL/FAX
-
-//                string strTelFax = "";
-
-//                if( CommonMotions.SystemMasterData.PhoneNumber != string.Empty )
-//                {
-//                    strTelFax = "TEL " + CommonMotions.SystemMasterData.PhoneNumber + "(代)";
-//                }
-//                if( CommonMotions.SystemMasterData.FaxNumber !=  string.Empty )
-//                {
-//                    if( strTelFax.Length > 0 )
-//                    {
-//                        strTelFax += " ";
-//                    }
-//                    strTelFax += "FAX " + CommonMotions.SystemMasterData.FaxNumber;
-//                }
-//                //// URL
-//                string strUrl = CommonMotions.SystemMasterData.HomePageURL;
-
-//                ExcelPrintData companyData = new ExcelPrintData();
-//                companyData.AddPrintData("L", 17, strCompany);                              // 会社名(18行目 L列)           
-//                companyData.AddPrintData("L", 18, strPresident);                            // 代表者名(19行目 L列)           
-//                companyData.AddPrintData("L", 19, strZip);                                  // 郵便番号(20行目 L列) 
-//                companyData.AddPrintData("L", 20, strAddr);                                 // 住所(21行目 L列)           
-//                companyData.AddPrintData("L", 21, strTelFax);                               // TEL/FAX(22行目 L列)           
-//                companyData.AddPrintData("L", 22, strUrl);                                  // URL(23行目 L列)           
-//                companyData.ExcelCellSet(m_UsedExcel);
-
-//                ExcelPrintData commentData = new ExcelPrintData();
-//                commentData.AddPrintData("C", 17, m_InvData.Comment1);                              // コメント1(18行目 C列)           
-//                commentData.AddPrintData("C", 18, m_InvData.Comment2);                              // コメント2(19行目 C列)           
-//                commentData.AddPrintData("C", 19, m_InvData.Comment3);                              // コメント3(20行目 C列)           
-//                commentData.AddPrintData("C", 20, m_InvData.Comment4);                              // コメント4(21行目 C列)           
-//                commentData.AddPrintData("C", 21, m_InvData.Comment5);                              // コメント5(22行目 C列)           
-//                commentData.ExcelCellSet(m_UsedExcel);
-
-//                ConstructionBaseInfo Info = null;
-//                m_dicConstructionBaseInfo.TryGetValue(m_lstReqHead[0].ReqConstructionCode, out Info);
-
-//                // 印鑑描画
-//                PrintCoverSeal(Info.ConstructionPersonCode);
-
-//                return CommonDefine.RetunAnswer.Answer0;
-//            }
-//            catch (Exception ex)
-//            {
-//                logger.ErrorFormat("システムエラー：{0}：{1}", CommonMotions.GetMethodName(), ex.Message);
-//                return CommonDefine.RetunAnswer.Answer1;
-//            }
-//        }
-//        #endregion
-
-//        #region 請求書(一覧)作成
-//        /// <summary>
-//        /// 請求書(一覧)作成
-//        /// </summary>
-//        /// <returns></returns>
-//        private CommonDefine.RetunAnswer PrintList()
-//        {
-//            try
-//            {
-//                int trow = 4;
-//                ExcelPrintData ExcelPrnData = null;
-
-//                //// 請求書表紙シートの取得
-//                m_UsedExcel.ExcelSheetGet(s_DicSheetName[enumSheetName.List]);
-
-//                List<int> lstKey = new List<int>(m_dicReqData.Keys);
-
-//                foreach (int nReqNo in lstKey)
-//                {
-//                    List<RequestData> lstData = null;
-
-//                    if (m_dicReqData.TryGetValue(nReqNo, out lstData) == false)
-//                    {
-//                        continue;
-//                    }
-
-//                    foreach (RequestData ReqData in lstData)
-//                    {
-//                        ConstructionBaseInfo Info = null;
-
-//                        if (m_dicConstructionBaseInfo.TryGetValue(ReqData.MainConstructionCode, out Info) == false)
-//                        {
-//                            continue;
-//                        }
-
-//                        string strname = (ReqData.MainConstructionCode / 100).ToString();
-//                        strname += "-";
-//                        strname += (ReqData.MainConstructionCode % 100).ToString("00");
-//                        strname += "\r\n";
-//                        strname += ReqData.ConstructionName;
-
-//                        ExcelPrnData = new ExcelPrintData();
-//                        ExcelPrnData.AddPrintData("B", trow, strname);             // 工事件名
-//                        ExcelPrnData.AddPrintData("C", trow, string.Format("{0}年{1}月{2}日"
-//                                                                        , Info.ConstructionPeriodStart.Year
-//                                                                        , Info.ConstructionPeriodStart.Month.ToString("00")
-//                                                                        , Info.ConstructionPeriodStart.Day.ToString("00")));    // 工期開始
-
-//                        string EndDate = string.Empty;
-//                        string DateDescription = string.Empty;
-//                        if (Info.RevCompleteDate != DateTime.MinValue)
-//                        {   // 検査是正完了日
-//                            EndDate = string.Format("{0}年{1}月{2}日"
-//                                                                    , Info.RevCompleteDate.Year
-//                                                                    , Info.RevCompleteDate.Month.ToString("00")
-//                                                                    , Info.RevCompleteDate.Day.ToString("00"));
-//                            DateDescription = "（現場是正完了日）";
-//                        }
-//                        else
-//                        {   // 請求確認日
-//                            EndDate = string.Format("{0}年{1}月{2}日"
-//                                                                    , Info.BillingDate.Year
-//                                                                    , Info.BillingDate.Month.ToString("00")
-//                                                                    , Info.BillingDate.Day.ToString("00"));
-//                            DateDescription = "（請求書確認日）";
-//                        }
-//                        ExcelPrnData.AddPrintData("C", trow + 1, string.Format("～ {0}", EndDate));                 // 工期終了
-//                        ExcelPrnData.AddPrintData("C", trow + 2, DateDescription);                                  // 終了日説明
-
-//                        long lAmount = ReqData.RequestAmount0;
-//                        lAmount += ReqData.RequestAmount1;
-//                        lAmount += ReqData.RequestAmount2;
-//                        lAmount += ReqData.RequestAmount3;
-//                        lAmount += ReqData.RequestAmount4;
-//                        lAmount += ReqData.RequestAmount5;
-//                        lAmount += ReqData.RequestAmount6;
-//                        lAmount += ReqData.TaxAmount;
-//                        lAmount += ReqData.UnpaidAmount;
-
-//                        ExcelPrnData.AddPrintData("D", trow, lAmount.ToString("#,0"));                                  // 請求金額
-
-//                        ExcelPrnData.AddPrintData("E", trow, ReqData.Note);                                             // 備考
-//                        ExcelPrnData.ExcelCellSet(m_UsedExcel);
-
-//                        trow += 3;
-
-//                    }
-//                }
-
-//                return CommonDefine.RetunAnswer.Answer0;
-//            }
-//            catch (Exception ex)
-//            {
-//                logger.ErrorFormat("システムエラー：{0}：{1}", CommonMotions.GetMethodName(), ex.Message);
-//                return CommonDefine.RetunAnswer.Answer1;
-//            }
-//        }
-//        #endregion
-
-//        #region 請求書(内訳)作成
-//        /// <summary>
-//        /// 請求書(内訳)作成
-//        /// </summary>
-//        /// <param name="dicReqDetail"></param>
-//        /// <param name="constLedger"></param>
-//        /// <param name="lstConstLink"></param>
-//        /// <returns></returns>
-//        private CommonDefine.RetunAnswer PrintDetail(int no, RequestHead ReqHead, RequestData ReqData, ConstructionBaseInfo Info)
-//        {
-//            try
-//            {
-//                // 請求書内訳シートの取得
-//                m_UsedExcel.ExcelSheetGet(s_DicSheetName[enumSheetName.Detail]);
-
-//                ExcelPrintData ExcelPrnData = null;
-
-//                // ------------------------------- 工事名 -------------------------------
-//                // ① 工事件名
-//                ExcelPrnData = new ExcelPrintData();
-//                ExcelPrnData.AddPrintData("C", 2, ReqData.ConstructionName).ExcelCellSet(m_UsedExcel);
-
-//                // ------------------------------- 請負金額 -------------------------------
-//                ExcelPrnData = new ExcelPrintData();
-//                ExcelPrnData.AddPrintData("A", 5, no.ToString());
-//                ExcelPrnData.AddPrintData("G", 5, ReqData.ContractAmount.ToString("#,0"));
-//                ExcelPrnData.ExcelCellSet(m_UsedExcel);
-
-//                // ------------------------------- 前回ご請求分 -------------------------------
-//                // 分割払いの場合
-//                if (Info.BillingSplitFlg == (int)ConstructionBaseInfo.BillingSplitFlgDef.SplitBilling)
-//                {
-//                    ExcelPrnData = new ExcelPrintData();
-//                    ExcelPrnData.AddPrintData("B", 7, "前回ご請求済分");
-//                    ExcelPrnData.AddPrintData("C", 7, "前回請求書参照※増減補正済み");
-//                    ExcelPrnData.AddPrintData("D", 7, "1");
-//                    ExcelPrnData.AddPrintData("E", 7, "式");
-//                    ExcelPrnData.AddPrintData("G", 7, ReqData.PaidAmount.ToString("#,0"));
-//                    ExcelPrnData.ExcelCellSet(m_UsedExcel);
-//                }
-
-//                long lTotalAmount = 0;
-
-//                // ------------------------------- 見積金額（本工事） -------------------------------
-//                ExcelPrnData = new ExcelPrintData();
-//                ExcelPrnData.AddPrintData("G", 9, ReqData.RequestAmount0.ToString("#,0"));
-//                ExcelPrnData.ExcelCellSet(m_UsedExcel);
-
-//                lTotalAmount += ReqData.RequestAmount0;
- 
-//                // ------------------------------- 見積金額（増減工事） -------------------------------
-//                long[] lAmount = new long[] { ReqData.RequestAmount1, ReqData.RequestAmount2, ReqData.RequestAmount3, ReqData.RequestAmount4, ReqData.RequestAmount5, ReqData.RequestAmount6 };
-//                string[] strTitle = new string[] { "増減工事１", "増減工事２", "増減工事３", "増減工事４", "増減工事５", "増減工事６" };
-
-//                for (int i = 0; i < 6; i++)
-//                {
-//                    if (lAmount[i] > 0)
-//                    {
-//                        ExcelPrnData = new ExcelPrintData();
-//                        ExcelPrnData.AddPrintData("B", 10 + i, strTitle[i]);
-//                        ExcelPrnData.AddPrintData("C", 10 + i, "追加増減見積もり参照");
-//                        ExcelPrnData.AddPrintData("D", 10 + i, "1");
-//                        ExcelPrnData.AddPrintData("E", 10 + i, "式");
-//                        ExcelPrnData.AddPrintData("G", 10 + i, lAmount[i].ToString("#,0"));
-//                        ExcelPrnData.ExcelCellSet(m_UsedExcel);
-
-//                        lTotalAmount += lAmount[i];
-//                    }
-//                }
-
-//                // ------------------------------- 今回ご請求分 -------------------------------
-//                ExcelPrnData = new ExcelPrintData();
-//                ExcelPrnData.AddPrintData("G", 17, lTotalAmount.ToString("#,0"));
-//                ExcelPrnData.ExcelCellSet(m_UsedExcel);
-
-//                // ------------------------------- 請負金額残金 -------------------------------
-//                // 分割払いの場合
-//                if (Info.BillingSplitFlg == (int)ConstructionBaseInfo.BillingSplitFlgDef.SplitBilling)
-//                {
-//                    ExcelPrnData = new ExcelPrintData();
-//                    ExcelPrnData.AddPrintData("B", 19, "請負金額残金");
-//                    ExcelPrnData.AddPrintData("D", 19, "1");
-//                    ExcelPrnData.AddPrintData("E", 19, "式");
-//                    ExcelPrnData.AddPrintData("G", 19, ReqData.UnclaimedAmount.ToString("#,0"));
-//                    ExcelPrnData.ExcelCellSet(m_UsedExcel);
-//                }
-
-//                // ------------------------------- 未入金分 -------------------------------
-//                if (ReqData.UnpaidAmount > 0)
-//                {
-//                    ExcelPrnData = new ExcelPrintData();
-//                    ExcelPrnData.AddPrintData("B", 21, "未入金分");
-//                    ExcelPrnData.AddPrintData("G", 21, ReqData.UnpaidAmount.ToString("#,0"));
-//                    ExcelPrnData.ExcelCellSet(m_UsedExcel);
-
-//                    lTotalAmount += ReqData.UnpaidAmount;
-//                }
-
-//                // ------------------------------- 小計 -------------------------------
-//                ExcelPrnData = new ExcelPrintData();
-//                ExcelPrnData.AddPrintData("G", 23, lTotalAmount.ToString("#,0"));
-//                ExcelPrnData.ExcelCellSet(m_UsedExcel);
-
-//                // ------------------------------- 消費税 -------------------------------
-//                ExcelPrnData = new ExcelPrintData();
-//                ExcelPrnData.AddPrintData("C", 24, string.Format("{0}%",CommonMotions.SystemMasterData.ConsumptionTax));
-//                ExcelPrnData.AddPrintData("G", 24, ReqData.TaxAmount.ToString("#,0"));
-//                ExcelPrnData.ExcelCellSet(m_UsedExcel);
-//                lTotalAmount += ReqData.TaxAmount;
-
-//                // ------------------------------- 税込金額合計 -------------------------------
-//                ExcelPrnData = new ExcelPrintData();
-//                ExcelPrnData.AddPrintData("G", 25, lTotalAmount.ToString("#,0"));
-//                ExcelPrnData.ExcelCellSet(m_UsedExcel);
-
-//                return CommonDefine.RetunAnswer.Answer0;
-//            }
-//            catch (Exception ex)
-//            {
-//                logger.ErrorFormat("システムエラー：{0}：{1}", CommonMotions.GetMethodName(), ex.Message);
-//                return CommonDefine.RetunAnswer.Answer1;
-//            }
-
-//        }
-//        #endregion
-
-//        #region Excelデータ出力用内部クラス定義
-//        /// <summary>
-//        /// Excelデータ出力用内部クラス定義
-//        /// </summary>
-//        private class ExcelPrintData
-//        {
-//            // Excelデータ保持用用ディクショナリ
-//            private Dictionary<int, Dictionary<int, object>> m_DicPrintData = new Dictionary<int, Dictionary<int, object>>();
-
-//            // Excelカラム名取得用
-//            private static char[] s_Asc = { 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z' };
-
-//            private int m_RowMin = int.MaxValue;
-//            private int m_RowMax = int.MinValue;
-//            private int m_ColMin = int.MaxValue;
-//            private int m_ColMax = int.MinValue;
-
-//            /// <summary>
-//            /// エクセルカラム名とインデックス番号のディクショナリ
-//            /// </summary>
-//            private static Dictionary<string, int> s_IndexOfExcelColumn = InitDicColumnIndex();
-
-//            /// <summary>
-//            /// Excelカラムインデックスディクショナリ作成メソッド
-//            /// </summary>
-//            /// <returns></returns>
-//            private static Dictionary<string, int> InitDicColumnIndex()
-//            {
-//                var result = new Dictionary<string, int>();
-
-//                for (int indx = 0; indx < 256; indx++)
-//                {
-//                    string res = GetColumnString(indx);
-
-//                    result.Add(res, indx);
-
-//                }
-//                return result;
-//            }
-
-//            /// <summary>
-//            /// カラム英字名を取得
-//            /// </summary>
-//            /// <param name="colIndex"></param>
-//            /// <returns></returns>
-//            private static string GetColumnString(int colIndex)
-//            {
-//                string res = "";
-
-//                int court = colIndex;
-//                while (court >= s_Asc.Count())
-//                {
-//                    res = s_Asc[court % s_Asc.Count()] + res;
-//                    court = (int)Math.Truncate((double)court / (double)s_Asc.Count() - 1);
-//                }
-//                res = s_Asc[court % s_Asc.Count()] + res;
-
-//                return res;
-//            }
-
-//            #region データ追加
-//            /// <summary>
-//            /// データ追加
-//            /// </summary>
-//            /// <param name="colName">カラム名文字(※ "A", "B", 等...</param>
-//            /// <param name="rowNo">行インデックス番号 0オリジン</param>
-//            /// <param name="data">出力データオブジェクト</param>
-//            /// <returns></returns>
-//            public ExcelPrintData AddPrintData(string colName, int rowNo, object data)
-//            {
-//                return AddPrintData(s_IndexOfExcelColumn[colName], rowNo, data);
-//            }
-//            #endregion
-
-//            #region データ追加
-//            /// <summary>
-//            /// データ追加
-//            /// </summary>
-//            /// <param name="colIndex">カラムインデックス 0オリジン</param>
-//            /// <param name="rowNo">行インデックス番号 0オリジン</param>
-//            /// <param name="data">出力データオブジェクト</param>
-//            /// <returns></returns>
-//            public ExcelPrintData AddPrintData(int colIndex, int rowNo, object data)
-//            {
-//                if (!m_DicPrintData.ContainsKey(rowNo))
-//                    m_DicPrintData[rowNo] = new Dictionary<int, object>();
-
-//                m_DicPrintData[rowNo][colIndex] = data;
-
-//                if (m_RowMin > rowNo) m_RowMin = rowNo;
-//                if (m_RowMax < rowNo) m_RowMax = rowNo;
-//                if (m_ColMin > colIndex) m_ColMin = colIndex;
-//                if (m_ColMax < colIndex) m_ColMax = colIndex;
-
-//                return this;
-//            }
-//            #endregion
-
-//            #region UsedExcelオブジェクトにデータをセットする
-//            /// <summary>
-//            /// UsedExcelオブジェクトにデータをセットする
-//            /// </summary>
-//            /// <param name="usedExcel">UsedExcelオブジェクト(シート取得済みであること)</param>
-//            public void ExcelCellSet(UsedExcel usedExcel)
-//            {
-//                if (m_RowMin == int.MaxValue ||
-//                    m_RowMax == int.MinValue ||
-//                    m_ColMin == int.MaxValue ||
-//                    m_ColMax == int.MinValue)
-//                {
-//                    return;
-//                }
-
-//                // オブジェクト配列を宣言
-//                object[,] objCells = new object[m_RowMax - m_RowMin + 1, m_ColMax - m_ColMin + 1];
-
-//                // 配列にデータを移し替える
-//                foreach (int row in m_DicPrintData.Keys)
-//                {
-//                    foreach (int col in m_DicPrintData[row].Keys)
-//                    {
-//                        objCells[row - m_RowMin, col - m_ColMin] = m_DicPrintData[row][col];
-//                    }
-//                }
-
-//                // セル名を取得
-//                string startCell = GetColumnString(m_ColMin) + string.Format("{0}", m_RowMin + 1);
-//                string endCell = GetColumnString(m_ColMax) + string.Format("{0}", m_RowMax + 1);
-
-//                // セルにセット
-//                usedExcel.ExcelCellSet(startCell, objCells, endCell);
-
-//            }
-//            #endregion
-//        }
-//        #endregion
-
-
     }
 }
Index: branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/RequestEntry/FrmRequestPrintSel.Designer.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/RequestEntry/FrmRequestPrintSel.Designer.cs	(revision 334)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/RequestEntry/FrmRequestPrintSel.Designer.cs	(revision 335)
@@ -45,6 +45,13 @@
             this.btnAllSelect = new System.Windows.Forms.Button();
             this.lbTotalAmount = new System.Windows.Forms.Label();
             this.dgv1 = new System.Windows.Forms.DataGridView();
+            this.Column1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.col1 = new System.Windows.Forms.DataGridViewCheckBoxColumn();
+            this.col2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.col3 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.col4 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.col5 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.col6 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.label8 = new System.Windows.Forms.Label();
             this.label7 = new System.Windows.Forms.Label();
             this.lbSelect = new System.Windows.Forms.Label();
@@ -56,13 +63,7 @@
             this.panel2 = new System.Windows.Forms.Panel();
             this.label1 = new System.Windows.Forms.Label();
             this.lblProcessTitil = new System.Windows.Forms.Label();
-            this.Column1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.col1 = new System.Windows.Forms.DataGridViewCheckBoxColumn();
-            this.col2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.col3 = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.col4 = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.col5 = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.col6 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.btnCancel = new System.Windows.Forms.Button();
             this.panel1.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)(this.dgv1)).BeginInit();
             this.panel2.SuspendLayout();
@@ -138,7 +139,7 @@
             this.btnGenerate.Name = "btnGenerate";
             this.btnGenerate.Size = new System.Drawing.Size(120, 30);
             this.btnGenerate.TabIndex = 33;
-            this.btnGenerate.Text = "請求書作成";
+            this.btnGenerate.Text = "作成・印刷";
             this.btnGenerate.UseVisualStyleBackColor = false;
             this.btnGenerate.Click += new System.EventHandler(this.btnGenerate_Click);
             // 
@@ -194,7 +195,7 @@
             this.lbTotalAmount.BackColor = System.Drawing.Color.White;
             this.lbTotalAmount.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
             this.lbTotalAmount.ForeColor = System.Drawing.Color.Black;
-            this.lbTotalAmount.Location = new System.Drawing.Point(366, 7);
+            this.lbTotalAmount.Location = new System.Drawing.Point(366, 9);
             this.lbTotalAmount.Name = "lbTotalAmount";
             this.lbTotalAmount.Size = new System.Drawing.Size(185, 24);
             this.lbTotalAmount.TabIndex = 42;
@@ -226,17 +227,95 @@
             this.col5,
             this.col6});
             this.dgv1.EnableHeadersVisualStyles = false;
-            this.dgv1.Location = new System.Drawing.Point(8, 36);
+            this.dgv1.Location = new System.Drawing.Point(8, 50);
             this.dgv1.Name = "dgv1";
             this.dgv1.RowHeadersVisible = false;
             this.dgv1.RowHeadersWidthSizeMode = System.Windows.Forms.DataGridViewRowHeadersWidthSizeMode.DisableResizing;
             this.dgv1.RowTemplate.Height = 20;
             this.dgv1.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
-            this.dgv1.Size = new System.Drawing.Size(1240, 414);
+            this.dgv1.Size = new System.Drawing.Size(1240, 392);
             this.dgv1.TabIndex = 43;
             this.dgv1.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgv1_CellContentClick);
             this.dgv1.CellContentDoubleClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgv1_CellContentDoubleClick);
             // 
+            // Column1
+            // 
+            dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
+            dataGridViewCellStyle2.Font = new System.Drawing.Font("Century", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+            dataGridViewCellStyle2.ForeColor = System.Drawing.Color.Black;
+            this.Column1.DefaultCellStyle = dataGridViewCellStyle2;
+            this.Column1.Frozen = true;
+            this.Column1.HeaderText = "№";
+            this.Column1.Name = "Column1";
+            this.Column1.ReadOnly = true;
+            this.Column1.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
+            this.Column1.Width = 60;
+            // 
+            // col1
+            // 
+            dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
+            dataGridViewCellStyle3.Font = new System.Drawing.Font("Century", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+            dataGridViewCellStyle3.ForeColor = System.Drawing.Color.Black;
+            dataGridViewCellStyle3.NullValue = false;
+            this.col1.DefaultCellStyle = dataGridViewCellStyle3;
+            this.col1.Frozen = true;
+            this.col1.HeaderText = "";
+            this.col1.Name = "col1";
+            this.col1.ReadOnly = true;
+            this.col1.Width = 30;
+            // 
+            // col2
+            // 
+            this.col2.Frozen = true;
+            this.col2.HeaderText = "請　求　案　件";
+            this.col2.Name = "col2";
+            this.col2.ReadOnly = true;
+            this.col2.Resizable = System.Windows.Forms.DataGridViewTriState.False;
+            this.col2.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
+            this.col2.Width = 830;
+            // 
+            // col3
+            // 
+            dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
+            dataGridViewCellStyle4.Font = new System.Drawing.Font("Century", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+            dataGridViewCellStyle4.ForeColor = System.Drawing.Color.Black;
+            this.col3.DefaultCellStyle = dataGridViewCellStyle4;
+            this.col3.Frozen = true;
+            this.col3.HeaderText = "請　求　金　額";
+            this.col3.Name = "col3";
+            this.col3.ReadOnly = true;
+            this.col3.Resizable = System.Windows.Forms.DataGridViewTriState.False;
+            this.col3.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
+            this.col3.Width = 160;
+            // 
+            // col4
+            // 
+            dataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
+            dataGridViewCellStyle5.Font = new System.Drawing.Font("Century", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+            dataGridViewCellStyle5.ForeColor = System.Drawing.Color.Black;
+            this.col4.DefaultCellStyle = dataGridViewCellStyle5;
+            this.col4.Frozen = true;
+            this.col4.HeaderText = "請求書作成日";
+            this.col4.Name = "col4";
+            this.col4.ReadOnly = true;
+            this.col4.Resizable = System.Windows.Forms.DataGridViewTriState.False;
+            this.col4.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
+            this.col4.Width = 140;
+            // 
+            // col5
+            // 
+            this.col5.HeaderText = "RequestNo";
+            this.col5.Name = "col5";
+            this.col5.ReadOnly = true;
+            this.col5.Visible = false;
+            // 
+            // col6
+            // 
+            this.col6.HeaderText = "InvoiceNo";
+            this.col6.Name = "col6";
+            this.col6.ReadOnly = true;
+            this.col6.Visible = false;
+            // 
             // label8
             // 
             this.label8.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(128)))));
@@ -244,7 +323,7 @@
             this.label8.CausesValidation = false;
             this.label8.Font = new System.Drawing.Font("ＭＳ 明朝", 11.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
             this.label8.ForeColor = System.Drawing.Color.Black;
-            this.label8.Location = new System.Drawing.Point(252, 6);
+            this.label8.Location = new System.Drawing.Point(252, 9);
             this.label8.Name = "label8";
             this.label8.Size = new System.Drawing.Size(114, 25);
             this.label8.TabIndex = 41;
@@ -258,7 +337,7 @@
             this.label7.CausesValidation = false;
             this.label7.Font = new System.Drawing.Font("ＭＳ 明朝", 11.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
             this.label7.ForeColor = System.Drawing.Color.Black;
-            this.label7.Location = new System.Drawing.Point(178, 7);
+            this.label7.Location = new System.Drawing.Point(178, 9);
             this.label7.Name = "label7";
             this.label7.Size = new System.Drawing.Size(42, 24);
             this.label7.TabIndex = 40;
@@ -270,7 +349,7 @@
             this.lbSelect.BackColor = System.Drawing.Color.White;
             this.lbSelect.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
             this.lbSelect.ForeColor = System.Drawing.SystemColors.ControlText;
-            this.lbSelect.Location = new System.Drawing.Point(123, 7);
+            this.lbSelect.Location = new System.Drawing.Point(123, 9);
             this.lbSelect.Name = "lbSelect";
             this.lbSelect.Size = new System.Drawing.Size(55, 24);
             this.lbSelect.TabIndex = 39;
@@ -283,7 +362,7 @@
             this.label5.CausesValidation = false;
             this.label5.Font = new System.Drawing.Font("ＭＳ 明朝", 11.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
             this.label5.ForeColor = System.Drawing.Color.Black;
-            this.label5.Location = new System.Drawing.Point(9, 6);
+            this.label5.Location = new System.Drawing.Point(9, 9);
             this.label5.Name = "label5";
             this.label5.Size = new System.Drawing.Size(114, 25);
             this.label5.TabIndex = 38;
@@ -330,12 +409,12 @@
             this.btnDel.Cursor = System.Windows.Forms.Cursors.Default;
             this.btnDel.Enabled = false;
             this.btnDel.Font = new System.Drawing.Font("ＭＳ 明朝", 11.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
-            this.btnDel.ForeColor = System.Drawing.Color.Black;
+            this.btnDel.ForeColor = System.Drawing.Color.White;
             this.btnDel.Location = new System.Drawing.Point(1024, 620);
             this.btnDel.Name = "btnDel";
             this.btnDel.Size = new System.Drawing.Size(120, 30);
             this.btnDel.TabIndex = 40;
-            this.btnDel.Text = "請求書削除";
+            this.btnDel.Text = "削　除";
             this.btnDel.UseVisualStyleBackColor = false;
             this.btnDel.Click += new System.EventHandler(this.btnDel_Click);
             // 
@@ -378,84 +457,21 @@
             this.lblProcessTitil.TabIndex = 43;
             this.lblProcessTitil.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
             // 
-            // Column1
+            // btnCancel
             // 
-            dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
-            dataGridViewCellStyle2.Font = new System.Drawing.Font("Century", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
-            dataGridViewCellStyle2.ForeColor = System.Drawing.Color.Black;
-            this.Column1.DefaultCellStyle = dataGridViewCellStyle2;
-            this.Column1.Frozen = true;
-            this.Column1.HeaderText = "№";
-            this.Column1.Name = "Column1";
-            this.Column1.ReadOnly = true;
-            this.Column1.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
-            this.Column1.Width = 60;
+            this.btnCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
+            this.btnCancel.BackColor = System.Drawing.Color.Red;
+            this.btnCancel.Font = new System.Drawing.Font("ＭＳ 明朝", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
+            this.btnCancel.ForeColor = System.Drawing.Color.White;
+            this.btnCancel.Location = new System.Drawing.Point(1024, 620);
+            this.btnCancel.Name = "btnCancel";
+            this.btnCancel.Size = new System.Drawing.Size(120, 30);
+            this.btnCancel.TabIndex = 44;
+            this.btnCancel.Text = "印刷中止";
+            this.btnCancel.UseVisualStyleBackColor = false;
+            this.btnCancel.Visible = false;
+            this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click);
             // 
-            // col1
-            // 
-            dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
-            dataGridViewCellStyle3.Font = new System.Drawing.Font("Century", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
-            dataGridViewCellStyle3.ForeColor = System.Drawing.Color.Black;
-            dataGridViewCellStyle3.NullValue = false;
-            this.col1.DefaultCellStyle = dataGridViewCellStyle3;
-            this.col1.Frozen = true;
-            this.col1.HeaderText = "";
-            this.col1.Name = "col1";
-            this.col1.ReadOnly = true;
-            this.col1.Width = 30;
-            // 
-            // col2
-            // 
-            this.col2.Frozen = true;
-            this.col2.HeaderText = "請　求　案　件";
-            this.col2.Name = "col2";
-            this.col2.ReadOnly = true;
-            this.col2.Resizable = System.Windows.Forms.DataGridViewTriState.False;
-            this.col2.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
-            this.col2.Width = 830;
-            // 
-            // col3
-            // 
-            dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
-            dataGridViewCellStyle4.Font = new System.Drawing.Font("Century", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
-            dataGridViewCellStyle4.ForeColor = System.Drawing.Color.Black;
-            this.col3.DefaultCellStyle = dataGridViewCellStyle4;
-            this.col3.Frozen = true;
-            this.col3.HeaderText = "請　求　金　額";
-            this.col3.Name = "col3";
-            this.col3.ReadOnly = true;
-            this.col3.Resizable = System.Windows.Forms.DataGridViewTriState.False;
-            this.col3.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
-            this.col3.Width = 160;
-            // 
-            // col4
-            // 
-            dataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
-            dataGridViewCellStyle5.Font = new System.Drawing.Font("Century", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
-            dataGridViewCellStyle5.ForeColor = System.Drawing.Color.Black;
-            this.col4.DefaultCellStyle = dataGridViewCellStyle5;
-            this.col4.Frozen = true;
-            this.col4.HeaderText = "請求書作成日";
-            this.col4.Name = "col4";
-            this.col4.ReadOnly = true;
-            this.col4.Resizable = System.Windows.Forms.DataGridViewTriState.False;
-            this.col4.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
-            this.col4.Width = 140;
-            // 
-            // col5
-            // 
-            this.col5.HeaderText = "RequestNo";
-            this.col5.Name = "col5";
-            this.col5.ReadOnly = true;
-            this.col5.Visible = false;
-            // 
-            // col6
-            // 
-            this.col6.HeaderText = "InvoiceNo";
-            this.col6.Name = "col6";
-            this.col6.ReadOnly = true;
-            this.col6.Visible = false;
-            // 
             // FrmRequestPrintSel
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 15F);
@@ -469,6 +485,7 @@
             this.Controls.Add(this.btnEnd);
             this.Controls.Add(this.btnGenerate);
             this.Controls.Add(this.panel1);
+            this.Controls.Add(this.btnCancel);
             this.Font = new System.Drawing.Font("ＭＳ 明朝", 11.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
             this.ForeColor = System.Drawing.SystemColors.ControlText;
             this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Fixed3D;
@@ -516,5 +533,6 @@
         private System.Windows.Forms.DataGridViewTextBoxColumn col4;
         private System.Windows.Forms.DataGridViewTextBoxColumn col5;
         private System.Windows.Forms.DataGridViewTextBoxColumn col6;
+        private System.Windows.Forms.Button btnCancel;
     }
 }
\ No newline at end of file
Index: branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/RequestEntry/FrmRequestPrintSel.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/RequestEntry/FrmRequestPrintSel.cs	(revision 334)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/RequestEntry/FrmRequestPrintSel.cs	(revision 335)
@@ -335,7 +335,7 @@
                 int nInvoiceNo = CommonMotions.cnvInt(cbCreateDate.SelectedValue);
 
                 // 請求書データの削除
-                if (DeleteInvoiceData(nInvoiceNo) == false)
+                if (!DeleteInvoiceData(nInvoiceNo))
                 {
                     return;
                 }
@@ -399,32 +399,57 @@
         /// <param name="e"></param>
         private void btnGenerate_Click(object sender, EventArgs e)
         {
-            FrmRequestPrint frmPrint = new FrmRequestPrint();
             try
             {
                 // 請求書作成処理
                 if (!GenerateProc()) return;
 
-                frmPrint.InvoiceNo = m_nInvoiceNo;
+                // 印刷実行
+                EntryPrintProc();
 
-                DialogResult drRet = frmPrint.ShowDialog(this);
-                if (drRet != DialogResult.Yes) return;
-
-                DialogResult = DialogResult.OK;
-                // 画面クローズ
-                this.Close();
             }
             catch (Exception ex)
             {
                 logger.ErrorFormat("システムエラー：{0}：{1}", CommonMotions.GetMethodName(), ex.Message);
             }
-            finally
+        }
+        #endregion
+
+        #region セル内容のWクリック
+        /// <summary>
+        /// セル内容のWクリック
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        private void dgv1_CellContentDoubleClick(object sender, DataGridViewCellEventArgs e)
+        {
+            DataGridViewRow CurRow = dgv1.CurrentRow;
+            if (CurRow.Cells[(int)DispColumn.CheckFlg].EditedFormattedValue.Equals(true) == true)
             {
-                frmPrint.Dispose(); frmPrint = null;
+                CurRow.Cells[(int)DispColumn.CheckFlg].Value = false;
             }
+            else
+            {
+                CurRow.Cells[(int)DispColumn.CheckFlg].Value = true;
+            }
+
+            UpdateCheckValue();
         }
         #endregion
 
+        #region 印刷中断
+        /// <summary>
+        /// 印刷中断
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        private void btnCancel_Click(object sender, EventArgs e)
+        {
+            //キャンセルのフラッグを立てる
+            m_Canceled = true;
+        }
+        #endregion
+
         #region ×ボタン
         /// <summary>
         /// ×ボタン押下処理
@@ -487,27 +512,5 @@
             dgv1_CellContentDoubleClick(sender, e);
         }
         #endregion
-
-        #region セル内容のWクリック
-        /// <summary>
-        /// セル内容のWクリック
-        /// </summary>
-        /// <param name="sender"></param>
-        /// <param name="e"></param>
-        private void dgv1_CellContentDoubleClick(object sender, DataGridViewCellEventArgs e)
-        {
-            DataGridViewRow CurRow = dgv1.CurrentRow;
-            if (CurRow.Cells[(int)DispColumn.CheckFlg].EditedFormattedValue.Equals(true) == true)
-            {
-                CurRow.Cells[(int)DispColumn.CheckFlg].Value = false;
-            }
-            else
-            {
-                CurRow.Cells[(int)DispColumn.CheckFlg].Value = true;
-            }
-
-            UpdateCheckValue();
-        }
-        #endregion
     }
 }
Index: branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/RequestEntry/FrmRequestPrintSelAux.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/RequestEntry/FrmRequestPrintSelAux.cs	(revision 334)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/RequestEntry/FrmRequestPrintSelAux.cs	(revision 335)
@@ -6,6 +6,7 @@
 using System.Drawing;
 using System.Linq;
 using System.Text;
+using System.Threading;
 using System.Threading.Tasks;
 using System.Windows.Forms;
 
@@ -178,40 +179,40 @@
         private void GetInvData()
         {
             IOInvoiceData ioInvData = new IOInvoiceData();
-
-            ArrayList arData = new ArrayList();
-
             try
             {
-                string sql = "SELECT";
-                sql += " InvData.InvoiceNo";
-                sql += " ,InvData.OrderersDivision";
-                sql += " ,InvData.OrderersCode";
-                sql += " ,InvData.RequestMonth";
-                sql += " ,InvData.SeqNo";
-                sql += " ,DATE_FORMAT(InvData.CretateDate, '%Y/%m/%d')";
-                sql += " ,DATE_FORMAT(InvData.RequestDate, '%Y/%m/%d')";
-                sql += " ,InvData.RequestName";
-                sql += " ,InvData.TotalAmount";
-                sql += " ,InvData.TaxAmount";
-                sql += " ,InvData.Comment1";
-                sql += " ,InvData.Comment2";
-                sql += " ,InvData.Comment3";
-                sql += " ,InvData.Comment4";
-                sql += " ,InvData.Comment5";
-                sql += " ,InvData.CompleteFlg";
-                sql += " ,DATE_FORMAT(InvData.EntryDate, '%Y/%m/%d %H:%i:%s')";
-                sql += " ,DATE_FORMAT(InvData.UpdateDate, '%Y/%m/%d %H:%i:%s')";
-                sql += " FROM";
-                sql += " InvoiceData InvData";
-                sql += string.Format(" WHERE InvData.OrderersDivision = {0}", m_nOrderersDivision);
-                sql += string.Format(" AND InvData.OrderersCode = {0} ", m_nOrderersCode);
-                sql += string.Format(" AND InvData.RequestMonth = {0} ", m_nRequestMonth);
-                sql += " AND EXISTS( SELECT * FROM RequestHead ReqHead WHERE ReqHead.InvoiceNo = InvData.InvoiceNo )";
-                sql += " ORDER BY InvData.CretateDate Asc, InvData.SeqNo Asc";
+                ArrayList arData = new ArrayList();
 
+                StringBuilder sql = new StringBuilder();
+                sql.Append("SELECT");
+                sql.Append(" InvData.InvoiceNo");
+                sql.Append(" ,InvData.OrderersDivision");
+                sql.Append(" ,InvData.OrderersCode");
+                sql.Append(" ,InvData.RequestMonth");
+                sql.Append(" ,InvData.SeqNo");
+                sql.Append(" ,DATE_FORMAT(InvData.CretateDate, '%Y/%m/%d')");
+                sql.Append(" ,DATE_FORMAT(InvData.RequestDate, '%Y/%m/%d')");
+                sql.Append(" ,InvData.RequestName");
+                sql.Append(" ,InvData.TotalAmount");
+                sql.Append(" ,InvData.TaxAmount");
+                sql.Append(" ,InvData.Comment1");
+                sql.Append(" ,InvData.Comment2");
+                sql.Append(" ,InvData.Comment3");
+                sql.Append(" ,InvData.Comment4");
+                sql.Append(" ,InvData.Comment5");
+                sql.Append(" ,InvData.CompleteFlg");
+                sql.Append(" ,DATE_FORMAT(InvData.EntryDate, '%Y/%m/%d %H:%i:%s')");
+                sql.Append(" ,DATE_FORMAT(InvData.UpdateDate, '%Y/%m/%d %H:%i:%s')");
+                sql.Append(" FROM");
+                sql.Append(" InvoiceData InvData");
+                sql.AppendFormat(" WHERE InvData.OrderersDivision = {0}", m_nOrderersDivision);
+                sql.AppendFormat(" AND InvData.OrderersCode = {0} ", m_nOrderersCode);
+                sql.AppendFormat(" AND InvData.RequestMonth = {0} ", m_nRequestMonth);
+                sql.Append(" AND EXISTS( SELECT * FROM RequestHead ReqHead WHERE ReqHead.InvoiceNo = InvData.InvoiceNo )");
+                sql.Append(" ORDER BY InvData.CretateDate Asc, InvData.SeqNo Asc");
+
                 // SQL実行
-                if (!ioInvData.ExecuteReader(sql, ref arData, true)) return;
+                if (!ioInvData.ExecuteReader(sql.ToString(), ref arData, true)) return;
 
                 // データセット
                 foreach (object[] objwrk in arData)
@@ -249,14 +250,13 @@
             {
                 List<RequestHead> lstWork = new List<RequestHead>();
 
-                string sql = string.Format(" Where RequestMonth = {0}", m_nRequestMonth);
-                sql += string.Format(" And OrderersDivision = {0}", m_nOrderersDivision);
-                sql += string.Format(" And OrderersCode = {0}", m_nOrderersCode);
-                //sql += string.Format(" And OrderersName = '{0}'", m_strOrderersName);
-                //sql += " And AssignedFlg = 0";
-                sql += " Order by ReqConstructionCode Asc, OrderNo Asc";
+                StringBuilder sql = new StringBuilder();
+                sql.AppendFormat(" Where RequestMonth = {0}", m_nRequestMonth);
+                sql.AppendFormat(" And OrderersDivision = {0}", m_nOrderersDivision);
+                sql.AppendFormat(" And OrderersCode = {0}", m_nOrderersCode);
+                sql.Append(" Order by ReqConstructionCode Asc, OrderNo Asc");
 
-                if (ioReqHead.SelectAction(sql, ref lstWork) == false)
+                if (ioReqHead.SelectAction(sql.ToString(), ref lstWork) == false)
                 {
                     return;
                 }
@@ -591,19 +591,19 @@
             IOInvoiceData ioInvData = new IOInvoiceData();
             IORequestHead ioReqHead = new IORequestHead();
 
-            InvoiceData InvData = null;
+            try
+            {
+                InvoiceData InvData = null;
 
-            ioInvData.connect(); ioInvData.beginTran();
-            ioReqHead.connect(); ioReqHead.beginTran();
+                ioInvData.connect(); ioInvData.beginTran();
+                ioReqHead.connect(); ioReqHead.beginTran();
 
-            try
-            {
                 // 請求書Noが指定されていない場合
                 if (nInvoiceNo == 0)
                 {
                     // 請求書Noの採番
                     nInvoiceNo = ioInvData.NumberingInvoiceNo(m_nRequestMonth, false);
-                    if (nInvoiceNo == -1)
+                    if (nInvoiceNo < 0)
                     {
                         // DBロールバック
                         ioInvData.rollback();
@@ -723,19 +723,17 @@
         /// <returns></returns>
         private bool DeleteInvoiceData(int nInvoiceNo)
         {
-            string sql = "";
-
             IOInvoiceData ioInvData = new IOInvoiceData();
             IORequestHead ioReqHead = new IORequestHead();
-
-            ioInvData.beginTran();
-            ioReqHead.beginTran();
-
             try
             {
+                ioInvData.connect(); ioInvData.beginTran();
+                ioReqHead.connect(); ioReqHead.beginTran();
+
                 // 請求書データの削除
-                sql = string.Format(" Where InvoiceNo = {0}", nInvoiceNo);
-                if (!ioInvData.DeleteAction(sql))
+                StringBuilder sql = new StringBuilder();
+                sql.AppendFormat(" Where InvoiceNo = {0}", nInvoiceNo);
+                if (!ioInvData.DeleteAction(sql.ToString(), false))
                 {
                     ioInvData.rollback();
                     ioReqHead.rollback();
@@ -745,8 +743,9 @@
 
                 List<RequestHead> lstReqHead = new List<RequestHead>();
 
-                sql = string.Format(" Where InvoiceNo = {0}", nInvoiceNo);
-                if (!ioReqHead.SelectAction(sql, ref lstReqHead))
+                sql.Clear();
+                sql.AppendFormat(" Where InvoiceNo = {0}", nInvoiceNo);
+                if (!ioReqHead.SelectAction(sql.ToString(), ref lstReqHead, false))
                 {
                     ioInvData.rollback();
                     ioReqHead.rollback();
@@ -761,13 +760,12 @@
                 }
 
                 // 請求ヘッダを更新
-                if (ioReqHead.UpdateAction(lstReqHead) == false)
+                if (!ioReqHead.UpdateAction(lstReqHead, false))
                 {
                     ioInvData.rollback();
                     ioReqHead.rollback();
 
                     return false;
-
                 }
 
                 ioInvData.commit();
@@ -837,5 +835,427 @@
             }
         }
         #endregion
+
+        #region 印刷実行
+        /// <summary>
+        /// 印刷実行
+        /// </summary>
+        private void EntryPrintProc()
+        {
+            FrmSaveFilePath frm = new FrmSaveFilePath();
+            FrmRequestPrint frmPrint = new FrmRequestPrint();
+            IOInvoiceData ioInvData = new IOInvoiceData();
+            IOConstructionBaseInfo ioInfo = new IOConstructionBaseInfo();
+            IOConstructionProgressDate ioPrgDate = new IOConstructionProgressDate();
+            try
+            {
+                frmPrint.InvoiceNo = m_nInvoiceNo;
+                frmPrint.ExcuteDate = DateTime.Today.Date;
+
+                // 印刷確認画面表示
+                DialogResult drRet = frmPrint.ShowDialog();
+                if (drRet == DialogResult.Cancel) return;
+
+                // 印刷データ取得処理
+                if (!GetPrintData()) return;
+
+                //　日付印刷フラグ
+                m_bDatePrintFlg = frmPrint.DatePrintFlg;
+
+                //　印刷日付
+                m_DatePrintOut = frmPrint.ExcuteDate;
+
+                // EXCEL保存時選択
+                if (drRet == DialogResult.No)
+                {
+                    // 保存先を選択する
+                    frm.SaveType = (int)CommonDefine.SaveFileType.ExcelFile;
+                    //frm.ShowInTaskbar = false;
+                    frm.ShowDialog();
+                    if (frm.EndButton == DialogResult.Cancel) return;
+                    m_SelectSaveExcel = frm.SelectPath;
+                }
+
+                // DBトランザクション開始
+                ioInvData.connect(); ioInvData.beginTran();
+                ioInfo.connect(); ioInfo.beginTran();
+                ioPrgDate.connect(); ioPrgDate.beginTran();
+
+                // 請求書データの反映
+                if(!EntryInvoiceData(ioInvData, frmPrint.CommentData))
+                {
+                    ioInvData.rollback();
+                    ioInfo.rollback();
+                    ioPrgDate.rollback();
+                    return;
+                }
+
+                // 工事基本情報を更新する
+                if(!UpdateConstructionBaseInfo(ioInfo, ioPrgDate))
+                {
+                    ioInvData.rollback();
+                    ioInfo.rollback();
+                    ioPrgDate.rollback();
+                    return;
+                }
+
+                ioInvData.commit();
+                ioInfo.commit();
+                ioPrgDate.commit();
+
+                // 印刷プロセス数取得
+                m_ProcessCount = m_lstReqHead.Count + 5;       // 明細枚数＋ＥＸＣＥＬオブジェクト取得(2)＋表紙(2)＋一覧(1)
+                PrintProgress.Visible = true;
+                PrintProgress.Minimum = 0;
+                PrintProgress.Maximum = m_ProcessCount;
+                PrintProgress.Value = 0;
+                panel1.Update();
+
+                m_Canceled = false;
+                // ボタンの変更
+                PrintButtonVisbleControl(true);
+
+                //印刷を別スレッドで実行する
+                m_ProgressCount = 0;
+
+                // 印刷・保存の判定フラグ
+                object[] obj = new object[1];
+                if (drRet == DialogResult.Yes) obj[0] = true;
+                else obj[0] = false;
+
+                workerThread = new Thread(new ParameterizedThreadStart(PrintMain));
+                workerThread.IsBackground = true;
+                workerThread.Start(obj);
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("システムエラー：{0}：{1}", CommonMotions.GetMethodName(), ex.Message);
+            }
+            finally
+            {
+                ioInvData.close(); ioInvData = null;
+                ioInfo.close(); ioInfo = null;
+                ioPrgDate.close(); ioPrgDate = null;
+
+                frmPrint.Dispose(); frmPrint = null;
+                frm.Dispose(); frm = null;
+            }
+        }
+        #endregion
+
+        #region 印刷データ取得処理
+        /// <summary>
+        /// 印刷データ取得処理
+        /// </summary>
+        /// <returns></returns>
+        private bool GetPrintData()
+        {
+            try
+            {
+                bool bRet = true;
+
+                InvoiceData InvData = new InvoiceData();
+                List<RequestHead> lstReqHead = new List<RequestHead>();
+                // 請求書データの取得
+                if (!GetInvoiceData(ref InvData, ref lstReqHead)) return false;
+
+                // 本工事の工事情報の取得
+                if (!GetMainConstructionBaseInfo(lstReqHead)) return false;
+
+                return bRet;
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("システムエラー：{0}：{1}", CommonMotions.GetMethodName(), ex.Message);
+                return false;
+            }
+        }
+        #endregion
+
+        #region 請求金額退避エリア
+        /// <summary>
+        /// 請求金額退避エリア
+        /// </summary>
+        private long m_lTotalAmount = 0;    // 合計金額
+        private long m_lTaxAmount = 0;      // 合計税金
+        #endregion
+
+        #region 請求書データの取得
+        /// <summary>
+        /// 請求書データの取得
+        /// </summary>
+        private bool GetInvoiceData(ref InvoiceData InvData, ref List<RequestHead> lstReqHead)
+        {
+            IOInvoiceData ioInvData = new IOInvoiceData();
+            IORequestHead ioReqHead = new IORequestHead();
+            IORequestData ioReqData = new IORequestData();
+
+            try
+            {
+                StringBuilder sql = new StringBuilder();
+
+                // 請求書データの取得
+                sql.Append(ioInvData.CreatePrimarykeyString(m_nInvoiceNo));
+                if (!ioInvData.SelectAction(sql.ToString(), ref InvData)) return false;
+
+                // 請求ヘッダの取得
+                sql.Clear();
+                sql.AppendFormat(" WHERE InvoiceNo = {0} ORDER BY ReqConstructionCode", m_nInvoiceNo);
+                if (!ioReqHead.SelectAction(sql.ToString(), ref lstReqHead)) return false;
+
+                foreach (RequestHead ReqHead in lstReqHead)
+                {
+                    // 請求ヘッダの取得
+                    sql.Clear();
+                    sql.AppendFormat(" WHERE RequestNo = {0} ORDER BY MainConstructionCode", ReqHead.RequestNo);
+                    List<RequestData> lstReqData = new List<RequestData>();
+                    if (!ioReqData.SelectAction(sql.ToString(), ref lstReqData)) return false;
+
+                    m_dicReqData.Add(ReqHead.RequestNo, lstReqData);
+
+                    // 請求金額集計
+                    m_lTotalAmount += ReqHead.RequestTotalAmount;
+                    m_lTaxAmount += ReqHead.TaxAmount;
+                }
+
+                return true;
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("システムエラー：{0}：{1}", CommonMotions.GetMethodName(), ex.Message);
+
+                return false;
+            }
+            finally
+            {
+                ioInvData.close(); ioInvData = null;
+                ioReqHead.close(); ioReqHead = null;
+                ioReqData.close(); ioReqData = null;
+            }
+
+        }
+        #endregion
+
+        #region 工事基本情報の追加
+        /// <summary>
+        /// 工事基本情報の追加
+        /// </summary>
+        /// <param name="Info"></param>
+        private void AddConstructionBaseInfoDic(ConstructionBaseInfo Info)
+        {
+            ConstructionBaseInfo wrk = null;
+
+            if (!m_dicConstructionBaseInfo.TryGetValue(Info.ConstructionCode, out wrk))
+            {
+                m_dicConstructionBaseInfo.Add(Info.ConstructionCode, Info);
+            }
+        }
+        #endregion
+
+        #region 工事基本情報の取得
+        /// <summary>
+        /// 工事基本情報の取得
+        /// </summary>
+        private bool GetMainConstructionBaseInfo(List<RequestHead> lstReqHead)
+        {
+            IOConstructionBaseInfo ioInfo = new IOConstructionBaseInfo();
+
+            try
+            {
+                StringBuilder sql = new StringBuilder();
+                foreach (RequestHead ReqHead in lstReqHead)
+                {
+                    sql.Clear();
+                    sql.Append(ioInfo.CreatePrimarykeyString(ReqHead.ReqConstructionCode));
+                    ConstructionBaseInfo info = new ConstructionBaseInfo();
+                    if (!ioInfo.SelectAction(sql.ToString(), ref info)) return false;
+
+                    AddConstructionBaseInfoDic(info);
+                }
+
+                List<int> lstKey = new List<int>(m_dicReqData.Keys);
+                foreach (int nRequestNo in lstKey)
+                {
+                    List<RequestData> lstReqData = null;
+
+                    if (!m_dicReqData.TryGetValue(nRequestNo, out lstReqData)) return false;
+
+                    foreach (RequestData ReqData in lstReqData)
+                    {
+                        sql.Clear();
+                        sql.Append(ioInfo.CreatePrimarykeyString(ReqData.MainConstructionCode));
+                        ConstructionBaseInfo info = new ConstructionBaseInfo();
+                        if (!ioInfo.SelectAction(sql.ToString(), ref info)) return false;
+
+                        AddConstructionBaseInfoDic(info);
+                    }
+                }
+
+                return true;
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("システムエラー：{0}：{1}", CommonMotions.GetMethodName(), ex.Message);
+                return false;
+            }
+            finally
+            {
+                ioInfo.close(); ioInfo = null;
+            }
+
+        }
+        #endregion
+
+        #region 請求書データの反映
+        /// <summary>
+        /// 請求書データの反映
+        /// </summary>
+        /// <returns></returns>
+        private bool EntryInvoiceData(IOInvoiceData ioInvData, string[] CommentData)
+        {
+            try
+            {
+                InvoiceData invoiceData = new InvoiceData();
+
+                StringBuilder sql = new StringBuilder();
+                sql.Append(ioInvData.CreatePrimarykeyString(m_nInvoiceNo));
+                if (!ioInvData.SelectAction(sql.ToString(), ref invoiceData, false)) return false;
+
+                invoiceData.TotalAmount = m_lTotalAmount;
+                invoiceData.TaxAmount = m_lTaxAmount;
+                invoiceData.RequestDate = m_DatePrintOut;
+
+                invoiceData.Comment1 = CommentData[0];
+                invoiceData.Comment2 = CommentData[1];
+                invoiceData.Comment3 = CommentData[2];
+                invoiceData.Comment4 = CommentData[3];
+                invoiceData.Comment5 = CommentData[4];
+
+                invoiceData.CompleteFlg = 1;
+
+                return ioInvData.UpdateAction(sql.ToString(), invoiceData, false);
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("システムエラー：{0}：{1}", CommonMotions.GetMethodName(), ex.Message);
+
+                return false;
+            }
+        }
+
+        #endregion
+
+        #region 工事データ更新
+        /// <summary>
+        /// 工事基本情報を更新する
+        /// </summary>
+        /// <returns></returns>
+        private bool UpdateConstructionBaseInfo(IOConstructionBaseInfo ioInfo
+                                                ,IOConstructionProgressDate ioPrgDate)
+        {
+            try
+            {
+                List<int> lstKeyInfo = new List<int>(m_dicConstructionBaseInfo.Keys);
+                Dictionary<int, int> dicCodeWork = new Dictionary<int, int>();
+
+                StringBuilder sql = new StringBuilder();
+
+                foreach (int nConstructionCode in lstKeyInfo)
+                {
+                    int nOldStatus = 0;
+                    ConstructionBaseInfo Info = null;
+
+                    // 工事基本情報の取得
+                    if (!m_dicConstructionBaseInfo.TryGetValue(nConstructionCode, out Info))
+                    {
+                        ioInfo.rollback();
+                        ioPrgDate.rollback();
+                        return false;
+                    }
+
+                    nOldStatus = Info.ConstructionStatusFlg;
+
+                    // 工事状態が「請求準備」ではない場合は対象外
+                    if (nOldStatus != (int)CommonDefine.StatNumArray.Status9) continue;
+
+                    // 工事基本情報で請求一括でない場合は対象外
+                    if (Info.BillingSplitFlg != (int)ConstructionBaseInfo.BillingSplitFlgDef.AllOnBilling) continue;
+
+                    // 工事状態フラグを「請求確認」に変更
+                    Info.ConstructionStatusFlg = (int)CommonDefine.StatNumArray.Status10;
+
+                    // 工事基本情報を更新
+                    sql.Clear();
+                    sql.Append(ioInfo.CreatePrimarykeyString(nConstructionCode));
+                    if (!ioInfo.UpdateAction(sql.ToString(), Info, false)) return false;
+
+                    // 既にデータが存在しないか一度検索しておく
+                    sql.Clear();
+                    sql.Append(ioPrgDate.CreatePrimarykeyString(nConstructionCode, Info.ConstructionStatusFlg));
+                    List<ConstructionProgressDate> lstPrgDate = new List<ConstructionProgressDate>();
+                    if (!ioPrgDate.SelectAction(sql.ToString(), ref lstPrgDate, false)) return false;
+
+                    // データがある場合は、当該データを削除する
+                    if (lstPrgDate.Count > 0)
+                    {
+                        // 該当データを削除
+                        sql.Clear();
+                        sql.Append(ioPrgDate.CreatePrimarykeyString(nConstructionCode, Info.ConstructionStatusFlg));
+                        if (!ioPrgDate.DeleteAction(sql.ToString(), false)) return false;
+                    }
+
+                    // 案件進捗日付データの構築
+                    ConstructionProgressDate PrgDate = new ConstructionProgressDate();
+
+                    // 案件進捗日付データの設定
+                    PrgDate.ConstructionCode = nConstructionCode;
+                    PrgDate.ConstructionStatusFlg = (int)CommonDefine.StatNumArray.Status10;
+                    PrgDate.PreviousStatusFlg = nOldStatus;
+                    PrgDate.ChangeDate = DateTime.Now;
+                    PrgDate.ChangePersonCode = CommonMotions.LoginUserData.PersonCode;
+
+                    // 案件進捗日付データを挿入
+                    if (!ioPrgDate.InsertAction(PrgDate, false)) return false;
+
+                    // 対象工事が結合（子）工事の場合
+                    if (Info.JoinFlg == (int)ConstructionBaseInfo.JoinFlgDef.JoinChildren)
+                    {
+                        // 結合（親）工事番号の取得
+                        int nParentCode = GetJoinParentConstructionCode(nConstructionCode);
+
+                        int nChildCode = 0;
+
+                        // 親工事番号が登録されていない場合は登録する
+                        if (!dicCodeWork.TryGetValue(nParentCode, out nChildCode))
+                        {
+                            // 結合（親）の工事状態を更新するために工事番号を退避
+                            dicCodeWork.Add(nParentCode, nConstructionCode);
+                        }
+                    }
+                }
+
+                List<int> lstKeyLink = new List<int>(dicCodeWork.Keys);
+
+                foreach (int nParentCode in lstKeyLink)
+                {
+                    int nChildCode = 0;
+
+                    if (dicCodeWork.TryGetValue(nParentCode, out nChildCode))
+                    {
+                        // 結合（親）の工事状態を変更
+                        ClsChangeBaseInfoData.SetParentConstrStatus(ioInfo, nChildCode);
+                    }
+                }
+
+                return true;
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("システムエラー：{0}：{1}", CommonMotions.GetMethodName(), ex.Message);
+                return false;
+            }
+        }
+
+        #endregion
     }
 }
Index: branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/RequestEntry/FrmRequestPrintSelPrtOut.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/RequestEntry/FrmRequestPrintSelPrtOut.cs	(nonexistent)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/RequestEntry/FrmRequestPrintSelPrtOut.cs	(revision 335)
@@ -0,0 +1,1368 @@
+﻿using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Forms;
+
+using ProcessManagement.Common;
+using ProcessManagement.DataModel;
+using ProcessManagement.DB;
+using ProcessManagement.DB.IOAccess;
+using ProcessManagement.Forms.SubForms;
+using ProcessManagement.Forms.ControlsAction;
+
+
+namespace ProcessManagement.Forms.DataEntry
+{
+    public partial class FrmRequestPrintSel
+    {
+        #region 定数
+
+        /// <summary>
+        /// Excelテンプレートファイル名
+        /// </summary>
+        //private static string s_ExcelRequestSheetFileName = @"\RequestSheet.xlsx";
+        private static string s_ExcelRequestSheetFileName = CommonDefine.s_ExcelOriginalFileName;
+
+        /// <summary>
+        /// デスクトップフォルダ名
+        /// </summary>
+        private static string s_ExecCurrentDirName = System.Environment.GetFolderPath(Environment.SpecialFolder.DesktopDirectory);
+
+        /// <summary>
+        /// シート名称カウント
+        /// </summary>
+        enum enumSheetName
+        {
+            Cover = 0,
+            List,
+            Detail,
+        }
+
+        /// <summary>
+        /// Excel シート名称
+        /// </summary>
+        private static readonly Dictionary<enumSheetName, string> s_DicSheetName = new Dictionary<enumSheetName, string>()
+        {
+            { enumSheetName.Cover, "請求書（表紙）" },
+            { enumSheetName.List, "請求書（一覧）" },
+            { enumSheetName.Detail, "請求書（内訳）" },
+        };
+
+        /// <summary>
+        /// 図形置き場シート
+        /// </summary>
+        private const string s_shapeSheetName = "図形シート";
+        /// <summary>
+        /// 図形名称
+        /// </summary>
+        private const string s_shapeName = "EstimateSeal1";                                    // 積算見積表紙判子
+        /// <summary>
+        /// 図形サイズ【縦・横】（図形名称順）
+        /// </summary>
+        private static float[,] s_ShapeSize = new float[1, 2] { { 25.51f, 25.51f } };         // 積算見積表紙判子
+        /// <summary>
+        /// 積算見積表紙判子フォントサイズ
+        /// </summary>
+        private static float[] s_EstimateSeal1FontSize = { 16f, 8f, 8f, 8f, 6f };
+        /// <summary>
+        /// 表紙判子位置(Key:X Value:Y)
+        /// </summary>
+        private static float[,] s_CoverSealPoint = new float[4, 2] {{592.50f, 555.25f},    // 社長
+                                                                    {657.25f, 555.25f},    // 所属長
+                                                                    {721.00f, 555.25f},    // 営業
+                                                                    {784.00f, 555.25f} };  // 担当
+
+        #endregion
+
+        #region 変数
+
+        #region スレッド使用定義
+        //コントロールの値を変更するためのデリゲート
+        private delegate void SetProgressValueDelegate(int num);
+        //バックグラウンド処理が終わった時にコントロールの値を変更するためのデリゲート
+        private delegate void ThreadCompletedDelegate();
+        //処理がキャンセルされた時にコントロールの値を変更するためのデリゲート
+        private delegate void ThreadCanceledDelegate();
+
+        //別処理をするためのスレッド
+        private System.Threading.Thread workerThread;
+
+        //デリゲートの作成
+        SetProgressValueDelegate m_progressDlg = null;
+        ThreadCompletedDelegate m_completeDlg = null;
+        ThreadCanceledDelegate m_canceledDlg = null;
+        #endregion
+
+        /// <summary>
+        /// Excel印刷クラスオブジェクト
+        /// </summary>
+        private UsedExcel m_UsedExcel = null;
+
+        /// <summary>
+        /// 保存時Excelパス
+        /// </summary>
+        private string m_SelectSaveExcel = "";
+
+        /// <summary>
+        /// 請求書データ
+        /// </summary>
+        private InvoiceData m_InvData = new InvoiceData();
+
+        /// <summary>
+        /// 請求データ
+        /// </summary>
+        private Dictionary<int, List<RequestData>> m_dicReqData = new Dictionary<int, List<RequestData>>();
+
+        /// <summary>
+        /// 工事基本情報データ
+        /// </summary>
+        private Dictionary<int, ConstructionBaseInfo> m_dicConstructionBaseInfo = new Dictionary<int, ConstructionBaseInfo>();
+
+        /// <summary>
+        /// 日付印刷
+        /// </summary>
+        private bool m_bDatePrintFlg = true;
+
+        /// <summary>
+        /// 印刷日付
+        /// </summary>
+        private DateTime m_DatePrintOut = DateTime.Now;
+
+        /// <summary>
+        /// 印刷処理プロセス数カウント
+        /// </summary>
+        private int m_ProcessCount = 0;
+
+        /// <summary>
+        /// プログレスバー使用カウント
+        /// </summary>
+        private int m_ProgressCount = 0;
+
+        /// <summary>
+        /// キャンセルボタンがクリックされたかを示すフラグ
+        /// </summary>
+        private volatile bool m_Canceled = false;
+        /// <summary>
+        /// 実行ダイアログ選択値
+        /// </summary>
+        private DialogResult m_PrintresRet = DialogResult.Cancel;
+
+        /// <summary>
+        /// 終了コード
+        /// </summary>
+        private CommonDefine.RetunAnswer m_rtAns = CommonDefine.RetunAnswer.Answer0;
+
+        #endregion
+
+        #region プロパティ
+
+        #endregion
+
+        #region 工事基本情報取得
+        /// <summary>
+        /// 工事基本情報取得
+        /// </summary>
+        /// <param name="constructionCode"></param>
+        /// <param name="data"></param>
+        /// <returns></returns>
+        private bool GetConstructionBaseInfo(int constructionCode, ref ConstructionBaseInfo data)
+        {
+            var cbDB = new IOConstructionBaseInfo();
+            try
+            {
+                // 工事基本情報取得クラス領域
+                var wrk = new ConstructionBaseInfo();
+
+                // 工事基本情報取得SQL
+                string strSQL = cbDB.CreatePrimarykeyString(constructionCode);
+
+                // 工事基本情報取得
+                if (!cbDB.SelectAction(strSQL, ref wrk)) return false;
+
+                // 工事基本情報取得クラス領域
+                data = wrk;
+
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("システムエラー：{0}：{1}", CommonMotions.GetMethodName(), ex.Message);
+                return false;
+            }
+            finally
+            {
+                cbDB.close(); cbDB = null;
+            }
+            return true;
+        }
+        #endregion
+
+        #region 結合親工事番号の取得
+        /// <summary>
+        /// 結合親工事番号の取得
+        /// </summary>
+        /// <param name="nConstructionCode"></param>
+        /// <returns></returns>
+        private int GetJoinParentConstructionCode(int nConstructionCode)
+        {
+            int nParentCode = -1;
+            IOConstructionLink ioLink = new IOConstructionLink();
+
+            try
+            {
+                string sql = string.Format(" WHERE FluctuationCode = {0} AND LinkType = 1 ", nConstructionCode);
+                List<ConstructionLink> lstWork = new List<ConstructionLink>();
+
+                if (ioLink.SelectAction(sql, ref lstWork) == false)
+                {
+                    return nParentCode;
+                }
+
+                foreach (ConstructionLink Link in lstWork)
+                {
+                    nParentCode = Link.ConstructionCode;
+                    break;
+                }
+                return nParentCode;
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("システムエラー：{0}：{1}", CommonMotions.GetMethodName(), ex.Message);
+                return -1;
+            }
+            finally
+            {
+                ioLink.close();
+                ioLink = null;
+            }
+
+        }
+        #endregion
+
+        #region 工事基本情報明細
+        /// <summary>
+        /// 工事基本情報明細を工事基本情報明細テーブルから工事番号をキーに取得する関数
+        /// </summary>
+        /// <param name="datas"></param>
+        /// <returns></returns>
+        private bool GetConstructionBaseInfoDetail(List<int> lstConstCode, ref Dictionary<int, Dictionary<int, string>> datas)
+        {
+            var sbDB = new IOConstructionBaseInfoDetail();
+            try
+            {
+                // 工事基本情報明細取得クラス領域
+                var wrk = new List<ConstructionBaseInfoDetail>();
+
+                // 工事基本情報明細取得SQL
+                StringBuilder strSQL = new StringBuilder();
+                strSQL.Append(" Where ConstructionCode in ( ");
+                foreach (int constCode in lstConstCode)
+                {
+                    strSQL.AppendFormat((lstConstCode.IndexOf(constCode) == 0) ? " {0}" : ", {0}", constCode);
+                }
+                strSQL.Append(" )");
+
+                // 工事基本情報明細取得
+                if (!sbDB.SelectAction(strSQL.ToString(), ref wrk)) return false;
+
+                datas.Clear();
+
+                foreach (var record in wrk)
+                {
+                    if (!datas.ContainsKey(record.ConstructionCode))
+                        datas[record.ConstructionCode] = new Dictionary<int, string>();
+                    datas[record.ConstructionCode][record.DetailNo] = record.DetailString;
+                }
+
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("システムエラー：{0}：{1}", CommonMotions.GetMethodName(), ex.Message);
+                return false;
+            }
+            finally
+            {
+                sbDB.close();
+                sbDB = null;
+            }
+
+            return true;
+        }
+        #endregion
+
+        #region 工事増減情報取得
+        /// <summary>
+        /// 工事増減情報取得
+        /// </summary>
+        /// <param name="constructionCode"></param>
+        /// <param name="datas"></param>
+        /// <returns></returns>
+        private bool GetConstructionLink(int constructionCode, ref List<int> datas)
+        {
+            var sbDB = new IOConstructionLink();
+            try
+            {
+                // 工事増減情報取得クラス領域
+                var wrk = new List<ConstructionLink>();
+
+                // 工事増減情報取得SQL
+                string strSQL = sbDB.CreatePrimarykeyString(constructionCode);
+
+                // ソート条件追加
+                strSQL += " ORDER BY FLUCTUATIONCODE";
+
+                // 工事増減情報取得
+                if (!sbDB.SelectAction(strSQL, ref wrk)) return false;
+
+                foreach (var record in wrk)
+                {
+                    datas.Add(record.FluctuationCode);
+                }
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("システムエラー：{0}：{1}", CommonMotions.GetMethodName(), ex.Message);
+                return false;
+            }
+            finally
+            {
+                sbDB.close();
+                sbDB = null;
+            }
+
+            return true;
+        }
+        #endregion
+
+        #region 工事詳細台帳データ取得
+        /// <summary>
+        /// 工事詳細台帳データ取得
+        /// </summary>
+        /// <param name="constructionCode"></param>
+        /// <param name="data"></param>
+        /// <returns></returns>
+        private bool GetConstructionLedger(int constructionCode, ref ConstructionLedger data)
+        {
+            var sbDB = new IOConstructionLedger();
+            try
+            {
+                // 工事詳細台帳データ取得クラス領域
+                var wrk = new ConstructionLedger();
+
+                // 工事詳細台帳データ取得SQL
+                string strSQL = sbDB.CreatePrimarykeyString(constructionCode);
+
+                // 工事詳細台帳データ取得
+                if (!sbDB.SelectAction(strSQL, ref wrk)) return false;
+
+                data = wrk;
+
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("システムエラー：{0}：{1}", CommonMotions.GetMethodName(), ex.Message);
+                return false;
+            }
+            finally
+            {
+                sbDB.close();
+                sbDB = null;
+            }
+
+            return true;
+        }
+        #endregion
+
+        #region プログレスバーの値を変更する
+        /// <summary>
+        /// プログレスバーの値を変更する
+        /// </summary>
+        /// <param name="num"></param>
+        private void SetProgressValue(int num)
+        {
+            // ProgressBarの値を変更する
+            PrintProgress.Value = num;
+            PrintProgress.Update();
+        }
+        #endregion
+
+        #region 処理が完了した時にコントロールの値を変更する
+        /// <summary>
+        /// 処理が完了した時にコントロールの値を変更する
+        /// </summary>
+        private void ThreadCompleted()
+        {
+            try
+            {
+                // コントロールの変更
+                PrintProgress.Visible = false;
+                panel2.Update();
+
+                // ボタンの変更
+                PrintButtonVisbleControl(false);
+
+                // 印刷
+                if (m_rtAns == CommonDefine.RetunAnswer.Answer0)
+                {
+                    if (m_PrintresRet == DialogResult.No)
+                    {
+                        MessageBox.Show("保存が終了しました。", "終　了", MessageBoxButtons.OK, MessageBoxIcon.Information);
+                    }
+                    return;
+                }
+
+                string strMessage = "";
+                switch ((int)m_rtAns)
+                {
+                    case (int)CommonDefine.RetunAnswer.Answer1:
+                        strMessage = "システムエラー";
+                        break;
+                    case (int)CommonDefine.RetunAnswer.Answer2:
+                        strMessage = "工事基本情報取得エラー";
+                        break;
+                }
+                MessageBox.Show(strMessage, "印刷エラー", MessageBoxButtons.OK, MessageBoxIcon.Error);
+            }
+            catch (System.Exception ex)
+            {
+                logger.ErrorFormat("システムエラー：{0}：{1}", CommonMotions.GetMethodName(), ex.Message);
+                m_rtAns = CommonDefine.RetunAnswer.Answer1;
+            }
+        }
+        #endregion
+
+        #region 印刷時ボタン制御
+        /// <summary>
+        /// 印刷時ボタン制御
+        /// </summary>
+        /// <param name="bprint"></param>
+        private void PrintButtonVisbleControl(bool bprint)
+        {
+            if (bprint)
+            {
+                cbCreateDate.Enabled = false;
+                btnAllSelect.Visible = false;
+                btnAllUnselect.Visible = false;
+                btnGenerate.Visible = false;
+                btnDel.Visible = false;
+                btnEnd.Visible = false;
+                btnCancel.Visible = true;
+                PrintProgress.Visible = true;
+            }
+            else
+            {
+                cbCreateDate.Enabled = true;
+                btnAllSelect.Visible = true;
+                btnAllUnselect.Visible = true;
+                btnGenerate.Visible = true;
+                btnDel.Visible = true;
+                btnEnd.Visible = true;
+                btnCancel.Visible = false;
+                PrintProgress.Visible = false;
+            }
+
+        }
+        #endregion
+
+        #region 処理がキャンセルされた時にコントロールの値を変更する
+        /// <summary>
+        /// 処理がキャンセルされた時にコントロールの値を変更する
+        /// </summary>
+        private void ThreadCanceled()
+        {
+            // コントロールの変更
+            PrintProgress.Visible = false;
+            panel2.Update();
+
+            // ボタンの変更
+            PrintButtonVisbleControl(false);
+        }
+        #endregion
+
+        #region 印刷メイン
+        /// <summary>
+        /// 印刷メイン
+        /// </summary>
+        /// <param name="bPrint">true:印刷のみ,false:保存のみ</param>
+        public void PrintMain(object args)
+        {
+            try
+            {
+                object[] argsTmp = (object[])args;
+                bool bPrint = true;
+                for (int i = 0; i < argsTmp.Length; i++)
+                {
+                    bPrint = (bool)argsTmp[i];
+                }
+
+                //デリゲートの作成
+                m_progressDlg = new SetProgressValueDelegate(SetProgressValue);
+                m_completeDlg = new ThreadCompletedDelegate(ThreadCompleted);
+                m_canceledDlg = new ThreadCanceledDelegate(ThreadCanceled);
+
+                // 印刷クラス
+                m_UsedExcel = new UsedExcel();
+                m_ProgressCount = 0;
+
+                // コントロールの表示を変更する
+                this.Invoke(m_progressDlg, new object[] { ++m_ProgressCount });
+                // エクセルブックオープン
+                if (!m_UsedExcel.ExcelBookOpen(System.Environment.CurrentDirectory + s_ExcelRequestSheetFileName))
+                {
+                    m_rtAns = CommonDefine.RetunAnswer.Answer5;
+                    return;
+                }
+
+                // 中断処理
+                if (m_Canceled) return;
+
+                // コントロールの表示を変更する
+                this.Invoke(m_progressDlg, new object[] { ++m_ProgressCount });
+
+                // 表紙印刷
+                CommonDefine.RetunAnswer rtAns = PrintCover();
+                if (rtAns != CommonDefine.RetunAnswer.Answer0)
+                {
+                    m_rtAns = rtAns;
+                    return;
+                }
+
+                // 中断処理
+                if (m_Canceled) return;
+
+                // コントロールの表示を変更する
+                this.Invoke(m_progressDlg, new object[] { ++m_ProgressCount });
+
+                // 一覧印刷
+                rtAns = PrintList();
+                if (rtAns != CommonDefine.RetunAnswer.Answer0)
+                {
+                    m_rtAns = rtAns;
+                    return;
+                }
+
+                // 中断処理
+                if (m_Canceled) return;
+
+                // コントロールの表示を変更する
+                this.Invoke(m_progressDlg, new object[] { ++m_ProgressCount });
+
+                int no = 1;
+                foreach (RequestHead ReqHead in m_lstReqHead)
+                {
+                    List<RequestData> lstReqData = null;
+                    if (m_dicReqData.TryGetValue(ReqHead.RequestNo, out lstReqData) == false)
+                    {
+                        m_rtAns = rtAns;
+                        return;
+                    }
+
+                    foreach (RequestData ReqData in lstReqData)
+                    {
+                        ConstructionBaseInfo Info = null;
+
+                        if (m_dicConstructionBaseInfo.TryGetValue(ReqData.MainConstructionCode, out Info) == false)
+                        {
+                            m_rtAns = CommonDefine.RetunAnswer.Answer2;
+                            return;
+                        }
+
+                        long lRequestAmount = ReqData.RequestAmount0;
+                        lRequestAmount += ReqData.RequestAmount1;
+                        lRequestAmount += ReqData.RequestAmount2;
+                        lRequestAmount += ReqData.RequestAmount3;
+                        lRequestAmount += ReqData.RequestAmount4;
+                        lRequestAmount += ReqData.RequestAmount5;
+                        lRequestAmount += ReqData.RequestAmount6;
+                        lRequestAmount += ReqData.UnpaidAmount;
+
+                        if (lRequestAmount == 0)
+                        {
+                            continue;
+                        }
+
+                        rtAns = PrintDetail(no, ReqHead, ReqData, Info);
+                        if (rtAns != CommonDefine.RetunAnswer.Answer0)
+                        {
+                            m_rtAns = rtAns;
+                            return;
+                        }
+                        // 中断処理
+                        if (m_Canceled) return;
+
+                        // コントロールの表示を変更する
+                        this.Invoke(m_progressDlg, new object[] { ++m_ProgressCount });
+                    }
+                }
+
+                if (bPrint)
+                {
+                    // 印刷処理
+                    m_UsedExcel.ExcelSheetPrint();
+                }
+                else
+                {
+                    // 保存処理
+                    SaveExcelFile();
+                }
+
+                // コントロールの表示を変更する
+                this.Invoke(m_progressDlg, new object[] { ++m_ProgressCount });
+            }
+            catch (System.Exception ex)
+            {
+                logger.ErrorFormat("システムエラー：{0}：{1}", CommonMotions.GetMethodName(), ex.Message);
+            }
+            finally
+            {
+                // 完了したときにコントロールの値を変更する
+                this.Invoke(m_completeDlg);
+
+                //デリゲートの廃棄
+                m_progressDlg = null;
+                m_completeDlg = null;
+                m_canceledDlg = null;
+
+                // Excel開放
+                if (m_UsedExcel != null)
+                {
+                    m_UsedExcel.ExcelBookClose();
+                }
+                m_UsedExcel = null;
+
+                // ガーベージコレクト
+                GC.Collect();
+            }
+        }
+        #endregion
+
+        #region Excelファイル保存処理
+        /// <summary>
+        /// Excelファイル保存処理
+        /// </summary>
+        private void SaveExcelFile()
+        {
+            try
+            {
+                string filePath = @m_SelectSaveExcel;
+
+                // ファイルパスの存在をチェック
+                if (CommonMotions.ChkDirPath(filePath, true))
+                {
+                    // ファイル名を作成
+                    string wrkFile = m_InvData.RequestName + "様 請求書";
+
+                    // ファイル名に使用できない文字を取り除く
+                    foreach (var badCh in m_UsedExcel.ExcelBadCharcter)
+                    {
+                        wrkFile = wrkFile.Replace(badCh, "");
+                    }
+
+                    // ファイル名作成
+                    filePath += @"\" + @wrkFile;
+
+                    // ファイル保存
+                    m_UsedExcel.SaveSwitch = true;
+                    m_UsedExcel.ExcelSaveBook(filePath);
+
+                }
+            }
+            catch (System.Exception ex)
+            {
+                logger.ErrorFormat("システムエラー：{0}：{1}", CommonMotions.GetMethodName(), ex.Message);
+            }
+
+        }
+        #endregion
+
+        #region エリアスを付けた担当者マスタのフィールド文を作成する
+        /// <summary>
+        /// エリアスを付けた担当者マスタのフィールド文を作成する
+        /// </summary>
+        /// <param name="Alias"></param>
+        /// <param name="strSQL"></param>
+        private string CreatePersonSQL(string Alias)
+        {
+            try
+            {
+                StringBuilder strcmd = new StringBuilder();
+
+                bool bColFirst = true;
+                string strWork = string.Empty;
+                foreach (var gender in Enum.GetValues(typeof(IOMPersonInCharge.ColumnCnt)))
+                {
+                    strWork = gender.ToString();
+                    if (!bColFirst) strcmd.Append(", ");
+                    if (strWork.Equals("StartDate") || strWork.Equals("EndDate"))
+                    {
+                        strcmd.AppendFormat(" DATE_FORMAT({0}{1}, '%Y/%m/%d')", Alias, strWork);
+                    }
+                    else if (strWork.Equals("EntryDate") || strWork.Equals("UpdateDate"))
+                    {
+                        strcmd.AppendFormat(" DATE_FORMAT({0}{1}, '%Y/%m/%d %H:%i:%s')", Alias, strWork);
+                    }
+                    else
+                    {
+                        strcmd.AppendFormat(" {0}{1}", Alias, strWork);
+                    }
+                    bColFirst = false;
+                }
+
+                return strcmd.ToString();
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("システムエラー：{0}：{1}", CommonMotions.GetMethodName(), ex.Message);
+                return string.Empty;
+            }
+        }
+        #endregion
+
+        #region 表紙印鑑表示
+        /// <summary>
+        ///  表紙印鑑表示
+        /// </summary>
+        private void PrintCoverSeal(int PersonCode)
+        {
+            IOMPersonInCharge picDB = new IOMPersonInCharge();
+            IOProcessApproval paDB = new IOProcessApproval();
+            try
+            {
+                ArrayList arlist = new ArrayList();
+
+                // 承認データ読込
+                StringBuilder strSQLSeal = new StringBuilder();
+                strSQLSeal.Append("SELECT");
+                strSQLSeal.Append(CreatePersonSQL("B."));
+                strSQLSeal.Append(", C.SECRANK FROM PROCESSAPPROVAL A, PERSONINCHARGEMASTER B, SECURITYMASTER C");
+                strSQLSeal.Append(paDB.CreatePrimarykeyString(m_lstReqHead[0].ReqConstructionCode, (int)ClsExcute.ApprovalListNo.OrderBillingApproval, m_lstReqHead[0].OrderNo));
+                strSQLSeal.Append(" AND A.PERSONCODE = B.PERSONCODE");
+                strSQLSeal.Append(" AND C.SECCODE = B.SECCODE");
+                strSQLSeal.Append(" Order By C.SecRank ASC");
+                if (!paDB.ExecuteReader(strSQLSeal.ToString(), ref arlist)) return;
+
+                // 印刷テーブル作成
+                int[] PorsonCode = new int[4] { 0, 0, 0, 0 };
+                List<string> NameTable = new List<string>();
+                for (int i = 0; i < PorsonCode.Length; i++) NameTable.Add("");
+                string[] OrderOfPrecedenceTable = new string[4];
+
+                int PersonDataCnt = Enum.GetNames(typeof(IOMPersonInCharge.ColumnCnt)).Length;
+                // 承認データより担当者その他を取得する
+                for (int i = 0; i < arlist.Count; i++)
+                {
+                    // エクセルの枠より多い場合は処理を抜ける
+                    if (i > 3) break;
+
+                    object[] readObj = (object[])arlist[i];
+                    PersonInChargeMaster PersonRec = new PersonInChargeMaster();
+                    picDB.Reader2Struct(readObj, ref PersonRec);
+
+                    // セキュリティデータチェック
+                    int SecRank = CommonMotions.cnvInt(readObj[PersonDataCnt]);
+                    int SRank = (int)CommonDefine.SecurityRankPos.SpecialAuthority;     // 特別権限
+                    int FRank = (int)CommonDefine.SecurityRankPos.FreeAuthority;        // 統括者権限
+                    int LRank = (int)CommonDefine.SecurityRankPos.LimitedAuthority;     // 所属長権限
+
+                    // 担当者以外は役職がある
+                    if (SecRank == CommonDefine.SecurityRankList[SRank].Key
+                        || SecRank == CommonDefine.SecurityRankList[FRank].Key
+                        || SecRank == CommonDefine.SecurityRankList[LRank].Key)
+                    {
+                        // コードと名前と役職を取得する
+                        PorsonCode[i] = PersonRec.PersonCode;
+                        NameTable[i] = PersonRec.SealPrintName;
+                        // 7文字以上は文字が見えないので省略
+                        if (PersonRec.DisplayString.Length > 7)
+                        {
+                            OrderOfPrecedenceTable[i] = PersonRec.DisplayString.Substring(0, 7);
+                        }
+                        else if (PersonRec.DisplayString.Length < 1)
+                        {
+                            OrderOfPrecedenceTable[i] = "担　当";
+                        }
+                        else
+                        {
+                            OrderOfPrecedenceTable[i] = PersonRec.DisplayString;
+                        }
+                    }
+                    else
+                    {   // 担当者
+                        // コードと名前を取得する
+                        PorsonCode[3] = PersonRec.PersonCode;
+                        NameTable[3] = PersonRec.SealPrintName;
+                        OrderOfPrecedenceTable[3] = "担　当";
+                    }
+                }
+                // テーブル内に同じコードが無いか後から調べる
+                for (int i = 0; i < PorsonCode.Length - 1; i++)
+                {
+                    if (PorsonCode[i] == 0) continue;
+                    for (int ii = 0; ii < PorsonCode.Length; ii++)
+                    {
+                        if (i == ii) continue;
+                        if (PorsonCode[i] != PorsonCode[ii]) continue;
+
+                        PorsonCode[ii] = 0;
+                        NameTable[ii] = string.Empty;
+                        OrderOfPrecedenceTable[ii] = string.Empty;
+                        break;
+                    }
+                }
+
+                // 印鑑を描画する
+                OfficeShapeDefine shapedef = new OfficeShapeDefine();
+                shapedef.ShapeSheetName = s_shapeSheetName;     // 図形シート名称
+                shapedef.ShapeName = s_shapeName;               // 図形名称
+                shapedef.ShapeWidth = s_ShapeSize[0, 0];        // 図形描画サイズ Width
+                shapedef.ShapeHeight = s_ShapeSize[0, 1];       // 図形描画サイズ Height
+
+                for (int i = 0; i < 4; i++)
+                {
+                    // 
+                    if (PorsonCode[i] != 0)
+                    {
+                        shapedef.ShapeDrowPointX = s_CoverSealPoint[i, 0];          // 図形描画位置 X
+                        shapedef.ShapeDrowPointY = s_CoverSealPoint[i, 1];          // 図形描画位置 Y
+                        shapedef.DrowText = NameTable[i];                           // 描画文字列
+                        int ifontSize = NameTable[i].Length - 1;
+                        if (ifontSize > 4) ifontSize = 4;
+                        shapedef.FontSize = s_EstimateSeal1FontSize[ifontSize];     // フォントサイズ
+                        // 図形描画
+                        m_UsedExcel.ExcelCopyShape(shapedef);
+                    }
+                    // 役職を印字する(M～)
+                    int orgNumber = 11 + i;
+                    string strAlpha = CommonMotions.cnvNumberToAlphaCharacter(orgNumber);
+                    m_UsedExcel.ExcelCellSet(string.Format("{0}25", strAlpha), OrderOfPrecedenceTable[i]);
+                }
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("システムエラー：{0}：{1}", CommonMotions.GetMethodName(), ex.Message);
+            }
+            finally
+            {
+                paDB.close(); paDB = null;
+                picDB.close(); picDB = null;
+            }
+        }
+        #endregion
+
+        #region 請求書(表紙)作成
+        /// <summary>
+        /// 請求書(表紙)作成
+        /// </summary>
+        /// <returns></returns>
+        private CommonDefine.RetunAnswer PrintCover()
+        {
+            try
+            {
+                //// 請求書表紙シートの取得
+                m_UsedExcel.ExcelSheetGet(s_DicSheetName[enumSheetName.Cover]);
+
+                //// 請求書No(4行目 N列)
+                string strInvNo = (m_InvData.InvoiceNo / 1000).ToString();
+                strInvNo += "-";
+                strInvNo += (m_InvData.InvoiceNo % 1000).ToString("00");
+
+                ExcelPrintData InvNoData = new ExcelPrintData();
+                InvNoData.AddPrintData("N", 3, strInvNo).ExcelCellSet(m_UsedExcel);
+
+
+                //// ③ 請求日(5行目 M列)
+                if (m_bDatePrintFlg == true)
+                {
+                    ExcelPrintData reqDate = new ExcelPrintData();
+                    reqDate.AddPrintData("M", 4, m_DatePrintOut.ToString("yyyy/MM/dd")).ExcelCellSet(m_UsedExcel);
+                }
+                else
+                {
+                    ExcelPrintData reqDate = new ExcelPrintData();
+                    reqDate.AddPrintData("M", 4, "　　年　　月　　日").ExcelCellSet(m_UsedExcel);
+                }
+
+                //// ④ 請求先名称(9行目 C列)
+                ExcelPrintData nameData = new ExcelPrintData();
+                string str = m_InvData.RequestName + "　様";
+                nameData.AddPrintData("C", 8, str).ExcelCellSet(m_UsedExcel);
+
+                //// ⑤ 請求金額(13行目 C列)
+                ExcelPrintData priceData = new ExcelPrintData();
+                priceData.AddPrintData("C", 12, m_InvData.TotalAmount.ToString("#,0")).ExcelCellSet(m_UsedExcel);
+
+                //// ⑥ 消費税(14行目 C列)
+                ExcelPrintData taxData = new ExcelPrintData();
+                taxData.AddPrintData("C", 13, m_InvData.TaxAmount.ToString("#,0")).ExcelCellSet(m_UsedExcel);
+
+                //// 工事名(16行目 D列)
+                //                ExcelPrintData cnstnameData = new ExcelPrintData();
+                //                cnstnameData.AddPrintData("D", 15, m_lstReqHead[0].ReqConstructionName).ExcelCellSet(m_UsedExcel);
+
+                //// 会社名
+                string strCompany = CommonMotions.SystemMasterData.CompanyName1;
+                if (CommonMotions.SystemMasterData.CompanyName2 != string.Empty)
+                {
+                    strCompany += "　" + CommonMotions.SystemMasterData.CompanyName2;
+                }
+
+                // 代表者名
+                string strPresident = string.Format("{0} {1}", CommonMotions.SystemMasterData.CEOPositionName.Trim()
+                                                                , CommonMotions.SystemMasterData.CEOName.Trim());
+
+                //// 郵便番号
+                string strZip = "〒" + CommonMotions.SystemMasterData.ZipCode;
+
+                //// 住所
+                string strAddr = CommonMotions.SystemMasterData.Address1;
+                if (CommonMotions.SystemMasterData.Address2 != string.Empty)
+                {
+                    strAddr += CommonMotions.SystemMasterData.Address2;
+                }
+                if (CommonMotions.SystemMasterData.Address3 != string.Empty)
+                {
+                    strAddr += CommonMotions.SystemMasterData.Address3;
+                }
+
+                //// TEL/FAX
+
+                string strTelFax = "";
+
+                if (CommonMotions.SystemMasterData.PhoneNumber != string.Empty)
+                {
+                    strTelFax = "TEL " + CommonMotions.SystemMasterData.PhoneNumber + "(代)";
+                }
+                if (CommonMotions.SystemMasterData.FaxNumber != string.Empty)
+                {
+                    if (strTelFax.Length > 0)
+                    {
+                        strTelFax += " ";
+                    }
+                    strTelFax += "FAX " + CommonMotions.SystemMasterData.FaxNumber;
+                }
+                //// URL
+                string strUrl = CommonMotions.SystemMasterData.HomePageURL;
+
+                ExcelPrintData companyData = new ExcelPrintData();
+                companyData.AddPrintData("L", 17, strCompany);                              // 会社名(18行目 L列)           
+                companyData.AddPrintData("L", 18, strPresident);                            // 代表者名(19行目 L列)           
+                companyData.AddPrintData("L", 19, strZip);                                  // 郵便番号(20行目 L列) 
+                companyData.AddPrintData("L", 20, strAddr);                                 // 住所(21行目 L列)           
+                companyData.AddPrintData("L", 21, strTelFax);                               // TEL/FAX(22行目 L列)           
+                companyData.AddPrintData("L", 22, strUrl);                                  // URL(23行目 L列)           
+                companyData.ExcelCellSet(m_UsedExcel);
+
+                ExcelPrintData commentData = new ExcelPrintData();
+                commentData.AddPrintData("C", 17, m_InvData.Comment1);                              // コメント1(18行目 C列)           
+                commentData.AddPrintData("C", 18, m_InvData.Comment2);                              // コメント2(19行目 C列)           
+                commentData.AddPrintData("C", 19, m_InvData.Comment3);                              // コメント3(20行目 C列)           
+                commentData.AddPrintData("C", 20, m_InvData.Comment4);                              // コメント4(21行目 C列)           
+                commentData.AddPrintData("C", 21, m_InvData.Comment5);                              // コメント5(22行目 C列)           
+                commentData.ExcelCellSet(m_UsedExcel);
+
+                ConstructionBaseInfo Info = null;
+                m_dicConstructionBaseInfo.TryGetValue(m_lstReqHead[0].ReqConstructionCode, out Info);
+
+                // 印鑑描画
+                PrintCoverSeal(Info.ConstructionPersonCode);
+
+                return CommonDefine.RetunAnswer.Answer0;
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("システムエラー：{0}：{1}", CommonMotions.GetMethodName(), ex.Message);
+                return CommonDefine.RetunAnswer.Answer1;
+            }
+        }
+        #endregion
+
+        #region 請求書(一覧)作成
+        /// <summary>
+        /// 請求書(一覧)作成
+        /// </summary>
+        /// <returns></returns>
+        private CommonDefine.RetunAnswer PrintList()
+        {
+            try
+            {
+                int trow = 4;
+                ExcelPrintData ExcelPrnData = null;
+
+                //// 請求書表紙シートの取得
+                m_UsedExcel.ExcelSheetGet(s_DicSheetName[enumSheetName.List]);
+
+                List<int> lstKey = new List<int>(m_dicReqData.Keys);
+
+                foreach (int nReqNo in lstKey)
+                {
+                    List<RequestData> lstData = null;
+
+                    if (m_dicReqData.TryGetValue(nReqNo, out lstData) == false)
+                    {
+                        continue;
+                    }
+
+                    foreach (RequestData ReqData in lstData)
+                    {
+                        ConstructionBaseInfo Info = null;
+
+                        if (m_dicConstructionBaseInfo.TryGetValue(ReqData.MainConstructionCode, out Info) == false)
+                        {
+                            continue;
+                        }
+
+                        string strname = (ReqData.MainConstructionCode / 100).ToString();
+                        strname += "-";
+                        strname += (ReqData.MainConstructionCode % 100).ToString("00");
+                        strname += "\r\n";
+                        strname += ReqData.ConstructionName;
+
+                        ExcelPrnData = new ExcelPrintData();
+                        ExcelPrnData.AddPrintData("B", trow, strname);             // 工事件名
+                        ExcelPrnData.AddPrintData("C", trow, string.Format("{0}年{1}月{2}日"
+                                                                        , Info.ConstructionPeriodStart.Year
+                                                                        , Info.ConstructionPeriodStart.Month.ToString("00")
+                                                                        , Info.ConstructionPeriodStart.Day.ToString("00")));    // 工期開始
+
+                        string EndDate = string.Empty;
+                        string DateDescription = string.Empty;
+                        if (Info.RevCompleteDate != DateTime.MinValue)
+                        {   // 検査是正完了日
+                            EndDate = string.Format("{0}年{1}月{2}日"
+                                                                    , Info.RevCompleteDate.Year
+                                                                    , Info.RevCompleteDate.Month.ToString("00")
+                                                                    , Info.RevCompleteDate.Day.ToString("00"));
+                            DateDescription = "（現場是正完了日）";
+                        }
+                        else
+                        {   // 請求確認日
+                            EndDate = string.Format("{0}年{1}月{2}日"
+                                                                    , Info.BillingDate.Year
+                                                                    , Info.BillingDate.Month.ToString("00")
+                                                                    , Info.BillingDate.Day.ToString("00"));
+                            DateDescription = "（請求書確認日）";
+                        }
+                        ExcelPrnData.AddPrintData("C", trow + 1, string.Format("～ {0}", EndDate));                 // 工期終了
+                        ExcelPrnData.AddPrintData("C", trow + 2, DateDescription);                                  // 終了日説明
+
+                        long lAmount = ReqData.RequestAmount0;
+                        lAmount += ReqData.RequestAmount1;
+                        lAmount += ReqData.RequestAmount2;
+                        lAmount += ReqData.RequestAmount3;
+                        lAmount += ReqData.RequestAmount4;
+                        lAmount += ReqData.RequestAmount5;
+                        lAmount += ReqData.RequestAmount6;
+                        lAmount += ReqData.TaxAmount;
+                        lAmount += ReqData.UnpaidAmount;
+
+                        ExcelPrnData.AddPrintData("D", trow, lAmount.ToString("#,0"));                                  // 請求金額
+
+                        ExcelPrnData.AddPrintData("E", trow, ReqData.Note);                                             // 備考
+                        ExcelPrnData.ExcelCellSet(m_UsedExcel);
+
+                        trow += 3;
+
+                    }
+                }
+
+                return CommonDefine.RetunAnswer.Answer0;
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("システムエラー：{0}：{1}", CommonMotions.GetMethodName(), ex.Message);
+                return CommonDefine.RetunAnswer.Answer1;
+            }
+        }
+        #endregion
+
+        #region 請求書(内訳)作成
+        /// <summary>
+        /// 請求書(内訳)作成
+        /// </summary>
+        /// <param name="dicReqDetail"></param>
+        /// <param name="constLedger"></param>
+        /// <param name="lstConstLink"></param>
+        /// <returns></returns>
+        private CommonDefine.RetunAnswer PrintDetail(int no
+                                                    , RequestHead ReqHead
+                                                    , RequestData ReqData
+                                                    , ConstructionBaseInfo Info)
+        {
+            try
+            {
+                // 請求書内訳シートの取得
+                m_UsedExcel.ExcelSheetGet(s_DicSheetName[enumSheetName.Detail]);
+
+                ExcelPrintData ExcelPrnData = null;
+
+                // ------------------------------- 工事名 -------------------------------
+                // ① 工事件名
+                ExcelPrnData = new ExcelPrintData();
+                ExcelPrnData.AddPrintData("C", 2, ReqData.ConstructionName).ExcelCellSet(m_UsedExcel);
+
+                // ------------------------------- 請負金額 -------------------------------
+                ExcelPrnData = new ExcelPrintData();
+                ExcelPrnData.AddPrintData("A", 5, no.ToString());
+                ExcelPrnData.AddPrintData("G", 5, ReqData.ContractAmount.ToString("#,0"));
+                ExcelPrnData.ExcelCellSet(m_UsedExcel);
+
+                // ------------------------------- 前回ご請求分 -------------------------------
+                // 分割払いの場合
+                if (Info.BillingSplitFlg == (int)ConstructionBaseInfo.BillingSplitFlgDef.SplitBilling)
+                {
+                    ExcelPrnData = new ExcelPrintData();
+                    ExcelPrnData.AddPrintData("B", 7, "前回ご請求済分");
+                    ExcelPrnData.AddPrintData("C", 7, "前回請求書参照※増減補正済み");
+                    ExcelPrnData.AddPrintData("D", 7, "1");
+                    ExcelPrnData.AddPrintData("E", 7, "式");
+                    ExcelPrnData.AddPrintData("G", 7, ReqData.PaidAmount.ToString("#,0"));
+                    ExcelPrnData.ExcelCellSet(m_UsedExcel);
+                }
+
+                long lTotalAmount = 0;
+
+                // ------------------------------- 見積金額（本工事） -------------------------------
+                ExcelPrnData = new ExcelPrintData();
+                ExcelPrnData.AddPrintData("G", 9, ReqData.RequestAmount0.ToString("#,0"));
+                ExcelPrnData.ExcelCellSet(m_UsedExcel);
+
+                lTotalAmount += ReqData.RequestAmount0;
+
+                // ------------------------------- 見積金額（増減工事） -------------------------------
+                long[] lAmount = new long[] { ReqData.RequestAmount1
+                                            , ReqData.RequestAmount2
+                                            , ReqData.RequestAmount3
+                                            , ReqData.RequestAmount4
+                                            , ReqData.RequestAmount5
+                                            , ReqData.RequestAmount6 };
+                string[] strTitle = new string[] { "増減工事１"
+                                                    , "増減工事２"
+                                                    , "増減工事３"
+                                                    , "増減工事４"
+                                                    , "増減工事５"
+                                                    , "増減工事６" };
+
+                for (int i = 0; i < 6; i++)
+                {
+                    if (lAmount[i] > 0)
+                    {
+                        ExcelPrnData = new ExcelPrintData();
+                        ExcelPrnData.AddPrintData("B", 10 + i, strTitle[i]);
+                        ExcelPrnData.AddPrintData("C", 10 + i, "追加増減見積もり参照");
+                        ExcelPrnData.AddPrintData("D", 10 + i, "1");
+                        ExcelPrnData.AddPrintData("E", 10 + i, "式");
+                        ExcelPrnData.AddPrintData("G", 10 + i, lAmount[i].ToString("#,0"));
+                        ExcelPrnData.ExcelCellSet(m_UsedExcel);
+
+                        lTotalAmount += lAmount[i];
+                    }
+                }
+
+                // ------------------------------- 今回ご請求分 -------------------------------
+                ExcelPrnData = new ExcelPrintData();
+                ExcelPrnData.AddPrintData("G", 17, lTotalAmount.ToString("#,0"));
+                ExcelPrnData.ExcelCellSet(m_UsedExcel);
+
+                // ------------------------------- 請負金額残金 -------------------------------
+                // 分割払いの場合
+                if (Info.BillingSplitFlg == (int)ConstructionBaseInfo.BillingSplitFlgDef.SplitBilling)
+                {
+                    ExcelPrnData = new ExcelPrintData();
+                    ExcelPrnData.AddPrintData("B", 19, "請負金額残金");
+                    ExcelPrnData.AddPrintData("D", 19, "1");
+                    ExcelPrnData.AddPrintData("E", 19, "式");
+                    ExcelPrnData.AddPrintData("G", 19, ReqData.UnclaimedAmount.ToString("#,0"));
+                    ExcelPrnData.ExcelCellSet(m_UsedExcel);
+                }
+
+                // ------------------------------- 未入金分 -------------------------------
+                if (ReqData.UnpaidAmount > 0)
+                {
+                    ExcelPrnData = new ExcelPrintData();
+                    ExcelPrnData.AddPrintData("B", 21, "未入金分");
+                    ExcelPrnData.AddPrintData("G", 21, ReqData.UnpaidAmount.ToString("#,0"));
+                    ExcelPrnData.ExcelCellSet(m_UsedExcel);
+
+                    lTotalAmount += ReqData.UnpaidAmount;
+                }
+
+                // ------------------------------- 小計 -------------------------------
+                ExcelPrnData = new ExcelPrintData();
+                ExcelPrnData.AddPrintData("G", 23, lTotalAmount.ToString("#,0"));
+                ExcelPrnData.ExcelCellSet(m_UsedExcel);
+
+                // ------------------------------- 消費税 -------------------------------
+                ExcelPrnData = new ExcelPrintData();
+                ExcelPrnData.AddPrintData("C", 24, string.Format("{0}%", CommonMotions.SystemMasterData.ConsumptionTax));
+                ExcelPrnData.AddPrintData("G", 24, ReqData.TaxAmount.ToString("#,0"));
+                ExcelPrnData.ExcelCellSet(m_UsedExcel);
+                lTotalAmount += ReqData.TaxAmount;
+
+                // ------------------------------- 税込金額合計 -------------------------------
+                ExcelPrnData = new ExcelPrintData();
+                ExcelPrnData.AddPrintData("G", 25, lTotalAmount.ToString("#,0"));
+                ExcelPrnData.ExcelCellSet(m_UsedExcel);
+
+                return CommonDefine.RetunAnswer.Answer0;
+            }
+            catch (Exception ex)
+            {
+                logger.ErrorFormat("システムエラー：{0}：{1}", CommonMotions.GetMethodName(), ex.Message);
+                return CommonDefine.RetunAnswer.Answer1;
+            }
+
+        }
+        #endregion
+
+        #region Excelデータ出力用内部クラス定義
+        /// <summary>
+        /// Excelデータ出力用内部クラス定義
+        /// </summary>
+        private class ExcelPrintData
+        {
+            // Excelデータ保持用用ディクショナリ
+            private Dictionary<int, Dictionary<int, object>> m_DicPrintData = new Dictionary<int, Dictionary<int, object>>();
+
+            // Excelカラム名取得用
+            private static char[] s_Asc = { 'A', 'B', 'C', 'D', 'E'
+                                            , 'F', 'G', 'H', 'I', 'J'
+                                            , 'K', 'L', 'M', 'N', 'O'
+                                            , 'P', 'Q', 'R', 'S', 'T'
+                                            , 'U', 'V', 'W', 'X', 'Y'
+                                            , 'Z' };
+
+            private int m_RowMin = int.MaxValue;
+            private int m_RowMax = int.MinValue;
+            private int m_ColMin = int.MaxValue;
+            private int m_ColMax = int.MinValue;
+
+            /// <summary>
+            /// エクセルカラム名とインデックス番号のディクショナリ
+            /// </summary>
+            private static Dictionary<string, int> s_IndexOfExcelColumn = InitDicColumnIndex();
+
+            #region Excelカラムインデックスディクショナリ作成メソッド
+            /// <summary>
+            /// Excelカラムインデックスディクショナリ作成メソッド
+            /// </summary>
+            /// <returns></returns>
+            private static Dictionary<string, int> InitDicColumnIndex()
+            {
+                var result = new Dictionary<string, int>();
+
+                for (int indx = 0; indx < 256; indx++)
+                {
+                    string res = GetColumnString(indx);
+
+                    result.Add(res, indx);
+
+                }
+                return result;
+            }
+            #endregion
+
+            #region カラム英字名を取得
+            /// <summary>
+            /// カラム英字名を取得
+            /// </summary>
+            /// <param name="colIndex"></param>
+            /// <returns></returns>
+            private static string GetColumnString(int colIndex)
+            {
+                string res = "";
+
+                int court = colIndex;
+                while (court >= s_Asc.Count())
+                {
+                    res = s_Asc[court % s_Asc.Count()] + res;
+                    court = (int)Math.Truncate((double)court / (double)s_Asc.Count() - 1);
+                }
+                res = s_Asc[court % s_Asc.Count()] + res;
+
+                return res;
+            }
+            #endregion
+
+            #region データ追加
+            /// <summary>
+            /// データ追加
+            /// </summary>
+            /// <param name="colName">カラム名文字(※ "A", "B", 等...</param>
+            /// <param name="rowNo">行インデックス番号 0オリジン</param>
+            /// <param name="data">出力データオブジェクト</param>
+            /// <returns></returns>
+            public ExcelPrintData AddPrintData(string colName, int rowNo, object data)
+            {
+                return AddPrintData(s_IndexOfExcelColumn[colName], rowNo, data);
+            }
+            #endregion
+
+            #region データ追加
+            /// <summary>
+            /// データ追加
+            /// </summary>
+            /// <param name="colIndex">カラムインデックス 0オリジン</param>
+            /// <param name="rowNo">行インデックス番号 0オリジン</param>
+            /// <param name="data">出力データオブジェクト</param>
+            /// <returns></returns>
+            public ExcelPrintData AddPrintData(int colIndex, int rowNo, object data)
+            {
+                if (!m_DicPrintData.ContainsKey(rowNo))
+                    m_DicPrintData[rowNo] = new Dictionary<int, object>();
+
+                m_DicPrintData[rowNo][colIndex] = data;
+
+                if (m_RowMin > rowNo) m_RowMin = rowNo;
+                if (m_RowMax < rowNo) m_RowMax = rowNo;
+                if (m_ColMin > colIndex) m_ColMin = colIndex;
+                if (m_ColMax < colIndex) m_ColMax = colIndex;
+
+                return this;
+            }
+            #endregion
+
+            #region UsedExcelオブジェクトにデータをセットする
+            /// <summary>
+            /// UsedExcelオブジェクトにデータをセットする
+            /// </summary>
+            /// <param name="usedExcel">UsedExcelオブジェクト(シート取得済みであること)</param>
+            public void ExcelCellSet(UsedExcel usedExcel)
+            {
+                if (m_RowMin == int.MaxValue ||
+                    m_RowMax == int.MinValue ||
+                    m_ColMin == int.MaxValue ||
+                    m_ColMax == int.MinValue)
+                {
+                    return;
+                }
+
+                // オブジェクト配列を宣言
+                object[,] objCells = new object[m_RowMax - m_RowMin + 1, m_ColMax - m_ColMin + 1];
+
+                // 配列にデータを移し替える
+                foreach (int row in m_DicPrintData.Keys)
+                {
+                    foreach (int col in m_DicPrintData[row].Keys)
+                    {
+                        objCells[row - m_RowMin, col - m_ColMin] = m_DicPrintData[row][col];
+                    }
+                }
+
+                // セル名を取得
+                string startCell = GetColumnString(m_ColMin) + string.Format("{0}", m_RowMin + 1);
+                string endCell = GetColumnString(m_ColMax) + string.Format("{0}", m_RowMax + 1);
+
+                // セルにセット
+                usedExcel.ExcelCellSet(startCell, objCells, endCell);
+
+            }
+            #endregion
+        }
+        #endregion
+    }
+}
Index: branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/RequestInput/FrmRequestInput.Designer.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/RequestInput/FrmRequestInput.Designer.cs	(revision 334)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/RequestInput/FrmRequestInput.Designer.cs	(revision 335)
@@ -28,27 +28,27 @@
         /// </summary>
         private void InitializeComponent()
         {
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle22 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle23 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle24 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle25 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle26 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle27 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle28 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle29 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle30 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle31 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle32 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle33 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle34 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle35 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle36 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle37 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle38 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle39 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle40 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle41 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle42 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle8 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle9 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle10 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle11 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle12 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle13 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle14 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle15 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle16 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle17 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle18 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle19 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle20 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle21 = new System.Windows.Forms.DataGridViewCellStyle();
             this.label3 = new System.Windows.Forms.Label();
             this.dgv1 = new System.Windows.Forms.DataGridView();
             this.col001 = new System.Windows.Forms.DataGridViewTextBoxColumn();
@@ -80,7 +80,6 @@
             this.btnEnd = new System.Windows.Forms.Button();
             this.btnAdd = new System.Windows.Forms.Button();
             this.btnOtherProc = new System.Windows.Forms.Button();
-            this.lblStatus = new System.Windows.Forms.Label();
             this.button1 = new System.Windows.Forms.Button();
             this.SeparateBillingLabel = new System.Windows.Forms.Label();
             this.CombinedOrderLabel = new System.Windows.Forms.Label();
@@ -92,6 +91,7 @@
             this.txtOrderer = new System.Windows.Forms.TextBox();
             this.lblReqOrder = new System.Windows.Forms.Label();
             this.pnlNormal = new System.Windows.Forms.Panel();
+            this.lblApprovalCount = new System.Windows.Forms.Label();
             this.button2 = new System.Windows.Forms.Button();
             this.btnApproval = new System.Windows.Forms.Button();
             this.pnlApproval = new System.Windows.Forms.Panel();
@@ -98,7 +98,6 @@
             this.btnDeny = new System.Windows.Forms.Button();
             this.btnPend = new System.Windows.Forms.Button();
             this.btnAgree = new System.Windows.Forms.Button();
-            this.lblApprovalCount = new System.Windows.Forms.Label();
             ((System.ComponentModel.ISupportInitialize)(this.dgv1)).BeginInit();
             this.groupBoxEx1.SuspendLayout();
             this.pnlNormal.SuspendLayout();
@@ -191,9 +190,9 @@
             // col004
             // 
             this.col004.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
-            dataGridViewCellStyle22.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
-            dataGridViewCellStyle22.BackColor = System.Drawing.SystemColors.Control;
-            this.col004.DefaultCellStyle = dataGridViewCellStyle22;
+            dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
+            dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Control;
+            this.col004.DefaultCellStyle = dataGridViewCellStyle1;
             this.col004.Frozen = true;
             this.col004.HeaderText = "";
             this.col004.Name = "col004";
@@ -204,8 +203,8 @@
             // 
             // col005
             // 
-            dataGridViewCellStyle23.BackColor = System.Drawing.Color.White;
-            this.col005.DefaultCellStyle = dataGridViewCellStyle23;
+            dataGridViewCellStyle2.BackColor = System.Drawing.Color.White;
+            this.col005.DefaultCellStyle = dataGridViewCellStyle2;
             this.col005.Frozen = true;
             this.col005.HeaderText = "";
             this.col005.Name = "col005";
@@ -216,9 +215,9 @@
             // 
             // col006
             // 
-            dataGridViewCellStyle24.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
-            dataGridViewCellStyle24.BackColor = System.Drawing.Color.White;
-            this.col006.DefaultCellStyle = dataGridViewCellStyle24;
+            dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
+            dataGridViewCellStyle3.BackColor = System.Drawing.Color.White;
+            this.col006.DefaultCellStyle = dataGridViewCellStyle3;
             this.col006.Frozen = true;
             this.col006.HeaderText = "受注金額";
             this.col006.Name = "col006";
@@ -228,9 +227,9 @@
             // 
             // col007
             // 
-            dataGridViewCellStyle25.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
-            dataGridViewCellStyle25.BackColor = System.Drawing.SystemColors.Control;
-            this.col007.DefaultCellStyle = dataGridViewCellStyle25;
+            dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
+            dataGridViewCellStyle4.BackColor = System.Drawing.SystemColors.Control;
+            this.col007.DefaultCellStyle = dataGridViewCellStyle4;
             this.col007.Frozen = true;
             this.col007.HeaderText = "";
             this.col007.Name = "col007";
@@ -240,8 +239,8 @@
             // 
             // col008
             // 
-            dataGridViewCellStyle26.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
-            this.col008.DefaultCellStyle = dataGridViewCellStyle26;
+            dataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
+            this.col008.DefaultCellStyle = dataGridViewCellStyle5;
             this.col008.FillWeight = 120F;
             this.col008.Frozen = true;
             this.col008.HeaderText = "合計";
@@ -252,8 +251,8 @@
             // 
             // col009
             // 
-            dataGridViewCellStyle27.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
-            this.col009.DefaultCellStyle = dataGridViewCellStyle27;
+            dataGridViewCellStyle6.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
+            this.col009.DefaultCellStyle = dataGridViewCellStyle6;
             this.col009.HeaderText = "1回目";
             this.col009.Name = "col009";
             this.col009.ReadOnly = true;
@@ -262,8 +261,8 @@
             // 
             // col010
             // 
-            dataGridViewCellStyle28.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
-            this.col010.DefaultCellStyle = dataGridViewCellStyle28;
+            dataGridViewCellStyle7.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
+            this.col010.DefaultCellStyle = dataGridViewCellStyle7;
             this.col010.HeaderText = "2回目";
             this.col010.Name = "col010";
             this.col010.ReadOnly = true;
@@ -272,8 +271,8 @@
             // 
             // col011
             // 
-            dataGridViewCellStyle29.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
-            this.col011.DefaultCellStyle = dataGridViewCellStyle29;
+            dataGridViewCellStyle8.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
+            this.col011.DefaultCellStyle = dataGridViewCellStyle8;
             this.col011.HeaderText = "3回目";
             this.col011.Name = "col011";
             this.col011.ReadOnly = true;
@@ -282,8 +281,8 @@
             // 
             // col12
             // 
-            dataGridViewCellStyle30.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
-            this.col12.DefaultCellStyle = dataGridViewCellStyle30;
+            dataGridViewCellStyle9.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
+            this.col12.DefaultCellStyle = dataGridViewCellStyle9;
             this.col12.HeaderText = "4回目";
             this.col12.Name = "col12";
             this.col12.ReadOnly = true;
@@ -293,8 +292,8 @@
             // 
             // col13
             // 
-            dataGridViewCellStyle31.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
-            this.col13.DefaultCellStyle = dataGridViewCellStyle31;
+            dataGridViewCellStyle10.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
+            this.col13.DefaultCellStyle = dataGridViewCellStyle10;
             this.col13.HeaderText = "5回目";
             this.col13.Name = "col13";
             this.col13.ReadOnly = true;
@@ -304,8 +303,8 @@
             // 
             // col14
             // 
-            dataGridViewCellStyle32.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
-            this.col14.DefaultCellStyle = dataGridViewCellStyle32;
+            dataGridViewCellStyle11.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
+            this.col14.DefaultCellStyle = dataGridViewCellStyle11;
             this.col14.HeaderText = "6回目";
             this.col14.Name = "col14";
             this.col14.ReadOnly = true;
@@ -315,8 +314,8 @@
             // 
             // col15
             // 
-            dataGridViewCellStyle33.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
-            this.col15.DefaultCellStyle = dataGridViewCellStyle33;
+            dataGridViewCellStyle12.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
+            this.col15.DefaultCellStyle = dataGridViewCellStyle12;
             this.col15.HeaderText = "7回目";
             this.col15.Name = "col15";
             this.col15.ReadOnly = true;
@@ -326,8 +325,8 @@
             // 
             // col16
             // 
-            dataGridViewCellStyle34.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
-            this.col16.DefaultCellStyle = dataGridViewCellStyle34;
+            dataGridViewCellStyle13.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
+            this.col16.DefaultCellStyle = dataGridViewCellStyle13;
             this.col16.HeaderText = "8回目";
             this.col16.Name = "col16";
             this.col16.ReadOnly = true;
@@ -337,8 +336,8 @@
             // 
             // col17
             // 
-            dataGridViewCellStyle35.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
-            this.col17.DefaultCellStyle = dataGridViewCellStyle35;
+            dataGridViewCellStyle14.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
+            this.col17.DefaultCellStyle = dataGridViewCellStyle14;
             this.col17.HeaderText = "9回目";
             this.col17.Name = "col17";
             this.col17.ReadOnly = true;
@@ -348,8 +347,8 @@
             // 
             // col18
             // 
-            dataGridViewCellStyle36.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
-            this.col18.DefaultCellStyle = dataGridViewCellStyle36;
+            dataGridViewCellStyle15.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
+            this.col18.DefaultCellStyle = dataGridViewCellStyle15;
             this.col18.HeaderText = "10回目";
             this.col18.Name = "col18";
             this.col18.ReadOnly = true;
@@ -359,8 +358,8 @@
             // 
             // col19
             // 
-            dataGridViewCellStyle37.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
-            this.col19.DefaultCellStyle = dataGridViewCellStyle37;
+            dataGridViewCellStyle16.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
+            this.col19.DefaultCellStyle = dataGridViewCellStyle16;
             this.col19.HeaderText = "11回目";
             this.col19.Name = "col19";
             this.col19.ReadOnly = true;
@@ -370,8 +369,8 @@
             // 
             // col20
             // 
-            dataGridViewCellStyle38.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
-            this.col20.DefaultCellStyle = dataGridViewCellStyle38;
+            dataGridViewCellStyle17.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
+            this.col20.DefaultCellStyle = dataGridViewCellStyle17;
             this.col20.HeaderText = "12回目";
             this.col20.Name = "col20";
             this.col20.ReadOnly = true;
@@ -381,8 +380,8 @@
             // 
             // col21
             // 
-            dataGridViewCellStyle39.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
-            this.col21.DefaultCellStyle = dataGridViewCellStyle39;
+            dataGridViewCellStyle18.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
+            this.col21.DefaultCellStyle = dataGridViewCellStyle18;
             this.col21.HeaderText = "13回目";
             this.col21.Name = "col21";
             this.col21.ReadOnly = true;
@@ -392,8 +391,8 @@
             // 
             // col22
             // 
-            dataGridViewCellStyle40.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
-            this.col22.DefaultCellStyle = dataGridViewCellStyle40;
+            dataGridViewCellStyle19.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
+            this.col22.DefaultCellStyle = dataGridViewCellStyle19;
             this.col22.HeaderText = "14回目";
             this.col22.Name = "col22";
             this.col22.ReadOnly = true;
@@ -403,8 +402,8 @@
             // 
             // col23
             // 
-            dataGridViewCellStyle41.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
-            this.col23.DefaultCellStyle = dataGridViewCellStyle41;
+            dataGridViewCellStyle20.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
+            this.col23.DefaultCellStyle = dataGridViewCellStyle20;
             this.col23.HeaderText = "15回目";
             this.col23.Name = "col23";
             this.col23.ReadOnly = true;
@@ -414,8 +413,8 @@
             // 
             // col098
             // 
-            dataGridViewCellStyle42.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
-            this.col098.DefaultCellStyle = dataGridViewCellStyle42;
+            dataGridViewCellStyle21.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
+            this.col098.DefaultCellStyle = dataGridViewCellStyle21;
             this.col098.HeaderText = "残り";
             this.col098.Name = "col098";
             this.col098.ReadOnly = true;
@@ -484,18 +483,6 @@
             this.btnOtherProc.UseVisualStyleBackColor = false;
             this.btnOtherProc.Click += new System.EventHandler(this.btnOtherProc_Click);
             // 
-            // lblStatus
-            // 
-            this.lblStatus.BackColor = System.Drawing.Color.GreenYellow;
-            this.lblStatus.Font = new System.Drawing.Font("ＭＳ 明朝", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
-            this.lblStatus.Location = new System.Drawing.Point(200, 12);
-            this.lblStatus.Name = "lblStatus";
-            this.lblStatus.Size = new System.Drawing.Size(35, 16);
-            this.lblStatus.TabIndex = 1;
-            this.lblStatus.Text = "請求準備";
-            this.lblStatus.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
-            this.lblStatus.Visible = false;
-            // 
             // button1
             // 
             this.button1.Font = new System.Drawing.Font("ＭＳ 明朝", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
@@ -634,6 +621,17 @@
             this.pnlNormal.Size = new System.Drawing.Size(262, 30);
             this.pnlNormal.TabIndex = 8;
             // 
+            // lblApprovalCount
+            // 
+            this.lblApprovalCount.BackColor = System.Drawing.Color.Black;
+            this.lblApprovalCount.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
+            this.lblApprovalCount.ForeColor = System.Drawing.Color.White;
+            this.lblApprovalCount.Location = new System.Drawing.Point(205, 3);
+            this.lblApprovalCount.Name = "lblApprovalCount";
+            this.lblApprovalCount.Size = new System.Drawing.Size(50, 24);
+            this.lblApprovalCount.TabIndex = 14;
+            this.lblApprovalCount.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
+            // 
             // button2
             // 
             this.button2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
@@ -708,17 +706,6 @@
             this.btnAgree.UseVisualStyleBackColor = false;
             this.btnAgree.Click += new System.EventHandler(this.btnAgree_Click);
             // 
-            // lblApprovalCount
-            // 
-            this.lblApprovalCount.BackColor = System.Drawing.Color.Black;
-            this.lblApprovalCount.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
-            this.lblApprovalCount.ForeColor = System.Drawing.Color.White;
-            this.lblApprovalCount.Location = new System.Drawing.Point(205, 3);
-            this.lblApprovalCount.Name = "lblApprovalCount";
-            this.lblApprovalCount.Size = new System.Drawing.Size(50, 24);
-            this.lblApprovalCount.TabIndex = 14;
-            this.lblApprovalCount.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
-            // 
             // FrmRequestInput
             // 
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
@@ -728,7 +715,6 @@
             this.Controls.Add(this.SeparateBillingLabel);
             this.Controls.Add(this.groupBoxEx1);
             this.Controls.Add(this.button1);
-            this.Controls.Add(this.lblStatus);
             this.Controls.Add(this.dgv1);
             this.Controls.Add(this.btnOtherProc);
             this.Controls.Add(this.btnAdd);
@@ -764,7 +750,6 @@
         private System.Windows.Forms.Button btnEnd;
         private System.Windows.Forms.Button btnAdd;
         private System.Windows.Forms.Button btnOtherProc;
-        private System.Windows.Forms.Label lblStatus;
         private System.Windows.Forms.Label label4;
         private System.Windows.Forms.ComboBox cbReqMonth;
         private System.Windows.Forms.Label label5;
Index: branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/RequestInput/FrmRequestInput.resx
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/RequestInput/FrmRequestInput.resx	(revision 334)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/RequestInput/FrmRequestInput.resx	(revision 335)
@@ -192,79 +192,4 @@
   <metadata name="col99.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
-  <metadata name="col001.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="col002.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="col003.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="col004.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="col005.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="col006.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="col007.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="col008.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="col009.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="col010.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="col011.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="col12.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="col13.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="col14.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="col15.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="col16.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="col17.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="col18.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="col19.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="col20.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="col21.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="col22.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="col23.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="col098.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="col99.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: branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/RequestInput/FrmRequestInputAuxiliary.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/RequestInput/FrmRequestInputAuxiliary.cs	(revision 334)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/RequestInput/FrmRequestInputAuxiliary.cs	(revision 335)
@@ -3847,105 +3847,6 @@
         //}
         #endregion
 
-        #region 請求合計データ
-        /// <summary>
-        /// 請求合計データを請求合計データテーブルから請求Noをキーに取得する関数
-        /// </summary>
-        /// <param name="RequestNo">請求No</param>
-        /// <param name="data"></param>
-        /// <returns>true：成功 false：失敗</returns>
-        //private bool GetRequestTotalDatas(int RequestNo, ref List<RequestTotalData> data)
-        //{
-        //    var sbDB = new IORequestTotalData();
-        //    try
-        //    {
-        //        // 請求合計データ取得クラス領域
-        //        var wrk = new List<RequestTotalData>();
-
-        //        // 請求合計データ取得SQL
-        //        string strSQL = sbDB.CreatePrimarykeyString(RequestNo);
-
-        //        // ソート条件を追加
-        //        strSQL += " ORDER BY REQUESTNO, ORDERNO";
-
-        //        // 請求合計データ取得
-        //        if (!sbDB.SelectAction(strSQL, ref wrk)) return false;
-
-        //        foreach (var record in wrk)
-        //        {
-        //            m_DicReqTotalRec[record] = true;
-        //        }
-        //        data = wrk;
-
-        //    }
-        //    catch (Exception ex)
-        //    {
-        //        logger.ErrorFormat("システムエラー：{0}：{1}", CommonMotions.GetMethodName(), ex.Message);
-        //        return false;
-        //    }
-        //    finally
-        //    {
-        //        sbDB.close();
-        //        sbDB = null;
-        //    }
-
-        //    return true;
-
-        //}
-        #endregion
-
-        #region 請求明細データ
-        /// <summary>
-        /// 請求明細データを請求明細データテーブルから請求Noをキーに取得する関数
-        /// </summary>
-        /// <param name="RequestNo"></param>
-        /// <param name="data"></param>
-        /// <returns></returns>
-        //private bool GetRequestDataDetails(int RequestNo, ref Dictionary<int,Dictionary<int,RequestDataDetail>> datas)
-        //{
-        //    var sbDB = new IORequestDataDetail();
-        //    try
-        //    {
-        //        // 請求明細データ取得クラス領域
-        //        var wrk = new List<RequestDataDetail>();
-
-        //        // 請求明細データ取得SQL
-        //        string strSQL = sbDB.CreatePrimarykeyString(RequestNo);
-
-        //        // ソート条件を追加
-        //        strSQL += " ORDER BY REQUESTNO, ORDERNO, CONSTRUCTIONCODE";
-
-        //        // 請求明細データ取得
-        //        if (!sbDB.SelectAction(strSQL, ref wrk)) return false;
-
-        //        // 取得したデータをハッシュテーブルにセット
-        //        foreach (var detail in wrk)
-        //        {
-        //            if (!datas.ContainsKey(detail.ConstructionCode))
-        //            {
-        //                datas[detail.ConstructionCode] = new Dictionary<int, RequestDataDetail>();
-        //            }
-        //            datas[detail.ConstructionCode][detail.OrderNo] = detail;
-        //            m_DicReqDetailRec[detail] = true;
-        //        }
-
-        //    }
-        //    catch (Exception ex)
-        //    {
-        //        logger.ErrorFormat("システムエラー：{0}：{1}", CommonMotions.GetMethodName(), ex.Message);
-        //        return false;
-        //    }
-        //    finally
-        //    {
-        //        sbDB.close();
-        //        sbDB = null;
-        //    }
-
-        //    return true;
-
-        //}
-        #endregion
-
         #region 承認データ
         /// <summary>
         /// 承認データを承認データテーブルから工事番号をキーに取得する関数
Index: branches/src/ProcessManagement/ProcessManagement/ProcessManagement.csproj
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/ProcessManagement.csproj	(revision 334)
+++ branches/src/ProcessManagement/ProcessManagement/ProcessManagement.csproj	(revision 335)
@@ -654,7 +654,7 @@
     <Compile Include="Forms\DataEntry\Request\RequestPrintList\FrmReqPrintListAuxiliary.cs">
       <SubType>Form</SubType>
     </Compile>
-    <Compile Include="Forms\DataEntry\Request\RequestEntry\FrmReqEntPrtOut.cs">
+    <Compile Include="Forms\DataEntry\Request\RequestEntry\FrmRequestPrintSelPrtOut.cs">
       <SubType>Form</SubType>
     </Compile>
     <Compile Include="Forms\DataEntry\Request\RequestEntry\FrmRequestPrintSel.cs">
Index: branches/src/ProcessManagement/ProcessManagement/Properties/AssemblyInfo.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Properties/AssemblyInfo.cs	(revision 334)
+++ branches/src/ProcessManagement/ProcessManagement/Properties/AssemblyInfo.cs	(revision 335)
@@ -32,7 +32,7 @@
 // すべての値を指定するか、下のように '*' を使ってビルドおよびリビジョン番号を 
 // 既定値にすることができます:
 // [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.0.1.167")]
-[assembly: AssemblyFileVersion("1.0.1.167")]
+[assembly: AssemblyVersion("1.0.1.170")]
+[assembly: AssemblyFileVersion("1.0.1.170")]
 // Log4netを使用する
 [assembly: log4net.Config.XmlConfigurator(ConfigFile = @"log4net.config", Watch = true)]
\ No newline at end of file
