📄 frmdevicesetup.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 FrmDeviceSetup
Caption = "设备上线单"
ClientHeight = 6840
ClientLeft = 60
ClientTop = 450
ClientWidth = 10770
Icon = "FrmDeviceSetup.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
ScaleHeight = 6840
ScaleWidth = 10770
StartUpPosition = 2 '屏幕中心
Begin VB.ComboBox cboRoom
Height = 300
Left = 6840
Style = 2 'Dropdown List
TabIndex = 16
Top = 5040
Visible = 0 'False
Width = 1005
End
Begin VB.ComboBox cboBuilding
Height = 300
Left = 6840
Style = 2 'Dropdown List
TabIndex = 15
Top = 4560
Visible = 0 'False
Width = 1005
End
Begin VB.ComboBox cboArea
Height = 300
Left = 6840
Style = 2 'Dropdown List
TabIndex = 14
Top = 4080
Visible = 0 'False
Width = 1005
End
Begin VB.TextBox txtEdit
BorderStyle = 0 'None
Height = 315
Left = 4440
TabIndex = 13
Top = 4920
Visible = 0 'False
Width = 1245
End
Begin VB.Frame Frame1
Caption = "单据资料"
Height = 1815
Left = 120
TabIndex = 2
Top = 960
Width = 10575
Begin VB.TextBox txtSetupId
BackColor = &H80000011&
Enabled = 0 'False
Height = 390
Left = 1200
TabIndex = 5
Top = 240
Width = 2175
End
Begin VB.TextBox txtSetupDesc
Height = 390
Left = 1200
TabIndex = 0
Top = 720
Width = 2175
End
Begin VB.TextBox txtApplicant
Height = 390
Left = 1200
TabIndex = 4
Top = 1200
Width = 2175
End
Begin VB.TextBox txtTransactor
Height = 390
Left = 6960
TabIndex = 6
Top = 1200
Width = 2175
End
Begin NetManager.YMDDate ymdSetuprq
Height = 375
Left = 6840
TabIndex = 3
Top = 720
Width = 3375
_ExtentX = 5953
_ExtentY = 661
End
Begin VB.Label Label1
Caption = "流水号:"
Height = 255
Left = 240
TabIndex = 11
Top = 360
Width = 735
End
Begin VB.Label Label4
Caption = "上线描述:"
Height = 255
Left = 240
TabIndex = 10
Top = 840
Width = 975
End
Begin VB.Label Label5
Caption = "申请人:"
Height = 255
Left = 240
TabIndex = 9
Top = 1320
Width = 975
End
Begin VB.Label Label6
Caption = "经手人:"
Height = 255
Left = 5760
TabIndex = 8
Top = 1320
Width = 975
End
Begin VB.Label Label9
Caption = "日期:"
Height = 255
Left = 5760
TabIndex = 7
Top = 840
Width = 975
End
End
Begin MSComctlLib.Toolbar Toolbar1
Align = 1 'Align Top
Height = 780
Left = 0
TabIndex = 1
Top = 0
Width = 10770
_ExtentX = 18997
_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 = "FrmDeviceSetup.frx":08CA
Key = ""
EndProperty
BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "FrmDeviceSetup.frx":11A4
Key = ""
EndProperty
BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "FrmDeviceSetup.frx":1A7E
Key = ""
EndProperty
BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "FrmDeviceSetup.frx":2358
Key = ""
EndProperty
EndProperty
End
End
Begin MSFlexGridLib.MSFlexGrid MSFlexGrid1
Height = 3855
Left = 120
TabIndex = 12
Top = 2880
Width = 10575
_ExtentX = 18653
_ExtentY = 6800
_Version = 393216
RowHeightMin = 315
WordWrap = -1 'True
HighLight = 0
FillStyle = 1
AllowUserResizing= 1
End
End
Attribute VB_Name = "FrmDeviceSetup"
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 setup_id As String
Private WithEvents mMSFlexGrid1 As cFlexGridBinder
Attribute mMSFlexGrid1.VB_VarHelpID = -1
Const COL_NETCENTER_ID As Long = 2
Dim i As Integer
Private Sub Form_Load()
Grid_Init
If mode = "add" Then
ymdSetuprq.FormatDate = CStr(Year(Now())) & "-" & CStr(Month(Now())) & "-" & CStr(Day(Now()))
Set rst = ExecuteSQL("select * from tbl_area", MsgText, HasError)
Do While Not rst.EOF
cboArea.AddItem rst.Fields("area_name")
rst.MoveNext
Loop
ElseIf mode = "view" Then
'''''''''''''''''''''''''''''''''''
Toolbar1.Buttons(1).Enabled = False
Toolbar1.Buttons(3).Enabled = False
Toolbar1.Buttons(4).Enabled = False
txtSetupDesc.Enabled = False
txtApplicant.Enabled = False
txtTransactor.Enabled = False
ymdSetuprq.Enabled = False
Set mrc = ExecuteSQL("select * from tbl_device_setup where setup_id = " & setup_id, MsgText, HasError)
If mrc.EOF = False Then
txtSetupId = mrc.Fields("setup_id")
txtSetupDesc = mrc.Fields("setup_desc")
txtApplicant = mrc.Fields("applicant")
txtTransactor = mrc.Fields("transactor")
ymdSetuprq.FormatDate = mrc.Fields("setuprq")
End If
txtSQL = "select * from tbl_device_setup_items where setup_id = '" & setup_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("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("area_id") & vbTab _
& rst.Fields("area_name") & vbTab _
& rst.Fields("building_id") & vbTab _
& rst.Fields("building_name") & vbTab _
& rst.Fields("room_id") & vbTab _
& rst.Fields("room_name") & vbTab _
& rst.Fields("ip")
rst.MoveNext
Loop
'''''''''''''''''''''''''''''''''''''''''
End If
End Sub
Sub Grid_Init()
With MSFlexGrid1
If mode = "add" Then
.FormatString = "|<行号|<中心编号|<型号ID|<型号|<厂商ID|<厂商|<设备类型ID|<设备类型|<校区ID|<校区|<楼栋ID|<楼栋|<房间ID|<房间|<IP|<状态"
ElseIf mode = "view" Then
.FormatString = "|<行号|<中心编号|<型号ID|<型号|<厂商ID|<厂商|<设备类型ID|<设备类型|<校区ID|<校区|<楼栋ID|<楼栋|<房间ID|<房间|<IP"
End If
.ColWidth(0) = 0
.ColWidth(1) = 600
.ColWidth(2) = 1200
.ColWidth(3) = 0
.ColWidth(4) = 1000
.ColWidth(5) = 0
.ColWidth(6) = 800
.ColWidth(7) = 0
.ColWidth(8) = 1000
.ColWidth(9) = 0
.ColWidth(10) = 1000
.ColWidth(11) = 0
.ColWidth(12) = 1000
.ColWidth(13) = 0
.ColWidth(14) = 1500
.ColWidth(15) = 1500
If mode = "add" Then
.ColWidth(16) = 800
End If
.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 10, cboArea
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -