⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 frmdevicedetail.frm

📁 网路设备资产管理系统
💻 FRM
📖 第 1 页 / 共 3 页
字号:
            Top             =   1440
            Width           =   975
         End
         Begin VB.Label Label9 
            Caption         =   "厂商:"
            Height          =   255
            Left            =   4440
            TabIndex        =   7
            Top             =   960
            Width           =   735
         End
      End
      Begin MSFlexGridLib.MSFlexGrid MSFlexGrid1 
         Height          =   4215
         Left            =   -74880
         TabIndex        =   17
         Top             =   480
         Width           =   8415
         _ExtentX        =   14843
         _ExtentY        =   7435
         _Version        =   393216
         RowHeightMin    =   315
         WordWrap        =   -1  'True
         HighLight       =   0
         FillStyle       =   1
         AllowUserResizing=   1
      End
   End
   Begin MSComctlLib.Toolbar Toolbar1 
      Height          =   780
      Left            =   0
      TabIndex        =   0
      Top             =   0
      Width           =   9495
      _ExtentX        =   16748
      _ExtentY        =   1376
      ButtonWidth     =   1032
      ButtonHeight    =   1376
      Style           =   1
      ImageList       =   "ImageList1"
      _Version        =   393216
      BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628} 
         NumButtons      =   4
         BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Caption         =   "保存"
            Key             =   "保存"
            ImageIndex      =   2
         EndProperty
         BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Caption         =   "删除"
            Key             =   "删除"
            ImageIndex      =   3
         EndProperty
         BeginProperty Button3 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Style           =   3
         EndProperty
         BeginProperty Button4 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Caption         =   "关闭"
            Key             =   "关闭"
            ImageIndex      =   4
         EndProperty
      EndProperty
      Begin MSComctlLib.ImageList ImageList1 
         Left            =   4680
         Top             =   120
         _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         =   "FrmDeviceDetail.frx":091E
               Key             =   ""
            EndProperty
            BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628} 
               Picture         =   "FrmDeviceDetail.frx":11F8
               Key             =   ""
            EndProperty
            BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628} 
               Picture         =   "FrmDeviceDetail.frx":1AD2
               Key             =   ""
            EndProperty
            BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628} 
               Picture         =   "FrmDeviceDetail.frx":23AC
               Key             =   ""
            EndProperty
         EndProperty
      End
   End
End
Attribute VB_Name = "FrmDeviceDetail"
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 device_id As Integer

Private WithEvents mMSFlexGrid1 As cFlexGridBinder
Attribute mMSFlexGrid1.VB_VarHelpID = -1





Private Sub cboState_click()

If cur_priv_sbzlxg = False Then
  Exit Sub
End If

If Trim(cboState.Text) <> "上线" Then
       
        cboArea = ""
        txtAreaId = ""
        cboBuilding = ""
        txtBuildingId = ""
        cboRoom = ""
        txtRoomId = ""
        
End If

End Sub

Private Sub Form_Load()
  

    
  Toolbar1.Buttons(1).Enabled = cur_priv_sbzlxg
  Toolbar1.Buttons(2).Enabled = cur_priv_sbzlxg
  

If cur_priv_sbzlxg = False Then
  txtNetcenterId.BackColor = &H80000011
  txtPropertyId.BackColor = &H80000011
  txtSN.BackColor = &H80000011
  
  cboArea.BackColor = &H80000011
  cboBuilding.BackColor = &H80000011
  cboRoom.BackColor = &H80000011
  cboState.BackColor = &H80000011
  
  txtBuyrq.BackColor = &H80000011
  txtMemo.BackColor = &H80000011
Else

  cboState.AddItem "在库"
  cboState.AddItem "预领"
  cboState.AddItem "上线"
  cboState.AddItem "故障"
  cboState.AddItem "送修"
  cboState.AddItem "借出"
  cboState.AddItem "报废"
  cboState.Text = ""
  
  
   Set rst = ExecuteSQL("select * from tbl_area", MsgText, HasError)
   Do While Not rst.EOF
      cboArea.AddItem rst.Fields("area_name")
      rst.MoveNext
   Loop
   cboArea.Text = ""
   cboBuilding.Text = ""
   cboRoom.Text = ""
End If

  
  SSTab1.Tab = 0

    

   
Call device_load
  
End Sub

Sub device_load()

If device_id > 0 Then

  
    
  Set mrc = ExecuteSQL("select * from tbl_device where device_id = " & device_id, MsgText, HasError)
    
  If mrc.EOF = False Then
        txtNetcenterId = mrc.Fields("netcenter_id")
        txtOldNetcenterId = mrc.Fields("netcenter_id")
        txtPropertyId = mrc.Fields("property_id")
        
        txtModel = mrc.Fields("model_name")
        txtModelId = mrc.Fields("model_id")
        txtManufacturer = mrc.Fields("manufacturer_name")
        txtManufacturerId = mrc.Fields("manufacturer_id")
        txtType = mrc.Fields("type_name")
        txtTypeId = mrc.Fields("type_id")
        
        txtSN = mrc.Fields("sn")
        
        cboArea = mrc.Fields("area_name") & ""
        txtAreaId = mrc.Fields("area_id") & ""
        cboBuilding = mrc.Fields("building_name") & ""
        txtBuildingId = mrc.Fields("building_id") & ""
        cboRoom = mrc.Fields("room_name") & ""
        txtRoomId = mrc.Fields("room_id") & ""
        
        cboState = mrc.Fields("state")
        
        txtIp = mrc.Fields("ip")
        txtBuyrq = mrc.Fields("buyrq")
        txtMemo = mrc.Fields("memo")
  End If
  
  Grid_Init
  Grid_Fill
  
End If

End Sub

Sub Grid_Init()

    With MSFlexGrid1
        .FormatString = "|<日期|<操作日志|<申请人|<经手人"
        .ColWidth(0) = 0
        .ColWidth(1) = 1000
        .ColWidth(2) = 4600
        .ColWidth(3) = 1200
        .ColWidth(4) = 1200

        .Rows = 1

    End With
    
    Set mMSFlexGrid1 = New cFlexGridBinder
    With mMSFlexGrid1
        Set .Grid = MSFlexGrid1
        
        .Editable = True
        .EditOnMouse = emeNone

        .FullRowSelect = True
        
    End With

End Sub

Sub Grid_Fill()

Dim rst As ADODB.Recordset
Set rst = New ADODB.Recordset
txtSQL = "select * from tbl_device_log where device_id = " & device_id
Set rst = ExecuteSQL(txtSQL, MsgText, HasError)

   
   MSFlexGrid1.Rows = 1
    
    Do While Not rst.EOF
        MSFlexGrid1.AddItem vbTab & rst.Fields("logrq") & vbTab & rst.Fields("log_text") & vbTab & rst.Fields("applicant") & vbTab & rst.Fields("transactor")
    rst.MoveNext
    Loop
    

End Sub


Private Sub cboArea_Click()

If cur_priv_sbzlxg = False Then
  Exit Sub
End If

          cboBuilding.Clear
          cboRoom.Clear
          
          Set rst = ExecuteSQL("select * from tbl_area where area_name = '" & cboArea & "'", MsgText, HasError)
          If rst.EOF = False Then
          txtAreaId = rst.Fields("area_id")
          
            Set rst = ExecuteSQL("select * from tbl_building where area_id = " & txtAreaId, MsgText, HasError)
    
            Do While Not rst.EOF
             cboBuilding.AddItem rst.Fields("building_name")
             rst.MoveNext
            Loop
          End If
          
          

          cboBuilding.Text = ""
          txtBuildingId.Text = ""
          cboRoom.Text = ""
          txtRoomId.Text = ""
End Sub

Private Sub cboBuilding_Click()

If cur_priv_sbzlxg = False Then
  Exit Sub
End If

          cboRoom.Clear
          
          Set rst = ExecuteSQL("select * from tbl_building where area_id = " & txtAreaId & " and building_name = '" & cboBuilding & "'", MsgText, HasError)
          If rst.EOF = False Then
          txtBuildingId = rst.Fields("building_id")
          
            Set rst = ExecuteSQL("select * from tbl_room where building_id = " & txtBuildingId, MsgText, HasError)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -