📄 form_accountf.frm
字号:
Begin VB.Label Label7
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "文件编号"
Height = 180
Left = 420
TabIndex = 6
Top = 2190
Width = 720
End
Begin VB.Label Label6
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "附件"
Height = 180
Left = 390
TabIndex = 5
Top = 3615
Width = 360
End
Begin VB.Label Label5
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "件号"
Height = 180
Left = 6045
TabIndex = 4
Top = 780
Width = 360
End
Begin VB.Label Label4
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "文件名称"
ForeColor = &H000000C0&
Height = 180
Left = 420
TabIndex = 3
Top = 1268
Width = 720
End
Begin VB.Label Label3
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "页数"
ForeColor = &H000000C0&
Height = 180
Left = 4740
TabIndex = 2
Top = 1710
Width = 360
End
Begin VB.Label Label2
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "室档编号"
ForeColor = &H000000C0&
Height = 180
Left = 420
TabIndex = 1
Top = 810
Width = 720
End
Begin VB.Label Label1
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "标签"
BeginProperty Font
Name = "隶书"
Size = 18
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 360
Left = 2460
TabIndex = 0
Top = 150
Width = 720
End
End
Attribute VB_Name = "form_AccountF"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim strfile As String
Private Sub Combo1_KeyPress(KeyAscii As Integer)
KeyAscii = 0
End Sub
Private Sub Combo2_KeyPress(KeyAscii As Integer)
KeyAscii = 0
End Sub
Private Sub Combo3_KeyPress(KeyAscii As Integer)
KeyAscii = 0
End Sub
Private Sub Command1_Click()
On Error GoTo e:
If Text4.text = 0 Then
MsgBox "页数不能为0!", 48, ""
Exit Sub
End If
If fond("T_ARCHIVE_0203_FILE", Text1.text, Text3.text) > 0 Then
If flag = "Insert" Then
MsgBox "在室编档号重复的情况下,件号不可重复,请核查!", vbExclamation, ""
Exit Sub
ElseIf Not (strfile = Text1.text + Text3.text) Then
MsgBox "在室编档号重复的情况下,件号不可重复,请核查!", vbExclamation, ""
Exit Sub
End If
End If
If Text1.text = "" Or Text1.text = " " Then
MsgBox "请输入室编档号!", vbExclamation, ""
Exit Sub
End If
If Text2.text = "" Or Text2.text = " " Then
MsgBox "请输入文件名称!", vbExclamation, ""
Exit Sub
End If
If Text6.text = "" Or Text6.text = " " Then
MsgBox "请输入责任者!", vbExclamation, ""
Exit Sub
End If
If flag = "Insert" Then
num = id("T_ARCHIVE_0203_file")
strSql = "insert into T_ARCHIVE_0203_file("
strSql = strSql + "RECORD_SEQUENCE_NUMBER"
strSql = strSql + ",NUMBER_OF_PAGE,REFERENCE_CODE_OF_FILE_OFFICE,TITLE_PROPER"
strSql = strSql + ",ITEM_NUMBER,DOCUMENT_CODE,PRIMARY_CREATOR,ATTENDANT_DOCUMENT"
strSql = strSql + ",NOTES_OF_ARCHIVIST,ELECTRONIC_RECORD_CODE,FLAG"
strSql = strSql + ",date_begun,subordinate_creator,discriptor"
strSql = strSql + ",secret_level_for_documents,retention_period,version,IS_SHARING"
strSql = strSql + ")values("
strSql = strSql + "" & num & ""
strSql = strSql + "," & Text3.text & ",'" & Text1.text & "','" & Text2.text & "'"
strSql = strSql + ",'" & Text4.text & "','" & Text5.text & "','" & Text6.text & "','" & Text7.text & "'"
strSql = strSql + ",'" & Text8.text & "','" & Text9.text & "',0"
strSql = strSql + ",'" & Format(DTPicker1.Value, "yyyy-mm-dd") & "','" & Text11.text & "','" & Text12.text & "'"
strSql = strSql + ",'" & Combo1.ListIndex & "','" & Combo2.text & "','" & Combo3.text & "','" & Check1.Value & "'"
strSql = strSql + ")"
ElseIf flag = "Modify" Then
strSql = "update T_ARCHIVE_0203_file set "
strSql = strSql + "NUMBER_OF_PAGE =" & Text3.text & " ,REFERENCE_CODE_OF_FILE_OFFICE='" & Text1.text & "' ,TITLE_PROPER ='" & Text2.text & "' "
strSql = strSql + ",date_begun='" & DTPicker1.Value & "',ITEM_NUMBER ='" & Text4.text & "' ,DOCUMENT_CODE ='" & Text5.text & "' ,PRIMARY_CREATOR ='" & Text6.text & "' "
strSql = strSql + ",ATTENDANT_DOCUMENT ='" & Text7.text & "' ,NOTES_OF_ARCHIVIST ='" & Text8.text & "' ,ELECTRONIC_RECORD_CODE ='" & Text9.text & "'"
strSql = strSql + ",subordinate_creator='" & Text11.text & "',discriptor='" & Text12.text & "'"
strSql = strSql + ",secret_level_for_documents='" & Combo1.ListIndex & "',retention_period='" & Combo2.text & "',version='" & Combo3.text & "',IS_SHARING='" & Check1.Value & "'"
strSql = strSql + " where RECORD_SEQUENCE_NUMBER=" & num & ""
End If
'MsgBox strSql
rs.Open strSql, conn
MsgBox "保存成功!", vbInformation, ""
lblState.Caption = returnInputState(Label2, Text1, Label5, Text3)
If flag = "Insert" Then
Text3.text = numberPage("t_archive_0203_file", Text1.text)
Dim itmX As ListItem
Set itmX = form_AnJuan.ListView2.ListItems.Add(, , form_AnJuan.ListView2.ListItems.Count + 1)
itmX.SubItems(1) = num
itmX.SubItems(2) = Text1.text
itmX.SubItems(3) = Text2.text
itmX.SubItems(4) = Text6.text
End If
If flag = "Insert" Then Text4.text = "0"
If flag = "Modify" Then
form_AnJuan.Refresh
End If
Exit Sub
e:
'MsgBox Err.Number & Err.Description, vbExclamation, ""
MsgBox "请输入正确数据格式", vbExclamation, ""
If rs.State = 1 Then
rs.Close
End If
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
Private Sub Form_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
SendKeys "{tab}"
KeyAscii = 0
End If
End Sub
Private Sub Form_Load()
Label1.Caption = form_AnJuan.Label4.Caption + "卷内文件信息"
Label1.BackColor = bgColor
Combo1.AddItem "公开"
Combo1.AddItem "限制"
Combo1.AddItem "秘密"
Combo1.AddItem "机密"
Combo1.ListIndex = 1
Combo2.AddItem "3年"
Combo2.AddItem "5年"
Combo2.AddItem "10年"
Combo2.AddItem "15年"
Combo2.AddItem "25年"
Combo2.AddItem "永久"
Combo2.ListIndex = 0
Combo3.AddItem "正本"
Combo3.AddItem "副本"
Combo3.AddItem "草稿"
Combo3.AddItem "定稿"
Combo3.ListIndex = 0
Text1.text = ""
Text2.text = ""
Text3.text = 0
Text4.text = 0
Text5.text = ""
Text6.text = ""
Text7.text = ""
Text8.text = ""
Text9.text = ""
Text10.text = ""
Text11.text = ""
Text12.text = ""
Text11.MaxLength = 255
Text12.MaxLength = 1000
Text10.MaxLength = 5
Text1.MaxLength = 24
Text2.MaxLength = 1000
Text3.MaxLength = 6
Text4.MaxLength = 5
Text5.MaxLength = 50
Text6.MaxLength = 255
Text7.MaxLength = 255
Text8.MaxLength = 1000
Text9.MaxLength = 50
DTPicker1.Value = Date
If flag = "Modify" Then
rs.Open "select * from T_ARCHIVE_0203_FILE where RECORD_SEQUENCE_NUMBER=" & num & "", conn
Text3.text = xml("NUMBER_OF_PAGE")
Text1.text = xml("REFERENCE_CODE_OF_FILE_OFFICE")
Text2.text = xml("TITLE_PROPER")
Text5.text = xml("DOCUMENT_CODE")
Text6.text = xml("PRIMARY_CREATOR")
Text7.text = xml("ATTENDANT_DOCUMENT")
Text8.text = xml("NOTES_OF_ARCHIVIST")
Text9.text = xml("ELECTRONIC_RECORD_CODE")
DTPicker1.Value = xml("date_begun")
Dim k As Integer
k = InStr(xml("ITEM_NUMBER"), "-")
If k <> 0 Then
Text4.text = Mid(xml("ITEM_NUMBER"), 1, k - 1)
Text10.text = Mid(xml("ITEM_NUMBER"), k + 1)
Else
Text4.text = xml("ITEM_NUMBER")
End If
Text11.text = xml("subordinate_creator")
Text12.text = xml("discriptor")
Combo3.text = xml("version")
Combo1.ListIndex = xml("secret_level_for_documents")
Combo2.text = xml("retention_period")
If xml("IS_SHARING") <> "" Then
Check1.Value = xml("IS_SHARING")
End If
rs.Close
End If
strfile = Text1.text + Text3.text
End Sub
Private Sub Text1_Change()
If flag = "Insert" Then
Text3.text = numberPage("t_archive_0203_file", Text1.text)
End If
End Sub
Private Sub Text3_KeyPress(KeyAscii As Integer)
If Not (KeyAscii > 47 And KeyAscii < 59) And KeyAscii <> 8 Then
KeyAscii = 0
MsgBox "请输入数字!", 48, ""
End If
End Sub
Private Sub Text4_KeyPress(KeyAscii As Integer)
If Not (KeyAscii > 47 And KeyAscii < 59) And KeyAscii <> 8 Then
KeyAscii = 0
MsgBox "请输入数字!", 48, ""
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -