frmtdcl_edit.frm
来自「音像店(CD刻录)进销存管理系统」· FRM 代码 · 共 290 行
FRM
290 行
VERSION 5.00
Begin VB.Form frmTDCL_Edit
Caption = "退碟信息登记"
ClientHeight = 5175
ClientLeft = 60
ClientTop = 450
ClientWidth = 6450
LinkTopic = "Form1"
ScaleHeight = 5175
ScaleWidth = 6450
StartUpPosition = 1 '所有者中心
Begin VB.Frame Frame2
Height = 555
Left = 1688
TabIndex = 14
Top = 4410
Width = 3075
Begin VB.CommandButton cmdOK
Caption = "确 定"
Height = 300
Left = 315
TabIndex = 7
Top = 180
Width = 1000
End
Begin VB.CommandButton cmdCancel
Caption = "取 消"
Height = 300
Left = 1755
TabIndex = 15
TabStop = 0 'False
Top = 180
Width = 1000
End
End
Begin VB.Frame Frame1
Height = 4110
Left = 428
TabIndex = 8
Top = 90
Width = 5595
Begin VB.TextBox txtGKXM
Alignment = 1 'Right Justify
Height = 300
Left = 1395
TabIndex = 1
Top = 810
Width = 1455
End
Begin VB.TextBox txtBZ
Alignment = 1 'Right Justify
Height = 705
Left = 1395
TabIndex = 6
Top = 3060
Width = 3795
End
Begin VB.ComboBox cmbYYD
Height = 300
Left = 1395
TabIndex = 5
Top = 2610
Width = 1455
End
Begin VB.ComboBox cmbDLSDH
Height = 300
Left = 1395
TabIndex = 0
Top = 360
Width = 1455
End
Begin VB.TextBox txtTDRQ
Alignment = 2 'Center
Height = 300
Left = 1395
TabIndex = 4
Top = 2160
Width = 1455
End
Begin VB.TextBox txtDJRQ
Alignment = 1 'Right Justify
Height = 300
Left = 1395
TabIndex = 3
Top = 1710
Width = 1455
End
Begin VB.TextBox txtGKDH
Alignment = 1 'Right Justify
Height = 300
Left = 1395
TabIndex = 2
Top = 1260
Width = 2265
End
Begin VB.Label Label1
Alignment = 1 'Right Justify
Caption = "备注"
Height = 240
Index = 8
Left = 180
TabIndex = 17
Top = 3150
Width = 1050
End
Begin VB.Label Label1
Alignment = 1 'Right Justify
Caption = "原用碟"
Height = 240
Index = 6
Left = 180
TabIndex = 16
Top = 2700
Width = 1050
End
Begin VB.Label Label1
Alignment = 1 'Right Justify
Caption = "退碟日期"
Height = 240
Index = 4
Left = 180
TabIndex = 13
Top = 2250
Width = 1050
End
Begin VB.Label Label1
Alignment = 1 'Right Justify
Caption = "登记日期"
Height = 240
Index = 3
Left = 180
TabIndex = 12
Top = 1800
Width = 1050
End
Begin VB.Label Label1
Alignment = 1 'Right Justify
Caption = "顾客电话"
Height = 240
Index = 2
Left = 180
TabIndex = 11
Top = 1350
Width = 1050
End
Begin VB.Label Label1
Alignment = 1 'Right Justify
Caption = "顾客姓名"
Height = 240
Index = 1
Left = 180
TabIndex = 10
Top = 900
Width = 1050
End
Begin VB.Label Label1
Alignment = 1 'Right Justify
Caption = "代理商代号"
Height = 240
Index = 0
Left = 180
TabIndex = 9
Top = 450
Width = 1050
End
End
End
Attribute VB_Name = "frmTDCL_Edit"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Public TD_ID As Long
Public Modify As Boolean
Dim MyTuiDieChuLi As New clsTuiDieChuLi
Dim MyDaiLiShang As New clsDaiLiShang
Dim MyShangPin As New clsShangPin
Private Sub cmbDLSDH_KeyPress(KeyAscii As Integer)
EnterTAB (KeyAscii)
End Sub
Private Sub cmbYYD_KeyPress(KeyAscii As Integer)
EnterTAB (KeyAscii)
End Sub
Private Sub cmdCancel_Click()
Unload Me
End Sub
Private Sub cmdOK_Click()
'检查录入数据的有效性
If Trim(cmbDLSDH.Text) = "" Then
MsgBox "请输入代理商代号!", , "警告"
cmbDLSDH.SetFocus
Exit Sub
End If
If Trim(txtTDRQ.Text) = "" Then
MsgBox "请输入退碟日期!", , "警告"
txtTDRQ.SetFocus
Exit Sub
End If
'把用户录入的数据复制到对象MyRuKuCaoZuo中
With MyTuiDieChuLi
.Init
.DLS_ID = MyDaiLiShang.GetId(Trim(cmbDLSDH.Text))
.GKXM = Trim(txtGKXM.Text)
.GKDH = Trim(txtGKDH.Text)
.DJRQ = Trim(txtDJRQ.Text)
.TDRQ = Trim(txtTDRQ.Text)
.YYD = Trim(cmbYYD.Text)
.BZ = txtBZ.Text
If Modify = False Then
.Insert
Else
.Update (TD_ID)
End If
End With
Set MyTuiDieChuLi = Nothing
Set MyDaiLiShang = Nothing
Unload Me
End Sub
Private Sub Form_Load()
Dim i As Integer
MyDaiLiShang.Load_Client
i = 0
Do While Arr_Client(i) <> ""
cmbDLSDH.AddItem Arr_Client(i)
i = i + 1
Loop
txtDJRQ.Text = Date
With MyShangPin
.Load_PinMing
i = 0
Do While Arr_ShangPin(i) <> ""
.GetInfo (.GetId(Arr_ShangPin(i)))
If .ShuLei = "CDR" Then
cmbYYD.AddItem Arr_ShangPin(i)
End If
i = i + 1
Loop
End With
Set MyDaiLiShang = Nothing
Set MyShangPin = Nothing
End Sub
Private Sub txtBZ_KeyPress(KeyAscii As Integer)
EnterTAB (KeyAscii)
End Sub
Private Sub txtDJRQ_KeyPress(KeyAscii As Integer)
EnterTAB KeyAscii
End Sub
Private Sub txtGKDH_KeyPress(KeyAscii As Integer)
EnterTAB KeyAscii
End Sub
'Private Sub txtRKDJ_KeyPress(KeyAscii As Integer)
' EnterTAB KeyAscii
' If In_Single(KeyAscii) = False Then
' KeyAscii = 0
' End If
'End Sub
Private Sub txtGKXM_Change()
End Sub
Private Sub txtGKXM_KeyPress(KeyAscii As Integer)
EnterTAB KeyAscii
End Sub
Private Sub txtTDRQ_KeyPress(KeyAscii As Integer)
EnterTAB (KeyAscii)
End Sub
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?