📄 cw_zuofei.frm
字号:
VERSION 5.00
Object = "{86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCT2.OCX"
Object = "{CDE57A40-8B86-11D0-B3C6-00A0C90AEA82}#1.0#0"; "MSDATGRD.OCX"
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Begin VB.Form cw_zuofei
BorderStyle = 1 'Fixed Single
Caption = "铁东区妇幼保健院信息管理系统"
ClientHeight = 5835
ClientLeft = 45
ClientTop = 330
ClientWidth = 8895
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 5835
ScaleWidth = 8895
StartUpPosition = 2 '屏幕中心
Begin VB.CommandButton Command3
Caption = "作废(药品)"
Height = 375
Left = 7440
TabIndex = 11
Top = 840
Width = 1215
End
Begin VB.Frame Frame2
Caption = "药品信息"
Height = 1935
Left = 120
TabIndex = 9
Top = 3600
Width = 8655
Begin MSAdodcLib.Adodc Adodc2
Height = 735
Left = 1080
Top = 1080
Visible = 0 'False
Width = 1200
_ExtentX = 2117
_ExtentY = 1296
ConnectMode = 0
CursorLocation = 3
IsolationLevel = -1
ConnectionTimeout= 15
CommandTimeout = 30
CursorType = 3
LockType = 3
CommandType = 8
CursorOptions = 0
CacheSize = 50
MaxRecords = 0
BOFAction = 0
EOFAction = 0
ConnectStringType= 1
Appearance = 1
BackColor = -2147483643
ForeColor = -2147483640
Orientation = 0
Enabled = -1
Connect = ""
OLEDBString = ""
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = ""
Caption = "Adodc1"
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 MSDataGridLib.DataGrid DataGrid2
Height = 1575
Left = 240
TabIndex = 10
Top = 240
Width = 8175
_ExtentX = 14420
_ExtentY = 2778
_Version = 393216
HeadLines = 1
RowHeight = 15
BeginProperty HeadFont {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ColumnCount = 2
BeginProperty Column00
DataField = ""
Caption = ""
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
BeginProperty Column01
DataField = ""
Caption = ""
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
SplitCount = 1
BeginProperty Split0
BeginProperty Column00
EndProperty
BeginProperty Column01
EndProperty
EndProperty
End
End
Begin VB.Frame Frame1
Caption = "收费记录"
Height = 1935
Left = 120
TabIndex = 6
Top = 1440
Width = 8655
Begin MSAdodcLib.Adodc Adodc1
Height = 735
Left = 1080
Top = 960
Visible = 0 'False
Width = 1200
_ExtentX = 2117
_ExtentY = 1296
ConnectMode = 0
CursorLocation = 3
IsolationLevel = -1
ConnectionTimeout= 15
CommandTimeout = 30
CursorType = 3
LockType = 3
CommandType = 8
CursorOptions = 0
CacheSize = 50
MaxRecords = 0
BOFAction = 0
EOFAction = 0
ConnectStringType= 1
Appearance = 1
BackColor = -2147483643
ForeColor = -2147483640
Orientation = 0
Enabled = -1
Connect = ""
OLEDBString = ""
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = ""
Caption = "Adodc1"
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 MSDataGridLib.DataGrid DataGrid1
Height = 1575
Left = 240
TabIndex = 7
Top = 240
Width = 8175
_ExtentX = 14420
_ExtentY = 2778
_Version = 393216
HeadLines = 1
RowHeight = 15
BeginProperty HeadFont {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ColumnCount = 2
BeginProperty Column00
DataField = ""
Caption = ""
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
BeginProperty Column01
DataField = ""
Caption = ""
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
SplitCount = 1
BeginProperty Split0
BeginProperty Column00
EndProperty
BeginProperty Column01
EndProperty
EndProperty
End
End
Begin VB.CommandButton Command2
Caption = "作废(收费记录)"
Height = 375
Left = 5880
TabIndex = 5
Top = 840
Width = 1455
End
Begin VB.CommandButton Command1
Caption = "查 询"
Height = 375
Left = 4800
TabIndex = 4
Top = 840
Width = 975
End
Begin MSComCtl2.DTPicker v_sj
Height = 375
Left = 3240
TabIndex = 3
Top = 840
Width = 1335
_ExtentX = 2355
_ExtentY = 661
_Version = 393216
Format = 57868289
CurrentDate = 38195
End
Begin VB.TextBox v_kahao
Height = 375
Left = 960
TabIndex = 0
Top = 840
Width = 1335
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "卡 号"
Height = 180
Left = 240
TabIndex = 8
Top = 840
Width = 540
End
Begin VB.Label Label3
AutoSize = -1 'True
Caption = "时 间"
Height = 180
Left = 2520
TabIndex = 2
Top = 960
Width = 540
End
Begin VB.Label Label2
AutoSize = -1 'True
Caption = "单 据 作 废"
BeginProperty Font
Name = "宋体"
Size = 15
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 300
Left = 3360
TabIndex = 1
Top = 240
Width = 1755
End
End
Attribute VB_Name = "cw_zuofei"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
v_zt1 = "作废"
Dim sql As String
Dim rs As New ADODB.Recordset
sql = "select * from 收费表 where 编码= '" + Trim(v_kahao.Text) + "' and 日期='" + CStr(v_sj.Value) + "' and 类别 <> '" + Trim(v_zt1) + "'"
rs.Open sql, db
If Not rs.EOF Then
Adodc1.CommandType = adCmdText
Adodc1.ConnectionString = db
Adodc1.RecordSource = sql
Set DataGrid1.DataSource = Adodc1
Adodc1.Refresh
Else
b1 = MsgBox("警告,没有找到收费记录!", vbQuestion, "系统提示!")
Set DataGrid1.DataSource = rs
End If
Dim sql1 As String
Dim rs1 As New ADODB.Recordset
sql1 = "select * from 药品销售表 where 卡号= '" + Trim(v_kahao.Text) + "' and 日期='" + CStr(v_sj.Value) + "' and 状态 <> '" + Trim(v_zt1) + "'"
rs1.Open sql1, db
If Not rs1.EOF Then
Adodc2.CommandType = adCmdText
Adodc2.ConnectionString = db
Adodc2.RecordSource = sql1
Set DataGrid2.DataSource = Adodc2
Adodc2.Refresh
Else
b1 = MsgBox("警告,没有找到药品记录记录!", vbQuestion, "系统提示!")
Set DataGrid2.DataSource = rs1
End If
End Sub
Private Sub Command2_Click()
On Error Resume Next
b1 = MsgBox("您确实要作废该条记录吗?", vbOKCancel, "系统提示!")
If b1 = 1 Then
v_id = CStr(Adodc1.Recordset.Fields("id"))
If v_id = "" Then
b1 = MsgBox("请选择记录?", vbOKOnly, "系统提示!")
Exit Sub
Else
v_zt1 = "作废"
sql = "update 收费表 set 类别='" + Trim(v_zt1) + "' where id=" + Trim(v_id)
Dim rs As New ADODB.Recordset
rs.Open sql, db
b1 = MsgBox("提示:该收费记录已经作废!", vbQuestion, "系统提示!")
Exit Sub
End If
End If
End Sub
Private Sub Command3_Click()
On Error Resume Next
b1 = MsgBox("您确实要作废该条药品记录吗?", vbOKCancel, "系统提示!")
If b1 = 1 Then
v_id1 = CStr(Adodc2.Recordset.Fields("id"))
If v_id1 = "" Then
b1 = MsgBox("请选择记录?", vbOKOnly, "系统提示!")
Exit Sub
Else
v_zt1 = "作废"
sql2 = "update 药品销售表 set 状态='" + Trim(v_zt1) + "' where id=" + Trim(v_id1)
Dim rs2 As New ADODB.Recordset
rs2.Open sql2, db
sql1 = "update 收费表 set 类别='" + Trim(v_zt1) + "' where id=" + Trim(v_id1)
Dim rs1 As New ADODB.Recordset
rs1.Open sql1, db
b1 = MsgBox("提示:该药品收费记录已经作废!", vbQuestion, "系统提示!")
Exit Sub
End If
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -