プロジェクト

全般

プロフィール

リビジョン 6

堀内8年以上前に追加

2016/9/16 最新ソースコミット

差分を表示:

trunk/src/ProcessManagement/ProcessManagement/Common/CommonDefine.cs
171 171
        /// </summary>
172 172
        public static int s_MsgBoardSystemCode = 99999998;
173 173
        public static string s_MsgBoardSystemNameFormat = "{0}からの連絡";
174
        
174

  
175 175
        /// <summary>
176 176
        /// メッセージ全員対象
177 177
        /// </summary>
178 178
        public static string s_AllMembersString = "全  員";
179 179
        public static int s_AllMembersCode = 99999999;
180
        
180

  
181 181
        /// <summary>
182 182
        /// 社長室コード(部署コード)
183 183
        /// </summary>
184 184
        public static int s_PresidentsOffice = 7;
185
        
185

  
186 186
        /// <summary>
187 187
        /// 総務部コード(部署コード)
188 188
        /// </summary>
......
1107 1107
            /// </summary>
1108 1108
            Labor,
1109 1109
        }
1110
        /// <summary>
1111
        /// 協力業者支払区分
1112
        /// </summary>
1113
        public static List<KeyValuePair<int, string>> s_SubContractorKind = new List<KeyValuePair<int, string>>(){
1114
                                                                            new KeyValuePair<int,string>(0,"通 常 業 者"),
1115
                                                                            new KeyValuePair<int,string>(1,"手 間 業 者")};
1110 1116
        #endregion
1111 1117

  
1112 1118
        #region 工事詳細台帳:集計フラグ
......
1126 1132
        }
1127 1133
        #endregion
1128 1134

  
1135
        #region 15期以前の経費
1136
        public static List<KeyValuePair<string, double>> BeforeExpenses = new List<KeyValuePair<string, double>>{
1137
                                                                                new KeyValuePair<string, double>("会社経費", 8.0),
1138
                                                                                new KeyValuePair<string, double>("営業経費", 5.0),
1139
                                                                                new KeyValuePair<string, double>("各部署経費", 7.0)};
1140

  
1141
        ///// <summary>
1142
        ///// 各所属部経費(7%)
1143
        ///// </summary>
1144
        //public static const double PartExpenses = 7.0;
1145
        ///// <summary>
1146
        ///// 事務所経費(8%)
1147
        ///// </summary>
1148
        //public static const double OfficeExpenes = 8.0;
1149
        ///// <summary>
1150
        ///// 営業経費(5%)
1151
        ///// </summary>
1152
        //public static const double SaleseExpenes = 5.0;
1153
        #endregion
1154

  
1155
        #region 担当者選択区分
1156
        /// <summary>
1157
        /// 担当者選択区分
1158
        /// </summary>
1159
        public enum PersonSelectFlg
1160
        {
1161
            /// <summary>
1162
            /// 無
1163
            /// </summary>
1164
            None = 0,
1165
            /// <summary>
1166
            /// 工事担当者
1167
            /// </summary>
1168
            Creator,
1169
            /// <summary>
1170
            /// 副担当者
1171
            /// </summary>
1172
            Assistant,
1173
            /// <summary>
1174
            /// 指導員
1175
            /// </summary>
1176
            Instructor,
1177
        }
1178
        #endregion
1179

  
1180
        #region 工事詳細台帳データ作成工事種別
1181
        /// <summary>
1182
        /// 工事詳細台帳データ作成工事種別
1183
        /// </summary>
1184
        public static int[] s_CreateLedgerData = new int[] { 6 };
1185
        #endregion
1186

  
1187
        #region 工事基本情報:紐付データフラグ
1188
        public enum BaseInfoTyingFlg
1189
        {
1190
            /// <summary>
1191
            /// 0:独立データ
1192
            /// </summary>
1193
            Standard = 0,
1194
            /// <summary>
1195
            /// 1:親データ
1196
            /// </summary>
1197
            Pearent,
1198
            /// <summary>
1199
            /// 2:紐付きデータ
1200
            /// </summary>
1201
            Tying,
1202
        }
1203
        #endregion
1129 1204
    }
1130 1205
}
trunk/src/ProcessManagement/ProcessManagement/Common/CommonMotions.cs
196 196
            }
197 197
            finally
198 198
            {
199
                ocDB.close();
200
                ocDB = null;
199
                ocDB.close(); ocDB = null;
201 200
            }
202 201
        }
203 202
        #endregion
......
1672 1671

  
1673 1672
        #endregion
1674 1673

  
1675
        #region 特殊操作
1674
        #region 工事管理システム専用
1676 1675
        #region 営業期数より工事年を取得する
1677 1676
        /// <summary>
1678 1677
        /// 営業期数より工事年を取得する
......
2114 2113
            return (int)((double)timespan.Days / 30.436875);
2115 2114
        }
2116 2115
        #endregion
2116

  
2117
        #region 工事種別より工事詳細台帳が作成OKかどうかをチェックする
2118
        /// <summary>
2119
        /// 工事種別より工事詳細台帳が作成OKかどうかをチェックする
2120
        /// </summary>
2121
        /// <param name="ConstructionType"></param>
2122
        /// <returns></returns>
2123
        public static bool CheckCreateLedgerData(int ConstructionStatusFlg, int ConstructionType)
2124
        {
2125
            try
2126
            {
2127
                bool ExcuteFlg = false;
2128
                int[] Status = new int[] { CommonDefine.ProjectsStatus.First(x => x.Value.Equals("営繕部継続工事")).Key };
2129
                for (int i = 0; i < CommonDefine.s_CreateLedgerData.Length; i++)
2130
                {
2131
                    if (ConstructionStatusFlg == Status[i] && ConstructionType == CommonDefine.s_CreateLedgerData[i])
2132
                    {
2133
                        ExcuteFlg = true;
2134
                        break;
2135
                    }
2136
                }
2137
                return ExcuteFlg;
2138
            }
2139
            catch (Exception ex)
2140
            {
2141
                logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message);
2142
                return false;
2143
            }
2144
        }
2117 2145
        #endregion
2118 2146

  
2147
        #endregion
2148

  
2119 2149
        #region Excel向け操作メソッド
2120 2150
        #region オブジェクト開放
2121 2151
        /// <summary>
trunk/src/ProcessManagement/ProcessManagement/Common/Process/ClsApprovalPermission.cs
98 98
                logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message);
99 99
                return false;
100 100
            }
101
            finally
102
            {
103
                ApprDB.close(); ApprDB = null;
104
            }
101 105
        }
102 106
        #endregion
103 107

  
......
185 189
            try
186 190
            {
187 191
                bool bApproval = false;
192
                // 申請部署の取得
188 193
                string strSQL = cbiDB.CreatePrimarykeyString(ConstructionCode);
189 194
                ConstructionBaseInfo cbiData = new ConstructionBaseInfo();
190 195
                if (!cbiDB.SelectAction(strSQL, ref cbiData)) return false;
......
363 368
        public static int GetFromConstructionAndApprovalTheDepartment(int ConstructionCode, int ApprovalCode)
364 369
        {
365 370
            IOMPersonInCharge picDB = new IOMPersonInCharge();
371
            IOProcessApproval ApprovalDB = new IOProcessApproval();
366 372
            try
367 373
            {
368 374
                // 管理担当者コードを取得する
369
                int CurrentPersonCode = GetFromConstructionAndApprovalThePerson(ConstructionCode, ApprovalCode);
375
                string strSQL = ApprovalDB.CreatePrimarykeyString(ConstructionCode, ApprovalCode);
376
                strSQL += " AND SEQNO = 1";
377
                ProcessApproval ApprovalRec = new ProcessApproval();
378
                int CurrentPersonCode = 0;
379
                if (ApprovalDB.SelectAction(strSQL, ref ApprovalRec))
380
                {   // 申請データがある時はそのデータ
381
                    CurrentPersonCode = ApprovalRec.PersonCode;
382
                }
383
                else
384
                {
385
                    // データが無い場合(申請時)はログインユーザー
386
                    CurrentPersonCode = CommonMotions.LoginUserData.PersonCode;
387
                }
370 388

  
371 389
                // 担当者部署取得
372 390
                PersonInChargeMaster PersonRec = new PersonInChargeMaster();
......
382 400
            }
383 401
            finally
384 402
            {
403
                ApprovalDB.close(); ApprovalDB = null;
385 404
                picDB.close(); picDB = null;
386 405
            }
387 406
        }
......
421 440
                {
422 441
                    CurrentPersonCode = baseRec.ConstructionPersonCode;
423 442
                }
443
                else if (AppString.Equals("継続案件承認"))
444
                {
445
                    CurrentPersonCode = baseRec.ConstructionPersonCode;
446
                }
424 447
                else if (AppString.Equals("請求書承認"))
425 448
                {
426 449
                    CurrentPersonCode = baseRec.ConstructionPersonCode;
trunk/src/ProcessManagement/ProcessManagement/Common/Process/ClsCreateLedgerData.cs
160 160
            finally
161 161
            {
162 162
                CostDB.close(); CostDB = null;
163
                LedgerDB.close(); LedgerDB = null;
164
                LedgerDetailDB.close(); LedgerDetailDB = null;
163 165
                LedgerExcuteDB.close(); LedgerExcuteDB = null;
164 166
            }
165 167
        }
......
325 327
        }
326 328
        #endregion
327 329

  
328
        #region 工事詳細台帳データを作成する
330
        #region 工事詳細台帳データを新規作成する
329 331
        /// <summary>
330
        /// 工事予算書作成時等で工事詳細台帳データを作成する
332
        /// 工事詳細台帳データを新規作成する
331 333
        /// </summary>
332 334
        /// <param name="ConstructionCode"></param>
333 335
        /// <returns></returns>
334
        public static bool CreateLedgerData(int ConstructionCode)
336
        public static bool MakingLedgerData(int ConstructionCode)
335 337
        {
336 338
            IOConstructionLedger LedgerDB = new IOConstructionLedger();
337 339
            FrmConstructionLedger frm = new FrmConstructionLedger();
......
350 352
                frm.ConstructionCode = ConstructionCode;
351 353

  
352 354
                // 見えない画面を出す
355
                frm.WindowState = FormWindowState.Minimized;
353 356
                frm.Show();
354 357
                // フォーム非表示
355 358
                frm.Visible = false;
356 359

  
357 360
                // データ作成処理
358
                if (!frm.CreateLedgerData) return false;
361
                if (!frm.SaveLedgerData)
362
                {
363
                    frm.Close();                    // 画面を閉じる
364
                    return false;
365
                }
359 366

  
360 367
                // 画面を閉じる
361 368
                frm.Close();
369

  
370
                return true;
362 371
            }
363 372
            catch (System.Exception ex)
364 373
            {
......
370 379
                frm.Dispose(); frm = null;
371 380
                LedgerDB.close(); LedgerDB = null;
372 381
            }
373
            return true;
374 382
        }
375 383
        #endregion
384

  
385
        #region 工事詳細台帳データに増減データを追加する
386
        /// <summary>
387
        /// 工事詳細台帳データに増減データを追加する
388
        /// </summary>
389
        /// <param name="ConstructionCode"></param>
390
        /// <returns></returns>
391
        public static bool AddingLedgerData(int ConstructionCode)
392
        {
393
            IOConstructionLink LinkDB = new IOConstructionLink();
394
            IOConstructionLedger LedgerDB = new IOConstructionLedger();
395
            FrmConstructionLedger frm = new FrmConstructionLedger();
396
            try
397
            {
398

  
399
                // 工事番号が存在しないデータは更新しない
400
                if (ConstructionCode == 0) return false;
401

  
402
                // 親の工事を探す
403
                string strParent = string.Format(" WHERE FluctuationCode = {0}", ConstructionCode);
404
                ConstructionLink LinkRec = new ConstructionLink();
405
                if (!LinkDB.SelectAction(strParent, ref LinkRec)) return false;
406

  
407
                // 工事詳細台帳データが無い場合は処理しない
408
                string strExists = LedgerDB.CreatePrimarykeyString(LinkRec.ConstructionCode);
409
                ConstructionLedger LedgerList = new ConstructionLedger();
410
                if (!LedgerDB.SelectAction(strExists, ref LedgerList)) return false;
411

  
412
                // 工事コードのセット
413
                frm.ConstructionCode = LinkRec.ConstructionCode;
414

  
415
                // 見えない画面を出す
416
                frm.WindowState = FormWindowState.Minimized;
417
                frm.Show();
418
                // フォーム非表示
419
                frm.Visible = false;
420
                
421
                // データを追加する
422
                frm.AddingConstrCode = ConstructionCode;
423
                if (!frm.AddDataLedger)
424
                {
425
                    frm.Close();                    // 画面を閉じる
426
                    return false;
427
                }
428

  
429
                // データ作成処理
430
                if (!frm.SaveLedgerData)
431
                {
432
                    frm.Close();                    // 画面を閉じる
433
                    return false;
434
                }
435

  
436
                // 画面を閉じる
437
                frm.Close();
438

  
439
                return true;
440
            }
441
            catch (System.Exception ex)
442
            {
443
                logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message);
444
                return false;
445
            }
446
            finally
447
            {
448
                frm.Dispose(); frm = null;
449
                LedgerDB.close(); LedgerDB = null;
450
                LinkDB.close(); LinkDB = null;
451
            }
452
        }
453
        #endregion
376 454
    }
377 455
}
trunk/src/ProcessManagement/ProcessManagement/Common/Process/ClsExcute.cs
133 133
                                                                                {10, "注文書-印刷"},
134 134
                                                                                {12, "工事詳細台帳-入力"},
135 135
                                                                                {13, "交通費及び購入品等-入力"},
136
                                                                                {14, "日報-一覧"},
136
                                                                                {14, "工事日報-一覧"},
137 137
                                                                                {15, "工事日報-入力"},
138 138
                                                                                };
139 139

  
......
219 219
                                                                    Color.DarkOrange,
220 220
                                                                    Color.IndianRed,
221 221
                                                                    Color.Gray,
222
                                                                    Color.SlateGray,
223 222
                                                                    Color.Chartreuse,
224 223
                                                                    Color.SpringGreen,
224
                                                                    Color.SlateGray,
225 225
                                                                    Color.LightSeaGreen,
226 226
                                                                    Color.SteelBlue,
227 227
                                                                    Color.LawnGreen,
trunk/src/ProcessManagement/ProcessManagement/Common/Process/ClsProcessExist.cs
67 67

  
68 68
        #endregion
69 69

  
70
        #region 実行可能プロセスの一覧を取得する
70
        #region 紐付きの場合は親コードを返す
71 71
        /// <summary>
72
        /// 実行可能プロセスの一覧を取得する
72
        /// 紐付きの場合は親コードを返す
73 73
        /// </summary>
74
        /// <param name="ConctructionCode"></param>
75
        public static void GetProcessList(ref List<KeyValuePair<int,string>> ProcList, int OperationPrcess)
74
        /// <param name="MyType"></param>
75
        /// <param name="MyCode"></param>
76
        /// <returns></returns>
77
        public static int GetParentConstrCode(int MyCode)
76 78
        {
77
            // 0:メニューへ戻る
78
            int MenuProcNo = (int)ClsExcute.ProcessExecuteNo.MainMenu;
79
            string MenuProcName = "メニューへ戻る";
80
            ProcList.Add(new KeyValuePair<int, string>(MenuProcNo, MenuProcName)); 
81
            
82
            // 2:工事情報入力データの存在確認
83
            if (ExistBaseInfoData())
79
            IOConstructionBaseInfo BaseDB = new IOConstructionBaseInfo();
80
            IOConstructionLink LinkDB = new IOConstructionLink();
81
            try
84 82
            {
85
                int ProcNo = (int)ClsExcute.ProcessExecuteNo.ConstructionBaseInfo;
86
                string ProcName = ClsExcute.ProcessExecuteName[ProcNo].Replace("-", "");
87
                ProcList.Add(new KeyValuePair<int, string>(ProcNo, ProcName));
83

  
84
                string strBase = BaseDB.CreatePrimarykeyString(MyCode);
85
                ConstructionBaseInfo BaseRec = new ConstructionBaseInfo();
86
                if (!BaseDB.SelectAction(strBase, ref BaseRec)) return MyCode;
87

  
88
                // 紐付きでない場合は工事コードを返す
89
                if (BaseRec.TyingFlg != (int)CommonDefine.BaseInfoTyingFlg.Tying) return MyCode;
90

  
91
                string strLink = string.Format(" WHERE FluctuationCode = {0}", MyCode);
92
                ConstructionLink LinkRec = new ConstructionLink();
93
                if (!LinkDB.SelectAction(strLink, ref LinkRec)) return MyCode;
94

  
95
                return LinkRec.ConstructionCode;
88 96
            }
89
            // 3:積算見積書入力データ存在確認
90
            if (ExistEstimateData(OperationPrcess))
97
            catch (Exception ex)
91 98
            {
92
                int ProcNo = (int)ClsExcute.ProcessExecuteNo.EstimateInput;
93
                string ProcName = ClsExcute.ProcessExecuteName[ProcNo].Replace("-", "");
94
                ProcList.Add(new KeyValuePair<int, string>(ProcNo, ProcName));
99
                logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message);
100
                return MyCode;
95 101
            }
96
            // 4:積算見積書印刷データ存在確認
97
            if (ExistEstimateDataPrint())
102
            finally
98 103
            {
99
                int ProcNo = (int)ClsExcute.ProcessExecuteNo.EstimatePrint;
100
                string ProcName = ClsExcute.ProcessExecuteName[ProcNo].Replace("-", "");
101
                ProcList.Add(new KeyValuePair<int, string>(ProcNo, ProcName));
104
                BaseDB.close(); BaseDB = null;
105
                LinkDB.close(); LinkDB = null;
102 106
            }
103
            // 5:積算予算書入力データ存在確認
104
            if (ExistEstimateBudget(OperationPrcess))
107
        }
108
        #endregion
109

  
110
        #region 実行可能プロセスの一覧を取得する
111
        /// <summary>
112
        /// 実行可能プロセスの一覧を取得する
113
        /// </summary>
114
        /// <param name="ConctructionCode"></param>
115
        public static void GetProcessList(ref List<KeyValuePair<int,string>> ProcList, int OperationPrcess)
116
        {
117
            try
105 118
            {
106
                int ProcNo = (int)ClsExcute.ProcessExecuteNo.EstimateBudget;
107
                string ProcName = ClsExcute.ProcessExecuteName[ProcNo].Replace("-", "");
108
                ProcList.Add(new KeyValuePair<int, string>(ProcNo, ProcName));
119
                // 0:メニューへ戻る
120
                int MenuProcNo = (int)ClsExcute.ProcessExecuteNo.MainMenu;
121
                string MenuProcName = "メニューへ戻る";
122
                ProcList.Add(new KeyValuePair<int, string>(MenuProcNo, MenuProcName));
123

  
124
                // 2:工事情報入力データの存在確認
125
                if (ExistBaseInfoData())
126
                {
127
                    int ProcNo = (int)ClsExcute.ProcessExecuteNo.ConstructionBaseInfo;
128
                    string ProcName = ClsExcute.ProcessExecuteName[ProcNo].Replace("-", "").Replace("入力", "");
129
                    ProcList.Add(new KeyValuePair<int, string>(ProcNo, ProcName));
130
                }
131
                // 3:積算見積書入力データ存在確認
132
                if (ExistEstimateData(OperationPrcess))
133
                {
134
                    int ProcNo = (int)ClsExcute.ProcessExecuteNo.EstimateInput;
135
                    string ProcName = ClsExcute.ProcessExecuteName[ProcNo].Replace("-", "").Replace("入力", "");
136
                    ProcList.Add(new KeyValuePair<int, string>(ProcNo, ProcName));
137
                }
138
                // 4:積算見積書印刷データ存在確認
139
                if (ExistEstimateDataPrint())
140
                {
141
                    int ProcNo = (int)ClsExcute.ProcessExecuteNo.EstimatePrint;
142
                    string ProcName = ClsExcute.ProcessExecuteName[ProcNo].Replace("-", "").Replace("入力", "");
143
                    ProcList.Add(new KeyValuePair<int, string>(ProcNo, ProcName));
144
                }
145
                // 5:積算予算書入力データ存在確認
146
                if (ExistEstimateBudget(OperationPrcess))
147
                {
148
                    int ProcNo = (int)ClsExcute.ProcessExecuteNo.EstimateBudget;
149
                    string ProcName = ClsExcute.ProcessExecuteName[ProcNo].Replace("-", "").Replace("入力", "");
150
                    ProcList.Add(new KeyValuePair<int, string>(ProcNo, ProcName));
151
                }
152
                // 6:工事予算書入力データ存在確認
153
                if (ExistConstructionBudget())
154
                {
155
                    int ProcNo = (int)ClsExcute.ProcessExecuteNo.ConstructionBudget;
156
                    string ProcName = ClsExcute.ProcessExecuteName[ProcNo].Replace("-", "").Replace("入力", "");
157
                    ProcList.Add(new KeyValuePair<int, string>(ProcNo, ProcName));
158
                }
159
                // 8:工事案件コピー機能データ存在確認
160
                if (ExistConstructionDataCopy())
161
                {
162
                    int ProcNo = (int)ClsExcute.ProcessExecuteNo.ConstructionCopyList;
163
                    string ProcName = ClsExcute.ProcessExecuteName[ProcNo].Replace("-", "").Replace("入力", "");
164
                    ProcList.Add(new KeyValuePair<int, string>(ProcNo, ProcName));
165
                }
166
                // 9:注文書入力データ存在確認
167
                if (ExistPurchaseOrder())
168
                {
169
                    int ProcNo = (int)ClsExcute.ProcessExecuteNo.PurchaseOrderEntry;
170
                    string ProcName = ClsExcute.ProcessExecuteName[ProcNo].Replace("-", "").Replace("入力", "");
171
                    ProcList.Add(new KeyValuePair<int, string>(ProcNo, ProcName));
172
                }
173
                //10:注文書印刷データ存在確認
174
                if (ExistPurchasePrint())
175
                {
176
                    int ProcNo = (int)ClsExcute.ProcessExecuteNo.PurchaseOrderPrint;
177
                    string ProcName = ClsExcute.ProcessExecuteName[ProcNo].Replace("-", "").Replace("入力", "");
178
                    ProcList.Add(new KeyValuePair<int, string>(ProcNo, ProcName));
179
                }
180
                // 12:工事詳細台帳
181
                if (ExistConstructionLedger())
182
                {
183
                    int ProcNo = (int)ClsExcute.ProcessExecuteNo.ConstructionLedger;
184
                    string ProcName = ClsExcute.ProcessExecuteName[ProcNo].Replace("-", "").Replace("入力", "");
185
                    ProcList.Add(new KeyValuePair<int, string>(ProcNo, ProcName));
186
                }
187
                // 13:交通費及び購入品入力
188
                if (ExistTAndPCosts())
189
                {
190
                    int ProcNo = (int)ClsExcute.ProcessExecuteNo.TAndPCosts;
191
                    string ProcName = ClsExcute.ProcessExecuteName[ProcNo].Replace("-", "").Replace("入力", "");
192
                    ProcList.Add(new KeyValuePair<int, string>(ProcNo, ProcName));
193
                }
194
                //// 15:日報一覧
195
                //if (ExistDRConstruction())
196
                //{
197
                //    int ProcNo = (int)ClsExcute.ProcessExecuteNo.DRConstruction;
198
                //    string ProcName = ClsExcute.ProcessExecuteName[ProcNo].Replace("-", "").Replace("入力", "");
199
                //    ProcList.Add(new KeyValuePair<int, string>(ProcNo, ProcName));
200
                //}
109 201
            }
110
            // 6:工事予算書入力データ存在確認
111
            if (ExistConstructionBudget())
202
            catch (Exception ex)
112 203
            {
113
                int ProcNo = (int)ClsExcute.ProcessExecuteNo.ConstructionBudget;
114
                string ProcName = ClsExcute.ProcessExecuteName[ProcNo].Replace("-", "");
115
                ProcList.Add(new KeyValuePair<int, string>(ProcNo, ProcName));
204
                logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message);
116 205
            }
117
            // 8:工事案件コピー機能データ存在確認
118
            if (ExistConstructionDataCopy())
119
            {
120
                int ProcNo = (int)ClsExcute.ProcessExecuteNo.ConstructionCopyList;
121
                string ProcName = ClsExcute.ProcessExecuteName[ProcNo].Replace("-", "");
122
                ProcList.Add(new KeyValuePair<int, string>(ProcNo, ProcName));
123
            }
124
            // 9:注文書入力データ存在確認
125
            if (ExistPurchaseOrder())
126
            {
127
                int ProcNo = (int)ClsExcute.ProcessExecuteNo.PurchaseOrderEntry;
128
                string ProcName = ClsExcute.ProcessExecuteName[ProcNo].Replace("-", "");
129
                ProcList.Add(new KeyValuePair<int, string>(ProcNo, ProcName));
130
            }
131
            //10:注文書印刷データ存在確認
132
            if (ExistPurchasePrint())
133
            {
134
                int ProcNo = (int)ClsExcute.ProcessExecuteNo.PurchaseOrderPrint;
135
                string ProcName = ClsExcute.ProcessExecuteName[ProcNo].Replace("-", "");
136
                ProcList.Add(new KeyValuePair<int, string>(ProcNo, ProcName));
137
            }
138
            // 12:工事詳細台帳
139
            if (ExistConstructionLedger())
140
            {
141
                int ProcNo = (int)ClsExcute.ProcessExecuteNo.ConstructionLedger;
142
                string ProcName = ClsExcute.ProcessExecuteName[ProcNo].Replace("-", "");
143
                ProcList.Add(new KeyValuePair<int, string>(ProcNo, ProcName));
144
            }
145
            // 13:交通費及び購入品入力
146
            if (ExistTAndPCosts())
147
            {
148
                int ProcNo = (int)ClsExcute.ProcessExecuteNo.TAndPCosts;
149
                string ProcName = ClsExcute.ProcessExecuteName[ProcNo].Replace("-", "");
150
                ProcList.Add(new KeyValuePair<int, string>(ProcNo, ProcName));
151
            }
152

  
153 206
        }
154 207
        #endregion
155 208

  
......
292 345
        /// <returns></returns>
293 346
        private static bool ExistConstructionBudget()
294 347
        {
348
            IOConstructionBaseInfo BaseDB = new IOConstructionBaseInfo();
295 349
            IOEstimateData EstimateDB = new IOEstimateData();
296 350
            IOProcessApproval ApprovalDB = new IOProcessApproval();
297 351
            try
298 352
            {
353
                // 工事担当者のセット
354
                string strSQL = BaseDB.CreatePrimarykeyString(m_ConstructionCode);
355
                strSQL += " AND CONSTRUCTIONPERSONCODE != 0";
356
                ConstructionBaseInfo BaseRec = new ConstructionBaseInfo();
357
                if (!BaseDB.SelectAction(strSQL, ref BaseRec)) return false;
358

  
299 359
                // 見積書データの存在チェック
300
                string strSQL = EstimateDB.CreatePrimarykeyString(m_ConstructionCode);
360
                strSQL = EstimateDB.CreatePrimarykeyString(m_ConstructionCode);
301 361
                List<EstimateData> EstimateList = new List<EstimateData>();
302 362
                if (!EstimateDB.SelectAction(strSQL, ref EstimateList)) return false;
303 363

  
......
318 378
            {
319 379
                EstimateDB.close(); EstimateDB = null;
320 380
                ApprovalDB.close(); ApprovalDB = null;
381
                BaseDB.close(); BaseDB = null;
321 382
            }
322 383
        }
323 384
        #endregion
......
440 501
        /// <returns></returns>
441 502
        private static bool ExistConstructionLedger()
442 503
        {
504
            IOConstructionLedger LedgerDB = new IOConstructionLedger();
443 505
            IOConstructionBudget BudgetDB = new IOConstructionBudget();
444 506
            IOProcessApproval ApprovalDB = new IOProcessApproval();
445 507
            try
446 508
            {
447 509
                // 工事詳細台帳データの存在チェック
448
                string strSQL = BudgetDB.CreatePrimarykeyString(m_ConstructionCode);
449
                ConstructionBudget BudgetList = new ConstructionBudget();
450
                if (!BudgetDB.SelectAction(strSQL, ref BudgetList)) return false;
510
                string strSQL = LedgerDB.CreatePrimarykeyString(m_ConstructionCode);
511
                ConstructionLedger LedgerRec = new ConstructionLedger();
512
                if (LedgerDB.SelectAction(strSQL, ref LedgerRec)) return true;
451 513

  
514
                // 工事予算書データの存在チェック
515
                strSQL = BudgetDB.CreatePrimarykeyString(m_ConstructionCode);
516
                ConstructionBudget BudgetRec = new ConstructionBudget();
517
                if (!BudgetDB.SelectAction(strSQL, ref BudgetRec)) return false;
518

  
452 519
                // 承認データの確認
453 520
                strSQL += string.Format(" AND APPROVALCODE = {0} AND SEQNO = 1", (int)ClsExcute.ApprovalListNo.ConstructionBudgetApproval);
454 521
                strSQL += string.Format("  AND APPROVALSTATUS = {0}", (int)CommonDefine.ApprovalStatus.Approval);
522

  
455 523
                ProcessApproval ApprovalRec = new ProcessApproval();
456 524
                if (!ApprovalDB.SelectAction(strSQL, ref ApprovalRec)) return false;
457 525

  
......
464 532
            }
465 533
            finally
466 534
            {
535
                LedgerDB.close(); LedgerDB = null;
467 536
                BudgetDB.close(); BudgetDB = null;
468 537
                ApprovalDB.close(); ApprovalDB = null;
469 538
            }
......
499 568
        }
500 569
        #endregion
501 570

  
571
        #region 15:日報入力存在確認
572
        /// <summary>
573
        /// 15:日報入力存在確認
574
        /// </summary>
575
        /// <returns></returns>
576
        private static bool ExistDRConstruction()
577
        {
578
            IOConstructionLedger LedgerDB = new IOConstructionLedger();
579
            try
580
            {
581
                // 工事詳細台帳データの存在チェック
582
                string strSQL = LedgerDB.CreatePrimarykeyString(m_ConstructionCode);
583
                ConstructionLedger LedgerList = new ConstructionLedger();
584
                if (!LedgerDB.SelectAction(strSQL, ref LedgerList)) return false;
585

  
586
                return true;
587
            }
588
            catch (Exception ex)
589
            {
590
                logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message);
591
                return false;
592
            }
593
            finally
594
            {
595
                LedgerDB.close(); LedgerDB = null;
596
            }
597
        }
598
        #endregion
502 599
    }
503 600
}
trunk/src/ProcessManagement/ProcessManagement/Common/Process/ClsSystemOnceExecute.cs
424 424
                    if (ErrFlg)
425 425
                    {
426 426
                        TermRec = wrkCheck;
427
                        sErrorMessage = wrkCheck.SendTitile + "/" + wrkCheck.SendMessage;
427
                        sErrorMessage = wrkCheck.SendTitle + "/" + wrkCheck.SendMessage;
428 428
                        sBackColor = wrkCheck.BackColor;
429 429
                        sForeColor = wrkCheck.ForeColor;
430 430

  
......
494 494
                WriteData.FromCode = CommonDefine.s_MsgBoardSystemCode;	                                    // 書込み者コード
495 495
                WriteData.FromName = string.Format(CommonDefine.s_MsgBoardSystemNameFormat, "秘書");          // 書込み者名
496 496

  
497
                WriteData.MessageTitile = CheckRec.SendTitile;                                              // 伝言タイトル
497
                WriteData.MessageTitle = CheckRec.SendTitle;                                              // 伝言タイトル
498 498

  
499 499
                // リンク情報
500 500
                WriteData.LinkType = (int)CommonDefine.LinkType.ConstructionInfo;
......
558 558
                int iCode2 = CommonDefine.ProjectsStatus.First(x => x.Value.Equals("依頼受け中")).Key;
559 559
                int iCode3 = CommonDefine.ProjectsStatus.First(x => x.Value.Equals("見積提出")).Key;
560 560

  
561
                string strSQL = string.Format("UPDATE CONSTRUCTIONBASEINFO SET CONSTRUCTIONSTATUSFLG = {0}", iCode1);
561
                // 対象データが存在するかを確認する
562
                string strSQL = "SELECT COUNT(*) FROM CONSTRUCTIONBASEINFO WHERE TRUNC(ESTIMATESSUBMITTEDDATE) != TO_DATE('0001/01/01','YYYY/MM/DD')";
563
                strSQL += string.Format(" AND TRUNC(ESTIMATESSUBMITTEDDATE + {0})", s_NonOrderDay);
564
                strSQL += string.Format(" < TO_DATE('{0}','YYYY/MM/DD')", DateTime.Now.ToShortDateString());
565
                strSQL += string.Format(" AND CONSTRUCTIONSTATUSFLG IN({0}, {1})", iCode2, iCode3);
566
                strSQL += string.Format(" AND ESTIMATETYPE IN ({0}, {1})", (int)CommonDefine.BaseInfoEstimateType.Normal, (int)CommonDefine.BaseInfoEstimateType.GetBudget);
567
                ArrayList arList = new ArrayList();
568
                if (!BaseDB.ExecuteReader(strSQL, ref arList))
569
                {
570
                    logger.ErrorFormat("工事基本情報更新エラー 非受注案件移行処理失敗:{0}:{1}", CommonMotions.GetMethodName(), strSQL);
571
                    return;
572
                }
573
                object[] wrkcount = (object[])arList[0];
574
                if (Common.CommonMotions.cnvInt(wrkcount[0]) == 0) return;
575

  
576
                // 対象データが存在すれば更新する
577
                strSQL = string.Format("UPDATE CONSTRUCTIONBASEINFO SET CONSTRUCTIONSTATUSFLG = {0}", iCode1);
562 578
                strSQL += " WHERE CONSTRUCTIONCODE IN";
563
                strSQL += " (SELECT CONSTRUCTIONCODE FROM CONSTRUCTIONBASEINFO WHERE TRUNC(ESTIMATESSUBMITTEDDATE) != TO_DATE('001/01/01','YYYY/MM/DD')";
579
                strSQL += " (SELECT CONSTRUCTIONCODE FROM CONSTRUCTIONBASEINFO WHERE TRUNC(ESTIMATESSUBMITTEDDATE) != TO_DATE('0001/01/01','YYYY/MM/DD')";
564 580
                strSQL += string.Format(" AND TRUNC(ESTIMATESSUBMITTEDDATE + {0})", s_NonOrderDay);
565 581
                strSQL += string.Format(" < TO_DATE('{0}','YYYY/MM/DD')", DateTime.Now.ToShortDateString());
566 582
                strSQL += string.Format(" AND CONSTRUCTIONSTATUSFLG IN({0}, {1})", iCode2, iCode3);
567 583
                strSQL += string.Format(" AND ESTIMATETYPE IN ({0}, {1}))", (int)CommonDefine.BaseInfoEstimateType.Normal, (int)CommonDefine.BaseInfoEstimateType.GetBudget);
568

  
569 584
                if (!BaseDB.ExecuteNonQuery(strSQL))
570 585
                {
571 586
                    logger.ErrorFormat("工事基本情報更新エラー 非受注案件移行処理失敗:{0}:{1}", CommonMotions.GetMethodName(), strSQL);
trunk/src/ProcessManagement/ProcessManagement/Common/Process/ClsUpDate.cs
19 19
        private static readonly log4net.ILog logger = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
20 20
        #endregion
21 21

  
22
        #region ファイルのハッシュ値と更新日付を確認する
22 23
        /// <summary>
23 24
        /// ファイルのハッシュ値と更新日付を確認する
24 25
        /// </summary>
......
34 35

  
35 36
                // デバック以外は使わない
36 37
                //return true;
38
                // 接続できなければ処理しない
39
                if (!Directory.Exists(CommonDefine.s_UPDATE_FILE_PATH)) return true;
37 40

  
38 41
                // コピー元(サーバー)ファイルリストを取得する
39 42
                string[] files = Directory.GetFiles(CommonDefine.s_UPDATE_FILE_PATH);
......
106 109
                return false;
107 110
            }
108 111
        }
112
        #endregion
109 113
    }
110 114
}
trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOConstructionBaseInfo.cs
31 31
        /// <summary>
32 32
        /// 工事基本情報フィールド並び
33 33
        /// </summary>
34
        public enum ConstructionBaseInfoColumn
34
        public enum TableColumn
35 35
        {
36 36
            CONSTRUCTION_CODE = 0,
37
            TYINGFLG,
37 38
            CONSTRUCTION_YEAR,
38 39
            CONSTRUCTION_PERIOD,
39 40
            REQUESTED_DATE,
......
103 104
            string strcmd = "SELECT";
104 105

  
105 106
            strcmd += "  ConstructionCode";
107
            strcmd += ", TyingFlg";
106 108
            strcmd += ", ConstructionYear";
107 109
            strcmd += ", ConstructionPeriod";
108 110
            strcmd += ", TO_CHAR(RequestedDate, 'YYYY/MM/DD')";
......
236 238
                    strcmd += " VALUES (";
237 239

  
238 240
                    strcmd += string.Format("  {0}", data.ConstructionCode);
241
                    strcmd += string.Format(", {0}", data.TyingFlg);
239 242
                    strcmd += string.Format(", {0}", data.ConstructionYear);
240 243
                    strcmd += string.Format(", {0}", data.ConstructionPeriod);
241 244

  
......
345 348
                strcmd += " SET";
346 349

  
347 350
                strcmd += string.Format(" ConstructionCode = {0}", data.ConstructionCode);
351
                strcmd += string.Format(", TyingFlg = {0}", data.TyingFlg);
348 352
                strcmd += string.Format(", ConstructionYear = {0}", data.ConstructionYear);
349 353
                strcmd += string.Format(", ConstructionPeriod = {0}", data.ConstructionPeriod);
350 354

  
......
451 455
            try
452 456
            {
453 457
                // データ取得
454
                wrk.ConstructionCode = int.Parse(objwrk[(int)ConstructionBaseInfoColumn.CONSTRUCTION_CODE].ToString());
455
                wrk.ConstructionYear = int.Parse(objwrk[(int)ConstructionBaseInfoColumn.CONSTRUCTION_YEAR].ToString());
456
                wrk.ConstructionPeriod = int.Parse(objwrk[(int)ConstructionBaseInfoColumn.CONSTRUCTION_PERIOD].ToString());
458
                wrk.ConstructionCode = int.Parse(objwrk[(int)TableColumn.CONSTRUCTION_CODE].ToString());
459
                wrk.TyingFlg = int.Parse(objwrk[(int)TableColumn.TYINGFLG].ToString());
460
                wrk.ConstructionYear = int.Parse(objwrk[(int)TableColumn.CONSTRUCTION_YEAR].ToString());
461
                wrk.ConstructionPeriod = int.Parse(objwrk[(int)TableColumn.CONSTRUCTION_PERIOD].ToString());
457 462

  
458
                wrk.RequestedDate = DateTime.Parse(objwrk[(int)ConstructionBaseInfoColumn.REQUESTED_DATE].ToString());
459
                wrk.EstimatesSubmitDeadline = DateTime.Parse(objwrk[(int)ConstructionBaseInfoColumn.ESTIMATESSUBMITDEADLINE].ToString());
460
                wrk.EstimatesSubmittedDate = DateTime.Parse(objwrk[(int)ConstructionBaseInfoColumn.ESTIMATESSUBMITTED_DATE].ToString());
461
                wrk.ProvisionalOrderDate = DateTime.Parse(objwrk[(int)ConstructionBaseInfoColumn.PROVISIONALORDERDATE].ToString());
462
                wrk.OrderDate = DateTime.Parse(objwrk[(int)ConstructionBaseInfoColumn.ORDER_DATE].ToString());
463
                wrk.OrderStartingDate = DateTime.Parse(objwrk[(int)ConstructionBaseInfoColumn.ORDERSTARTINGDATE].ToString());
464
                wrk.OrderCompletionDate = DateTime.Parse(objwrk[(int)ConstructionBaseInfoColumn.ORDERCOMPLETIONDATE].ToString());
465
                wrk.PreparationStartDate = DateTime.Parse(objwrk[(int)ConstructionBaseInfoColumn.PREPARATIONSTARTDATE].ToString());
466
                wrk.ConstructionStartingDate = DateTime.Parse(objwrk[(int)ConstructionBaseInfoColumn.CONSTRUCTIONSTARTINGDATE].ToString());
467
                wrk.ConstructionCompletionDate = DateTime.Parse(objwrk[(int)ConstructionBaseInfoColumn.CONSTRUCTIONCOMPLETION_DATE].ToString());
468
                wrk.NonOrderDate = DateTime.Parse(objwrk[(int)ConstructionBaseInfoColumn.NONORDERDATE].ToString());
463
                wrk.RequestedDate = DateTime.Parse(objwrk[(int)TableColumn.REQUESTED_DATE].ToString());
464
                wrk.EstimatesSubmitDeadline = DateTime.Parse(objwrk[(int)TableColumn.ESTIMATESSUBMITDEADLINE].ToString());
465
                wrk.EstimatesSubmittedDate = DateTime.Parse(objwrk[(int)TableColumn.ESTIMATESSUBMITTED_DATE].ToString());
466
                wrk.ProvisionalOrderDate = DateTime.Parse(objwrk[(int)TableColumn.PROVISIONALORDERDATE].ToString());
467
                wrk.OrderDate = DateTime.Parse(objwrk[(int)TableColumn.ORDER_DATE].ToString());
468
                wrk.OrderStartingDate = DateTime.Parse(objwrk[(int)TableColumn.ORDERSTARTINGDATE].ToString());
469
                wrk.OrderCompletionDate = DateTime.Parse(objwrk[(int)TableColumn.ORDERCOMPLETIONDATE].ToString());
470
                wrk.PreparationStartDate = DateTime.Parse(objwrk[(int)TableColumn.PREPARATIONSTARTDATE].ToString());
471
                wrk.ConstructionStartingDate = DateTime.Parse(objwrk[(int)TableColumn.CONSTRUCTIONSTARTINGDATE].ToString());
472
                wrk.ConstructionCompletionDate = DateTime.Parse(objwrk[(int)TableColumn.CONSTRUCTIONCOMPLETION_DATE].ToString());
473
                wrk.NonOrderDate = DateTime.Parse(objwrk[(int)TableColumn.NONORDERDATE].ToString());
469 474

  
470
                wrk.OrdersDecisionPrice = double.Parse(objwrk[(int)ConstructionBaseInfoColumn.ORDERS_DECISION_PRICE].ToString());
471
                wrk.OrdersDecisionPriceInTax = double.Parse(objwrk[(int)ConstructionBaseInfoColumn.ORDERS_DECISION_PRICE_IN_TAX].ToString());
475
                wrk.OrdersDecisionPrice = double.Parse(objwrk[(int)TableColumn.ORDERS_DECISION_PRICE].ToString());
476
                wrk.OrdersDecisionPriceInTax = double.Parse(objwrk[(int)TableColumn.ORDERS_DECISION_PRICE_IN_TAX].ToString());
472 477

  
473
                wrk.SalesPersonCode = int.Parse(objwrk[(int)ConstructionBaseInfoColumn.SALES_PERSON_CODE].ToString());
474
                wrk.ConstructionPersonCode = int.Parse(objwrk[(int)ConstructionBaseInfoColumn.CONSTRPERSONCODE].ToString());
475
                wrk.ConstrSubPersonCode = int.Parse(objwrk[(int)ConstructionBaseInfoColumn.CONSTRSUBPERSONCODE].ToString());
476
                wrk.ConstructionInstructor = int.Parse(objwrk[(int)ConstructionBaseInfoColumn.CONSTRUCTIONINSTRUCTOR].ToString());
478
                wrk.SalesPersonCode = int.Parse(objwrk[(int)TableColumn.SALES_PERSON_CODE].ToString());
479
                wrk.ConstructionPersonCode = int.Parse(objwrk[(int)TableColumn.CONSTRPERSONCODE].ToString());
480
                wrk.ConstrSubPersonCode = int.Parse(objwrk[(int)TableColumn.CONSTRSUBPERSONCODE].ToString());
481
                wrk.ConstructionInstructor = int.Parse(objwrk[(int)TableColumn.CONSTRUCTIONINSTRUCTOR].ToString());
477 482

  
478
                wrk.TransferConstruction = int.Parse(objwrk[(int)ConstructionBaseInfoColumn.TRANSFERCONSTRUCTION].ToString());
479
                wrk.TransferConstructionDate = DateTime.Parse(objwrk[(int)ConstructionBaseInfoColumn.TRANSFERCONSTRUCTIONDATE].ToString());
483
                wrk.TransferConstruction = int.Parse(objwrk[(int)TableColumn.TRANSFERCONSTRUCTION].ToString());
484
                wrk.TransferConstructionDate = DateTime.Parse(objwrk[(int)TableColumn.TRANSFERCONSTRUCTIONDATE].ToString());
480 485

  
481
                wrk.OrderersDivision = int.Parse(objwrk[(int)ConstructionBaseInfoColumn.ORDERERS_DIVISION].ToString());
482
                wrk.OrderersCode = int.Parse(objwrk[(int)ConstructionBaseInfoColumn.ORDERERS_CODE].ToString());
486
                wrk.OrderersDivision = int.Parse(objwrk[(int)TableColumn.ORDERERS_DIVISION].ToString());
487
                wrk.OrderersCode = int.Parse(objwrk[(int)TableColumn.ORDERERS_CODE].ToString());
483 488

  
484
                wrk.EstimatesExpirationDate = DateTime.Parse(objwrk[(int)ConstructionBaseInfoColumn.ESTIMATESEXPIRATIONDATE].ToString());
485
                wrk.ConstructionPeriodStart = DateTime.Parse(objwrk[(int)ConstructionBaseInfoColumn.CONSTRUCTIONPERIODSTART].ToString());
486
                wrk.ConstructionPeriodEnd = DateTime.Parse(objwrk[(int)ConstructionBaseInfoColumn.CONSTRUCTIONPERIODEND].ToString());
487
                wrk.ConstructionPeriodStart2 = DateTime.Parse(objwrk[(int)ConstructionBaseInfoColumn.CONSTRUCTIONPERIODSTART2].ToString());
488
                wrk.ConstructionPeriodEnd2 = DateTime.Parse(objwrk[(int)ConstructionBaseInfoColumn.CONSTRUCTIONPERIODEND2].ToString());
489
                wrk.EstimatesExpirationDate = DateTime.Parse(objwrk[(int)TableColumn.ESTIMATESEXPIRATIONDATE].ToString());
490
                wrk.ConstructionPeriodStart = DateTime.Parse(objwrk[(int)TableColumn.CONSTRUCTIONPERIODSTART].ToString());
491
                wrk.ConstructionPeriodEnd = DateTime.Parse(objwrk[(int)TableColumn.CONSTRUCTIONPERIODEND].ToString());
492
                wrk.ConstructionPeriodStart2 = DateTime.Parse(objwrk[(int)TableColumn.CONSTRUCTIONPERIODSTART2].ToString());
493
                wrk.ConstructionPeriodEnd2 = DateTime.Parse(objwrk[(int)TableColumn.CONSTRUCTIONPERIODEND2].ToString());
489 494

  
490
                wrk.StartDate = DateTime.Parse(objwrk[(int)ConstructionBaseInfoColumn.START_DATE].ToString());
491
                wrk.EndDate = DateTime.Parse(objwrk[(int)ConstructionBaseInfoColumn.END_DATE].ToString());
495
                wrk.StartDate = DateTime.Parse(objwrk[(int)TableColumn.START_DATE].ToString());
496
                wrk.EndDate = DateTime.Parse(objwrk[(int)TableColumn.END_DATE].ToString());
492 497

  
493
                wrk.PurchaseOrderMailingDate = DateTime.Parse(objwrk[(int)ConstructionBaseInfoColumn.PURCHASEORDERMAILINGDATE].ToString());
494
                wrk.PurchaseOrderReturnDate = DateTime.Parse(objwrk[(int)ConstructionBaseInfoColumn.PURCHASEORDERRETURNDATE].ToString());
495
                wrk.PurchaseOrderReturnCheckDate = DateTime.Parse(objwrk[(int)ConstructionBaseInfoColumn.PURCHASEORDERRETURNCHECKDATE].ToString());
498
                wrk.PurchaseOrderMailingDate = DateTime.Parse(objwrk[(int)TableColumn.PURCHASEORDERMAILINGDATE].ToString());
499
                wrk.PurchaseOrderReturnDate = DateTime.Parse(objwrk[(int)TableColumn.PURCHASEORDERRETURNDATE].ToString());
500
                wrk.PurchaseOrderReturnCheckDate = DateTime.Parse(objwrk[(int)TableColumn.PURCHASEORDERRETURNCHECKDATE].ToString());
496 501

  
497
                wrk.ConsumptionTaxFlg = int.Parse(objwrk[(int)ConstructionBaseInfoColumn.CONSUMPTIONTAX_FLG].ToString());
498
                wrk.PrimeContractorFlg = int.Parse(objwrk[(int)ConstructionBaseInfoColumn.PRIMECONTRACTOR_FLG].ToString());
499
                wrk.SalesCostFlg = int.Parse(objwrk[(int)ConstructionBaseInfoColumn.SALESCOST_FLG].ToString());
500
                wrk.ConstructionStatusFlg = int.Parse(objwrk[(int)ConstructionBaseInfoColumn.CONSTRUCTIONSTATUS_FLG].ToString());
502
                wrk.ConsumptionTaxFlg = int.Parse(objwrk[(int)TableColumn.CONSUMPTIONTAX_FLG].ToString());
503
                wrk.PrimeContractorFlg = int.Parse(objwrk[(int)TableColumn.PRIMECONTRACTOR_FLG].ToString());
504
                wrk.SalesCostFlg = int.Parse(objwrk[(int)TableColumn.SALESCOST_FLG].ToString());
505
                wrk.ConstructionStatusFlg = int.Parse(objwrk[(int)TableColumn.CONSTRUCTIONSTATUS_FLG].ToString());
501 506

  
502
                wrk.ConstructionType = int.Parse(objwrk[(int)ConstructionBaseInfoColumn.CONSTRUCTIONTYPE].ToString());
503
                wrk.EstimateType = int.Parse(objwrk[(int)ConstructionBaseInfoColumn.ESTIMATETYPE].ToString());
507
                wrk.ConstructionType = int.Parse(objwrk[(int)TableColumn.CONSTRUCTIONTYPE].ToString());
508
                wrk.EstimateType = int.Parse(objwrk[(int)TableColumn.ESTIMATETYPE].ToString());
504 509

  
505
                wrk.BillingStartDate = DateTime.Parse(objwrk[(int)ConstructionBaseInfoColumn.BILLINGSTARTDATE].ToString());
506
                wrk.BillingDate = DateTime.Parse(objwrk[(int)ConstructionBaseInfoColumn.BILLINGDATE].ToString());
507
                wrk.BillingSplitFlg = int.Parse(objwrk[(int)ConstructionBaseInfoColumn.BILLINGSPLITFLG].ToString());
508
                wrk.BillingSendDate = DateTime.Parse(objwrk[(int)ConstructionBaseInfoColumn.BILLINGSENDDATE].ToString());
510
                wrk.BillingStartDate = DateTime.Parse(objwrk[(int)TableColumn.BILLINGSTARTDATE].ToString());
511
                wrk.BillingDate = DateTime.Parse(objwrk[(int)TableColumn.BILLINGDATE].ToString());
512
                wrk.BillingSplitFlg = int.Parse(objwrk[(int)TableColumn.BILLINGSPLITFLG].ToString());
513
                wrk.BillingSendDate = DateTime.Parse(objwrk[(int)TableColumn.BILLINGSENDDATE].ToString());
509 514

  
510
                wrk.EntryDate = DateTime.Parse(objwrk[(int)ConstructionBaseInfoColumn.ENTRY_DATE].ToString());
511
                wrk.UpdateDate = DateTime.Parse(objwrk[(int)ConstructionBaseInfoColumn.UPDATE_DATE].ToString());
515
                wrk.EntryDate = DateTime.Parse(objwrk[(int)TableColumn.ENTRY_DATE].ToString());
516
                wrk.UpdateDate = DateTime.Parse(objwrk[(int)TableColumn.UPDATE_DATE].ToString());
512 517
            }
513 518
            catch (OracleException oraex)
514 519
            {
......
542 547
                strcmd += " SET";
543 548
                switch (FeildNo)
544 549
                {
545
                    case (int)ConstructionBaseInfoColumn.CONSTRUCTION_CODE:
550
                    case (int)TableColumn.CONSTRUCTION_CODE:
546 551
                        strcmd += string.Format(" ConstructionCode = {0}", ((int)value).ToString());
547 552
                        break;
548
                    case (int)ConstructionBaseInfoColumn.CONSTRUCTION_YEAR:
553
                    case (int)TableColumn.TYINGFLG:
554
                        strcmd += string.Format(" TyingFlg = {0}", ((int)value).ToString());
555
                        break;
556
                    case (int)TableColumn.CONSTRUCTION_YEAR:
549 557
                        strcmd += string.Format(" ConstructionYear = {0}", ((int)value).ToString());
550 558
                        break;
551
                    case (int)ConstructionBaseInfoColumn.CONSTRUCTION_PERIOD:
559
                    case (int)TableColumn.CONSTRUCTION_PERIOD:
552 560
                        strcmd += string.Format(" ConstructionPeriod = {0}", ((int)value).ToString());
553 561
                        break;
554
                    case (int)ConstructionBaseInfoColumn.REQUESTED_DATE:
562
                    case (int)TableColumn.REQUESTED_DATE:
555 563
                        strcmd += string.Format(" RequestedDate = TO_DATE('{0}','YYYY/MM/DD')", ((DateTime)value).ToShortDateString());
556 564
                        break;
557
                    case (int)ConstructionBaseInfoColumn.ESTIMATESSUBMITDEADLINE:
565
                    case (int)TableColumn.ESTIMATESSUBMITDEADLINE:
558 566
                        strcmd += string.Format(" EstimatesSubmitDeadline = TO_DATE('{0}','YYYY/MM/DD')", ((DateTime)value).ToShortDateString());
559 567
                        break;
560
                    case (int)ConstructionBaseInfoColumn.ESTIMATESSUBMITTED_DATE:
568
                    case (int)TableColumn.ESTIMATESSUBMITTED_DATE:
561 569
                        strcmd += string.Format(" EstimatesSubmittedDate = TO_DATE('{0}','YYYY/MM/DD')", ((DateTime)value).ToShortDateString());
562 570
                        break;
563
                    case (int)ConstructionBaseInfoColumn.ORDER_DATE:
571
                    case (int)TableColumn.ORDER_DATE:
564 572
                        strcmd += string.Format(" OrderDate = TO_DATE('{0}','YYYY/MM/DD')", ((DateTime)value).ToShortDateString());
565 573
                        break;
566
                    case (int)ConstructionBaseInfoColumn.ORDERSTARTINGDATE:
574
                    case (int)TableColumn.ORDERSTARTINGDATE:
567 575
                        strcmd += string.Format(" OrderStartingDate = TO_DATE('{0}','YYYY/MM/DD')", ((DateTime)value).ToShortDateString());
568 576
                        break;
569
                    case (int)ConstructionBaseInfoColumn.ORDERCOMPLETIONDATE:
577
                    case (int)TableColumn.ORDERCOMPLETIONDATE:
570 578
                        strcmd += string.Format(" OrderCompletionDate = TO_DATE('{0}','YYYY/MM/DD')", ((DateTime)value).ToShortDateString());
571 579
                        break;
572
                    case (int)ConstructionBaseInfoColumn.CONSTRUCTIONSTARTINGDATE:
580
                    case (int)TableColumn.CONSTRUCTIONSTARTINGDATE:
573 581
                        strcmd += string.Format(" ConstructionStartingDate = TO_DATE('{0}','YYYY/MM/DD')", ((DateTime)value).ToShortDateString());
574 582
                        break;
575
                    case (int)ConstructionBaseInfoColumn.CONSTRUCTIONCOMPLETION_DATE:
583
                    case (int)TableColumn.CONSTRUCTIONCOMPLETION_DATE:
576 584
                        strcmd += string.Format(" ConstructionCompletionDate = TO_DATE('{0}','YYYY/MM/DD')", ((DateTime)value).ToShortDateString());
577 585
                        break;
578
                    case (int)ConstructionBaseInfoColumn.ORDERS_DECISION_PRICE:
586
                    case (int)TableColumn.ORDERS_DECISION_PRICE:
579 587
                        strcmd += string.Format(" OrdersDecisionPrice = {0}", ((int)value).ToString());
580 588
                        break;
581
                    case (int)ConstructionBaseInfoColumn.ORDERS_DECISION_PRICE_IN_TAX:
589
                    case (int)TableColumn.ORDERS_DECISION_PRICE_IN_TAX:
582 590
                        strcmd += string.Format(" OrdersDecisionPriceInTax = {0}", ((int)value).ToString());
583 591
                        break;
584
                    case (int)ConstructionBaseInfoColumn.SALES_PERSON_CODE:
592
                    case (int)TableColumn.SALES_PERSON_CODE:
585 593
                        strcmd += string.Format(" SalesPersonCode = {0}", ((int)value).ToString());
586 594
                        break;
587
                    case (int)ConstructionBaseInfoColumn.CONSTRPERSONCODE:
595
                    case (int)TableColumn.CONSTRPERSONCODE:
588 596
                        strcmd += string.Format(" ConstructionPersonCode = {0}", ((int)value).ToString());
589 597
                        break;
590
                    case (int)ConstructionBaseInfoColumn.CONSTRSUBPERSONCODE:
598
                    case (int)TableColumn.CONSTRSUBPERSONCODE:
591 599
                        strcmd += string.Format(" ConstrSubPersonCode = {0}", ((int)value).ToString());
592 600
                        break;
593
                    case (int)ConstructionBaseInfoColumn.CONSTRUCTIONINSTRUCTOR:
601
                    case (int)TableColumn.CONSTRUCTIONINSTRUCTOR:
594 602
                        strcmd += string.Format(" ConstructionInstructor = {0}", ((int)value).ToString());
595 603
                        break;
596
                    case (int)ConstructionBaseInfoColumn.TRANSFERCONSTRUCTION:
604
                    case (int)TableColumn.TRANSFERCONSTRUCTION:
597 605
                        strcmd += string.Format(" TransferConstruction = {0}", ((int)value).ToString());
598 606
                        break;
599
                    case (int)ConstructionBaseInfoColumn.TRANSFERCONSTRUCTIONDATE:
607
                    case (int)TableColumn.TRANSFERCONSTRUCTIONDATE:
600 608
                        strcmd += string.Format(" TransferConstructionDate = TO_DATE('{0}','YYYY/MM/DD')", ((DateTime)value).ToShortDateString());
601 609
                        break;
602
                    case (int)ConstructionBaseInfoColumn.ORDERERS_DIVISION:
610
                    case (int)TableColumn.ORDERERS_DIVISION:
603 611
                        strcmd += string.Format(" OrderersDivision = {0}", ((int)value).ToString());
604 612
                        break;
605
                    case (int)ConstructionBaseInfoColumn.ORDERERS_CODE:
613
                    case (int)TableColumn.ORDERERS_CODE:
606 614
                        strcmd += string.Format(" OrderersCode = {0}", ((int)value).ToString());
607 615
                        break;
608
                    case (int)ConstructionBaseInfoColumn.ESTIMATESEXPIRATIONDATE:
616
                    case (int)TableColumn.ESTIMATESEXPIRATIONDATE:
609 617
                        strcmd += string.Format(" EstimatesExpirationDate = TO_DATE('{0}','YYYY/MM/DD')", ((DateTime)value).ToShortDateString());
610 618
                        break;
611
                    case (int)ConstructionBaseInfoColumn.CONSTRUCTIONPERIODSTART:
619
                    case (int)TableColumn.CONSTRUCTIONPERIODSTART:
612 620
                        strcmd += string.Format(" ConstructionPeriodStart = TO_DATE('{0}','YYYY/MM/DD')", ((DateTime)value).ToShortDateString());
613 621
                        break;
614
                    case (int)ConstructionBaseInfoColumn.CONSTRUCTIONPERIODEND:
622
                    case (int)TableColumn.CONSTRUCTIONPERIODEND:
615 623
                        strcmd += string.Format(" ConstructionPeriodEnd = TO_DATE('{0}','YYYY/MM/DD')", ((DateTime)value).ToShortDateString());
616 624
                        break;
617
                    case (int)ConstructionBaseInfoColumn.START_DATE:
625
                    case (int)TableColumn.START_DATE:
618 626
                        strcmd += string.Format(" StartDate = TO_DATE('{0}','YYYY/MM/DD')", ((DateTime)value).ToShortDateString());
619 627
                        break;
620
                    case (int)ConstructionBaseInfoColumn.END_DATE:
628
                    case (int)TableColumn.END_DATE:
621 629
                        strcmd += string.Format(" EndDate = TO_DATE('{0}','YYYY/MM/DD')", ((DateTime)value).ToShortDateString());
622 630
                        break;
623
                    case (int)ConstructionBaseInfoColumn.CONSUMPTIONTAX_FLG:
631
                    case (int)TableColumn.CONSUMPTIONTAX_FLG:
624 632
                        strcmd += string.Format(" ConsumptionTaxFlg = {0}", ((int)value).ToString());
625 633
                        break;
626
                    case (int)ConstructionBaseInfoColumn.PRIMECONTRACTOR_FLG:
634
                    case (int)TableColumn.PRIMECONTRACTOR_FLG:
627 635
                        strcmd += string.Format(" PrimeContractorFlg = {0}", ((int)value).ToString());
628 636
                        break;
629
                    case (int)ConstructionBaseInfoColumn.SALESCOST_FLG:
637
                    case (int)TableColumn.SALESCOST_FLG:
630 638
                        strcmd += string.Format(" SalesCostFlg = {0}", ((int)value).ToString());
631 639
                        break;
632
                    case (int)ConstructionBaseInfoColumn.CONSTRUCTIONSTATUS_FLG:
640
                    case (int)TableColumn.CONSTRUCTIONSTATUS_FLG:
633 641
                        strcmd += string.Format(" ConstructionStatusFlg = {0}", ((int)value).ToString());
634 642
                        break;
635
                    case (int)ConstructionBaseInfoColumn.CONSTRUCTIONTYPE:
643
                    case (int)TableColumn.CONSTRUCTIONTYPE:
636 644
                        strcmd += string.Format(" ConstructionType = {0}", ((int)value).ToString());
637 645
                        break;
638
                    case (int)ConstructionBaseInfoColumn.ESTIMATETYPE:
646
                    case (int)TableColumn.ESTIMATETYPE:
639 647
                        strcmd += string.Format(" EstimateType = {0}", ((int)value).ToString());
640 648
                        break;
641
                    case (int)ConstructionBaseInfoColumn.BILLINGSTARTDATE:
649
                    case (int)TableColumn.BILLINGSTARTDATE:
642 650
                        strcmd += string.Format(", BillingStartDate = TO_DATE('{0}','YYYY/MM/DD')", ((DateTime)value).ToShortDateString());
643 651
                        break;
644
                    case (int)ConstructionBaseInfoColumn.BILLINGDATE:
652
                    case (int)TableColumn.BILLINGDATE:
645 653
                        strcmd += string.Format(" BillingDate = TO_DATE('{0}','YYYY/MM/DD')", ((DateTime)value).ToShortDateString());
646 654
                        break;
647
                    case (int)ConstructionBaseInfoColumn.BILLINGSPLITFLG:
655
                    case (int)TableColumn.BILLINGSPLITFLG:
648 656
                        strcmd += string.Format(" BillingSplitFlg = {0}", ((int)value).ToString());
649 657
                        break;
650 658
                }
......
680 688
            try
681 689
            {
682 690
                // SQL作成
683
                strcmd = "SELECT MAX(ConstructionCode) FROM ConstructionBaseInfo" + AddSQLString;
691
                strcmd = "SELECT NVL(MAX(ConstructionCode), 0) FROM ConstructionBaseInfo" + AddSQLString;
684 692

  
685 693
                // SQL実行
686 694
                if (!ExecuteReader(strcmd, ref arData, bConnect)) return iRet;
......
748 756
                // SQL実行
749 757
                if (!ExecuteNonQuery(strcmd, bConnect)) return false;
750 758

  
759
                //strcmd = "UPDATE ConstructionBaseInfo SET EntryDate = TO_DATE(TO_CHAR(sysdate,'YYYY/MM/DD HH24:MI:SS'),'YYYY/MM/DD HH24:MI:SS')";
760
                //strcmd += ", UpdateDate = TO_DATE(TO_CHAR(sysdate,'YYYY/MM/DD HH24:MI:SS'),'YYYY/MM/DD HH24:MI:SS')";
761
                //strcmd += CreatePrimarykeyString(FromCode);
762

  
763
                //// SQL実行
764
                //if (!ExecuteNonQuery(strcmd, bConnect)) return false;
765

  
751 766
                return true;
752 767
            }
753 768
            catch (Exception ex)
......
872 887
            }
873 888
        }
874 889
        #endregion
890

  
891
        #region 工事番号の枝番が最大値のものを取得する
892
        /// <summary>
893
        /// 工事番号の枝番が最大値のものを取得する
894
        /// </summary>
895
        /// <param name="NowCode"></param>
896
        /// <returns></returns>
897
        public int CreateNextBranchCounstructionCode(int NowCode)
898
        {
899
            IOConstructionBaseInfo cbDB = new IOConstructionBaseInfo();                // 工事基本情報
900
            try
901
            {
902
                int ConstructionCode = -1;
903
                
904
                // 枝番最大値の工事番号取得
905
                string strSQL = "SELECT NVL(MAX(CONSTRUCTIONCODE), -1) FROM CONSTRUCTIONBASEINFO";
906
                strSQL += string.Format(" WHERE TRUNC(CONSTRUCTIONCODE / 100) = {0}", CommonMotions.cnvTruncate(NowCode / 100));
907
                ArrayList arList = new ArrayList();
908

  
909
                // データが無ければ抜ける
910
                if (!cbDB.ExecuteReader(strSQL, ref arList)) return ConstructionCode;
911
                
912
                object[] wrkobj = (object[])arList[0];
913
                ConstructionCode = CommonMotions.cnvInt(wrkobj[0]);
914
                if (ConstructionCode > 1) ConstructionCode++;
915

  
916
                return ConstructionCode;
917
            }
918
            catch (System.Exception ex)
919
            {
920
                logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message);
921
                return -1;
922
            }
923
            finally
924
            {
925
                cbDB.close(); cbDB = null;
926
            }
927
        }
928
        #endregion
875 929
    }
876 930
}
trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOConstructionBaseInfoDetail.cs
31 31
        /// <summary>
32 32
        /// 工事基本情報フィールド並び
33 33
        /// </summary>
34
        public enum ConstructionBaseInfoDetailColumn
34
        public enum TableColumn
35 35
        {
36 36
            CONSTRUCTION_CODE = 0,
37 37
            DETAIL_NO,
......
284 284
            try
285 285
            {
286 286
                // データ取得
287
                wrk.ConstructionCode = int.Parse(objwrk[(int)ConstructionBaseInfoDetailColumn.CONSTRUCTION_CODE].ToString());
288
                wrk.DetailNo = int.Parse(objwrk[(int)ConstructionBaseInfoDetailColumn.DETAIL_NO].ToString());
289
                wrk.DetailString = objwrk[(int)ConstructionBaseInfoDetailColumn.DETAIL_STRING].ToString();
287
                wrk.ConstructionCode = int.Parse(objwrk[(int)TableColumn.CONSTRUCTION_CODE].ToString());
288
                wrk.DetailNo = int.Parse(objwrk[(int)TableColumn.DETAIL_NO].ToString());
289
                wrk.DetailString = objwrk[(int)TableColumn.DETAIL_STRING].ToString();
290 290
                
291
                wrk.EntryDate = DateTime.Parse(objwrk[(int)ConstructionBaseInfoDetailColumn.ENTRY_DATE].ToString());
292
                wrk.UpdateDate = DateTime.Parse(objwrk[(int)ConstructionBaseInfoDetailColumn.UPDATE_DATE].ToString());
291
                wrk.EntryDate = DateTime.Parse(objwrk[(int)TableColumn.ENTRY_DATE].ToString());
292
                wrk.UpdateDate = DateTime.Parse(objwrk[(int)TableColumn.UPDATE_DATE].ToString());
293 293
            }
294 294
            catch (OracleException oraex)
295 295
            {
......
352 352
                // SQL実行
353 353
                if (!ExecuteNonQuery(strcmd, bConnect)) return false;
354 354

  
355
                //strcmd = "UPDATE ConstructionBaseInfoDetail SET EntryDate = TO_DATE(TO_CHAR(sysdate,'YYYY/MM/DD HH24:MI:SS'),'YYYY/MM/DD HH24:MI:SS')";
356
                //strcmd += ", UpdateDate = TO_DATE(TO_CHAR(sysdate,'YYYY/MM/DD HH24:MI:SS'),'YYYY/MM/DD HH24:MI:SS')";
357
                //strcmd += CreatePrimarykeyString(FromCode);
358

  
359
                //// SQL実行
360
                //if (!ExecuteNonQuery(strcmd, bConnect)) return false;
361

  
355 362
                return true;
356 363
            }
357 364
            catch (Exception ex)
trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOConstructionBudget.cs
38 38
            CreatorCode,                // 作成者コード
39 39
            CreatorName,    	        // 作成者名
40 40
            CreatorCosts,	            // 作成者給与
41

  
42
            AssistantCode,              // 副担当者コード
43
            AssistantName,              // 副担当者名
44
            AssistantCosts,             // 副担当者給与
45

  
41 46
            InstructorCode,	            // 工事指導員コード
42 47
            InstructorName,	            // 工事指導員名
43 48
            InstructorCosts,	        // 工事指導員給与
49

  
44 50
            CreateDate,	                // 作成日
45 51
            ConstructionTimes,	        // 工期(単位・月)
46 52
            ConstructionStart,          // 契約工期開始
47 53
            ConstructionEnd,            // 契約工期完了
48 54

  
49 55
            InstructorTimes,	        // 指導員稼働月数
56
            
50 57
            SalaryFlg,                  // 給与振分区分
51 58
            SalaryDays,                 // 振分日数
59
            A_SalaryFlg,                // 副担当者給与振分区分
60
            A_SalaryDays,               // 副担当者振分日数
61
            I_SalaryFlg,                // 指導員給与振分区分
62
            I_SalaryDays,               // 指導員振分日数
52 63

  
53 64
            EntryDate,
54 65
            UpdateDate,
......
83 94
            strcmd += " ,CreatorCode";                              // 作成者コード
84 95
            strcmd += " ,CreatorName";    	                        // 作成者名
85 96
            strcmd += " ,CreatorCosts";	                            // 作成者給与
97
            strcmd += " ,AssistantCode";                            // 副担当者コード
98
            strcmd += " ,AssistantName";                            // 副担当者名
99
            strcmd += " ,AssistantCosts";                           // 副担当者給与
86 100
            strcmd += " ,InstructorCode";	                        // 工事指導員コード
87 101
            strcmd += " ,InstructorName";	                        // 工事指導員名
88 102
            strcmd += " ,InstructorCosts";                          // 工事指導員給与
......
93 107
            strcmd += " ,InstructorTimes";                          // 指導員稼働月数
94 108
            strcmd += " ,SalaryFlg";                                // 給与振分区分
95 109
            strcmd += " ,SalaryDays";                               // 振分日数
110
            strcmd += " ,A_SalaryFlg";                              // 副担当者給与振分区分
111
            strcmd += " ,A_SalaryDays";                             // 副担当者振分日数
112
            strcmd += " ,I_SalaryFlg";                              // 指導員給与振分区分
113
            strcmd += " ,I_SalaryDays";                             // 指導員振分日数
96 114

  
97 115
            strcmd += ", TO_CHAR(EntryDate, 'YYYY/MM/DD HH24:MI:ss')";
98 116
            strcmd += ", TO_CHAR(UpdateDate, 'YYYY/MM/DD HH24:MI:ss')";
......
182 200
                strcmd += string.Format(", {0}", work.CreatorCode);                     // 作成者コード
183 201
                strcmd += string.Format(",'{0}'", work.CreatorName);                    // 作成者名
184 202
                strcmd += string.Format(", {0}", work.CreatorCosts);                    // 作成者給与
203

  
204
                strcmd += string.Format(", {0}", work.AssistantCode);                   // 副担当者コード
205
                strcmd += string.Format(",'{0}'", work.AssistantName);                  // 副担当者名
206
                strcmd += string.Format(", {0}", work.AssistantCosts);                  // 副担当者給与
207

  
185 208
                strcmd += string.Format(", {0}", work.InstructorCode);                  // 工事指導員コード
186 209
                strcmd += string.Format(",'{0}'", work.InstructorName);                 // 工事指導員名
187 210
                strcmd += string.Format(", {0}", work.InstructorCosts);                 // 工事指導員給与
211
                
188 212
                strcmd += string.Format(", TO_DATE('{0}','YYYY/MM/DD')",
189 213
                                        work.CreateDate.ToShortDateString());           // 作成日
190 214
                strcmd += string.Format(", {0}", work.ConstructionTimes);               // 工期(単位・月)
......
196 220
                strcmd += string.Format(", {0}", work.InstructorTimes);                 // 指導員稼働月数
197 221
                strcmd += string.Format(", {0}", work.SalaryFlg);                       // 給与振分区分
198 222
                strcmd += string.Format(", {0}", work.SalaryDays);                      // 振分日数
223
                strcmd += string.Format(", {0}", work.A_SalaryFlg);                     // 副担当者給与振分区分
224
                strcmd += string.Format(", {0}", work.A_SalaryDays);                    // 副担当者振分日数
225
                strcmd += string.Format(", {0}", work.I_SalaryFlg);                     // 指導員給与振分区分
226
                strcmd += string.Format(", {0}", work.I_SalaryDays);                    // 指導員振分日数
199 227

  
200 228
                strcmd += ", TO_DATE(TO_CHAR(sysdate,'YYYY/MM/DD HH24:MI:SS'),'YYYY/MM/DD HH24:MI:SS')";
201 229
                strcmd += ", TO_DATE(TO_CHAR(sysdate,'YYYY/MM/DD HH24:MI:SS'),'YYYY/MM/DD HH24:MI:SS')";
......
257 285
                strcmd += string.Format(", CreatorCode = {0}", data.CreatorCode);                       // 作成者コード
258 286
                strcmd += string.Format(", CreatorName = '{0}'", data.CreatorName);                     // 作成者名
259 287
                strcmd += string.Format(", CreatorCosts = {0}", data.CreatorCosts);                     // 作成者給与
288

  
289
                strcmd += string.Format(", AssistantCode = {0}", data.AssistantCode);                   // 副担当者コード
290
                strcmd += string.Format(", AssistantName = '{0}'", data.AssistantName);                 // 副担当者名
291
                strcmd += string.Format(", AssistantCosts = {0}", data.AssistantCosts);                 // 副担当者給与
292

  
260 293
                strcmd += string.Format(", InstructorCode = {0}", data.InstructorCode);                 // 工事指導員コード
261 294
                strcmd += string.Format(", InstructorName = '{0}'", data.InstructorName);               // 工事指導員名
262 295
                strcmd += string.Format(", InstructorCosts = {0}", data.InstructorCosts);               // 工事指導員給与
......
272 305

  
273 306
                strcmd += string.Format(", SalaryFlg = {0}", data.SalaryFlg);                           // 給与振分区分
274 307
                strcmd += string.Format(", SalaryDays = {0}", data.SalaryDays);                         // 振分日数
308
                strcmd += string.Format(", A_SalaryFlg = {0}", data.A_SalaryFlg);                       // 副担当者給与振分区分
309
                strcmd += string.Format(", A_SalaryDays = {0}", data.A_SalaryDays);                     // 副担当者振分日数
310
                strcmd += string.Format(", I_SalaryFlg = {0}", data.I_SalaryFlg);                       // 指導員給与振分区分
311
                strcmd += string.Format(", I_SalaryDays = {0}", data.I_SalaryDays);                     // 指導員振分日数
275 312

  
276 313
                strcmd += ", UpdateDate = TO_DATE(TO_CHAR(sysdate,'YYYY/MM/DD HH24:MI:SS'),'YYYY/MM/DD HH24:MI:SS')";
277 314
                strcmd += AddSQLString;
......
329 366
                wrk.CreatorCode = int.Parse(objwrk[(int)ConstructionBudgetColumn.CreatorCode].ToString());                  // 作成者コード
330 367
                wrk.CreatorName = objwrk[(int)ConstructionBudgetColumn.CreatorName].ToString();                             // 作成者名
331 368
                wrk.CreatorCosts = double.Parse(objwrk[(int)ConstructionBudgetColumn.CreatorCosts].ToString());             // 作成者給与
369
                wrk.AssistantCode = int.Parse(objwrk[(int)ConstructionBudgetColumn.AssistantCode].ToString());              // 副担当者コード
370
                wrk.AssistantName = objwrk[(int)ConstructionBudgetColumn.AssistantName].ToString();                         // 副担当者名
371
                wrk.AssistantCosts = int.Parse(objwrk[(int)ConstructionBudgetColumn.AssistantCosts].ToString());            // 副担当者給与
332 372
                wrk.InstructorCode = int.Parse(objwrk[(int)ConstructionBudgetColumn.InstructorCode].ToString());            // 工事指導員コード
333 373
                wrk.InstructorName = objwrk[(int)ConstructionBudgetColumn.InstructorName].ToString();                       // 工事指導員名
334 374
                wrk.InstructorCosts = double.Parse(objwrk[(int)ConstructionBudgetColumn.InstructorCosts].ToString());       // 工事指導員給与
......
341 381

  
342 382
                wrk.SalaryFlg = int.Parse(objwrk[(int)ConstructionBudgetColumn.SalaryFlg].ToString());                      // 給与振分区分
343 383
                wrk.SalaryDays = int.Parse(objwrk[(int)ConstructionBudgetColumn.SalaryDays].ToString());                    // 振分日数
384
                wrk.A_SalaryFlg = int.Parse(objwrk[(int)ConstructionBudgetColumn.A_SalaryFlg].ToString());                  // 副担当者給与振分区分
385
                wrk.A_SalaryDays = int.Parse(objwrk[(int)ConstructionBudgetColumn.A_SalaryDays].ToString());                // 副担当者振分日数
386
                wrk.I_SalaryFlg = int.Parse(objwrk[(int)ConstructionBudgetColumn.I_SalaryFlg].ToString());                  // 指導員給与振分区分
387
                wrk.I_SalaryDays = int.Parse(objwrk[(int)ConstructionBudgetColumn.I_SalaryDays].ToString());                // 指導員振分日数
344 388

  
345 389
                wrk.EntryDate = DateTime.Parse(objwrk[(int)ConstructionBudgetColumn.EntryDate].ToString());
346 390
                wrk.UpdateDate = DateTime.Parse(objwrk[(int)ConstructionBudgetColumn.UpdateDate].ToString());
trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOConstructionBudgetDetail.cs
374 374
        /// <summary>
375 375
        /// 主キー検索の文字列を返す
376 376
        /// </summary>
377
        /// <param name="ComponentCode"></param>
378
        /// <param name="OutsourcingFlg"></param>
377
        /// <param name="ConstructionCode"></param>
378
        /// <param name="GroupCount"></param>
379 379
        /// <param name="LineCount"></param>
380 380
        /// <returns></returns>
381
        public string CreatePrimarykeyString(int ConstructionCode, int PageCount = 0, int LineCount = 0)
381
        public string CreatePrimarykeyString(int ConstructionCode, int GroupCount = 0, int LineCount = 0)
382 382
        {
383 383
            string strWork = "";
384 384
            try
385 385
            {
386 386
                strWork = string.Format(" Where ConstructionCode = {0}", ConstructionCode);
387
                if (PageCount != 0)
388
                    strWork += string.Format(" And OutsourcingFlg = {0}", PageCount);
387
                if (GroupCount != 0)
388
                    strWork += string.Format(" And GroupCount = {0}", GroupCount);
389 389
                if (LineCount != 0)
390 390
                    strWork += string.Format(" And LineCount = {0}", LineCount);
391 391
            }
trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOConstructionLedgerDetail.cs
50 50
            PaymentBurden,          // 支払補填額
51 51
            FixDataFlg,             // 固定データフラグ
52 52
            IndependentFlg,         // 独立データフラグ
53
            FluctuationFlg,         // 増減データフラグ
53 54

  
54 55
            EntryDate,
55 56
            UpdateDate,
......
92 93
            strcmd += ", PaymentBurden";            // 支払補填額
93 94
            strcmd += ", FixDataFlg";               // 固定データフラグ
94 95
            strcmd += ", IndependentFlg";           // 独立データフラグ
96
            strcmd += ", FluctuationFlg";           // 増減データフラグ
95 97

  
96 98
            strcmd += ", TO_CHAR(EntryDate, 'YYYY/MM/DD HH24:MI:ss')";
97 99
            strcmd += ", TO_CHAR(UpdateDate, 'YYYY/MM/DD HH24:MI:ss')";
......
207 209
                
208 210
                strcmd += string.Format(", {0}", work.FixDataFlg);              // 固定データフラグ
209 211
                strcmd += string.Format(", {0}", work.IndependentFlg);          // 独立データフラグ
212
                strcmd += string.Format(", {0}", work.FluctuationFlg);          // 増減データフラグ
210 213

  
211 214
                strcmd += ", TO_DATE(TO_CHAR(sysdate,'YYYY/MM/DD HH24:MI:SS'),'YYYY/MM/DD HH24:MI:SS')";
212 215
                strcmd += ", TO_DATE(TO_CHAR(sysdate,'YYYY/MM/DD HH24:MI:SS'),'YYYY/MM/DD HH24:MI:SS')";
......
284 287

  
285 288
                strcmd += string.Format(", FixDataFlg = {0}", data.FixDataFlg);                     // 固定データフラグ
286 289
                strcmd += string.Format(", IndependentFlg = {0}", data.IndependentFlg);             // 独立データフラグ
290
                strcmd += string.Format(", FluctuationFlg = {0}", data.FluctuationFlg);             // 増減データフラグ
287 291

  
288 292
                strcmd += ", UpdateDate = TO_DATE(TO_CHAR(sysdate,'YYYY/MM/DD HH24:MI:SS'),'YYYY/MM/DD HH24:MI:SS')";
289 293
                strcmd += AddSQLString;
......
356 360
                
357 361
                wrk.FixDataFlg = int.Parse(objwrk[(int)DataColumn.FixDataFlg].ToString());                      // 固定データフラグ
358 362
                wrk.IndependentFlg = int.Parse(objwrk[(int)DataColumn.IndependentFlg].ToString());              // 独立データフラグ
363
                wrk.FluctuationFlg = int.Parse(objwrk[(int)DataColumn.FluctuationFlg].ToString());              // 増減データフラグ
359 364

  
360 365
                wrk.EntryDate = DateTime.Parse(objwrk[(int)DataColumn.EntryDate].ToString());
361 366
                wrk.UpdateDate = DateTime.Parse(objwrk[(int)DataColumn.UpdateDate].ToString());
......
415 420
            try
416 421
            {
417 422
                // SQL作成
418
                strcmd = "SELECT MAX(LineCount) FROM ConstructionLedgerDetail" + AddSQLString;
423
                strcmd = "SELECT NVL(MAX(LineCount), 0) FROM ConstructionLedgerDetail" + AddSQLString;
419 424

  
420 425
                // SQL実行
421 426
                if (!ExecuteReader(strcmd, ref arData, bConnect)) return iRet;
trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOConstructionLink.cs
1
using System;
2
using System.Collections.Generic;
3
using System.Linq;
4
using System.Text;
5
using System.Data;
6
using System.Collections;
7

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

  
11
using ProcessManagement.DB.Oracle;
12
using ProcessManagement.DB.Core;
13
using ProcessManagement.DataModel;
14
using ProcessManagement.Common;
15

  
16
namespace ProcessManagement.DB.IOAccess
17
{
18
    /// <summary>
19
    /// 工事増減情報DBアクセス
20
    /// </summary>
21
    public class IOConstructionLink : 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 ConstructionLinkColumn
35
        {
36
            CONSTRUCTION_CODE = 0,
37
            FLUCTUATION_CODE,
38
            ENTRY_DATE,
39
            UPDATE_DATE,
40
        }
41

  
42
        #endregion
43

  
44
        #region プロパティ
45
        #endregion
46

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

  
57
        #endregion
58

  
59
        #region SELECT SQL作成
60
        /// <summary>
61
        /// SQL作成
62
        /// </summary>
63
        private string CreateSelectSQL()
64
        {
65
            // SQL作成(oracleのDateTime型が変換できないのでCharに変換しておく)
66
            string strcmd = "SELECT";
67
            strcmd += "  ConstructionCode, FluctuationCode";
68
            strcmd += ", TO_CHAR(EntryDate, 'YYYY/MM/DD HH24:MI:ss')";
69
            strcmd += ", TO_CHAR(UpdateDate, 'YYYY/MM/DD HH24:MI:ss')";
70
            strcmd += " FROM ConstructionLink";
71

  
72
            return strcmd;
73
        }
74
        #endregion
75

  
... 差分の行数が表示可能な上限を超えました。超過分は表示しません。

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