📄 frmdeviceregister.frm
字号:
VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
Object = "{5E9E78A0-531B-11CF-91F6-C2863C385E30}#1.0#0"; "MSFLXGRD.OCX"
Begin VB.Form FrmDeviceRegister
Caption = "设备登记单"
ClientHeight = 7455
ClientLeft = 60
ClientTop = 450
ClientWidth = 9780
Icon = "FrmDeviceRegister.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
ScaleHeight = 7455
ScaleWidth = 9780
StartUpPosition = 2 '屏幕中心
Begin VB.Frame Frame1
Caption = "登记单"
Height = 6375
Left = 120
TabIndex = 2
Top = 960
Width = 9495
Begin VB.TextBox txtBuyrq
Height = 390
Left = 1200
TabIndex = 15
Top = 1800
Width = 2175
End
Begin VB.TextBox txtEdit
BorderStyle = 0 'None
Height = 315
Left = 4920
TabIndex = 12
Top = 2640
Visible = 0 'False
Width = 1245
End
Begin VB.TextBox txtDesc
Height = 390
Left = 1200
TabIndex = 0
Top = 840
Width = 2175
End
Begin VB.TextBox txtRegisterId
BackColor = &H80000011&
Enabled = 0 'False
Height = 390
Left = 1200
TabIndex = 1
Top = 360
Width = 2175
End
Begin NetManager.YMDDate ymdDjrq
Height = 375
Left = 5760
TabIndex = 8
Top = 840
Width = 3375
_ExtentX = 5953
_ExtentY = 661
End
Begin VB.TextBox txtTransactor
Height = 390
Left = 5880
TabIndex = 7
Top = 1320
Width = 2175
End
Begin VB.TextBox txtApplicant
Height = 390
Left = 1200
TabIndex = 3
Top = 1320
Width = 2175
End
Begin MSFlexGridLib.MSFlexGrid MSFlexGrid1
Height = 3975
Left = 240
TabIndex = 13
Top = 2280
Width = 9135
_ExtentX = 16113
_ExtentY = 7011
_Version = 393216
RowHeightMin = 315
WordWrap = -1 'True
HighLight = 0
FillStyle = 1
AllowUserResizing= 1
End
Begin VB.Label Label3
Caption = "购买日期:"
Height = 255
Left = 240
TabIndex = 14
Top = 1920
Width = 975
End
Begin VB.Label Label2
Caption = "内容:"
Height = 255
Left = 240
TabIndex = 11
Top = 960
Width = 975
End
Begin VB.Label Label7
Caption = "登记日期:"
Height = 255
Left = 4800
TabIndex = 9
Top = 960
Width = 975
End
Begin VB.Label Label1
Caption = "申请人:"
Height = 255
Left = 240
TabIndex = 6
Top = 1440
Width = 975
End
Begin VB.Label Label4
Caption = "流水号:"
Height = 255
Left = 240
TabIndex = 5
Top = 480
Width = 975
End
Begin VB.Label Label6
Caption = "经办人:"
Height = 255
Left = 4800
TabIndex = 4
Top = 1440
Width = 975
End
End
Begin MSComctlLib.Toolbar Toolbar1
Height = 780
Left = 0
TabIndex = 10
Top = 0
Width = 9600
_ExtentX = 16933
_ExtentY = 1376
ButtonWidth = 1455
ButtonHeight = 1376
Style = 1
ImageList = "ImageList1"
_Version = 393216
BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628}
NumButtons = 6
BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = "保存"
Key = "保存"
ImageIndex = 1
EndProperty
BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628}
Style = 3
EndProperty
BeginProperty Button3 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = "添加设备"
Key = "添加设备"
ImageIndex = 2
EndProperty
BeginProperty Button4 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = "删除设备"
Key = "删除设备"
ImageIndex = 3
EndProperty
BeginProperty Button5 {66833FEA-8583-11D1-B16A-00C0F0283628}
Style = 3
EndProperty
BeginProperty Button6 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = "关闭"
Key = "关闭"
ImageIndex = 4
EndProperty
EndProperty
Begin MSComctlLib.ImageList ImageList1
Left = 8040
Top = 0
_ExtentX = 1005
_ExtentY = 1005
BackColor = -2147483643
ImageWidth = 32
ImageHeight = 32
MaskColor = 12632256
_Version = 393216
BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628}
NumListImages = 4
BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "FrmDeviceRegister.frx":08CA
Key = ""
EndProperty
BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "FrmDeviceRegister.frx":11A4
Key = ""
EndProperty
BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "FrmDeviceRegister.frx":1A7E
Key = ""
EndProperty
BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "FrmDeviceRegister.frx":2358
Key = ""
EndProperty
EndProperty
End
End
End
Attribute VB_Name = "FrmDeviceRegister"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'****************************************************************************
'人人为我,我为人人
'枕善居收藏整理
'发布日期:2007/09/25
'描 述:江苏大学网络信息中心网络管理系统 - v1.0 Beta
'网 站:http://www.Mndsoft.com/ (VB6源码博客)
'网 站:http://www.VbDnet.com/ (VB.NET源码博客,主要基于.NET2005)
'e-mail :Mndsoft@163.com
'e-mail :Mndsoft@126.com
'OICQ :88382850
' 如果您有新的好的代码别忘记给枕善居哦!
'****************************************************************************
Dim txtSQL As String
Dim MsgText As String
Dim HasError As Boolean
Public mode As String
Public register_id As String
Private WithEvents mMSFlexGrid1 As cFlexGridBinder
Attribute mMSFlexGrid1.VB_VarHelpID = -1
Const COL_NETCENTER_ID As Long = 2
Dim txtTypeId
Dim txtManufacturerId
Dim txtModelId
Dim txtManufacturerName
Dim txtModelName
Dim txtTypeName
Dim i As Integer
Private Sub Form_Load()
Grid_Init
If mode = "add" Then
ymdDjrq.FormatDate = CStr(Year(Now())) & "-" & CStr(Month(Now())) & "-" & CStr(Day(Now()))
ElseIf mode = "view" Then
Toolbar1.Buttons(1).Enabled = False
Toolbar1.Buttons(3).Enabled = False
Toolbar1.Buttons(4).Enabled = False
txtDesc.Enabled = False
txtApplicant.Enabled = False
txtTransactor.Enabled = False
ymdDjrq.Enabled = False
txtBuyrq.Enabled = False
Set mrc = ExecuteSQL("select * from tbl_device_register where register_id = " & register_id, MsgText, HasError)
If mrc.EOF = False Then
txtRegisterId = mrc.Fields("register_id")
txtDesc = mrc.Fields("register_desc")
txtApplicant = mrc.Fields("applicant")
txtTransactor = mrc.Fields("transactor")
ymdDjrq.FormatDate = mrc.Fields("djrq")
txtBuyrq = mrc.Fields("buyrq")
End If
txtSQL = "select * from tbl_device_register_items where register_id = '" & register_id & "'"
Set rst = ExecuteSQL(txtSQL, MsgText, HasError)
MSFlexGrid1.Rows = 1
Do While Not rst.EOF
MSFlexGrid1.AddItem rst.Fields("device_id") & vbTab _
& rst.Fields("item_id") & vbTab _
& rst.Fields("netcenter_id") & vbTab _
& rst.Fields("property_id") & vbTab _
& rst.Fields("model_id") & vbTab _
& rst.Fields("model_name") & vbTab _
& rst.Fields("manufacturer_id") & vbTab _
& rst.Fields("manufacturer_name") & vbTab _
& rst.Fields("type_id") & vbTab _
& rst.Fields("type_name") & vbTab _
& rst.Fields("sn")
rst.MoveNext
Loop
End If
End Sub
Sub Grid_Init()
With MSFlexGrid1
.FormatString = "|<行号|<中心编号|<固定资产号|<型号ID|<型号|<厂商ID|<厂商|<设备类型ID|<设备类型|<SN号"
.ColWidth(0) = 0
.ColWidth(1) = 800
.ColWidth(2) = 1900
.ColWidth(3) = 1900
.ColWidth(4) = 0
.ColWidth(5) = 800
.ColWidth(6) = 0
.ColWidth(7) = 800
.ColWidth(8) = 0
.ColWidth(9) = 1000
.ColWidth(10) = 1500
.Rows = 1
End With
Set mMSFlexGrid1 = New cFlexGridBinder
With mMSFlexGrid1
Set .Grid = MSFlexGrid1
.Editable = True
If mode = "add" Then
.EditOnMouse = emeClick
.BindColumn 2, txtEdit
.BindColumn 3, txtEdit
.BindColumn 10, txtEdit
ElseIf mode = "view" Then
.EditOnMouse = emeNone
.FullRowSelect = True
End If
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -