プロジェクト

全般

プロフィール

リビジョン 91

山内7年以上前に追加

資材管理行ロック廃止(バージョンNoによる排他制御に変更)

差分を表示:

branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Material/MaterialCountEntry/FrmMaterialCountEntry.cs
266 266
                m_IoM.SetLockWaitime(1);
267 267
                m_IoM.beginTran();
268 268
                // 共有ロック
269
                if (!m_IoM.RowLockShare(m_MaterialItemCode, false))
270
                {
271
                    this.Close();
272
                }
269
                //if (!m_IoM.RowLockShare(m_MaterialItemCode, false))
270
                //{
271
                //    this.Close();
272
                //}
273 273

  
274 274
            }
275 275
            catch (Exception ex)
......
439 439
                // データ登録
440 440
                if (!DataEntry()) 
441 441
                {
442
                    m_IoM.rollback();
443
                    m_IoM.RowLockShare(m_MaterialItemCode, false);
442
                    //m_IoM.rollback();
443
                    //m_IoM.RowLockShare(m_MaterialItemCode, false);
444 444
                    return;
445 445
                }
446 446

  
......
466 466
            string strSQL = m_IoM.CreatePrimarykeyString(m_MaterialItemCode);
467 467
            List<MaterialInfo> mList = new List<MaterialInfo>();
468 468

  
469
            IOMaterialItem IoMim = new IOMaterialItem();
469 470
            IOMaterialRecordInfo IoMri = new IOMaterialRecordInfo();
470 471

  
472
            IoMim.connect();
473
            IoMim.beginTran();
474

  
471 475
            try
472 476
            {
477
                // 資材品目マスタ
478
                MaterialItemMaster MiMaster;
479

  
473 480
                // 資材情報
474 481
                miwork.MaterialItemCode = CommonMotions.cnvInt(m_MaterialItemCode);
475 482
                miwork.MaterialCount = CommonMotions.cnvInt(lblMaterialCountAfter.Text);
476 483
                miwork.RentCount = CommonMotions.cnvInt(lblRentCountAfter.Text);
477 484
                miwork.DeleteFlg  = 0;
478 485

  
486
                // 資材品目マスタバージョンNo取得
487
                string strMimSQL = IoMim.CreatePrimarykeyString(m_MaterialItemCode);
488
                List<MaterialItemMaster> MimList = new List<MaterialItemMaster>();
489
                if (!IoMim.SelectAction(strMimSQL, ref MimList, false))
490
                {
491
                    MessageBox.Show("資材品目マスタの取得に失敗しました。", "登録エラー", MessageBoxButtons.OK, MessageBoxIcon.Error);
492
                    return false;
493
                }
494
                MiMaster = MimList[0];
479 495

  
480 496
                // 資材情報マスタ取得
481 497
                if (!m_IoM.SelectAction(strSQL, ref mList, false))
......
508 524
                else
509 525
                {
510 526
                    // 資材情報更新ロック
511
                    m_IoM.rollback();
512
                    if (!m_IoM.RowLockUpdate(m_MaterialItemCode, false))
513
                    {
514
                        m_IoM.RowLockShare(m_MaterialItemCode, false);
515
                        MessageBox.Show("他のユーザで編集中のため、処理できません。", "登録エラー"
516
                        , MessageBoxButtons.OK, MessageBoxIcon.Error);
517
                        return false;
518
                    }
527
                    //m_IoM.rollback();
528
                    //if (!m_IoM.RowLockUpdate(m_MaterialItemCode, false))
529
                    //{
530
                    //    m_IoM.RowLockShare(m_MaterialItemCode, false);
531
                    //    MessageBox.Show("他のユーザで編集中のため、処理できません。", "登録エラー"
532
                    //    , MessageBoxButtons.OK, MessageBoxIcon.Error);
533
                    //    return false;
534
                    //}
519 535

  
520 536
                    // 貸出可能数<破棄数の場合はエラー
521 537
                    if (CommonMotions.cnvInt(mList[0].RentCount) < CommonMotions.cnvInt(txtHaki.Text))
522 538
                    {
523
                        m_IoM.rollback();
524
                        m_IoM.RowLockShare(m_MaterialItemCode, false);
539
                        //m_IoM.rollback();
540
                        //m_IoM.RowLockShare(m_MaterialItemCode, false);
525 541
                        MessageBox.Show("割当可能数を超えて破棄できません。", "登録エラー"
526 542
                                , MessageBoxButtons.OK, MessageBoxIcon.Warning);
527 543
                        return false;
......
531 547
                    // データ登録
532 548
                    if (!m_IoM.UpdateAction(strSQL, miwork, false))
533 549
                    {
534
                        m_IoM.rollback();
535
                        m_IoM.RowLockShare(m_MaterialItemCode, false);
550
                        //m_IoM.rollback();
551
                        //m_IoM.RowLockShare(m_MaterialItemCode, false);
536 552
                        MessageBox.Show("更新に失敗しました。", "登録エラー", MessageBoxButtons.OK, MessageBoxIcon.Error);
537 553
                        return false;
538 554
                    }
......
563 579
                    // データ登録
564 580
                    if (!IoMri.InsertAction(mRiList))
565 581
                    {
566
                        m_IoM.rollback();
567
                        m_IoM.RowLockShare(m_MaterialItemCode, false);
582
                        //m_IoM.rollback();
583
                        //m_IoM.RowLockShare(m_MaterialItemCode, false);
568 584
                        IoMri.rollback();
569 585
                        MessageBox.Show("登録に失敗しました。", "登録エラー", MessageBoxButtons.OK, MessageBoxIcon.Error);
570 586
                        return false;
......
591 607
                    // データ登録
592 608
                    if (!IoMri.InsertAction(mRiList))
593 609
                    {
594
                        m_IoM.rollback();
595
                        m_IoM.RowLockShare(m_MaterialItemCode, false);
610
                        //m_IoM.rollback();
611
                        //m_IoM.RowLockShare(m_MaterialItemCode, false);
596 612
                        IoMri.rollback();
597 613
                        MessageBox.Show("登録に失敗しました。", "登録エラー", MessageBoxButtons.OK, MessageBoxIcon.Error);
598 614
                        return false;
599 615
                    }
600 616
                }
601 617

  
618
                // 資材品目マスタバージョンNo更新
619
                strMimSQL += string.Format(" And VERSIONNO = {0}", MiMaster.VersionNo.ToString());
620
                if (IoMim.UpdateVersionAction(strMimSQL, MiMaster, false))
621
                {
622
                    MessageBox.Show("他のユーザで更新されています。", "登録エラー", MessageBoxButtons.OK, MessageBoxIcon.Error);
623
                    IoMri.rollback();
624
                    IoMim.rollback();
625
                    return false;
626
                }
627

  
602 628
                IoMri.commit();
603 629
                m_IoM.commit();
604

  
605 630
            }
606 631
            finally 
607 632
            {
......
610 635
                    IoMri.close();
611 636
                    IoMri = null;
612 637
                }
638
                if (IoMim != null)
639
                {
640
                    IoMim.close();
641
                    IoMim = null;
642
                }
613 643
            }
614 644

  
615 645
            return true;
branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Material/MaterialCountEntry/FrmMaterialCountEntry.designer.cs
68 68
            this.label1.Location = new System.Drawing.Point(209, 9);
69 69
            this.label1.Name = "label1";
70 70
            this.label1.Size = new System.Drawing.Size(292, 32);
71
            this.label1.TabIndex = 6;
71
            this.label1.TabIndex = 0;
72 72
            this.label1.Text = "資 材 数 変 更";
73 73
            this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
74 74
            // 
......
80 80
            this.label2.Location = new System.Drawing.Point(9, 49);
81 81
            this.label2.Name = "label2";
82 82
            this.label2.Size = new System.Drawing.Size(86, 24);
83
            this.label2.TabIndex = 23;
83
            this.label2.TabIndex = 1;
84 84
            this.label2.Text = "資材種類";
85 85
            this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
86 86
            // 
......
92 92
            this.label3.Location = new System.Drawing.Point(9, 79);
93 93
            this.label3.Name = "label3";
94 94
            this.label3.Size = new System.Drawing.Size(86, 24);
95
            this.label3.TabIndex = 26;
95
            this.label3.TabIndex = 3;
96 96
            this.label3.Text = "資材品目";
97 97
            this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
98 98
            // 
......
104 104
            this.label4.Location = new System.Drawing.Point(9, 109);
105 105
            this.label4.Name = "label4";
106 106
            this.label4.Size = new System.Drawing.Size(86, 24);
107
            this.label4.TabIndex = 28;
107
            this.label4.TabIndex = 5;
108 108
            this.label4.Text = "登録日";
109 109
            this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
110 110
            // 
......
116 116
            this.lblMaterialKind.Location = new System.Drawing.Point(100, 49);
117 117
            this.lblMaterialKind.Name = "lblMaterialKind";
118 118
            this.lblMaterialKind.Size = new System.Drawing.Size(180, 24);
119
            this.lblMaterialKind.TabIndex = 29;
119
            this.lblMaterialKind.TabIndex = 2;
120 120
            this.lblMaterialKind.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
121 121
            // 
122 122
            // lblMaterialItem
......
127 127
            this.lblMaterialItem.Location = new System.Drawing.Point(100, 79);
128 128
            this.lblMaterialItem.Name = "lblMaterialItem";
129 129
            this.lblMaterialItem.Size = new System.Drawing.Size(180, 24);
130
            this.lblMaterialItem.TabIndex = 30;
130
            this.lblMaterialItem.TabIndex = 4;
131 131
            this.lblMaterialItem.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
132 132
            // 
133 133
            // lblMaterialDate
......
138 138
            this.lblMaterialDate.Location = new System.Drawing.Point(101, 109);
139 139
            this.lblMaterialDate.Name = "lblMaterialDate";
140 140
            this.lblMaterialDate.Size = new System.Drawing.Size(150, 24);
141
            this.lblMaterialDate.TabIndex = 31;
141
            this.lblMaterialDate.TabIndex = 6;
142 142
            this.lblMaterialDate.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
143 143
            // 
144 144
            // btnEnd
......
148 148
            this.btnEnd.Location = new System.Drawing.Point(580, 255);
149 149
            this.btnEnd.Name = "btnEnd";
150 150
            this.btnEnd.Size = new System.Drawing.Size(120, 28);
151
            this.btnEnd.TabIndex = 4;
151
            this.btnEnd.TabIndex = 27;
152 152
            this.btnEnd.Text = "終 了";
153 153
            this.btnEnd.UseVisualStyleBackColor = false;
154 154
            this.btnEnd.Click += new System.EventHandler(this.btnEnd_Click);
......
161 161
            this.lblPerson.Location = new System.Drawing.Point(381, 109);
162 162
            this.lblPerson.Name = "lblPerson";
163 163
            this.lblPerson.Size = new System.Drawing.Size(144, 24);
164
            this.lblPerson.TabIndex = 34;
164
            this.lblPerson.TabIndex = 8;
165 165
            this.lblPerson.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
166 166
            // 
167 167
            // label9
......
172 172
            this.label9.Location = new System.Drawing.Point(289, 109);
173 173
            this.label9.Name = "label9";
174 174
            this.label9.Size = new System.Drawing.Size(86, 24);
175
            this.label9.TabIndex = 33;
175
            this.label9.TabIndex = 7;
176 176
            this.label9.Text = "担当";
177 177
            this.label9.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
178 178
            // 
......
184 184
            this.label11.Location = new System.Drawing.Point(9, 139);
185 185
            this.label11.Name = "label11";
186 186
            this.label11.Size = new System.Drawing.Size(86, 24);
187
            this.label11.TabIndex = 35;
187
            this.label11.TabIndex = 9;
188 188
            this.label11.Text = "追加";
189 189
            this.label11.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
190 190
            // 
......
196 196
            this.label13.Location = new System.Drawing.Point(289, 139);
197 197
            this.label13.Name = "label13";
198 198
            this.label13.Size = new System.Drawing.Size(86, 24);
199
            this.label13.TabIndex = 37;
199
            this.label13.TabIndex = 11;
200 200
            this.label13.Text = "破棄";
201 201
            this.label13.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
202 202
            // 
......
208 208
            this.label15.Location = new System.Drawing.Point(9, 169);
209 209
            this.label15.Name = "label15";
210 210
            this.label15.Size = new System.Drawing.Size(86, 24);
211
            this.label15.TabIndex = 39;
211
            this.label15.TabIndex = 13;
212 212
            this.label15.Text = "変更前";
213 213
            this.label15.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
214 214
            // 
......
220 220
            this.label14.Location = new System.Drawing.Point(102, 169);
221 221
            this.label14.Name = "label14";
222 222
            this.label14.Size = new System.Drawing.Size(100, 24);
223
            this.label14.TabIndex = 40;
223
            this.label14.TabIndex = 14;
224 224
            this.label14.Text = "資材数";
225 225
            this.label14.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
226 226
            // 
......
232 232
            this.label17.Location = new System.Drawing.Point(302, 169);
233 233
            this.label17.Name = "label17";
234 234
            this.label17.Size = new System.Drawing.Size(142, 24);
235
            this.label17.TabIndex = 42;
235
            this.label17.TabIndex = 16;
236 236
            this.label17.Text = "貸出可能数";
237 237
            this.label17.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
238 238
            // 
......
244 244
            this.label20.Location = new System.Drawing.Point(302, 192);
245 245
            this.label20.Name = "label20";
246 246
            this.label20.Size = new System.Drawing.Size(142, 24);
247
            this.label20.TabIndex = 47;
247
            this.label20.TabIndex = 21;
248 248
            this.label20.Text = "貸出可能数";
249 249
            this.label20.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
250 250
            // 
......
256 256
            this.label22.Location = new System.Drawing.Point(102, 192);
257 257
            this.label22.Name = "label22";
258 258
            this.label22.Size = new System.Drawing.Size(100, 24);
259
            this.label22.TabIndex = 45;
259
            this.label22.TabIndex = 19;
260 260
            this.label22.Text = "資材数";
261 261
            this.label22.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
262 262
            // 
......
268 268
            this.label23.Location = new System.Drawing.Point(9, 192);
269 269
            this.label23.Name = "label23";
270 270
            this.label23.Size = new System.Drawing.Size(86, 24);
271
            this.label23.TabIndex = 44;
271
            this.label23.TabIndex = 18;
272 272
            this.label23.Text = "変更後";
273 273
            this.label23.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
274 274
            // 
......
279 279
            this.txtDataEntry.Location = new System.Drawing.Point(454, 255);
280 280
            this.txtDataEntry.Name = "txtDataEntry";
281 281
            this.txtDataEntry.Size = new System.Drawing.Size(120, 28);
282
            this.txtDataEntry.TabIndex = 51;
282
            this.txtDataEntry.TabIndex = 26;
283 283
            this.txtDataEntry.Text = "登 録";
284 284
            this.txtDataEntry.UseVisualStyleBackColor = false;
285 285
            this.txtDataEntry.Click += new System.EventHandler(this.btnDataEntry_Click);
......
291 291
            this.btnMaterialHistory.Location = new System.Drawing.Point(8, 255);
292 292
            this.btnMaterialHistory.Name = "btnMaterialHistory";
293 293
            this.btnMaterialHistory.Size = new System.Drawing.Size(120, 28);
294
            this.btnMaterialHistory.TabIndex = 52;
294
            this.btnMaterialHistory.TabIndex = 25;
295 295
            this.btnMaterialHistory.Text = "資材履歴";
296 296
            this.btnMaterialHistory.UseVisualStyleBackColor = false;
297 297
            this.btnMaterialHistory.Click += new System.EventHandler(this.btnMaterialHistory_Click);
......
304 304
            this.label25.Location = new System.Drawing.Point(9, 222);
305 305
            this.label25.Name = "label25";
306 306
            this.label25.Size = new System.Drawing.Size(87, 24);
307
            this.label25.TabIndex = 53;
307
            this.label25.TabIndex = 23;
308 308
            this.label25.Text = "コメント";
309 309
            this.label25.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
310 310
            // 
......
313 313
            this.txtComment.Location = new System.Drawing.Point(102, 223);
314 314
            this.txtComment.Name = "txtComment";
315 315
            this.txtComment.Size = new System.Drawing.Size(597, 23);
316
            this.txtComment.TabIndex = 54;
316
            this.txtComment.TabIndex = 24;
317 317
            // 
318 318
            // lblRentCountAfter
319 319
            // 
......
323 323
            this.lblRentCountAfter.Location = new System.Drawing.Point(444, 192);
324 324
            this.lblRentCountAfter.Name = "lblRentCountAfter";
325 325
            this.lblRentCountAfter.Size = new System.Drawing.Size(100, 24);
326
            this.lblRentCountAfter.TabIndex = 48;
326
            this.lblRentCountAfter.TabIndex = 22;
327 327
            this.lblRentCountAfter.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
328 328
            // 
329 329
            // lblRentCount
......
334 334
            this.lblRentCount.Location = new System.Drawing.Point(444, 169);
335 335
            this.lblRentCount.Name = "lblRentCount";
336 336
            this.lblRentCount.Size = new System.Drawing.Size(100, 24);
337
            this.lblRentCount.TabIndex = 43;
337
            this.lblRentCount.TabIndex = 17;
338 338
            this.lblRentCount.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
339 339
            // 
340 340
            // lblMaterialCountAfter
......
345 345
            this.lblMaterialCountAfter.Location = new System.Drawing.Point(202, 192);
346 346
            this.lblMaterialCountAfter.Name = "lblMaterialCountAfter";
347 347
            this.lblMaterialCountAfter.Size = new System.Drawing.Size(100, 24);
348
            this.lblMaterialCountAfter.TabIndex = 46;
348
            this.lblMaterialCountAfter.TabIndex = 20;
349 349
            this.lblMaterialCountAfter.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
350 350
            // 
351 351
            // lblMaterialCount
......
356 356
            this.lblMaterialCount.Location = new System.Drawing.Point(202, 169);
357 357
            this.lblMaterialCount.Name = "lblMaterialCount";
358 358
            this.lblMaterialCount.Size = new System.Drawing.Size(100, 24);
359
            this.lblMaterialCount.TabIndex = 41;
359
            this.lblMaterialCount.TabIndex = 15;
360 360
            this.lblMaterialCount.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
361 361
            // 
362 362
            // txtTuika
......
366 366
            this.txtTuika.MaxLength = 4;
367 367
            this.txtTuika.Name = "txtTuika";
368 368
            this.txtTuika.Size = new System.Drawing.Size(100, 23);
369
            this.txtTuika.TabIndex = 55;
369
            this.txtTuika.TabIndex = 10;
370 370
            this.txtTuika.TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
371 371
            this.txtTuika.TextChanged += new System.EventHandler(this.txtTuika_TextChanged);
372 372
            this.txtTuika.Leave += new System.EventHandler(this.txtTuika_Leave);
......
378 378
            this.txtHaki.MaxLength = 4;
379 379
            this.txtHaki.Name = "txtHaki";
380 380
            this.txtHaki.Size = new System.Drawing.Size(100, 23);
381
            this.txtHaki.TabIndex = 56;
381
            this.txtHaki.TabIndex = 12;
382 382
            this.txtHaki.TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
383 383
            this.txtHaki.TextChanged += new System.EventHandler(this.txtHaki_TextChanged);
384 384
            this.txtHaki.Leave += new System.EventHandler(this.txtHaki_Leave);
branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Material/MaterialReserveEntry/FrmMaterialReserveEntry.cs
812 812
        /// </summary>
813 813
        private bool DataEntry()
814 814
        {
815

  
815
            IOMaterialItem IoMim = new IOMaterialItem();
816 816
            IOMaterialRecordInfo IoMri = new IOMaterialRecordInfo();
817 817
            IOConstructionMaterialInfo IoCmi = new IOConstructionMaterialInfo();
818 818

  
819
            MaterialItemMaster MiMaster;
819 820
            MaterialInfo MiWork;
820 821
            ConstructionMaterialInfo CmiWork;
821 822
            MaterialRecordInfo MriWork;
......
833 834
                string strProcessdate = cmbProcessDate.SelectedValue.ToString() == "0" ?
834 835
                                        DateTime.Now.Date.ToString("yyyy/MM/dd") : cmbProcessDate.SelectedValue.ToString();
835 836

  
837
                IoMim.connect();
838
                IoMim.beginTran();
839

  
836 840
                IoMri.connect();
837 841
                IoMri.beginTran();
838 842

  
......
842 846
                foreach (DataGridViewRow r in dgvMaster.Rows)
843 847
                {
844 848
                    bool bProcessNoToday = false;
849

  
850
                    MiMaster = new MaterialItemMaster();
845 851
                    MiWork = new MaterialInfo();
846 852
                    CmiWork = new ConstructionMaterialInfo();
847 853
                    MriWork = new MaterialRecordInfo();
......
860 866
                    IoMri.ExecuteReader(sql, ref arData,false);
861 867
                    if (arData.Count != 0) bProcessNoToday = true;
862 868

  
869
                    // 資材品目マスタバージョンNo取得
870
                    string strMimSQL = IoMim.CreatePrimarykeyString(intMaterialItemCode);
871
                    List<MaterialItemMaster> MimList = new List<MaterialItemMaster>();
872
                    if (!IoMim.SelectAction(strMimSQL, ref MimList, false))
873
                    {
874
                        MessageBox.Show("資材品目マスタの取得に失敗しました。", "登録エラー", MessageBoxButtons.OK, MessageBoxIcon.Error);
875
                        return false;
876
                    }
877
                    MiMaster = MimList[0];
878

  
863 879
                    // 資材情報
864 880
                    string strSQL = m_IoMi.CreatePrimarykeyString(intMaterialItemCode);
865 881
                    List<MaterialInfo> MiList = new List<MaterialInfo>();
......
870 886
                    }
871 887

  
872 888
                    // 更新ロック
873
                    m_IoMi.rollback();
874
                    if (!m_IoMi.RowLockUpdate(intMaterialItemCode, false))
875
                    {
876
                        m_IoMi.RowLockShare(intMaterialItemCode, false);
877
                        MessageBox.Show("他のユーザで編集中のため、処理できません。", "登録エラー"
878
                        , MessageBoxButtons.OK, MessageBoxIcon.Error);
879
                        return false;
880
                    }
889
                    //m_IoMi.rollback();
890
                    //if (!m_IoMi.RowLockUpdate(intMaterialItemCode, false))
891
                    //{
892
                    //    m_IoMi.RowLockShare(intMaterialItemCode, false);
893
                    //    MessageBox.Show("他のユーザで編集中のため、処理できません。", "登録エラー"
894
                    //    , MessageBoxButtons.OK, MessageBoxIcon.Error);
895
                    //    return false;
896
                    //}
881 897
                    // 登録チェック②-2
882 898
                    if ((MiList[0].RentCount + CommonMotions.cnvInt(r.Cells[(int)DispColumn.MaterialCountBefore].Value)) < CommonMotions.cnvInt(r.Cells[(int)DispColumn.MaterialCount].Value))
883 899
                    {
884
                        m_IoMi.rollback();
885
                        m_IoMi.RowLockShare(intMaterialItemCode, false);
900
                        //m_IoMi.rollback();
901
                        //m_IoMi.RowLockShare(intMaterialItemCode, false);
886 902
                        MessageBox.Show("割当可能数を超えて、資材の予約できません。", "登録エラー"
887 903
                        , MessageBoxButtons.OK, MessageBoxIcon.Error);
888 904
                        return false;
......
903 919
                    // データ登録
904 920
                    if (!m_IoMi.UpdateAction(strSQL, MiWork, false))
905 921
                    {
906
                        m_IoMi.rollback();
907
                        m_IoMi.RowLockShare(intMaterialItemCode, false);
922
                        //m_IoMi.rollback();
923
                        //m_IoMi.RowLockShare(intMaterialItemCode, false);
908 924
                        MessageBox.Show("更新に失敗しました。", "登録エラー", MessageBoxButtons.OK, MessageBoxIcon.Error);
909 925
                        return false;
910 926
                    }
......
960 976
                        // データ登録
961 977
                        if (!IoCmi.InsertAction(CmiList, false))
962 978
                        {
963
                            m_IoMi.rollback();
964
                            m_IoMi.RowLockShare(intMaterialItemCode, false);
979
                            //m_IoMi.rollback();
980
                            //m_IoMi.RowLockShare(intMaterialItemCode, false);
965 981
                            IoCmi.rollback();
966 982
                            MessageBox.Show("更新に失敗しました。", "登録エラー", MessageBoxButtons.OK, MessageBoxIcon.Error);
967 983
                            return false;
......
974 990
                        strSQL = IoCmi.CreatePrimarykeyString(m_ConstructionCode, intMaterialItemCode);
975 991
                        if (!IoCmi.SelectAction(strSQL, ref CmiList, false))
976 992
                        {
977
                            m_IoMi.rollback();
978
                            m_IoMi.RowLockShare(intMaterialItemCode, false);
993
                            //m_IoMi.rollback();
994
                            //m_IoMi.RowLockShare(intMaterialItemCode, false);
979 995
                            MessageBox.Show("登録確認に失敗しました。", "登録エラー", MessageBoxButtons.OK, MessageBoxIcon.Error);
980 996
                            return false;
981 997
                        }
......
995 1011
                        }
996 1012

  
997 1013
                        // ロック
998
                        if (!IoCmi.RowLock(m_ConstructionCode, intMaterialItemCode, false))
999
                        {
1000
                            m_IoMi.rollback();
1001
                            m_IoMi.RowLockShare(intMaterialItemCode, false);
1002
                            MessageBox.Show("他のユーザで編集中のため、処理できません。", "登録エラー"
1003
                            , MessageBoxButtons.OK, MessageBoxIcon.Error);
1004
                            return false;
1005
                        }
1014
                        //if (!IoCmi.RowLock(m_ConstructionCode, intMaterialItemCode, false))
1015
                        //{
1016
                        //    m_IoMi.rollback();
1017
                        //    m_IoMi.RowLockShare(intMaterialItemCode, false);
1018
                        //    MessageBox.Show("他のユーザで編集中のため、処理できません。", "登録エラー"
1019
                        //    , MessageBoxButtons.OK, MessageBoxIcon.Error);
1020
                        //    return false;
1021
                        //}
1006 1022

  
1007 1023
                        if (CmiState == DataRowState.Modified)  // 更新
1008 1024
                        {
1009 1025
                            // データ更新
1010 1026
                            if (!IoCmi.UpdateAction(strSQL, CmiWork, false))
1011 1027
                            {
1012
                                m_IoMi.rollback();
1013
                                m_IoMi.RowLockShare(intMaterialItemCode, false);
1028
                                //m_IoMi.rollback();
1029
                                //m_IoMi.RowLockShare(intMaterialItemCode, false);
1014 1030
                                IoCmi.rollback();
1015 1031
                                MessageBox.Show("更新に失敗しました。", "登録エラー", MessageBoxButtons.OK, MessageBoxIcon.Error);
1016 1032
                                return false;
......
1021 1037
                            // データ更新
1022 1038
                            if (!IoCmi.DeleteAction(strSQL, false))
1023 1039
                            {
1024
                                m_IoMi.rollback();
1025
                                m_IoMi.RowLockShare(intMaterialItemCode, false);
1040
                                //m_IoMi.rollback();
1041
                                //m_IoMi.RowLockShare(intMaterialItemCode, false);
1026 1042
                                IoCmi.rollback();
1027 1043
                                MessageBox.Show("更新に失敗しました。", "登録エラー", MessageBoxButtons.OK, MessageBoxIcon.Error);
1028 1044
                                return false;
......
1052 1068
                        // データ登録
1053 1069
                        if (!IoMri.InsertAction(MriList, false))
1054 1070
                        {
1055
                            m_IoMi.rollback();
1056
                            m_IoMi.RowLockShare(intMaterialItemCode, false);
1071
                            //m_IoMi.rollback();
1072
                            //m_IoMi.RowLockShare(intMaterialItemCode, false);
1057 1073
                            IoCmi.rollback();
1058 1074
                            IoMri.rollback();
1059 1075
                            MessageBox.Show("更新に失敗しました。", "登録エラー", MessageBoxButtons.OK, MessageBoxIcon.Error);
......
1066 1082
                        strSQL += "and RecKind = 0";
1067 1083
                        if (!IoMri.SelectAction(strSQL, ref MriList, false))
1068 1084
                        {
1069
                            m_IoMi.rollback();
1070
                            m_IoMi.RowLockShare(intMaterialItemCode, false);
1085
                            //m_IoMi.rollback();
1086
                            //m_IoMi.RowLockShare(intMaterialItemCode, false);
1071 1087
                            IoCmi.rollback();
1072 1088
                            MessageBox.Show("登録確認に失敗しました。", "登録エラー", MessageBoxButtons.OK, MessageBoxIcon.Error);
1073 1089
                            return false;
1074 1090
                        }
1075 1091

  
1076 1092
                        // ロック
1077
                        if (!IoMri.RowLock(intMaterialItemCode, MriList[0].ProcessDate, MriList[0].SeqNo, false))
1078
                        {
1079
                            m_IoMi.rollback();
1080
                            m_IoMi.RowLockShare(intMaterialItemCode, false);
1081
                            IoCmi.rollback();
1082
                            MessageBox.Show("他のユーザで編集中のため、処理できません。", "登録エラー"
1083
                            , MessageBoxButtons.OK, MessageBoxIcon.Error);
1084
                            return false;
1085
                        }
1093
                        //if (!IoMri.RowLock(intMaterialItemCode, MriList[0].ProcessDate, MriList[0].SeqNo, false))
1094
                        //{
1095
                        //    m_IoMi.rollback();
1096
                        //    m_IoMi.RowLockShare(intMaterialItemCode, false);
1097
                        //    IoCmi.rollback();
1098
                        //    MessageBox.Show("他のユーザで編集中のため、処理できません。", "登録エラー"
1099
                        //    , MessageBoxButtons.OK, MessageBoxIcon.Error);
1100
                        //    return false;
1101
                        //}
1086 1102

  
1087 1103
                        if (MriState == DataRowState.Modified)  // 更新
1088 1104
                        {
1089 1105
                            // データ更新
1090 1106
                            if (!IoMri.UpdateAction(strSQL, MriWork, false))
1091 1107
                            {
1092
                                m_IoMi.rollback();
1093
                                m_IoMi.RowLockShare(intMaterialItemCode, false);
1108
                                //m_IoMi.rollback();
1109
                                //m_IoMi.RowLockShare(intMaterialItemCode, false);
1094 1110
                                IoCmi.rollback();
1095 1111
                                IoMri.rollback();
1096 1112
                                MessageBox.Show("更新に失敗しました。", "登録エラー", MessageBoxButtons.OK, MessageBoxIcon.Error);
......
1102 1118
                            // データ更新
1103 1119
                            if (!IoMri.DeleteAction(strSQL, false))
1104 1120
                            {
1105
                                m_IoMi.rollback();
1106
                                m_IoMi.RowLockShare(intMaterialItemCode, false);
1121
                                //m_IoMi.rollback();
1122
                                //m_IoMi.RowLockShare(intMaterialItemCode, false);
1107 1123
                                IoCmi.rollback();
1108 1124
                                IoMri.rollback();
1109 1125
                                MessageBox.Show("更新に失敗しました。", "登録エラー", MessageBoxButtons.OK, MessageBoxIcon.Error);
......
1112 1128
                        }
1113 1129
                    }
1114 1130

  
1131
                    // 資材品目マスタバージョンNo更新
1132
                    strMimSQL += string.Format(" And VERSIONNO = {0}", MiMaster.VersionNo.ToString());
1133
                    if (!IoMim.UpdateVersionAction(strMimSQL, MiMaster, false))
1134
                    {
1135
                        MessageBox.Show("他のユーザで更新されています。", "登録エラー", MessageBoxButtons.OK, MessageBoxIcon.Error);
1136
                        m_IoMi.rollback();
1137
                        IoCmi.rollback();
1138
                        IoMri.rollback();
1139
                        IoMim.rollback();
1140
                        return false;
1141
                    }
1115 1142
                }
1116 1143

  
1117 1144
                m_IoMi.commit();
1118 1145
                IoCmi.commit();
1119 1146
                IoMri.commit();
1147
                IoMim.commit();
1120 1148

  
1121 1149
                //LoadComboBox();
1122 1150
            }
......
1126 1154
            }
1127 1155
            finally
1128 1156
            {
1129
                IoMri.close();
1130
                IoMri = null;
1131
                IoCmi.close();
1132
                IoCmi = null;
1157
                if (IoCmi != null)
1158
                {
1159
                    IoCmi.close();
1160
                    IoCmi = null;
1161
                }
1162
                if (IoMri != null)
1163
                {
1164
                    IoMri.close();
1165
                    IoMri = null;
1166
                }
1167
                if (IoMim != null)
1168
                {
1169
                    IoMim.close();
1170
                    IoMim = null;
1171
                }
1133 1172
            }
1134 1173
            return true;
1135 1174
        }
......
1197 1236
                    icnt++;
1198 1237

  
1199 1238
                    // 共有ロック
1200
                    if (!m_IoMi.RowLockShare(CommonMotions.cnvInt(work[(int)DataColumn.MaterialItemCode]), false))
1201
                    {
1202
                        return false;
1203
                    }
1239
                    //if (!m_IoMi.RowLockShare(CommonMotions.cnvInt(work[(int)DataColumn.MaterialItemCode]), false))
1240
                    //{
1241
                    //    return false;
1242
                    //}
1204 1243

  
1205 1244
                }
1206 1245

  
......
1341 1380
                            dgvMaster.Rows[setRow].Cells[(int)DispColumn.RentCount].Value = 0;
1342 1381
                        }
1343 1382
                        // 共有ロック
1344
                        if (!m_IoMi.RowLockShare(item.MaterialItemCode, false))
1345
                        {
1346
                            return;
1347
                        }
1383
                        //if (!m_IoMi.RowLockShare(item.MaterialItemCode, false))
1384
                        //{
1385
                        //    return;
1386
                        //}
1348 1387
                    }
1349 1388

  
1350 1389
                    cnt++;
branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Material/MaterialReserveEntry/FrmMaterialReserveEntry.designer.cs
78 78
            this.label1.Location = new System.Drawing.Point(455, 8);
79 79
            this.label1.Name = "label1";
80 80
            this.label1.Size = new System.Drawing.Size(292, 34);
81
            this.label1.TabIndex = 6;
81
            this.label1.TabIndex = 0;
82 82
            this.label1.Text = "資 材 貸 出";
83 83
            this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
84 84
            // 
......
90 90
            this.label2.Location = new System.Drawing.Point(8, 48);
91 91
            this.label2.Name = "label2";
92 92
            this.label2.Size = new System.Drawing.Size(86, 24);
93
            this.label2.TabIndex = 23;
93
            this.label2.TabIndex = 1;
94 94
            this.label2.Text = "工事名称";
95 95
            this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
96 96
            // 
......
102 102
            this.label3.Location = new System.Drawing.Point(8, 77);
103 103
            this.label3.Name = "label3";
104 104
            this.label3.Size = new System.Drawing.Size(86, 24);
105
            this.label3.TabIndex = 26;
105
            this.label3.TabIndex = 3;
106 106
            this.label3.Text = "貸出日";
107 107
            this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
108 108
            // 
......
114 114
            this.label4.Location = new System.Drawing.Point(271, 78);
115 115
            this.label4.Name = "label4";
116 116
            this.label4.Size = new System.Drawing.Size(86, 24);
117
            this.label4.TabIndex = 28;
117
            this.label4.TabIndex = 5;
118 118
            this.label4.Text = "担当";
119 119
            this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
120 120
            // 
......
126 126
            this.lblDETAILSTRING.Location = new System.Drawing.Point(100, 48);
127 127
            this.lblDETAILSTRING.Name = "lblDETAILSTRING";
128 128
            this.lblDETAILSTRING.Size = new System.Drawing.Size(919, 24);
129
            this.lblDETAILSTRING.TabIndex = 29;
129
            this.lblDETAILSTRING.TabIndex = 2;
130 130
            this.lblDETAILSTRING.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
131 131
            // 
132 132
            // lblPerson
......
137 137
            this.lblPerson.Location = new System.Drawing.Point(363, 78);
138 138
            this.lblPerson.Name = "lblPerson";
139 139
            this.lblPerson.Size = new System.Drawing.Size(140, 24);
140
            this.lblPerson.TabIndex = 31;
140
            this.lblPerson.TabIndex = 6;
141 141
            this.lblPerson.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
142 142
            // 
143 143
            // btnEnd
......
147 147
            this.btnEnd.Location = new System.Drawing.Point(1039, 390);
148 148
            this.btnEnd.Name = "btnEnd";
149 149
            this.btnEnd.Size = new System.Drawing.Size(120, 30);
150
            this.btnEnd.TabIndex = 4;
150
            this.btnEnd.TabIndex = 10;
151 151
            this.btnEnd.Text = "終 了";
152 152
            this.btnEnd.UseVisualStyleBackColor = false;
153 153
            this.btnEnd.Click += new System.EventHandler(this.btnEnd_Click);
......
159 159
            this.btnDataEntry.Location = new System.Drawing.Point(913, 390);
160 160
            this.btnDataEntry.Name = "btnDataEntry";
161 161
            this.btnDataEntry.Size = new System.Drawing.Size(120, 30);
162
            this.btnDataEntry.TabIndex = 33;
162
            this.btnDataEntry.TabIndex = 9;
163 163
            this.btnDataEntry.Text = "登 録";
164 164
            this.btnDataEntry.UseVisualStyleBackColor = false;
165 165
            this.btnDataEntry.Click += new System.EventHandler(this.btnDataEntry_Click);
......
171 171
            this.button6.Location = new System.Drawing.Point(8, 390);
172 172
            this.button6.Name = "button6";
173 173
            this.button6.Size = new System.Drawing.Size(120, 30);
174
            this.button6.TabIndex = 37;
174
            this.button6.TabIndex = 8;
175 175
            this.button6.Text = "その他画面へ";
176 176
            this.button6.UseVisualStyleBackColor = false;
177 177
            this.button6.Click += new System.EventHandler(this.btnOtherProc_Click);
......
186 186
            this.groupBoxEx1.Location = new System.Drawing.Point(8, 107);
187 187
            this.groupBoxEx1.Name = "groupBoxEx1";
188 188
            this.groupBoxEx1.Size = new System.Drawing.Size(1150, 277);
189
            this.groupBoxEx1.TabIndex = 39;
189
            this.groupBoxEx1.TabIndex = 7;
190 190
            this.groupBoxEx1.TabStop = false;
191 191
            // 
192 192
            // btnMaterialHistory
......
196 196
            this.btnMaterialHistory.Location = new System.Drawing.Point(6, 241);
197 197
            this.btnMaterialHistory.Name = "btnMaterialHistory";
198 198
            this.btnMaterialHistory.Size = new System.Drawing.Size(120, 30);
199
            this.btnMaterialHistory.TabIndex = 38;
199
            this.btnMaterialHistory.TabIndex = 1;
200 200
            this.btnMaterialHistory.Text = "資材履歴";
201 201
            this.btnMaterialHistory.UseVisualStyleBackColor = false;
202 202
            this.btnMaterialHistory.Click += new System.EventHandler(this.btnMaterialHistory_Click);
......
208 208
            this.btnMaterialRelease.Location = new System.Drawing.Point(895, 241);
209 209
            this.btnMaterialRelease.Name = "btnMaterialRelease";
210 210
            this.btnMaterialRelease.Size = new System.Drawing.Size(120, 30);
211
            this.btnMaterialRelease.TabIndex = 36;
211
            this.btnMaterialRelease.TabIndex = 2;
212 212
            this.btnMaterialRelease.Text = "資材解除";
213 213
            this.btnMaterialRelease.UseVisualStyleBackColor = false;
214 214
            this.btnMaterialRelease.Click += new System.EventHandler(this.btnMaterialRelease_Click);
......
220 220
            this.btnMaterialSelect.Location = new System.Drawing.Point(1023, 241);
221 221
            this.btnMaterialSelect.Name = "btnMaterialSelect";
222 222
            this.btnMaterialSelect.Size = new System.Drawing.Size(120, 30);
223
            this.btnMaterialSelect.TabIndex = 35;
223
            this.btnMaterialSelect.TabIndex = 3;
224 224
            this.btnMaterialSelect.Text = "資材選択";
225 225
            this.btnMaterialSelect.UseVisualStyleBackColor = false;
226 226
            this.btnMaterialSelect.Click += new System.EventHandler(this.btnMaterialSelect_Click);
......
267 267
            this.dgvMaster.RowHeadersDefaultCellStyle = dataGridViewCellStyle8;
268 268
            this.dgvMaster.RowHeadersWidth = 24;
269 269
            this.dgvMaster.Size = new System.Drawing.Size(1137, 229);
270
            this.dgvMaster.TabIndex = 31;
270
            this.dgvMaster.TabIndex = 0;
271 271
            this.dgvMaster.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvMaster_CellClick);
272 272
            this.dgvMaster.CellValueChanged += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvMaster_CellValueChanged);
273 273
            // 
......
398 398
            this.cmbProcessDate.Location = new System.Drawing.Point(100, 78);
399 399
            this.cmbProcessDate.Name = "cmbProcessDate";
400 400
            this.cmbProcessDate.Size = new System.Drawing.Size(165, 24);
401
            this.cmbProcessDate.TabIndex = 34;
401
            this.cmbProcessDate.TabIndex = 4;
402 402
            this.cmbProcessDate.SelectedIndexChanged += new System.EventHandler(this.cmbProcessDate_SelectedIndexChanged);
403 403
            // 
404 404
            // FrmMaterialReserveEntry
branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Material/MaterialReturnEntry/FrmMaterialReturnEntry.cs
593 593
        /// </summary>
594 594
        private void DataEntry()
595 595
        {
596
            IOMaterialItem IoMim = new IOMaterialItem();
596 597
            IOMaterialInfo IoMi = new IOMaterialInfo();
597 598
            IOConstructionMaterialInfo IoCmi = new IOConstructionMaterialInfo();
598 599
            IOMaterialRecordInfo IoMri = new IOMaterialRecordInfo();
599 600

  
601
            MaterialItemMaster MiMaster;
600 602
            MaterialInfo MiWork;
601 603
            ConstructionMaterialInfo CmiWork;
602 604
            MaterialRecordInfo MriWork;
......
607 609
            try
608 610
            {
609 611

  
612
                IoMim.connect();
613
                IoMim.beginTran();
614

  
610 615
                IoMi.connect();
611 616
                IoMi.beginTran();
612 617

  
......
618 623

  
619 624
                foreach (DataGridViewRow r in dgvMaster.Rows)
620 625
                {
626
                    MiMaster = new MaterialItemMaster();
627

  
621 628
                    int intMaterialItemCode = CommonMotions.cnvInt(r.Cells[(int)DispColumn.MaterialItemCode].Value);
622 629
                    int intRentCount = CommonMotions.cnvInt(r.Cells[(int)DispColumn.RentCount].Value);
623 630
                    int intRepayCount= CommonMotions.cnvInt(r.Cells[(int)DispColumn.RepayCount].Value);
624 631
                    int intMaterialCount= CommonMotions.cnvInt(r.Cells[(int)DispColumn.MaterialCount].Value);
625 632
                    int intMaterialCountBefore = CommonMotions.cnvInt(r.Cells[(int)DispColumn.MaterialCountBefore].Value);
626 633

  
634
                    // 資材品目マスタバージョンNo取得
635
                    string strMimSQL = IoMim.CreatePrimarykeyString(intMaterialItemCode);
636
                    List<MaterialItemMaster> MimList = new List<MaterialItemMaster>();
637
                    if (!IoMim.SelectAction(strMimSQL, ref MimList, false))
638
                    {
639
                        MessageBox.Show("資材品目マスタの取得に失敗しました。", "登録エラー", MessageBoxButtons.OK, MessageBoxIcon.Error);
640
                        return;
641
                    }
642
                    MiMaster = MimList[0];
643

  
627 644
                    // 資材情報------------------------------------------------------------------------
628 645
                    MiWork = new MaterialInfo();
629 646
                    string strSQL = IoMi.CreatePrimarykeyString(intMaterialItemCode);
......
647 664
                    MiWork.RentCount = MiList[0].RentCount + (intMaterialCount - intMaterialCountBefore);
648 665

  
649 666
                    // 更新ロック
650
                    if (!IoMi.RowLockUpdate(intMaterialItemCode, false))
651
                    {
652
                        MessageBox.Show("他のユーザで編集中のため、処理できません。", "登録エラー"
653
                        , MessageBoxButtons.OK, MessageBoxIcon.Error);
654
                        return;
655
                    }
667
                    //if (!IoMi.RowLockUpdate(intMaterialItemCode, false))
668
                    //{
669
                    //    MessageBox.Show("他のユーザで編集中のため、処理できません。", "登録エラー"
670
                    //    , MessageBoxButtons.OK, MessageBoxIcon.Error);
671
                    //    return;
672
                    //}
656 673

  
657 674
                    // データ登録
658 675
                    if (!IoMi.UpdateAction(strSQL, MiWork, false))
......
685 702
                    }
686 703

  
687 704
                    // ロック
688
                    if (!IoCmi.RowLock(m_ConstructionCode, intMaterialItemCode, false))
689
                    {
690
                        IoMi.rollback();
691
                        MessageBox.Show("他のユーザで編集中のため、処理できません。", "登録エラー"
692
                        , MessageBoxButtons.OK, MessageBoxIcon.Error);
693
                        return;
694
                    }
705
                    //if (!IoCmi.RowLock(m_ConstructionCode, intMaterialItemCode, false))
706
                    //{
707
                    //    IoMi.rollback();
708
                    //    MessageBox.Show("他のユーザで編集中のため、処理できません。", "登録エラー"
709
                    //    , MessageBoxButtons.OK, MessageBoxIcon.Error);
710
                    //    return;
711
                    //}
695 712

  
696 713
                    // データ更新
697 714
                    if (!IoCmi.UpdateAction(strSQL, CmiWork, false))
......
744 761
                    else      //  更新
745 762
                    {
746 763
                        // ロック
747
                        if (!IoMri.RowLock(intMaterialItemCode, MriList[0].ProcessDate, MriList[0].SeqNo, false))
748
                        {
749
                            IoMi.rollback();
750
                            IoCmi.rollback();
751
                            MessageBox.Show("他のユーザで編集中のため、処理できません。", "登録エラー"
752
                            , MessageBoxButtons.OK, MessageBoxIcon.Error);
753
                            return;
754
                        }
764
                        //if (!IoMri.RowLock(intMaterialItemCode, MriList[0].ProcessDate, MriList[0].SeqNo, false))
765
                        //{
766
                        //    IoMi.rollback();
767
                        //    IoCmi.rollback();
768
                        //    MessageBox.Show("他のユーザで編集中のため、処理できません。", "登録エラー"
769
                        //    , MessageBoxButtons.OK, MessageBoxIcon.Error);
770
                        //    return;
771
                        //}
755 772

  
756 773
                        // データ更新
757 774
                        strSQL = IoMri.CreatePrimarykeyString(intMaterialItemCode, DateTime.Now.Date);
......
767 784

  
768 785
                    }
769 786

  
787
                    // 資材品目マスタバージョンNo更新
788
                    strMimSQL += string.Format(" And VERSIONNO = {0}", MiMaster.VersionNo.ToString());
789
                    if (IoMim.UpdateVersionAction(strMimSQL, MiMaster, false))
790
                    {
791
                        MessageBox.Show("他のユーザで更新されています。", "登録エラー", MessageBoxButtons.OK, MessageBoxIcon.Error);
792
                        IoCmi.rollback();
793
                        IoMri.rollback();
794
                        IoMim.rollback();
795
                        return;
796
                    }
770 797
                }
771 798

  
772 799
                IoMi.commit();
773 800
                IoCmi.commit();
774 801
                IoMri.commit();
802
                IoMim.commit();
775 803
            }
776 804
            catch (System.Exception ex)
777 805
            {
......
779 807
            }
780 808
            finally
781 809
            {
782
                IoMi.close();
783
                IoMi = null;
784

  
785
                IoCmi.close();
786
                IoCmi = null;
787

  
788
                IoMri.close();
789
                IoMri = null;
810
                if (IoMi != null)
811
                {
812
                    IoMi.close();
813
                    IoMi = null;
814
                }
815
                if (IoCmi != null)
816
                {
817
                    IoCmi.close();
818
                    IoCmi = null;
819
                }
820
                if (IoMri != null)
821
                {
822
                    IoMri.close();
823
                    IoMri = null;
824
                }
825
                if (IoMim != null)
826
                {
827
                    IoMim.close();
828
                    IoMim = null;
829
                }
790 830
            }
791 831
        }
792 832

  
branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Material/MaterialReturnEntry/FrmMaterialReturnEntry.designer.cs
75 75
            this.label1.Location = new System.Drawing.Point(455, 8);
76 76
            this.label1.Name = "label1";
77 77
            this.label1.Size = new System.Drawing.Size(292, 34);
78
            this.label1.TabIndex = 6;
78
            this.label1.TabIndex = 0;
79 79
            this.label1.Text = "資 材 返 却";
80 80
            this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
