📄 frmselect.frm
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Object = "{CDE57A40-8B86-11D0-B3C6-00A0C90AEA82}#1.0#0"; "MSDATGRD.OCX"
Begin VB.Form frmSelect
Caption = "选择药品"
ClientHeight = 6300
ClientLeft = 60
ClientTop = 345
ClientWidth = 6015
ControlBox = 0 'False
LinkTopic = "Form1"
ScaleHeight = 6300
ScaleWidth = 6015
StartUpPosition = 3 '窗口缺省
Begin VB.CheckBox Check1
Caption = "价格排序"
Height = 375
Left = 4560
TabIndex = 10
Top = 240
Width = 1455
End
Begin VB.CommandButton Command6
Caption = "刷新"
Height = 375
Left = 3600
TabIndex = 9
Top = 240
Width = 855
End
Begin VB.CommandButton Command5
Caption = "取消"
Height = 375
Left = 4320
TabIndex = 8
Top = 5880
Width = 975
End
Begin VB.CommandButton Command4
Caption = "修改"
Height = 375
Left = 1800
TabIndex = 7
Top = 5880
Width = 855
End
Begin VB.CommandButton Command3
Caption = "增加"
Height = 375
Left = 600
TabIndex = 6
Top = 5880
Width = 855
End
Begin VB.CommandButton Command2
Caption = "查询"
Height = 375
Left = 2640
TabIndex = 4
Top = 240
Width = 855
End
Begin VB.TextBox Text1
Height = 375
Left = 960
TabIndex = 3
Top = 240
Width = 1575
End
Begin VB.Frame Frame1
Height = 5055
Left = 120
TabIndex = 1
Top = 720
Width = 5775
Begin MSDataGridLib.DataGrid DataGrid1
Bindings = "frmSelect.frx":0000
Height = 4575
Left = 120
TabIndex = 2
Top = 240
Width = 5505
_ExtentX = 9710
_ExtentY = 8070
_Version = 393216
AllowUpdate = 0 'False
BorderStyle = 0
HeadLines = 2
RowHeight = 20
WrapCellPointer = -1 'True
FormatLocked = -1 'True
BeginProperty HeadFont {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 11.25
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9.75
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ColumnCount = 6
BeginProperty Column00
DataField = "DrugID"
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 = "Name"
Caption = "药品名称"
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
BeginProperty Column02
DataField = "StorePrice"
Caption = "价格"
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 1
Format = """¥""#,##0.00"
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 2
EndProperty
EndProperty
BeginProperty Column03
DataField = "Unit"
Caption = "单位"
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
BeginProperty Column04
DataField = "sType"
Caption = "类型"
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
BeginProperty Column05
DataField = "SearchCD"
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
MarqueeStyle = 3
BeginProperty Column00
ColumnWidth = 14.74
EndProperty
BeginProperty Column01
WrapText = -1 'True
ColumnWidth = 2039.811
EndProperty
BeginProperty Column02
ColumnWidth = 1154.835
EndProperty
BeginProperty Column03
ColumnWidth = 854.929
EndProperty
BeginProperty Column04
ColumnWidth = 1094.74
EndProperty
BeginProperty Column05
EndProperty
EndProperty
End
End
Begin VB.CommandButton Command1
Caption = "选定"
Height = 375
Left = 3000
TabIndex = 0
Top = 5880
Width = 975
End
Begin MSAdodcLib.Adodc Adodc1
Height = 495
Left = 480
Top = 4800
Visible = 0 'False
Width = 1335
_ExtentX = 2355
_ExtentY = 873
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 VB.Label Label1
Caption = "拼音码:"
Height = 255
Left = 240
TabIndex = 5
Top = 360
Width = 735
End
End
Attribute VB_Name = "frmSelect"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public gd As Integer
Private Sub Check1_Click()
If Check1.Value Then
Me.Adodc1.ConnectionString = Constr
Adodc1.CommandType = adCmdText
strSQL = "select * from DrugsDB where sgd=0 and searchcd like '%" & Trim(Text1.Text) & "%' order by storeprice ASC"
Adodc1.RecordSource = strSQL
Me.Adodc1.Refresh
Else
Me.Adodc1.ConnectionString = Constr
Adodc1.CommandType = adCmdText
strSQL = "select * from DrugsDB where sgd=0 and searchcd like '%" & Trim(Text1.Text) & "%' order by storeprice DESC"
Adodc1.RecordSource = strSQL
Me.Adodc1.Refresh
End If
End Sub
Private Sub Command1_Click()
Dim rs As New ADODB.Recordset
rs.Source = "select * from DrugsDB where DrugID='" & Adodc1.Recordset.Fields(0).Value & "'"
rs.ActiveConnection = Constr
rs.CursorType = adOpenKeyset
rs.LockType = adLockOptimistic
rs.Open
rs!del_flg = "0"
rs!storenum = 0
rs!sgd = gd
rs!forsale = "1"
rs.Update
rs.Close
'Text1.Text = "update DrugsDB set del_flg='0' , StoreNum=0 , sGd=" & gd & " where DrugID='" & Adodc1.Recordset.Fields(0).Value & "'"
'conn.Close
Unload Me
End Sub
Private Sub Command2_Click()
Me.Adodc1.ConnectionString = Constr
Adodc1.CommandType = adCmdText
strSQL = "select * from DrugsDB where sgd=0 and searchcd like '%" & Trim(Text1.Text) & "%' order by storeprice DESC"
Adodc1.RecordSource = strSQL
Me.Adodc1.Refresh
End Sub
Private Sub Command3_Click()
frmYpadm.ID = "0"
frmYpadm.Show (1)
End Sub
Private Sub Command4_Click()
frmYpadm.ypstr = Adodc1.Recordset.Fields(0).Value
frmYpadm.ID = Adodc1.Recordset.Fields(0).Value
frmYpadm.Show (1)
End Sub
Private Sub Command5_Click()
Unload Me
End Sub
Private Sub Command6_Click()
Me.Adodc1.ConnectionString = Constr
Adodc1.CommandType = adCmdText
strSQL = "select * from DrugsDB where sgd=0 and searchcd like '%" & Trim(Text1.Text) & "%' order by storeprice DESC"
Adodc1.RecordSource = strSQL
Me.Adodc1.Refresh
End Sub
Private Sub Form_Load()
Me.Adodc1.ConnectionString = Constr
Adodc1.CommandType = adCmdText
strSQL = "select * from DrugsDB where sgd=0 "
Adodc1.RecordSource = strSQL
Me.Adodc1.Refresh
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -