プロジェクト

全般

プロフィール

リビジョン 293

堀内約7年前に追加

旧セキュリティ区分判定削除
画面起動時のプライマリ画面ハンドル管理エリアクリア追加
請求まとめ実装中
注文書一覧作成・印刷フラグ判定修正
台帳対象カラム位置算出修正

差分を表示:

branches/src/ProcessManagement/ProcessManagement/Common/CommonDefine.cs
824 824
        public enum SalaryDevision
825 825
        {
826 826
            /// <summary>
827
            /// 全日振分
827
            /// 0:全日振分
828 828
            /// </summary>
829 829
            All = 0,
830 830
            /// <summary>
831
            /// 振分無
831
            /// 1:振分無
832 832
            /// </summary>
833 833
            Noting,
834 834
            /// <summary>
835
            /// 日数入力
835
            /// 2:日数入力
836 836
            /// </summary>
837 837
            DaysInput,
838 838
        }
branches/src/ProcessManagement/ProcessManagement/Common/CommonVersion.cs
14 14
        /// <summary>
15 15
        /// 本体バージョン
16 16
        /// </summary>
17
        public static int s_SystemVersion = 102;
17
        public static int s_SystemVersion = 103;
18 18

  
19 19
        /// <summary>
20 20
        /// コピー・環境バージョン
branches/src/ProcessManagement/ProcessManagement/Common/Process/ClsApprovalPermission.cs
447 447
                bool bApproval = false;
448 448

  
449 449
                // 承認データを取得する(申請データを除く)
450
                string strSQL = "SELECT A.DISPLAYORDER, A.APPROVALPERSON, A.APPROVALAUTHORITY, B.SEQNO, B.APPROVALSTATUS";
451
                strSQL += " FROM APPROVALMASTER A";
452
                strSQL += " LEFT JOIN PERSONAPPROVAL B ON B.PERSONCODEAPPROVAL = A.APPROVALPERSON AND B.APPROVALCODE = A.APPROVALCODE";
453
                strSQL += string.Format(" AND DATE(B.ORDERDATE) = STR_TO_DATE('{0}','%Y/%m/%d')", OrderDate.ToShortDateString());
454
                strSQL += string.Format(" AND B.ORDERNO = {0} AND B.SEQNO != {1}", OrderNo, s_PrimartyRecord);
455
                strSQL += string.Format(" WHERE A.APPROVALCODE = {0}", ApprovalCode);
456
                strSQL += " AND A.DEPARTMENTCODE = (SELECT C.DEPARTMENTCODE FROM PERSONINCHARGEMASTER C";
457
                strSQL += string.Format(" WHERE C.PERSONCODE = {0})", PersonCode);
458
                strSQL += " ORDER BY A.DISPLAYORDER";
450
                StringBuilder strSQL = new StringBuilder();
451
                strSQL.Append("SELECT");
452
                strSQL.Append(" A.DISPLAYORDER");
453
                strSQL.Append(", A.APPROVALPERSON");
454
                strSQL.Append(", A.APPROVALAUTHORITY");
455
                strSQL.Append(", B.SEQNO");
456
                strSQL.Append(", B.APPROVALSTATUS");
457
                strSQL.Append(" FROM APPROVALMASTER A");
458
                strSQL.Append(" LEFT JOIN PERSONAPPROVAL B");
459
                strSQL.Append(" ON B.PERSONCODEAPPROVAL = A.APPROVALPERSON");
460
                strSQL.Append(" AND B.APPROVALCODE = A.APPROVALCODE");
461
                strSQL.AppendFormat(" AND DATE(B.ORDERDATE) = STR_TO_DATE('{0}','%Y/%m/%d')", OrderDate.ToShortDateString());
462
                strSQL.AppendFormat(" AND B.ORDERNO = {0} AND B.SEQNO != {1}", OrderNo, s_PrimartyRecord);
463
                strSQL.AppendFormat(" WHERE A.APPROVALCODE = {0}", ApprovalCode);
464
                strSQL.Append(" AND A.DEPARTMENTCODE = ");
465
                strSQL.Append(" (SELECT C.DEPARTMENTCODE");
466
                strSQL.Append(" FROM PERSONINCHARGEMASTER C");
467
                strSQL.AppendFormat(" WHERE C.PERSONCODE = {0})", PersonCode);
468
                strSQL.Append(" ORDER BY A.DISPLAYORDER");
459 469

  
460 470
                ArrayList DataList = new ArrayList();
461
                if (!ApprDB.ExecuteReader(strSQL, ref DataList)) return false;
471
                if (!ApprDB.ExecuteReader(strSQL.ToString(), ref DataList)) return false;
462 472
                if (DataList.Count == 0) return false;
463 473

  
464 474
                int NoCnt = DataList.Count;
branches/src/ProcessManagement/ProcessManagement/Common/Process/ClsChangeLedgerData.cs
75 75
                LedgerDetailDB.connect();
76 76
                LedgerExcuteDB.connect(); LedgerExcuteDB.beginTran();
77 77

  
78
                // 詳細台帳よりグリッドのカラムを取得する
79
                GetLedgerColumnCount();
80

  
81 78
                // 対象をまず削除する(対象月で削除する)
82 79
                string strDelSQL = "DELETE FROM CONSTRUCTIONLEDGEREXCUTE";
83 80
                strDelSQL += " WHERE CONSTRUCTIONCODE IN";
......
333 330
                // 現在の処理年月をDateTime型に変換する
334 331
                DateTime NowDates = CommonMotions.cnvDate(TargetMonth + "/01");
335 332

  
336
                // 経過月数を取得する
337
                //TimeSpan ts = NowDates - LedgerRec.ConstructionStart;
338
                //int DiffMonth = ts.GetTimeSpanMonths();
339
                int DiffMonth = (LedgerRec.ConstructionStart.Month + (LedgerRec.ConstructionStart.Year - NowDates.Year) * 12) - NowDates.Month;
333
                // 経過月数より列番号取得する
334
                ColCnt = CalcTargetMonthToColumn(LedgerRec.ConstructionStart, NowDates);
340 335

  
341
                // 列番号取得
342
                ColCnt = m_LedgerColumnCount + DiffMonth;
343

  
344 336
                // 工事詳細台帳明細データ読込み
345 337
                string strSQL = LedgerDetailDB.CreatePrimarykeyString(ConstructionCode, GroupNo);
346 338
                List<ConstructionLedgerDetail> DetailList = new List<ConstructionLedgerDetail>();
......
801 793
        /// <returns></returns>
802 794
        public static int CalcTargetMonthToColumn(DateTime StartDate, DateTime TargetMonth)