81 81
            // 
......
87 87
            this.label2.Location = new System.Drawing.Point(8, 48);
88 88
            this.label2.Name = "label2";
89 89
            this.label2.Size = new System.Drawing.Size(86, 24);
90
            this.label2.TabIndex = 23;
90
            this.label2.TabIndex = 1;
91 91
            this.label2.Text = "工事名称";
92 92
            this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
93 93
            // 
......
99 99
            this.label3.Location = new System.Drawing.Point(8, 77);
100 100
            this.label3.Name = "label3";
101 101
            this.label3.Size = new System.Drawing.Size(86, 24);
102
            this.label3.TabIndex = 26;
102
            this.label3.TabIndex = 3;
103 103
            this.label3.Text = "返却日";
104 104
            this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
105 105
            // 
......
111 111
            this.label4.Location = new System.Drawing.Point(271, 77);
112 112
            this.label4.Name = "label4";
113 113
            this.label4.Size = new System.Drawing.Size(86, 24);
114
            this.label4.TabIndex = 28;
114
            this.label4.TabIndex = 5;
115 115
            this.label4.Text = "担当";
116 116
            this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
117 117
            // 
......
123 123
            this.lblDETAILSTRING.Location = new System.Drawing.Point(100, 48);
124 124
            this.lblDETAILSTRING.Name = "lblDETAILSTRING";
125 125
            this.lblDETAILSTRING.Size = new System.Drawing.Size(919, 24);
126
            this.lblDETAILSTRING.TabIndex = 29;
126
            this.lblDETAILSTRING.TabIndex = 2;
127 127
            this.lblDETAILSTRING.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
128 128
            // 
129 129
            // lblPerson
......
134 134
            this.lblPerson.Location = new System.Drawing.Point(363, 77);
135 135
            this.lblPerson.Name = "lblPerson";
136 136
            this.lblPerson.Size = new System.Drawing.Size(140, 24);
137
            this.lblPerson.TabIndex = 31;
137
            this.lblPerson.TabIndex = 6;
138 138
            this.lblPerson.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
139 139
            // 
140 140
            // btnEnd
......
144 144
            this.btnEnd.Location = new System.Drawing.Point(1032, 386);
145 145
            this.btnEnd.Name = "btnEnd";
146 146
            this.btnEnd.Size = new System.Drawing.Size(120, 30);
147
            this.btnEnd.TabIndex = 4;
147
            this.btnEnd.TabIndex = 10;
148 148
            this.btnEnd.Text = "終 了";
149 149
            this.btnEnd.UseVisualStyleBackColor = false;
150 150
            this.btnEnd.Click += new System.EventHandler(this.btnEnd_Click);
......
156 156
            this.btnDataEntry.Location = new System.Drawing.Point(906, 386);
157 157
            this.btnDataEntry.Name = "btnDataEntry";
158 158
            this.btnDataEntry.Size = new System.Drawing.Size(120, 30);
159
            this.btnDataEntry.TabIndex = 33;
159
            this.btnDataEntry.TabIndex = 9;
160 160
            this.btnDataEntry.Text = "登 録";
161 161
            this.btnDataEntry.UseVisualStyleBackColor = false;
162 162
            this.btnDataEntry.Click += new System.EventHandler(this.btnDataEntry_Click);
......
169 169
            this.lblRepaydate.Location = new System.Drawing.Point(100, 77);
170 170
            this.lblRepaydate.Name = "lblRepaydate";
171 171
            this.lblRepaydate.Size = new System.Drawing.Size(165, 24);
172
            this.lblRepaydate.TabIndex = 34;
172
            this.lblRepaydate.TabIndex = 4;
173 173
            this.lblRepaydate.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
174 174
            // 
175 175
            // button3
......
179 179
            this.button3.Location = new System.Drawing.Point(14, 386);
180 180
            this.button3.Name = "button3";
181 181
            this.button3.Size = new System.Drawing.Size(120, 30);
182
            this.button3.TabIndex = 37;
182
            this.button3.TabIndex = 8;
183 183
            this.button3.Text = "その他画面へ";
184 184
            this.button3.UseVisualStyleBackColor = false;
185 185
            this.button3.Click += new System.EventHandler(this.btnOtherProc_Click);
......
192 192
            this.groupBoxEx1.Location = new System.Drawing.Point(8, 107);
193 193
            this.groupBoxEx1.Name = "groupBoxEx1";
194 194
            this.groupBoxEx1.Size = new System.Drawing.Size(1150, 273);
195
            this.groupBoxEx1.TabIndex = 38;
195
            this.groupBoxEx1.TabIndex = 7;
196 196
            this.groupBoxEx1.TabStop = false;
197 197
            // 
198 198
            // tglAllReturn
......
205 205
            this.tglAllReturn.Margin = new System.Windows.Forms.Padding(2);
206 206
            this.tglAllReturn.Name = "tglAllReturn";
207 207
            this.tglAllReturn.Size = new System.Drawing.Size(188, 26);
208
            this.tglAllReturn.TabIndex = 37;
208
            this.tglAllReturn.TabIndex = 1;
209 209
            this.tglAllReturn.Text = "資材の返却を完了する";
210 210
            this.tglAllReturn.UseVisualStyleBackColor = true;
211 211
            // 
......
251 251
            this.dgvMaster.RowHeadersWidth = 24;
252 252
            this.dgvMaster.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.CellSelect;
253 253
            this.dgvMaster.Size = new System.Drawing.Size(1137, 229);
254
            this.dgvMaster.TabIndex = 31;
254
            this.dgvMaster.TabIndex = 0;
255 255
            this.dgvMaster.CellValueChanged += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvMaster_CellValueChanged);
256 256
            // 
257 257
            // Column1

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