📄 私有模块.bas
字号:
Attribute VB_Name = "XtsyModule"
'系统私有模块用来放置一些子系统独有的过程与函数
Public str_Code As String '存储列内容参数
Public StrTemp As String '临时变量
Public TempMainCode As String
Public TempMainID As Integer
Public TempSubID As Integer
Public TempFile As String
Public Sub Drxtztcs() '读入系统帐套参数
Dim Ztcsbrec As New ADODB.Recordset
Dim RecTemp As New ADODB.Recordset
Dim Sqlstr As String
With Ztcsbrec
'金额总位数
.Open "Select * From Gy_AccInformation Where SystemCode='Cwzz'", Cw_DataEnvi.DataConnect, adOpenDynamic, adLockOptimistic
.MoveFirst
.Find "itemcode='cwjezws'"
If Not Ztcsbrec.EOF Then
Xtjezws = Val(Trim(Ztcsbrec.Fields("itemvalue")))
End If
'数量总位数
.MoveFirst
.Find "itemcode='cwslzws'"
If Not Ztcsbrec.EOF Then
Xtslzws = Val(Trim(Ztcsbrec.Fields("itemvalue")))
End If
'单价总位数
.MoveFirst
.Find "itemcode='cwdjzws'"
If Not Ztcsbrec.EOF Then
Xtdjzws = Val(Trim(Ztcsbrec.Fields("itemvalue")))
End If
'金额小数位数
.MoveFirst
.Find "itemcode='cwjexsws'"
If Not Ztcsbrec.EOF Then
Xtjexsws = Val(Trim(Ztcsbrec.Fields("itemvalue")))
End If
'数量小数位数
.MoveFirst
.Find "itemcode='cwslxsws'"
If Not Ztcsbrec.EOF Then
Xtslxsws = Val(Trim(Ztcsbrec.Fields("itemvalue")))
End If
'单价小数位数
.MoveFirst
.Find "itemcode='cwdjxsws'"
If Not Ztcsbrec.EOF Then
Xtdjxsws = Val(Trim(Ztcsbrec.Fields("itemvalue")))
End If
.Close
End With
End Sub
Public Sub Print_DevInfo() '人事档案打印
Dim Max_y As Integer
Dim tmpRs As New Recordset
With DY_Tybbyldy.Tydy
'-----------------
.X1 = 0: .Y1 = 0: .X2 = 0: .Y2 = 0
'=====================
Set tmpRs = Cw_DataEnvi.DataConnect.Execute("select * from Xt_dybbcs where bbbm='Dev_MainPrint'")
.PaperSize = tmpRs!PaperSize
.Orientation = tmpRs!PaperScfx
.MarginLeft = tmpRs!bbzbj
.MarginTop = tmpRs!bbsbj
.MarginBottom = tmpRs!bbxbj
.MarginRight = tmpRs!bbybj
.StartDoc
.CurrentX = "3.5in"
.FontName = Trim(tmpRs!bbbtfont)
.FontSize = Trim(tmpRs!bbbtsize)
.FontBold = True
DY_Tybbyldy.Tydy = "设备档案"
.CurrentX = "1in": .CurrentY = "1.4in"
.FontSize = Trim(tmpRs!Bbsjqsize)
.FontName = Trim(tmpRs!Bbsjqfont)
.FontBold = False
tmpRs.Close
Dim r As Integer
Dim Height_Y As Integer
Height_Y = 2100
For r = 1 To Dev_ItemInfoForm.T_Label.Count - 1
.CurrentX = 1600 + Dev_ItemInfoForm.T_Label(r).Left
.CurrentY = Height_Y + Dev_ItemInfoForm.T_Label(r).Top
DY_Tybbyldy.Tydy = Dev_ItemInfoForm.T_Label(r).Caption & ":"
.CurrentX = 1600 + Dev_ItemInfoForm.Text_t(r).Left + 100
.CurrentY = Height_Y + Dev_ItemInfoForm.T_Label(r).Top
DY_Tybbyldy.Tydy = Dev_ItemInfoForm.Text_t(r).Text
If .CurrentY > Max_y Then Max_y = .CurrentY
Next r
' '----------------
.EndDoc
DY_Tybbyldy.Show 1
End With
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -