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

📄 frmdeviceoperation.frm

📁 网路设备资产管理系统
💻 FRM
📖 第 1 页 / 共 2 页
字号:
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 FrmDeviceOperation 
   Caption         =   "设备操作单"
   ClientHeight    =   6915
   ClientLeft      =   60
   ClientTop       =   450
   ClientWidth     =   9600
   Icon            =   "FrmDeviceOperation.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   ScaleHeight     =   6915
   ScaleWidth      =   9600
   StartUpPosition =   2  '屏幕中心
   Begin VB.TextBox txtEdit 
      BorderStyle     =   0  'None
      Height          =   315
      Left            =   3960
      TabIndex        =   21
      Top             =   4800
      Visible         =   0   'False
      Width           =   1245
   End
   Begin VB.OptionButton OptBySn 
      Caption         =   "SN号"
      Height          =   255
      Left            =   1560
      TabIndex        =   8
      Top             =   3480
      Width           =   735
   End
   Begin VB.OptionButton OptByNetcenterId 
      Caption         =   "中心编号"
      Height          =   255
      Left            =   480
      TabIndex        =   7
      Top             =   3480
      Width           =   1095
   End
   Begin VB.Frame Frame1 
      Caption         =   "单据资料"
      Height          =   2415
      Left            =   120
      TabIndex        =   3
      Top             =   960
      Width           =   9375
      Begin NetManager.YMDDate ymdOperrq 
         Height          =   375
         Left            =   5880
         TabIndex        =   0
         Top             =   240
         Width           =   3375
         _ExtentX        =   5953
         _ExtentY        =   661
      End
      Begin VB.ComboBox cboOperType 
         Height          =   300
         Left            =   6000
         TabIndex        =   19
         Text            =   "Combo1"
         Top             =   720
         Width           =   2175
      End
      Begin VB.TextBox txtMemo 
         Height          =   390
         Left            =   1200
         TabIndex        =   17
         Top             =   1680
         Width           =   6975
      End
      Begin VB.TextBox txtTransactor 
         Height          =   390
         Left            =   6000
         TabIndex        =   16
         Top             =   1200
         Width           =   2175
      End
      Begin VB.TextBox txtApplicant 
         Height          =   390
         Left            =   1200
         TabIndex        =   15
         Top             =   1200
         Width           =   2175
      End
      Begin VB.TextBox txtOperDesc 
         Height          =   390
         Left            =   1200
         TabIndex        =   1
         Top             =   720
         Width           =   2175
      End
      Begin VB.TextBox txtOperId 
         BackColor       =   &H80000011&
         Enabled         =   0   'False
         Height          =   390
         Left            =   1200
         TabIndex        =   6
         Top             =   240
         Width           =   2175
      End
      Begin VB.Label Label9 
         Caption         =   "日期:"
         Height          =   255
         Left            =   5040
         TabIndex        =   20
         Top             =   360
         Width           =   975
      End
      Begin VB.Label Label8 
         Caption         =   "操作类型:"
         Height          =   255
         Left            =   5040
         TabIndex        =   18
         Top             =   840
         Width           =   975
      End
      Begin VB.Label Label7 
         Caption         =   "备注:"
         Height          =   255
         Left            =   240
         TabIndex        =   14
         Top             =   1800
         Width           =   975
      End
      Begin VB.Label Label6 
         Caption         =   "经手人:"
         Height          =   255
         Left            =   5040
         TabIndex        =   13
         Top             =   1320
         Width           =   975
      End
      Begin VB.Label Label5 
         Caption         =   "申请人:"
         Height          =   255
         Left            =   240
         TabIndex        =   12
         Top             =   1320
         Width           =   975
      End
      Begin VB.Label Label4 
         Caption         =   "操作描述:"
         Height          =   255
         Left            =   240
         TabIndex        =   11
         Top             =   840
         Width           =   975
      End
      Begin VB.Label Label1 
         Caption         =   "流水号:"
         Height          =   255
         Left            =   240
         TabIndex        =   5
         Top             =   360
         Width           =   735
      End
   End
   Begin MSComctlLib.Toolbar Toolbar1 
      Align           =   1  'Align Top
      Height          =   780
      Left            =   0
      TabIndex        =   2
      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         =   "FrmDeviceOperation.frx":08CA
               Key             =   ""
            EndProperty
            BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628} 
               Picture         =   "FrmDeviceOperation.frx":11A4
               Key             =   ""
            EndProperty
            BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628} 
               Picture         =   "FrmDeviceOperation.frx":1A7E
               Key             =   ""
            EndProperty
            BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628} 
               Picture         =   "FrmDeviceOperation.frx":2358
               Key             =   ""
            EndProperty
         EndProperty
      End
   End
   Begin MSFlexGridLib.MSFlexGrid MSFlexGrid1 
      Height          =   3135
      Left            =   120
      TabIndex        =   4
      Top             =   3720
      Width           =   9375
      _ExtentX        =   16536
      _ExtentY        =   5530
      _Version        =   393216
      RowHeightMin    =   315
      WordWrap        =   -1  'True
      HighLight       =   0
      FillStyle       =   1
      AllowUserResizing=   1
   End
   Begin VB.Label Label3 
      Caption         =   "扫描"
      Height          =   255
      Left            =   2280
      TabIndex        =   10
      Top             =   3480
      Width           =   615
   End
   Begin VB.Label Label2 
      Caption         =   "按照"
      Height          =   255
      Left            =   120
      TabIndex        =   9
      Top             =   3480
      Width           =   375
   End
End
Attribute VB_Name = "FrmDeviceOperation"
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 oper_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

  cboOperType.AddItem "设备预领"
  cboOperType.AddItem "设备退库"
  cboOperType.AddItem "故障退库"
  cboOperType.AddItem "设备送修"
  cboOperType.AddItem "设备修返"
  cboOperType.AddItem "设备借出"
  cboOperType.AddItem "设备归还"
  cboOperType.AddItem "设备报废"
  cboOperType.Text = ""
  
  

If mode = "add" Then

   ymdOperrq.FormatDate = CStr(Year(Now())) & "-" & CStr(Month(Now())) & "-" & CStr(Day(Now()))
   OptByNetcenterId.Value = True
  
  
ElseIf mode = "view" Then

  '''''''''''''''''''''''''''''''''''
  Toolbar1.Buttons(1).Enabled = False
  Toolbar1.Buttons(3).Enabled = False
  Toolbar1.Buttons(4).Enabled = False
  
  txtOperDesc.Enabled = False
  txtApplicant.Enabled = False
  txtTransactor.Enabled = False
  txtMemo.Enabled = False
  cboOperType.Enabled = False
  ymdOperrq.Enabled = False
  
  OptByNetcenterId.Enabled = False
  OptBySn.Enabled = False
  
 Set mrc = ExecuteSQL("select * from tbl_device_oper where oper_id = " & oper_id, MsgText, HasError)
    
  If mrc.EOF = False Then
        txtOperId = mrc.Fields("oper_id")
        txtOperDesc = mrc.Fields("oper_desc")
        cboOperType = mrc.Fields("oper_type")
        txtApplicant = mrc.Fields("applicant")
        txtTransactor = mrc.Fields("transactor")
        ymdOperrq.FormatDate = mrc.Fields("operrq")
        txtMemo = mrc.Fields("memo")
  End If
  

  txtSQL = "select * from tbl_device_oper_items where oper_id = '" & oper_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
    
       If mode = "add" Then
          .FormatString = "|<行号|<中心编号|<固定资产号|<型号ID|<型号|<厂商ID|<厂商|<设备类型ID|<设备类型|<SN号|<状态"
       ElseIf mode = "view" Then
          .FormatString = "|<行号|<中心编号|<固定资产号|<型号ID|<型号|<厂商ID|<厂商|<设备类型ID|<设备类型|<SN号"
       End If
       
       
        .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
        
        
      If mode = "add" Then
          .ColWidth(11) = 1000
      End If
        


        .Rows = 1

    End With
    

⌨️ 快捷键说明

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