803 795
        {
804
            int Columncnt = Enum.GetNames(typeof(FrmConstructionLedger.GridColumn)).Length - 1;
796
            int Columncnt = Enum.GetNames(typeof(FrmConstructionLedger.GridColumn)).Length;
805 797
            try
806 798
            {
807 799
                // 処理対象年月日を対象月月初日に変換する
......
811 803
                DateTime StartMonth = DateTimeUtil.BeginOfMonth(StartDate);
812 804

  
813 805
                // 経過月数を取得する
814
                //TimeSpan ts = NowDates - StartDate;
815
                //int DiffMonth = ts.GetTimeSpanMonths();
816 806
                int DiffMonth = (TargetMonth.Month + (TargetMonth.Year - StartDate.Year) * 12) - StartDate.Month;
817 807

  
818 808
                // 列番号取得
branches/src/ProcessManagement/ProcessManagement/Common/Process/ClsExcute.cs
984 984
        {
985 985
            // 工事基本入力
986 986
            FrmConstructionBaseInfo frm = new FrmConstructionBaseInfo();
987
            // 自分のハンドルをリストへセットする
988
            int ProcessNo = (int)ClsExcute.ProcessExecuteNo.ConstructionBaseInfo;
987 989
            try
988 990
            {
989
                // 自分のハンドルをリストへセットする
990
                int ProcessNo = (int)ClsExcute.ProcessExecuteNo.ConstructionBaseInfo;
991 991
                ClsExcute.SubFormHandleList[ProcessNo].ProcessNo = ProcessNo;
992 992
                ClsExcute.SubFormHandleList[ProcessNo].SubFormHandle = (Form)frm;
993 993

  
......
1013 1013
            finally
1014 1014
            {
1015 1015
                frm.Dispose(); frm = null;
1016
                ClsExcute.SubFormHandleList[ProcessNo].ProcessNo = (int)ClsExcute.ProcessExecuteNo.MainMenu;
1017
                ClsExcute.SubFormHandleList[ProcessNo].SubFormHandle = null;
1016 1018
            }
1017 1019
        }
1018 1020
        #endregion
......
1026 1028
        {
1027 1029
            // 積算見積書入力
1028 1030
            FrmEstimateInput frm = new FrmEstimateInput();
1031
            int ProcessNo = (int)ClsExcute.ProcessExecuteNo.EstimateInput;
1029 1032
            try
1030 1033
            {
1031 1034
                // 自分のハンドルをリストへセットする
1032
                int ProcessNo = (int)ClsExcute.ProcessExecuteNo.EstimateInput;
1033 1035
                ClsExcute.SubFormHandleList[ProcessNo].ProcessNo = ProcessNo;
1034 1036
                ClsExcute.SubFormHandleList[ProcessNo].SubFormHandle = (Form)frm;
1035 1037

  
......
1052 1054
            finally
1053 1055
            {
1054 1056
                frm.Dispose(); frm = null;
1057
                ClsExcute.SubFormHandleList[ProcessNo].ProcessNo = (int)ClsExcute.ProcessExecuteNo.MainMenu;
1058
                ClsExcute.SubFormHandleList[ProcessNo].SubFormHandle = null;
1055 1059
            }
1056 1060
        }
1057 1061
        #endregion
......
1065 1069
        {
1066 1070
            // 積算見積印刷
1067 1071
            FrmEstimatePrint frm = new FrmEstimatePrint();
1072
            int ProcessNo = (int)ClsExcute.ProcessExecuteNo.EstimatePrint;
1068 1073
            try
1069 1074
            {
1070 1075
                // 自分のハンドルをリストへセットする
1071
                int ProcessNo = (int)ClsExcute.ProcessExecuteNo.EstimatePrint;
1072 1076
                ClsExcute.SubFormHandleList[ProcessNo].ProcessNo = ProcessNo;
1073 1077
                ClsExcute.SubFormHandleList[ProcessNo].SubFormHandle = (Form)frm;
1074 1078

  
......
1092 1096
            finally
1093 1097
            {
1094 1098
                frm.Dispose(); frm = null;
1099
                ClsExcute.SubFormHandleList[ProcessNo].ProcessNo = (int)ClsExcute.ProcessExecuteNo.MainMenu;
1100
                ClsExcute.SubFormHandleList[ProcessNo].SubFormHandle = null;
1095 1101
            }
1096 1102
        }
1097 1103
        #endregion
......
1144 1150
        {
1145 1151
            // 工事予算書入力
1146 1152
            FrmConstructionBudget frm = new FrmConstructionBudget();
1153
            int ProcessNo = (int)ClsExcute.ProcessExecuteNo.ConstructionBudget;
1147 1154
            try
1148 1155
            {
1149 1156
                // 自分のハンドルをリストへセットする
1150
                int ProcessNo = (int)ClsExcute.ProcessExecuteNo.ConstructionBudget;
1151 1157
                ClsExcute.SubFormHandleList[ProcessNo].ProcessNo = ProcessNo;
1152 1158
                ClsExcute.SubFormHandleList[ProcessNo].SubFormHandle = (Form)frm;
1153 1159

  
......
1170 1176
            finally
1171 1177
            {
1172 1178
                frm.Dispose(); frm = null;
1179
                ClsExcute.SubFormHandleList[ProcessNo].ProcessNo = (int)ClsExcute.ProcessExecuteNo.MainMenu;
1180
                ClsExcute.SubFormHandleList[ProcessNo].SubFormHandle = null;
1173 1181
            }
1174 1182
        }
1175 1183
        #endregion
......
1183 1191
        {
1184 1192
            // 注文書入力
1185 1193
            FrmPurchaseOrderEntry frm = new FrmPurchaseOrderEntry();
1194
            int ProcessNo = (int)ClsExcute.ProcessExecuteNo.PurchaseOrderEntry;
1186 1195
            try
1187 1196
            {
1188 1197
                // 自分のハンドルをリストへセットする
1189
                int ProcessNo = (int)ClsExcute.ProcessExecuteNo.PurchaseOrderEntry;
1190 1198
                ClsExcute.SubFormHandleList[ProcessNo].ProcessNo = ProcessNo;
1191 1199
                ClsExcute.SubFormHandleList[ProcessNo].SubFormHandle = (Form)frm;
1192 1200

  
......
1226 1234
            finally
1227 1235
            {
1228 1236
                frm.Dispose(); frm = null;
1237
                ClsExcute.SubFormHandleList[ProcessNo].ProcessNo = (int)ClsExcute.ProcessExecuteNo.MainMenu;
1238
                ClsExcute.SubFormHandleList[ProcessNo].SubFormHandle = null;
1229 1239
            }
1230 1240
        }
1231 1241
        #endregion
......
1239 1249
        {
1240 1250
            // 注文書入力
1241 1251
            FrmPurchaseOrderPrint frm = new FrmPurchaseOrderPrint();
1252
            int ProcessNo = (int)ClsExcute.ProcessExecuteNo.PurchaseOrderPrint;
1242 1253
            try
1243 1254
            {
1244 1255
                // 自分のハンドルをリストへセットする
1245
                int ProcessNo = (int)ClsExcute.ProcessExecuteNo.PurchaseOrderPrint;
1246 1256
                ClsExcute.SubFormHandleList[ProcessNo].ProcessNo = ProcessNo;
1247 1257
                ClsExcute.SubFormHandleList[ProcessNo].SubFormHandle = (Form)frm;
1248 1258

  
......
1267 1277
            finally
1268 1278
            {
1269 1279
                frm.Dispose(); frm = null;
1280
                ClsExcute.SubFormHandleList[ProcessNo].ProcessNo = (int)ClsExcute.ProcessExecuteNo.MainMenu;
1281
                ClsExcute.SubFormHandleList[ProcessNo].SubFormHandle = null;
1270 1282
            }
1271 1283
        }
1272 1284
        #endregion
......
1394 1406
        {
1395 1407
            // 工事詳細台帳
1396 1408
            FrmConstructionLedger frm = new FrmConstructionLedger();
1409
            int ProcessNo = (int)ClsExcute.ProcessExecuteNo.ConstructionLedger;
1397 1410
            try
1398 1411
            {
1399 1412
                // 自分のハンドルをリストへセットする
1400
                int ProcessNo = (int)ClsExcute.ProcessExecuteNo.ConstructionLedger;
1401 1413
                ClsExcute.SubFormHandleList[ProcessNo].ProcessNo = ProcessNo;
1402 1414
                ClsExcute.SubFormHandleList[ProcessNo].SubFormHandle = (Form)frm;
1403 1415

  
......
1424 1436
            finally
1425 1437
            {
1426 1438
                frm.Dispose(); frm = null;
1439
                ClsExcute.SubFormHandleList[ProcessNo].ProcessNo = (int)ClsExcute.ProcessExecuteNo.MainMenu;
1440
                ClsExcute.SubFormHandleList[ProcessNo].SubFormHandle = null;
1427 1441
            }
1428 1442
        }
1429 1443
        #endregion
......
1437 1451
        {
1438 1452
            // 交通費及び購入品入力
1439 1453
            FrmTAndPCosts frm = new FrmTAndPCosts();
1454
            int ProcessNo = (int)ClsExcute.ProcessExecuteNo.TAndPCosts;
1440 1455
            try
1441 1456
            {
1442 1457
                // 自分のハンドルをリストへセットする
1443
                int ProcessNo = (int)ClsExcute.ProcessExecuteNo.TAndPCosts;
1444 1458
                ClsExcute.SubFormHandleList[ProcessNo].ProcessNo = ProcessNo;
1445 1459
                ClsExcute.SubFormHandleList[ProcessNo].SubFormHandle = (Form)frm;
1446 1460

  
......
1468 1482
            finally
1469 1483
            {
1470 1484
                frm.Dispose(); frm = null;
1485
                ClsExcute.SubFormHandleList[ProcessNo].ProcessNo = (int)ClsExcute.ProcessExecuteNo.MainMenu;
1486
                ClsExcute.SubFormHandleList[ProcessNo].SubFormHandle = null;
1471 1487
            }
1472 1488
        }
1473 1489
        #endregion
......
1528 1544
        {
1529 1545
            // 工事日報入力
1530 1546
            FrmDRConstruction frm = new FrmDRConstruction();
1547
            int ProcessNo = (int)ClsExcute.ProcessExecuteNo.DRConstruction;
1531 1548
            try
1532 1549
            {
1533 1550
                // 自分のハンドルをリストへセットする
1534
                int ProcessNo = (int)ClsExcute.ProcessExecuteNo.DRConstruction;
1535 1551
                ClsExcute.SubFormHandleList[ProcessNo].ProcessNo = ProcessNo;
1536 1552
                ClsExcute.SubFormHandleList[ProcessNo].SubFormHandle = (Form)frm;
1537 1553

  
......
1561 1577
            finally
1562 1578
            {
1563 1579
                frm.Dispose(); frm = null;
1580
                ClsExcute.SubFormHandleList[ProcessNo].ProcessNo = (int)ClsExcute.ProcessExecuteNo.MainMenu;
1581
                ClsExcute.SubFormHandleList[ProcessNo].SubFormHandle = null;
1564 1582
            }
1565 1583
        }
1566 1584
        #endregion
......
1574 1592
        {
1575 1593
            // 議事録入力
1576 1594
            FrmProceedings frm = new FrmProceedings();
1595
            int ProcessNo = (int)ClsExcute.ProcessExecuteNo.Proceedings;
1577 1596
            try
1578 1597
            {
1579 1598
                // 自分のハンドルをリストへセットする
1580
                int ProcessNo = (int)ClsExcute.ProcessExecuteNo.Proceedings;
1581 1599
                ClsExcute.SubFormHandleList[ProcessNo].ProcessNo = ProcessNo;
1582 1600
                ClsExcute.SubFormHandleList[ProcessNo].SubFormHandle = (Form)frm;
1583 1601

  
......
1607 1625
            finally
1608 1626
            {
1609 1627
                frm.Dispose(); frm = null;
1628
                ClsExcute.SubFormHandleList[ProcessNo].ProcessNo = (int)ClsExcute.ProcessExecuteNo.MainMenu;
1629
                ClsExcute.SubFormHandleList[ProcessNo].SubFormHandle = null;
1610 1630
            }
1611 1631
        }
1612 1632
        #endregion
......
1825 1845
        {
1826 1846
            // 出勤管理入力
1827 1847
            FrmDRWork frm = new FrmDRWork();
1848
            int ProcessNo = (int)ClsExcute.ProcessExecuteNo.DRWork;
1828 1849
            try
1829 1850
            {
1830 1851
                // 自分のハンドルをリストへセットする
1831
                int ProcessNo = (int)ClsExcute.ProcessExecuteNo.DRWork;
1832 1852
                ClsExcute.SubFormHandleList[ProcessNo].ProcessNo = ProcessNo;
1833 1853
                ClsExcute.SubFormHandleList[ProcessNo].SubFormHandle = (Form)frm;
1834 1854

  
......
1859 1879
            finally
1860 1880
            {
1861 1881
                frm.Dispose(); frm = null;
1882
                ClsExcute.SubFormHandleList[ProcessNo].ProcessNo = (int)ClsExcute.ProcessExecuteNo.MainMenu;
1883
                ClsExcute.SubFormHandleList[ProcessNo].SubFormHandle = null;
1862 1884
            }
1863 1885
        }
1864 1886
        #endregion
......
2128 2150

  
2129 2151
                if (EditFlg == (int)CommonDefine.ProcessDataEdit.Reference) frm.EditLock = true;
2130 2152

  
2131
                // パラメータセット
2153
                // ----- パラメータセット
2154
                // 手間・業者区分
2132 2155
                frm.Labourkind = CurrentPara.IntExecParameter[0];
2156
                // メニュー起動フラグ
2157
                if (CurrentPara.BoolExecParameter.Count > 0) frm.FirstFlg = CurrentPara.BoolExecParameter[0];
2158
                // 承認一覧画面よりのパラメタ対象月
2159
                if (CurrentPara.DateExecParameter.Count > 0) frm.ParaTargetDate = CommonMotions.cnvInt(CurrentPara.DateExecParameter[0].ToString("yyyyMM"));
2160
                // 支払担当者コード
2161
                if (CurrentPara.IntExecParameter.Count > 1) frm.PaymentPersonCode = CurrentPara.IntExecParameter[1];
2133 2162

  
2134 2163
                // フォーム表示
2135 2164
                frm.ShowDialog();
......
2152 2181
        /// <returns></returns>
2153 2182
        public static void ProcessExecuteNo_RequestInput(ProcessParameter CurrentPara)
2154 2183
        {
2155

  
2156 2184
            // 請求入力画面
2157 2185
            FrmRequestInput frm = new FrmRequestInput();
2158

  
2186
            int ProcessNo = (int)ClsExcute.ProcessExecuteNo.RequestInput;
2159 2187
            try
2160 2188
            {
2161 2189
                // 自分のハンドルをリストへセットする
2162
                int ProcessNo = (int)ClsExcute.ProcessExecuteNo.RequestInput;
2163 2190
                ClsExcute.SubFormHandleList[ProcessNo].ProcessNo = ProcessNo;
2164 2191
                ClsExcute.SubFormHandleList[ProcessNo].SubFormHandle = (Form)frm;
2165 2192

  
......
2188 2215
            finally
2189 2216
            {
2190 2217
                frm.Dispose(); frm = null;
2218
                ClsExcute.SubFormHandleList[ProcessNo].ProcessNo = (int)ClsExcute.ProcessExecuteNo.MainMenu;
2219
                ClsExcute.SubFormHandleList[ProcessNo].SubFormHandle = null;
2191 2220
            }
2192 2221
        }
2193 2222
        #endregion
branches/src/ProcessManagement/ProcessManagement/DataModel/PaymentDataDetail.cs
8 8
{
9 9
    public class PaymentDataDetail
10 10
    {
11
        #region 定数
12
        public enum ApprovalEndFlgDef
13
        {
14
            /// <summary>
15
            /// 0:承認未定
16
            /// </summary>
17
            UnKown = 0,
18
            /// <summary>
19
            /// 1:承認
20
            /// </summary>
21
            Approval,
22
        }
23
        #endregion
24

  
11 25
        #region メンバ変数
12 26
        private int         m_CompanyCode = 0;              // 協力会社コード
13 27
        private int         m_TargetDate = 0;               // 対象年月     
branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ApprovalPerson/FrmAppManAux.cs
22 22
using ProcessManagement.Forms.SubForms;
23 23
using ProcessManagement.Forms.ControlsAction;
24 24
using ProcessManagement.Forms.CustomControls;
25
using ProcessManagement.DB.MySql;
25 26

  
26 27
namespace ProcessManagement.Forms.DataEntry
27 28
{
......
50 51
                        break;
51 52
                    case (int)ClsExcute.ApprovalListNo.FeePayment:
52 53
                        // 11:手間支払
53
                        break;
54 54
                    case (int)ClsExcute.ApprovalListNo.SubConstrPayment:
55 55
                        // 12:業者支払
56 56
                        break;
......
570 570
            }
571 571
        }
572 572
        #endregion
573

  
574
        #region 承認処理フラグ
575
        /// <summary>
576
        /// 承認処理フラグ
577
        /// </summary>
578
        private enum AppStatusDef
579
        {
580
            /// <summary>
581
            /// 0:無処理
582
            /// </summary>
583
            NonStatus = 0,
584
            /// <summary>
585
            /// 1:申請
586
            /// </summary>
587
            Pettion,
588
            /// <summary>
589
            /// 2:最終承認
590
            /// </summary>
591
            Approval,
592
            /// <summary>
593
            /// 3:不承認・保留・取消
594
            /// </summary>
595
            NoApproval,
596
        }
597
        #endregion
598

  
599
        #region 支払承認データ作成
600
        /// <summary>
601
        /// 支払承認データ作成
602
        /// </summary>
603
        /// <returns></returns>
604
        private bool CreatePaymentApprovalInfo(int nAppStat)
605
        {
606
            IOPaymentApprovalInfo PayAppInfoDB = new IOPaymentApprovalInfo();
607
            IOPaymentDataDetail PayDetailDB = new IOPaymentDataDetail();
608
            try
609
            {
610
                DataGridView dgv = dgvEntryData;
611
                int nTergetRowCnt = -1;
612
                // 承認順序取得
613
                for (int i = 0; i < dgv.RowCount; i++)
614
                {
615
                    int nPersonCode = CommonMotions.cnvInt(dgv.Rows[i].Cells[(int)DispGridColumn.ApprovalCode].Value);
616
                    if (nPersonCode == CommonMotions.LoginUserData.PersonCode)
617
                    {
618
                        nTergetRowCnt = i;
619
                        break;
620
                    }
621
                }
622
                if (nTergetRowCnt < 0) return false;
623

  
624
                bool bSuccess = true;
625
                ArrayList arData = null;
626
                if (m_ArrayParam.Count > 0)
627
                {   // 請求まとめ画面よりの起動はパラメータセット
628
                    arData = m_ArrayParam[0];
629
                }
630
                else
631
                {   // 承認時はメニューの起動はデータを作る
632
                    arData = new ArrayList();
633
                    SearchPayAppInfo(PayAppInfoDB, ref arData);
634
                }
635

  
636
                PayAppInfoDB.connect(); PayAppInfoDB.beginTran();
637
                PayDetailDB.connect(); PayDetailDB.beginTran();
638

  
639
                for (int i = 0; i < arData.Count; i++)
640
                {
641
                    PaymentApprovalInfo PaIWork = (PaymentApprovalInfo)arData[i];
642

  
643
                    // キー項目のどれかが0のデータは対象外
644
                    if (PaIWork.CompanyCode == 0 || PaIWork.TargetDate == 0
645
                        || PaIWork.SeqNo == 0 || PaIWork.LineCount == 0) continue;
646

  
647
                    switch (nAppStat)
648
                    {
649
                        case (int)AppStatusDef.Pettion:
650
                            // 1:申請
651
                            // 支払承認情報データ作成
652
                            if (!PaymentApprovalInfoCreate(PayAppInfoDB, PaIWork, nTergetRowCnt))
653
                            {
654
                                bSuccess = false;
655
                                break;
656
                            }
657
                            // 支払明細データ更新
658
                            if (!PaymentDataDetailUpdate(PayDetailDB, PaIWork, nAppStat))
659
                            {
660
                                bSuccess = false;
661
                                break;
662
                            }
663
                            break;
664
                        case (int)AppStatusDef.Approval:
665
                            // 2:最終承認
666
                            // 支払承認情報データ作成
667
                            if (!PaymentApprovalInfoCreate(PayAppInfoDB, PaIWork, nTergetRowCnt))
668
                            {
669
                                bSuccess = false;
670
                                break;
671
                            }
672
                            // 支払明細データ更新
673
                            if (!PaymentDataDetailUpdate(PayDetailDB, PaIWork, nAppStat))
674
                            {
675
                                bSuccess = false;
676
                                break;
677
                            }
678
                            break;
679
                        case (int)AppStatusDef.NoApproval:
680
                            // 3:不承認・保留・取消
681
                            // 支払承認情報データ削除
682
                            if (PaymentApprovalInfoRemove(PayAppInfoDB, PaIWork))
683
                            {
684
                                bSuccess = false;
685
                                break;
686
                            }
687
                            break;
688
                        default:
689
                            // 0:無処理・その他
690
                            if (!PaymentApprovalInfoCreate(PayAppInfoDB, PaIWork, nTergetRowCnt))
691
                            {
692
                                bSuccess = false;
693
                                break;
694
                            }
695
                            break;
696
                    }
697
                }
698

  
699
                if (!bSuccess)
700
                {
701
                    PayAppInfoDB.rollback();
702
                    PayDetailDB.rollback();
703
                }
704

  
705
                PayAppInfoDB.commit();
706
                PayDetailDB.commit();
707

  
708
                return bSuccess;
709
            }
710
            catch (System.Exception ex)
711
            {
712
                logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message);
713
                return false;
714
            }
715
            finally
716
            {
717
                PayAppInfoDB.close(); PayAppInfoDB = null;
718
                PayDetailDB.close(); PayDetailDB = null;
719
            }
720
        }
721
        #endregion
722

  
723
        #region 支払承認情報データ作成
724
        /// <summary>
725
        /// 支払承認情報データ作成
726
        /// </summary>
727
        /// <returns></returns>
728
        private bool PaymentApprovalInfoCreate(IOPaymentApprovalInfo PayAppInfoDB
729
                                                , PaymentApprovalInfo DataRec
730
                                                , int nTergetRowCnt)
731
        {
732
            try
733
            {
734
                DataGridView dgv = dgvEntryData;
735

  
736
                // DBデータ存在確認チェック
737
                StringBuilder strSQL = new StringBuilder();
738
                strSQL.Append(PayAppInfoDB.CreatePrimarykeyString(DataRec.CompanyCode
739
                                                                    , DataRec.TargetDate
740
                                                                    , DataRec.SeqNo
741
                                                                    , DataRec.LineCount
742
                                                                    , nTergetRowCnt));
743
                List<PaymentApprovalInfo> PayAppInfoList = new List<PaymentApprovalInfo>();
744
                if (!PayAppInfoDB.SelectAction(strSQL.ToString(), ref PayAppInfoList, false)) return false;
745

  
746
                // 存在すれば処理しない
747
                if (PayAppInfoList.Count > 0) return true;
748

  
749
                // 存在しなければ追加
750
                int PersonCode = CommonMotions.cnvInt(dgv.Rows[nTergetRowCnt].Cells[(int)DispGridColumn.ApprovalCode].Value);
751
                string PersonName = CommonMotions.cnvString(dgv.Rows[nTergetRowCnt].Cells[(int)DispGridColumn.ApprovalName].Value);
752
                int Authority = CommonMotions.cnvInt(dgv.Rows[nTergetRowCnt].Cells[(int)DispGridColumn.ApprovalAuthority].Value);
753

  
754
                DataRec.ApprovalNo = nTergetRowCnt;         // 承認順序
755
                DataRec.ApprovalPerson = PersonCode;        // 承認者番号
756
                DataRec.ApprovalPersonName = PersonName;    // 承認者名
757
                DataRec.ApprovalAuthority = Authority;      // 承認権限
758
                DataRec.ApprovalDate = DateTime.Now.Date;   // 承認日付
759

  
760
                if (!PayAppInfoDB.InsertAction(DataRec, false)) return false;
761

  
762
                return true;
763
            }
764
            catch (System.Exception ex)
765
            {
766
                logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message);
767
                return false;
768
            }
769
        }
770
        #endregion
771

  
772
        #region 最終承認時:支払明細データ更新
773
        /// <summary>
774
        /// 最終承認時:支払明細データ更新
775
        /// </summary>
776
        /// <returns></returns>
777
        private bool PaymentDataDetailUpdate(IOPaymentDataDetail PayDetailDB, PaymentApprovalInfo PaIWork, int nAppStat)
778
        {
779
            try
780
            {
781
                StringBuilder strActionSQL = new StringBuilder();
782
                // 支払明細データ更新
783
                switch (nAppStat)
784
                {
785
                    case (int)AppStatusDef.Pettion:
786
                        // 申請時
787
                        strActionSQL.AppendFormat(" APPROVALPERSONCODE = {0}", CommonMotions.LoginUserData.PersonCode);
788
                        strActionSQL.AppendFormat(", APPROVALDATE = STR_TO_DATE('{0}','%Y/%m/%d')", DateTime.Now.ToShortDateString());
789
                        break;
790
                    case (int)AppStatusDef.Approval:
791
                        // 承認時
792
                        strActionSQL.AppendFormat(" APPROVALENDFLG = {0}", (int)PaymentDataDetail.ApprovalEndFlgDef.Approval);
793
                        break;
794
                    case (int)AppStatusDef.NoApproval:
795
                        // 保留等取消し時
796
                        strActionSQL.AppendFormat(" APPROVALENDFLG = {0}", (int)PaymentDataDetail.ApprovalEndFlgDef.UnKown);
797
                        break;
798
                    default:
799
                        // その他
800
                        strActionSQL.Clear();
801
                        break;
802
                }
803
                if (strActionSQL.ToString().Length < 1) return true;
804

  
805
                StringBuilder strSQL = new StringBuilder();
806
                strSQL.Append("UPDATE paymentdatadetail SET");
807
                strSQL.Append(strActionSQL.ToString());
808
                strSQL.Append(PayDetailDB.CreatePrimarykeyString(PaIWork.CompanyCode, PaIWork.TargetDate, PaIWork.SeqNo, PaIWork.LineCount));
809

  
810
                if (!PayDetailDB.ExecuteNonQuery(strSQL.ToString(), false)) return false;
811

  
812
                return true;
813
            }
814
            catch (System.Exception ex)
815
            {
816
                logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message);
817
                return false;
818
            }
819
        }
820
        #endregion
821

  
822
        #region 支払承認情報データ削除
823
        /// <summary>
824
        /// 支払承認情報データ削除
825
        /// </summary>
826
        /// <returns></returns>
827
        private bool PaymentApprovalInfoRemove(IOPaymentApprovalInfo PayAppDB, PaymentApprovalInfo PaIWork)
828
        {
829
            try
830
            {
831
                StringBuilder strDel = new StringBuilder();
832
                strDel.Append(PayAppDB.CreatePrimarykeyString(PaIWork.CompanyCode,
833
                                            PaIWork.TargetDate,
834
                                            PaIWork.SeqNo,
835
                                            PaIWork.LineCount,
836
                                            PaIWork.ApprovalNo));
837

  
838
                List<PaymentApprovalInfo> InfoList = new List<PaymentApprovalInfo>();
839
                if (PayAppDB.SelectAction(strDel.ToString(), ref InfoList) && InfoList.Count > 0)
840
                {
841
                    PayAppDB.DeleteAction(strDel.ToString(), false);
842
                }
843

  
844
                return true;
845
            }
846
            catch (System.Exception ex)
847
            {
848
                logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message);
849
                return false;
850
            }
851
        }
852
        #endregion
573 853
    }
574 854
}
branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ApprovalPerson/FrmApprovalPerson.cs
50 50
            ApprovalExecuteDate,
51 51
            DepartmentName,
52 52
            DisplayString,
53
            ApprovalAuthority,
53 54
        }
54 55
        #endregion
55 56

  
......
577 578
                RemoveCommentData();
578 579

  
579 580
                // ?\???????????????
580
                PettionNextProcess((int)CommonDefine.ApprovalStatus.Petition);
581
                PettionNextProcess();
581 582

  
582 583
                // ???????b?Z?[?W
583 584
                CommonMotions.EntryEndMessage("?S????\???f?[?^", "?\??");
......
708 709
        /// <param name="e"></param>
709 710
        private void btnTargetData_Click(object sender, EventArgs e)
710 711
        {
711
            int iNextProcessNo = 0;
712
            // ----- ???????Z?b?g
713
            switch (m_ApprovalCode)
712
            try
714 713
            {
715
                case (int)ClsExcute.ApprovalListNo.DRWorkApproval:                      // 8:?o???????F
716
                    iNextProcessNo = (int)ClsExcute.ProcessExecuteNo.DRWork;
717
                    break;
718
                case (int)ClsExcute.ApprovalListNo.CostomerRegistApproval:              // 9:??????o?^???F
719
                    iNextProcessNo = (int)ClsExcute.ProcessExecuteNo.CostomerRegist;
720
                    break;
721
                case (int)ClsExcute.ApprovalListNo.SubConstregistApproval:              // 10:??????o?^???F
722
                    iNextProcessNo = (int)ClsExcute.ProcessExecuteNo.SubConstrRegist;
723
                    break;
724
                case (int)ClsExcute.ApprovalListNo.FeePayment:                          // 11:???x??
725
                    iNextProcessNo = (int)ClsExcute.ProcessExecuteNo.RequestSummaryList;
726
                    break;
727
                case (int)ClsExcute.ApprovalListNo.SubConstrPayment:                    // 12:???x??
728
                    iNextProcessNo = (int)ClsExcute.ProcessExecuteNo.RequestSummaryList;
729
                    break;
730
            }
731
            if (iNextProcessNo == 0) return;
714
                int iNextProcessNo = 0;
715
                // ----- ???????Z?b?g
716
                switch (m_ApprovalCode)
717
                {
718
                    case (int)ClsExcute.ApprovalListNo.DRWorkApproval:                      // 8:?o???????F
719
                        iNextProcessNo = (int)ClsExcute.ProcessExecuteNo.DRWork;
720
                        break;
721
                    case (int)ClsExcute.ApprovalListNo.CostomerRegistApproval:              // 9:??????o?^???F
722
                        iNextProcessNo = (int)ClsExcute.ProcessExecuteNo.CostomerRegist;
723
                        break;
724
                    case (int)ClsExcute.ApprovalListNo.SubConstregistApproval:              // 10:??????o?^???F
725
                        iNextProcessNo = (int)ClsExcute.ProcessExecuteNo.SubConstrRegist;
726
                        break;
727
                    case (int)ClsExcute.ApprovalListNo.FeePayment:                          // 11:???x??
728
                        iNextProcessNo = (int)ClsExcute.ProcessExecuteNo.RequestSummaryList;
729
                        break;
730
                    case (int)ClsExcute.ApprovalListNo.SubConstrPayment:                    // 12:???x??
731
                        iNextProcessNo = (int)ClsExcute.ProcessExecuteNo.RequestSummaryList;
732
                        break;
733
                }
734
                if (iNextProcessNo == 0) return;
732 735

  
733
            // ----- ?N???v???Z?X???
734
            int NowPoint = ClsExcute.NextProcess(iNextProcessNo);
736
                // ----- ?N???v???Z?X???
737
                int NowPoint = ClsExcute.NextProcess(iNextProcessNo);
735 738

  
736
            // ???E???x??????????????
737
            ClsExcute.ProcControlPara[NowPoint].ArrayParameter.Clear();
738
            PaymentApprovalInfo DataRec = null;
739
            ArrayList DataList = null;
740
            switch (m_ApprovalCode)
739
                // ???E???x??????????????
740
                ClsExcute.ProcControlPara[NowPoint].ArrayParameter.Clear();
741
                switch (m_ApprovalCode)
742
                {
743
                    case (int)ClsExcute.ApprovalListNo.FeePayment:                          // 11:???x??
744
                        ClsExcute.ProcControlPara[NowPoint].IntExecParameter.Add((int)CommonDefine.LabourKinds.Labor);
745
                        ClsExcute.ProcControlPara[NowPoint].BoolExecParameter.Add(false);
746
                        break;
747
                    case (int)ClsExcute.ApprovalListNo.SubConstrPayment:                    // 12:???x??
748
                        ClsExcute.ProcControlPara[NowPoint].IntExecParameter.Add((int)CommonDefine.LabourKinds.Normal);
749
                        ClsExcute.ProcControlPara[NowPoint].BoolExecParameter.Add(false);
750
                        break;
751
                }
752

  
753
                // ----- ?S????R?[?h?Z?b?g
754
                ClsExcute.ProcControlPara[NowPoint].IntExecParameter.Add(m_PersonCode);
755
                // ??t??
756
                ClsExcute.ProcControlPara[NowPoint].DateExecParameter.Add(m_SearchDate);
757
                // ??t???
758
                ClsExcute.ProcControlPara[NowPoint].IntExecParameter.Add(m_SearchSeqNo);
759

  
760
                m_bTargetFlg = true;
761
                m_bEndFlg = true;
762
                this.Close();
763
            }
764
            catch (Exception ex)
741 765
            {
742
                case (int)ClsExcute.ApprovalListNo.FeePayment:                          // 11:???x??
743
                    ClsExcute.ProcControlPara[NowPoint].IntExecParameter.Add((int)CommonDefine.LabourKinds.Labor);
744
?@?@                ClsExcute.ProcControlPara[NowPoint].ArrayParameter.Clear();
745
                    DataRec = new PaymentApprovalInfo();
746
                    // ???N???i??t???t??N??????j?j
747
                    DataRec.TargetDate = CommonMotions.cnvInt(m_OrderDate.ToString("yyyyMM"));
748
                    // ?S????R?[?h
749
                    DataRec.ApprovalPerson = m_PersonCode;
750
                    DataList = new ArrayList();
751
                    DataList.Add(DataRec);
752
                    ClsExcute.ProcControlPara[NowPoint].ArrayParameter.Add(DataList);
753
                    break;
754
                case (int)ClsExcute.ApprovalListNo.SubConstrPayment:                    // 12:???x??
755
                    ClsExcute.ProcControlPara[NowPoint].IntExecParameter.Add((int)CommonDefine.LabourKinds.Normal);
756
?@?@                ClsExcute.ProcControlPara[NowPoint].ArrayParameter.Clear();
757
                    DataRec = new PaymentApprovalInfo();
758
                    // ???N???i??t???t??N??????j?j
759
                    DataRec.TargetDate = CommonMotions.cnvInt(m_OrderDate.ToString("yyyyMM"));
760
                    // ?S????R?[?h
761
                    DataRec.ApprovalPerson = m_PersonCode;
762
                    DataList = new ArrayList();
763
                    DataList.Add(DataRec);
764
                    ClsExcute.ProcControlPara[NowPoint].ArrayParameter.Add(DataList);
765
                    break;
766
                logger.ErrorFormat("?V?X?e???G???[?F{0}?F{1}", CommonMotions.GetMethodName(), ex.Message);
766 767
            }
767
            
768
            // ----- ?S????R?[?h?Z?b?g
769
            ClsExcute.ProcControlPara[NowPoint].IntExecParameter.Add(m_PersonCode);
770
            // ??t??
771
            ClsExcute.ProcControlPara[NowPoint].DateExecParameter.Add(m_SearchDate);
772
            // ??t???
773
            ClsExcute.ProcControlPara[NowPoint].IntExecParameter.Add(m_SearchSeqNo);
774

  
775
            m_bTargetFlg = true;
776
            m_bEndFlg = true;
777
            this.Close();
778 768
        }
779 769
        #endregion
780 770

  
branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ApprovalPerson/FrmApprovalPerson.designer.cs
31 31
        private void InitializeComponent()
32 32
        {
33 33
            this.components = new System.ComponentModel.Container();
34
            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
35
            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
36
            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
37
            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
38
            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle();
39
            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle();
40
            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle();
34
            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle15 = new System.Windows.Forms.DataGridViewCellStyle();
35
            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle16 = new System.Windows.Forms.DataGridViewCellStyle();
36
            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle17 = new System.Windows.Forms.DataGridViewCellStyle();
37
            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle18 = new System.Windows.Forms.DataGridViewCellStyle();
38
            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle19 = new System.Windows.Forms.DataGridViewCellStyle();
39
            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle20 = new System.Windows.Forms.DataGridViewCellStyle();
40
            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle21 = new System.Windows.Forms.DataGridViewCellStyle();
41 41
            this.label1 = new System.Windows.Forms.Label();
42 42
            this.btnEnd = new System.Windows.Forms.Button();
43 43
            this.panel2 = new System.Windows.Forms.Panel();
44
            this.dgvEntryData = new ProcessManagement.Forms.CustomControls.DataGridViewEX();
45
            this.Column01 = new System.Windows.Forms.DataGridViewTextBoxColumn();
46
            this.Column02 = new System.Windows.Forms.DataGridViewTextBoxColumn();
47
            this.Column03 = new System.Windows.Forms.DataGridViewTextBoxColumn();
48
            this.Column06 = new System.Windows.Forms.DataGridViewTextBoxColumn();
49
            this.Column07 = new System.Windows.Forms.DataGridViewTextBoxColumn();
50
            this.Column04 = new System.Windows.Forms.DataGridViewTextBoxColumn();
51
            this.Column05 = new System.Windows.Forms.DataGridViewTextBoxColumn();
52 44
            this.panel1 = new System.Windows.Forms.Panel();
53 45
            this.lblLabel03 = new System.Windows.Forms.Label();
54 46
            this.label2 = new System.Windows.Forms.Label();
......
90 82
            this.btnEntryComment = new System.Windows.Forms.Button();
91 83
            this.label18 = new System.Windows.Forms.Label();
92 84
            this.tvDispData = new System.Windows.Forms.TreeView();
85
            this.dgvEntryData = new ProcessManagement.Forms.CustomControls.DataGridViewEX();
86
            this.Column01 = new System.Windows.Forms.DataGridViewTextBoxColumn();
87
            this.Column02 = new System.Windows.Forms.DataGridViewTextBoxColumn();
88
            this.Column03 = new System.Windows.Forms.DataGridViewTextBoxColumn();
89
            this.Column06 = new System.Windows.Forms.DataGridViewTextBoxColumn();
90
            this.Column07 = new System.Windows.Forms.DataGridViewTextBoxColumn();
91
            this.Column04 = new System.Windows.Forms.DataGridViewTextBoxColumn();
92
            this.Column05 = new System.Windows.Forms.DataGridViewTextBoxColumn();
93
            this.Column08 = new System.Windows.Forms.DataGridViewTextBoxColumn();
93 94
            this.panel2.SuspendLayout();
94
            ((System.ComponentModel.ISupportInitialize)(this.dgvEntryData)).BeginInit();
95 95
            this.panel1.SuspendLayout();
96 96
            this.panel3.SuspendLayout();
97 97
            this.panel4.SuspendLayout();
98 98
            this.panel5.SuspendLayout();
99
            ((System.ComponentModel.ISupportInitialize)(this.dgvEntryData)).BeginInit();
99 100
            this.SuspendLayout();
100 101
            // 
101 102
            // label1
......
135 136
            this.panel2.Size = new System.Drawing.Size(760, 160);
136 137
            this.panel2.TabIndex = 15;
137 138
            // 
138
            // dgvEntryData
139
            // 
140
            this.dgvEntryData.AllowUserToAddRows = false;
141
            this.dgvEntryData.AllowUserToDeleteRows = false;
142
            this.dgvEntryData.AllowUserToResizeColumns = false;
143
            this.dgvEntryData.AllowUserToResizeRows = false;
144
            this.dgvEntryData.BackgroundColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224)))));
145
            this.dgvEntryData.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
146
            dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
147
            dataGridViewCellStyle1.BackColor = System.Drawing.Color.Black;
148
            dataGridViewCellStyle1.Font = new System.Drawing.Font("MS 明朝", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
149
            dataGridViewCellStyle1.ForeColor = System.Drawing.Color.White;
150
            dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight;
151
            dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
152
            dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
153
            this.dgvEntryData.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle1;
154
            this.dgvEntryData.ColumnHeadersHeight = 24;
155
            this.dgvEntryData.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing;
156
            this.dgvEntryData.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
157
            this.Column01,
158
            this.Column02,
159
            this.Column03,
160
            this.Column06,
161
            this.Column07,
162
            this.Column04,
163
            this.Column05});
164
            this.dgvEntryData.EnableHeadersVisualStyles = false;
165
            this.dgvEntryData.Location = new System.Drawing.Point(6, 5);
166
            this.dgvEntryData.Name = "dgvEntryData";
167
            this.dgvEntryData.RowHeadersVisible = false;
168
            this.dgvEntryData.RowHeadersWidth = 20;
169
            this.dgvEntryData.RowHeadersWidthSizeMode = System.Windows.Forms.DataGridViewRowHeadersWidthSizeMode.DisableResizing;
170
            this.dgvEntryData.RowTemplate.Height = 24;
171
            this.dgvEntryData.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.CellSelect;
172
            this.dgvEntryData.Size = new System.Drawing.Size(744, 146);
173
            this.dgvEntryData.TabIndex = 8;
174
            // 
175
            // Column01
176
            // 
177
            this.Column01.Frozen = true;
178
            this.Column01.HeaderText = "承認者コード";
179
            this.Column01.Name = "Column01";
180
            this.Column01.ReadOnly = true;
181
            this.Column01.Resizable = System.Windows.Forms.DataGridViewTriState.False;
182
            this.Column01.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
183
            this.Column01.Visible = false;
184
            this.Column01.Width = 5;
185
            // 
186
            // Column02
187
            // 
188
            dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
189
            dataGridViewCellStyle2.Font = new System.Drawing.Font("Century", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
190
            dataGridViewCellStyle2.ForeColor = System.Drawing.Color.Black;
191
            this.Column02.DefaultCellStyle = dataGridViewCellStyle2;
192
            this.Column02.Frozen = true;
193
            this.Column02.HeaderText = "№";
194
            this.Column02.Name = "Column02";
195
            this.Column02.ReadOnly = true;
196
            this.Column02.Resizable = System.Windows.Forms.DataGridViewTriState.False;
197
            this.Column02.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
198
            this.Column02.Width = 44;
199
            // 
200
            // Column03
201
            // 
202
            dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
203
            this.Column03.DefaultCellStyle = dataGridViewCellStyle3;
204
            this.Column03.Frozen = true;
205
            this.Column03.HeaderText = "承認者名";
206
            this.Column03.Name = "Column03";
207
            this.Column03.ReadOnly = true;
208
            this.Column03.Resizable = System.Windows.Forms.DataGridViewTriState.False;
209
            this.Column03.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
210
            this.Column03.Width = 150;
211
            // 
212
            // Column06
213
            // 
214
            dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
215
            this.Column06.DefaultCellStyle = dataGridViewCellStyle4;
216
            this.Column06.Frozen = true;
217
            this.Column06.HeaderText = "承認状態";
218
            this.Column06.Name = "Column06";
219
            this.Column06.ReadOnly = true;
220
            this.Column06.Resizable = System.Windows.Forms.DataGridViewTriState.False;
221
            this.Column06.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
222
            this.Column06.Width = 125;
223
            // 
224
            // Column07
225
            // 
226
            dataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
227
            dataGridViewCellStyle5.Font = new System.Drawing.Font("Century", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
228
            this.Column07.DefaultCellStyle = dataGridViewCellStyle5;
229
            this.Column07.Frozen = true;
230
            this.Column07.HeaderText = "処理日付";
231
            this.Column07.Name = "Column07";
232
            this.Column07.ReadOnly = true;
233
            this.Column07.Resizable = System.Windows.Forms.DataGridViewTriState.False;
234
            this.Column07.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
235
            this.Column07.Width = 120;
236
            // 
237
            // Column04
238
            // 
239
            dataGridViewCellStyle6.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
240
            this.Column04.DefaultCellStyle = dataGridViewCellStyle6;
241
            this.Column04.HeaderText = "所 属";
242
            this.Column04.Name = "Column04";
243
            this.Column04.ReadOnly = true;
244
            this.Column04.Resizable = System.Windows.Forms.DataGridViewTriState.False;
245
            this.Column04.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
246
            this.Column04.Width = 145;
247
            // 
248
            // Column05
249
            // 
250
            dataGridViewCellStyle7.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
251
            this.Column05.DefaultCellStyle = dataGridViewCellStyle7;
252
            this.Column05.HeaderText = "役 職";
253
            this.Column05.Name = "Column05";
254
            this.Column05.ReadOnly = true;
255
            this.Column05.Resizable = System.Windows.Forms.DataGridViewTriState.False;
256
            this.Column05.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
257
            this.Column05.Width = 157;
258
            // 
259 139
            // panel1
260 140
            // 
261 141
            this.panel1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
......
753 633
            this.tvDispData.Size = new System.Drawing.Size(544, 308);
754 634
            this.tvDispData.TabIndex = 158;
755 635
            // 
636
            // dgvEntryData
637
            // 
638
            this.dgvEntryData.AllowUserToAddRows = false;
639
            this.dgvEntryData.AllowUserToDeleteRows = false;
640
            this.dgvEntryData.AllowUserToResizeColumns = false;
641
            this.dgvEntryData.AllowUserToResizeRows = false;
642
            this.dgvEntryData.BackgroundColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224)))));
643
            this.dgvEntryData.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
644
            dataGridViewCellStyle15.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
645
            dataGridViewCellStyle15.BackColor = System.Drawing.Color.Black;
646
            dataGridViewCellStyle15.Font = new System.Drawing.Font("MS 明朝", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
647
            dataGridViewCellStyle15.ForeColor = System.Drawing.Color.White;
648
            dataGridViewCellStyle15.SelectionBackColor = System.Drawing.SystemColors.Highlight;
649
            dataGridViewCellStyle15.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
650
            dataGridViewCellStyle15.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
651
            this.dgvEntryData.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle15;
652
            this.dgvEntryData.ColumnHeadersHeight = 24;
653
            this.dgvEntryData.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing;
654
            this.dgvEntryData.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
655
            this.Column01,
656
            this.Column02,
657
            this.Column03,
658
            this.Column06,
659
            this.Column07,
660
            this.Column04,
661
            this.Column05,
662
            this.Column08});
663
            this.dgvEntryData.EnableHeadersVisualStyles = false;
664
            this.dgvEntryData.Location = new System.Drawing.Point(6, 5);
665
            this.dgvEntryData.Name = "dgvEntryData";
666
            this.dgvEntryData.RowHeadersVisible = false;
667
            this.dgvEntryData.RowHeadersWidth = 20;
668
            this.dgvEntryData.RowHeadersWidthSizeMode = System.Windows.Forms.DataGridViewRowHeadersWidthSizeMode.DisableResizing;
669
            this.dgvEntryData.RowTemplate.Height = 24;
670
            this.dgvEntryData.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.CellSelect;
671
            this.dgvEntryData.Size = new System.Drawing.Size(744, 146);
672
            this.dgvEntryData.TabIndex = 8;
673
            // 
674
            // Column01
675
            // 
676
            this.Column01.Frozen = true;
677
            this.Column01.HeaderText = "承認者コード";
678
            this.Column01.Name = "Column01";
679
            this.Column01.ReadOnly = true;
680
            this.Column01.Resizable = System.Windows.Forms.DataGridViewTriState.False;
681
            this.Column01.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
682
            this.Column01.Visible = false;
683
            this.Column01.Width = 5;
684
            // 
685
            // Column02
686
            // 
687
            dataGridViewCellStyle16.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
688
            dataGridViewCellStyle16.Font = new System.Drawing.Font("Century", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
689
            dataGridViewCellStyle16.ForeColor = System.Drawing.Color.Black;
690
            this.Column02.DefaultCellStyle = dataGridViewCellStyle16;
691
            this.Column02.Frozen = true;
692
            this.Column02.HeaderText = "№";
693
            this.Column02.Name = "Column02";
694
            this.Column02.ReadOnly = true;
695
            this.Column02.Resizable = System.Windows.Forms.DataGridViewTriState.False;
696
            this.Column02.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
697
            this.Column02.Width = 44;
698
            // 
699
            // Column03
700
            // 
701
            dataGridViewCellStyle17.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
702
            this.Column03.DefaultCellStyle = dataGridViewCellStyle17;
703
            this.Column03.Frozen = true;
704
            this.Column03.HeaderText = "承認者名";
705
            this.Column03.Name = "Column03";
706
            this.Column03.ReadOnly = true;
707
            this.Column03.Resizable = System.Windows.Forms.DataGridViewTriState.False;
708
            this.Column03.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
709
            this.Column03.Width = 150;
710
            // 
711
            // Column06
712
            // 
713
            dataGridViewCellStyle18.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
714
            this.Column06.DefaultCellStyle = dataGridViewCellStyle18;
715
            this.Column06.Frozen = true;
716
            this.Column06.HeaderText = "承認状態";
717
            this.Column06.Name = "Column06";
718
            this.Column06.ReadOnly = true;
719
            this.Column06.Resizable = System.Windows.Forms.DataGridViewTriState.False;
720
            this.Column06.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
721
            this.Column06.Width = 125;
722
            // 
723
            // Column07
724
            // 
725
            dataGridViewCellStyle19.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
726
            dataGridViewCellStyle19.Font = new System.Drawing.Font("Century", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
727
            this.Column07.DefaultCellStyle = dataGridViewCellStyle19;
728
            this.Column07.Frozen = true;
729
            this.Column07.HeaderText = "処理日付";
730
            this.Column07.Name = "Column07";
731
            this.Column07.ReadOnly = true;
732
            this.Column07.Resizable = System.Windows.Forms.DataGridViewTriState.False;
733
            this.Column07.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
734
            this.Column07.Width = 120;
735
            // 
736
            // Column04
737
            // 
738
            dataGridViewCellStyle20.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
739
            this.Column04.DefaultCellStyle = dataGridViewCellStyle20;
740
            this.Column04.HeaderText = "所 属";
741
            this.Column04.Name = "Column04";
742
            this.Column04.ReadOnly = true;
743
            this.Column04.Resizable = System.Windows.Forms.DataGridViewTriState.False;
744
            this.Column04.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
745
            this.Column04.Width = 145;
746
            // 
747
            // Column05
748
            // 
749
            dataGridViewCellStyle21.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
750
            this.Column05.DefaultCellStyle = dataGridViewCellStyle21;
751
            this.Column05.HeaderText = "役 職";
752
            this.Column05.Name = "Column05";
753
            this.Column05.ReadOnly = true;
754
            this.Column05.Resizable = System.Windows.Forms.DataGridViewTriState.False;
755
            this.Column05.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
756
            this.Column05.Width = 157;
757
            // 
758
            // Column08
759
            // 
760
            this.Column08.HeaderText = "最終承認区分";
761
            this.Column08.Name = "Column08";
762
            this.Column08.Visible = false;
763
            // 
756 764
            // FrmApprovalPerson
757 765
            // 
758 766
            this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
......
776 784
            this.Load += new System.EventHandler(this.FrmApprovalPerson_Load);
777 785
            this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.FrmApprovalPerson_KeyDown);
778 786
            this.panel2.ResumeLayout(false);
779
            ((System.ComponentModel.ISupportInitialize)(this.dgvEntryData)).EndInit();
780 787
            this.panel1.ResumeLayout(false);
781 788
            this.panel3.ResumeLayout(false);
782 789
            this.panel4.ResumeLayout(false);
783 790
            this.panel4.PerformLayout();
784 791
            this.panel5.ResumeLayout(false);
792
            ((System.ComponentModel.ISupportInitialize)(this.dgvEntryData)).EndInit();
785 793
            this.ResumeLayout(false);
786 794

  
787 795
        }
......
832 840
        private System.Windows.Forms.Button btnRemoveComment;
833 841
        private System.Windows.Forms.Button btnEntryComment;
834 842
        private System.Windows.Forms.Button btnReturnComment;
843
        private System.Windows.Forms.Button btnRePetition;
835 844
        private System.Windows.Forms.DataGridViewTextBoxColumn Column01;
836 845
        private System.Windows.Forms.DataGridViewTextBoxColumn Column02;
837 846
        private System.Windows.Forms.DataGridViewTextBoxColumn Column03;
......
839 848
        private System.Windows.Forms.DataGridViewTextBoxColumn Column07;
840 849
        private System.Windows.Forms.DataGridViewTextBoxColumn Column04;
841 850
        private System.Windows.Forms.DataGridViewTextBoxColumn Column05;
842
        private System.Windows.Forms.Button btnRePetition;
851
        private System.Windows.Forms.DataGridViewTextBoxColumn Column08;
843 852
    }
844 853
}
branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ApprovalPerson/FrmApprovalPerson.resx
117 117
  <resheader name="writer">
118 118
    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
119 119
  </resheader>
120
  <metadata name="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
121
    <value>17, 17</value>
122
  </metadata>
123
  <metadata name="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
124
    <value>17, 17</value>
125
  </metadata>
120 126
  <metadata name="Column03.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
121 127
    <value>True</value>
122 128
  </metadata>
......
132 138
  <metadata name="Column05.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
133 139
    <value>True</value>
134 140
  </metadata>
135
  <metadata name="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
136
    <value>17, 17</value>
141
  <metadata name="Column08.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
142
    <value>True</value>
137 143
  </metadata>
138 144
  <metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
139 145
    <value>35</value>
branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ApprovalPerson/FrmApprovalPersonAuxiliary.cs
91 91
                    return false;
92 92
                }
93 93

  
94
                // 申請者と最初の承認者が同じ場合は申請時に承認する
95
                if (m_dispLabelControl[(int)DispHeader.PetitionName].Text.Equals(m_dispLabelControl[(int)DispHeader.ApprovalName].Text))
94
                // 申請者と最初の承認者が同じ場合は申請時に承認するため以外は以下の処理無
95
                if (!m_dispLabelControl[(int)DispHeader.PetitionName].Text.Equals(m_dispLabelControl[(int)DispHeader.ApprovalName].Text))
96
                    return true;
97

  
98
                // 申請・承認レコード更新
99
                if (!ApprovalDataUpDate((int)CommonDefine.ApprovalStatus.Approval))
96 100
                {
97
                    // 申請・承認レコード更新
98
                    if (!ApprovalDataUpDate((int)CommonDefine.ApprovalStatus.Approval))
99
                    {
100
                        MessageBox.Show("承認に失敗しました。", "承認エラー", MessageBoxButtons.OK, MessageBoxIcon.Error);
101
                        return false;
102
                    }
101
                    MessageBox.Show("承認に失敗しました。", "承認エラー", MessageBoxButtons.OK, MessageBoxIcon.Error);
102
                    return false;
103 103
                }
104

  
104 105
                return true;
105 106
            }
106 107
            catch (Exception ex)
......
131 132

  
132 133
                // 申請レコード更新
133 134
                // 承認時は条件を満たすかをチェックする
135
                int AppStat = (int)AppStatusDef.NonStatus;
134 136
                switch (statusCode)
135 137
                {
136 138
                    case (int)CommonDefine.ApprovalStatus.Approval:
......
143 145

  
144 146
                            // 最終承認が成された後の処理
145 147
                            ApprovalNextProcess();
148

  
149
                            AppStat = (int)AppStatusDef.Approval;
146 150
                        }
147 151
                        // 手間・業者支払は支払承認レコードを作成する
148 152
                        if (m_ApprovalCode == (int)ClsExcute.ApprovalListNo.FeePayment
149 153
                            || m_ApprovalCode == (int)ClsExcute.ApprovalListNo.SubConstrPayment)
150 154
                        {
151
                            ApprovalFeePayment();
155
                            CreatePaymentApprovalInfo(AppStat);
152 156
                        }
153 157
                        break;
154 158
                    default:
......
288 292
                    pRec.PersonCode = CommonMotions.LoginUserData.PersonCode;
289 293
                }
290 294

  
291
                // 新セキュリティデータ対応済みかを確認す
292
                if (CommonMotions.LoginUserData.SecCode == 0)
295
                // システム権限によってデータアクセスに制限があ
296
                if (CommonMotions.LoginUserData.PersonCode == CommonDefine.AdminCode)
293 297
                {
294
                    // システム権限によってデータアクセスに制限がある
295
                    if (CommonMotions.LoginUserData.SecurityManagement == CommonDefine.AdminSecurityManagement)
296
                    {
297
                        // システム管理者(すべて対象)
298
                    }
299
                    else if (CommonMotions.LoginUserData.SecurityManagement == CommonDefine.SystemManageDiv[(int)CommonDefine.SysManaDivNo.PresidentAuthority].Key)
300
                    {
301
                        // 最高機密管理者(すべて対象)
302
                    }
303
                    else
304
                    {
305
                        // ログイン者が申請者か承認時の管理担当者以外は取消しできない
306
                        if (pRec.PersonCode != CommonMotions.LoginUserData.PersonCode && CurrentPerson != CommonMotions.LoginUserData.PersonCode) return;
307
                    }
298
                    // システム管理者(すべて対象)
308 299
                }
300
                else if (CommonMotions.LoginUserSecurity.SecRank == CommonDefine.SecurityRankList[(int)CommonDefine.SecurityRankPos.SpecialAuthority].Key)
301
                {
302
                    // 経営者アクセス
303
                }
309 304
                else
310 305
                {
311
                    // システム権限によってデータアクセスに制限がある
312
                    if (CommonMotions.LoginUserData.PersonCode == CommonDefine.AdminCode)
313
                    {
314
                        // システム管理者(すべて対象)
315
                    }
316
                    else if (CommonMotions.LoginUserSecurity.SecRank == CommonDefine.SecurityRankList[(int)CommonDefine.SecurityRankPos.SpecialAuthority].Key)
317
                    {
318
                        // 経営者アクセス
319
                    }
320
                    else
321
                    {
322
                        // ログイン者が申請者以外は取消しできない
323
                        if (pRec.PersonCode != CommonMotions.LoginUserData.PersonCode) return;
324
                    }
306
                    // ログイン者が申請者以外は取消しできない
307
                    if (pRec.PersonCode != CommonMotions.LoginUserData.PersonCode) return;
325 308
                }
326 309

  
327 310
                // 申請・承認以外は申請ボタンを表示する
......
613 596
                int DepCode = ClsApprovalPermission.GetFromPersonAndApprovalTheDepartment(m_PersonCode, m_ApprovalCode, m_OrderDate, m_OrderNo);
614 597
                // 承認データを取得する
615 598
                StringBuilder strSQL = new StringBuilder();
616
                strSQL.Append("SELECT IFNULL(D.APPROVALSTATUS, -1),");
617
                strSQL.Append(" DATE_FORMAT(D.PETITIONAPPROVALDATE,'%Y/%m/%d'),");
618
                strSQL.Append(" D.INPUTCOMMENT,");
619
                strSQL.Append(" B.PersonName,");
620
                strSQL.Append(" B.DisplayString,");
621
                strSQL.Append(" C.DepartmentString,");
622
                strSQL.Append(" A.APPROVALPERSON,");
623
                strSQL.Append(" A.DISPLAYORDER");
599
                strSQL.Append("SELECT");
600
                strSQL.Append(" IFNULL(D.APPROVALSTATUS, -1),");                    // 0
601
                strSQL.Append(" DATE_FORMAT(D.PETITIONAPPROVALDATE,'%Y/%m/%d'),");  // 1
602
                strSQL.Append(" D.INPUTCOMMENT,");                                  // 2
603
                strSQL.Append(" B.PersonName,");                                    // 3
604
                strSQL.Append(" B.DisplayString,");                                 // 4
605
                strSQL.Append(" C.DepartmentString,");                              // 5
606
                strSQL.Append(" A.APPROVALPERSON,");                                // 6
607
                strSQL.Append(" A.DISPLAYORDER,");                                  // 7
608
                strSQL.Append(" A.ApprovalAuthority");                              // 8
624 609
                strSQL.Append(" FROM APPROVALMASTER A");
625 610
                strSQL.Append(" LEFT JOIN PERSONINCHARGEMASTER B ON B.PERSONCODE = A.APPROVALPERSON");
626 611
                strSQL.Append(" LEFT JOIN DEPARTMENTMASTER C ON C.DEPARTMENTCODE = B.DEPARTMENTCODE");
627 612
                strSQL.AppendFormat(" LEFT JOIN PERSONAPPROVAL D ON D.PERSONCODE = {0}", m_PersonCode);
628
                strSQL.AppendFormat(" And D.APPROVALCODE = {0}", m_ApprovalCode);
613
                strSQL.Append(" And D.APPROVALCODE = A.APPROVALCODE");
629 614
                strSQL.AppendFormat(" And DATE(D.ORDERDATE) = STR_TO_DATE('{0}','%Y/%m/%d')",m_OrderDate.ToShortDateString());
630 615
                strSQL.AppendFormat(" And D.ORDERNO = {0}", m_OrderNo);
631 616
                strSQL.Append(" And D.SEQNO <> 1");
......
643 628
                string strPersonName = string.Empty;
644 629
                string strPersonPosion = string.Empty;
645 630
                string strDepartment = string.Empty;
646

  
631
                int LastApproval = 0;
647 632
                foreach (object[] objrec in pAppRec)
648 633
                {
649 634
                    ApprovalStatus = (int)CommonDefine.ApprovalStatus.Undecided;
......
652 637
                    strPersonName = string.Empty;
653 638
                    strPersonPosion = string.Empty;
654 639
                    strDepartment = string.Empty;
640
                    LastApproval = 0;
655 641

  
656 642
                    strPersonName = CommonMotions.cnvString(objrec[3]);
657 643
                    strPersonPosion = CommonMotions.cnvString(objrec[4]);
......
662 648
                        strDate = CommonMotions.cnvString(objrec[1]);
663 649
                        strComment = CommonMotions.cnvString(objrec[2]);
664 650
                    }
665

  
651
                    LastApproval = CommonMotions.cnvInt(objrec[8]);
666 652
                    // データ表示
667 653
                    int AddRowCnt = dgvEntryData.Rows.Add(CommonMotions.cnvInt(objrec[6]),
668 654
                                                            CommonMotions.cnvInt(objrec[7]),
......
670 656
                                                            CommonDefine.ApprovalStatusString[ApprovalStatus],
671 657
                                                            strDate,
672 658
                                                            strDepartment,
673
                                                            strPersonPosion);
659
                                                            strPersonPosion,
660
                                                            LastApproval);
674 661
                    dgvEntryData.Rows[AddRowCnt].Cells[(int)DispGridColumn.ApprovalStatus].Style.BackColor = CommonDefine.ApprovalBackStatusColor[ApprovalStatus];
675 662
                    dgvEntryData.Rows[AddRowCnt].Cells[(int)DispGridColumn.ApprovalStatus].Style.ForeColor = CommonDefine.ApprovalForeStatusColor[ApprovalStatus];
676 663
                }
......
849 836
        #endregion
850 837

  
851 838
        #region ---------- >> 申請後処理
852
        #region 申請元データに受付番号をセットする
839
        #region 申請後のデータ更新処理を行う
853 840
        /// <summary>
854
        /// 申請元データに受付番号をセットする
841
        /// 申請後のデータ更新処理を行う
855 842
        /// </summary>
856 843
        /// <returns></returns>
857
        private bool PettionNextProcess(int AppAction)
844
        private bool PettionNextProcess()
858 845
        {
859 846
            IOPersonApproval AppDB = new IOPersonApproval();
860 847
            try
......
891 878
                        break;
892 879
                    case (int)ClsExcute.ApprovalListNo.FeePayment:              // 手間支払承認
893 880
                    case (int)ClsExcute.ApprovalListNo.SubConstrPayment:        // 業者支払承認
894
                        // 手間・業者支払データ更新・作成処理
895
                        if (!PettionFeePayment(AppAction)) return false;
881
                        // 支払承認情報データ作成処理
882
                        if (!CreatePaymentApprovalInfo((int)AppStatusDef.Pettion)) return false;
896 883
                        break;
897 884
                    default:
898 885
                        break;
......
959 946
        }
960 947
        #endregion
961 948

  
962
        #region 申請時:手間・業者支払データ作成処理
963
        /// <summary>
964
        /// 申請時:手間・業者支払データ作成処理
965
        /// </summary>
966
        /// <returns></returns>
967
        private bool PettionFeePayment(int AppAction)
968
        {
969
            IOPaymentDataDetail PayDetailDB = new IOPaymentDataDetail();
970
            IOPaymentApprovalInfo PayAppDB = new IOPaymentApprovalInfo();
971
            try
972
            {
973
                PayDetailDB.connect(); PayDetailDB.beginTran();
974
                PayAppDB.connect(); PayAppDB.beginTran();
975

  
976
                // 手間・業者支払承認情報取得
977
                bool bSuccess = true;
978
                int nBCompanyCode = 0;              // 協力会社コード
979
                int nBTargetDate = 0;               // 対象年月     
980
                int nBSeqNo = 0;                    // 連番
981
                int nBLineCount = 0;                // 行番号    
982
                ArrayList arData = m_ArrayParam[0];
983
                for (int i = 0; i < arData.Count; i++)
984
                {
985
                    PaymentApprovalInfo PaIWork = (PaymentApprovalInfo)arData[i];
986

  
987
                    if (nBCompanyCode == PaIWork.CompanyCode        // 協力会社コード
988
                        && nBTargetDate == PaIWork.TargetDate       // 対象年月
989
                        && nBSeqNo == PaIWork.SeqNo                 // 連番
990
                        && nBLineCount == PaIWork.LineCount)        // 行番号
991
                    {
992
                    }
993
                    else
994
                    {
995
                        if (PaIWork.CompanyCode == 0
996
                            || PaIWork.TargetDate == 0
... 差分の行数が表示可能な上限を超えました。超過分は表示しません。

他の形式にエクスポート: Unified diff