📄 wh_sfxmadd.frm
字号:
VERSION 5.00
Begin VB.Form wh_sfxmadd
BorderStyle = 1 'Fixed Single
Caption = "铁东区妇幼保健院信息管理系统"
ClientHeight = 3600
ClientLeft = 45
ClientTop = 435
ClientWidth = 7245
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 3600
ScaleWidth = 7245
StartUpPosition = 2 '屏幕中心
Begin VB.Frame Frame2
Caption = "收费项目添加(小项)"
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 3375
Left = 3720
TabIndex = 13
Top = 120
Width = 3375
Begin VB.ComboBox x_dxm
Height = 300
Left = 1200
TabIndex = 4
Top = 840
Width = 1800
End
Begin VB.ComboBox x_kb
Height = 300
ItemData = "wh_sfxmadd.frx":0000
Left = 1200
List = "wh_sfxmadd.frx":0028
TabIndex = 6
Text = "出生证"
Top = 1800
Width = 1800
End
Begin VB.CommandButton Command3
Caption = "确 定"
Default = -1 'True
Height = 375
Left = 1920
TabIndex = 18
Top = 2880
Width = 1095
End
Begin VB.TextBox x_fxm
Height = 375
Left = 1200
TabIndex = 5
Top = 1320
Width = 1800
End
Begin VB.TextBox x_jg
Height = 375
Left = 1200
TabIndex = 7
Text = "0"
Top = 2280
Width = 1800
End
Begin VB.ComboBox x_type
Height = 300
ItemData = "wh_sfxmadd.frx":007D
Left = 1200
List = "wh_sfxmadd.frx":008A
TabIndex = 3
Text = "妇保"
Top = 360
Width = 1800
End
Begin VB.Label Label8
AutoSize = -1 'True
Caption = "科 别"
Height = 180
Left = 240
TabIndex = 19
Top = 1920
Width = 630
End
Begin VB.Label Label7
AutoSize = -1 'True
Caption = "分 项 目"
Height = 180
Left = 240
TabIndex = 17
Top = 1440
Width = 720
End
Begin VB.Label Label6
AutoSize = -1 'True
Caption = "价 格"
Height = 180
Left = 240
TabIndex = 16
Top = 2400
Width = 630
End
Begin VB.Label Label5
AutoSize = -1 'True
Caption = "大 项 目"
Height = 180
Left = 240
TabIndex = 15
Top = 960
Width = 720
End
Begin VB.Label Label4
AutoSize = -1 'True
Caption = "类 型"
Height = 180
Left = 240
TabIndex = 14
Top = 480
Width = 630
End
End
Begin VB.CommandButton Command1
Caption = "确 定"
Height = 375
Left = 2160
TabIndex = 8
Top = 3000
Width = 1095
End
Begin VB.Frame Frame1
Caption = "收费项目添加(大项)"
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 3375
Left = 120
TabIndex = 9
Top = 120
Width = 3375
Begin VB.ComboBox v_type
Height = 300
ItemData = "wh_sfxmadd.frx":00A4
Left = 1200
List = "wh_sfxmadd.frx":00B1
TabIndex = 0
Text = "妇保"
Top = 360
Width = 1800
End
Begin VB.TextBox v_jiage
Height = 375
Left = 1200
TabIndex = 2
Text = "0"
Top = 1560
Width = 1800
End
Begin VB.TextBox v_xiangmu
Height = 375
Left = 1200
TabIndex = 1
Top = 960
Width = 1800
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "类 型"
Height = 180
Left = 240
TabIndex = 12
Top = 480
Width = 720
End
Begin VB.Label Label2
AutoSize = -1 'True
Caption = "项目名称"
Height = 180
Left = 240
TabIndex = 11
Top = 1080
Width = 720
End
Begin VB.Label Label3
AutoSize = -1 'True
Caption = "价 格"
Height = 180
Left = 240
TabIndex = 10
Top = 1680
Width = 720
End
End
End
Attribute VB_Name = "wh_sfxmadd"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
b1 = MsgBox("您确实继续吗?", vbOKCancel, "系统提示!")
If b1 = 1 Then
Dim c_type, c_xiangmu, c_jiage As String
If v_xiangmu.Text = "" Then
b1 = MsgBox("警告,项目不能为空!", vbQuestion, "系统提示!")
v_xiangmu.SetFocus
Exit Sub
End If
If Not IsNumeric(v_jiage.Text) Then
b1 = MsgBox("警告,单价不能为空或非数字!", vbQuestion, "系统提示!")
v_jiage.SetFocus
Exit Sub
End If
c_type = Trim(v_type.Text)
c_xiangmu = Trim(v_xiangmu.Text)
c_jiage = Trim(v_jiage.Text)
Dim sql As String
sql = "insert into 收费明细 (类型,项目,价格) values ('" + c_type + "','" + c_xiangmu + "','" + c_jiage + "')"
Dim rs As New ADODB.Recordset
rs.Open sql, db
b1 = MsgBox("恭喜,数据输入成功!", vbInformation, "系统提示!")
Unload Me
wh_sfxmadd.Show
Exit Sub
End If
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
Private Sub Command3_Click()
b1 = MsgBox("您确实继续吗?", vbOKCancel, "系统提示!")
If b1 = 1 Then
If x_dxm.Text = "" Then
b1 = MsgBox("警告,大项目不能为空!", vbQuestion, "系统提示!")
x_dxm.SetFocus
Exit Sub
End If
If x_fxm.Text = "" Then
b1 = MsgBox("警告,分项目不能为空!", vbQuestion, "系统提示!")
x_fxm.SetFocus
Exit Sub
End If
If Not IsNumeric(x_jg.Text) Then
b1 = MsgBox("警告,单价不能为空或非数字!", vbQuestion, "系统提示!")
x_jg.SetFocus
Exit Sub
End If
Dim x_type1, x_dxm1, x_fxm1, x_jiage1, x_kebie As String
x_type1 = Trim(x_type.Text)
x_dxm1 = Trim(x_dxm.Text)
x_fxm1 = Trim(x_fxm.Text)
x_kebie1 = Trim(x_kb.Text)
x_jiage1 = Trim(x_jg.Text)
Dim sql As String
sql = "insert into 配比表 (类型,大项,小项,科别,价格) values ('" + x_type1 + "','" + x_dxm1 + "','" + x_fxm1 + "','" + x_kebie1 + "','" + x_jiage1 + "')"
Dim rs As New ADODB.Recordset
rs.Open sql, db
b1 = MsgBox("恭喜,数据输入成功!", vbInformation, "系统提示!")
Exit Sub
End If
End Sub
Private Sub Command4_Click()
Unload Me
End Sub
Private Sub Form_Load()
'获的名字
Dim rs48 As New ADODB.Recordset
Dim sql48 As String
sql48 = "select distinct(项目) from 收费明细 "
rs48.Open sql48, db
While Not rs48.EOF
x_dxm.AddItem Trim(IIf(IsNull(rs48!项目), "", rs48!项目))
rs48.MoveNext
Wend
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -