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

📄 frmstoreinedit.frm

📁 主要是基本的办公用品管理操作界面, 包含基本信息管理、办公用品管理
💻 FRM
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Object = "{F0D2F211-CCB0-11D0-A316-00AA00688B10}#1.0#0"; "MSDATLST.OCX"
Begin VB.Form FrmStoreInEdit 
   Caption         =   "编辑办公用品入库信息"
   ClientHeight    =   4200
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   7050
   LinkTopic       =   "Form1"
   ScaleHeight     =   4200
   ScaleWidth      =   7050
   StartUpPosition =   2  '屏幕中心
   Begin MSDataListLib.DataCombo dco_Store 
      Height          =   315
      Left            =   4800
      TabIndex        =   14
      Top             =   240
      Width           =   1455
      _ExtentX        =   2566
      _ExtentY        =   582
      _Version        =   393216
      Style           =   2
      Text            =   ""
   End
   Begin VB.TextBox txtSum 
      Height          =   330
      Left            =   4800
      TabIndex        =   10
      Text            =   "0"
      Top             =   1335
      Width           =   1455
   End
   Begin VB.CommandButton Cmd_Cancel 
      Caption         =   "取 消"
      Height          =   495
      Left            =   3998
      TabIndex        =   9
      Top             =   3480
      Width           =   1215
   End
   Begin VB.CommandButton Cmd_OK 
      Caption         =   "确 定"
      Height          =   495
      Left            =   1838
      TabIndex        =   8
      Top             =   3480
      Width           =   1215
   End
   Begin VB.TextBox txtMemo 
      Height          =   810
      Left            =   1560
      MultiLine       =   -1  'True
      ScrollBars      =   2  'Vertical
      TabIndex        =   6
      Top             =   2445
      Width           =   4695
   End
   Begin VB.TextBox txtAmount 
      Height          =   330
      Left            =   1560
      TabIndex        =   4
      Text            =   "0"
      Top             =   1335
      Width           =   1455
   End
   Begin VB.TextBox txtDate 
      Height          =   330
      Left            =   1560
      TabIndex        =   1
      Top             =   1845
      Width           =   1455
   End
   Begin MSDataListLib.DataCombo dco_Type 
      Height          =   315
      Left            =   3120
      TabIndex        =   12
      Top             =   240
      Width           =   1455
      _ExtentX        =   2566
      _ExtentY        =   582
      _Version        =   393216
      Style           =   2
      Text            =   ""
   End
   Begin MSAdodcLib.Adodc Ado_Type 
      Height          =   375
      Left            =   3240
      Top             =   1800
      Visible         =   0   'False
      Width           =   1935
      _ExtentX        =   3413
      _ExtentY        =   661
      ConnectMode     =   0
      CursorLocation  =   3
      IsolationLevel  =   -1
      ConnectionTimeout=   15
      CommandTimeout  =   30
      CursorType      =   3
      LockType        =   3
      CommandType     =   8
      CursorOptions   =   0
      CacheSize       =   50
      MaxRecords      =   0
      BOFAction       =   0
      EOFAction       =   0
      ConnectStringType=   1
      Appearance      =   1
      BackColor       =   -2147483643
      ForeColor       =   -2147483640
      Orientation     =   0
      Enabled         =   -1
      Connect         =   ""
      OLEDBString     =   ""
      OLEDBFile       =   ""
      DataSourceName  =   ""
      OtherAttributes =   ""
      UserName        =   ""
      Password        =   ""
      RecordSource    =   ""
      Caption         =   "Ado_Type"
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      _Version        =   393216
   End
   Begin MSDataListLib.DataCombo dco_UType 
      Height          =   315
      Left            =   1560
      TabIndex        =   13
      Top             =   240
      Width           =   1455
      _ExtentX        =   2566
      _ExtentY        =   582
      _Version        =   393216
      Style           =   2
      Text            =   ""
   End
   Begin MSAdodcLib.Adodc Ado_UType 
      Height          =   375
      Left            =   4560
      Top             =   1800
      Visible         =   0   'False
      Width           =   1935
      _ExtentX        =   3413
      _ExtentY        =   661
      ConnectMode     =   0
      CursorLocation  =   3
      IsolationLevel  =   -1
      ConnectionTimeout=   15
      CommandTimeout  =   30
      CursorType      =   3
      LockType        =   3
      CommandType     =   8
      CursorOptions   =   0
      CacheSize       =   50
      MaxRecords      =   0
      BOFAction       =   0
      EOFAction       =   0
      ConnectStringType=   1
      Appearance      =   1
      BackColor       =   -2147483643
      ForeColor       =   -2147483640
      Orientation     =   0
      Enabled         =   -1
      Connect         =   ""
      OLEDBString     =   ""
      OLEDBFile       =   ""
      DataSourceName  =   ""
      OtherAttributes =   ""
      UserName        =   ""
      Password        =   ""
      RecordSource    =   ""
      Caption         =   "Ado_UType"
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      _Version        =   393216
   End
   Begin MSDataListLib.DataCombo dco_Supplier 
      Height          =   315
      Left            =   1560
      TabIndex        =   15
      Top             =   840
      Width           =   3015
      _ExtentX        =   5318
      _ExtentY        =   582
      _Version        =   393216
      Style           =   2
      Text            =   ""
   End
   Begin MSAdodcLib.Adodc Ado_Supplier 
      Height          =   375
      Left            =   120
      Top             =   3720
      Visible         =   0   'False
      Width           =   1935
      _ExtentX        =   3413
      _ExtentY        =   661
      ConnectMode     =   0
      CursorLocation  =   3
      IsolationLevel  =   -1
      ConnectionTimeout=   15
      CommandTimeout  =   30
      CursorType      =   3
      LockType        =   3
      CommandType     =   8
      CursorOptions   =   0
      CacheSize       =   50
      MaxRecords      =   0
      BOFAction       =   0
      EOFAction       =   0
      ConnectStringType=   1
      Appearance      =   1
      BackColor       =   -2147483643
      ForeColor       =   -2147483640
      Orientation     =   0
      Enabled         =   -1
      Connect         =   ""
      OLEDBString     =   ""
      OLEDBFile       =   ""
      DataSourceName  =   ""
      OtherAttributes =   ""
      UserName        =   ""
      Password        =   ""
      RecordSource    =   ""
      Caption         =   "Ado_Supplier"
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      _Version        =   393216
   End
   Begin MSAdodcLib.Adodc Ado_Store 
      Height          =   375
      Left            =   120
      Top             =   3240
      Visible         =   0   'False
      Width           =   1935
      _ExtentX        =   3413
      _ExtentY        =   661
      ConnectMode     =   0
      CursorLocation  =   3
      IsolationLevel  =   -1
      ConnectionTimeout=   15
      CommandTimeout  =   30
      CursorType      =   3
      LockType        =   3
      CommandType     =   8
      CursorOptions   =   0
      CacheSize       =   50
      MaxRecords      =   0
      BOFAction       =   0
      EOFAction       =   0
      ConnectStringType=   1
      Appearance      =   1
      BackColor       =   -2147483643
      ForeColor       =   -2147483640
      Orientation     =   0
      Enabled         =   -1
      Connect         =   ""
      OLEDBString     =   ""
      OLEDBFile       =   ""
      DataSourceName  =   ""
      OtherAttributes =   ""
      UserName        =   ""
      Password        =   ""
      RecordSource    =   ""
      Caption         =   "Ado_Store"
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      _Version        =   393216
   End
   Begin VB.Label Label6 
      AutoSize        =   -1  'True
      Caption         =   "入库总金额"
      Height          =   195
      Left            =   3660
      TabIndex        =   11
      Top             =   1410
      Width           =   900
   End
   Begin VB.Label Label5 
      AutoSize        =   -1  'True
      Caption         =   "备   注"
      Height          =   180
      Left            =   690
      TabIndex        =   7
      Top             =   2520
      Width           =   630
   End
   Begin VB.Label Label4 
      AutoSize        =   -1  'True
      Caption         =   "入库数量"
      Height          =   195
      Left            =   600
      TabIndex        =   5
      Top             =   1410
      Width           =   720
   End
   Begin VB.Label Label3 
      AutoSize        =   -1  'True
      Caption         =   "供应商名称"
      Height          =   195
      Left            =   420
      TabIndex        =   3
      Top             =   870
      Width           =   900
   End
   Begin VB.Label Label2 
      AutoSize        =   -1  'True
      Caption         =   "办公用品名称"
      Height          =   195
      Left            =   240
      TabIndex        =   2
      Top             =   315
      Width           =   1080
   End
   Begin VB.Label Label1 
      AutoSize        =   -1  'True
      Caption         =   "入库日期"
      Height          =   195
      Left            =   600
      TabIndex        =   0
      Top             =   1920
      Width           =   720
   End
End
Attribute VB_Name = "FrmStoreInEdit"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public OriInId As Long
Public Modify As Boolean

Private Sub Cmd_Cancel_Click()
  Unload Me
End Sub

Private Sub Cmd_OK_Click()
  If Len(Trim(dco_UType.Text)) = 0 Then
    MsgBox "请选择一级分类名称"
    dco_UType.SetFocus
    Exit Sub
  End If
  If Len(Trim(dco_Type.Text)) = 0 Then
    MsgBox "请选择二级分类名称"
    dco_Type.SetFocus
    Exit Sub
  End If
  If Len(Trim(dco_Store.Text)) = 0 Then
    MsgBox "请选择办公用品名称"
    dco_Store.SetFocus
    Exit Sub
  End If
  If Len(Trim(dco_Supplier.Text)) = 0 Then
    MsgBox "请选择供货商名称"
    dco_Supplier.SetFocus
    Exit Sub
  End If
  If Len(Trim(txtDate)) = 0 Then
    MsgBox "请输入入库日期"
    txtDate.SetFocus
    Exit Sub
  End If
  If Len(Trim(txtAmount)) = 0 Or Val(txtAmount) = 0 Then
    MsgBox "请输入入库数量"
    txtAmount.SetFocus
    Exit Sub
  End If
  With MyIn
    .OId = dco_Store.BoundText()
    .InDate = Trim(txtDate)
    .SId = dco_Supplier.BoundText()
    .InAmount = Val(txtAmount)
    .InSum = Val(txtSum)
    .Memos = Trim(txtMemo)
    If Modify = False Then
      .Insert
      MsgBox "添加成功"
    Else
      .Update (OriInId)
      MsgBox "保存成功"
    End If
  End With
  Unload Me
End Sub

Private Sub dco_Type_Click(Area As Integer)
  If Len(Trim(dco_Type.Text)) > 0 Then
    Ado_Store.ConnectionString = Conn
    Ado_Store.RecordSource = "Select * From Store Where TypeId=" + Trim(dco_Type.BoundText()) + " Order By OId"
    Ado_Store.Refresh
    Set dco_Store.RowSource = Ado_Store
    dco_Store.ListField = "OName"
    dco_Store.BoundColumn = "OId"
    dco_Store.Text = ""
  End If
End Sub

Private Sub dco_UType_Click(Area As Integer)
  If Len(Trim(dco_UType.Text)) > 0 Then
    Ado_Type.ConnectionString = Conn
    Ado_Type.RecordSource = "Select * From Types Where UpperId=" + Trim(dco_UType.BoundText()) + " Order By TypeId"
    Ado_Type.Refresh
    Set dco_Type.RowSource = Ado_Type
    dco_Type.ListField = "TypeName"
    dco_Type.BoundColumn = "TypeId"
    dco_Type.Text = ""
  End If
End Sub

Private Sub Form_Load()
  '装入分类信息
  Ado_UType.ConnectionString = Conn
  Ado_UType.RecordSource = "Select * From Types Where UpperId=0 Order By TypeId"
  Ado_UType.Refresh
  Set dco_UType.RowSource = Ado_UType
  dco_UType.ListField = "TypeName"
  dco_UType.BoundColumn = "TypeId"
  '装入二级分类信息
  Ado_Type.ConnectionString = Conn
  Ado_Type.RecordSource = "Select * From Types Where UpperId>0 Order By TypeId"
  Ado_Type.Refresh
  Set dco_Type.RowSource = Ado_Type
  dco_Type.ListField = "TypeName"
  dco_Type.BoundColumn = "TypeId"
  '装入办公用品信息
  Ado_Store.ConnectionString = Conn
  Ado_Store.RecordSource = "Select * From Store Order By OId"
  Ado_Store.Refresh
  Set dco_Store.RowSource = Ado_Store
  dco_Store.ListField = "OName"
  dco_Store.BoundColumn = "OId"
  '装入供应商信息
  Ado_Supplier.ConnectionString = Conn
  Ado_Supplier.RecordSource = "Select * From Supplier Order By SId"
  Ado_Supplier.Refresh
  Set dco_Supplier.RowSource = Ado_Supplier
  dco_Supplier.ListField = "SName"
  dco_Supplier.BoundColumn = "SId"
End Sub

⌨️ 快捷键说明

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