プロジェクト

全般

プロフィール

リビジョン 218

堀内7年以上前に追加

請求書承認->請求承認へ変更
StringBuilder化(IOクラス)

差分を表示:

branches/src/ProcessManagement/ProcessManagement/Common/CommonVersion.cs
14 14
        /// <summary>
15 15
        /// 本体バージョン
16 16
        /// </summary>
17
        public static int s_SystemVersion = 45;
17
        public static int s_SystemVersion = 47;
18 18

  
19 19
        /// <summary>
20 20
        /// コピー・環境バージョン
branches/src/ProcessManagement/ProcessManagement/Common/Process/ClsApprovalPermission.cs
701 701
                {
702 702
                    CurrentPersonCode = baseRec.ConstructionPersonCode;
703 703
                }
704
                else if (AppString.Equals("請求承認"))
704
                else if (AppString.Equals("請求承認"))
705 705
                {
706 706
                    CurrentPersonCode = baseRec.ConstructionPersonCode;
707 707
                }
branches/src/ProcessManagement/ProcessManagement/Common/Process/ClsExcute.cs
279 279
            /// </summary>
280 280
            PurchaseOrderEntryApproval,
281 281
            /// <summary>
282
            ///  5:請求承認
282
            ///  5:請求承認
283 283
            /// </summary>
284 284
            OrderBillingApproval,
285 285
            /// <summary>
......
324 324
        //                                                                        {3, "工事予算書承認"},
325 325
        //                                                                        {4, "注文書承認"},
326 326
        //                                                                        {5, "日報・議事録・質疑承認"},
327
        //                                                                        {6, "請求承認"},
327
        //                                                                        {6, "請求承認"},
328 328
        //                                                                        };
329 329
        //public static Dictionary<int, string> AppovalList = new Dictionary<int, string>() {                       2016/01/21 順番変更
330 330
        //                                                                       {1, "積算見積書承認"},
branches/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOMCommonCostMiddle.cs
56 56

  
57 57
        #endregion
58 58

  
59
        #region パブリックメソッド
59
        #region 共通費中項目マスタ検索SQL作成
60 60
        /// <summary>
61
        /// 共通費中項目マスタ検索
61
        /// 共通費中項目マスタ検索SQL作成
62 62
        /// </summary>
63 63
        /// <param name="AddSQLString">検索条件SQL文字列</param>
64 64
        /// <param name="data">共通費中項目マスタデータ</param>
......
66 66
        private string CreateSelectSQL()
67 67
        {
68 68
            // SQL作成(DateTime型が変換できないのでCharに変換しておく)
69
            string strcmd = "SELECT";
70
            strcmd += "  LargeCode";
71
            strcmd += " ,MiddleCode";
72
            strcmd += " ,DisplayOrder";
73
            strcmd += " ,MiddleName";
74
            strcmd += " ,CommentText";
75
            strcmd += " ,DeleteFlg";
76
            strcmd += " ,DATE_FORMAT(EntryDate, '%Y/%m/%d %H:%i:%s')";
77
            strcmd += " ,DATE_FORMAT(UpdateDate, '%Y/%m/%d %H:%i:%s')";
78
            strcmd += " FROM CommonCostMiddle";
69
            StringBuilder strcmd = new StringBuilder();
70
            strcmd.Append("SELECT");
71
            strcmd.Append("  LargeCode");
72
            strcmd.Append(" ,MiddleCode");
73
            strcmd.Append(" ,DisplayOrder");
74
            strcmd.Append(" ,MiddleName");
75
            strcmd.Append(" ,CommentText");
76
            strcmd.Append(" ,DeleteFlg");
77
            strcmd.Append(" ,DATE_FORMAT(EntryDate, '%Y/%m/%d %H:%i:%s')");
78
            strcmd.Append(" ,DATE_FORMAT(UpdateDate, '%Y/%m/%d %H:%i:%s')");
79
            strcmd.Append(" FROM CommonCostMiddle");
79 80

  
80
            return strcmd;
81
            return strcmd.ToString();
81 82
        }
83
        #endregion
84

  
85
        #region 共通費中項目マスタ検索(複数)
86
        /// <summary>
87
        /// 共通費中項目マスタ検索(複数)
88
        /// </summary>
89
        /// <param name="AddSQLString"></param>
90
        /// <param name="data"></param>
91
        /// <param name="bConnect"></param>
92
        /// <returns></returns>
82 93
        public bool SelectAction(string AddSQLString, ref List<CommonCostMiddle> data, bool bConnect = true)
83 94
        {
84 95
            // インターフェース
85
            string strcmd = "";
96
            StringBuilder strcmd=new StringBuilder();
86 97
            ArrayList arData = new ArrayList();
87 98

  
88 99
            try
89 100
            {
90 101
                // SQL作成(DateTime型が変換できないのでCharに変換しておく)
91
                strcmd = CreateSelectSQL() + AddSQLString;
102
                strcmd.AppendFormat("{0}{1}" , CreateSelectSQL() , AddSQLString);
92 103

  
93 104
                // SQL実行
94
                if (!ExecuteReader(strcmd, ref arData, bConnect)) return false;
105
                if (!ExecuteReader(strcmd.ToString(), ref arData, bConnect)) return false;
95 106

  
96 107
                // データセット
97 108
                foreach (object[] objwrk in arData)
......
105 116
            }
106 117
            catch (Exception ex)
107 118
            {
108
                logger.ErrorFormat("システムエラー:{0}:{1}:{2}", CommonMotions.GetMethodName(2), ex.Message, strcmd);
119
                logger.ErrorFormat("システムエラー:{0}:{1}:{2}", CommonMotions.GetMethodName(2), ex.Message, strcmd.ToString());
109 120
                return false;
110 121
            }
111 122

  
112 123
        }
124
        #endregion
125

  
126
        #region 共通費中項目マスタ検索(1件)
127
        /// <summary>
128
        /// 共通費中項目マスタ検索(1件)
129
        /// </summary>
130
        /// <param name="AddSQLString"></param>
131
        /// <param name="data"></param>
132
        /// <param name="bConnect"></param>
133
        /// <returns></returns>
113 134
        public bool SelectAction(string AddSQLString, ref CommonCostMiddle data, bool bConnect = true)
114 135
        {
115 136
            // インターフェース
116
            string strcmd = "";
137
            StringBuilder strcmd=new StringBuilder();
117 138
            ArrayList arData = new ArrayList();
118 139

  
119 140
            try
120 141
            {
121 142
                // SQL作成(DateTime型が変換できないのでCharに変換しておく)
122
                strcmd = CreateSelectSQL() + AddSQLString;
143
                strcmd.AppendFormat("{0}{1}", CreateSelectSQL() , AddSQLString);
123 144

  
124 145
                // SQL実行
125
                if (!ExecuteReader(strcmd, ref arData, bConnect)) return false;
146
                if (!ExecuteReader(strcmd.ToString(), ref arData, bConnect)) return false;
126 147
                if (arData.Count == 0) return false;
127 148

  
128 149
                // データセット
......
136 157
            }
137 158
            catch (Exception ex)
138 159
            {
139
                logger.ErrorFormat("システムエラー:{0}:{1}:{2}", CommonMotions.GetMethodName(2), ex.Message, strcmd);
160
                logger.ErrorFormat("システムエラー:{0}:{1}:{2}", CommonMotions.GetMethodName(2), ex.Message, strcmd.ToString());
140 161
                return false;
141 162
            }
142 163

  
143 164
        }
165
        #endregion
144 166

  
167
        #region 共通費中項目マスタ追加(複数件)
145 168
        /// <summary>
146 169
        /// 共通費中項目マスタ追加(複数件)
147 170
        /// </summary>
......
149 172
        /// <returns>true:成功 false:失敗</returns>
150 173
        public bool InsertAction(List<CommonCostMiddle> data, bool bConnect = true)
151 174
        {
152
            string strcmd = "";
175
            StringBuilder strcmd=new StringBuilder();
153 176
            try
154 177
            {
155 178
                bool bColFirst = true;
156
                strcmd = "INSERT INTO CommonCostMiddle";
157
                strcmd += " (";
179
                strcmd.Append("INSERT INTO CommonCostMiddle");
180
                strcmd.Append(" (");
158 181
                foreach (var gender in Enum.GetValues(typeof(NameColumn)))
159 182
                {
160
                    if (!bColFirst) strcmd += ", ";
161
                    strcmd += gender.ToString();
183
                    if (!bColFirst) strcmd.Append(", ");
184
                    strcmd.Append(gender.ToString());
162 185
                    bColFirst = false;
163 186
                }
164
                strcmd += ") VALUES";
187
                strcmd.Append(") VALUES");
165 188

  
166 189
                bool bDataFirst = true;
167 190
                foreach (CommonCostMiddle work in data)
168 191
                {
169
                    if (bDataFirst) strcmd += " (";
170
                    else strcmd += ", (";
192
                    if (bDataFirst) strcmd.Append(" (");
193
                    else strcmd.Append(", (");
171 194

  
172
                    strcmd += string.Format("  {0}", work.LargeCode.ToString());
173
                    strcmd += string.Format(", {0}", work.MiddleCode.ToString());
174
                    strcmd += string.Format(", {0}", work.DisplayOrder.ToString());
175
                    strcmd += string.Format(", '{0}'", work.MiddleName);
176
                    strcmd += string.Format(", '{0}'", work.CommentText);
177
                    strcmd += string.Format(", {0}", work.DeleteFlg.ToString());
195
                    strcmd.AppendFormat("  {0}", work.LargeCode.ToString());
196
                    strcmd.AppendFormat(", {0}", work.MiddleCode.ToString());
197
                    strcmd.AppendFormat(", {0}", work.DisplayOrder.ToString());
198
                    strcmd.AppendFormat(", '{0}'", work.MiddleName);
199
                    strcmd.AppendFormat(", '{0}'", work.CommentText);
200
                    strcmd.AppendFormat(", {0}", work.DeleteFlg.ToString());
178 201

  
179
                    strcmd += string.Format(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.EntryDate);
180
                    strcmd += string.Format(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.UpdateDate);
181
                    strcmd += ")";
202
                    strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.EntryDate);
203
                    strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.UpdateDate);
204
                    strcmd.Append(")");
182 205

  
183 206
                    bDataFirst = false;
184 207
                }
185 208

  
186
                if (!ExecuteNonQuery(strcmd, false)) return false;
209
                if (!ExecuteNonQuery(strcmd.ToString(), false)) return false;
187 210

  
188 211
                return true;
189 212
            }
190 213
            catch (Exception ex)
191 214
            {
192
                logger.ErrorFormat("システムエラー:{0}:{1}:{2}", CommonMotions.GetMethodName(2), ex.Message, strcmd);
215
                logger.ErrorFormat("システムエラー:{0}:{1}:{2}", CommonMotions.GetMethodName(2), ex.Message, strcmd.ToString());
193 216
                return false;
194 217
            }
195 218
        }
219
        #endregion
196 220

  
221
        #region 共通費中項目マスタ更新
197 222
        /// <summary>
198 223
        /// 共通費中項目マスタ更新
199 224
        /// </summary>
......
202 227
        /// <returns>true:成功 false:失敗</returns>
203 228
        public bool UpdateAction(string AddSQLString, CommonCostMiddle data, bool bConnect = true)
204 229
        {
205
            string strcmd = "";
230
            StringBuilder strcmd = new StringBuilder();
206 231
            try
207 232
            {
208 233

  
209
                strcmd = "UPDATE CommonCostMiddle";
234
                strcmd.Append("UPDATE CommonCostMiddle");
210 235

  
211
                strcmd += " SET";
236
                strcmd.Append(" SET");
212 237

  
213
                strcmd += string.Format(" LargeCode = {0}", data.LargeCode.ToString());
214
                strcmd += string.Format(" MiddleCode = {0}", data.MiddleCode.ToString());
215
                strcmd += string.Format(",DisplayOrder = {0}", data.DisplayOrder.ToString());
216
                strcmd += string.Format(",MiddleName = '{0}'", data.MiddleName);
217
                strcmd += string.Format(",CommentText = '{0}'", data.CommentText);
218
                strcmd += string.Format(",DeleteFlg = {0}", data.DeleteFlg.ToString());
238
                strcmd.AppendFormat(" LargeCode = {0}", data.LargeCode.ToString());
239
                strcmd.AppendFormat(" MiddleCode = {0}", data.MiddleCode.ToString());
240
                strcmd.AppendFormat(",DisplayOrder = {0}", data.DisplayOrder.ToString());
241
                strcmd.AppendFormat(",MiddleName = '{0}'", data.MiddleName);
242
                strcmd.AppendFormat(",CommentText = '{0}'", data.CommentText);
243
                strcmd.AppendFormat(",DeleteFlg = {0}", data.DeleteFlg.ToString());
219 244

  
220
                strcmd += ", UpdateDate = NOW()";
221
                strcmd += AddSQLString;
245
                strcmd.Append(", UpdateDate = NOW()");
246
                strcmd.Append(AddSQLString);
222 247

  
223
                if (!ExecuteNonQuery(strcmd, bConnect)) return false;
248
                if (!ExecuteNonQuery(strcmd.ToString(), bConnect)) return false;
224 249

  
225 250
                return true;
226 251
            }
227 252
            catch (Exception ex)
228 253
            {
229
                logger.ErrorFormat("システムエラー:{0}:{1}:{2}", CommonMotions.GetMethodName(2), ex.Message, strcmd);
254
                logger.ErrorFormat("システムエラー:{0}:{1}:{2}", CommonMotions.GetMethodName(2), ex.Message, strcmd.ToString());
230 255
                return false;
231 256
            }
232 257
        }
258
        #endregion
233 259

  
234

  
260
        #region 共通費中項目マスタ削除
235 261
        /// <summary>
236 262
        /// 共通費中項目マスタ削除
237 263
        /// </summary>
......
241 267
        public bool DeleteAction(string AddSQLString, bool bConnect = true)
242 268
        {
243 269
            // インターフェース
244
            string strcmd = "";
270
            StringBuilder strcmd = new StringBuilder();
245 271
            try
246 272
            {
247
                strcmd = string.Format("{0}{1}", "DELETE FROM CommonCostMiddle", AddSQLString);
273
                strcmd.AppendFormat("{0}{1}", "DELETE FROM CommonCostMiddle", AddSQLString);
248 274

  
249
                if (!ExecuteNonQuery(strcmd, bConnect)) return false;
275
                if (!ExecuteNonQuery(strcmd.ToString(), bConnect)) return false;
250 276

  
251 277
                return true;
252 278
            }
253 279
            catch (Exception ex)
254 280
            {
255
                logger.ErrorFormat("システムエラー:{0}:{1}:{2}", CommonMotions.GetMethodName(2), ex.Message, strcmd);
281
                logger.ErrorFormat("システムエラー:{0}:{1}:{2}", CommonMotions.GetMethodName(2), ex.Message, strcmd.ToString());
256 282
                return false;
257 283
            }
258 284
        }
285
        #endregion
259 286

  
287
        #region 論理削除
260 288
        /// <summary>
261 289
        /// 論理削除
262 290
        /// </summary>
......
293 321
                return false;
294 322
            }
295 323
        }
324
        #endregion
325

  
326
        #region OracleDataReaderより構造体へセットする
296 327
        /// <summary>
297 328
        /// OracleDataReaderより構造体へセットする
298 329
        /// </summary>
......
325 356

  
326 357
        #endregion
327 358

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

  
359
        #region 最大値を取得する
330 360
        /// <summary>
331 361
        /// 最大値を取得する
332 362
        /// </summary>
......
336 366
        public int SelectMaxCommonCostMiddleCount(string AddSQLString, bool bConnect = true)
337 367
        {
338 368
            // インターフェース
339
            string strcmd = "";
369
            StringBuilder strcmd = new StringBuilder();
340 370
            ArrayList arData = new ArrayList();
341 371
            int iRet = 0;
342 372
            try
343 373
            {
344 374
                // SQL作成
345
                strcmd = "SELECT IFNULL(MAX(MiddleCode), 0) FROM CommonCostMiddle" + AddSQLString;
375
                strcmd.AppendFormat("SELECT IFNULL(MAX(MiddleCode), 0) FROM CommonCostMiddle{0}", AddSQLString);
346 376

  
347 377
                // SQL実行
348
                if (!ExecuteReader(strcmd, ref arData, bConnect)) return iRet;
378
                if (!ExecuteReader(strcmd.ToString(), ref arData, bConnect)) return iRet;
349 379

  
350 380
                // データセット
351 381
                foreach (object[] objwrk in arData)
......
358 388
            }
359 389
            catch (Exception ex)
360 390
            {
361
                logger.ErrorFormat("システムエラー:{0}:{1}:{2}", CommonMotions.GetMethodName(2), ex.Message, strcmd);
391
                logger.ErrorFormat("システムエラー:{0}:{1}:{2}", CommonMotions.GetMethodName(2), ex.Message, strcmd.ToString());
362 392
            }
363 393

  
364 394
            return iRet;
365 395
        }
396
        #endregion
366 397

  
398
        #region 主キー検索の文字列を返す
367 399
        /// <summary>
368 400
        /// 主キー検索の文字列を返す
369 401
        /// </summary>
......
371 403
        /// <returns>Where文字列</returns>
372 404
        public string CreatePrimarykeyString(int LargeCode, int MiddleCode)
373 405
        {
374
            string strWork = "";
406
            StringBuilder strWork = new StringBuilder();
375 407
            try
376 408
            {
377
                strWork = string.Format(" Where LargeCode = {0}", LargeCode);
378
                strWork = string.Format(" And MiddleCode = {0}", MiddleCode);
409
                strWork.AppendFormat(" Where LargeCode = {0}", LargeCode);
410
                strWork.AppendFormat(" And MiddleCode = {0}", MiddleCode);
379 411
            }
380 412
            catch (Exception ex)
381 413
            {
382
                logger.ErrorFormat("システムエラー:{0}:{1}:{2}", CommonMotions.GetMethodName(2), ex.Message, strWork);
414
                logger.ErrorFormat("システムエラー:{0}:{1}:{2}", CommonMotions.GetMethodName(2), ex.Message, strWork.ToString());
383 415
            }
384 416

  
385
            return strWork;
417
            return strWork.ToString();
386 418
        }
387 419
        #endregion
388 420
    }
branches/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOMCommonCostMiddleSearchWord.cs
54 54

  
55 55
        #endregion
56 56

  
57
        #region パブリックメソッド
57
        #region 共通費中項目マスタ検索SQL作成
58 58
        /// <summary>
59
        /// 共通費中項目マスタ検索
59
        /// 共通費中項目マスタ検索SQL作成
60 60
        /// </summary>
61 61
        /// <param name="AddSQLString">検索条件SQL文字列</param>
62 62
        /// <param name="data">共通費中項目マスタデータ</param>
......
64 64
        private string CreateSelectSQL()
65 65
        {
66 66
            // SQL作成(DateTime型が変換できないのでCharに変換しておく)
67
            string strcmd = "SELECT";
68
            strcmd += "  LargeCode";
69
            strcmd += " ,MiddleCode";
70
            strcmd += " ,SeqNo";
71
            strcmd += " ,SearchWord";
72
            strcmd += " ,DATE_FORMAT(EntryDate, '%Y/%m/%d %H:%i:%s')";
73
            strcmd += " ,DATE_FORMAT(UpdateDate, '%Y/%m/%d %H:%i:%s')";
74
            strcmd += " FROM CommonCostMiddleSearchWord";
67
            StringBuilder strcmd = new StringBuilder();
68
            strcmd.Append("SELECT");
69
            strcmd.Append("  LargeCode");
70
            strcmd.Append(" ,MiddleCode");
71
            strcmd.Append(" ,SeqNo");
72
            strcmd.Append(" ,SearchWord");
73
            strcmd.Append(" ,DATE_FORMAT(EntryDate, '%Y/%m/%d %H:%i:%s')");
74
            strcmd.Append(" ,DATE_FORMAT(UpdateDate, '%Y/%m/%d %H:%i:%s')");
75
            strcmd.Append(" FROM CommonCostMiddleSearchWord");
75 76

  
76
            return strcmd;
77
            return strcmd.ToString();
77 78
        }
79
        #endregion
80

  
81
        #region 共通費中項目マスタ検索(複数)
82
        /// <summary>
83
        /// 共通費中項目マスタ検索(複数)
84
        /// </summary>
85
        /// <param name="AddSQLString"></param>
86
        /// <param name="data"></param>
87
        /// <param name="bConnect"></param>
88
        /// <returns></returns>
78 89
        public bool SelectAction(string AddSQLString, ref List<CommonCostMiddleSearchWord> data, bool bConnect = true)
79 90
        {
80 91
            // インターフェース
81
            string strcmd = "";
92
            StringBuilder strcmd = new StringBuilder();
82 93
            ArrayList arData = new ArrayList();
83 94

  
84 95
            try
85 96
            {
86 97
                // SQL作成(DateTime型が変換できないのでCharに変換しておく)
87
                strcmd = CreateSelectSQL() + AddSQLString;
98
                strcmd.AppendFormat("{0}{1}", CreateSelectSQL(), AddSQLString);
88 99

  
89 100
                // SQL実行
90
                if (!ExecuteReader(strcmd, ref arData, bConnect)) return false;
101
                if (!ExecuteReader(strcmd.ToString(), ref arData, bConnect)) return false;
91 102

  
92 103
                // データセット
93 104
                foreach (object[] objwrk in arData)
......
101 112
            }
102 113
            catch (Exception ex)
103 114
            {
104
                logger.ErrorFormat("システムエラー:{0}:{1}:{2}", CommonMotions.GetMethodName(2), ex.Message, strcmd);
115
                logger.ErrorFormat("システムエラー:{0}:{1}:{2}", CommonMotions.GetMethodName(2), ex.Message, strcmd.ToString());
105 116
                return false;
106 117
            }
107 118

  
108 119
        }
120
        #endregion
121

  
122
        #region 共通費中項目マスタ検索(1件)
123
        /// <summary>
124
        /// 共通費中項目マスタ検索(1件)
125
        /// </summary>
126
        /// <param name="AddSQLString"></param>
127
        /// <param name="data"></param>
128
        /// <param name="bConnect"></param>
129
        /// <returns></returns>
109 130
        public bool SelectAction(string AddSQLString, ref CommonCostMiddleSearchWord data, bool bConnect = true)
110 131
        {
111 132
            // インターフェース
112
            string strcmd = "";
133
            StringBuilder strcmd = new StringBuilder();
113 134
            ArrayList arData = new ArrayList();
114 135

  
115 136
            try
116 137
            {
117 138
                // SQL作成(DateTime型が変換できないのでCharに変換しておく)
118
                strcmd = CreateSelectSQL() + AddSQLString;
139
                strcmd.AppendFormat("{0}{1}", CreateSelectSQL(), AddSQLString);
119 140

  
120 141
                // SQL実行
121
                if (!ExecuteReader(strcmd, ref arData, bConnect)) return false;
142
                if (!ExecuteReader(strcmd.ToString(), ref arData, bConnect)) return false;
122 143
                if (arData.Count == 0) return false;
123 144

  
124 145
                // データセット
......
132 153
            }
133 154
            catch (Exception ex)
134 155
            {
135
                logger.ErrorFormat("システムエラー:{0}:{1}:{2}", CommonMotions.GetMethodName(2), ex.Message, strcmd);
156
                logger.ErrorFormat("システムエラー:{0}:{1}:{2}", CommonMotions.GetMethodName(2), ex.Message, strcmd.ToString());
136 157
                return false;
137 158
            }
138 159

  
139 160
        }
161
        #endregion
140 162

  
163
        #region 共通費中項目マスタ追加
141 164
        /// <summary>
142 165
        /// 共通費中項目マスタ追加
143 166
        /// </summary>
......
145 168
        /// <returns>true:成功 false:失敗</returns>
146 169
        public bool InsertAction(CommonCostMiddleSearchWord work, bool bConnect = true)
147 170
        {
148
            string strcmd = "";
171
            StringBuilder strcmd = new StringBuilder();
149 172
            try
150 173
            {
151 174

  
152 175
                bool bColFirst = true;
153
                strcmd = "INSERT INTO CommonCostMiddleSearchWord";
154
                strcmd += " (";
176
                strcmd.Append("INSERT INTO CommonCostMiddleSearchWord");
177
                strcmd.Append(" (");
155 178
                foreach (var gender in Enum.GetValues(typeof(NameColumn)))
156 179
                {
157
                    if (!bColFirst) strcmd += ", ";
158
                    strcmd += gender.ToString();
180
                    if (!bColFirst) strcmd.Append(", ");
181
                    strcmd.Append(gender.ToString());
159 182
                    bColFirst = false;
160 183
                }
161
                strcmd += ") VALUES (";
184
                strcmd.Append(") VALUES (");
162 185

  
163
                strcmd += string.Format("  {0}", work.LargeCode.ToString());
164
                strcmd += string.Format(", {0}", work.MiddleCode.ToString());
165
                strcmd += string.Format(", {0}", work.SeqNo.ToString());
166
                strcmd += string.Format(", '{0}'", work.SearchWord);
186
                strcmd.AppendFormat("  {0}", work.LargeCode.ToString());
187
                strcmd.AppendFormat(", {0}", work.MiddleCode.ToString());
188
                strcmd.AppendFormat(", {0}", work.SeqNo.ToString());
189
                strcmd.AppendFormat(", '{0}'", work.SearchWord);
167 190

  
168
                strcmd += string.Format(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.EntryDate);
169
                strcmd += string.Format(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.UpdateDate);
170
                strcmd += ")";
191
                strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.EntryDate);
192
                strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.UpdateDate);
193
                strcmd.Append(")");
171 194

  
172
                if (!ExecuteNonQuery(strcmd, bConnect)) return false;
195
                if (!ExecuteNonQuery(strcmd.ToString(), bConnect)) return false;
173 196

  
174 197
                return true;
175 198
            }
176 199
            catch (Exception ex)
177 200
            {
178
                logger.ErrorFormat("システムエラー:{0}:{1}:{2}", CommonMotions.GetMethodName(2), ex.Message, strcmd);
201
                logger.ErrorFormat("システムエラー:{0}:{1}:{2}", CommonMotions.GetMethodName(2), ex.Message, strcmd.ToString());
179 202
                return false;
180 203
            }
181 204
        }
205
        #endregion
182 206

  
207
        #region 共通費中項目マスタ追加
183 208
        /// <summary>
184 209
        /// 共通費中項目マスタ追加
185 210
        /// </summary>
......
187 212
        /// <returns>true:成功 false:失敗</returns>
188 213
        public bool InsertAction(List<CommonCostMiddleSearchWord> data, bool bConnect = true)
189 214
        {
190
            string strcmd = "";
215
            StringBuilder strcmd = new StringBuilder();
191 216
            try
192 217
            {
193 218
                bool bColFirst = true;
194
                strcmd = "INSERT INTO CommonCostMiddleSearchWord";
195
                strcmd += " (";
219
                strcmd.Append("INSERT INTO CommonCostMiddleSearchWord");
220
                strcmd.Append(" (");
196 221
                foreach (var gender in Enum.GetValues(typeof(NameColumn)))
197 222
                {
198
                    if (!bColFirst) strcmd += ", ";
199
                    strcmd += gender.ToString();
223
                    if (!bColFirst) strcmd.Append(", ");
224
                    strcmd.Append(gender.ToString());
200 225
                    bColFirst = false;
201 226
                }
202
                strcmd += ") VALUES";
227
                strcmd.Append(") VALUES");
203 228

  
204 229
                bool bDataFirst = true;
205 230
                foreach (CommonCostMiddleSearchWord work in data)
206 231
                {
207
                    if (bDataFirst) strcmd += " (";
208
                    else strcmd += ", (";
232
                    if (bDataFirst) strcmd.Append(" (");
233
                    else strcmd.Append(", (");
209 234

  
210
                    strcmd += string.Format("  {0}", work.LargeCode.ToString());
211
                    strcmd += string.Format(", {0}", work.MiddleCode.ToString());
212
                    strcmd += string.Format(", {0}", work.SeqNo.ToString());
213
                    strcmd += string.Format(", '{0}'", work.SearchWord);
235
                    strcmd.AppendFormat("  {0}", work.LargeCode.ToString());
236
                    strcmd.AppendFormat(", {0}", work.MiddleCode.ToString());
237
                    strcmd.AppendFormat(", {0}", work.SeqNo.ToString());
238
                    strcmd.AppendFormat(", '{0}'", work.SearchWord);
214 239

  
215
                    strcmd += string.Format(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.EntryDate);
216
                    strcmd += string.Format(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.UpdateDate);
217
                    strcmd += ")";
240
                    strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.EntryDate);
241
                    strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.UpdateDate);
242
                    strcmd.Append(")");
218 243

  
219 244
                    bDataFirst = false;
220 245
                }
221 246

  
222
                if (!ExecuteNonQuery(strcmd, false)) return false;
247
                if (!ExecuteNonQuery(strcmd.ToString(), false)) return false;
223 248

  
224 249
                return true;
225 250
            }
226 251
            catch (Exception ex)
227 252
            {
228
                logger.ErrorFormat("システムエラー:{0}:{1}:{2}", CommonMotions.GetMethodName(2), ex.Message, strcmd);
253
                logger.ErrorFormat("システムエラー:{0}:{1}:{2}", CommonMotions.GetMethodName(2), ex.Message, strcmd.ToString());
229 254
                return false;
230 255
            }
231 256
        }
257
        #endregion
232 258

  
259
        #region 共通費中項目マスタ更新
233 260
        /// <summary>
234 261
        /// 共通費中項目マスタ更新
235 262
        /// </summary>
......
238 265
        /// <returns>true:成功 false:失敗</returns>
239 266
        public bool UpdateAction(string AddSQLString, CommonCostMiddleSearchWord data, bool bConnect = true)
240 267
        {
241
            string strcmd = "";
268
            StringBuilder strcmd = new StringBuilder();
242 269
            try
243 270
            {
244 271

  
245
                strcmd = "UPDATE CommonCostMiddleSearchWord";
272
                strcmd.Append("UPDATE CommonCostMiddleSearchWord");
246 273

  
247
                strcmd += " SET";
274
                strcmd.Append(" SET");
248 275

  
249
                strcmd += string.Format(" LargeCode = {0}", data.LargeCode.ToString());
250
                strcmd += string.Format(" MiddleCode = {0}", data.MiddleCode.ToString());
251
                strcmd += string.Format(",SeqNo = {0}", data.SeqNo.ToString());
252
                strcmd += string.Format(",SearchWord = '{0}'", data.SearchWord);
276
                strcmd.AppendFormat(" LargeCode = {0}", data.LargeCode.ToString());
277
                strcmd.AppendFormat(" MiddleCode = {0}", data.MiddleCode.ToString());
278
                strcmd.AppendFormat(",SeqNo = {0}", data.SeqNo.ToString());
279
                strcmd.AppendFormat(",SearchWord = '{0}'", data.SearchWord);
253 280

  
254
                strcmd += ", UpdateDate = NOW()";
255
                strcmd += AddSQLString;
281
                strcmd.Append(", UpdateDate = NOW()");
282
                strcmd.Append(AddSQLString);
256 283

  
257
                if (!ExecuteNonQuery(strcmd, bConnect)) return false;
284
                if (!ExecuteNonQuery(strcmd.ToString(), bConnect)) return false;
258 285

  
259 286
                return true;
260 287
            }
261 288
            catch (Exception ex)
262 289
            {
263
                logger.ErrorFormat("システムエラー:{0}:{1}:{2}", CommonMotions.GetMethodName(2), ex.Message, strcmd);
290
                logger.ErrorFormat("システムエラー:{0}:{1}:{2}", CommonMotions.GetMethodName(2), ex.Message, strcmd.ToString());
264 291
                return false;
265 292
            }
266 293
        }
294
        #endregion
267 295

  
268

  
296
        #region 共通費中項目マスタ削除
269 297
        /// <summary>
270 298
        /// 共通費中項目マスタ削除
271 299
        /// </summary>
......
275 303
        public bool DeleteAction(string AddSQLString, bool bConnect = true)
276 304
        {
277 305
            // インターフェース
278
            string strcmd = "";
306
            StringBuilder strcmd = new StringBuilder();
279 307
            try
280 308
            {
281
                strcmd = string.Format("{0}{1}", "DELETE FROM CommonCostMiddleSearchWord", AddSQLString);
309
                strcmd.AppendFormat("{0}{1}", "DELETE FROM CommonCostMiddleSearchWord", AddSQLString);
282 310

  
283
                if (!ExecuteNonQuery(strcmd, bConnect)) return false;
311
                if (!ExecuteNonQuery(strcmd.ToString(), bConnect)) return false;
284 312

  
285 313
                return true;
286 314
            }
287 315
            catch (Exception ex)
288 316
            {
289
                logger.ErrorFormat("システムエラー:{0}:{1}:{2}", CommonMotions.GetMethodName(2), ex.Message, strcmd);
317
                logger.ErrorFormat("システムエラー:{0}:{1}:{2}", CommonMotions.GetMethodName(2), ex.Message, strcmd.ToString());
290 318
                return false;
291 319
            }
292 320
        }
321
        #endregion
293 322

  
323
        #region OracleDataReaderより構造体へセットする
294 324
        /// <summary>
295 325
        /// OracleDataReaderより構造体へセットする
296 326
        /// </summary>
......
318 348
                logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message);
319 349
            }
320 350
        }
321

  
322 351
        #endregion
323 352

  
324
        #region パブリックメソッド(特殊処理)
353
        #region 主キー検索の文字列を返す
325 354
        /// <summary>
326 355
        /// 主キー検索の文字列を返す
327 356
        /// </summary>
......
329 358
        /// <returns>Where文字列</returns>
330 359
        public string CreatePrimarykeyString(int LargeCode, int MiddleCode = 0)
331 360
        {
332
            string strWork = "";
361
            StringBuilder strWork = new StringBuilder();
333 362
            try
334 363
            {
335
                strWork = string.Format(" Where LargeCode = {0}", LargeCode);
336
                if (MiddleCode != 0) strWork += string.Format(" And MiddleCode = {0}", MiddleCode);
364
                strWork.AppendFormat(" Where LargeCode = {0}", LargeCode);
365
                if (MiddleCode != 0) strWork.AppendFormat(" And MiddleCode = {0}", MiddleCode);
337 366
            }
338 367
            catch (Exception ex)
339 368
            {
340
                logger.ErrorFormat("システムエラー:{0}:{1}:{2}", CommonMotions.GetMethodName(2), ex.Message, strWork);
369
                logger.ErrorFormat("システムエラー:{0}:{1}:{2}", CommonMotions.GetMethodName(2), ex.Message, strWork.ToString());
341 370
            }
342 371

  
343
            return strWork;
372
            return strWork.ToString();
344 373
        }
