📄 dt_ckgl.frm
字号:
EndProperty
Height = 255
Left = 7560
TabIndex = 79
Top = 240
Width = 3675
End
Begin VB.Label lb_jls
Alignment = 1 'Right Justify
Caption = "0"
Height = 255
Left = 6540
TabIndex = 78
Top = 360
Width = 735
End
Begin VB.Label Label4
Alignment = 1 'Right Justify
Caption = "客人数 :"
Height = 255
Left = 5760
TabIndex = 77
Top = 360
Width = 795
End
Begin VB.Label Label2
Alignment = 2 'Center
Caption = "常 来 客 清 单"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 300
TabIndex = 76
Top = 240
Width = 5895
End
End
Begin VB.Timer XT_Timer
Interval = 1000
Left = 0
Top = 7200
End
Begin VB.Frame JZ
Enabled = 0 'False
Height = 600
Left = 135
TabIndex = 42
Top = 8220
Width = 9870
Begin VB.Label JZ_DQSJ2
BackStyle = 0 'Transparent
Height = 330
Left = 7980
TabIndex = 48
Top = 225
Width = 1050
End
Begin VB.Label JZ_NAME
BackStyle = 0 'Transparent
Caption = "操作员:"
Height = 330
Left = 450
TabIndex = 47
Top = 270
Width = 690
End
Begin VB.Label JZ_USER
BackStyle = 0 'Transparent
Height = 330
Left = 1320
TabIndex = 46
Top = 240
Width = 1500
End
Begin VB.Label JZ_JRSJ1
Caption = "进入时间:"
Height = 195
Left = 3285
TabIndex = 45
Top = 225
Width = 825
End
Begin VB.Label JZ_JRSJ2
Height = 195
Left = 4380
TabIndex = 44
Top = 225
Width = 1230
End
Begin VB.Label JZ_DQSJ1
Caption = "当前时间:"
Height = 195
Left = 6930
TabIndex = 43
Top = 225
Width = 825
End
End
Begin VB.CommandButton CMD_EXIT
Caption = "退 出(Esc)"
BeginProperty Font
Name = "黑体"
Size = 12
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 510
Left = 10140
TabIndex = 7
Top = 8280
Width = 1575
End
Begin VB.Label frm_msg
Alignment = 1 'Right Justify
ForeColor = &H00C00000&
Height = 330
Left = 5895
TabIndex = 49
Top = 180
Visible = 0 'False
Width = 5685
End
Begin VB.Label Label1
BeginProperty Font
Name = "黑体"
Size = 18
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 180
TabIndex = 41
Top = 120
Width = 11475
End
End
Attribute VB_Name = "dt_ckgl"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim i As Integer
Dim key_index As Integer '表示当前功能键的代码
Dim flex_rec As Recordset '
Dim t_funcNo As String '0:增加记录 1:修改记录
Dim t_bt As String '存储列表显示的表头
Dim t_fields As Variant '存储列表显示的字段名
Dim t_fdxs As Variant '显示列是否有特殊处理 0 无, 1 有
Dim t_fdcounts As Integer '表示列表所显示的字段的个数
Dim t_czlsh As String
'**************************************************************************************************
'* 功 能 : 用来设置各种控件 .edabled 的设置
'* 作 者 : 梁卫
'* 作成日期 : 1999.03.03
'* 修改日期 : 1999.03.03
'* 参数说明 : temp_funcNo -- 表示编辑状态 '0' - 增加 '1' - 修改 '2' - 删除
'* temp_ft -- 表示控件 .Enabled 的状态 True False
'**************************************************************************************************
Private Sub tPkjEnabledFT(temp_funcNo As String, temp_ft As Boolean) '控件.enabled 的设置
Select Case temp_funcNo
Case "0" '增加
m_xh.Enabled = False
lb_xh.Enabled = False
Case "1", "2" '修改,'删除
m_xh.Enabled = True
lb_xh.Enabled = True
Case Else
m_xh.Enabled = False
lb_xh.Enabled = False
End Select
lb_zwxm.Enabled = temp_ft
lb_wwxm.Enabled = temp_ft
lb_xb.Enabled = temp_ft
lb_kr_sr.Enabled = temp_ft
lb_gj.Enabled = temp_ft
lb_zjzl.Enabled = temp_ft
lb_zjhm.Enabled = temp_ft
lb_qzzl.Enabled = temp_ft
lb_yxq.Enabled = temp_ft
lb_ldcs.Enabled = temp_ft
lb_dz.Enabled = temp_ft
lb_kf_fz.Enabled = temp_ft
lb_zkl.Enabled = temp_ft
lb_tsfw.Enabled = temp_ft
lb_jd_bz1.Enabled = temp_ft
cmd_ok(0).Enabled = temp_ft
cmd_ok(1).Enabled = temp_ft
m_kr_x.Enabled = temp_ft
m_kr_m.Enabled = temp_ft
m_yw_x.Enabled = temp_ft
m_yw_m.Enabled = temp_ft
op_xb(0).Enabled = temp_ft
op_xb(1).Enabled = temp_ft
op_xb(2).Enabled = temp_ft
m_kr_sr.Enabled = temp_ft
m_gjdm.Enabled = temp_ft
cm_gjmc.Enabled = temp_ft
m_zjdm.Enabled = temp_ft
cm_zjmc.Enabled = temp_ft
m_kr_zjhm.Enabled = temp_ft
m_qzdm.Enabled = temp_ft
cm_qzmc.Enabled = temp_ft
m_kr_qz_yxq.Enabled = temp_ft
m_dz.Enabled = temp_ft
m_kf_zkl.Enabled = temp_ft
m_kf_fz.Enabled = temp_ft
cm_tsfw.Enabled = temp_ft
m_bz.Enabled = temp_ft
m_dfy_dm.Enabled = temp_ft
m_ldcs.Enabled = temp_ft
End Sub
'**************************************************************************************************
'* 功 能 : 用来设置各种控件赋值
'* 作 者 : 梁卫
'* 作成日期 : 1999.03.05
'* 修改日期 : 1999.03.05
'* 参数说明 : temp_rec -- 显示的记录集名称
'* trmp_bszt -- 表示字段按何方式显示 0 - 把字段清空 1 - 按记录集显示字段 2 - 字段初始化
'**************************************************************************************************
Private Sub tPkjTextSet(temp_rec As Recordset, temp_bszt As String)
Select Case temp_bszt
Case 0 '把字段清空
m_xh.Text = ""
m_kr_x.Text = ""
m_kr_m.Text = ""
m_yw_x.Text = ""
m_yw_m.Text = ""
m_kr_sr.Text = "____-__-__"
m_dfy_dm.Text = ""
m_gjdm.Text = ""
cm_gjmc.Text = ""
op_xb(0).Value = False
op_xb(1).Value = False
op_xb(2).Value = False
m_zjdm.Text = ""
cm_zjmc.Text = ""
m_kr_zjhm.Text = ""
m_qzdm.Text = ""
cm_qzmc.Text = ""
m_kr_qz_yxq.Text = "____-__-__"
m_dz.Text = ""
m_kf_fz.Text = 0
m_kf_zkl.Text = 0
cm_tsfw.Text = ""
m_bz.Text = ""
m_ldcs.Text = ""
Case 2 '把字段初始化
m_xh.Text = ""
m_kr_x.Text = ""
m_kr_m.Text = ""
m_yw_x.Text = ""
m_yw_m.Text = ""
m_kr_sr.Text = "____-__-__"
m_dfy_dm.Text = ""
m_gjdm.Text = "CN"
If PUB_GetCMName(m_gjdm, cm_gjmc) Then
Else
cm_gjmc.Text = "*"
End If
op_xb(1).Value = True
m_zjdm.Text = "01"
If PUB_GetCMName(m_zjdm, cm_zjmc) Then
Else
cm_zjmc.Text = "*"
End If
m_kr_zjhm.Text = ""
m_qzdm.Text = ""
cm_qzmc.Text = ""
m_kr_qz_yxq.Text = "____-__-__"
m_dz.Text = ""
m_kf_fz.Text = 0
m_kf_zkl.Text = 0
cm_tsfw.Text = ""
m_bz.Text = ""
m_ldcs.Text = 0
Case 1 '按记录集给字段赋值
With temp_rec
m_xh.Text = .Fields("XH")
m_kr_x.Text = Trim(.Fields("KR_X"))
m_kr_m.Text = Trim(.Fields("KR_M"))
m_yw_x.Text = Trim(.Fields("YW_X"))
m_yw_m.Text = Trim(.Fields("YW_M"))
op_xb(.Fields("KR_XBDM")).Value = True
m_kr_sr.Text = IIf(IsNull(.Fields("KR_SR")), "____-__-__", Format(.Fields("KR_SR"), "yyyy-mm-dd"))
m_gjdm.Text = Trim(.Fields("GJDM"))
cm_gjmc.Text = Trim(.Fields("GJMC"))
m_zjdm.Text = Trim(.Fields("ZJDM"))
cm_zjmc.Text = Trim(.Fields("ZJMC"))
m_kr_zjhm.Text = Trim(.Fields("KR_ZJHM"))
m_qzdm.Text = Trim(.Fields("QZDM"))
cm_qzmc.Text = Trim(.Fields("QZMC"))
m_kr_qz_yxq.Text = IIf(IsNull(.Fields("KR_QZ_YXQ")), "____-__-__", Format(.Fields("KR_QZ_YXQ"), "yyyy-mm-dd"))
m_dz.Text = Trim(.Fields("DZ"))
m_kf_fz.Text = .Fields("KF_FZ")
m_kf_zkl.Text = .Fields("KF_ZKL") * 100
cm_tsfw.Text = .Fields("TSFW")
m_bz.Text = Trim(.Fields("BZ"))
m_ldcs.Text = .Fields("LDCS")
m_dfy_dm.Text = Trim(.Fields("DFY_DM"))
End With
End Select
End Sub
'**************************************************************************************************
'* 功 能 : 用来给字段赋值
'* 作 者 : 梁卫
'* 作成日期 : 1999.03.05
'* 修改日期 : 1999.03.05
'* 参数说明 : temp_rec -- 显示的记录集名称
'* trmp_funcNo -- 表示编辑状态 '0' - 增加 '1' - 修改
'**************************************************************************************************
Private Sub tPkjFieldGet(temp_rec As Recordset, temp_funcNo As String)
Dim GJ_rec As Recordset 'DT_KRGJK
Dim MaxXH_rec As Recordset 'DT_CKQD 中的最大序号
Dim temp_xbdm As Integer
With temp_rec
.Fields("KR_X") = IIf(Trim(m_kr_x.Text) = "", "*", Trim(m_kr_x.Text))
.Fields("KR_M") = IIf(Trim(m_kr_m.Text) = "", "*", Trim(m_kr_m.Text))
.Fields("YW_X") = IIf(Trim(m_yw_x.Text) = "", "*", Trim(m_yw_x.Text))
.Fields("YW_M") = IIf(Trim(m_yw_m.Text) = "", "*", Trim(m_yw_m.Text))
If op_xb(0).Value Then
temp_xbdm = 0
ElseIf op_xb(1).Value Then
temp_xbdm = 1
Else
temp_xbdm = 2
End If
.Fields("KR_XBDM") = temp_xbdm
.Fields("KR_XBMC") = Left(Trim(op_xb(temp_xbdm).Caption), 1)
If Trim(m_kr_sr.Text) = "____-__-__" Then
.Fields("KR_SR") = Null
Else
.Fields("KR_SR") = CDate(m_kr_sr.Text)
End If
.Fields("GJDM") = IIf(Trim(m_gjdm.Text) = "", "*", Trim(m_gjdm.Text))
If Trim(m_gjdm.Text) = "*" Then
Set GJ_rec = PUB_data.OpenRecordset("SELECT * FROM DT_KRGJK WHERE TRIM(GJDM)='" & Trim(m_gjdm.Text) & "'", 4, 0, 2)
If Not GJ_rec.BOF Then
GJ_rec.MoveLast
.Fields("GJ_SSZDM") = GJ_rec.Fields("GJ_SSZDM")
.Fields("GJJC") = GJ_rec.Fields("GJJC")
Else
.Fields("GJ_SSZDM") = 0
.Fields("GJJC") = "*"
End If
GJ_rec.Close
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -