📄 form_kejif.frm
字号:
Width = 360
End
Begin VB.Label Label11
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "备注"
Height = 180
Left = 750
TabIndex = 6
Top = 4440
Width = 360
End
Begin VB.Label Label12
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "稿本"
Height = 180
Left = 750
TabIndex = 5
Top = 3186
Width = 360
End
Begin VB.Label Label13
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "主题词"
Height = 180
Left = 750
TabIndex = 4
Top = 4018
Width = 540
End
Begin VB.Label Label14
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "其它责任者"
Height = 180
Left = 4620
TabIndex = 3
Top = 1920
Width = 900
End
Begin VB.Label Label15
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "附件"
Height = 180
Left = 750
TabIndex = 2
Top = 3602
Width = 360
End
Begin VB.Label Label16
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "电子文档号"
Height = 180
Left = 720
TabIndex = 1
Top = 5280
Width = 900
End
Begin VB.Label Label17
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "归档年份"
Height = 180
Left = 6390
TabIndex = 0
Top = 6495
Width = 720
End
End
Attribute VB_Name = "form_KeJiF"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim strfile As String
Dim strpage 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 Text8.text = 0 Then
MsgBox "页数不能为0!", 48, ""
Exit Sub
End If
If flag = "Insert" Then
If fond("T_ARCHIVE_0300_FILE", Text1.text, Text5.text) > 0 Then
MsgBox "在室编档号重复的情况下,件号不可重复,请核查!", vbExclamation, ""
Exit Sub
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 Text9.text = "" Or Text9.text = " " Then
MsgBox "请输入责任者!", vbExclamation, ""
Exit Sub
End If
num = id("T_ARCHIVE_0300_FILE")
strSql = "insert into T_ARCHIVE_0300_FILE ("
strSql = strSql + "RECORD_SEQUENCE_NUMBER,REFERENCE_CODE_OF_FILE_OFFICE,TITLE_PROPER,DOCUMENT_CODE,DATE_BEGUN"
strSql = strSql + ",SECRET_LEVEL_FOR_DOCUMENTS,RETENTION_PERIOD,NUMBER_OF_PAGE,ARCHIVE_YEAR"
strSql = strSql + ",DISCRIPTOR,ITEM_NUMBER,PRIMARY_CREATOR,SUBORDINATE_CREATOR"
strSql = strSql + ",ELECTRONIC_RECORD_CODE,VERSION,NOTES_OF_ARCHIVIST,ATTENDANT_DOCUMENT,flag,class_code,IS_SHARING"
strSql = strSql + ")values("
strSql = strSql + "" & num & ",'" & Text1.text & "','" & Text2.text & "','" & Text3.text & "','" & Format(DTPicker1.Value, "yyyy-mm-dd") & "'"
strSql = strSql + ",'" & Combo1.ListIndex & "','" & Combo2.ListIndex & "'," & Text5.text & ",'" & Text6.text & "'"
strSql = strSql + ",'" & Text7.text & "','" & Text8.text & "','" & Text9.text & "','" & Text10.text & "' "
strSql = strSql + ",'" & Text11.text & "','" & Combo3.text & "','" & Text13.text & "','" & Text14.text & "',0,'" & form_AnJuan.List1.ListIndex & "','" & Check1.Value & "'"
strSql = strSql + ")"
ElseIf flag = "Modify" Then
If fond("T_ARCHIVE_0300_FILE", Text1.text, Text5.text) > 0 Then
If Not (strpage = Text5.text And strfile = Text1.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
strSql = "update T_ARCHIVE_0300_file set "
strSql = strSql + "REFERENCE_CODE_OF_FILE_OFFICE='" & Text1.text & "',TITLE_PROPER ='" & Text2.text & "',DOCUMENT_CODE ='" & Text3.text & "',DATE_BEGUN ='" & Format(DTPicker1.Value, "yyyy-mm-dd") & "'"
strSql = strSql + ",SECRET_LEVEL_FOR_DOCUMENTS ='" & Combo1.ListIndex & "',RETENTION_PERIOD ='" & Combo2.ListIndex & "',NUMBER_OF_PAGE =" & Text5.text & ",ARCHIVE_YEAR ='" & Text6.text & "'"
strSql = strSql + ",DISCRIPTOR ='" & Text7.text & "',ITEM_NUMBER ='" & Text8.text & "',PRIMARY_CREATOR ='" & Text9.text & "',SUBORDINATE_CREATOR ='" & Text10.text & "'"
strSql = strSql + ",ELECTRONIC_RECORD_CODE ='" & Text11.text & "',VERSION ='" & Combo3.text & "',NOTES_OF_ARCHIVIST ='" & Text13.text & "',ATTENDANT_DOCUMENT ='" & Text14.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, Label3, Text5)
If flag = "Insert" Then
Text5.text = numberPage2("t_archive_0300_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) = Text3.text
itmX.SubItems(3) = Text2.text
itmX.SubItems(4) = Text9.text
itmX.SubItems(5) = Format(DTPicker1.Value, "yyyy-mm-dd")
End If
If flag = "Insert" Then Text8.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()
BackColor = bgColor
Label1.Caption = form_AnJuan.Label4.Caption + "卷内文件信息"
Label1.BackColor = bgColor
Combo1.AddItem "公开"
Combo1.AddItem "限制"
Combo1.AddItem "秘密"
Combo1.AddItem "机密"
Combo1.ListIndex = 2
Combo2.AddItem "永久"
Combo2.AddItem "长期"
Combo2.AddItem "短期"
Combo2.ListIndex = 0
Combo3.AddItem "正本"
Combo3.AddItem "副本"
Combo3.AddItem "草稿"
Combo3.AddItem "定稿"
Combo3.ListIndex = 0
Text1.text = ""
Text2.text = ""
Text3.text = ""
Text5.text = 0
Text6.text = Format(Date, "yyyy")
Text7.text = ""
Text8.text = 0
Text9.text = ""
Text10.text = ""
Text11.text = ""
Text13.text = ""
Text14.text = ""
Text4.text = ""
Text4.MaxLength = 5
DTPicker1.Value = Date
If flag = "Modify" Then
rs.Open "select * from T_ARCHIVE_0300_FILE where RECORD_SEQUENCE_NUMBER=" & num & "", conn
If rs!REFERENCE_CODE_OF_FILE_OFFICE <> "" Then
Text1.text = rs!REFERENCE_CODE_OF_FILE_OFFICE
End If
If rs!TITLE_PROPER <> "" Then
Text2.text = rs!TITLE_PROPER
End If
If rs!DOCUMENT_CODE <> "" Then
Text3.text = rs!DOCUMENT_CODE
End If
If rs!DATE_BEGUN <> "" Then
DTPicker1.Value = rs!DATE_BEGUN
End If
If rs!SECRET_LEVEL_FOR_DOCUMENTS <> "" Then
Combo1.ListIndex = rs!SECRET_LEVEL_FOR_DOCUMENTS
End If
If rs!RETENTION_PERIOD <> "" Then
Combo2.ListIndex = rs!RETENTION_PERIOD
End If
If rs!NUMBER_OF_PAGE <> "" Then
Text5.text = rs!NUMBER_OF_PAGE
End If
If rs!ARCHIVE_YEAR <> "" Then
Text6.text = rs!ARCHIVE_YEAR
End If
If rs!DISCRIPTOR <> "" Then
Text7.text = rs!DISCRIPTOR
End If
If xml("IS_SHARING") <> "" Then
Check1.Value = xml("IS_SHARING")
End If
Dim k As Integer
k = InStr(xml("ITEM_NUMBER"), "-")
If k <> 0 Then
Text8.text = Mid(xml("ITEM_NUMBER"), 1, k - 1)
Text4.text = Mid(xml("ITEM_NUMBER"), k + 1)
Else
Text8.text = xml("ITEM_NUMBER")
End If
'页号分段处理
If rs!PRIMARY_CREATOR <> "" Then
Text9.text = rs!PRIMARY_CREATOR
End If
If rs!SUBORDINATE_CREATOR <> "" Then
Text10.text = rs!SUBORDINATE_CREATOR
End If
If rs!ELECTRONIC_RECORD_CODE <> "" Then
Text11.text = rs!ELECTRONIC_RECORD_CODE
End If
If rs!Version <> "" Then
Combo3.text = rs!Version
End If
If rs!NOTES_OF_ARCHIVIST <> "" Then
Text13.text = rs!NOTES_OF_ARCHIVIST
End If
If rs!ATTENDANT_DOCUMENT <> "" Then
Text14.text = rs!ATTENDANT_DOCUMENT
End If
rs.Close
End If
Text1.MaxLength = 24
Text2.MaxLength = 1000
Text3.MaxLength = 50
Text5.MaxLength = 6
Text6.MaxLength = 10
Text7.MaxLength = 100
Text8.MaxLength = 5
Text9.MaxLength = 255
Text10.MaxLength = 255
Text11.MaxLength = 50
Text13.MaxLength = 1000
Text14.MaxLength = 255
strfile = Text1.text
strpage = Text5.text
End Sub
Private Sub Text1_Change()
If flag = "Insert" Then
Text5.text = numberPage2("t_archive_0300_file", Text1.text)
End If
End Sub
Private Sub Text5_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 Text8_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 + -