プロジェクト

全般

プロフィール

リビジョン 57

堀内7年以上前に追加

発注者登録申請追加、工事種別毎経費設定追加

差分を表示:

trunk/src/ProcessManagement/ProcessManagement/Common/CommonDefine.cs
93 93
        /// </summary>
94 94
        public static int AdminSecurityManagement = -1;
95 95

  
96
        #region 旧機密管理
96 97
        /// <summary>
97 98
        /// 旧機密管理番号
98 99
        /// </summary>
......
123 124
                                                                                new KeyValuePair<int,string>(2,"統括責任者"),
124 125
                                                                                new KeyValuePair<int,string>(3,"所 属 長"),
125 126
                                                                                new KeyValuePair<int,string>(4,"一般使用者")};
127
        #endregion
128

  
126 129
        /// <summary>
127 130
        /// 機密管理番号
128 131
        /// </summary>
......
508 511
        /// <summary>
509 512
        /// 申請状態色
510 513
        /// </summary>
511
        public static Color[] ApprovalBackColorStatusColor = new Color[] { Color.Blue, Color.Yellow, Color.MediumSpringGreen, Color.Red, Color.LightSkyBlue, Color.LightBlue };
512
        public static Color[] ApprovalForeColorStatusColor = new Color[] { Color.White, Color.Black, Color.Black, Color.Black, Color.Black, Color.Black };
514
        public static Color[] ApprovalBackStatusColor = new Color[] { Color.Blue, Color.Yellow, Color.MediumSpringGreen, Color.Red, Color.LightSkyBlue, Color.LightBlue };
515
        public static Color[] ApprovalForeStatusColor = new Color[] { Color.White, Color.Black, Color.Black, Color.Black, Color.Black, Color.Black };
513 516

  
514 517
        /// <summary>
515 518
        /// 承認状態文字
trunk/src/ProcessManagement/ProcessManagement/Common/CommonVersion.cs
14 14
        /// <summary>
15 15
        /// 本体バージョン
16 16
        /// </summary>
17
        public static int s_SystemVersion = 14;
17
        public static int s_SystemVersion = 15;
18 18

  
19 19
        /// <summary>
20 20
        /// コピー・環境バージョン
trunk/src/ProcessManagement/ProcessManagement/Common/Process/ClsExcute.cs
77 77
            PaymentConfirmation = 30,           // 30:入金確認
78 78
            RequestInput = 31,                  // 31:請求入力
79 79
            RequestPrint = 32,                  // 32:請求書印刷
80
            CostomerRegist = 33,                // 33:発注者登録申請
80
            CostomerRegistList = 33,            // 33:発注者登録申請一覧
81
            CostomerRegist = 34,                // 34:発注者登録申請
81 82
        }
82 83
        #endregion
83 84

  
......
175 176
                                                                                { (int)ProcessExecuteNo.PaymentConfirmation,    "入金確認"},
176 177
                                                                                { (int)ProcessExecuteNo.RequestInput,           "請求入力"},
177 178
                                                                                { (int)ProcessExecuteNo.RequestPrint,           "請求書印刷"},
179
                                                                                { (int)ProcessExecuteNo.CostomerRegistList,     "発注者登録申請一覧"},
178 180
                                                                                { (int)ProcessExecuteNo.CostomerRegist,         "発注者登録申請"},
179 181
        };
180 182

  
......
480 482
                        case (int)ProcessExecuteNo.PersonApprovalList:                  // 22:担当者承認申請一覧
481 483
                            ProcessExecuteNo_PersonAppList(m_ProcControlPara[NowPoint]);
482 484
                            break;
483
                        case (int)ProcessExecuteNo.CostomerRegist:                      // 33:発注者登録申請
485

  
486
                        case (int)ProcessExecuteNo.CostomerRegistList:                  // 33:発注者登録申請一覧
487
                            ProcessExecuteNo_CostomerRegistList(m_ProcControlPara[NowPoint]);
488
                            break;
489

  
490
                        case (int)ProcessExecuteNo.CostomerRegist:                      // 34:発注者登録申請
484 491
                            ProcessExecuteNo_CostomerRegist(m_ProcControlPara[NowPoint]);
485 492
                            break;
486 493

  
......
1665 1672

  
1666 1673
                // パラメータセット
1667 1674
                frm.PersonCode = CurrentPara.IntExecParameter[0];
1668
                if (CurrentPara.StringExecParameter.Count > 0)
1675
                if (CurrentPara.DateExecParameter.Count > 0)
1669 1676
                {
1670
                    frm.OrdertDate = CommonMotions.cnvDate(CurrentPara.StringExecParameter[0]);
1677
                    frm.OrdertDate = CurrentPara.DateExecParameter[0];
1671 1678
                }
1672 1679

  
1673 1680
                // フォーム表示
......
1685 1692
        }
1686 1693
        #endregion
1687 1694

  
1688
        #region 発注者登録申請
1695
        #region 発注者登録申請一覧
1689 1696
        /// <summary>
1690
        /// 発注者登録申請
1697
        /// 発注者登録申請一覧
1691 1698
        /// </summary>
1692 1699
        /// <param name="CurrentPara"></param>
1693
        public static void ProcessExecuteNo_CostomerRegist(ProcessParameter CurrentPara)
1700
        public static void ProcessExecuteNo_CostomerRegistList(ProcessParameter CurrentPara)
1694 1701
        {
1695 1702
            // 発注者登録申請一覧
1696 1703
            FrmCostomerRegistList frm = new FrmCostomerRegistList();
......
1698 1705
            {
1699 1706
                // フォーム表示
1700 1707
                frm.ShowDialog();
1708
            }
1709
            catch (Exception ex)
1710
            {
1711
                logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message);
1712
                BackProcess();
1713
            }
1714
            finally
1715
            {
1716
                frm.Dispose(); frm = null;
1717
            }
1718
        }
1719
        #endregion
1701 1720

  
1721
        #region 発注者登録申請一覧
1722
        /// <summary>
1723
        /// 発注者登録申請一覧
1724
        /// </summary>
1725
        /// <param name="CurrentPara"></param>
1726
        public static void ProcessExecuteNo_CostomerRegist(ProcessParameter CurrentPara)
1727
        {
1728
            // 発注者登録申請
1729
            FrmCostomerRegist frm = new FrmCostomerRegist();
1730
            try
1731
            {
1732
                // 自分のハンドルをリストへセットする
1733
                int ProcessNo = (int)ClsExcute.ProcessExecuteNo.DRWork;
1734
                ClsExcute.SubFormHandleList[ProcessNo].ProcessNo = ProcessNo;
1735
                ClsExcute.SubFormHandleList[ProcessNo].SubFormHandle = (Form)frm;
1736

  
1737
                // 起動・編集フラグ
1738
                int EditFlg = (int)CommonDefine.ProcessDataEdit.Reference;
1739
                if (!ClsSecurityPermission.GetExecutePermission(ProcessNo, ref EditFlg))
1740
                {
1741
                    BackProcess();
1742
                    return;
1743
                }
1744
                if (EditFlg == (int)CommonDefine.ProcessDataEdit.Reference) frm.EditLock = true;
1745

  
1746
                // パラメータセット
1747
                frm.PersonCode = CurrentPara.IntExecParameter[0];
1748
                frm.CreateDate = CurrentPara.DateExecParameter[0];
1749
                frm.SeqNo = CurrentPara.IntExecParameter[1];
1750

  
1751
                // フォーム表示
1752
                frm.ShowDialog();
1702 1753
            }
1703 1754
            catch (Exception ex)
1704 1755
            {
......
2723 2774
                frm.PersonCode = CurrentPara.IntExecParameter[0];
2724 2775
                frm.ApprovalCode = CurrentPara.IntExecParameter[1];
2725 2776
                frm.OrderNo = CurrentPara.IntExecParameter[2];
2726
                frm.OrderDate = CommonMotions.cnvDate(CurrentPara.StringExecParameter[0]);
2777
                frm.OrderDate = CurrentPara.DateExecParameter[0];
2727 2778

  
2779
                if (CurrentPara.DateExecParameter.Count > 1) frm.DataSearchDate = CurrentPara.DateExecParameter[1];
2780
                if (CurrentPara.IntExecParameter.Count > 3) frm.DataSearchSeqNo = CurrentPara.IntExecParameter[3];
2781
                
2728 2782
                // フォーム表示
2729 2783
                frm.ShowDialog();
2730 2784
            }
trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOAttendanceData.cs
54 54
            /// </summary>
55 55
            TotalOverTimes,
56 56
            /// <summary>
57
            ///  申請日
58
            /// </summary>
59
            OrderDate,
60
            /// <summary>
57 61
            /// 申請受付番号
58 62
            /// </summary>
59 63
            OrderNo,
......
94 98
            strcmd += " ,LastDays";                                         // 当月最終日
95 99
            strcmd += " ,AttendDayCount";                                   // 出勤日数
96 100
            strcmd += " ,TotalOverTimes";                                   // 残業時間数
101
            strcmd += " ,OrderDate";                                        // 申請日
97 102
            strcmd += " ,OrderNo";                                          // 申請受付番号
98 103
            strcmd += " ,TO_CHAR(EntryDate, 'YYYY/MM/DD HH24:MI:ss')";      // 登録年月日
99 104
            strcmd += " ,TO_CHAR(UpdateDate, 'YYYY/MM/DD HH24:MI:ss')";     // 更新年月日
......
180 185
            try
181 186
            {
182 187
                strcmd = "INSERT INTO AttendanceData";
183
                strcmd += "  (PersonCode";      // 担当者コード
184
                strcmd += " ,AttendanceMonth";  // 出勤管理年月
185
                strcmd += " ,LastDays";         // 当月最終日
186
                strcmd += " ,AttendDayCount";   // 出勤日数
187
                strcmd += " ,TotalOverTimes";   // 残業時間数
188
                strcmd += " ,OrderNo";          // 申請受付番号
189
                strcmd += " ,EntryDate";        // 登録年月日
190
                strcmd += " ,UpdateDate)";      // 更新年月日
191 188

  
192
                strcmd += " VALUES (";
189
                strcmd += "(";
190
                bool bFirst = true;
191
                foreach (var gender in Enum.GetValues(typeof(DataColumn)))
192
                {
193
                    if (!bFirst) strcmd += " ,";
194
                    strcmd += gender.ToString();
195
                    bFirst = false;
196
                }
197
                strcmd += ") VALUES (";
193 198

  
194 199
                strcmd += string.Format("  {0}", work.PersonCode);                      // 担当者コード
195 200
                strcmd += string.Format(", TO_DATE('{0}','YYYY/MM/DD')"
......
197 202
                strcmd += string.Format(", {0}", work.LastDays);                        // 当月最終日
198 203
                strcmd += string.Format(", {0}", work.AttendDayCount);                  // 出勤日数
199 204
                strcmd += string.Format(", {0}", work.TotalOverTimes);                  // 残業時間数
205
                strcmd += string.Format(", TO_DATE('{0}','YYYY/MM/DD')"
206
                                            , work.OrderDate.ToShortDateString());      // 申請日
200 207
                strcmd += string.Format(", {0}", work.OrderNo);                         // 申請受付番号
201 208

  
202 209
                strcmd += ", TO_DATE(TO_CHAR(sysdate,'YYYY/MM/DD HH24:MI:SS'),'YYYY/MM/DD HH24:MI:SS')";
......
253 260
                strcmd += " SET";
254 261

  
255 262
                strcmd += string.Format(" PersonCode = {0}", data.PersonCode);                  // 担当者コード
256
                strcmd += string.Format(" ,AttendanceMonth = TO_DATE('{0}','YYYY/MM/DD')"
257
                                        , data.AttendanceMonth.ToShortDateString());            // 出勤管理年月
263
                strcmd += string.Format(" ,AttendanceMonth = TO_DATE('{0}','YYYY/MM/DD')", data.AttendanceMonth.ToShortDateString());   // 出勤管理年月
258 264
                strcmd += string.Format(" ,LastDays =  {0} ", data.LastDays);                   // 当月最終日
259 265
                strcmd += string.Format(" ,AttendDayCount =  {0} ", data.AttendDayCount);       // 出勤日数
260 266
                strcmd += string.Format(" ,TotalOverTimes =  {0} ", data.TotalOverTimes);       // 残業時間数
267
                strcmd += string.Format(" ,OrderDate = TO_DATE('{0}','YYYY/MM/DD')", data.OrderDate.ToShortDateString());   // 申請日
261 268
                strcmd += string.Format(" ,OrderNo =  {0} ", data.OrderNo);                     // 申請受付番号
262 269
                
263 270
                strcmd += ", UpdateDate = TO_DATE(TO_CHAR(sysdate,'YYYY/MM/DD HH24:MI:SS'),'YYYY/MM/DD HH24:MI:SS')";
......
336 343
                    case (int)DataColumn.TotalOverTimes:
337 344
                        strcmd += string.Format(" TotalOverTimes = {0}", (double)value);
338 345
                        break;
346
                    case (int)DataColumn.OrderDate:
347
                        strcmd += string.Format(" OrderDate = TO_DATE('{0}','YYYY/MM/DD')", ((DateTime)value).ToShortDateString());
348
                        break;
339 349
                    case (int)DataColumn.OrderNo:
340 350
                        strcmd += string.Format(" OrderNo = {0}", (int)value);
341 351
                        break;
......
372 382
                wrk.LastDays = int.Parse(objwrk[(int)DataColumn.LastDays].ToString());                      // 当月最終日
373 383
                wrk.AttendDayCount = int.Parse(objwrk[(int)DataColumn.AttendDayCount].ToString());          // 出勤日数
374 384
                wrk.TotalOverTimes = double.Parse(objwrk[(int)DataColumn.TotalOverTimes].ToString());       // 残業時間数
385
                wrk.OrderDate = DateTime.Parse(objwrk[(int)DataColumn.OrderDate].ToString());               // 申請日
375 386
                wrk.OrderNo = int.Parse(objwrk[(int)DataColumn.OrderNo].ToString());                        // 申請受付番号
376 387
                
377 388
                wrk.EntryDate = DateTime.Parse(objwrk[(int)DataColumn.EntryDate].ToString());
trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOConstructionBaseInfo.cs
239 239
            {
240 240
                strcmd = "INSERT INTO ConstructionBaseInfo";
241 241

  
242
                strcmd += " (";
242
                strcmd += "(";
243 243
                bool bFirst = true;
244 244
                foreach (var gender in Enum.GetValues(typeof(TableColumn)))
245 245
                {
trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOConstructionBudgetDetail.cs
458 458
        /// <param name="GroupCount"></param>
459 459
        /// <param name="LineCount"></param>
460 460
        /// <returns></returns>
461
        public string CreatePrimarykeyString(int ConstructionCode, int GroupCount = 0, int LineCount = 0)
461
        public string CreatePrimarykeyString(int ConstructionCode, int GroupCount = 0, int LineCount = 0, string Alias = "")
462 462
        {
463 463
            string strWork = "";
464 464
            try
465 465
            {
466
                strWork = string.Format(" Where ConstructionCode = {0}", ConstructionCode);
466
                string strAlias = string.Empty;
467
                if (Alias.Length != 0) strAlias = string.Format("{0}.", Alias);
468

  
469
                strWork = string.Format(" Where {0}ConstructionCode = {1}", strAlias, ConstructionCode);
467 470
                if (GroupCount != 0)
468
                    strWork += string.Format(" And GroupCount = {0}", GroupCount);
471
                    strWork += string.Format(" And {0}GroupCount = {1}", strAlias, GroupCount);
469 472
                if (LineCount != 0)
470
                    strWork += string.Format(" And LineCount = {0}", LineCount);
473
                    strWork += string.Format(" And {0}LineCount = {1}", strAlias, LineCount);
471 474
            }
472 475
            catch (Exception ex)
473 476
            {
trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOCostomerRegist.cs
34 34
        /// </summary>
35 35
        public enum DataColumn
36 36
        {
37
            PetitionNo = 0,
37
            PersonCode = 0,
38
            CreateDate,
38 39
            SeqNo,
39 40
            PetitionPeriod,
40
            PersonCode,
41
            PetitionDate,
42 41
            OrderFlg,
43 42
            CorporateStatusName,
44 43
            CorporateStatusPoint,
......
55 54
            MailAddress,
56 55
            Note,
57 56
            OrderCotegory,
57
            OrderDate,
58 58
            OrderNo,
59 59
            EntryDate,
60 60
            UpdateDate,
......
83 83
        private string CreateSelectSQL()
84 84
        {
85 85
            string strcmd = "SELECT";
86
            strcmd += " PetitionNo";
86
            strcmd += "  PersonCode";
87
            strcmd += " ,TO_CHAR(CreateDate, 'YYYY/MM/DD')";
87 88
            strcmd += " ,SeqNo";
89

  
88 90
            strcmd += " ,PetitionPeriod";
89
            strcmd += " ,PersonCode";
90
            strcmd += " ,TO_CHAR(PetitionDate, 'YYYY/MM/DD')";
91 91
            strcmd += " ,OrderFlg";
92 92
            strcmd += " ,CorporateStatusName";
93 93
            strcmd += " ,CorporateStatusPoint";
......
104 104
            strcmd += " ,MailAddress";
105 105
            strcmd += " ,Note";
106 106
            strcmd += " ,OrderCotegory";
107
            strcmd += " ,TO_CHAR(OrderDate, 'YYYY/MM/DD')";
107 108
            strcmd += " ,OrderNo";
108 109

  
109 110
            strcmd += " ,TO_CHAR(EntryDate, 'YYYY/MM/DD HH24:MI:ss')";
......
218 219

  
219 220
                strcmd += ") VALUES (";
220 221

  
221
                strcmd += string.Format("  {0}", work.PetitionNo);
222
                strcmd += string.Format("  {0}", work.PersonCode);
223
                strcmd += string.Format(", TO_DATE('{0}','YYYY/MM/DD')", work.CreateDate.ToShortDateString());
222 224
                strcmd += string.Format(", {0}", work.SeqNo);
223 225
                strcmd += string.Format(", {0}", work.PetitionPeriod);
224
                strcmd += string.Format(", {0}", work.PersonCode);
225
                strcmd += string.Format(", TO_DATE('{0}','YYYY/MM/DD')", work.PetitionDate.ToShortDateString());
226 226
                strcmd += string.Format(", {0}", work.OrderFlg);
227 227
                strcmd += string.Format(", '{0}'", work.CorporateStatusName);
228 228
                strcmd += string.Format(", {0}", work.CorporateStatusPoint);
......
239 239
                strcmd += string.Format(", '{0}'", work.MailAddress);
240 240
                strcmd += string.Format(", '{0}'", work.Note);
241 241
                strcmd += string.Format(", {0}", work.OrderCotegory);
242
                strcmd += string.Format(", TO_DATE('{0}','YYYY/MM/DD')", work.OrderDate.ToShortDateString());
242 243
                strcmd += string.Format(", {0}", work.OrderNo);
243 244

  
244 245
                strcmd += ", TO_DATE(TO_CHAR(sysdate,'YYYY/MM/DD HH24:MI:SS'),'YYYY/MM/DD HH24:MI:SS')";
......
299 300

  
300 301
                strcmd += " SET";
301 302

  
302
                strcmd += string.Format(" PetitionNo = {0}", data.PetitionNo);
303
                strcmd += string.Format(" PersonCode = {0}", data.PersonCode);
304
                strcmd += string.Format(", CreateDate = TO_DATE('{0}','YYYY/MM/DD')", data.CreateDate.ToShortDateString());
303 305
                strcmd += string.Format(", SeqNo = {0}", data.SeqNo);
304 306
                strcmd += string.Format(", PetitionPeriod = {0}", data.PetitionPeriod);
305
                strcmd += string.Format(", PersonCode = {0}", data.PersonCode);
306
                strcmd += string.Format(", PetitionDate = TO_DATE('{0}','YYYY/MM/DD')", data.PetitionDate.ToShortDateString());
307 307
                strcmd += string.Format(", OrderFlg = {0}", data.OrderFlg);
308 308
                strcmd += string.Format(", CorporateStatusName = '{0}'", data.CorporateStatusName);
309 309
                strcmd += string.Format(", CorporateStatusPoint = {0}", data.CorporateStatusPoint);
......
320 320
                strcmd += string.Format(", MailAddress = '{0}'", data.MailAddress);
321 321
                strcmd += string.Format(", Note = '{0}'", data.Note);
322 322
                strcmd += string.Format(", OrderCotegory = {0}", data.OrderCotegory);
323
                strcmd += string.Format(", OrderDate = TO_DATE('{0}','YYYY/MM/DD')", data.OrderDate.ToShortDateString());
323 324
                strcmd += string.Format(", OrderNo = {0}", data.OrderNo);
324 325

  
325 326
                strcmd += ", UpdateDate = TO_DATE(TO_CHAR(sysdate,'YYYY/MM/DD HH24:MI:SS'),'YYYY/MM/DD HH24:MI:SS')";
......
369 370
        /// 1項目の更新を行う
370 371
        /// </summary>
371 372
        /// <returns></returns>
372
        public bool UpdateFeild(int PetitionNo, int SeqNo, int FeildNo, object value, bool bConnect = true)
373
        public bool UpdateFeild(int PersonCode, DateTime CreateDate, int SeqNo, int FeildNo, object value, bool bConnect = true)
373 374
        {
374 375
            string strcmd = "";
375 376
            try
......
379 380
                strcmd += " SET";
380 381
                switch (FeildNo)
381 382
                {
382
                    case (int)DataColumn.PetitionNo:
383
                        strcmd += string.Format(" PetitionNo = {0}", ((int)value).ToString());
383
                    case (int)DataColumn.PersonCode:
384
                        strcmd += string.Format(" PersonCode = {0}", ((int)value).ToString());
384 385
                        break;
386
                    case (int)DataColumn.CreateDate:
387
                        strcmd += string.Format(" CreateDate = TO_DATE('{0}','YYYY/MM/DD')", ((DateTime)value).ToShortDateString());
388
                        break;
385 389
                    case (int)DataColumn.SeqNo:
386 390
                        strcmd += string.Format(" SeqNo = {0}", ((int)value).ToString());
387 391
                        break;
388 392
                    case (int)DataColumn.PetitionPeriod:
389 393
                        strcmd += string.Format(" PetitionPeriod = {0}", ((int)value).ToString());
390 394
                        break;
391
                    case (int)DataColumn.PersonCode:
392
                        strcmd += string.Format(" PersonCode = {0}", ((int)value).ToString());
393
                        break;
394
                    case (int)DataColumn.PetitionDate:
395
                        strcmd += string.Format(" PetitionDate = TO_DATE('{0}','YYYY/MM/DD')", ((DateTime)value).ToShortDateString());
396
                        break;
397 395
                    case (int)DataColumn.OrderFlg:
398 396
                        strcmd += string.Format(" OrderFlg = {0}", ((int)value).ToString());
399 397
                        break;
......
442 440
                    case (int)DataColumn.OrderCotegory:
443 441
                        strcmd += string.Format(" OrderCotegory = {0}", ((int)value).ToString());
444 442
                        break;
443
                    case (int)DataColumn.OrderDate:
444
                        strcmd += string.Format(" OrderDate = TO_DATE('{0}','YYYY/MM/DD')", ((DateTime)value).ToShortDateString());
445
                        break;
445 446
                    case (int)DataColumn.OrderNo:
446 447
                        strcmd += string.Format(" OrderNo = {0}", ((int)value).ToString());
447 448
                        break;
448 449
                }
449 450

  
450 451
                strcmd += ", UpdateDate = TO_DATE(TO_CHAR(sysdate,'YYYY/MM/DD HH24:MI:SS'),'YYYY/MM/DD HH24:MI:SS')";
451
                strcmd += CreatePrimarykeyString(PetitionNo, SeqNo);
452
                strcmd += CreatePrimarykeyString(PersonCode, CreateDate, SeqNo);
452 453

  
453 454
                if (!ExecuteNonQuery(strcmd, bConnect)) return false;
454 455

  
......
473 474
            try
474 475
            {
475 476
                // データ取得
476
                wrk.PetitionNo = int.Parse(objwrk[(int)DataColumn.PetitionNo].ToString());
477
                wrk.PersonCode = int.Parse(objwrk[(int)DataColumn.PersonCode].ToString());
478
                wrk.CreateDate = DateTime.Parse(objwrk[(int)DataColumn.CreateDate].ToString());
477 479
                wrk.SeqNo = int.Parse(objwrk[(int)DataColumn.SeqNo].ToString());
478 480
                wrk.PetitionPeriod = int.Parse(objwrk[(int)DataColumn.PetitionPeriod].ToString());
479
                wrk.PersonCode = int.Parse(objwrk[(int)DataColumn.PersonCode].ToString());
480 481
                wrk.OrderFlg = int.Parse(objwrk[(int)DataColumn.OrderFlg].ToString());
481
                wrk.PetitionDate = DateTime.Parse(objwrk[(int)DataColumn.PetitionDate].ToString());
482 482
                wrk.CorporateStatusName = objwrk[(int)DataColumn.CorporateStatusName].ToString();
483 483
                wrk.CorporateStatusPoint = int.Parse(objwrk[(int)DataColumn.CorporateStatusPoint].ToString());
484 484

  
......
495 495
                wrk.MailAddress = objwrk[(int)DataColumn.MailAddress].ToString();
496 496
                wrk.Note = objwrk[(int)DataColumn.Note].ToString();
497 497
                wrk.OrderCotegory = int.Parse(objwrk[(int)DataColumn.OrderCotegory].ToString());
498
                wrk.OrderDate = DateTime.Parse(objwrk[(int)DataColumn.OrderDate].ToString());
498 499
                wrk.OrderNo = int.Parse(objwrk[(int)DataColumn.OrderNo].ToString());
499 500

  
500 501
                wrk.EntryDate = DateTime.Parse(objwrk[(int)DataColumn.EntryDate].ToString());
......
556 557
        /// </summary>
557 558
        /// <param name="ItemCode">大工種キー</param>
558 559
        /// <returns>Where文字列</returns>
559
        public string CreatePrimarykeyString(int PetitionNo, int SeqNo = 0)
560
        public string CreatePrimarykeyString(int PersonCode, DateTime CaretaDate, int SeqNo = 0)
560 561
        {
561 562
            string strWork = "";
562 563
            try
563 564
            {
564
                strWork = string.Format(" WHERE PetitionNo = {0}", PetitionNo);
565
                strWork = string.Format(" WHERE PersonCode = {0}", PersonCode);
566
                if (CaretaDate != DateTime.MinValue)
567
                    strWork += string.Format(" AND CreateDate = TO_DATE('{0}','YYYY/MM/DD')", CaretaDate.ToShortDateString());
565 568
                if (SeqNo != 0)
566 569
                    strWork += string.Format(" AND SeqNo = {0}", SeqNo);
567 570
            }
trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOMConstructionTypeMaster.cs
37 37
            DisplayOrder,
38 38
            NameString,
39 39
            PublicFlg,
40
            SecRank,
41
            ExpensesLink,
40 42
            DeleteFlg,
41 43
            EntryDate,
42 44
            UpdateDate,
......
55 57

  
56 58
        #endregion
57 59

  
58
        #region 検索処理
60
        #region 名称マスタ検索SQL作成
59 61
        /// <summary>
60
        /// 名称マスタ検索
62
        /// 名称マスタ検索SQL作成
61 63
        /// </summary>
62 64
        /// <param name="AddSQLString">検索条件SQL文字列</param>
63 65
        /// <param name="data">名称マスタデータ</param>
......
70 72
            strcmd += ",DisplayOrder";
71 73
            strcmd += ",NameString";
72 74
            strcmd += ",PublicFlg";
75
            strcmd += ",SecRank";
76
            strcmd += ",ExpensesLink";
77

  
73 78
            strcmd += ",DeleteFlg";
74 79

  
75 80
            strcmd += " ,TO_CHAR(EntryDate, 'YYYY/MM/DD HH24:MI:ss')";
......
78 83

  
79 84
            return strcmd;
80 85
        }
86
        #endregion
87

  
88
        #region 名称マスタ検索(複数件)
89
        /// <summary>
90
        /// 名称マスタ検索(複数件)
91
        /// </summary>
92
        /// <param name="AddSQLString"></param>
93
        /// <param name="data"></param>
94
        /// <param name="bConnect"></param>
95
        /// <returns></returns>
81 96
        public bool SelectAction(string AddSQLString, ref List<ConstructionTypeMaster> data, bool bConnect = true)
82 97
        {
83 98
            //Oracle インターフェース
......
109 124
            }
110 125

  
111 126
        }
127
        #endregion
128

  
129
        #region 名称マスタ検索(1件)
130
        /// <summary>
131
        /// 名称マスタ検索(1件)
132
        /// </summary>
133
        /// <param name="AddSQLString"></param>
134
        /// <param name="data"></param>
135
        /// <param name="bConnect"></param>
136
        /// <returns></returns>
112 137
        public bool SelectAction(string AddSQLString, ref ConstructionTypeMaster data, bool bConnect = true)
113 138
        {
114 139
            //Oracle インターフェース
......
142 167
        }
143 168
        #endregion
144 169

  
145
        #region 追加処理
170
        #region 名称マスタ追加(1件)
146 171
        /// <summary>
147 172
        /// 名称マスタ追加
148 173
        /// </summary>
......
156 181

  
157 182
                strcmd = "INSERT INTO ConstructionTypeMaster";
158 183

  
159
                strcmd += " VALUES (";
184
                strcmd += "(";
185
                bool bFirst = true;
186
                foreach (var gender in Enum.GetValues(typeof(NameColumn)))
187
                {
188
                    if (!bFirst) strcmd += " ,";
189
                    strcmd += gender.ToString();
190
                    bFirst = false;
191
                }
192
                strcmd += ") VALUES (";
160 193

  
161
                strcmd += string.Format("  {0}", work.TypeCode.ToString());
162
                strcmd += string.Format(", {0}", work.DisplayOrder.ToString());
163
                strcmd += string.Format(",'{0}'", work.NameString.ToString());
164
                strcmd += string.Format(", {0}", work.PublicFlg.ToString());
165
                strcmd += string.Format(", {0}", work.DeleteFlg.ToString());
194
                strcmd += string.Format("  {0}", work.TypeCode);
195
                strcmd += string.Format(", {0}", work.DisplayOrder);
196
                strcmd += string.Format(",'{0}'", work.NameString);
197
                strcmd += string.Format(", {0}", work.PublicFlg);
198
                strcmd += string.Format(", {0}", work.SecRank);
199
                strcmd += string.Format(", {0}", work.ExpensesLink);
200
                strcmd += string.Format(", {0}", work.DeleteFlg);
166 201

  
167 202
                strcmd += ", TO_DATE(TO_CHAR(sysdate,'YYYY/MM/DD HH24:MI:SS'),'YYYY/MM/DD HH24:MI:SS')";
168 203
                strcmd += ", TO_DATE(TO_CHAR(sysdate,'YYYY/MM/DD HH24:MI:SS'),'YYYY/MM/DD HH24:MI:SS')";
......
178 213
                return false;
179 214
            }
180 215
        }
216
        #endregion
217

  
218
        #region 名称マスタ追加(複数件)
219
        /// <summary>
220
        /// 名称マスタ追加(複数件)
221
        /// </summary>
222
        /// <param name="data"></param>
223
        /// <param name="bConnect"></param>
224
        /// <returns></returns>
181 225
        public bool InsertAction(List<ConstructionTypeMaster> data, bool bConnect = true)
182 226
        {
183 227
            string strcmd = "";
184 228
            try
185 229
            {
186

  
187 230
                foreach (ConstructionTypeMaster work in data)
188 231
                {
189 232
                    if (!InsertAction(work, bConnect)) return false;
......
198 241
        }
199 242
        #endregion
200 243

  
201
        #region 更新処理
244
        #region 名称マスタ更新
202 245
        /// <summary>
203 246
        /// 名称マスタ更新
204 247
        /// </summary>
......
215 258

  
216 259
                strcmd += " SET";
217 260

  
218
                strcmd += string.Format(" TypeCode = {0}", data.TypeCode.ToString());
219
                strcmd += string.Format(",DisplayOrder = {0}", data.DisplayOrder.ToString());
220
                strcmd += string.Format(",NameString = '{0}'", data.NameString.ToString());
221
                strcmd += string.Format(",PublicFlg = {0}", data.PublicFlg.ToString());
222
                strcmd += string.Format(",DeleteFlg = {0}", data.DeleteFlg.ToString());
261
                strcmd += string.Format(" TypeCode = {0}", data.TypeCode);
262
                strcmd += string.Format(",DisplayOrder = {0}", data.DisplayOrder);
263
                strcmd += string.Format(",NameString = '{0}'", data.NameString);
264
                strcmd += string.Format(",PublicFlg = {0}", data.PublicFlg);
265
                strcmd += string.Format(",SecRank = {0}", data.SecRank);
266
                strcmd += string.Format(",ExpensesLink = {0}", data.ExpensesLink);
267
                strcmd += string.Format(",DeleteFlg = {0}", data.DeleteFlg);
223 268

  
224 269
                strcmd += ", UpdateDate = TO_DATE(TO_CHAR(sysdate,'YYYY/MM/DD HH24:MI:SS'),'YYYY/MM/DD HH24:MI:SS')";
225 270
                strcmd += AddSQLString;
......
313 358
                wrk.DisplayOrder = int.Parse(objwrk[(int)NameColumn.DisplayOrder].ToString());
314 359
                wrk.NameString = objwrk[(int)NameColumn.NameString].ToString();
315 360
                wrk.PublicFlg = int.Parse(objwrk[(int)NameColumn.PublicFlg].ToString());
361
                wrk.SecRank = int.Parse(objwrk[(int)NameColumn.SecRank].ToString());
362
                wrk.ExpensesLink = int.Parse(objwrk[(int)NameColumn.ExpensesLink].ToString());
363

  
316 364
                wrk.DeleteFlg = int.Parse(objwrk[(int)NameColumn.DeleteFlg].ToString());
317 365

  
318 366
                wrk.EntryDate = DateTime.Parse(objwrk[(int)NameColumn.EntryDate].ToString());
......
327 375
                logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message);
328 376
            }
329 377
        }
330

  
331 378
        #endregion
332 379

  
333
        #region パブリックメソッド(特殊処理)
334

  
380
        #region 種別コードの最大値を取得する
335 381
        /// <summary>
336 382
        /// 種別コードの最大値を取得する
337 383
        /// </summary>
......
368 414

  
369 415
            return iRet;
370 416
        }
417
        #endregion
371 418

  
419
        #region 表示順の最大値を取得する
372 420
        /// <summary>
373 421
        /// 表示順の最大値を取得する
374 422
        /// </summary>
......
405 453

  
406 454
            return iRet;
407 455
        }
456
        #endregion
408 457

  
458
        #region 主キー検索の文字列を返す
409 459
        /// <summary>
410 460
        /// 主キー検索の文字列を返す
411 461
        /// </summary>
trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOMTypeExpenses.cs
1
using System;
2
using System.Collections.Generic;
3
using System.Linq;
4
using System.Text;
5
using System.Collections;
6

  
7
using log4net;
8
using Oracle.ManagedDataAccess.Client;
9

  
10
using ProcessManagement.DB.Oracle;
11
using ProcessManagement.DB.Core;
12
using ProcessManagement.DataModel;
13

  
14
using ProcessManagement.Common;
15

  
16
namespace ProcessManagement.DB.IOAccess
17
{
18
    /// <summary>
19
    /// 工事種別経費率マスタアクセスクラス
20
    /// </summary>
21
    public class IOMTypeExpenses : OracleProcess
22
    {
23
        #region 定義部
24
        /// <summary>
25
        /// log4netログを使用する
26
        /// </summary>
27
        private static readonly ILog logger = LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
28
        #endregion
29

  
30
        #region 定数
31
        /// <summary>
32
        /// 経費率マスタフィールド並び
33
        /// </summary>
34
        public enum NameColumn
35
        {
36
            TypeCode = 0,
37
            ExpensesPeriod,
38
            NameCode,
39
            ExpensesRate,
40
            DeleteFlg,
41
            EntryDate,
42
            UpdateDate,
43
        }
44
        #endregion
45

  
46
        #region コンストラクタ
47
        /// <summary>
48
        /// コンストラクタ
49
        /// </summary>
50
        /// <param name="ConnectionString"></param>
51
        public IOMTypeExpenses()
52
            : base(DBCommon.Instance.DBConnectString)
53
        {
54
        }
55

  
56
        #endregion
57

  
58
        #region 経費率マスタ検索SQL作成
59
        /// <summary>
60
        /// 経費率マスタ検索SQL作成
61
        /// </summary>
62
        /// <param name="AddSQLString">検索条件SQL文字列</param>
63
        /// <param name="data">経費率マスタデータ</param>
64
        /// <returns>true:成功 false:失敗</returns>
65
        private string CreateSelectSQL()
66
        {
67
            string strcmd = "SELECT";
68

  
69
            strcmd += " TypeCode";
70
            strcmd += " ,ExpensesPeriod";
71
            strcmd += " ,NameCode";
72
            strcmd += " ,ExpensesRate";
73
            strcmd += " ,DeleteFlg";
74

  
75
            strcmd += " ,TO_CHAR(EntryDate, 'YYYY/MM/DD HH24:MI:ss')";
76
            strcmd += " ,TO_CHAR(UpdateDate, 'YYYY/MM/DD HH24:MI:ss')";
77
            strcmd += " FROM TypeExpensesMaster";
78

  
79
            return strcmd;
80
        }
81
        #endregion
82

  
83
        #region データ検索(複数件)
84
        /// <summary>
85
        /// データ検索(複数件)
86
        /// </summary>
87
        /// <param name="AddSQLString"></param>
88
        /// <param name="data"></param>
89
        /// <param name="bConnect"></param>
90
        /// <returns></returns>
91
        public bool SelectAction(string AddSQLString, ref List<TypeExpensesMaster> data, bool bConnect = true)
92
        {
93
            //Oracle インターフェース
94
            string strcmd = "";
95
            ArrayList arData = new ArrayList();
96

  
97
            try
98
            {
99
                // SQL作成(oracleのDateTime型が変換できないのでCharに変換しておく)
100
                strcmd = CreateSelectSQL() + AddSQLString;
101

  
102
                // SQL実行
103
                if (!ExecuteReader(strcmd, ref arData, bConnect)) return false;
104

  
105
                // データセット
106
                foreach (object[] objwrk in arData)
107
                {
108
                    TypeExpensesMaster work = new TypeExpensesMaster();
109
                    Reader2Struct(objwrk, ref work);
110
                    data.Add(work);
111
                }
112

  
113
                return true;
114
            }
115
            catch (Exception ex)
116
            {
117
                logger.ErrorFormat("システムエラー:{0}:{1}:{2}", CommonMotions.GetMethodName(2), ex.Message, strcmd);
118
                return false;
119
            }
120

  
121
        }
122
        #endregion
123

  
124
        #region データ検索(1件)
125
        /// <summary>
126
        /// データ検索(1件)
127
        /// </summary>
128
        /// <param name="AddSQLString"></param>
129
        /// <param name="data"></param>
130
        /// <param name="bConnect"></param>
131
        /// <returns></returns>
132
        public bool SelectAction(string AddSQLString, ref TypeExpensesMaster data, bool bConnect = true)
133
        {
134
            //Oracle インターフェース
135
            string strcmd = "";
136
            ArrayList arData = new ArrayList();
137

  
138
            try
139
            {
140
                // SQL作成(oracleのDateTime型が変換できないのでCharに変換しておく)
141
                strcmd = CreateSelectSQL() + AddSQLString;
142

  
143
                // SQL実行
144
                if (!ExecuteReader(strcmd, ref arData, bConnect)) return false;
145
                if (arData.Count == 0) return false;
146

  
147
                // データセット
148
                foreach (object[] objwrk in arData)
149
                {
150
                    Reader2Struct(objwrk, ref data);
151
                    break;
152
                }
153

  
154
                return true;
155
            }
156
            catch (Exception ex)
157
            {
158
                logger.ErrorFormat("システムエラー:{0}:{1}:{2}", CommonMotions.GetMethodName(2), ex.Message, strcmd);
159
                return false;
160
            }
161

  
162
        }
163
        #endregion
164

  
165
        #region 経費率マスタ追加(1件)
166
        /// <summary>
167
        /// 経費率マスタ追加(1件)
168
        /// </summary>
169
        /// <param name="data">経費率マスタデータ</param>
170
        /// <returns>true:成功 false:失敗</returns>
171
        public bool InsertAction(TypeExpensesMaster work, bool bConnect = true)
172
        {
173
            string strcmd = "";
174
            try
175
            {
176
                strcmd = "INSERT INTO TypeExpensesMaster";
177

  
178
                strcmd += "(";
179
                bool bFirst = true;
180
                foreach (var gender in Enum.GetValues(typeof(NameColumn)))
181
                {
182
                    if (!bFirst) strcmd += " ,";
183
                    strcmd += gender.ToString();
184
                    bFirst = false;
185
                }
186
                strcmd += ") VALUES (";
187

  
188
                strcmd += string.Format("  {0}", work.TypeCode.ToString());
189
                strcmd += string.Format(", {0}", work.ExpensesPeriod.ToString());
190
                strcmd += string.Format(", {0}", work.NameCode.ToString());
191
                strcmd += string.Format(", {0}", work.ExpensesRate.ToString());
192
                strcmd += string.Format(", {0}", work.DeleteFlg.ToString());
193

  
194
                strcmd += ", TO_DATE(TO_CHAR(sysdate,'YYYY/MM/DD HH24:MI:SS'),'YYYY/MM/DD HH24:MI:SS')";
195
                strcmd += ", TO_DATE(TO_CHAR(sysdate,'YYYY/MM/DD HH24:MI:SS'),'YYYY/MM/DD HH24:MI:SS')";
196
                strcmd = strcmd + ")";
197

  
198
                if (!ExecuteNonQuery(strcmd, bConnect)) return false;
199

  
200
                return true;
201
            }
202
            catch (Exception ex)
203
            {
204
                logger.ErrorFormat("システムエラー:{0}:{1}:{2}", CommonMotions.GetMethodName(2), ex.Message, strcmd);
205
                return false;
206
            }
207
        }
208
        #endregion
209

  
210
        #region 経費率マスタ追加(複数件)
211
        /// <summary>
212
        /// 経費率マスタ追加
213
        /// </summary>
214
        /// <param name="data">経費率マスタデータ</param>
215
        /// <returns>true:成功 false:失敗</returns>
216
        public bool InsertAction(List<TypeExpensesMaster> data, bool bConnect = true)
217
        {
218
            string strcmd = "";
219
            try
220
            {
221
                foreach (TypeExpensesMaster work in data)
222
                {
223
                    if (!InsertAction(work, bConnect)) return false;
224
                }
225
                return true;
226
            }
227
            catch (Exception ex)
228
            {
229
                logger.ErrorFormat("システムエラー:{0}:{1}:{2}", CommonMotions.GetMethodName(2), ex.Message, strcmd);
230
                return false;
231
            }
232
        }
233
        #endregion
234

  
235
        #region 経費率マスタ更新
236
        /// <summary>
237
        /// 経費率マスタ更新
238
        /// </summary>
239
        /// <param name="AddSQLString">更新条件SQL文字列</param>
240
        /// <param name="data">経費率マスタデータ</param>
241
        /// <returns>true:成功 false:失敗</returns>
242
        public bool UpdateAction(string AddSQLString, TypeExpensesMaster data, bool bConnect = true)
243
        {
244
            string strcmd = "";
245
            try
246
            {
247

  
248
                strcmd = "UPDATE TypeExpensesMaster";
249

  
250
                strcmd += " SET";
251

  
252
                strcmd += string.Format(" TypeCode = {0}", data.TypeCode.ToString());
253
                strcmd += string.Format(",ExpensesPeriod = {0}", data.ExpensesPeriod.ToString());
254
                strcmd += string.Format(",NameCode = {0}", data.NameCode.ToString());
255
                strcmd += string.Format(",ExpensesRate = {0}", data.ExpensesRate.ToString());
256
                strcmd += string.Format(",DeleteFlg = {0}", data.DeleteFlg.ToString());
257

  
258
                strcmd += ", UpdateDate = TO_DATE(TO_CHAR(sysdate,'YYYY/MM/DD HH24:MI:SS'),'YYYY/MM/DD HH24:MI:SS')";
259
                strcmd += AddSQLString;
260

  
261
                if (!ExecuteNonQuery(strcmd, bConnect)) return false;
262

  
263
                return true;
264
            }
265
            catch (Exception ex)
266
            {
267
                logger.ErrorFormat("システムエラー:{0}:{1}:{2}", CommonMotions.GetMethodName(2), ex.Message, strcmd);
268
                return false;
269
            }
270
        }
271
        #endregion
272

  
273
        #region 経費率マスタ削除
274
        /// <summary>
275
        /// 経費率マスタ削除
276
        /// </summary>
277
        /// <param name="AddSQLString">削除条件SQL文字列</param>
278
        /// <param name="data">経費率マスタデータ</param>
279
        /// <returns>true:成功 false:失敗</returns>
280
        public bool DeleteAction(string AddSQLString, bool bConnect = true)
281
        {
282
            //Oracle インターフェース
283
            string strcmd = "";
284
            try
285
            {
286
                strcmd = string.Format("{0}{1}", "DELETE FROM TypeExpensesMaster", AddSQLString);
287

  
288
                if (!ExecuteNonQuery(strcmd, bConnect)) return false;
289

  
290
                return true;
291
            }
292
            catch (Exception ex)
293
            {
294
                logger.ErrorFormat("システムエラー:{0}:{1}:{2}", CommonMotions.GetMethodName(2), ex.Message, strcmd);
295
                return false;
296
            }
297
        }
298
        #endregion
299

  
300
        #region 論理削除
301
        /// <summary>
302
        /// 論理削除
303
        /// </summary>
304
        /// <param name="NameCode">名称コード</param>
305
        /// <returns>成功時:true 失敗時:false</returns>
306
        public bool LogicalDeleteAction(int NameCode, bool bConnect = true)
307
        {
308
            // Where文字列作成
309
            string strWhere = CreatePrimarykeyString(NameCode);
310
            try
311
            {
312
                List<TypeExpensesMaster> workList = new List<TypeExpensesMaster>();
313
                // データ読込
314
                if (SelectAction(strWhere, ref workList, bConnect))
315
                {
316
                    if (workList.Count == 0) return true;
317

  
318
                    // 削除フラグ
319
                    workList[0].DeleteFlg = 1;
320
                    // データ更新
321
                    if (!UpdateAction(strWhere, workList[0], bConnect))
322
                    {
323
                        rollback();
324
                        return false;
325
                    }
326
                }
327
                return true;
328
            }
329
            catch (Exception ex)
330
            {
331
                logger.ErrorFormat("システムエラー:{0}:{1}:{2}", CommonMotions.GetMethodName(2), ex.Message, strWhere);
332
                return false;
333
            }
334
        }
335
        #endregion
336

  
337
        #region OracleDataReaderより構造体へセットする
338
        /// <summary>
339
        /// OracleDataReaderより構造体へセットする
340
        /// </summary>
341
        /// <param name="reader">OracleDataReader</param>
342
        /// <param name="wrk">構造体</param>
343
        public void Reader2Struct(object[] objwrk, ref TypeExpensesMaster wrk)
344
        {
345
            try
346
            {
347
                // データ取得
348
                wrk.TypeCode = int.Parse(objwrk[(int)NameColumn.TypeCode].ToString());
349
                wrk.ExpensesPeriod = int.Parse(objwrk[(int)NameColumn.ExpensesPeriod].ToString());
350
                wrk.NameCode = int.Parse(objwrk[(int)NameColumn.NameCode].ToString());
351
                wrk.ExpensesRate = double.Parse(objwrk[(int)NameColumn.ExpensesRate].ToString());
352
                wrk.DeleteFlg = int.Parse(objwrk[(int)NameColumn.DeleteFlg].ToString());
353

  
354
                wrk.EntryDate = DateTime.Parse(objwrk[(int)NameColumn.EntryDate].ToString());
355
                wrk.UpdateDate = DateTime.Parse(objwrk[(int)NameColumn.UpdateDate].ToString());
356
            }
357
            catch (OracleException oraex)
358
            {
359
                logger.ErrorFormat("オラクルエラー:{0}:{1}", CommonMotions.GetMethodName(), oraex.Message);
360
            }
361
            catch (Exception ex)
362
            {
363
                logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message);
364
            }
365
        }
366
        #endregion
367

  
368
        #region 区分別の最大値を取得する
369
        /// <summary>
370
        /// 区分別の最大値を取得する
371
        /// </summary>
372
        /// <param name="AddSQLString"></param>
373
        /// <param name="bConnect"></param>
374
        /// <returns></returns>
375
        public int SelectMaxCategoryHistoryCount(string AddSQLString, bool bConnect = true)
376
        {
377
            //Oracle インターフェース
378
            string strcmd = "";
379
            ArrayList arData = new ArrayList();
380
            int iRet = 0;
381
            try
382
            {
383
                // SQL作成
384
                strcmd = "SELECT NVL(MAX(NameCode), 0) FROM TypeExpensesMaster" + AddSQLString;
385

  
386
                // SQL実行
387
                if (!ExecuteReader(strcmd, ref arData, bConnect)) return iRet;
388

  
389
                // データセット
390
                foreach (object[] objwrk in arData)
391
                {
392
                    if (objwrk[0].ToString().Equals(""))
393
                        iRet = 0;
394
                    else
395
                        iRet = int.Parse(objwrk[0].ToString());
396
                }
397
            }
398
            catch (Exception ex)
399
            {
400
                logger.ErrorFormat("システムエラー:{0}:{1}:{2}", CommonMotions.GetMethodName(2), ex.Message, strcmd);
401
            }
402

  
403
            return iRet;
404
        }
405
        #endregion
406

  
407
        #region 主キー検索の文字列を返す
408
        /// <summary>
409
        /// 主キー検索の文字列を返す
410
        /// </summary>
411
        /// <param name="NameCode">名称コード</param>
412
        /// <returns>Where文字列</returns>
413
        public string CreatePrimarykeyString(int TypeCode, int Period = 0, int NameCode = 0, string Alias = "")
414
        {
415
            string strWork = string.Empty;
416
            try
417
            {
418
                string strAlias = string.Empty;
419
                if (Alias.Length != 0) strAlias = string.Format("{0}.", Alias);
420
                strWork = string.Format(" Where {0}TypeCode = {1}", strAlias, TypeCode);
421
                if (Period != 0)
422
                    strWork += string.Format(" And {0}ExpensesPeriod = {1}", strAlias, Period);
423
                if (NameCode != 0)
424
                    strWork += string.Format(" And {0}NameCode = {1}", strAlias, NameCode);
425
            }
426
            catch (Exception ex)
427
            {
428
                logger.ErrorFormat("システムエラー:{0}:{1}:{2}", CommonMotions.GetMethodName(2), ex.Message, strWork);
429
            }
430

  
431
            return strWork;
432
        }
433
        #endregion
434
    }
435
}
trunk/src/ProcessManagement/ProcessManagement/DataModel/AttendanceData.cs
32 32
        /// </summary>
33 33
        private double      m_TotalOverTimes = 0;
34 34
        /// <summary>
35
        ///  申請日
36
        /// </summary>
37
        private DateTime    m_OrderDate = DateTime.MinValue;
38
        /// <summary>
35 39
        /// 申請受付番号
36 40
        /// </summary>
37 41
        private int         m_OrderNo = 0;
......
87 91
            set { m_TotalOverTimes = value; }
88 92
        }
89 93
        /// <summary>
94
        ///  申請日
95
        /// </summary>
96
        public DateTime OrderDate
97
        {
98
            get { return m_OrderDate; }
99
            set { m_OrderDate = value; }
100
        }
101
        /// <summary>
90 102
        /// 申請受付番号
91 103
        /// </summary>
92 104
        public int OrderNo
trunk/src/ProcessManagement/ProcessManagement/DataModel/ConstructionTypeMaster.cs
14 14
        private int         m_TypeCode = 0;	                    // 工事種別コード
15 15
        private int         m_DisplayOrder = 0;	                // 表示順
16 16
        private string      m_NameString = string.Empty;	    // 表示名称
17
        private int         m_SecRank = 0;                      // 保護区分ランク
17 18
        private int         m_PublicFlg = 0;                    // 公共工事フラグ
19
        private int         m_ExpensesLink = 0;                 // 経費使用区分
20

  
18 21
        private int         m_DeleteFlg = 0;	                // 削除フラグ
19 22
        private DateTime    m_EntryDate = DateTime.Now;         // 登録日付
20 23
        private DateTime    m_UpdateDate = DateTime.Now;        // 更新日付
......
49 52
            set { m_NameString = value; }
50 53
        }
51 54
        /// <summary>
55
        /// 保護区分ランク
56
        /// </summary>
57
        public int SecRank
58
        {
59
            get { return m_SecRank; }
60
            set { m_SecRank = value; }
61
        }
62
        /// <summary>
52 63
        /// 公共工事フラグ
53 64
        /// </summary>
54 65
        public int PublicFlg
......
57 68
            set { m_PublicFlg = value; }
58 69
        }
59 70
        /// <summary>
71
        /// 経費使用区分
72
        /// </summary>
73
        public int ExpensesLink
74
        {
75
            get { return m_ExpensesLink; }
76
            set { m_ExpensesLink = value; }
77
        }
78
        /// <summary>
60 79
        /// 削除フラグ
61 80
        /// </summary>
62 81
        public int DeleteFlg
trunk/src/ProcessManagement/ProcessManagement/DataModel/CostomerRegist.cs
11 11
    public class CostomerRegist
12 12
    {
13 13
        #region メンバ変数
14
        private int         m_PetitionNo = 0;                       // 登録申請年月
14
        private int         m_PersonCode = 0;                       // 申請者番号
15
        private DateTime    m_CreateDate = DateTime.Now;            // 作成日
15 16
        private int         m_SeqNo = 0;                            // 申請連番
17

  
16 18
        private int         m_PetitionPeriod = 0;                   // 申請年度
17
        private int         m_PersonCode = 0;                       // 申請者番号
18
        private DateTime    m_PetitionDate = DateTime.Now;          // 申請日
19 19
        
20 20
        private int         m_OrderFlg = 0;                         // 法人団体・個人フラグ
21 21
        private string      m_CorporateStatusName = string.Empty;	// 法人格名称
22
        private int         m_CorporateStatusPoint = 0;	            // 法人格名称
22
        private int         m_CorporateStatusPoint = 0;	            // 法人格名称位置
23 23
        private string      m_OrderersName1 = string.Empty;	        // 発注者名1
24 24
        private string      m_OrderersName2 = string.Empty;	        // 発注者名2
25 25

  
......
35 35
        private string      m_MailAddress = string.Empty;           // メールアドレス
36 36
        private string      m_note = string.Empty;	                // 備考
37 37
        private int         m_OrderCotegory = 0;                    // 発注者区分
38

  
39
        private DateTime    m_OrderDate = DateTime.MinValue;        // 申請日
38 40
        private int         m_OrderNo = 0;                          // 申請受付番号
39 41

  
40 42
        private DateTime    m_EntryDate = DateTime.Now;             // 登録日付
......
46 48

  
47 49
        #region プロパティ
48 50
        /// <summary>
49
        /// 登録申請番号
51
        /// 申請者番号
50 52
        /// </summary>
51
        public int PetitionNo
53
        public int PersonCode
52 54
        {
53
            get { return m_PetitionNo; }
54
            set { m_PetitionNo = value; }
55
            get { return m_PersonCode; }
56
            set { m_PersonCode = value; }
55 57
        }
56 58
        /// <summary>
59
        /// 作成日
60
        /// </summary>
61
        public DateTime CreateDate
62
        {
63
            get { return m_CreateDate; }
64
            set { m_CreateDate = value; }
65
        }
66
        /// <summary>
57 67
        /// 申請連番
58 68
        /// </summary>
59 69
        public int SeqNo
......
61 71
            get { return m_SeqNo; }
62 72
            set { m_SeqNo = value; }
63 73
        }
74

  
64 75
        /// <summary>
65 76
        /// 申請年度
66 77
        /// </summary>
......
69 80
            get { return m_PetitionPeriod; }
70 81
            set { m_PetitionPeriod = value; }
71 82
        }
83

  
72 84
        /// <summary>
73
        /// 申請者番号
74
        /// </summary>
75
        public int PersonCode
76
        {
77
            get { return m_PersonCode; }
78
            set { m_PersonCode = value; }
79
        }
80
        /// <summary>
81
        /// 申請日
82
        /// </summary>
83
        public DateTime PetitionDate
84
        {
85
            get { return m_PetitionDate; }
86
            set { m_PetitionDate = value; }
87
        }
88
        /// <summary>
89 85
        /// 法人団体・個人フラグ
90 86
        /// </summary>
91 87
        public int OrderFlg
......
213 209
            get { return m_OrderCotegory; }
214 210
            set { m_OrderCotegory = value; }
215 211
        }
212

  
216 213
        /// <summary>
214
        /// 申請日
215
        /// </summary>
216
        public DateTime OrderDate
217
        {
218
            get { return m_OrderDate; }
219
            set { m_OrderDate = value; }
220
        }
221
        /// <summary>
217 222
        /// 申請受付番号
218 223
        /// </summary>
219 224
        public int OrderNo
......
221 226
            get { return m_OrderNo; }
222 227
            set { m_OrderNo = value; }
223 228
        }
229

  
224 230
        /// <summary>
225 231
        /// 登録日付
226 232
        /// </summary>
trunk/src/ProcessManagement/ProcessManagement/DataModel/ProcessParameter.cs
32 32
        /// ブール値パラメータ
33 33
        /// </summary>
34 34
        private List<bool> m_BoolParameter = new List<bool>();
35
        /// <summary>
36
        /// 日付値パラメータ
37
        /// </summary>
38
        private List<DateTime> m_DateParameter = new List<DateTime>();
35 39

  
36 40
        /// <summary>
37 41
        /// 数値パラメータ
......
81 85
            set { m_BoolParameter = value; }
82 86
        }
83 87
        /// <summary>
88
        /// 日付値パラメータ
89
        /// </summary>
90
        public List<DateTime> DateExecParameter
91
        {
92
            get { return m_DateParameter; }
93
            set { m_DateParameter = value; }
94
        }
95
        /// <summary>
84 96
        /// 退避用数値パラメータ
85 97
        /// </summary>
86 98
        public List<int> IntSaveParameter
trunk/src/ProcessManagement/ProcessManagement/DataModel/TypeExpensesMaster.cs
1
using System;
2
using System.Collections.Generic;
3
using System.Linq;
4
using System.Text;
5

  
6
namespace ProcessManagement.DataModel
7
{
8
    /// <summary>
9
    /// 工事種別経費率マスタ
10
    /// </summary>
11
    public class TypeExpensesMaster
12
    {
13
        #region メンバ変数
14
        private int         m_TypeCode = 0;	                    // 工事種別コード
15
        private int         m_ExpensesPeriod = 0;               // 事業期
16
        private int         m_NameCode = 0;	                    // 経費区分コード
17
        private double      m_ExpensesRate = 0;	                // 経費率
18
        private int         m_DeleteFlg = 0;	                // 削除フラグ
19
        private DateTime    m_EntryDate = DateTime.Now;         // 登録日付
20
        private DateTime    m_UpdateDate = DateTime.Now;        // 更新日付
21
        #endregion
22

  
23
        #region コンストラクタ
24
        #endregion
25

  
26
        #region プロパティ
27
        /// <summary>
28
        /// 工事種別コード
29
        /// </summary>
30
        public int TypeCode
31
        {
32
            get { return m_TypeCode; }
33
            set { m_TypeCode = value; }
34
        }
35
        /// <summary>
36
        /// 事業期
37
        /// </summary>
38
        public int ExpensesPeriod
39
        {
40
            get { return m_ExpensesPeriod; }
41
            set { m_ExpensesPeriod = value; }
42
        }
43
        /// <summary>
44
        /// 経費区分コード
45
        /// </summary>
46
        public int NameCode
47
        {
48
            get { return m_NameCode; }
49
            set { m_NameCode = value; }
50
        }
51
        /// <summary>
52
        /// 経費率
53
        /// </summary>
54
        public double ExpensesRate
55
        {
56
            get { return m_ExpensesRate; }
57
            set { m_ExpensesRate = value; }
58
        }
59
        /// <summary>
60
        /// 削除フラグ
61
        /// </summary>
62
        public int DeleteFlg
63
        {
64
            get { return m_DeleteFlg; }
65
            set { m_DeleteFlg = value; }
66
        }
67
        /// <summary>
68
        /// 登録日付
69
        /// </summary>
70
        public DateTime EntryDate
71
        {
72
            set { m_EntryDate = value; }
73
            get { return m_EntryDate; }
74
        }
75
        /// <summary>
76
        /// 更新日付
77
        /// </summary>
78
        public DateTime UpdateDate
79
        {
80
            set { m_UpdateDate = value; }
81
            get { return m_UpdateDate; }
82
        }
83
        #endregion
84
    }
85
}
trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ApprovalPerson/FrmApprovalPerson.cs
75 75
        }
76 76
        #endregion
77 77

  
78
        #region ?\???E??\???E????{?^????u
79
        /// <summary>
80
        /// ?\???E??\???E????{?^????u
81
        /// </summary>
82
        Point[] s_ButtonPosition = new Point[] { new Point(6, 58), new Point(258, 58), new Point(510, 58) };
78 83
        #endregion
79 84

  
85
        #endregion
86

  
80 87
        #region ???
81 88
        /// <summary>
82 89
        /// ???x???R???g???[??????z??
......
111 118
        /// </summary>
112 119
        private int m_OrderNo = 0;
113 120
        /// <summary>
114
        /// ???????}??
121
        /// ???????t?L?[
115 122
        /// </summary>
116
        private List<int> m_PurchaseOrderSeqNo = new List<int>();
123
        private DateTime m_SearchDate = DateTime.MinValue;
117 124
        /// <summary>
125
        /// ?????}??L?[
126
        /// </summary>
127
        private int m_SearchSeqNo = 0;
128
        /// <summary>
118 129
        /// ?Y???H????{???
119 130
        /// </summary>
120 131
        private ConstructionBaseInfo m_ConstructionBaseInfo = new ConstructionBaseInfo();
......
158 169
            set { m_OrderNo = value; }
159 170
        }
160 171
        /// <summary>
161
        /// ???????}??
172
        /// ???????t?L?[
162 173
        /// </summary>
163
        public List<int> PurchaseOrderSeqNo
174
        public DateTime DataSearchDate
164 175
        {
165
            get { return m_PurchaseOrderSeqNo; }
166
            set { m_PurchaseOrderSeqNo = value; }
176
            get { return m_SearchDate; }
177
            set { m_SearchDate = value; }
167 178
        }
179
        /// <summary>
... 差分の行数が表示可能な上限を超えました。超過分は表示しません。

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