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

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

2013-06-13 01:23
导读:) On Error Resume Next If Command1.Caption = "新增" Then Command1.Caption = "确认" Adodc1.Recordset.AddNew Text4.SetFocus Else Command1.Caption = "新增" Adodc1.Recordset.Update Adodc1.Recordset.
)
On Error Resume Next
If Command1.Caption = "新增" Then
   Command1.Caption = "确认"
   Adodc1.Recordset.AddNew
   Text4.SetFocus
Else
Command1.Caption = "新增"
Adodc1.Recordset.Update
Adodc1.Recordset.MoveLast
End If
End Sub
Private Sub Command2_Click()
On Error Resume Next
Adodc1.Recordset.Delete
Adodc1.Recordset.MoveNext
If Adodc1.Recordset.EOF Then Adodc1.Recordset.MoveLast
End Sub
Private Sub Command3_Click()
On Error Resume Next
If Command3.Caption = "修改" Then
   Command3.Caption = "确认"
   Adodc1.Recordset.Update
   Text4.SetFocus
Else
Command3.Caption = "修改"
Adodc1.Recordset.Update
Command1.Enabled = True
Command2.Enabled = True
Command5.Enabled = True
End If
End Sub
Private Sub Command4_Click()
Command3.Caption = "修改"
Command1.Caption = "添加"
On Error GoTo RefreshErr
  Adodc1.Refresh
  Exit Sub
RefreshErr:
  MsgBox Err.Description
End Sub
Private Sub Command5_Click()
Frame1.Visible = True
End Sub
Private Sub Command6_Click()
If Option1 Then
 Adodc1.RecordSource = "select medicinecode as 药品编码,medicinename as 药品名称,medkindcode as 药品类别代码,price as 售价,listprice as 厂价,stocknum as 库存量,unit as 单位,usefullife as 有效期至,ratifycode as 批准文号 from MedInfor where medicinecode= '" & Text1 & "'"
Adodc1.Refresh
End If
If Option2 Then
 Adodc1.RecordSource = "select medicinecode as 药品编码,medicinename as 药品名称,medkindcode as 药品类别代码,price as 售价,listprice as 厂价,stocknum as 库存量,unit as 单位,usefullife as 有效期至,ratifycode as 批准文号 from MedInfor where medicinename= '" & Text2 & "'" (转载自http://zw.NSEaC.com科教作文网)
Adodc1.Refresh
End If
If Option3 Then
Select Case Combo1.Text
Case "处方药"
 Adodc1.RecordSource = "select medicinecode as 药品编码,medicinename as 药品名称,medkindcode as 药品类别代码,price as 售价,listprice as 厂价,stocknum as 库存量,unit as 单位,usefullife as 有效期至,ratifycode as 批准文号 from MedInfor where medkindcode= '1'"
Adodc1.Refresh
Case "非处方药"
 Adodc1.RecordSource = "select medicinecode as 药品编码,medicinename as 药品名称,medkindcode as 药品类别代码,price as 售价,listprice as 厂价,stocknum as 库存量,unit as 单位,usefullife as 有效期至,ratifycode as 批准文号 from MedInfor where medkindcode= '2'"
Adodc1.Refresh
Case "中药饮片"
 Adodc1.RecordSource = "select medicinecode as 药品编码,medicinename as 药品名称,medkindcode as 药品类别代码,price as 售价,listprice as 厂价,stocknum as 库存量,unit as 单位,usefullife as 有效期至,ratifycode as 批准文号 from MedInfor where medkindcode= '3'"
Adodc1.Refresh
Case "中药材"
 Adodc1.RecordSource = "select medicinecode as 药品编码,medicinename as 药品名称,medkindcode as 药品类别代码,price as 售价,listprice as 厂价,stocknum as 库存量,unit as 单位,usefullife as 有效期至,ratifycode as 批准文号 from MedInfor where medkindcode= '4'"
Adodc1.Refresh
Case "医疗器械"
 Adodc1.RecordSource = "select medicinecode as 药品编码,medicinename as 药品名称,medkindcode as 药品类别代码,price as 售价,listprice as 厂价,stocknum as 库存量,unit as 单位,usefullife as 有效期至,ratifycode as 批准文号 from MedInfor where medkindcode= '5'"
Adodc1.Refresh
Case "非药品(保健品)"
 Adodc1.RecordSource = "select medicinecode as 药品编码,medicinename as 药品名称,medkindcode as 药品类别代码,price as 售价,listprice as 厂价,stocknum as 库存量,unit as 单位,usefullife as 有效期至,ratifycode as 批准文号 from MedInfor where medkindcode= '6'"

(科教作文网http://zw.ΝsΕAc.Com编辑整理)


Adodc1.Refresh
End Select
End If
If Option4 Then
 Adodc
上一篇:学生综合信息查询系统设计与实现+pb(一) 下一篇:没有了