345 374
        #endregion
346 375
    }
branches/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOMComponent.cs
67 67
        private string CreateSelectSQL()
68 68
        {
69 69
            // SQL作成(DateTime型が変換できないのでCharに変換しておく)
70
            string strcmd = "SELECT";
71
            strcmd += "  ComponentCode";
72
            strcmd += " ,DisplayOrder";
73
            strcmd += " ,ComponentName";
74
            strcmd += " ,SubitemsFlg";
75
            strcmd += " ,DirectInputFlg";
76
            strcmd += " ,MyExpensesFlg";
77
            strcmd += " ,DeleteFlg";
78
            strcmd += " ,DATE_FORMAT(EntryDate, '%Y/%m/%d %H:%i:%s')";
79
            strcmd += " ,DATE_FORMAT(UpdateDate, '%Y/%m/%d %H:%i:%s')";
80
            strcmd += " FROM ComponentMaster";
70
            StringBuilder strcmd = new StringBuilder();
71
            strcmd.Append("SELECT");
72
            strcmd.Append("  ComponentCode");
73
            strcmd.Append(" ,DisplayOrder");
74
            strcmd.Append(" ,ComponentName");
75
            strcmd.Append(" ,SubitemsFlg");
76
            strcmd.Append(" ,DirectInputFlg");
77
            strcmd.Append(" ,MyExpensesFlg");
78
            strcmd.Append(" ,DeleteFlg");
79
            strcmd.Append(" ,DATE_FORMAT(EntryDate, '%Y/%m/%d %H:%i:%s')");
80
            strcmd.Append(" ,DATE_FORMAT(UpdateDate, '%Y/%m/%d %H:%i:%s')");
81
            strcmd.Append(" FROM ComponentMaster");
81 82

  
82
            return strcmd;
83
            return strcmd.ToString();
83 84
        }
84 85
        #endregion
85 86

  
......
94 95
        public bool SelectAction(string AddSQLString, ref List<ComponentMaster> data, bool bConnect = true)
95 96
        {
96 97
            // インターフェース
97
            string strcmd = "";
98
            StringBuilder strcmd = new StringBuilder();
98 99
            ArrayList arData = new ArrayList();
99 100

  
100 101
            try
101 102
            {
102 103
                // SQL作成(DateTime型が変換できないのでCharに変換しておく)
103
                strcmd = CreateSelectSQL() + AddSQLString;
104
                strcmd.AppendFormat("{0}{1}", CreateSelectSQL(), AddSQLString);
104 105

  
105 106
                // SQL実行
106
                if (!ExecuteReader(strcmd, ref arData, bConnect)) return false;
107
                if (!ExecuteReader(strcmd.ToString(), ref arData, bConnect)) return false;
107 108

  
108 109
                // データセット
109 110
                foreach (object[] objwrk in arData)
......
117 118
            }
118 119
            catch (Exception ex)
119 120
            {
120
                logger.ErrorFormat("システムエラー:{0}:{1}:{2}", CommonMotions.GetMethodName(2), ex.Message, strcmd);
121
                logger.ErrorFormat("システムエラー:{0}:{1}:{2}", CommonMotions.GetMethodName(2), ex.Message, strcmd.ToString());
121 122
                return false;
122 123
            }
123 124

  
......
135 136
        public bool SelectAction(string AddSQLString, ref ComponentMaster data, bool bConnect = true)
136 137
        {
137 138
            // インターフェース
138
            string strcmd = "";
139
            StringBuilder strcmd = new StringBuilder();
139 140
            ArrayList arData = new ArrayList();
140 141

  
141 142
            try
142 143
            {
143 144
                // SQL作成(DateTime型が変換できないのでCharに変換しておく)
144
                strcmd = CreateSelectSQL() + AddSQLString;
145
                strcmd.AppendFormat("{0}{1}", CreateSelectSQL(), AddSQLString);
145 146

  
146 147
                // SQL実行
147
                if (!ExecuteReader(strcmd, ref arData, bConnect)) return false;
148
                if (!ExecuteReader(strcmd.ToString(), ref arData, bConnect)) return false;
148 149
                if (arData.Count == 0) return false;
149 150

  
150 151
                // データセット
......
158 159
            }
159 160
            catch (Exception ex)
160 161
            {
161
                logger.ErrorFormat("システムエラー:{0}:{1}:{2}", CommonMotions.GetMethodName(2), ex.Message, strcmd);
162
                logger.ErrorFormat("システムエラー:{0}:{1}:{2}", CommonMotions.GetMethodName(2), ex.Message, strcmd.ToString());
162 163
                return false;
163 164
            }
164 165

  
......
173 174
        /// <returns>true:成功 false:失敗</returns>
174 175
        public bool InsertAction(ComponentMaster data, bool bConnect = true)
175 176
        {
176
            string strcmd = "";
177
            StringBuilder strcmd = new StringBuilder();
177 178
            try
178 179
            {
179 180

  
180 181
                bool bColFirst = true;
181
                strcmd = "INSERT INTO ComponentMaster";
182
                strcmd += " (";
182
                strcmd.Append("INSERT INTO ComponentMaster");
183
                strcmd.Append(" (");
183 184
                foreach (var gender in Enum.GetValues(typeof(NameColumn)))
184 185
                {
185
                    if (!bColFirst) strcmd += ", ";
186
                    strcmd += gender.ToString();
186
                    if (!bColFirst) strcmd.Append(", ");
187
                    strcmd.Append(gender.ToString());
187 188
                    bColFirst = false;
188 189
                }
189
                strcmd += ") VALUES (";
190
                strcmd.Append(") VALUES (");
190 191

  
191
                strcmd += string.Format("  {0}", data.ComponentCode.ToString());
192
                strcmd += string.Format(", {0}", data.DisplayOrder.ToString());
193
                strcmd += string.Format(", '{0}'", data.ComponentName);
194
                strcmd += string.Format(", {0}", data.SubitemsFlg.ToString());
195
                strcmd += string.Format(", {0}", data.DirectInputFlg.ToString());
196
                strcmd += string.Format(", {0}", data.MyExpensesFlg.ToString());
197
                strcmd += string.Format(", {0}", data.DeleteFlg.ToString());
192
                strcmd.AppendFormat("  {0}", data.ComponentCode.ToString());
193
                strcmd.AppendFormat(", {0}", data.DisplayOrder.ToString());
194
                strcmd.AppendFormat(", '{0}'", data.ComponentName);
195
                strcmd.AppendFormat(", {0}", data.SubitemsFlg.ToString());
196
                strcmd.AppendFormat(", {0}", data.DirectInputFlg.ToString());
197
                strcmd.AppendFormat(", {0}", data.MyExpensesFlg.ToString());
198
                strcmd.AppendFormat(", {0}", data.DeleteFlg.ToString());
198 199

  
199
                strcmd += string.Format(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", data.EntryDate);
200
                strcmd += string.Format(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", data.UpdateDate);
201
                strcmd += ")";
200
                strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", data.EntryDate);
201
                strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", data.UpdateDate);
202
                strcmd.Append(")");
202 203

  
203
                if (!ExecuteNonQuery(strcmd, bConnect)) return false;
204
                if (!ExecuteNonQuery(strcmd.ToString(), bConnect)) return false;
204 205

  
205 206
                return true;
206 207
            }
207 208
            catch (Exception ex)
208 209
            {
209
                logger.ErrorFormat("システムエラー:{0}:{1}:{2}", CommonMotions.GetMethodName(2), ex.Message, strcmd);
210
                logger.ErrorFormat("システムエラー:{0}:{1}:{2}", CommonMotions.GetMethodName(2), ex.Message, strcmd.ToString());
210 211
                return false;
211 212
            }
212 213
        }
......
220 221
        /// <returns>true:成功 false:失敗</returns>
221 222
        public bool InsertAction(List<ComponentMaster> data, bool bConnect = true)
222 223
        {
223
            string strcmd = "";
224
            StringBuilder strcmd = new StringBuilder();
224 225
            try
225 226
            {
226 227
                bool bColFirst = true;
227
                strcmd = "INSERT INTO ComponentMaster";
228
                strcmd += " (";
228
                strcmd.Append("INSERT INTO ComponentMaster");
229
                strcmd.Append(" (");
229 230
                foreach (var gender in Enum.GetValues(typeof(NameColumn)))
230 231
                {
231
                    if (!bColFirst) strcmd += ", ";
232
                    strcmd += gender.ToString();
232
                    if (!bColFirst) strcmd.Append(", ");
233
                    strcmd.Append(gender.ToString());
233 234
                    bColFirst = false;
234 235
                }
235
                strcmd += ") VALUES";
236
                strcmd.Append(") VALUES");
236 237

  
237 238
                bool bDataFirst = true;
238 239
                foreach (ComponentMaster work in data)
239 240
                {
240
                    if (bDataFirst) strcmd += " (";
241
                    else strcmd += ", (";
241
                    if (bDataFirst) strcmd.Append(" (");
242
                    else strcmd.Append(", (");
242 243

  
243
                    strcmd += string.Format("  {0}", work.ComponentCode.ToString());
244
                    strcmd += string.Format(", {0}", work.DisplayOrder.ToString());
245
                    strcmd += string.Format(", '{0}'", work.ComponentName);
246
                    strcmd += string.Format(", {0}", work.SubitemsFlg.ToString());
247
                    strcmd += string.Format(", {0}", work.DirectInputFlg.ToString());
248
                    strcmd += string.Format(", {0}", work.MyExpensesFlg.ToString());
249
                    strcmd += string.Format(", {0}", work.DeleteFlg.ToString());
244
                    strcmd.AppendFormat("  {0}", work.ComponentCode.ToString());
245
                    strcmd.AppendFormat(", {0}", work.DisplayOrder.ToString());
246
                    strcmd.AppendFormat(", '{0}'", work.ComponentName);
247
                    strcmd.AppendFormat(", {0}", work.SubitemsFlg.ToString());
248
                    strcmd.AppendFormat(", {0}", work.DirectInputFlg.ToString());
249
                    strcmd.AppendFormat(", {0}", work.MyExpensesFlg.ToString());
250
                    strcmd.AppendFormat(", {0}", work.DeleteFlg.ToString());
250 251

  
251
                    strcmd += string.Format(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.EntryDate);
252
                    strcmd += string.Format(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.UpdateDate);
253
                    strcmd += ")";
252
                    strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.EntryDate);
253
                    strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.UpdateDate);
254
                    strcmd.Append(")");
254 255

  
255 256
                    bDataFirst = false;
256 257
                }
257 258

  
258
                if (!ExecuteNonQuery(strcmd, false)) return false;
259
                if (!ExecuteNonQuery(strcmd.ToString(), false)) return false;
259 260

  
260 261
                return true;
261 262
            }
262 263
            catch (Exception ex)
263 264
            {
264
                logger.ErrorFormat("システムエラー:{0}:{1}:{2}", CommonMotions.GetMethodName(2), ex.Message, strcmd);
265
                logger.ErrorFormat("システムエラー:{0}:{1}:{2}", CommonMotions.GetMethodName(2), ex.Message, strcmd.ToString());
265 266
                return false;
266 267
            }
267 268
        }
......
276 277
        /// <returns>true:成功 false:失敗</returns>
277 278
        public bool UpdateAction(string AddSQLString, ComponentMaster data, bool bConnect = true)
278 279
        {
279
            string strcmd = "";
280
            StringBuilder strcmd = new StringBuilder();
280 281
            try
281 282
            {
282 283

  
283
                strcmd = "UPDATE ComponentMaster";
284
                strcmd.Append("UPDATE ComponentMaster");
284 285

  
285
                strcmd += " SET";
286
                strcmd.Append(" SET");
286 287

  
287
                strcmd += string.Format(" ComponentCode = {0}", data.ComponentCode.ToString());
288
                strcmd += string.Format(",DisplayOrder = {0}", data.DisplayOrder.ToString());
289
                strcmd += string.Format(",ComponentName = '{0}'", data.ComponentName);
290
                strcmd += string.Format(",SubitemsFlg = {0}", data.SubitemsFlg.ToString());
291
                strcmd += string.Format(",DirectInputFlg = {0}", data.DirectInputFlg.ToString());
292
                strcmd += string.Format(",MyExpensesFlg = {0}", data.MyExpensesFlg.ToString());
293
                strcmd += string.Format(",DeleteFlg = {0}", data.DeleteFlg.ToString());
288
                strcmd.AppendFormat(" ComponentCode = {0}", data.ComponentCode.ToString());
289
                strcmd.AppendFormat(",DisplayOrder = {0}", data.DisplayOrder.ToString());
290
                strcmd.AppendFormat(",ComponentName = '{0}'", data.ComponentName);
291
                strcmd.AppendFormat(",SubitemsFlg = {0}", data.SubitemsFlg.ToString());
292
                strcmd.AppendFormat(",DirectInputFlg = {0}", data.DirectInputFlg.ToString());
293
                strcmd.AppendFormat(",MyExpensesFlg = {0}", data.MyExpensesFlg.ToString());
294
                strcmd.AppendFormat(",DeleteFlg = {0}", data.DeleteFlg.ToString());
294 295

  
295
                strcmd += ", UpdateDate = NOW()";
296
                strcmd += AddSQLString;
296
                strcmd.Append(", UpdateDate = NOW()");
297
                strcmd.Append(AddSQLString);
297 298

  
298
                if (!ExecuteNonQuery(strcmd, bConnect)) return false;
299
                if (!ExecuteNonQuery(strcmd.ToString(), bConnect)) return false;
299 300

  
300 301
                return true;
301 302
            }
302 303
            catch (Exception ex)
303 304
            {
304
                logger.ErrorFormat("システムエラー:{0}:{1}:{2}", CommonMotions.GetMethodName(2), ex.Message, strcmd);
305
                logger.ErrorFormat("システムエラー:{0}:{1}:{2}", CommonMotions.GetMethodName(2), ex.Message, strcmd.ToString());
305 306
                return false;
306 307
            }
307 308
        }
......
317 318
        public bool DeleteAction(string AddSQLString, bool bConnect = true)
318 319
        {
319 320
            // インターフェース
320
            string strcmd = "";
321
            StringBuilder strcmd = new StringBuilder();
321 322
            try
322 323
            {
323
                strcmd = string.Format("{0}{1}", "DELETE FROM ComponentMaster", AddSQLString);
324
                strcmd.AppendFormat("{0}{1}", "DELETE FROM ComponentMaster", AddSQLString);
324 325

  
325
                if (!ExecuteNonQuery(strcmd, bConnect)) return false;
326
                if (!ExecuteNonQuery(strcmd.ToString(), bConnect)) return false;
326 327

  
327 328
                return true;
328 329
            }
329 330
            catch (Exception ex)
330 331
            {
331
                logger.ErrorFormat("システムエラー:{0}:{1}:{2}", CommonMotions.GetMethodName(2), ex.Message, strcmd);
332
                logger.ErrorFormat("システムエラー:{0}:{1}:{2}", CommonMotions.GetMethodName(2), ex.Message, strcmd.ToString());
332 333
                return false;
333 334
            }
334 335
        }
......
448 449
        public int SelectMaxComponentCount(string AddSQLString, bool bConnect = true)
449 450
        {
450 451
            // インターフェース
451
            string strcmd = "";
452
            StringBuilder strcmd = new StringBuilder();
452 453
            ArrayList arData = new ArrayList();
453 454
            int iRet = 0;
454 455
            try
455 456
            {
456 457
                // SQL作成
457
                strcmd = "SELECT IFNULL(MAX(ComponentCode), 0) FROM ComponentMaster" + AddSQLString;
458
                strcmd.AppendFormat("SELECT IFNULL(MAX(ComponentCode), 0) FROM ComponentMaster{0}", AddSQLString);
458 459

  
459 460
                // SQL実行
460
                if (!ExecuteReader(strcmd, ref arData, bConnect)) return iRet;
461
                if (!ExecuteReader(strcmd.ToString(), ref arData, bConnect)) return iRet;
461 462

  
462 463
                // データセット
463 464
                foreach (object[] objwrk in arData)
......
470 471
            }
471 472
            catch (Exception ex)
472 473
            {
473
                logger.ErrorFormat("システムエラー:{0}:{1}:{2}", CommonMotions.GetMethodName(2), ex.Message, strcmd);
474
                logger.ErrorFormat("システムエラー:{0}:{1}:{2}", CommonMotions.GetMethodName(2), ex.Message, strcmd.ToString());
474 475
            }
475 476

  
476 477
            return iRet;
......
485 486
        /// <returns>Where文字列</returns>
486 487
        public string CreatePrimarykeyString(int ComponentCode)
487 488
        {
488
            string strWork = "";
489
            StringBuilder strWork = new StringBuilder();
489 490
            try
490 491
            {
491
                strWork = string.Format(" Where ComponentCode = {0}", ComponentCode);
492
                strWork.AppendFormat(" Where ComponentCode = {0}", ComponentCode);
492 493
            }
493 494
            catch (Exception ex)
494 495
            {
495
                logger.ErrorFormat("システムエラー:{0}:{1}:{2}", CommonMotions.GetMethodName(2), ex.Message, strWork);
496
                logger.ErrorFormat("システムエラー:{0}:{1}:{2}", CommonMotions.GetMethodName(2), ex.Message, strWork.ToString());
496 497
            }
497 498

  
498
            return strWork;
499
            return strWork.ToString();
499 500
        }
500 501
        #endregion
501 502

  
......
510 511
        /// <returns></returns>
511 512
        public bool UpdateFeild(int ComponentCode, int FeildNo, object value, bool bConnect = true)
512 513
        {
513
            string strcmd = "";
514
            StringBuilder strcmd = new StringBuilder();
514 515
            try
515 516
            {
516 517

  
517
                strcmd = "UPDATE ComponentMaster";
518
                strcmd.Append("UPDATE ComponentMaster");
518 519

  
519
                strcmd += " SET";
520
                strcmd.Append(" SET");
520 521
                switch (FeildNo)
521 522
                {
522 523
                    case (int)NameColumn.ComponentCode:
523
                        strcmd += string.Format(" ComponentCode = {0}", ((int)value).ToString());
524
                        strcmd.AppendFormat(" ComponentCode = {0}", ((int)value).ToString());
524 525
                        break;
525 526
                    case (int)NameColumn.DisplayOrder:
526
                        strcmd += string.Format(" DisplayOrder = {0}", ((int)value).ToString());
527
                        strcmd.AppendFormat(" DisplayOrder = {0}", ((int)value).ToString());
527 528
                        break;
528 529
                    case (int)NameColumn.ComponentName:
529
                        strcmd += string.Format(" ComponentName = '{0}'", value.ToString());
530
                        strcmd.AppendFormat(" ComponentName = '{0}'", value.ToString());
530 531
                        break;
531 532
                    case (int)NameColumn.SubitemsFlg:
532
                        strcmd += string.Format(" SubitemsFlg = {0}", ((int)value).ToString());
533
                        strcmd.AppendFormat(" SubitemsFlg = {0}", ((int)value).ToString());
533 534
                        break;
534 535
                    case (int)NameColumn.DirectInputFlg:
535
                        strcmd += string.Format(" DirectInputFlg = {0}", ((int)value).ToString());
536
                        strcmd.AppendFormat(" DirectInputFlg = {0}", ((int)value).ToString());
536 537
                        break;
537 538
                    case (int)NameColumn.MyExpensesFlg:
538
                        strcmd += string.Format(" MyExpensesFlg = {0}", ((int)value).ToString());
539
                        strcmd.AppendFormat(" MyExpensesFlg = {0}", ((int)value).ToString());
539 540
                        break;
540 541
                    case (int)NameColumn.DeleteFlg:
541
                        strcmd += string.Format(" DeleteFlg = {0}", ((int)value).ToString());
542
                        strcmd.AppendFormat(" DeleteFlg = {0}", ((int)value).ToString());
542 543
                        break;
543 544
                }
544 545

  
545
                strcmd += ", UpdateDate = NOW()";
546
                strcmd += CreatePrimarykeyString(ComponentCode);
546
                strcmd.Append(", UpdateDate = NOW()");
547
                strcmd.Append(CreatePrimarykeyString(ComponentCode));
547 548

  
548
                if (!ExecuteNonQuery(strcmd, bConnect)) return false;
549
                if (!ExecuteNonQuery(strcmd.ToString(), bConnect)) return false;
549 550

  
550 551
                return true;
551 552
            }
552 553
            catch (Exception ex)
553 554
            {
554
                logger.ErrorFormat("システムエラー:{0}:{1}:{2}", CommonMotions.GetMethodName(2), ex.Message, strcmd);
555
                logger.ErrorFormat("システムエラー:{0}:{1}:{2}", CommonMotions.GetMethodName(2), ex.Message, strcmd.ToString());
555 556
                return false;
556 557
            }
557 558
        }
branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ApprovalScreen/FrmApprovalScreen.cs
648 648
                        RemoveApprovalLinkDetail();
649 649
                        break;
650 650

  
651
                    // 5:?????????F
651
                    // 5:???????F
652 652
                    case (int)ClsExcute.ApprovalListNo.OrderBillingApproval:
653 653
                    // 6:?H??????F
654 654
                    case (int)ClsExcute.ApprovalListNo.DRConstructionApproval:
......
701 701
                case (int)ClsExcute.ApprovalListNo.PurchaseOrderEntryApproval:              // 4:?????????F
702 702
                    iNextProcessNo = (int)ClsExcute.ProcessExecuteNo.PurchaseOrderEntry;
703 703
                    break;
704
                case (int)ClsExcute.ApprovalListNo.OrderBillingApproval:                    // 5:?????????F
704
                case (int)ClsExcute.ApprovalListNo.OrderBillingApproval:                    // 5:???????F
705 705
                    iNextProcessNo = (int)ClsExcute.ProcessExecuteNo.RequestInput;
706 706
                    break;
707 707
                case (int)ClsExcute.ApprovalListNo.DRConstructionApproval:                  // 6:?H??????F
......
731 731
                case (int)ClsExcute.ApprovalListNo.DRProceedingsApproval:                   // 7:?c???^???F
732 732
                    break;
733 733
                case (int)ClsExcute.ApprovalListNo.PurchaseOrderEntryApproval:              // 4:?????????F
734
                case (int)ClsExcute.ApprovalListNo.OrderBillingApproval:                    // 5:?????????F
734
                case (int)ClsExcute.ApprovalListNo.OrderBillingApproval:                    // 5:???????F
735 735
                    ClsExcute.ProcControlPara[NowPoint].BoolExecParameter.Add(true);        // ----- ????\???t???O
736 736
                    break;
737 737
                case (int)ClsExcute.ApprovalListNo.DRConstructionApproval:                  // 6:?H??????F
branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ApprovalScreen/FrmApprovalScreenAuxiliary.cs
62 62
                case (int)ClsExcute.ApprovalListNo.PurchaseOrderEntryApproval:
63 63
                    if (RecPara.ProcNo == (int)ClsExcute.ProcessExecuteNo.PurchaseOrderEntry) bAns = true;
64 64
                    break;
65
                // 5:請求承認
65
                // 5:請求承認
66 66
                case (int)ClsExcute.ApprovalListNo.OrderBillingApproval:
67 67
                    //if (RecPara.ProcNo == (int)ClsExcute.ProcessExecuteNo.ConstructionBudget) bAns = true;
68 68
                    break;
branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionBaseInfo/FrmConstructionBaseInfo.cs
343 343
            /// </summary>
344 344
            BillingPetition,
345 345
            /// <summary>
346
            /// 74:?????????F??
346
            /// 74:???????F??
347 347
            /// </summary>
348 348
            BillingApproval,
349 349
            /// <summary>
......
452 452
                                                                        new KeyValuePair<int, string>(71,"???????????"),
453 453
                                                                        new KeyValuePair<int, string>(72,"??????????m?F??"),
454 454
                                                                        new KeyValuePair<int, string>(73,"???????\????"),
455
                                                                        new KeyValuePair<int, string>(74,"?????????F??"),
455
                                                                        new KeyValuePair<int, string>(74,"???????F??"),
456 456
                                                                        new KeyValuePair<int, string>(75,"????????????"),
457 457
                                                                        new KeyValuePair<int, string>(76,"???????X??/??n????")};
458 458
        #endregion
......
639 639
                        {false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false},     // 71:???????????
640 640
                        {false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false},     // 72:??????????m?F??
641 641
                        {false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false},     // 73:???????\????
642
                        {false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false},     // 74:?????????F??
642
                        {false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false},     // 74:???????F??
643 643
                        {false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false},     // 75:????????????
644 644
                        {false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false},     // 76:???????X??/??n????
645 645
                        {false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false},     // 77:?H?????S??????
......
737 737
                        { false, false, false, false, false, false, true,  false, false, false, false, false, false, false, false, false, false, false},    // 71:???????????
738 738
                        { false, false, false, false, false, false, true,  false, false, false, false, false, false, false, false, false, false, false},    // 72:??????????m?F??
739 739
                        { false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false},    // 73:???????\????
740
                        { false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false},    // 74:?????????F??
740
                        { false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false},    // 74:???????F??
741 741
                        { false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false},    // 75:????????????
742 742
                        { false, false, false, false, false, false, false, false, false, true,  false, false, false, false, false, false, false, false},    // 76:???????X??/??n????
743 743
                        { true,  true,  true,  true,  true,  true,  true,  false, false, false, false, false, false, false, false, false,  true,  true},    // 77:?H?????S??????
branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionBaseInfo/FrmConstructionBaseInfo.designer.cs
2676 2676
            this.label88.Name = "label88";
2677 2677
            this.label88.Size = new System.Drawing.Size(120, 30);
2678 2678
            this.label88.TabIndex = 23;
2679
            this.label88.Text = "請求承認日";
2679
            this.label88.Text = "請求承認日";
2680 2680
            this.label88.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
2681 2681
            // 
2682 2682
            // label90
branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionBaseInfo/FrmConstructionBaseInfoAuxiliary.cs
728 728
                        m_DspCtrl[(int)DspCnt.PurchaseOrderEntryApproval].Text = strDspData2;		        // 68:?????????F??
729 729
                        break;
730 730
                    case (int)ClsExcute.ApprovalListNo.OrderBillingApproval:
731
                        // 5:?????????F
731
                        // 5:???????F
732 732
                        m_DspCtrl[(int)DspCnt.BillingPetition].Text = strDspData1;		                    // 73:???????\????
733
                        m_DspCtrl[(int)DspCnt.BillingApproval].Text = strDspData2;		                    // 74:?????????F??
733
                        m_DspCtrl[(int)DspCnt.BillingApproval].Text = strDspData2;		                    // 74:???????F??
734 734
                        break;
735 735
                }
736 736
            }
......
762 762
                SetApprovalDates(iApprovalCode);
763 763
                iApprovalCode = ClsExcute.AppovalList.First(x => x.Value.Equals("?????????F")).Key;
764 764
                SetApprovalDates(iApprovalCode);
765
                iApprovalCode = ClsExcute.AppovalList.First(x => x.Value.Equals("?????????F")).Key;
765
                iApprovalCode = ClsExcute.AppovalList.First(x => x.Value.Equals("???????F")).Key;
766 766
                SetApprovalDates(iApprovalCode);
767 767

  
768 768
                // ?????????????t???Z?b?g????
......
3538 3538
            m_DspCtrl[(int)DspCnt.PurchaseOrderReturnDate] = textBoxEX9;		                 // 71: ???????????
3539 3539
            m_DspCtrl[(int)DspCnt.PurchaseOrderReturnCheckDate] = textBoxEX10;		             // 72: ??????????m?F??
3540 3540
            m_DspCtrl[(int)DspCnt.BillingPetition] = label105;		                             // 73: ???????\????
3541
            m_DspCtrl[(int)DspCnt.BillingApproval] = label106;		                             // 74: ?????????F??
3541
            m_DspCtrl[(int)DspCnt.BillingApproval] = label106;		                             // 74: ???????F??
3542 3542
            m_DspCtrl[(int)DspCnt.BillingOutPutDate] = label107;		                         // 75: ????????????
3543 3543
            m_DspCtrl[(int)DspCnt.BillingSendDate] = textBoxEX6;		                         // 76: ???????X??/??n????
3544 3544
            m_DspCtrl[(int)DspCnt.ConstrSubDepartment] = comboBoxEX3;                            // 77: ?H?????S??????
branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/RequestInput/FrmRequestInput.cs
351 351
                    // エラー表示
352 352
                    SetErrorIndicate(lstMainConstructionCode);
353 353

  
354
                    ShowMessageBox("請求準備ではないため、請求承認の申請はできません。", "申請確認", MessageBoxButtons.OK, MessageBoxIcon.Error);
354
                    ShowMessageBox("請求準備ではないため、請求承認の申請はできません。", "申請確認", MessageBoxButtons.OK, MessageBoxIcon.Error);
355 355

  
356 356
                    return;
357 357
                }
358 358

  
359 359
                if (ret == (int)CheckResult.NoError)
360 360
                {
361
                    if (ShowMessageBox("請求承認を申請してよろしいですか?", "申請確認", MessageBoxButtons.YesNo, MessageBoxIcon.Information) == DialogResult.No)
361
                    if (ShowMessageBox("請求承認を申請してよろしいですか?", "申請確認", MessageBoxButtons.YesNo, MessageBoxIcon.Information) == DialogResult.No)
362 362
                    {
363 363
                        return;
364 364
                    }
365 365
                }
366 366
                else if (ret == (int)CheckResult.WarningUnmatch)
367 367
                {
368
                    if (ShowMessageBox("工事金額が全て請求されていませんが、\n請求承認を申請してよろしいですか?", "申請確認", MessageBoxButtons.YesNo, MessageBoxIcon.Warning) == DialogResult.No)
368
                    if (ShowMessageBox("工事金額が全て請求されていませんが、\n請求承認を申請してよろしいですか?", "申請確認", MessageBoxButtons.YesNo, MessageBoxIcon.Warning) == DialogResult.No)
369 369
                    {
370 370
                        return;
371 371
                    }
372 372
                }
373 373
                else if (ret == (int)CheckResult.WarningOver)
374 374
                {
375
                    if (ShowMessageBox("請求金額が工事金額を超えていますが、\n請求承認を申請してよろしいですか?", "申請確認", MessageBoxButtons.YesNo, MessageBoxIcon.Warning) == DialogResult.No)
375
                    if (ShowMessageBox("請求金額が工事金額を超えていますが、\n請求承認を申請してよろしいですか?", "申請確認", MessageBoxButtons.YesNo, MessageBoxIcon.Warning) == DialogResult.No)
376 376
                    {
377 377
                        return;
378 378
                    }
branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/StatusAndDateReq.cs
21 21
        {
22 22
            //MessageBox.Show("工事金額が全て請求されていませんが、\r\n請求書承認を申請してよろしいですか?", "請求書申請", MessageBoxButtons.YesNo, MessageBoxIcon.Warning);
23 23
//            MessageBox.Show("請求書承認を申請してよろしいですか?", "請求書申請", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
24
            MessageBox.Show("施工完了ではないため、請求承認の申請はできません。", "請求書申請", MessageBoxButtons.OK, MessageBoxIcon.Error);
24
            MessageBox.Show("施工完了ではないため、請求承認の申請はできません。", "請求書申請", MessageBoxButtons.OK, MessageBoxIcon.Error);
25 25
        }
26 26
    }
27 27
}
branches/src/ProcessManagement/ProcessManagement/Forms/SubForms/FrmApprovalStatusList.cs
264 264
                int iCode2 = ClsExcute.AppovalList.First(x => x.Value.Equals("積算予算書承認")).Key;
265 265
                int iCode3 = ClsExcute.AppovalList.First(x => x.Value.Equals("工事予算書承認")).Key;
266 266
                int iCode4 = ClsExcute.AppovalList.First(x => x.Value.Equals("注文書承認")).Key;
267
                int iCode5 = ClsExcute.AppovalList.First(x => x.Value.Equals("請求承認")).Key;
267
                int iCode5 = ClsExcute.AppovalList.First(x => x.Value.Equals("請求承認")).Key;
268 268

  
269 269
                // 営業担当者より部署コードを取得する
270 270
                int CurrentPersonCode = cbiRec.SalesPersonCode;
branches/src/ProcessManagement/ProcessManagement/Forms/ZMenu/FrmMenu.Designer.cs
6266 6266
            this.btnConstruction0901.Name = "btnConstruction0901";
6267 6267
            this.btnConstruction0901.Size = new System.Drawing.Size(189, 30);
6268 6268
            this.btnConstruction0901.TabIndex = 15;
6269
            this.btnConstruction0901.Text = "請求承認";
6269
            this.btnConstruction0901.Text = "請求承認";
6270 6270
            this.btnConstruction0901.UseVisualStyleBackColor = true;
6271 6271
            this.btnConstruction0901.Click += new System.EventHandler(this.btnConstruction_Click);
6272 6272
            // 
......
6326 6326
            this.btnConstruction1001.Name = "btnConstruction1001";
6327 6327
            this.btnConstruction1001.Size = new System.Drawing.Size(189, 30);
6328 6328
            this.btnConstruction1001.TabIndex = 15;
6329
            this.btnConstruction1001.Text = "請求承認";
6329
            this.btnConstruction1001.Text = "請求承認";
6330 6330
            this.btnConstruction1001.UseVisualStyleBackColor = true;
6331 6331
            this.btnConstruction1001.Click += new System.EventHandler(this.btnConstruction_Click);
6332 6332
            // 
......
6981 6981
            this.btnAffairs0202.Name = "btnAffairs0202";
6982 6982
            this.btnAffairs0202.Size = new System.Drawing.Size(189, 30);
6983 6983
            this.btnAffairs0202.TabIndex = 0;
6984
            this.btnAffairs0202.Text = "請求承認状況閲覧";
6984
            this.btnAffairs0202.Text = "請求承認状況閲覧";
6985 6985
            this.btnAffairs0202.UseVisualStyleBackColor = true;
6986 6986
            this.btnAffairs0202.Click += new System.EventHandler(this.btnAffairs_Click);
6987 6987
            // 
branches/src/ProcessManagement/ProcessManagement/Properties/AssemblyInfo.cs
32 32
// すべての値を指定するか、下のように '*' を使ってビルドおよびリビジョン番号を 
33 33
// 既定値にすることができます:
34 34
// [assembly: AssemblyVersion("1.0.*")]
35
[assembly: AssemblyVersion("1.0.0.45")]
36
[assembly: AssemblyFileVersion("1.0.0.45")]
35
[assembly: AssemblyVersion("1.0.0.47")]
36
[assembly: AssemblyFileVersion("1.0.0.47")]
37 37
// Log4netを使用する
38 38
[assembly: log4net.Config.XmlConfigurator(ConfigFile = @"log4net.config", Watch = true)]

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