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

📄 frmcommodity.frm

📁 传销工资管理 请验证一下哈
💻 FRM
📖 第 1 页 / 共 2 页
字号:
                  Alignment       =   2
                  ColumnWidth     =   2624.882
               EndProperty
               BeginProperty Column02 
                  Alignment       =   1
                  ColumnWidth     =   1080
               EndProperty
               BeginProperty Column03 
                  Alignment       =   1
                  ColumnWidth     =   1080
               EndProperty
               BeginProperty Column04 
               EndProperty
            EndProperty
         End
      End
      Begin VB.TextBox txt积分 
         BackColor       =   &H00C0FFFF&
         DataField       =   "货品单位积分"
         DataSource      =   "Adodc1"
         ForeColor       =   &H00FF0000&
         Height          =   315
         Left            =   5355
         MaxLength       =   4
         TabIndex        =   9
         Top             =   900
         Width           =   2115
      End
      Begin VB.TextBox txt单价 
         BackColor       =   &H00C0FFFF&
         DataField       =   "货品单价"
         DataSource      =   "Adodc1"
         ForeColor       =   &H00FF0000&
         Height          =   315
         Left            =   1650
         TabIndex        =   7
         Top             =   900
         Width           =   1965
      End
      Begin VB.TextBox txt品名 
         BackColor       =   &H00C0FFFF&
         DataField       =   "货品品名"
         DataSource      =   "Adodc1"
         ForeColor       =   &H00FF0000&
         Height          =   315
         Left            =   5370
         MaxLength       =   40
         TabIndex        =   5
         Top             =   375
         Width           =   2115
      End
      Begin VB.TextBox txt代号 
         BackColor       =   &H00C0FFFF&
         DataField       =   "货品代号"
         DataSource      =   "Adodc1"
         ForeColor       =   &H00FF0000&
         Height          =   315
         Left            =   1650
         MaxLength       =   50
         TabIndex        =   3
         Top             =   375
         Width           =   1965
      End
      Begin VB.Label Label5 
         Caption         =   "单位积分"
         ForeColor       =   &H00FF0000&
         Height          =   165
         Left            =   4200
         TabIndex        =   8
         Top             =   975
         Width           =   765
      End
      Begin VB.Label Label4 
         Caption         =   "商品单价"
         ForeColor       =   &H00FF0000&
         Height          =   165
         Left            =   600
         TabIndex        =   6
         Top             =   975
         Width           =   765
      End
      Begin VB.Label Label3 
         Caption         =   "商品品名"
         ForeColor       =   &H00FF0000&
         Height          =   165
         Left            =   4200
         TabIndex        =   4
         Top             =   450
         Width           =   765
      End
      Begin VB.Label Label2 
         Caption         =   "商品代号"
         ForeColor       =   &H00FF0000&
         Height          =   165
         Left            =   600
         TabIndex        =   2
         Top             =   450
         Width           =   765
      End
   End
   Begin MSAdodcLib.Adodc Adodc1 
      Height          =   330
      Left            =   5250
      Top             =   5475
      Visible         =   0   'False
      Width           =   2085
      _ExtentX        =   3678
      _ExtentY        =   582
      ConnectMode     =   0
      CursorLocation  =   3
      IsolationLevel  =   -1
      ConnectionTimeout=   15
      CommandTimeout  =   30
      CursorType      =   1
      LockType        =   3
      CommandType     =   2
      CursorOptions   =   0
      CacheSize       =   50
      MaxRecords      =   0
      BOFAction       =   0
      EOFAction       =   0
      ConnectStringType=   1
      Appearance      =   1
      BackColor       =   16777215
      ForeColor       =   16711680
      Orientation     =   0
      Enabled         =   -1
      Connect         =   "Provider=Microsoft.Jet.OLEDB.3.51;Persist Security Info=False;Data Source=C:\SYSTEM\DATABASE\SYSTEM.MDB"
      OLEDBString     =   "Provider=Microsoft.Jet.OLEDB.3.51;Persist Security Info=False;Data Source=C:\SYSTEM\DATABASE\SYSTEM.MDB"
      OLEDBFile       =   ""
      DataSourceName  =   ""
      OtherAttributes =   ""
      UserName        =   ""
      Password        =   ""
      RecordSource    =   "货品资料"
      Caption         =   "货品资料"
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      _Version        =   393216
   End
   Begin ComctlLib.ImageList ImageList1 
      Left            =   8100
      Top             =   1050
      _ExtentX        =   1005
      _ExtentY        =   1005
      BackColor       =   -2147483643
      ImageWidth      =   32
      ImageHeight     =   32
      MaskColor       =   12632256
      _Version        =   327682
      BeginProperty Images {0713E8C2-850A-101B-AFC0-4210102A8DA7} 
         NumListImages   =   9
         BeginProperty ListImage1 {0713E8C3-850A-101B-AFC0-4210102A8DA7} 
            Picture         =   "frmCommodity.frx":0015
            Key             =   ""
         EndProperty
         BeginProperty ListImage2 {0713E8C3-850A-101B-AFC0-4210102A8DA7} 
            Picture         =   "frmCommodity.frx":032F
            Key             =   ""
         EndProperty
         BeginProperty ListImage3 {0713E8C3-850A-101B-AFC0-4210102A8DA7} 
            Picture         =   "frmCommodity.frx":0649
            Key             =   ""
         EndProperty
         BeginProperty ListImage4 {0713E8C3-850A-101B-AFC0-4210102A8DA7} 
            Picture         =   "frmCommodity.frx":0963
            Key             =   ""
         EndProperty
         BeginProperty ListImage5 {0713E8C3-850A-101B-AFC0-4210102A8DA7} 
            Picture         =   "frmCommodity.frx":0C7D
            Key             =   ""
         EndProperty
         BeginProperty ListImage6 {0713E8C3-850A-101B-AFC0-4210102A8DA7} 
            Picture         =   "frmCommodity.frx":0F97
            Key             =   ""
         EndProperty
         BeginProperty ListImage7 {0713E8C3-850A-101B-AFC0-4210102A8DA7} 
            Picture         =   "frmCommodity.frx":12B1
            Key             =   ""
         EndProperty
         BeginProperty ListImage8 {0713E8C3-850A-101B-AFC0-4210102A8DA7} 
            Picture         =   "frmCommodity.frx":15CB
            Key             =   ""
         EndProperty
         BeginProperty ListImage9 {0713E8C3-850A-101B-AFC0-4210102A8DA7} 
            Picture         =   "frmCommodity.frx":18E5
            Key             =   ""
         EndProperty
      EndProperty
   End
