プロジェクト

全般

プロフィール

リビジョン 88

山内7年以上前に追加

資材管理、請求管理をマージ、セキュリティ区分登録(FrmSecurityのConfigurationArrayにデータ表示定義を追加)

差分を表示:

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

  
19 19
        /// <summary>
20 20
        /// コピー・環境バージョン
branches/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOBankBusinessDayMaster.cs
70 70

  
71 71
            try
72 72
            {
73
                // SQL作成(DateTime型が変換できないのでCharに変換しておく)
73
                // SQL作成(oracleのDateTime型が変換できないのでCharに変換しておく)
74 74
                strcmd = "SELECT";
75 75
                strcmd += "  YearMonth, BankBusinessDay, Note, DeleteFlg";
76 76
                strcmd += " ,DATE_FORMAT(EntryDate, '%Y/%m/%d %H:%i:%s')";
......
122 122
                    strcmd += string.Format(", '{0}'", work.Note.ToString());
123 123
                    strcmd += string.Format(", {0}", work.DeleteFlg.ToString());
124 124

  
125
                    strcmd += ", DATE_FORMAT(DATE_FORMAT(NOW(),'%Y/%m/%d %H:%i:%s'),'%Y/%m/%d %H:%i:%s')";
126
                    strcmd += ", DATE_FORMAT(DATE_FORMAT(NOW(),'%Y/%m/%d %H:%i:%s'),'%Y/%m/%d %H:%i:%s')";
125
                    strcmd += ", STR_TO_DATE(DATE_FORMAT(NOW(),'%Y/%m/%d %H:%i:%s'),'%Y/%m/%d %H:%i:%s')";
126
                    strcmd += ", STR_TO_DATE(DATE_FORMAT(NOW(),'%Y/%m/%d %H:%i:%s'),'%Y/%m/%d %H:%i:%s')";
127 127
                    strcmd = strcmd + ")";
128 128

  
129 129
                    if (!ExecuteNonQuery(strcmd, bConnect)) return false;
......
159 159
                strcmd += string.Format(",Note = '{0}'", data.Note);
160 160
                strcmd += string.Format(",DeleteFlg = {0}", data.DeleteFlg.ToString());
161 161

  
162
                strcmd += ", UpdateDate = DATE_FORMAT(DATE_FORMAT(NOW(),'%Y/%m/%d %H:%i:%s'),'%Y/%m/%d %H:%i:%s')";
162
                strcmd += ", UpdateDate = STR_TO_DATE(DATE_FORMAT(NOW(),'%Y/%m/%d %H:%i:%s'),'%Y/%m/%d %H:%i:%s')";
163 163
                strcmd += AddSQLString;
164 164

  
165 165
                if (!ExecuteNonQuery(strcmd, bConnect)) return false;
......
186 186
            try
187 187
            {
188 188
                strcmd = "Update BankBusinessDayMaster Set DeleteFlg = 1";
189
                strcmd += ", UpdateDate = DATE_FORMAT(DATE_FORMAT(NOW(),'%Y/%m/%d %H:%i:%s'),'%Y/%m/%d %H:%i:%s')";
189
                strcmd += ", UpdateDate = STR_TO_DATE(DATE_FORMAT(NOW(),'%Y/%m/%d %H:%i:%s'),'%Y/%m/%d %H:%i:%s')";
190 190
                strcmd += AddSQLString;
191 191

  
192 192
                if (!ExecuteNonQuery(strcmd, bConnect)) return false;
branches/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOBillingData.cs
123 123
                    strcmd += string.Format(", {0}", work.SeqNo.ToString());
124 124
                    strcmd += string.Format(", {0}", work.BillPrice.ToString());
125 125

  
126
                    strcmd += ", DATE_FORMAT(DATE_FORMAT(NOW(),'%Y/%m/%d %H:%i:%s'),'%Y/%m/%d %H:%i:%s')";
127
                    strcmd += ", DATE_FORMAT(DATE_FORMAT(NOW(),'%Y/%m/%d %H:%i:%s'),'%Y/%m/%d %H:%i:%s')";
126
                    strcmd += ", STR_TO_DATE(DATE_FORMAT(NOW(),'%Y/%m/%d %H:%i:%s'),'%Y/%m/%d %H:%i:%s')";
127
                    strcmd += ", STR_TO_DATE(DATE_FORMAT(NOW(),'%Y/%m/%d %H:%i:%s'),'%Y/%m/%d %H:%i:%s')";
128 128
                    strcmd = strcmd + ")";
129 129

  
130 130
                    if (!ExecuteNonQuery(strcmd, bConnect)) return false;
......
157 157

  
158 158
                strcmd += string.Format(" BillPrice = {0}", data.BillPrice.ToString());
159 159

  
160
                strcmd += ", UpdateDate = DATE_FORMAT(DATE_FORMAT(NOW(),'%Y/%m/%d %H:%i:%s'),'%Y/%m/%d %H:%i:%s')";
160
                strcmd += ", UpdateDate = STR_TO_DATE(DATE_FORMAT(NOW(),'%Y/%m/%d %H:%i:%s'),'%Y/%m/%d %H:%i:%s')";
161 161
                strcmd += AddSQLString;
162 162

  
163 163
                if (!ExecuteNonQuery(strcmd, bConnect)) return false;
branches/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOBillingDataDetail.cs
136 136
                    strcmd += string.Format(", {0}", work.IndsWasteTax.ToString());
137 137
                    strcmd += string.Format(", '{0}'", work.Note.ToString());
138 138

  
139
                    strcmd += ", DATE_FORMAT(DATE_FORMAT(NOW(),'%Y/%m/%d %H:%i:%s'),'%Y/%m/%d %H:%i:%s')";
140
                    strcmd += ", DATE_FORMAT(DATE_FORMAT(NOW(),'%Y/%m/%d %H:%i:%s'),'%Y/%m/%d %H:%i:%s')";
139
                    strcmd += ", STR_TO_DATE(DATE_FORMAT(NOW(),'%Y/%m/%d %H:%i:%s'),'%Y/%m/%d %H:%i:%s')";
140
                    strcmd += ", STR_TO_DATE(DATE_FORMAT(NOW(),'%Y/%m/%d %H:%i:%s'),'%Y/%m/%d %H:%i:%s')";
141 141
                    strcmd = strcmd + ")";
142 142

  
143 143
                    if (!ExecuteNonQuery(strcmd, bConnect)) return false;
......
176 176
                strcmd += string.Format(",IndsWasteTax = {0}", data.IndsWasteTax.ToString());
177 177
                strcmd += string.Format(",Note = '{0}'", data.Note);
178 178

  
179
                strcmd += ", UpdateDate = DATE_FORMAT(DATE_FORMAT(NOW(),'%Y/%m/%d %H:%i:%s'),'%Y/%m/%d %H:%i:%s')";
179
                strcmd += ", UpdateDate = STR_TO_DATE(DATE_FORMAT(NOW(),'%Y/%m/%d %H:%i:%s'),'%Y/%m/%d %H:%i:%s')";
180 180
                strcmd += AddSQLString;
181 181

  
182 182
                if (!ExecuteNonQuery(strcmd, bConnect)) return false;
branches/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOBillingPaymentSummary.cs
129 129
                    strcmd += string.Format("  {0}", work.CompanyCode.ToString());
130 130
                    strcmd += string.Format(", {0}", work.TargetDate.ToString());
131 131
                    strcmd += string.Format(", {0}", work.ChargePaymentKind.ToString());
132
                    strcmd += string.Format(", DATE_FORMAT(DATE_FORMAT('{0}','%Y/%m/%d'),'%Y/%m/%d')", work.Payday.ToString());
132
                    strcmd += string.Format(", STR_TO_DATE(DATE_FORMAT('{0}','%Y/%m/%d'),'%Y/%m/%d')", work.Payday.ToString());
133 133
                    strcmd += string.Format(", {0}", work.BillPriceStotal.ToString());
134 134
                    strcmd += string.Format(", {0}", work.ConsumptionTaxRate.ToString());
135 135
                    strcmd += string.Format(", {0}", work.ConsumptionTaxPrice.ToString());
......
140 140
                    strcmd += string.Format(", {0}", work.CnstrPriceStotal.ToString());
141 141
                    strcmd += string.Format(", {0}", work.BillingPriceTotal.ToString());
142 142

  
143
                    strcmd += ", DATE_FORMAT(DATE_FORMAT(NOW(),'%Y/%m/%d %H:%i:%s'),'%Y/%m/%d %H:%i:%s')";
144
                    strcmd += ", DATE_FORMAT(DATE_FORMAT(NOW(),'%Y/%m/%d %H:%i:%s'),'%Y/%m/%d %H:%i:%s')";
143
                    strcmd += ", STR_TO_DATE(DATE_FORMAT(NOW(),'%Y/%m/%d %H:%i:%s'),'%Y/%m/%d %H:%i:%s')";
144
                    strcmd += ", STR_TO_DATE(DATE_FORMAT(NOW(),'%Y/%m/%d %H:%i:%s'),'%Y/%m/%d %H:%i:%s')";
145 145
                    strcmd = strcmd + ")";
146 146

  
147 147
                    if (!ExecuteNonQuery(strcmd, bConnect)) return false;
......
172 172

  
173 173
                strcmd += " SET";
174 174

  
175
                strcmd += string.Format(" Payday = DATE_FORMAT(DATE_FORMAT('{0}','%Y/%m/%d'),'%Y/%m/%d')", data.Payday.ToString());
175
                strcmd += string.Format(" Payday = STR_TO_DATE(DATE_FORMAT('{0}','%Y/%m/%d'),'%Y/%m/%d')", data.Payday.ToString());
176 176
                strcmd += string.Format(",BillPriceStotal = {0}", data.BillPriceStotal.ToString());
177 177

  
178 178
                strcmd += string.Format(",ConsumptionTaxRate = {0}", data.ConsumptionTaxRate.ToString());
......
185 185
                strcmd += string.Format(",CnstrPriceStotal = {0}", data.CnstrPriceStotal.ToString());
186 186
                strcmd += string.Format(",BillingPriceTotal = {0}", data.BillingPriceTotal.ToString());
187 187

  
188
                strcmd += ", UpdateDate = DATE_FORMAT(DATE_FORMAT(NOW(),'%Y/%m/%d %H:%i:%s'),'%Y/%m/%d %H:%i:%s')";
188
                strcmd += ", UpdateDate = STR_TO_DATE(DATE_FORMAT(NOW(),'%Y/%m/%d %H:%i:%s'),'%Y/%m/%d %H:%i:%s')";
189 189
                strcmd += AddSQLString;
190 190

  
191 191
                if (!ExecuteNonQuery(strcmd, bConnect)) return false;
branches/src/ProcessManagement/ProcessManagement/DB/IOAccess/IODeadLineMaster.cs
125 125
                    strcmd += string.Format(", '{0}'", work.Note.ToString());
126 126
                    strcmd += string.Format(", {0}", work.DeleteFlg.ToString());
127 127

  
128
                    strcmd += ", DATE_FORMAT(DATE_FORMAT(NOW(),'%Y/%m/%d %H:%i:%s'),'%Y/%m/%d %H:%i:%s')";
129
                    strcmd += ", DATE_FORMAT(DATE_FORMAT(NOW(),'%Y/%m/%d %H:%i:%s'),'%Y/%m/%d %H:%i:%s')";
128
                    strcmd += ", STR_TO_DATE(DATE_FORMAT(NOW(),'%Y/%m/%d %H:%i:%s'),'%Y/%m/%d %H:%i:%s')";
129
                    strcmd += ", STR_TO_DATE(DATE_FORMAT(NOW(),'%Y/%m/%d %H:%i:%s'),'%Y/%m/%d %H:%i:%s')";
130 130
                    strcmd = strcmd + ")";
131 131

  
132 132
                    if (!ExecuteNonQuery(strcmd, bConnect)) return false;
......
162 162
                strcmd += string.Format(",PayDay = {0}", data.PayDay.ToString());
163 163
                strcmd += string.Format(",Note = '{0}'", data.Note);
164 164
                strcmd += string.Format(",DeleteFlg = {0}", data.DeleteFlg.ToString());
165
 
166
                strcmd += ", UpdateDate = DATE_FORMAT(DATE_FORMAT(NOW(),'%Y/%m/%d %H:%i:%s'),'%Y/%m/%d %H:%i:%s')";
165

  
166
                strcmd += ", UpdateDate = STR_TO_DATE(DATE_FORMAT(NOW(),'%Y/%m/%d %H:%i:%s'),'%Y/%m/%d %H:%i:%s')";
167 167
                strcmd += AddSQLString;
168 168

  
169 169
                if (!ExecuteNonQuery(strcmd, bConnect)) return false;
......
190 190
            try
191 191
            {
192 192
                strcmd = "Update DeadLineMaster Set DeleteFlg = 1";
193
                strcmd += ", UpdateDate = DATE_FORMAT(DATE_FORMAT(NOW(),'%Y/%m/%d %H:%i:%s'),'%Y/%m/%d %H:%i:%s')";
193
                strcmd += ", UpdateDate = STR_TO_DATE(DATE_FORMAT(NOW(),'%Y/%m/%d %H:%i:%s'),'%Y/%m/%d %H:%i:%s')";
194 194
                strcmd += AddSQLString;
195 195

  
196 196
                if (!ExecuteNonQuery(strcmd, bConnect)) return false;
branches/src/ProcessManagement/ProcessManagement/DB/IOAccess/IODepositApprovalInfo.cs
221 221
                    strcmd += string.Format(", '{0}'", data.ApprovalPersonName.ToString());
222 222
                    strcmd += string.Format(", {0}", data.ApprovalAuthority.ToString());
223 223
                    strcmd += string.Format(", DATE_FORMAT('{0}','%Y%m%d')", data.ApprovalDate.ToString());
224
                    strcmd += ", DATE_FORMAT(DATE_FORMAT(NOW(),'%Y/%m/%d %H:%i:%s'),'%Y/%m/%d %H:%i:%s')";
225
                    strcmd += ", DATE_FORMAT(DATE_FORMAT(NOW(),'%Y/%m/%d %H:%i:%s'),'%Y/%m/%d %H:%i:%s')";
224
                    strcmd += ", STR_TO_DATE(DATE_FORMAT(NOW(),'%Y/%m/%d %H:%i:%s'),'%Y/%m/%d %H:%i:%s')";
225
                    strcmd += ", STR_TO_DATE(DATE_FORMAT(NOW(),'%Y/%m/%d %H:%i:%s'),'%Y/%m/%d %H:%i:%s')";
226 226
                    strcmd = strcmd + ")";
227 227

  
228 228
                    if (!ExecuteNonQuery(strcmd, bConnect)) return false;
......
264 264
                strcmd += string.Format(",ApprovalPersonName = '{0}'", data.ApprovalPersonName.ToString());
265 265
                strcmd += string.Format(",ApprovalAuthority = {0}", data.ApprovalAuthority.ToString());
266 266
                strcmd += string.Format(",ApprovalDate = DATE_FORMAT('{0}','%Y%m%d')", data.ApprovalDate.ToString());
267
                strcmd += ", UpdateDate = DATE_FORMAT(DATE_FORMAT(NOW(),'%Y/%m/%d %H:%i:%s'),'%Y/%m/%d %H:%i:%s')";
267
                strcmd += ", UpdateDate = STR_TO_DATE(DATE_FORMAT(NOW(),'%Y/%m/%d %H:%i:%s'),'%Y/%m/%d %H:%i:%s')";
268 268
                strcmd += AddSQLString;
269 269

  
270 270
                if (!ExecuteNonQuery(strcmd, bConnect)) return false;
branches/src/ProcessManagement/ProcessManagement/DB/IOAccess/IODepositData.cs
218 218
                    strcmd += string.Format(", {0}", data.DepositAmount.ToString());
219 219
                    strcmd += string.Format(", {0}", data.DepositAmountCash.ToString());
220 220
                    strcmd += string.Format(", {0}", data.DepositAmountBill.ToString());
221
                    strcmd += ", DATE_FORMAT(DATE_FORMAT(NOW(),'%Y/%m/%d %H:%i:%s'),'%Y/%m/%d %H:%i:%s')";
222
                    strcmd += ", DATE_FORMAT(DATE_FORMAT(NOW(),'%Y/%m/%d %H:%i:%s'),'%Y/%m/%d %H:%i:%s')";
221
                    strcmd += ", STR_TO_DATE(DATE_FORMAT(NOW(),'%Y/%m/%d %H:%i:%s'),'%Y/%m/%d %H:%i:%s')";
222
                    strcmd += ", STR_TO_DATE(DATE_FORMAT(NOW(),'%Y/%m/%d %H:%i:%s'),'%Y/%m/%d %H:%i:%s')";
223 223
                    strcmd = strcmd + ")";
224 224

  
225 225
                    if (!ExecuteNonQuery(strcmd, bConnect)) return false;
......
260 260
                strcmd += string.Format(",DepositAmount = {0}", data.DepositAmount.ToString());
261 261
                strcmd += string.Format(",DepositAmountCash = {0}", data.DepositAmountCash.ToString());
262 262
                strcmd += string.Format(",DepositAmountBill = {0}", data.DepositAmountBill.ToString());
263
                strcmd += ", UpdateDate = DATE_FORMAT(DATE_FORMAT(NOW(),'%Y/%m/%d %H:%i:%s'),'%Y/%m/%d %H:%i:%s')";
263
                strcmd += ", UpdateDate = STR_TO_DATE(DATE_FORMAT(NOW(),'%Y/%m/%d %H:%i:%s'),'%Y/%m/%d %H:%i:%s')";
264 264
                strcmd += AddSQLString;
265 265

  
266 266
                if (!ExecuteNonQuery(strcmd, bConnect)) return false;
......
319 319
                wrk.SeqNo = int.Parse(objwrk[(int)ColumnName.SeqNo].ToString());
320 320
                wrk.BusinessPeriod = int.Parse(objwrk[(int)ColumnName.BusinessPeriod].ToString());
321 321
                wrk.DepositDate = DateTime.Parse(objwrk[(int)ColumnName.DepositDate].ToString());
322
                wrk.DepositAmount = int.Parse(objwrk[(int)ColumnName.DepositAmount].ToString());
323
                wrk.DepositAmountCash = int.Parse(objwrk[(int)ColumnName.DepositAmountCash].ToString());
324
                wrk.DepositAmountBill = int.Parse(objwrk[(int)ColumnName.DepositAmountBill].ToString());
322
                wrk.DepositAmount = long.Parse(objwrk[(int)ColumnName.DepositAmount].ToString());
323
                wrk.DepositAmountCash = long.Parse(objwrk[(int)ColumnName.DepositAmountCash].ToString());
324
                wrk.DepositAmountBill = long.Parse(objwrk[(int)ColumnName.DepositAmountBill].ToString());
325 325

  
326 326
                wrk.EntryDate = DateTime.Parse(objwrk[(int)ColumnName.EntryDate].ToString());
327 327
                wrk.UpdateDate = DateTime.Parse(objwrk[(int)ColumnName.UpdateDate].ToString());
branches/src/ProcessManagement/ProcessManagement/DB/IOAccess/IODepositDataDetail.cs
187 187
                strcmd += string.Format(", DATE_FORMAT('{0}','%Y/%m/%d')", data.ApprovalDate.ToShortDateString());
188 188
                strcmd += string.Format(", {0}", data.ApprovalEndFlg ? 1 : 0);
189 189

  
190
                strcmd += ", DATE_FORMAT(DATE_FORMAT(NOW(),'%Y/%m/%d %H:%i:%s'),'%Y/%m/%d %H:%i:%s')";
191
                strcmd += ", DATE_FORMAT(DATE_FORMAT(NOW(),'%Y/%m/%d %H:%i:%s'),'%Y/%m/%d %H:%i:%s')";
190
                strcmd += ", STR_TO_DATE(DATE_FORMAT(NOW(),'%Y/%m/%d %H:%i:%s'),'%Y/%m/%d %H:%i:%s')";
191
                strcmd += ", STR_TO_DATE(DATE_FORMAT(NOW(),'%Y/%m/%d %H:%i:%s'),'%Y/%m/%d %H:%i:%s')";
192 192
                strcmd = strcmd + ")";
193 193

  
194 194
                if (!ExecuteNonQuery(strcmd, bConnect)) return false;
......
237 237
                strcmd += string.Format(",ApprovalDate = DATE_FORMAT('{0}','%Y/%m/%d')", data.ApprovalDate.ToShortDateString());
238 238
                strcmd += string.Format(",ApprovalEndFlg = {0}", data.ApprovalEndFlg ? 1 : 0);
239 239

  
240
                strcmd += ", UpdateDate = DATE_FORMAT(DATE_FORMAT(NOW(),'%Y/%m/%d %H:%i:%s'),'%Y/%m/%d %H:%i:%s')";
240
                strcmd += ", UpdateDate = STR_TO_DATE(DATE_FORMAT(NOW(),'%Y/%m/%d %H:%i:%s'),'%Y/%m/%d %H:%i:%s')";
241 241
                strcmd += string.Format(" where OrderersDivision = {0} and OrderersCode = {1} and TargetDate = {2} and SeqNo = {3} and LineCount = {4} ",
242 242
                    data.OrderersDivision, data.OrderersCode, data.TargetDate, data.SeqNo, data.LineCount);
243 243
                strcmd += AddSQLString;
......
299 299
                wrk.LineCount = int.Parse(objwrk[(int)NameColumn.LineCount].ToString());
300 300
                wrk.RequestNo = int.Parse(objwrk[(int)NameColumn.RequestNo].ToString());
301 301
                wrk.OrderNo = int.Parse(objwrk[(int)NameColumn.OrderNo].ToString());
302
                wrk.DepositAmount = int.Parse(objwrk[(int)NameColumn.DepositAmount].ToString());
303
                wrk.DiscountAmount = int.Parse(objwrk[(int)NameColumn.DiscountAmount].ToString());
304
                wrk.CnstrPrice = int.Parse(objwrk[(int)NameColumn.CnstrPrice].ToString());
305
                wrk.Fees = int.Parse(objwrk[(int)NameColumn.Fees].ToString());
306
                wrk.OtherAdjustments = int.Parse(objwrk[(int)NameColumn.OtherAdjustments].ToString());
307
                wrk.CarryAmount = int.Parse(objwrk[(int)NameColumn.CarryAmount].ToString());
302
                wrk.DepositAmount = long.Parse(objwrk[(int)NameColumn.DepositAmount].ToString());
303
                wrk.DiscountAmount = long.Parse(objwrk[(int)NameColumn.DiscountAmount].ToString());
304
                wrk.CnstrPrice = long.Parse(objwrk[(int)NameColumn.CnstrPrice].ToString());
305
                wrk.Fees = long.Parse(objwrk[(int)NameColumn.Fees].ToString());
306
                wrk.OtherAdjustments = long.Parse(objwrk[(int)NameColumn.OtherAdjustments].ToString());
307
                wrk.CarryAmount = long.Parse(objwrk[(int)NameColumn.CarryAmount].ToString());
308 308
                wrk.ApprovalPersonCode = int.Parse(objwrk[(int)NameColumn.ApprovalPersonCode].ToString());
309 309
                wrk.ApprovalDate = DateTime.Parse(objwrk[(int)NameColumn.ApprovalDate].ToString());
310 310
                wrk.ApprovalEndFlg = (int.Parse(objwrk[(int)NameColumn.ApprovalEndFlg].ToString()) != 0);
branches/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOInvoiceData.cs
206 206
                strcmd += string.Format(", '{0}'", data.Comment4.ToString());
207 207
                strcmd += string.Format(", '{0}'", data.Comment5.ToString());
208 208
                strcmd += string.Format(", {0}", data.CompleteFlg.ToString());
209
                strcmd += ", DATE_FORMAT(DATE_FORMAT(NOW(),'%Y/%m/%d %H:%i:%s'),'%Y/%m/%d %H:%i:%s')";
210
                strcmd += ", DATE_FORMAT(DATE_FORMAT(NOW(),'%Y/%m/%d %H:%i:%s'),'%Y/%m/%d %H:%i:%s')";
209
                strcmd += ", STR_TO_DATE(DATE_FORMAT(NOW(),'%Y/%m/%d %H:%i:%s'),'%Y/%m/%d %H:%i:%s')";
210
                strcmd += ", STR_TO_DATE(DATE_FORMAT(NOW(),'%Y/%m/%d %H:%i:%s'),'%Y/%m/%d %H:%i:%s')";
211 211
                strcmd = strcmd + ")";
212 212

  
213 213
                if (!ExecuteNonQuery(strcmd, bConnect)) return false;
......
254 254
                strcmd += string.Format(", Comment4 = '{0}'", data.Comment4.ToString());
255 255
                strcmd += string.Format(", Comment5 = '{0}'", data.Comment5.ToString());
256 256
                strcmd += string.Format(", CompleteFlg = {0}", data.CompleteFlg.ToString());
257
                strcmd += ", UpdateDate = DATE_FORMAT(DATE_FORMAT(NOW(),'%Y/%m/%d %H:%i:%s'),'%Y/%m/%d %H:%i:%s')";
257
                strcmd += ", UpdateDate = STR_TO_DATE(DATE_FORMAT(NOW(),'%Y/%m/%d %H:%i:%s'),'%Y/%m/%d %H:%i:%s')";
258 258

  
259 259
                strcmd += AddSQLString;
260 260

  
......
320 320

  
321 321
                wrk.RequestName = objwrk[(int)NameColumn.RequestName].ToString();
322 322

  
323
                wrk.TotalAmount = int.Parse(objwrk[(int)NameColumn.TotalAmount].ToString());
324
                wrk.TaxAmount = int.Parse(objwrk[(int)NameColumn.TaxAmount].ToString());
323
                wrk.TotalAmount = long.Parse(objwrk[(int)NameColumn.TotalAmount].ToString());
324
                wrk.TaxAmount = long.Parse(objwrk[(int)NameColumn.TaxAmount].ToString());
325 325

  
326 326
                wrk.Comment1 = objwrk[(int)NameColumn.Comment1].ToString();
327 327
                wrk.Comment2 = objwrk[(int)NameColumn.Comment2].ToString();
branches/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOMaterialInfo.cs
119 119
                    strcmd += string.Format(", {0}", work.RentCount.ToString());
120 120
                    strcmd += string.Format(", {0}", work.DeleteFlg.ToString());
121 121

  
122
                    strcmd += ", DATE_FORMAT(DATE_FORMAT(NOW(),'%Y/%m/%d %H:%i:%s'),'%Y/%m/%d %H:%i:%s')";
123
                    strcmd += ", DATE_FORMAT(DATE_FORMAT(NOW(),'%Y/%m/%d %H:%i:%s'),'%Y/%m/%d %H:%i:%s')";
122
                    strcmd += ", STR_TO_DATE(DATE_FORMAT(NOW(),'%Y/%m/%d %H:%i:%s'),'%Y/%m/%d %H:%i:%s')";
123
                    strcmd += ", STR_TO_DATE(DATE_FORMAT(NOW(),'%Y/%m/%d %H:%i:%s'),'%Y/%m/%d %H:%i:%s')";
124 124
                    strcmd = strcmd + ")";
125 125

  
126 126
                    if (!ExecuteNonQuery(strcmd, bConnect)) return false;
......
153 153
                strcmd += string.Format(",RentCount = {0}", data.RentCount.ToString());
154 154
                strcmd += string.Format(",DeleteFlg = {0}", data.DeleteFlg.ToString());
155 155

  
156
                strcmd += ", UpdateDate = DATE_FORMAT(DATE_FORMAT(NOW(),'%Y/%m/%d %H:%i:%s'),'%Y/%m/%d %H:%i:%s')";
156
                strcmd += ", UpdateDate = STR_TO_DATE(DATE_FORMAT(NOW(),'%Y/%m/%d %H:%i:%s'),'%Y/%m/%d %H:%i:%s')";
157 157
                strcmd += AddSQLString;
158 158

  
159 159
                if (!ExecuteNonQuery(strcmd, bConnect)) return false;
......
179 179
            try
180 180
            {
181 181
                strcmd = "Update MaterialInfo Set DeleteFlg = 1";
182
                strcmd += ", UpdateDate = DATE_FORMAT(DATE_FORMAT(NOW(),'%Y/%m/%d %H:%i:%s'),'%Y/%m/%d %H:%i:%s')";
182
                strcmd += ", UpdateDate = STR_TO_DATE(DATE_FORMAT(NOW(),'%Y/%m/%d %H:%i:%s'),'%Y/%m/%d %H:%i:%s')";
183 183
                strcmd += AddSQLString;
184 184

  
185 185
                if (!ExecuteNonQuery(strcmd, bConnect)) return false;
branches/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOMaterialItem.cs
25 25
        /// log4netログを使用する
26 26
        /// </summary>
27 27
        private static readonly ILog logger = LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
28
        /// <summary>
29
        /// バージョンNoの最大値
30
        /// </summary>
31
        private static readonly int MAX_VERSION = 99999999;
28 32
        #endregion
29 33

  
30 34
        #region 定数
......
39 43
            DisplayOrder,
40 44
            DeleteFlg,
41 45
            ENTRYDATE,
42
            UPDATEDATE
46
            UPDATEDATE,
47
            VERSIONNO
43 48
        }
44 49
        #endregion
45 50

  
......
122 127
                    strcmd += string.Format(", {0}", work.DisplayOrder.ToString());
123 128
                    strcmd += string.Format(", {0}", work.DeleteFlg.ToString());
124 129

  
125
                    strcmd += ", DATE_FORMAT(DATE_FORMAT(NOW(),'%Y/%m/%d %H:%i:%s'),'%Y/%m/%d %H:%i:%s')";
126
                    strcmd += ", DATE_FORMAT(DATE_FORMAT(NOW(),'%Y/%m/%d %H:%i:%s'),'%Y/%m/%d %H:%i:%s')";
130
                    strcmd += ", STR_TO_DATE(DATE_FORMAT(NOW(),'%Y/%m/%d %H:%i:%s'),'%Y/%m/%d %H:%i:%s')";
131
                    strcmd += ", STR_TO_DATE(DATE_FORMAT(NOW(),'%Y/%m/%d %H:%i:%s'),'%Y/%m/%d %H:%i:%s')";
127 132
                    strcmd = strcmd + ")";
128 133

  
129 134
                    if (!ExecuteNonQuery(strcmd, bConnect)) return false;
......
159 164
                strcmd += string.Format(",DisplayOrder = {0}", data.DisplayOrder.ToString());
160 165
                strcmd += string.Format(",DeleteFlg = {0}", data.DeleteFlg.ToString());
161 166

  
162
                strcmd += ", UpdateDate = DATE_FORMAT(DATE_FORMAT(NOW(),'%Y/%m/%d %H:%i:%s'),'%Y/%m/%d %H:%i:%s')";
167
                strcmd += ", UpdateDate = STR_TO_DATE(DATE_FORMAT(NOW(),'%Y/%m/%d %H:%i:%s'),'%Y/%m/%d %H:%i:%s')";
163 168
                strcmd += AddSQLString;
164 169

  
165 170
                if (!ExecuteNonQuery(strcmd, bConnect)) return false;
......
173 178
            }
174 179
        }
175 180

  
181
        /// <summary>
182
        /// 資材品目マスタ更新
183
        /// </summary>
184
        /// <param name="AddSQLString">更新条件SQL文字列</param>
185
        /// <param name="data">資材品目マスタデータ</param>
186
        /// <returns>true:成功 false:失敗</returns>
187
        public bool UpdateVersionAction(string AddSQLString, MaterialItemMaster data, bool bConnect = true)
188
        {
189
            string strcmd = "";
190
            int nVersionNo = 0;
191
            try
192
            {
176 193

  
194
                strcmd = "UPDATE MaterialItemMaster";
195

  
196
                strcmd += " SET";
197

  
198
                strcmd += string.Format(" MaterialItemCode = {0}", data.MaterialItemCode.ToString());
199
                strcmd += string.Format(",MaterialKindCode = {0}", data.MaterialKindCode.ToString());
200
                strcmd += string.Format(",MaterialItemName = '{0}'", data.MaterialItemName);
201
                strcmd += string.Format(",DisplayOrder = {0}", data.DisplayOrder.ToString());
202
                strcmd += string.Format(",DeleteFlg = {0}", data.DeleteFlg.ToString());
203
                if (data.VersionNo >= MAX_VERSION)
204
                {
205
                    nVersionNo = 1;
206
                }
207
                else
208
                {
209
                    nVersionNo = data.VersionNo + 1;
210
                }
211
                strcmd += string.Format(",VersionNo = {0}", nVersionNo.ToString());
212

  
213
                strcmd += ", UpdateDate = STR_TO_DATE(DATE_FORMAT(NOW(),'%Y/%m/%d %H:%i:%s'),'%Y/%m/%d %H:%i:%s')";
214
                strcmd += AddSQLString;
215

  
216
                if (!ExecuteNonQuery(strcmd, bConnect)) return false;
217

  
218
                return true;
219
            }
220
            catch (Exception ex)
221
            {
222
                logger.ErrorFormat("システムエラー::{0}:{1}:{2}", CommonMotions.GetMethodName(2), ex.Message, strcmd);
223
                return false;
224
            }
225
        }
226

  
177 227
        /// <summary>
178 228
        /// 資材品目マスタ削除
179 229
        /// </summary>
......
187 237
            try
188 238
            {
189 239
                strcmd = "Update MaterialItemMaster Set DeleteFlg = 1,DisplayOrder = 999";
190
                strcmd += ", UpdateDate = DATE_FORMAT(DATE_FORMAT(NOW(),'%Y/%m/%d %H:%i:%s'),'%Y/%m/%d %H:%i:%s')";
240
                strcmd += ", UpdateDate = STR_TO_DATE(DATE_FORMAT(NOW(),'%Y/%m/%d %H:%i:%s'),'%Y/%m/%d %H:%i:%s')";
191 241
                strcmd += AddSQLString;
192 242

  
193 243
                if (!ExecuteNonQuery(strcmd, bConnect)) return false;
......
219 269

  
220 270
                wrk.EntryDate = DateTime.Parse(objwrk[(int)NameColumn.ENTRYDATE].ToString());
221 271
                wrk.UpdateDate = DateTime.Parse(objwrk[(int)NameColumn.UPDATEDATE].ToString());
272

  
273
                wrk.VersionNo = int.Parse(objwrk[(int)NameColumn.VERSIONNO].ToString());
222 274
            }
223 275
            catch (MySqlException oraex)
224 276
            {
branches/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOMaterialRecordInfo.cs
127 127
                    strcmd += string.Format(", DATE_FORMAT('{0}','%Y/%m/%d')", work.RepayPlanDate.ToString());
128 128
                    strcmd += string.Format(", '{0}'", work.CommentText.ToString());
129 129

  
130
                    strcmd += ", DATE_FORMAT(DATE_FORMAT(NOW(),'%Y/%m/%d %H:%i:%s'),'%Y/%m/%d %H:%i:%s')";
131
                    strcmd += ", DATE_FORMAT(DATE_FORMAT(NOW(),'%Y/%m/%d %H:%i:%s'),'%Y/%m/%d %H:%i:%s')";
130
                    strcmd += ", STR_TO_DATE(DATE_FORMAT(NOW(),'%Y/%m/%d %H:%i:%s'),'%Y/%m/%d %H:%i:%s')";
131
                    strcmd += ", STR_TO_DATE(DATE_FORMAT(NOW(),'%Y/%m/%d %H:%i:%s'),'%Y/%m/%d %H:%i:%s')";
132 132
                    strcmd = strcmd + ")";
133 133

  
134 134
                    if (!ExecuteNonQuery(strcmd, bConnect)) return false;
......
164 164
                strcmd += string.Format(",RepayPlanDate = DATE_FORMAT('{0}','%Y/%m/%d')", data.RepayPlanDate.ToString());
165 165
                strcmd += string.Format(",CommentText = '{0}'", data.CommentText.ToString());
166 166

  
167
                strcmd += ", UpdateDate = DATE_FORMAT(DATE_FORMAT(NOW(),'%Y/%m/%d %H:%i:%s'),'%Y/%m/%d %H:%i:%s')";
167
                strcmd += ", UpdateDate = STR_TO_DATE(DATE_FORMAT(NOW(),'%Y/%m/%d %H:%i:%s'),'%Y/%m/%d %H:%i:%s')";
168 168
                strcmd += AddSQLString;
169 169

  
170 170
                if (!ExecuteNonQuery(strcmd, bConnect)) return false;
branches/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOMaterialTypes.cs
120 120
                    strcmd += string.Format(", {0}", work.DisplayOrder.ToString());
121 121
                    strcmd += string.Format(", {0}", work.DeleteFlg.ToString());
122 122

  
123
                    strcmd += ", DATE_FORMAT(DATE_FORMAT(NOW(),'%Y/%m/%d %H:%i:%s'),'%Y/%m/%d %H:%i:%s')";
124
                    strcmd += ", DATE_FORMAT(DATE_FORMAT(NOW(),'%Y/%m/%d %H:%i:%s'),'%Y/%m/%d %H:%i:%s')";
123
                    strcmd += ", STR_TO_DATE(DATE_FORMAT(NOW(),'%Y/%m/%d %H:%i:%s'),'%Y/%m/%d %H:%i:%s')";
124
                    strcmd += ", STR_TO_DATE(DATE_FORMAT(NOW(),'%Y/%m/%d %H:%i:%s'),'%Y/%m/%d %H:%i:%s')";
125 125
                    strcmd = strcmd + ")";
126 126

  
127 127
                    if (!ExecuteNonQuery(strcmd, bConnect)) return false;
......
156 156
                strcmd += string.Format(",DisplayOrder = {0}", data.DisplayOrder.ToString());
157 157
                strcmd += string.Format(",DeleteFlg = {0}", data.DeleteFlg.ToString());
158 158

  
159
                strcmd += ", UpdateDate = DATE_FORMAT(DATE_FORMAT(NOW(),'%Y/%m/%d %H:%i:%s'),'%Y/%m/%d %H:%i:%s')";
159
                strcmd += ", UpdateDate = STR_TO_DATE(DATE_FORMAT(NOW(),'%Y/%m/%d %H:%i:%s'),'%Y/%m/%d %H:%i:%s')";
160 160
                strcmd += AddSQLString;
161 161

  
162 162
                if (!ExecuteNonQuery(strcmd, bConnect)) return false;
......
184 184
            try
185 185
            {
186 186
                strcmd = "Update MaterialKindMaster Set DeleteFlg = 1,DisplayOrder = 999";
187
                strcmd += ", UpdateDate = DATE_FORMAT(DATE_FORMAT(NOW(),'%Y/%m/%d %H:%i:%s'),'%Y/%m/%d %H:%i:%s')";
187
                strcmd += ", UpdateDate = STR_TO_DATE(DATE_FORMAT(NOW(),'%Y/%m/%d %H:%i:%s'),'%Y/%m/%d %H:%i:%s')";
188 188
                strcmd += AddSQLString;
189 189

  
190 190
                if (!ExecuteNonQuery(strcmd, bConnect)) return false;
branches/src/ProcessManagement/ProcessManagement/DB/IOAccess/IORequestData.cs
189 189
                strcmd += string.Format(", {0}", data.TaxAmount.ToString());
190 190
                strcmd += string.Format(", '{0}'", data.Note.ToString());
191 191

  
192
                strcmd += ", DATE_FORMAT(DATE_FORMAT(NOW(),'%Y/%m/%d %H:%i:%s'),'%Y/%m/%d %H:%i:%s')";
193
                strcmd += ", DATE_FORMAT(DATE_FORMAT(NOW(),'%Y/%m/%d %H:%i:%s'),'%Y/%m/%d %H:%i:%s')";
192
                strcmd += ", STR_TO_DATE(DATE_FORMAT(NOW(),'%Y/%m/%d %H:%i:%s'),'%Y/%m/%d %H:%i:%s')";
193
                strcmd += ", STR_TO_DATE(DATE_FORMAT(NOW(),'%Y/%m/%d %H:%i:%s'),'%Y/%m/%d %H:%i:%s')";
194 194
                strcmd = strcmd + ")";
195 195

  
196 196
                if (!ExecuteNonQuery(strcmd, bConnect)) return false;
......
239 239
                strcmd += string.Format(",TaxAmount = {0}", data.TaxAmount.ToString());
240 240
                strcmd += string.Format(",Note = '{0}'", data.Note.ToString());
241 241

  
242
                strcmd += ", UpdateDate = DATE_FORMAT(DATE_FORMAT(NOW(),'%Y/%m/%d %H:%i:%s'),'%Y/%m/%d %H:%i:%s')";
242
                strcmd += ", UpdateDate = STR_TO_DATE(DATE_FORMAT(NOW(),'%Y/%m/%d %H:%i:%s'),'%Y/%m/%d %H:%i:%s')";
243 243

  
244 244
                strcmd += string.Format(" Where RequestNo = {0} And MainConstructionCode = {1}", data.RequestNo.ToString(), data.MainConstructionCode.ToString());
245 245
                strcmd += AddSQLString;
......
321 321
                wrk.MainConstructionCode = int.Parse(objwrk[(int)NameColumn.MainConstructionCode].ToString());
322 322

  
323 323
                wrk.ConstructionName = objwrk[(int)NameColumn.ConstructionName].ToString();
324
                wrk.ContractAmount = int.Parse(objwrk[(int)NameColumn.ContractAmount].ToString());
325
                wrk.PaidAmount = int.Parse(objwrk[(int)NameColumn.PaidAmount].ToString());
326
                wrk.RequestAmount0 = int.Parse(objwrk[(int)NameColumn.RequestAmount0].ToString());
327
                wrk.RequestAmount1 = int.Parse(objwrk[(int)NameColumn.RequestAmount1].ToString());
328
                wrk.RequestAmount2 = int.Parse(objwrk[(int)NameColumn.RequestAmount2].ToString());
329
                wrk.RequestAmount3 = int.Parse(objwrk[(int)NameColumn.RequestAmount3].ToString());
330
                wrk.RequestAmount4 = int.Parse(objwrk[(int)NameColumn.RequestAmount4].ToString());
331
                wrk.RequestAmount5 = int.Parse(objwrk[(int)NameColumn.RequestAmount5].ToString());
332
                wrk.RequestAmount6 = int.Parse(objwrk[(int)NameColumn.RequestAmount6].ToString());
333
                wrk.UnclaimedAmount = int.Parse(objwrk[(int)NameColumn.UnclaimedAmount].ToString());
334
                wrk.UnpaidAmount = int.Parse(objwrk[(int)NameColumn.UnpaidAmount].ToString());
335
                wrk.TaxAmount = int.Parse(objwrk[(int)NameColumn.TaxAmount].ToString());
324
                wrk.ContractAmount = long.Parse(objwrk[(int)NameColumn.ContractAmount].ToString());
325
                wrk.PaidAmount = long.Parse(objwrk[(int)NameColumn.PaidAmount].ToString());
326
                wrk.RequestAmount0 = long.Parse(objwrk[(int)NameColumn.RequestAmount0].ToString());
327
                wrk.RequestAmount1 = long.Parse(objwrk[(int)NameColumn.RequestAmount1].ToString());
328
                wrk.RequestAmount2 = long.Parse(objwrk[(int)NameColumn.RequestAmount2].ToString());
329
                wrk.RequestAmount3 = long.Parse(objwrk[(int)NameColumn.RequestAmount3].ToString());
330
                wrk.RequestAmount4 = long.Parse(objwrk[(int)NameColumn.RequestAmount4].ToString());
331
                wrk.RequestAmount5 = long.Parse(objwrk[(int)NameColumn.RequestAmount5].ToString());
332
                wrk.RequestAmount6 = long.Parse(objwrk[(int)NameColumn.RequestAmount6].ToString());
333
                wrk.UnclaimedAmount = long.Parse(objwrk[(int)NameColumn.UnclaimedAmount].ToString());
334
                wrk.UnpaidAmount = long.Parse(objwrk[(int)NameColumn.UnpaidAmount].ToString());
335
                wrk.TaxAmount = long.Parse(objwrk[(int)NameColumn.TaxAmount].ToString());
336 336
                wrk.Note = objwrk[(int)NameColumn.Note].ToString();
337 337

  
338 338
                wrk.EntryDate = DateTime.Parse(objwrk[(int)NameColumn.ENTRYDATE].ToString());
branches/src/ProcessManagement/ProcessManagement/DB/IOAccess/IORequestDataDetail.cs
158 158
                strcmd += string.Format(", {0}", data.RequestAmount.ToString());
159 159
                strcmd += string.Format(", {0}", data.TaxAmount.ToString());
160 160

  
161
                strcmd += ", DATE_FORMAT(DATE_FORMAT(NOW(),'%Y/%m/%d %H:%i:%s'),'%Y/%m/%d %H:%i:%s')";
162
                strcmd += ", DATE_FORMAT(DATE_FORMAT(NOW(),'%Y/%m/%d %H:%i:%s'),'%Y/%m/%d %H:%i:%s')";
161
                strcmd += ", STR_TO_DATE(DATE_FORMAT(NOW(),'%Y/%m/%d %H:%i:%s'),'%Y/%m/%d %H:%i:%s')";
162
                strcmd += ", STR_TO_DATE(DATE_FORMAT(NOW(),'%Y/%m/%d %H:%i:%s'),'%Y/%m/%d %H:%i:%s')";
163 163
                strcmd = strcmd + ")";
164 164

  
165 165
                if (!ExecuteNonQuery(strcmd, bConnect)) return false;
......
195 195
                strcmd += string.Format(",RequestAmount = {0}", data.RequestAmount.ToString());
196 196
                strcmd += string.Format(",TaxAmount = {0}", data.TaxAmount.ToString());
197 197

  
198
                strcmd += ", UpdateDate = DATE_FORMAT(DATE_FORMAT(NOW(),'%Y/%m/%d %H:%i:%s'),'%Y/%m/%d %H:%i:%s')";
198
                strcmd += ", UpdateDate = STR_TO_DATE(DATE_FORMAT(NOW(),'%Y/%m/%d %H:%i:%s'),'%Y/%m/%d %H:%i:%s')";
199 199

  
200 200
                strcmd += string.Format(" Where RequestNo = {0}", data.RequestNo.ToString());
201 201
                strcmd += string.Format("  And MainConstructionCode = {0}", data.MainConstructionCode.ToString());
......
281 281
                wrk.ConstructionCode = int.Parse(objwrk[(int)NameColumn.ConstructionCode].ToString());
282 282

  
283 283
                wrk.ConstructionKind = int.Parse(objwrk[(int)NameColumn.ConstructionKind].ToString());
284
                wrk.RequestAmount = int.Parse(objwrk[(int)NameColumn.RequestAmount].ToString());
285
                wrk.TaxAmount = int.Parse(objwrk[(int)NameColumn.TaxAmount].ToString());
284
                wrk.RequestAmount = long.Parse(objwrk[(int)NameColumn.RequestAmount].ToString());
285
                wrk.TaxAmount = long.Parse(objwrk[(int)NameColumn.TaxAmount].ToString());
286 286

  
287 287
                wrk.EntryDate = DateTime.Parse(objwrk[(int)NameColumn.ENTRYDATE].ToString());
288 288
                wrk.UpdateDate = DateTime.Parse(objwrk[(int)NameColumn.UPDATEDATE].ToString());
branches/src/ProcessManagement/ProcessManagement/DB/IOAccess/IORequestHead.cs
184 184
                strcmd += string.Format(", {0}", data.AssignedFlg.ToString());
185 185
                strcmd += string.Format(", {0}", data.InvoiceNo.ToString());
186 186

  
187
                strcmd += ", DATE_FORMAT(DATE_FORMAT(NOW(),'%Y/%m/%d %H:%i:%s'),'%Y/%m/%d %H:%i:%s')";
188
                strcmd += ", DATE_FORMAT(DATE_FORMAT(NOW(),'%Y/%m/%d %H:%i:%s'),'%Y/%m/%d %H:%i:%s')";
187
                strcmd += ", STR_TO_DATE(DATE_FORMAT(NOW(),'%Y/%m/%d %H:%i:%s'),'%Y/%m/%d %H:%i:%s')";
188
                strcmd += ", STR_TO_DATE(DATE_FORMAT(NOW(),'%Y/%m/%d %H:%i:%s'),'%Y/%m/%d %H:%i:%s')";
189 189
                strcmd = strcmd + ")";
190 190

  
191 191
                if (!ExecuteNonQuery(strcmd, bConnect)) return false;
......
262 262
                strcmd += string.Format(",AssignedFlg = {0}", data.AssignedFlg.ToString());
263 263
                strcmd += string.Format(",InvoiceNo = {0}", data.InvoiceNo.ToString());
264 264

  
265
                strcmd += ", UpdateDate = DATE_FORMAT(DATE_FORMAT(NOW(),'%Y/%m/%d %H:%i:%s'),'%Y/%m/%d %H:%i:%s')";
265
                strcmd += ", UpdateDate = STR_TO_DATE(DATE_FORMAT(NOW(),'%Y/%m/%d %H:%i:%s'),'%Y/%m/%d %H:%i:%s')";
266 266

  
267 267
                //strcmd += string.Format(" Where RequestNo = {0}", data.RequestNo.ToString());
268 268
                strcmd += AddSQLString;
......
329 329

  
330 330
                wrk.ReqConstructionName = objwrk[(int)NameColumn.ReqConstructionName].ToString();
331 331

  
332
                wrk.RequestTotalAmount = int.Parse(objwrk[(int)NameColumn.RequestTotalAmount].ToString());
333
                wrk.RequestAmount = int.Parse(objwrk[(int)NameColumn.RequestAmount].ToString());
334
                wrk.TaxAmount = int.Parse(objwrk[(int)NameColumn.TaxAmount].ToString());
335
                wrk.UnpaidAmount = int.Parse(objwrk[(int)NameColumn.UnpaidAmount].ToString());
332
                wrk.RequestTotalAmount = long.Parse(objwrk[(int)NameColumn.RequestTotalAmount].ToString());
333
                wrk.RequestAmount = long.Parse(objwrk[(int)NameColumn.RequestAmount].ToString());
334
                wrk.TaxAmount = long.Parse(objwrk[(int)NameColumn.TaxAmount].ToString());
335
                wrk.UnpaidAmount = long.Parse(objwrk[(int)NameColumn.UnpaidAmount].ToString());
336 336

  
337 337
                wrk.Note = objwrk[(int)NameColumn.Note].ToString();
338 338

  
branches/src/ProcessManagement/ProcessManagement/DataModel/DepositData.cs
18 18
        private int m_SeqNo = 0;                                // 連番
19 19
        private int m_BusinessPeriod = 0;                         // 営業期
20 20
        private DateTime m_DepositDate = DateTime.MinValue;     // 入金日
21
        private int m_DepositAmount = 0;                        // 入金金額
22
        private int m_DepositAmountCash = 0;                    // 入金金額(現金)
23
        private int m_DepositAmountBill = 0;                    // 入金金額(手形)
21
        private long m_DepositAmount = 0;                        // 入金金額
22
        private long m_DepositAmountCash = 0;                    // 入金金額(現金)
23
        private long m_DepositAmountBill = 0;                    // 入金金額(手形)
24 24
        private DateTime m_EntryDate = DateTime.Now;            // 登録年月日
25 25
        private DateTime m_UpdateDate = DateTime.Now;           // 更新年月日
26 26
        #endregion
......
86 86
        /// <summary>
87 87
        /// 入金金額
88 88
        /// </summary>
89
        public int DepositAmount
89
        public long DepositAmount
90 90
        {
91 91
            get { return m_DepositAmount; }
92 92
            set { m_DepositAmount = value; }
......
95 95
        /// <summary>
96 96
        /// 入金金額(現金)
97 97
        /// </summary>
98
        public int	DepositAmountCash
98
        public long DepositAmountCash
99 99
        {
100 100
            get { return m_DepositAmountCash; }
101 101
            set { m_DepositAmountCash = value; }
......
104 104
        /// <summary>
105 105
        /// 入金金額(手形)
106 106
        /// </summary>
107
        public int	DepositAmountBill
107
        public long DepositAmountBill
108 108
        {
109 109
            get { return m_DepositAmountBill; }
110 110
            set { m_DepositAmountBill = value; }
branches/src/ProcessManagement/ProcessManagement/DataModel/DepositDataDetail.cs
19 19
        private int m_LineCount = 0;                            // 行番号
20 20
        private int m_RequestNo = 0;                            // 請求No
21 21
        private int m_OrderNo = 0;                              // 受付番号
22
        private int m_DepositAmount = 0;                        // 入金金額
23
        private int m_DiscountAmount = 0;                       // 値引き金額
24
        private int m_CnstrPrice = 0;                           // 協力金
25
        private int m_Fees = 0;                                 // 手数料
26
        private int m_OtherAdjustments = 0;                     // その他調整
27
        private int m_CarryAmount = 0;                          // 繰越金額
22
        private long m_DepositAmount = 0;                        // 入金金額
23
        private long m_DiscountAmount = 0;                       // 値引き金額
24
        private long m_CnstrPrice = 0;                           // 協力金
25
        private long m_Fees = 0;                                 // 手数料
26
        private long m_OtherAdjustments = 0;                     // その他調整
27
        private long m_CarryAmount = 0;                          // 繰越金額
28 28
        private int m_ApprovalPersonCode = 0;                   // 承認担当者コード
29 29
        private DateTime m_ApprovalDate = DateTime.MinValue;    // 担当者承認日付
30 30
        private bool m_ApprovalEndFlg = false;                  // 承認完了フラグ
......
102 102
        /// <summary>
103 103
        /// 入金金額
104 104
        /// </summary>
105
        public int DepositAmount
105
        public long DepositAmount
106 106
        {
107 107
            get { return m_DepositAmount; }
108 108
            set { m_DepositAmount = value; }
......
111 111
        /// <summary>
112 112
        /// 値引き金額
113 113
        /// </summary>
114
        public int DiscountAmount
114
        public long DiscountAmount
115 115
        {
116 116
            get { return m_DiscountAmount; }
117 117
            set { m_DiscountAmount = value; }
......
120 120
        /// <summary>
121 121
        /// 協力金
122 122
        /// </summary>
123
        public int CnstrPrice
123
        public long CnstrPrice
124 124
        {
125 125
            get { return m_CnstrPrice; }
126 126
            set { m_CnstrPrice = value; }
......
129 129
        /// <summary>
130 130
        /// 手数料
131 131
        /// </summary>
132
        public int Fees
132
        public long Fees
133 133
        {
134 134
            get { return m_Fees; }
135 135
            set { m_Fees = value; }
......
138 138
        /// <summary>
139 139
        /// その他調整
140 140
        /// </summary>
141
        public int OtherAdjustments
141
        public long OtherAdjustments
142 142
        {
143 143
            get { return m_OtherAdjustments; }
144 144
            set { m_OtherAdjustments = value; }
......
147 147
        /// <summary>
148 148
        /// 繰越金額
149 149
        /// </summary>
150
        public int CarryAmount
150
        public long CarryAmount
151 151
        {
152 152
            get { return m_CarryAmount; }
153 153
            set { m_CarryAmount = value; }
branches/src/ProcessManagement/ProcessManagement/DataModel/InvoiceData.cs
20 20
        private DateTime    m_CretateDate = DateTime.MinValue;  // 作成日
21 21
        private DateTime    m_RequestDate = DateTime.MinValue;  // 請求日
22 22
        private string      m_RequestName = "";                 // 請求先名
23
        private int         m_TotalAmount = 0;                  // 税込み合計金額
24
        private int         m_TaxAmount = 0;                    // 消費税金額
23
        private long        m_TotalAmount = 0;                  // 税込み合計金額
24
        private long        m_TaxAmount = 0;                    // 消費税金額
25 25
        private string      m_Comment1 = "";                    // コメント1
26 26
        private string      m_Comment2 = "";                    // コメント2
27 27
        private string      m_Comment3 = "";                    // コメント3
......
111 111
        /// <summary>
112 112
        /// 税込み合計金額
113 113
        /// </summary>
114
        public int TotalAmount
114
        public long TotalAmount
115 115
        {
116 116
            get { return m_TotalAmount; }
117 117
            set { m_TotalAmount = value; }
......
120 120
        /// <summary>
121 121
        /// 消費税金額
122 122
        /// </summary>
123
        public int TaxAmount
123
        public long TaxAmount
124 124
        {
125 125
            get { return m_TaxAmount; }
126 126
            set { m_TaxAmount = value; }
branches/src/ProcessManagement/ProcessManagement/DataModel/MaterialItemMaster.cs
9 9
    public class MaterialItemMaster
10 10
    {
11 11
        #region メンバ変数
12
        private int m_MaterialItemCode = 0;	            // キー項目
13
        private int m_MaterialKindCode = 0;	            // 資材種類コード
12
        private int m_MaterialItemCode = 0;	                // キー項目
13
        private int m_MaterialKindCode = 0;	                // 資材種類コード
14 14
        private string m_MaterialItemName = string.Empty;	// 名称
15
        private int m_DisplayOrder = 0;	                // 表示順
16
        private int m_DeleteFlg = 0;                    // 削除フラグ
17
        private DateTime m_EntryDate = DateTime.Now;         // 登録日付
18
        private DateTime m_UpdateDate = DateTime.Now;        // 更新日付
15
        private int m_DisplayOrder = 0;	                    // 表示順
16
        private int m_DeleteFlg = 0;                        // 削除フラグ
17
        private DateTime m_EntryDate = DateTime.Now;        // 登録日付
18
        private DateTime m_UpdateDate = DateTime.Now;       // 更新日付
19
        private int m_VersionNo = 0;                        // バージョンNo(排他制御用)
19 20
        #endregion
20 21

  
21 22

  
......
47 48
            get { return m_MaterialItemName; }
48 49
            set { m_MaterialItemName = value; }
49 50
        }
50

  
51 51
        /// <summary>
52 52
        /// 表示順
53 53
        /// </summary>
......
64 64
            get { return m_DeleteFlg; }
65 65
            set { m_DeleteFlg = value; }
66 66
        }
67

  
68 67
        /// <summary>
69 68
        /// 登録日付
70 69
        /// </summary>
......
81 80
            set { m_UpdateDate = value; }
82 81
            get { return m_UpdateDate; }
83 82
        }
83
        /// <summary>
84
        /// バージョンNo
85
        /// </summary>
86
        public int VersionNo
87
        {
88
            get { return m_VersionNo; }
89
            set { m_VersionNo = value; }
90
        }
84 91
        #endregion
85 92

  
86 93
    }
branches/src/ProcessManagement/ProcessManagement/DataModel/RequestData.cs
15 15
        private int         m_RequestNo = 0;                    // 請求No
16 16
        private int         m_MainConstructionCode = 0;         // 本工事番号
17 17
        private string      m_ConstructionName = "";            // 工事件名
18
        private int         m_ContractAmount = 0;               // 請負金額
19
        private int         m_PaidAmount = 0;                   // 請求済金額
20
        private int         m_RequestAmount0 = 0;               // 請求金額0
21
        private int         m_RequestAmount1 = 0;               // 請求金額1
22
        private int         m_RequestAmount2 = 0;               // 請求金額2
23
        private int         m_RequestAmount3 = 0;               // 請求金額3
24
        private int         m_RequestAmount4 = 0;               // 請求金額4
25
        private int         m_RequestAmount5 = 0;               // 請求金額5
26
        private int         m_RequestAmount6 = 0;               // 請求金額6
27
        private int         m_UnclaimedAmount = 0;              // 請求残金額
28
        private int         m_UnpaidAmount = 0;                 // 未入金金額
29
        private int         m_TaxAmount = 0;                    // 消費税
18
        private long        m_ContractAmount = 0;               // 請負金額
19
        private long        m_PaidAmount = 0;                   // 請求済金額
20
        private long        m_RequestAmount0 = 0;               // 請求金額0
21
        private long        m_RequestAmount1 = 0;               // 請求金額1
22
        private long        m_RequestAmount2 = 0;               // 請求金額2
23
        private long        m_RequestAmount3 = 0;               // 請求金額3
24
        private long        m_RequestAmount4 = 0;               // 請求金額4
25
        private long        m_RequestAmount5 = 0;               // 請求金額5
26
        private long        m_RequestAmount6 = 0;               // 請求金額6
27
        private long        m_UnclaimedAmount = 0;              // 請求残金額
28
        private long        m_UnpaidAmount = 0;                 // 未入金金額
29
        private long        m_TaxAmount = 0;                    // 消費税
30 30
        private string      m_Note = "";                        // 備考
31 31
        private DateTime    m_EntryDate = DateTime.Now;         // 登録日付
32 32
        private DateTime    m_UpdateDate = DateTime.Now;        // 更新日付
......
66 66
        /// <summary>
67 67
        /// 請負金額
68 68
        /// </summary>
69
        public int ContractAmount
69
        public long ContractAmount
70 70
        {
71 71
            get { return m_ContractAmount; }
72 72
            set { m_ContractAmount = value; }
......
75 75
        /// <summary>
76 76
        /// 請求済金額
77 77
        /// </summary>
78
        public int PaidAmount
78
        public long PaidAmount
79 79
        {
80 80
            get { return m_PaidAmount; }
81 81
            set { m_PaidAmount = value; }
......
84 84
        /// <summary>
85 85
        /// 請求金額0
86 86
        /// </summary>
87
        public int RequestAmount0
87
        public long RequestAmount0
88 88
        {
89 89
            get { return m_RequestAmount0; }
90 90
            set { m_RequestAmount0 = value; }
......
93 93
        /// <summary>
94 94
        /// 請求金額1
95 95
        /// </summary>
96
        public int RequestAmount1
96
        public long RequestAmount1
97 97
        {
98 98
            get { return m_RequestAmount1; }
99 99
            set { m_RequestAmount1 = value; }
......
102 102
        /// <summary>
103 103
        /// 請求金額2
104 104
        /// </summary>
105
        public int RequestAmount2
105
        public long RequestAmount2
106 106
        {
107 107
            get { return m_RequestAmount2; }
108 108
            set { m_RequestAmount2 = value; }
......
111 111
        /// <summary>
112 112
        /// 請求金額3
113 113
        /// </summary>
114
        public int RequestAmount3
114
        public long RequestAmount3
115 115
        {
116 116
            get { return m_RequestAmount3; }
117 117
            set { m_RequestAmount3 = value; }
......
120 120
        /// <summary>
121 121
        /// 請求金額4
122 122
        /// </summary>
123
        public int RequestAmount4
123
        public long RequestAmount4
124 124
        {
125 125
            get { return m_RequestAmount4; }
126 126
            set { m_RequestAmount4 = value; }
......
129 129
        /// <summary>
130 130
        /// 請求金額5
131 131
        /// </summary>
132
        public int RequestAmount5
132
        public long RequestAmount5
133 133
        {
134 134
            get { return m_RequestAmount5; }
135 135
            set { m_RequestAmount5 = value; }
......
138 138
        /// <summary>
139 139
        /// 請求金額6
140 140
        /// </summary>
141
        public int RequestAmount6
141
        public long RequestAmount6
142 142
        {
143 143
            get { return m_RequestAmount6; }
144 144
            set { m_RequestAmount6 = value; }
......
147 147
        /// <summary>
148 148
        /// 請求残金額
149 149
        /// </summary>
150
        public int UnclaimedAmount
150
        public long UnclaimedAmount
151 151
        {
152 152
            get { return m_UnclaimedAmount; }
153 153
            set { m_UnclaimedAmount = value; }
......
156 156
        /// <summary>
157 157
        /// 未入金金額
158 158
        /// </summary>
159
        public int UnpaidAmount
159
        public long UnpaidAmount
160 160
        {
161 161
            get { return m_UnpaidAmount; }
162 162
            set { m_UnpaidAmount = value; }
......
165 165
        /// <summary>
166 166
        /// 消費税
167 167
        /// </summary>
168
        public int TaxAmount
168
        public long TaxAmount
169 169
        {
170 170
            get { return m_TaxAmount; }
171 171
            set { m_TaxAmount = value; }
branches/src/ProcessManagement/ProcessManagement/DataModel/RequestDataDetail.cs
16 16
        private int         m_MainConstructionCode = 0;         // 本工事番号
17 17
        private int         m_ConstructionCode = 0;             // 工事番号
18 18
        private int         m_ConstructionKind = 0;             // 工事区分
19
        private int         m_RequestAmount = 0;                // 請求金額
20
        private int         m_TaxAmount = 0;                    // 消費税
19
        private long        m_RequestAmount = 0;                // 請求金額
20
        private long        m_TaxAmount = 0;                    // 消費税
21 21
        private DateTime    m_EntryDate = DateTime.Now;         // 登録日付
22 22
        private DateTime    m_UpdateDate = DateTime.Now;        // 更新日付
23 23
        #endregion
......
66 66
        /// <summary>
67 67
        /// 請求金額
68 68
        /// </summary>
69
        public int RequestAmount
69
        public long RequestAmount
70 70
        {
71 71
            get { return m_RequestAmount; }
72 72
            set { m_RequestAmount = value; }
......
75 75
        /// <summary>
76 76
        /// 消費税
77 77
        /// </summary>
78
        public int TaxAmount
78
        public long TaxAmount
79 79
        {
80 80
            get { return m_TaxAmount; }
81 81
            set { m_TaxAmount = value; }
branches/src/ProcessManagement/ProcessManagement/DataModel/RequestHead.cs
20 20
        private int         m_OrderersCode = 0;                 // 発注者コード
21 21
        private string      m_OrderersName = "";                // 発注者名
22 22
        private string      m_ReqConstructionName = "";         // 請求工事件名
23
        private int         m_RequestTotalAmount = 0;           // 請求金額合計
24
        private int         m_RequestAmount = 0;                // 請求金額
25
        private int         m_TaxAmount = 0;                    // 消費税
26
        private int         m_UnpaidAmount = 0;                 // 未入金
23
        private long        m_RequestTotalAmount = 0;           // 請求金額合計
24
        private long        m_RequestAmount = 0;                // 請求金額
25
        private long        m_TaxAmount = 0;                    // 消費税
26
        private long        m_UnpaidAmount = 0;                 // 未入金
27 27
        private string      m_Note ="";                         // 備考
28 28
        private int         m_AssignedFlg = 0;                  // 割当済フラグ
29 29
        private int         m_InvoiceNo = 0;                    // 請求書No
......
110 110
        /// <summary>
111 111
        /// 請求金額合計
112 112
        /// </summary>
113
        public int RequestTotalAmount
113
        public long RequestTotalAmount
114 114
        {
115 115
            get { return m_RequestTotalAmount; }
116 116
            set { m_RequestTotalAmount = value; }
......
119 119
        /// <summary>
120 120
        /// 請求金額
121 121
        /// </summary>
122
        public int RequestAmount
122
        public long RequestAmount
123 123
        {
124 124
            get { return m_RequestAmount; }
125 125
            set { m_RequestAmount = value; }
......
128 128
        /// <summary>
129 129
        /// 消費税
130 130
        /// </summary>
131
        public int TaxAmount
131
        public long TaxAmount
132 132
        {
133 133
            get { return m_TaxAmount; }
134 134
            set { m_TaxAmount = value; }
......
137 137
        /// <summary>
138 138
        /// 未入金
139 139
        /// </summary>
140
        public int UnpaidAmount
140
        public long UnpaidAmount
141 141
        {
142 142
            get { return m_UnpaidAmount; }
143 143
            set { m_UnpaidAmount = value; }
branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/FrmRegField.Designer.cs
48 48
            this.dataGridViewTextBoxColumn3 = new System.Windows.Forms.DataGridViewTextBoxColumn();
49 49
            this.col99 = new System.Windows.Forms.DataGridViewTextBoxColumn();
50 50
            this.dgv1 = new System.Windows.Forms.DataGridView();
51
            this.btnAccept = new System.Windows.Forms.Button();
51 52
            this.ConstructionCode = new System.Windows.Forms.DataGridViewTextBoxColumn();
52 53
            this.col000 = new System.Windows.Forms.DataGridViewTextBoxColumn();
53 54
            this.col001 = new System.Windows.Forms.DataGridViewTextBoxColumn();
54 55
            this.col002 = new System.Windows.Forms.DataGridViewTextBoxColumn();
55 56
            this.ReadOnly = new System.Windows.Forms.DataGridViewTextBoxColumn();
56
            this.btnAccept = new System.Windows.Forms.Button();
57
            this.KeyNo = new System.Windows.Forms.DataGridViewTextBoxColumn();
57 58
            ((System.ComponentModel.ISupportInitialize)(this.dgv2)).BeginInit();
58 59
            ((System.ComponentModel.ISupportInitialize)(this.dgv1)).BeginInit();
59 60
            this.SuspendLayout();
......
219 220
            this.col000,
220 221
            this.col001,
221 222
            this.col002,
222
            this.ReadOnly});
223
            this.ReadOnly,
224
            this.KeyNo});
223 225
            this.dgv1.Location = new System.Drawing.Point(12, 51);
224 226
            this.dgv1.Name = "dgv1";
225 227
            dataGridViewCellStyle8.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
......
240 242
            this.dgv1.CellValueChanged += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgv1_CellValueChanged);
241 243
            this.dgv1.SelectionChanged += new System.EventHandler(this.dgv1_SelectionChanged);
242 244
            // 
245
            // btnAccept
246
            // 
247
            this.btnAccept.BackColor = System.Drawing.Color.Lime;
248
            this.btnAccept.ForeColor = System.Drawing.Color.Black;
249
            this.btnAccept.Location = new System.Drawing.Point(376, 270);
250
            this.btnAccept.Name = "btnAccept";
251
            this.btnAccept.Size = new System.Drawing.Size(120, 32);
252
            this.btnAccept.TabIndex = 10;
253
            this.btnAccept.Text = "登 録";
254
            this.btnAccept.UseVisualStyleBackColor = false;
255
            this.btnAccept.Click += new System.EventHandler(this.btnAccept_Click);
256
            // 
243 257
            // ConstructionCode
244 258
            // 
245 259
            this.ConstructionCode.HeaderText = "ConstructionCode";
......
286 300
            this.ReadOnly.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
287 301
            this.ReadOnly.Visible = false;
288 302
            // 
289
            // btnAccept
303
            // KeyNo
290 304
            // 
291
            this.btnAccept.BackColor = System.Drawing.Color.Lime;
292
            this.btnAccept.ForeColor = System.Drawing.Color.Black;
293
            this.btnAccept.Location = new System.Drawing.Point(376, 270);
294
            this.btnAccept.Name = "btnAccept";
295
            this.btnAccept.Size = new System.Drawing.Size(120, 32);
296
            this.btnAccept.TabIndex = 10;
297
            this.btnAccept.Text = "登 録";
298
            this.btnAccept.UseVisualStyleBackColor = false;
299
            this.btnAccept.Click += new System.EventHandler(this.btnAccept_Click);
305
            this.KeyNo.HeaderText = "KeyNo";
306
            this.KeyNo.Name = "KeyNo";
307
            this.KeyNo.ReadOnly = true;
308
            this.KeyNo.Resizable = System.Windows.Forms.DataGridViewTriState.False;
309
            this.KeyNo.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
310
            this.KeyNo.Visible = false;
300 311
            // 
301 312
            // FrmRegField
302 313
            // 
......
346 357
        private System.Windows.Forms.DataGridViewTextBoxColumn col001;
347 358
        private System.Windows.Forms.DataGridViewTextBoxColumn col002;
348 359
        private System.Windows.Forms.DataGridViewTextBoxColumn ReadOnly;
360
        private System.Windows.Forms.DataGridViewTextBoxColumn KeyNo;
349 361
    }
350 362
}
branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/FrmRegField.cs
31 31
            No,                         // 行番号
32 32
            ConstructionName,           // 現場名
33 33
            BillPrice,                  // 金額
34
            ReadOnly,
34
            ReadOnly,                   // 読み取り専用フラグ
35
            LineCount,                  // 行番号
35 36
        }
36 37
        #endregion
37 38

  
......
106 107
        }
107 108
        #endregion
108 109

  
110
        #region キーを作成する
111
        /// <summary>
112
        /// キーを作成する
113
        /// </summary>
114
        /// <param name="nSeqNo"></param>
115
        /// <param name="nLineCount"></param>
116
        /// <returns></returns>
117
        private int getKeyNo(int nSeqNo, int nLineCount)
118
        {
119
            int nKeyNo = nSeqNo * 100 + nLineCount;
120

  
121
            return nKeyNo;
122
        }
123
        #endregion
124

  
125
        #region 該当工事既存判定
126
        /// <summary>
127
        /// 該当工事既存判定
128
        /// </summary>
129
        /// <param name="nConstructionCode"></param>
130
        /// <returns></returns>
131
        private bool isExistConstructionRow(int nConstructionCode)
132
        {
133
            foreach (DataGridViewRow r in m_HtGridRowConstructionCode.Values)
134
            {
135
                if (int.Parse(r.Cells[(int)ColumnIndex.ConstructionCode].Value.ToString()) == nConstructionCode)
136
                {
137
                    return true;
138
                }
139
            }
140

  
141
            return false;
142
        }
143
        #endregion
144

  
145
        #region 行を取得
146
        /// <summary>
147
        /// 行を取得
148
        /// </summary>
149
        /// <param name="nKeyNo"></param>
150
        /// <returns></returns>
151
        private DataGridViewRow GetConstructionRow(int nKeyNo)
152
        {
153

  
154
            foreach (DataGridViewRow r in m_HtGridRowConstructionCode.Values)
155
            {
156
                int wrk = int.Parse(r.Cells[(int)ColumnIndex.LineCount].Value.ToString());
157

  
158
                if( wrk == -1 ){
159
                    continue;
160
                }
161

  
162
                if ( wrk == nKeyNo)
163
                {
164
                    return r;
165
                }
166
            }
167

  
168
            return null;
169
        }
170
        #endregion
171

  
109 172
        #region 現場追加ボタン押下
110 173
        /// <summary>
111 174
        /// 現場追加ボタン押下
......
133 196
                // 選択結果判定 OKなら以下の処理を実行する
134 197
                if (frmConstructionDiag.EndButton == DialogResult.OK)
135 198
                {
136
                    // 同じ現場コードの行を探す
137
                    if (!m_HtGridRowConstructionCode.ContainsKey(frmConstructionDiag.ConstructionCode))
199
                    if (isExistConstructionRow(frmConstructionDiag.ConstructionCode) == true)
138 200
                    {
139
                        // 見つからなかった場合は現場を追加
201
                        if (MessageBox.Show("既に同一工事が存在しますが追加してよろしいですか?", "現場追加", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No)
202
                        {
203
                            return;
204
                        }
205
                    }
140 206

  
141
                        // 行番号付番
142
                        int rowCount = dgv1.RowCount - 1;
207
                    // 行番号付番
208
                    int rowCount = dgv1.RowCount - 1;
143 209

  
144
                        // 現場の追加
145
                        dgv1.Rows.Add(frmConstructionDiag.ConstructionCode, rowCount, frmConstructionDiag.ConstructionName, 0, false);
146
                        dgv1.Rows[dgv1.RowCount - 1].Resizable = DataGridViewTriState.False;
147
                        dgv1[(int)ColumnIndex.BillPrice, dgv1.RowCount - 1].ReadOnly = false;
148
                        //dgv1[(int)ColumnIndex.BillPrice, dgv1.RowCount - 1].Style.Format = "#,0";
210
                    // 現場の追加
211
                    dgv1.Rows.Add(frmConstructionDiag.ConstructionCode, rowCount, frmConstructionDiag.ConstructionName, 0, false, -1);
212
                    dgv1.Rows[dgv1.RowCount - 1].Resizable = DataGridViewTriState.False;
213
                    dgv1[(int)ColumnIndex.BillPrice, dgv1.RowCount - 1].ReadOnly = false;
214
                    //dgv1[(int)ColumnIndex.BillPrice, dgv1.RowCount - 1].Style.Format = "#,0";
149 215

  
150
                        // ハッシュテーブルに追加
151
                        m_HtGridRowConstructionCode.Add(frmConstructionDiag.ConstructionCode, dgv1.Rows[dgv1.RowCount - 1]);
152
                    }
216
                    // ハッシュテーブルに追加
217
                    m_HtGridRowConstructionCode.Add(rowCount, dgv1.Rows[dgv1.RowCount - 1]);
153 218

  
154 219
                }
155 220

  
......
182 247
                foreach (DataGridViewRow gridRow in dgv1.SelectedRows)
183 248
                {
184 249
                    // ハッシュテーブルから選択行を削除する
185
                    m_HtGridRowConstructionCode.Remove((int)gridRow.Cells[(int)ColumnIndex.ConstructionCode].Value);
250
                    m_HtGridRowConstructionCode.Remove((int)gridRow.Cells[(int)ColumnIndex.No].Value);
186 251

  
187 252
                    // Gridから選択行を削除する
188 253
                    dgv1.Rows.Remove(gridRow);
......
243 308
                        continue;
244 309
                    }
245 310

  
246
                    if (m_HtGridRowConstructionCode.ContainsKey(detail.ConstructionCode))
311
                    int keyNo = getKeyNo(m_ConstructionFieldNameHeader.SeqNo, detail.LineCount);
312

  
313
                    DataGridViewRow gridRow = GetConstructionRow(keyNo);
314

  
315
                    if (gridRow != null)
247 316
                    {
248
                        var gridRow = m_HtGridRowConstructionCode[detail.ConstructionCode] as DataGridViewRow;
249

  
250 317
                        // 見つかったら 金額を取得、行を削除する
251 318
                        detail.BillPrice = CommonMotions.cnvInt(gridRow.Cells[(int)ColumnIndex.BillPrice].Value);
252 319
                        if (detail.BillPrice == 0)
......
504 571
                dgv2.Rows.Add(0, "", "不明", 0);
505 572

  
506 573
                // 各現場の行を追加
507
                int rowCount = 0;
574
                int rowCount = 1;
508 575
                foreach (var detail in m_ConstructionFieldNameHeader.ConstructionFieldNameDetails)
509 576
                {
510
                    if(detail.ConstructionCode != 0 )
577
                    if (detail.ConstructionCode != 0)
511 578
                    {
512 579
                        // 各個現場の行を追加
513
                        dgv1.Rows.Add(detail.ConstructionCode, ++rowCount, detail.FieldName, detail.BillPrice, detail.ReadOnly);
580
                        dgv1.Rows.Add(detail.ConstructionCode, rowCount, detail.FieldName, detail.BillPrice, detail.ReadOnly, getKeyNo(m_ConstructionFieldNameHeader.SeqNo, detail.LineCount));
514 581
                        dgv1.Rows[dgv1.RowCount - 1].Resizable = DataGridViewTriState.False;
515 582
                        dgv1.Rows[dgv1.RowCount - 1].Cells[(int)ColumnIndex.BillPrice].ReadOnly = detail.ReadOnly;         // ReadOnlyフラグがtrueなら金額のセルを編集不可にする
583

  
584
//                        m_HtDetailLineCount.Add(rowCount, detail);
585
                        m_HtGridRowConstructionCode.Add(rowCount, dgv1.Rows[dgv1.RowCount - 1]);
586
                        rowCount++;
516 587
                    }
517

  
518
                    // ハッシュテーブルの追加
519
                    //m_HtDetailLineCount.Add(detail.LineCount, detail); //Update Mjurakami
520
                    m_HtDetailLineCount.Add(detail.ConstructionCode, detail);
521
                    m_HtGridRowConstructionCode.Add(detail.ConstructionCode, dgv1.Rows[dgv1.RowCount - 1]);
588
                    else
589
                    {
590
                        m_HtDetailLineCount.Add(0, detail);
591
                    }
522 592
                }
523 593

  
524 594
                // 不明行を再計算して表示
branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/FrmRegField.resx
147 147
  <metadata name="ReadOnly.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
148 148
    <value>True</value>
149 149
  </metadata>
150
  <metadata name="KeyNo.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
151
    <value>True</value>
152
  </metadata>
150 153
</root>
branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/FrmSelectRegField.Designer.cs
31 31
            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
32 32
            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
33 33
            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
34
            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
34 35
            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle();
35 36
            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle8 = new System.Windows.Forms.DataGridViewCellStyle();
36 37
            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle();
37 38
            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle();
38
            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
39 39
            this.label1 = new System.Windows.Forms.Label();
40 40
            this.tboxCompany = new System.Windows.Forms.TextBox();
41 41
            this.btnAdd = new System.Windows.Forms.Button();
42 42
            this.btnDelete = new System.Windows.Forms.Button();
43 43
            this.btnEnd = new System.Windows.Forms.Button();
44 44
            this.dgv2 = new System.Windows.Forms.DataGridView();
45
            this.ConstructionCode2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
46
            this.OrderNo2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
47
            this.dataGridViewTextBoxColumn1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
48
            this.dataGridViewTextBoxColumn2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
49
            this.dataGridViewTextBoxColumn3 = new System.Windows.Forms.DataGridViewTextBoxColumn();
50
            this.col99 = new System.Windows.Forms.DataGridViewTextBoxColumn();
45 51
            this.dgv1 = new System.Windows.Forms.DataGridView();
46 52
            this.btnAccept = new System.Windows.Forms.Button();
47 53
            this.ConstructionCode = new System.Windows.Forms.DataGridViewTextBoxColumn();
......
50 56
            this.col001 = new System.Windows.Forms.DataGridViewTextBoxColumn();
51 57
            this.col002 = new System.Windows.Forms.DataGridViewTextBoxColumn();
52 58
            this.ReadOnly = new System.Windows.Forms.DataGridViewTextBoxColumn();
53
            this.ConstructionCode2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
54
            this.OrderNo2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
55
            this.dataGridViewTextBoxColumn1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
56
            this.dataGridViewTextBoxColumn2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
57
            this.dataGridViewTextBoxColumn3 = new System.Windows.Forms.DataGridViewTextBoxColumn();
58
            this.col99 = new System.Windows.Forms.DataGridViewTextBoxColumn();
59 59
            ((System.ComponentModel.ISupportInitialize)(this.dgv2)).BeginInit();
60 60
            ((System.ComponentModel.ISupportInitialize)(this.dgv1)).BeginInit();
61 61
            this.SuspendLayout();
......
158 158
            this.dgv2.Size = new System.Drawing.Size(610, 24);
159 159
            this.dgv2.TabIndex = 9;
160 160
            // 
161
            // ConstructionCode2
162
            // 
163
            this.ConstructionCode2.Frozen = true;
164
            this.ConstructionCode2.HeaderText = "■工事番号";
165
            this.ConstructionCode2.Name = "ConstructionCode2";
166
            this.ConstructionCode2.Visible = false;
167
            // 
168
            // OrderNo2
169
            // 
170
            this.OrderNo2.Frozen = true;
171
            this.OrderNo2.HeaderText = "■連番";
172
            this.OrderNo2.Name = "OrderNo2";
173
            this.OrderNo2.Visible = false;
174
            // 
175
            // dataGridViewTextBoxColumn1
176
            // 
177
            this.dataGridViewTextBoxColumn1.Frozen = true;
178
            this.dataGridViewTextBoxColumn1.HeaderText = "No";
179
            this.dataGridViewTextBoxColumn1.Name = "dataGridViewTextBoxColumn1";
180
            this.dataGridViewTextBoxColumn1.ReadOnly = true;
181
            this.dataGridViewTextBoxColumn1.Resizable = System.Windows.Forms.DataGridViewTriState.False;
182
            this.dataGridViewTextBoxColumn1.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
183
            this.dataGridViewTextBoxColumn1.Width = 40;
184
            // 
185
            // dataGridViewTextBoxColumn2
186
            // 
187
            this.dataGridViewTextBoxColumn2.Frozen = true;
188
            this.dataGridViewTextBoxColumn2.HeaderText = "現 場 名";
189
            this.dataGridViewTextBoxColumn2.Name = "dataGridViewTextBoxColumn2";
190
            this.dataGridViewTextBoxColumn2.ReadOnly = true;
191
            this.dataGridViewTextBoxColumn2.Resizable = System.Windows.Forms.DataGridViewTriState.False;
192
            this.dataGridViewTextBoxColumn2.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
193
            this.dataGridViewTextBoxColumn2.Width = 400;
194
            // 
195
            // dataGridViewTextBoxColumn3
196
            // 
197
            dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
198
            this.dataGridViewTextBoxColumn3.DefaultCellStyle = dataGridViewCellStyle2;
199
            this.dataGridViewTextBoxColumn3.Frozen = true;
200
            this.dataGridViewTextBoxColumn3.HeaderText = "金 額";
201
            this.dataGridViewTextBoxColumn3.Name = "dataGridViewTextBoxColumn3";
202
            this.dataGridViewTextBoxColumn3.ReadOnly = true;
203
            this.dataGridViewTextBoxColumn3.Resizable = System.Windows.Forms.DataGridViewTriState.False;
204
            this.dataGridViewTextBoxColumn3.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
205
            this.dataGridViewTextBoxColumn3.Width = 150;
206
            // 
207
            // col99
208
            // 
209
            this.col99.Frozen = true;
210
            this.col99.HeaderText = "col99";
211
            this.col99.Name = "col99";
212
            this.col99.ReadOnly = true;
213
            this.col99.Width = 24;
214
            // 
161 215
            // dgv1
162 216
            // 
163 217
            this.dgv1.AllowUserToAddRows = false;
......
260 314
            this.ReadOnly.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
261 315
            this.ReadOnly.Visible = false;
262 316
            // 
263
            // ConstructionCode2
264
            // 
265
            this.ConstructionCode2.Frozen = true;
266
            this.ConstructionCode2.HeaderText = "■工事番号";
267
            this.ConstructionCode2.Name = "ConstructionCode2";
268
            this.ConstructionCode2.Visible = false;
269
            // 
270
            // OrderNo2
271
            // 
272
            this.OrderNo2.Frozen = true;
273
            this.OrderNo2.HeaderText = "■連番";
274
            this.OrderNo2.Name = "OrderNo2";
275
            this.OrderNo2.Visible = false;
276
            // 
277
            // dataGridViewTextBoxColumn1
278
            // 
279
            this.dataGridViewTextBoxColumn1.Frozen = true;
280
            this.dataGridViewTextBoxColumn1.HeaderText = "No";
281
            this.dataGridViewTextBoxColumn1.Name = "dataGridViewTextBoxColumn1";
282
            this.dataGridViewTextBoxColumn1.ReadOnly = true;
283
            this.dataGridViewTextBoxColumn1.Resizable = System.Windows.Forms.DataGridViewTriState.False;
284
            this.dataGridViewTextBoxColumn1.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
285
            this.dataGridViewTextBoxColumn1.Width = 40;
286
            // 
... 差分の行数が表示可能な上限を超えました。超過分は表示しません。

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