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

📄 barcodemanager.ebf

📁 windows mobile 应用程序开发实践一书的源代码
💻 EBF
📖 第 1 页 / 共 2 页
字号:
         _cy             =   661
         BackColor       =   12632256
         Caption         =   "末记录"
         Enabled         =   -1  'True
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Tahoma"
            Size            =   9
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Style           =   0
      End
      Begin VBCE.CommandButton but_next 
         Height          =   375
         Left            =   1440
         TabIndex        =   7
         Top             =   2880
         Width           =   735
         _cx             =   1296
         _cy             =   661
         BackColor       =   12632256
         Caption         =   "下一条"
         Enabled         =   -1  'True
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Tahoma"
            Size            =   9
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Style           =   0
      End
      Begin VBCE.CommandButton but_previous 
         Height          =   375
         Left            =   720
         TabIndex        =   6
         Top             =   2880
         Width           =   735
         _cx             =   1296
         _cy             =   661
         BackColor       =   12632256
         Caption         =   "前一条"
         Enabled         =   -1  'True
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Tahoma"
            Size            =   9
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Style           =   0
      End
      Begin VBCE.CommandButton but_first 
         Height          =   375
         Left            =   0
         TabIndex        =   5
         Top             =   2880
         Width           =   735
         _cx             =   1296
         _cy             =   661
         BackColor       =   12632256
         Caption         =   "第一条"
         Enabled         =   -1  'True
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Tahoma"
            Size            =   9
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Style           =   0
      End
      Begin VBCE.CommandButton but_shanchu 
         Height          =   375
         Left            =   2880
         TabIndex        =   4
         Top             =   2520
         Width           =   735
         _cx             =   1296
         _cy             =   661
         BackColor       =   12632256
         Caption         =   "删 除"
         Enabled         =   -1  'True
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Tahoma"
            Size            =   9
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Style           =   0
      End
      Begin VBCE.CommandButton but_xiugai 
         Height          =   375
         Left            =   1440
         TabIndex        =   3
         Top             =   2520
         Width           =   735
         _cx             =   1296
         _cy             =   661
         BackColor       =   12632256
         Caption         =   "修 改"
         Enabled         =   -1  'True
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Tahoma"
            Size            =   9
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Style           =   0
      End
      Begin VBCE.CommandButton but_zenjia 
         Height          =   375
         Left            =   720
         TabIndex        =   2
         Top             =   2520
         Width           =   735
         _cx             =   1296
         _cy             =   661
         BackColor       =   12632256
         Caption         =   "增 加"
         Enabled         =   -1  'True
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Tahoma"
            Size            =   9
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Style           =   0
      End
      Begin VBCE.CommandButton but_dakai 
         Height          =   375
         Left            =   0
         TabIndex        =   1
         Top             =   2520
         Width           =   735
         _cx             =   1296
         _cy             =   661
         BackColor       =   12632256
         Caption         =   "打 开"
         Enabled         =   -1  'True
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Tahoma"
            Size            =   9
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Style           =   0
      End
   End
   Begin VBCE.ListBox tableidlist 
      Height          =   240
      Left            =   720
      TabIndex        =   22
      Top             =   4320
      Visible         =   0   'False
      Width           =   375
      List            =   "barcodemanager.frx":0000
      ItemData        =   "barcodemanager.frx":0028
      _cx             =   661
      _cy             =   423
      BackColor       =   -2147483643
      Enabled         =   -1  'True
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "Tahoma"
         Size            =   9
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   -2147483640
      Columns         =   0
      IntegralHeight  =   -1  'True
      MultiSelect     =   0
      Sorted          =   0   'False
   End
   Begin VBCE.ListBox tablelist 
      Height          =   660
      Left            =   480
      TabIndex        =   21
      Top             =   4080
      Visible         =   0   'False
      Width           =   735
      List            =   "barcodemanager.frx":0050
      ItemData        =   "barcodemanager.frx":0078
      _cx             =   1296
      _cy             =   1164
      BackColor       =   -2147483643
      Enabled         =   -1  'True
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "Tahoma"
         Size            =   9
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   -2147483640
      Columns         =   0
      IntegralHeight  =   -1  'True
      MultiSelect     =   0
      Sorted          =   0   'False
   End
End
Attribute VB_Name = "barcodemanager"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit

Private Sub but_dakai_Click()

   opentable barcodemanager, "detail"
   Form1.Text1.Text = table.cursortype
   Form1.Text2.Text = table.State
   Form1.Text3.Text = table.RecordCount
   Form1.Text4.Text = table.EOF
   Form1.Text5.Text = table.BOF
   Form1.Text6.Text = table.AbsolutePosition
   Form1.Text7.Text = table.PageSize
   Form1.Text8.Text = table.AbsolutePage
   
End Sub
Private Sub but_zenjia_Click()


but_zenjia.enabled = False
but_tijiao.enabled = True
but_xiugai.enabled = False
but_shanchu.enabled = False
movex barcodemanager, False
enablefields (barcodemanager)
clearfields (barcodemanager)
  

End Sub
Private Sub but_tijiao_Click()
   

   If barcodemanager.tx_tiaoma.Text = "" Then
   MsgBox "条码值不能为空", vbOKOnly, "注意"
   Exit Sub
   ElseIf Not IsNumeric(tx_jiage.Text) Then
    MsgBox "价格必须为数字", vbOKOnly, "注意"
   Exit Sub
   Else
   If table.editmode = adEditInProgress Then
   updatefields barcodemanager, table
   table.update
   Else
   addnewdata barcodemanager, table
   End If
   End If
   showfields barcodemanager, table
   disablefields (barcodemanager)
   movex barcodemanager, True
   barcodemanager.but_tijiao.enabled = False
   barcodemanager.but_zenjia.enabled = True
   barcodemanager.but_xiugai.enabled = True
   barcodemanager.but_shanchu.enabled = True
  

End Sub
Private Sub but_xiugai_Click()

enablefields (barcodemanager)
movex barcodemanager, False
xiugai barcodemanager, table
barcodemanager.but_zenjia.enabled = True
barcodemanager.but_tijiao.enabled = True
barcodemanager.but_xiugai.enabled = False


End Sub
Private Sub but_shanchu_Click()

   shanchu barcodemanager, table
   
End Sub
Private Sub but_first_Click()
 
move2first barcodemanager
   Form1.Text1.Text = table.cursortype
   Form1.Text2.Text = table.State
   Form1.Text3.Text = table.RecordCount
   Form1.Text4.Text = table.EOF
   Form1.Text5.Text = table.BOF
   Form1.Text6.Text = table.AbsolutePosition
   Form1.Text7.Text = table.PageSize
   Form1.Text8.Text = table.AbsolutePage


End Sub
Private Sub but_previous_Click()
 
move2qianyitiao barcodemanager
   Form1.Text1.Text = table.cursortype
   Form1.Text2.Text = table.State
   Form1.Text3.Text = table.RecordCount
   Form1.Text4.Text = table.EOF
   Form1.Text5.Text = table.BOF
   Form1.Text6.Text = table.AbsolutePosition
   Form1.Text7.Text = table.PageSize
   Form1.Text8.Text = table.AbsolutePage


End Sub
Private Sub but_next_Click()
 
move2xiayitiao barcodemanager
   Form1.Text1.Text = table.cursortype
   Form1.Text2.Text = table.State
   Form1.Text3.Text = table.RecordCount
   Form1.Text4.Text = table.EOF
   Form1.Text5.Text = table.BOF
   Form1.Text6.Text = table.AbsolutePosition
   Form1.Text7.Text = table.PageSize
   Form1.Text8.Text = table.AbsolutePage

End Sub
Private Sub but_end_Click()
 
move2jieshu barcodemanager
   Form1.Text1.Text = table.cursortype
   Form1.Text2.Text = table.State
   Form1.Text3.Text = table.RecordCount
   Form1.Text4.Text = table.EOF
   Form1.Text5.Text = table.BOF
   Form1.Text6.Text = table.AbsolutePosition
   Form1.Text7.Text = table.PageSize
   Form1.Text8.Text = table.AbsolutePage


End Sub
Private Sub but_tuicu_Click()

If table.State = adStateOpen Then
If table.editmode = adEditInProgress Then
 table.CancelUpdate
 table.MovePrevious
 table.MoveNext
 but_tijiao.enabled = False
End If
movex barcodemanager, False
barcodemanager.but_zenjia.enabled = False
barcodemanager.but_xiugai.enabled = False
barcodemanager.but_shanchu.enabled = False
barcodemanager.but_dakai.enabled = True
clearfields (barcodemanager)
End If
barcodemanager.Visible = False
 Form1.Text1.Text = table.cursortype
   Form1.Text2.Text = table.State
   Form1.Text3.Text = table.RecordCount
   Form1.Text4.Text = table.EOF
   Form1.Text5.Text = table.BOF
   Form1.Text6.Text = table.AbsolutePosition
   Form1.Text7.Text = table.PageSize
   Form1.Text8.Text = table.AbsolutePage

End Sub
Private Sub but_chongxie_Click()
 
   chongxiedata barcodemanager
   barcodemanager.but_tijiao.enabled = True
   
End Sub
Private Sub Form_Load()
    
   
   If table.State = adStateClosed Then
   table.Open "detail", Connection, adOpenKeyset, adLockOptimistic
   End If
   showallfieldshasarray (barcodemanager)
   barcodemanager.tx_tiaoma.Text = globestr
   barcodemanager.but_tijiao.enabled = False
   barcodemanager.but_dakai.enabled = True
   barcodemanager.but_shanchu.enabled = False
   barcodemanager.but_xiugai.enabled = False
   barcodemanager.but_zenjia.enabled = False
   barcodemanager.but_tuicu.enabled = True
  
   
   movex barcodemanager, False
   

End Sub





⌨️ 快捷键说明

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