• R/O
  • SSH
  • HTTPS

mlapplication: Commit


Commit MetaInfo

Revision55 (tree)
Time2017-01-16 19:50:03
Authoryukio_miura

Log Message

(empty log message)

Change Summary

Incremental Difference

--- trunk/ML.DBAccess/DataBase/01.SQL/02 Trigger/_bat.sql (revision 54)
+++ trunk/ML.DBAccess/DataBase/01.SQL/02 Trigger/_bat.sql (revision 55)
@@ -9,4 +9,3 @@
99 @Y140
1010 @Y141
1111 @Z131
12-
\ No newline at end of file
--- trunk/MLApp.TRN9000/TRN9110.Designer.vb (revision 54)
+++ trunk/MLApp.TRN9000/TRN9110.Designer.vb (revision 55)
@@ -24,6 +24,7 @@
2424 Private Sub InitializeComponent()
2525 Me.TabControl1 = New System.Windows.Forms.TabControl()
2626 Me.TabPage1 = New System.Windows.Forms.TabPage()
27+ Me.lblDispMode = New ML.Controls.uc6Label()
2728 Me.Uc6GroupBox1 = New ML.Controls.uc6GroupBox()
2829 Me.dteC110_STARTDT4 = New ML.Controls.uc6Date()
2930 Me.Uc6Label20 = New ML.Controls.uc6Label()
@@ -66,7 +67,6 @@
6667 Me.Uc6Label2 = New ML.Controls.uc6Label()
6768 Me.Uc6Label1 = New ML.Controls.uc6Label()
6869 Me.Uc6Label4 = New ML.Controls.uc6Label()
69- Me.lblDispMode = New ML.Controls.uc6Label()
7070 Me.MenuBtnPanel.SuspendLayout()
7171 Me.TabControl1.SuspendLayout()
7272 Me.TabPage1.SuspendLayout()
@@ -183,6 +183,17 @@
183183 Me.TabPage1.Text = "基本設定"
184184 Me.TabPage1.UseVisualStyleBackColor = True
185185 '
186+ 'lblDispMode
187+ '
188+ Me.lblDispMode.BackColor = System.Drawing.Color.White
189+ Me.lblDispMode.ForeColor = System.Drawing.Color.Black
190+ Me.lblDispMode.Location = New System.Drawing.Point(180, 17)
191+ Me.lblDispMode.Name = "lblDispMode"
192+ Me.lblDispMode.Size = New System.Drawing.Size(69, 20)
193+ Me.lblDispMode.TabIndex = 242
194+ Me.lblDispMode.Text = "画面モード"
195+ Me.lblDispMode.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
196+ '
186197 'Uc6GroupBox1
187198 '
188199 Me.Uc6GroupBox1.Controls.Add(Me.dteC110_STARTDT4)
@@ -211,7 +222,7 @@
211222 Me.dteC110_STARTDT4.Name = "dteC110_STARTDT4"
212223 Me.dteC110_STARTDT4.Size = New System.Drawing.Size(112, 20)
213224 Me.dteC110_STARTDT4.TabIndex = 133
214- Me.dteC110_STARTDT4.Value = New Date(2017, 1, 13, 0, 0, 0, 0)
225+ Me.dteC110_STARTDT4.Value = New Date(2017, 1, 16, 0, 0, 0, 0)
215226 '
216227 'Uc6Label20
217228 '
@@ -234,7 +245,7 @@
234245 Me.dteC110_STARTDT3.Name = "dteC110_STARTDT3"
235246 Me.dteC110_STARTDT3.Size = New System.Drawing.Size(112, 20)
236247 Me.dteC110_STARTDT3.TabIndex = 132
237- Me.dteC110_STARTDT3.Value = New Date(2017, 1, 13, 0, 0, 0, 0)
248+ Me.dteC110_STARTDT3.Value = New Date(2017, 1, 16, 0, 0, 0, 0)
238249 '
239250 'Uc6Label19
240251 '
@@ -257,7 +268,7 @@
257268 Me.dteC110_STARTDT2.Name = "dteC110_STARTDT2"
258269 Me.dteC110_STARTDT2.Size = New System.Drawing.Size(112, 20)
259270 Me.dteC110_STARTDT2.TabIndex = 131
260- Me.dteC110_STARTDT2.Value = New Date(2017, 1, 13, 0, 0, 0, 0)
271+ Me.dteC110_STARTDT2.Value = New Date(2017, 1, 16, 0, 0, 0, 0)
261272 '
262273 'Uc6Label18
263274 '
@@ -280,7 +291,7 @@
280291 Me.dteC110_STARTDT1.Name = "dteC110_STARTDT1"
281292 Me.dteC110_STARTDT1.Size = New System.Drawing.Size(112, 20)
282293 Me.dteC110_STARTDT1.TabIndex = 130
283- Me.dteC110_STARTDT1.Value = New Date(2017, 1, 13, 0, 0, 0, 0)
294+ Me.dteC110_STARTDT1.Value = New Date(2017, 1, 16, 0, 0, 0, 0)
284295 '
285296 'Uc6Label17
286297 '
@@ -329,7 +340,7 @@
329340 Me.dteC110_OWDT1.Name = "dteC110_OWDT1"
330341 Me.dteC110_OWDT1.Size = New System.Drawing.Size(86, 20)
331342 Me.dteC110_OWDT1.TabIndex = 21
332- Me.dteC110_OWDT1.Value = New Date(2017, 1, 13, 0, 0, 0, 0)
343+ Me.dteC110_OWDT1.Value = New Date(2017, 1, 16, 0, 0, 0, 0)
333344 '
334345 'dteC110_KADT1
335346 '
@@ -341,7 +352,7 @@
341352 Me.dteC110_KADT1.Name = "dteC110_KADT1"
342353 Me.dteC110_KADT1.Size = New System.Drawing.Size(86, 20)
343354 Me.dteC110_KADT1.TabIndex = 20
344- Me.dteC110_KADT1.Value = New Date(2017, 1, 13, 0, 0, 0, 0)
355+ Me.dteC110_KADT1.Value = New Date(2017, 1, 16, 0, 0, 0, 0)
345356 '
346357 'txtC110_NAME1
347358 '
@@ -440,7 +451,7 @@
440451 Me.dteC110_SMDT2.Name = "dteC110_SMDT2"
441452 Me.dteC110_SMDT2.Size = New System.Drawing.Size(86, 20)
442453 Me.dteC110_SMDT2.TabIndex = 121
443- Me.dteC110_SMDT2.Value = New Date(2017, 1, 13, 0, 0, 0, 0)
454+ Me.dteC110_SMDT2.Value = New Date(2017, 1, 16, 0, 0, 0, 0)
444455 '
445456 'Uc6Label16
446457 '
@@ -496,9 +507,9 @@
496507 Me.numC110_SIME3.PermitChars = New Char(-1) {}
497508 Me.numC110_SIME3.Size = New System.Drawing.Size(37, 20)
498509 Me.numC110_SIME3.TabIndex = 120
499- Me.numC110_SIME3.Text = "00"
500510 Me.numC110_SIME3.TextAlign = System.Windows.Forms.HorizontalAlignment.Center
501511 Me.numC110_SIME3.Value = New Decimal(New Integer() {0, 0, 0, 0})
512+ Me.numC110_SIME3.ZeroIsSpace = True
502513 Me.numC110_SIME3.ZeroPadding = True
503514 '
504515 'numC110_SIME2
@@ -511,9 +522,9 @@
511522 Me.numC110_SIME2.PermitChars = New Char(-1) {}
512523 Me.numC110_SIME2.Size = New System.Drawing.Size(37, 20)
513524 Me.numC110_SIME2.TabIndex = 110
514- Me.numC110_SIME2.Text = "00"
515525 Me.numC110_SIME2.TextAlign = System.Windows.Forms.HorizontalAlignment.Center
516526 Me.numC110_SIME2.Value = New Decimal(New Integer() {0, 0, 0, 0})
527+ Me.numC110_SIME2.ZeroIsSpace = True
517528 Me.numC110_SIME2.ZeroPadding = True
518529 '
519530 'numC110_SIME1
@@ -526,9 +537,9 @@
526537 Me.numC110_SIME1.PermitChars = New Char(-1) {}
527538 Me.numC110_SIME1.Size = New System.Drawing.Size(37, 20)
528539 Me.numC110_SIME1.TabIndex = 100
529- Me.numC110_SIME1.Text = "00"
530540 Me.numC110_SIME1.TextAlign = System.Windows.Forms.HorizontalAlignment.Center
531541 Me.numC110_SIME1.Value = New Decimal(New Integer() {0, 0, 0, 0})
542+ Me.numC110_SIME1.ZeroIsSpace = True
532543 Me.numC110_SIME1.ZeroPadding = True
533544 '
534545 'dteC110_SMDT1
@@ -541,7 +552,7 @@
541552 Me.dteC110_SMDT1.Name = "dteC110_SMDT1"
542553 Me.dteC110_SMDT1.Size = New System.Drawing.Size(86, 20)
543554 Me.dteC110_SMDT1.TabIndex = 111
544- Me.dteC110_SMDT1.Value = New Date(2017, 1, 13, 0, 0, 0, 0)
555+ Me.dteC110_SMDT1.Value = New Date(2017, 1, 16, 0, 0, 0, 0)
545556 '
546557 'Uc6Label51
547558 '
@@ -686,17 +697,6 @@
686697 Me.Uc6Label4.Text = "当期年度"
687698 Me.Uc6Label4.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
688699 '
689- 'lblDispMode
690- '
691- Me.lblDispMode.BackColor = System.Drawing.Color.White
692- Me.lblDispMode.ForeColor = System.Drawing.Color.Black
693- Me.lblDispMode.Location = New System.Drawing.Point(180, 17)
694- Me.lblDispMode.Name = "lblDispMode"
695- Me.lblDispMode.Size = New System.Drawing.Size(69, 20)
696- Me.lblDispMode.TabIndex = 242
697- Me.lblDispMode.Text = "画面モード"
698- Me.lblDispMode.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
699- '
700700 'TRN9110
701701 '
702702 Me.AutoScaleDimensions = New System.Drawing.SizeF(6!, 12!)
--- trunk/MLApp.TRN9000/TRN9110.vb (revision 54)
+++ trunk/MLApp.TRN9000/TRN9110.vb (revision 55)
@@ -11,12 +11,15 @@
1111 ''' </history>
1212 Public Class TRN9110
1313
14+ ''' <summary>ログオン情報クラス</summary>
15+ Private m_LInfo As New MLApp.TRNLib.LoginInfo
16+
1417 ''' <summary>フォームロード時イベント</summary>
1518 Private Sub TRN9110_Load(sender As Object, e As System.EventArgs) Handles Me.Load
1619
1720 Try
18- '' C110 - 読込
19- Me.LoadC110()
21+ '' 画面初期化処理
22+ Me.InitDisp()
2023
2124 '' 入力項目にイベントハンドラを追加する
2225 Me.AddHandlerInputControls()
@@ -41,6 +44,60 @@
4144
4245 End Sub
4346
47+ ''' <summary>登録ボタンクリック時イベント</summary>
48+ Protected Overrides Sub cmdF1_Click(sender As Object, e As System.EventArgs)
49+ Try
50+ '' 書込前チェック
51+ If Me.CheckBeforeProc = False Then
52+ Exit Sub
53+ End If
54+
55+ '' C110-書込処理
56+ If Me.UpdateC110 = False Then
57+
58+ '' メッセージ表示
59+ Me.Messenger.ErrorOKOnly.Show( _
60+ ML.Common.Message.Resource.E.MSG_E_0006, _
61+ "更新失敗", _
62+ "機能設定")
63+
64+ Exit Sub
65+
66+ Else
67+
68+ '' メッセージ表示
69+ Me.Messenger.InfoOKOnly.Show( _
70+ ML.Common.Message.Resource.I.MSG_I_0001, _
71+ "登録完了", _
72+ "登録処理")
73+
74+ End If
75+
76+ '' 機能設定読込
77+ Me.LoadC110()
78+
79+ '' 元に戻す
80+ Me.InitDisp()
81+
82+ Catch ex As Exception
83+
84+ '' エラーログを出力する
85+ Me.Logger.WriteErrorLog(ex.Message)
86+
87+ '' エラーメッセージを表示する
88+ Me.m_messenGer.ErrorOKOnly.Show(ex.Message)
89+
90+ End Try
91+ End Sub
92+
93+ ''' <summary>元に戻すボタンクリック時イベント</summary>
94+ Protected Overrides Sub cmdF3_Click(sender As Object, e As System.EventArgs)
95+
96+ '' 画面初期化処理
97+ Me.InitDisp()
98+
99+ End Sub
100+
44101 ''' <summary>入力コントロールイベントハンドラ追加処理</summary>
45102 Private Sub AddHandlerInputControls()
46103
@@ -47,10 +104,44 @@
47104 '' Changeイベント
48105 AddHandler Me.numC110_YY1.Change, AddressOf Me.ChangeField
49106 AddHandler Me.dteC110_KADT1.Change, AddressOf Me.ChangeField
107+ AddHandler Me.dteC110_OWDT1.Change, AddressOf Me.ChangeField
108+ AddHandler Me.txtC110_NAME1.Change, AddressOf Me.ChangeField
109+ AddHandler Me.txtC110_NAME2.Change, AddressOf Me.ChangeField
110+ AddHandler Me.txtC110_UBIN1.Change, AddressOf Me.ChangeField
111+ AddHandler Me.txtC110_JUSHO1.Change, AddressOf Me.ChangeField
112+ AddHandler Me.txtC110_JUSHO2.Change, AddressOf Me.ChangeField
113+ AddHandler Me.txtC110_TEL1.Change, AddressOf Me.ChangeField
114+ AddHandler Me.txtC110_FAX1.Change, AddressOf Me.ChangeField
115+ AddHandler Me.numC110_SIME1.Change, AddressOf Me.ChangeField
116+ AddHandler Me.numC110_SIME2.Change, AddressOf Me.ChangeField
117+ AddHandler Me.numC110_SIME3.Change, AddressOf Me.ChangeField
118+ AddHandler Me.dteC110_SMDT1.Change, AddressOf Me.ChangeField
119+ AddHandler Me.dteC110_SMDT2.Change, AddressOf Me.ChangeField
120+ AddHandler Me.dteC110_STARTDT1.Change, AddressOf Me.ChangeField
121+ AddHandler Me.dteC110_STARTDT2.Change, AddressOf Me.ChangeField
122+ AddHandler Me.dteC110_STARTDT3.Change, AddressOf Me.ChangeField
123+ AddHandler Me.dteC110_STARTDT4.Change, AddressOf Me.ChangeField
50124
51125 '' Leaveイベント
52126 AddHandler Me.numC110_YY1.Leave, AddressOf Me.LeaveField
53127 AddHandler Me.dteC110_KADT1.Leave, AddressOf Me.LeaveField
128+ AddHandler Me.dteC110_OWDT1.Leave, AddressOf Me.LeaveField
129+ AddHandler Me.txtC110_NAME1.Leave, AddressOf Me.LeaveField
130+ AddHandler Me.txtC110_NAME2.Leave, AddressOf Me.LeaveField
131+ AddHandler Me.txtC110_UBIN1.Leave, AddressOf Me.LeaveField
132+ AddHandler Me.txtC110_JUSHO1.Leave, AddressOf Me.LeaveField
133+ AddHandler Me.txtC110_JUSHO2.Leave, AddressOf Me.LeaveField
134+ AddHandler Me.txtC110_TEL1.Leave, AddressOf Me.LeaveField
135+ AddHandler Me.txtC110_FAX1.Leave, AddressOf Me.LeaveField
136+ AddHandler Me.numC110_SIME1.Leave, AddressOf Me.LeaveField
137+ AddHandler Me.numC110_SIME2.Leave, AddressOf Me.LeaveField
138+ AddHandler Me.numC110_SIME3.Leave, AddressOf Me.LeaveField
139+ AddHandler Me.dteC110_SMDT1.Leave, AddressOf Me.LeaveField
140+ AddHandler Me.dteC110_SMDT2.Leave, AddressOf Me.LeaveField
141+ AddHandler Me.dteC110_STARTDT1.Leave, AddressOf Me.LeaveField
142+ AddHandler Me.dteC110_STARTDT2.Leave, AddressOf Me.LeaveField
143+ AddHandler Me.dteC110_STARTDT3.Leave, AddressOf Me.LeaveField
144+ AddHandler Me.dteC110_STARTDT4.Leave, AddressOf Me.LeaveField
54145
55146 End Sub
56147
@@ -106,25 +197,41 @@
106197 Me.txtC110_TEL1.Text = rC110.Fields("C110_TEL1").Value.ToString
107198 Me.txtC110_FAX1.Text = rC110.Fields("C110_FAX1").Value.ToString
108199 Me.numC110_SIME1.Value = rC110.Fields("C110_SIME1").Value
109- Me.numC110_SIME2.Value = rC110.Fields("C110_SIME2").Value
110- Me.numC110_SIME3.Value = rC110.Fields("C110_SIME3").Value
200+ If Me.numC110_SIME2.Value <> 0 Then
201+ Me.numC110_SIME2.Value = rC110.Fields("C110_SIME2").Value
202+ End If
203+ If Me.numC110_SIME3.Value <> 0 Then
204+ Me.numC110_SIME3.Value = rC110.Fields("C110_SIME3").Value
205+ End If
111206 If Not rC110.Fields("C110_SMDT1").Value Is DBNull.Value Then
112207 Me.dteC110_SMDT1.Value = rC110.Fields("C110_SMDT1").Value
208+ Else
209+ Me.dteC110_SMDT1.Value = Nothing
113210 End If
114211 If Not rC110.Fields("C110_SMDT2").Value Is DBNull.Value Then
115212 Me.dteC110_SMDT2.Value = rC110.Fields("C110_SMDT2").Value
213+ Else
214+ Me.dteC110_SMDT2.Value = Nothing
116215 End If
117216 If Not rC110.Fields("C110_STARTDT1").Value Is DBNull.Value Then
118217 Me.dteC110_STARTDT1.Value = rC110.Fields("C110_STARTDT1").Value
218+ Else
219+ Me.dteC110_STARTDT1.Value = Nothing
119220 End If
120221 If Not rC110.Fields("C110_STARTDT2").Value Is DBNull.Value Then
121222 Me.dteC110_STARTDT2.Value = rC110.Fields("C110_STARTDT2").Value
223+ Else
224+ Me.dteC110_STARTDT2.Value = Nothing
122225 End If
123226 If Not rC110.Fields("C110_STARTDT3").Value Is DBNull.Value Then
124227 Me.dteC110_STARTDT3.Value = rC110.Fields("C110_STARTDT3").Value
228+ Else
229+ Me.dteC110_STARTDT3.Value = Nothing
125230 End If
126231 If Not rC110.Fields("C110_STARTDT4").Value Is DBNull.Value Then
127232 Me.dteC110_STARTDT4.Value = rC110.Fields("C110_STARTDT4").Value
233+ Else
234+ Me.dteC110_STARTDT4.Value = Nothing
128235 End If
129236
130237 End If
@@ -173,4 +280,340 @@
173280
174281 End Sub
175282
283+ ''' <summary>締日2更新後処理</summary>
284+ Private Sub UpdateC110_SIME2()
285+ If Me.numC110_SIME2.Value = 0 Then
286+ Me.dteC110_SMDT1.Enabled = False
287+ Me.numC110_SIME3.Enabled = False
288+ Me.dteC110_SMDT2.Enabled = False
289+ Else
290+ Me.dteC110_SMDT1.Enabled = True
291+ Me.numC110_SIME3.Enabled = True
292+ End If
293+ End Sub
294+
295+ ''' <summary>締日3更新後処理</summary>
296+ Private Sub UpdateC110_SIME3()
297+ If Me.numC110_SIME3.Value = 0 Then
298+ Me.dteC110_SMDT2.Enabled = False
299+ Else
300+ Me.dteC110_SMDT2.Enabled = True
301+ End If
302+ End Sub
303+
304+ ''' <summary>ボタンコントロール使用可否設定(初期化時)</summary>
305+ Private Sub ChangeButtonEnabled_Init()
306+
307+ Me.cmdF1.Enabled = False
308+ Me.cmdF3.Enabled = True
309+ Me.cmdF12.Enabled = True
310+
311+ End Sub
312+
313+ ''' <summary>画面初期化処理</summary>
314+ Private Sub InitDisp()
315+ Try
316+
317+ '' C110 - 読込
318+ Me.LoadC110()
319+
320+ '' 締日更新処理
321+ Me.UpdateC110_SIME2()
322+ Me.UpdateC110_SIME3()
323+
324+ '' ボタンコントロールの使用可否設定
325+ Me.ChangeButtonEnabled_Init()
326+
327+ '' 画面モード初期化
328+ Me.lblDispMode.Text = stcDispMode.DispNone
329+
330+ '' 初期フォーカスをセットする
331+ Me.numC110_YY1.Focus()
332+
333+ Catch ex As Exception
334+
335+ Throw ex
336+
337+ End Try
338+ End Sub
339+
340+ ''' <summary>更新前チェック</summary>
341+ Private Function CheckBeforeProc() As Boolean
342+ Dim bRet As Boolean = False
343+
344+ Try
345+ '' 当期年度
346+ If Me.numC110_YY1.Value = 0 Then
347+
348+ '' メッセージ表示
349+ Me.Messenger.WarnOKOnly.Show( _
350+ ML.Common.Message.Resource.W.MSG_W_0001, _
351+ "入力エラー", _
352+ "当期年度")
353+
354+ '' 未登録項目にフォーカスをセットする
355+ Me.numC110_YY1.Focus()
356+
357+ Exit Try
358+ End If
359+
360+ '' 当期期間(開始)
361+ If Me.dteC110_KADT1.Value Is Nothing Then
362+
363+ '' メッセージ表示
364+ Me.Messenger.WarnOKOnly.Show( _
365+ ML.Common.Message.Resource.W.MSG_W_0001, _
366+ "入力エラー", _
367+ "当期期間(開始)")
368+
369+ '' 未登録項目にフォーカスをセットする
370+ Me.dteC110_KADT1.Focus()
371+
372+ Exit Try
373+ End If
374+
375+ '' 当期期間(終了)
376+ If Me.dteC110_OWDT1.Value Is Nothing Then
377+
378+ '' メッセージ表示
379+ Me.Messenger.WarnOKOnly.Show( _
380+ ML.Common.Message.Resource.W.MSG_W_0001, _
381+ "入力エラー", _
382+ "当期期間(終了)")
383+
384+ '' 未登録項目にフォーカスをセットする
385+ Me.dteC110_OWDT1.Focus()
386+
387+ Exit Try
388+ End If
389+
390+ '' 自社名
391+ If Me.txtC110_NAME1.Text = String.Empty Then
392+
393+ '' メッセージ表示
394+ Me.Messenger.WarnOKOnly.Show( _
395+ ML.Common.Message.Resource.W.MSG_W_0001, _
396+ "入力エラー", _
397+ "自社名")
398+
399+ '' 未登録項目にフォーカスをセットする
400+ Me.txtC110_NAME1.Focus()
401+
402+ Exit Try
403+ End If
404+
405+ '' 略称
406+ If Me.txtC110_NAME2.Text = String.Empty Then
407+
408+ '' メッセージ表示
409+ Me.Messenger.WarnOKOnly.Show( _
410+ ML.Common.Message.Resource.W.MSG_W_0001, _
411+ "入力エラー", _
412+ "略称")
413+
414+ '' 未登録項目にフォーカスをセットする
415+ Me.txtC110_NAME2.Focus()
416+
417+ Exit Try
418+ End If
419+
420+ '' 締日1
421+ If Me.numC110_SIME1.Value = 0 Then
422+
423+ '' メッセージ表示
424+ Me.Messenger.WarnOKOnly.Show( _
425+ ML.Common.Message.Resource.W.MSG_W_0001, _
426+ "入力エラー", _
427+ "締日1")
428+
429+ '' 未登録項目にフォーカスをセットする
430+ Me.numC110_SIME1.Focus()
431+
432+ Exit Try
433+ End If
434+
435+ '' 締日2
436+ If Me.numC110_SIME2.Value <> 0 Then
437+ If Me.dteC110_SMDT1.Value Is Nothing Then
438+
439+ '' メッセージ表示
440+ Me.Messenger.WarnOKOnly.Show( _
441+ ML.Common.Message.Resource.W.MSG_W_0001, _
442+ "入力エラー", _
443+ "締日2")
444+
445+ '' 未登録項目にフォーカスをセットする
446+ Me.dteC110_SMDT1.Focus()
447+
448+ Exit Try
449+ Else
450+ If Me.dteC110_SMDT1.Value < DateAdd("m", 1, Me.dteC110_KADT1.Value) OrElse
451+ Me.dteC110_SMDT1.Value > DateAdd("m", TRNLib.TRNConst.MAX_SIME_LENGTH, Me.dteC110_KADT1.Value) Then
452+
453+ '' メッセージ表示
454+ Me.Messenger.WarnOKOnly.Show( _
455+ ML.Common.Message.Resource.W.MSG_W_0007, _
456+ "入力エラー", _
457+ "締日2")
458+
459+ '' 未登録項目にフォーカスをセットする
460+ Me.dteC110_SMDT1.Focus()
461+
462+ Exit Try
463+ End If
464+ End If
465+ End If
466+ If Me.numC110_SIME3.Value <> 0 Then
467+ If Me.dteC110_SMDT2.Value Is Nothing Then
468+
469+ '' メッセージ表示
470+ Me.Messenger.WarnOKOnly.Show( _
471+ ML.Common.Message.Resource.W.MSG_W_0001, _
472+ "入力エラー", _
473+ "締日3")
474+
475+ '' 未登録項目にフォーカスをセットする
476+ Me.dteC110_SMDT2.Focus()
477+
478+ Exit Try
479+ Else
480+ If Me.dteC110_SMDT2.Value < DateAdd("m", 1, Me.dteC110_KADT1.Value) OrElse
481+ Me.dteC110_SMDT2.Value > DateAdd("m", TRNLib.TRNConst.MAX_SIME_LENGTH, Me.dteC110_KADT1.Value) Then
482+
483+ '' メッセージ表示
484+ Me.Messenger.WarnOKOnly.Show( _
485+ ML.Common.Message.Resource.W.MSG_W_0007, _
486+ "入力エラー", _
487+ "締日3")
488+
489+ '' 未登録項目にフォーカスをセットする
490+ Me.dteC110_SMDT2.Focus()
491+
492+ Exit Try
493+ End If
494+ If Me.dteC110_SMDT2.Value <= Me.dteC110_SMDT1.Value Then
495+
496+ '' メッセージ表示
497+ Me.Messenger.WarnOKOnly.Show( _
498+ ML.Common.Message.Resource.W.MSG_W_0008, _
499+ "入力エラー")
500+
501+ Me.dteC110_SMDT2.Focus()
502+
503+ Exit Try
504+ End If
505+ End If
506+ End If
507+
508+ bRet = True
509+
510+ Catch ex As Exception
511+
512+ '' エラーログを出力する
513+ Me.Logger.WriteErrorLog(ex.Message)
514+
515+ '' エラーメッセージを表示する
516+ Me.m_messenGer.ErrorOKOnly.Show(ex.Message)
517+
518+ End Try
519+
520+ '' 戻り値を返す
521+ Return bRet
522+
523+ End Function
524+
525+ ''' <summary>機能設定登録処理</summary>
526+ Private Function UpdateC110() As Boolean
527+ Dim db As ML.DBAccess.Base.Db5 = ML.DBAccess.Base.Db5.CurrentDb
528+ Dim rC110 As ML.DBAccess.Base.Rs5
529+ Dim sSQL As String
530+ Dim bRet As Boolean = False
531+
532+ Try
533+ '' カーソルを待機状態にする
534+ Me.Cursor = Windows.Forms.Cursors.WaitCursor
535+
536+ '' DB-Open
537+ db.Open()
538+
539+ '' トランザクション開始
540+ db.BeginTrans()
541+
542+ '' C110-更新
543+ sSQL = "SELECT * FROM " & TRNLib.TRNConst.TableName.C.C110_F
544+ sSQL &= " WHERE C110_KEY1=0"
545+ rC110 = db.OpenRecordset(sSQL)
546+ If rC110.EOF Then
547+ rC110.AddNew()
548+ rC110.Fields("C110_KEY1").Value = 0
549+ Else
550+ rC110.Edit()
551+ End If
552+ With rC110
553+
554+ .Fields("C110_YY1").Value = Me.numC110_YY1.Value
555+ .Fields("C110_KADT1").Value = Me.dteC110_KADT1.Value
556+ .Fields("C110_OWDT1").Value = Me.dteC110_OWDT1.Value
557+ .Fields("C110_NAME1").Value = Me.txtC110_NAME1.Text
558+ .Fields("C110_NAME2").Value = Me.txtC110_NAME2.Text
559+ .Fields("C110_UBIN1").Value = Me.txtC110_UBIN1.Text
560+ .Fields("C110_JUSHO1").Value = Me.txtC110_JUSHO1.Text
561+ .Fields("C110_JUSHO2").Value = Me.txtC110_JUSHO2.Text
562+ .Fields("C110_TEL1").Value = Me.txtC110_TEL1.Text
563+ .Fields("C110_FAX1").Value = Me.txtC110_FAX1.Text
564+ .Fields("C110_SIME1").Value = Me.numC110_SIME1.Value
565+ If Me.numC110_SIME2.Value <> 0 Then
566+ .Fields("C110_SIME2").Value = Me.numC110_SIME2.Value
567+ Else
568+ .Fields("C110_SIME2").Value = DBNull.Value
569+ End If
570+ If Me.numC110_SIME3.Value <> 0 Then
571+ .Fields("C110_SIME3").Value = Me.numC110_SIME3.Value
572+ Else
573+ .Fields("C110_SIME3").Value = DBNull.Value
574+ End If
575+ .Fields("C110_SMDT1").Value = Me.dteC110_SMDT1.Value
576+ .Fields("C110_SMDT2").Value = Me.dteC110_SMDT2.Value
577+ .Fields("C110_STARTDT1").Value = Me.dteC110_STARTDT1.Value
578+ .Fields("C110_STARTDT2").Value = Me.dteC110_STARTDT2.Value
579+ .Fields("C110_STARTDT3").Value = Me.dteC110_STARTDT3.Value
580+ .Fields("C110_STARTDT4").Value = Me.dteC110_STARTDT4.Value
581+ .Fields("C110_UPD1").Value = Me.m_LInfo.GetUpdInfo
582+ .Update()
583+
584+ End With
585+ rC110.Close()
586+
587+ '' C120 - 更新処理
588+ Dim cutOff As New TRNLib.C120.Cutoff
589+ cutOff.UpdateC120()
590+
591+ '' コミット
592+ db.CommitTrans()
593+
594+ '' DB-Close
595+ db.Close()
596+
597+ '' 処理結果をセットする
598+ bRet = True
599+
600+ Catch ex As Exception
601+
602+ '' ロールバック
603+ db.RollBack()
604+
605+ '' エラーログを出力する
606+ Me.Logger.WriteErrorLog(ex.Message)
607+
608+ Finally
609+
610+ '' カーソルを元に戻す
611+ Me.Cursor = Windows.Forms.Cursors.Default
612+
613+ End Try
614+
615+ '' 戻り値を返す
616+ Return bRet
617+ End Function
618+
176619 End Class
--- trunk/MLApp.TRNLib/Class/TRNConst.vb (revision 54)
+++ trunk/MLApp.TRNLib/Class/TRNConst.vb (revision 55)
@@ -12,6 +12,9 @@
1212 ''' </history>
1313 Public Class TRNConst
1414
15+ ''' <summary>当期の最大月数</summary>
16+ Public Const MAX_SIME_LENGTH As Integer = 15
17+
1518 ''' <summary>
1619 ''' 【クラス名】ProcudureName
1720 ''' 【機能概要】プロシージャ名定数クラス
--- trunk/MLApp.TRNLib/Class/dba/Cutoff.vb (revision 54)
+++ trunk/MLApp.TRNLib/Class/dba/Cutoff.vb (revision 55)
@@ -289,7 +289,7 @@
289289 ''' <summary>
290290 ''' C120を作成する
291291 ''' </summary>
292- Public Sub UPD_C20()
292+ Public Sub UpdateC120()
293293 Dim db As ML.DBAccess.Base.Db5 = ML.DBAccess.Base.Db5.CurrentDb
294294 Dim rC110 As ML.DBAccess.Base.Rs5
295295 Dim rC120 As ML.DBAccess.Base.Rs5
--- trunk/MLApp.TRN0000/Form1.vb (revision 54)
+++ trunk/MLApp.TRN0000/Form1.vb (revision 55)
@@ -167,7 +167,7 @@
167167 Dim testC As New TRNLib.C120.Cutoff
168168
169169 'testC.Check_C120Date(CDate("2016/12/20"))
170- testC.UPD_C20()
170+ testC.UpdateC120()
171171
172172 End Sub
173173
--- trunk/ML.Common.Message/My Project/MsgResource_W.Designer.vb (revision 54)
+++ trunk/ML.Common.Message/My Project/MsgResource_W.Designer.vb (revision 55)
@@ -117,5 +117,23 @@
117117 Return ResourceManager.GetString("MSG_W_0006", resourceCulture)
118118 End Get
119119 End Property
120+
121+ '''<summary>
122+ ''' {0}の開始月が範囲外です に類似しているローカライズされた文字列を検索します。
123+ '''</summary>
124+ Public Shared ReadOnly Property MSG_W_0007() As String
125+ Get
126+ Return ResourceManager.GetString("MSG_W_0007", resourceCulture)
127+ End Get
128+ End Property
129+
130+ '''<summary>
131+ ''' 締日3の開始月≦締日2の開始月です に類似しているローカライズされた文字列を検索します。
132+ '''</summary>
133+ Public Shared ReadOnly Property MSG_W_0008() As String
134+ Get
135+ Return ResourceManager.GetString("MSG_W_0008", resourceCulture)
136+ End Get
137+ End Property
120138 End Class
121139 End Namespace
--- trunk/MLApp.TRN8000/TRN8931.vb (revision 54)
+++ trunk/MLApp.TRN8000/TRN8931.vb (revision 55)
@@ -754,6 +754,11 @@
754754 '' トランザクション開始
755755 db.BeginTrans()
756756
757+ '' M913_F - レコード削除
758+ sSQL = "DELETE FROM " & TRNLib.TRNConst.TableName.M.M913_F
759+ sSQL &= " WHERE M913_M911CD1=" & Me.txtM911_CODE1.Text.ToTextStr
760+ db.Execute(sSQL)
761+
757762 '' M911_F - レコード削除
758763 sSQL = "DELETE FROM " & TRNLib.TRNConst.TableName.M.M911_F
759764 sSQL &= " WHERE M911_CODE1=" & Me.txtM911_CODE1.Text.ToTextStr
@@ -762,9 +767,6 @@
762767 '' コミット
763768 db.CommitTrans()
764769
765- '' DB-Close
766- db.Close()
767-
768770 '' 処理結果をセットする
769771 bRet = True
770772
@@ -777,6 +779,9 @@
777779
778780 Finally
779781
782+ '' DB-Close
783+ db.Close()
784+
780785 '' カーソルを元に戻す
781786 Me.Cursor = Windows.Forms.Cursors.Default
782787
Show on old repository browser