End
Attribute VB_Name = "frmCommodity"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Sub LockedOrNo(InputVar As Boolean)
  cmdFirst.Enabled = InputVar
  cmdNext.Enabled = InputVar
  cmdPrevious.Enabled = InputVar
  cmdLast.Enabled = InputVar
  
  txt代号.Locked = InputVar
  txt品名.Locked = InputVar
  txt单价.Locked = InputVar
  txt积分.Locked = InputVar
End Sub

Private Sub cmdAddNew_Click()
On Error GoTo ErrorHandle
  InputVar = False
  LockedOrNo (InputVar)

  Adodc1.Recordset.AddNew
  Exit Sub
ErrorHandle:
  Exit Sub
End Sub

Private Sub cmdClose_Click()
  If txt代号.Text = "" And txt品名.Text = "" And txt单价.Text = "" And txt积分.Text = "" Then
     MsgBox "商品代号、商品品名、单价、单位积分不能为空!"
     Exit Sub
  End If
  
  Unload Me
End Sub

Private Sub cmdDelete_Click()
On Error GoTo ErrorHandle
  Adodc1.Recordset.Delete
ErrorHandle:
  Exit Sub
End Sub

Private Sub cmdFirst_Click()
On Error GoTo ErrorHandle
  Adodc1.Recordset.MoveFirst
ErrorHandle:
  Exit Sub
End Sub

Private Sub cmdLast_Click()
On Error GoTo ErrorHandle
  Adodc1.Recordset.MoveLast
ErrorHandle:
  Exit Sub
End Sub

Private Sub cmdModify_Click()
  InputVar = False
  LockedOrNo (InputVar)
End Sub

Private Sub cmdNext_Click()
On Error GoTo ErrorHandle
  With Adodc1.Recordset
    .MoveNext
    If .EOF Then
       .MovePrevious
    End If
  End With
ErrorHandle:
  Exit Sub
End Sub

Private Sub cmdPrevious_Click()
On Error GoTo ErrorHandle
  With Adodc1.Recordset
    .MovePrevious
    If .BOF Then
       .MoveNext
    End If
  End With
ErrorHandle:
  Exit Sub
End Sub

Private Sub cmdSave_Click()
  If txt代号.Text = "" And txt品名.Text = "" And txt单价.Text = "" And txt积分.Text = "" Then
     MsgBox "商品代号、商品品名、单价、单位积分不能为空!"
     Exit Sub
  End If
  
  If DataGrid1.Columns(3).Value = "" Then
     DataGrid1.Columns(3).Value = Val(txt积分.Text)
  End If
  
  Adodc1.Recordset.Update
  
  InputVar = True
  LockedOrNo (InputVar)
  
End Sub

Private Sub Form_Load()
  InputVar = True
  LockedOrNo (InputVar)
End Sub

Private Sub Toolbar1_ButtonClick(ByVal Button As ComctlLib.Button)
  Select Case Button.Key
  Case "AddNew"
    cmdAddNew_Click
  Case "Modify"
    cmdModify_Click
  Case "Save"
    cmdSave_Click
  Case "Delete"
    cmdDelete_Click
  Case "First"
    cmdFirst_Click
  Case "Next"
    cmdNext_Click
  Case "Previous"
    cmdPrevious_Click
  Case "Last"
    cmdLast_Click
  Case "Close"
    cmdClose_Click
  End Select
End Sub

Private Sub txt单价_LostFocus()
  If txt单价.Text = "" Then Exit Sub
  
  If IsNumeric(txt单价) = False Then
     MsgBox "输入错误,请输入数字"
     txt单价.Text = "0"
     txt单价.SetFocus
  End If
End Sub

Private Sub txt积分_LostFocus()
  If txt积分.Text <> "" Then
     If IsNumeric(txt积分) = False Then
        MsgBox "输入错误,请输入数字"
        txt积分.Text = "0"
        txt积分.SetFocus
        Exit Sub
     End If
  End If
End Sub

⌨️ 快捷键说明

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