计算机应用 | 古代文学 | 市场营销 | 生命科学 | 交通物流 | 财务管理 | 历史学 | 毕业 | 哲学 | 政治 | 财税 | 经济 | 金融 | 审计 | 法学 | 护理学 | 国际经济与贸易
计算机软件 | 新闻传播 | 电子商务 | 土木工程 | 临床医学 | 旅游管理 | 建筑学 | 文学 | 化学 | 数学 | 物理 | 地理 | 理工 | 生命 | 文化 | 企业管理 | 电子信息工程
计算机网络 | 语言文学 | 信息安全 | 工程力学 | 工商管理 | 经济管理 | 计算机 | 机电 | 材料 | 医学 | 药学 | 会计 | 硕士 | 法律 | MBA
现当代文学 | 英美文学 | 通讯工程 | 网络工程 | 行政管理 | 公共管理 | 自动化 | 艺术 | 音乐 | 舞蹈 | 美术 | 本科 | 教育 | 英语 |

VB+免费的,医药管理系统(一)毕业论文(6)

2013-06-13 01:23
导读:abled = True FrmMain.A3.Enabled = True End If Else MsgBox "密码错误", , "提示" End If End Sub 2.前台查询窗体代码 Private Sub Command1_Click() If Option1 Then Adodc1.RecordSource = "selec
abled = True
   FrmMain.A3.Enabled = True
   End If
Else
  MsgBox "密码错误", , "提示"
End If
End Sub
2.前台查询窗体代码
Private Sub Command1_Click()
If Option1 Then
 Adodc1.RecordSource = "select medicinecode as 药品编码,medicinename as 药品名称,price as 售价,stocknum as 库存量,unit as 单位,usefullife as 有效期至 from MedInfor where medicinename= '" & Text1 & "'"
Adodc1.Refresh
End If
If Option2 Then
Select Case Combo1.Text
Case "处方药"
 Adodc1.RecordSource = "select medicinecode as 药品编码,medicinename   药品名称,price as 售价,stocknum as 库存量,unit as 单位,usefullife as 有效期至 from MedInfor where medkindcode= '1'"
Adodc1.Refresh
Case "非处方药"
 Adodc1.RecordSource = "select medicinecode as 药品编码,medicinename as 药品名称,price as 售价,stocknum as 库存量,unit as 单位,usefullife as 有效期至 from MedInfor where medkindcode= '2'"
Adodc1.Refresh
Case "中药饮片"
 Adodc1.RecordSource = "select medicinecode as 药品编码,medicinename as 药品名称,price as 售价,stocknum as 库存量,unit as 单位,usefullife as 有效期至 from MedInfor where medkindcode= '3'"
Adodc1.Refresh
Case "中药材"
 Adodc1.RecordSource = "select medicinecode as 药品编码,medicinename as 药品名称,price as 售价,stocknum as 库存量,unit as 单位,usefullife as 有效期至,ratifycode as 批准文号 from MedInfor where medkindcode= '4'"
Adodc1.Refresh
Case "医疗器械"
 Adodc1.RecordSource = "select medicinecode as 药品编码,medicinename as 药品名称,price as 售价,stocknum as 库存量,unit as 单位,usefullife as 有效期至 from MedInfor where medkindcode= '5'"
Adodc1.Refresh
Case "非药品(保健品)"
 Adodc1.RecordSource = "select medicinecode as 药品编码,medicinename as 药品名称,price as 售价,stocknum as 库存量,unit as 单位,usefullife as 有效期 from MedInfor where medkindcode= '6'" (转载自科教范文网http://fw.nseac.com)
Adodc1.Refresh
End Select
End If
If Adodc1.Recordset.EOF Then
MsgBox "无此信息!", , "提示"
 Adodc1.RecordSource = "select medicinecode as 药品编码,medicinename as 药品名称,price as 售价,stocknum as 库存量,unit as 单位,usefullife as 有效期至 from MedInfor "
Adodc1.Refresh
End If
End Sub
3.销售界面代码
Private Sub Command1_Click()
 Adodc1.RecordSource = "select medicinecode as 药品编码,medicinename as 药品名称,price as 售价 ,unit as 单位,stocknum as 库存量 from medinfor where medicinecode='" & Text1 & "'"
Adodc1.Refresh
If Adodc1.Recordset.EOF Then MsgBox "无此信息!", , "提示"
If Val(Text11.Text) - Val(Text2.Text) < 0 Then
MsgBox "库存不足", , "提示"
Text1.Text = "": Text2.Text = "": Text1.SetFocus
Else
On Error Resume Next
Adodc2.Recordset.AddNew
Text12.Text = Text4.Text
Text13.Text = Text7.Text
Text14.Text = Text8.Text
Text15.Text = Text9.Text
Text16.Text = Text10.Text
Text17.Text = Val(Text9.Text) * Val(Text2.Text)
Text18.Text = Text2.Text
Adodc2.Recordset.Update
Adodc2.Recordset.MoveLast
Adodc1.Recordset.Update
Text11.Text = Val(Text11.Text) - Val(Text2.Text)
Adodc1.Recordset.Update
Adodc1.Recordset.MoveLast
x = x + Val(Text17.Text)
End If
End Sub
Private Sub Command2_Click()
Static y As Integer
y = Val(Text4.Text) + 1
Text4.Text = y
Text5.Text = Date$
Text6.Text = x
Adodc3.Recordset.AddNew
Text19.Text = Text4.Text
Text20.Text = Text3.Text
Text21.Text = Date$
Text22.Text = Text6.Text
Adodc3.Recordset.Update
Adodc3.Recordset.MoveLast
Text6.SetFocus
End Sub
Private Sub Text6_LostFocus()
x = 0
End Sub
4.药品信息查询代码(仓库管理和日常管理的药品查询都用此代码) 本文来自中国科教评价网
Option Explicit
Private Sub Command1_Click(
上一篇:学生综合信息查询系统设计与实现+pb(一) 下一篇:没有了